RE: How do I remove the close button from a window in Fedora Core5?



Thank you very much, Michael!   That did the trick.  It was rather
simple, I just didn't expect that the window wasn't realized since this
same code worked fine on FC6.  I just had to connect to
signal_realize...and then put the code to remove the close button into
the signal handler.

Thanks again,
Jonathan


-----Original Message-----
From: Michael Ekstrand [mailto:mekstran scl ameslab gov] 
Sent: Tuesday, July 17, 2007 12:00 PM
To: Jonathan Cooper
Cc: gtk-app-devel-list gnome org
Subject: Re: How do I remove the close button from a window in Fedora
Core5?

On Tue, Jul 17, 2007 at 08:44:40AM -0700, Jonathan Cooper wrote:
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.

It means that, for whatever reason, your GTK widget doesn't yet have a
GDK window.  Looking at the source code for GtkWindow reveals that it
doesn't get a window until it is realized.  So you probably want to do
the set_functions call in a realize signal handler.

- Michael





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]