How do I remove the close button from a window in Fedora Core 5?
- From: "Jonathan Cooper" <jcooper guardianedge com>
- To: <gtk-app-devel-list gnome org>
- Subject: How do I remove the close button from a window in Fedora Core 5?
- Date: Tue, 17 Jul 2007 08:44:40 -0700
I need to remove the close button from a window, but (due to
requirements beyond my control) I must use code that is compatible with
libraries available in Fedora Core 5. So, I cannot use set_deletable()
or gtk_window_set_deletable(). Does anyone know how to do this?
I am using a class that derives from Gtk::Window and attempted to simply
create a slightly modified version of gtk_window_set_deletable() which
strips out the checking to see if I want it to be deletable or not
(since I definitely want the window to NOW be deletable). But it is not
working. Here is the code I am using:
GtkWindow* window = this->gobj();
GtkWindowPrivate *priv;
priv = GTK_WINDOW_GET_PRIVATE (window);
if (GTK_WIDGET (window)->window)
{
gdk_window_set_functions (GTK_WIDGET (window)->window,
(GdkWMFunction)(GDK_FUNC_ALL | GDK_FUNC_CLOSE));
}
I am not sure why, but the "GTK_WIDGET (window)->window" is false (which
I suspect means I am actually getting a NULL value for
g_type_instance_cast() which is used by the GTK_WIDGET macro). Since
the Gtk::Window::gobj() function returns a GtkWindow*, I do not
understand why this is failing. I would appreciate any advice on what I
am doing wrong...or if there is an easier way to do this.
Thank you,
Jonathan Cooper
Software Developer
jcooper guardianedge com
GuardianEdge
415.683.2433 - D
415.683.2433 - C 415.683.2428 - F
GuardianEdge
473 McLaws Circle
Williamsburg, VA 23185
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]