[Glade-users] Closing windows properly.



On 05/26/13 12:46, Tristan Van Berkom wrote:
On Sun, May 26, 2013 at 4:04 PM, dE <de.techno at gmail.com> wrote:
I happens that whenever I get a window opened, and then I close it (no
signal associated with close), and then again if that windows is opened, all
I get is a small blank window.

I doubt this's cause the window is not closed properly (default handler is
not good enough).

So what should be done? Thanks for the help!
I don't exactly understand what is going wrong... but if you want to handle
the event where a window is closed, you should handle the "delete-event"
signal on your window:

https://developer.gnome.org/gtk3/unstable/GtkWidget.html#GtkWidget-delete-event

Cheers,
     -Tristan


_______________________________________________
Glade-users maillist  -  Glade-users at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/glade-users

You mean this shouldn't happen? Even if I do not have any event related 
to closing of the window, it should appear again if the same function is 
evoked? Here's the code --

void msgs (char *msg) {
     GtkWidget *msg_window;
     msg_window = GTK_WIDGET(gtk_builder_get_object( build_object, 
"dialog1" ));
     gtk_label_set_text_with_mnemonic ( detect_object ("label3"), msg );
     gtk_widget_show ( msg_window );
}

I'm using the same build object as for the main window of the application.

If this function is evoked more than twice in a single run, all windows 
except the 1st one will open properly, all subsequent windows will be blank.




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