Re: Issue with gtk+ 2.8.15 for win32
- From: "Nickolai Dobrynin" <ndobrynin gmail com>
- To: "Elden Armbrust" <earmbrust xero-soft com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Issue with gtk+ 2.8.15 for win32
- Date: Fri, 24 Mar 2006 21:11:26 -0600
1. Use "destroy" rather than "destroy_event" as the second argument to your
call. "destroy" is a signal rather than an event.
2. IIRC, gtk_signal_connect has been deprecated in favor of
g_signal_connect.
Regards,
Nickolai
On 3/24/06, Elden Armbrust <earmbrust xero-soft com> wrote:
It appears I have spoken too soon.
I have added the following code to my project, yet it still continues to
leave a process running.
Code - (in interface.c, for the construction of wndMain)
gtk_signal_connect (GTK_OBJECT (wndMain), "destroy_event",
GTK_SIGNAL_FUNC (on_wndMain_destroy_event),
NULL);
Code - callbacks.c (just a single function pulled from the file)
gboolean
on_wndMain_destroy_event (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
printf("Got destroy event, shutting down.\r\n");
gtk_main_quit();
return FALSE;
}
However, the Hello world 1 & 2 from the tutorial both work as they should.
This pretty much leaves me back at square one. I'll likely go bother
the Linux server in a bit to see if the same code
does the same thing there.
-Elden Armbrust
Elden Armbrust wrote:
David Necas (Yeti) wrote:
On Fri, Mar 24, 2006 at 04:04:53PM -0500, Elden Armbrust wrote:
When exiting out of a program written in C using GTK+ 2.8.15, the
process does not end (ever) but the window does close.
That is correct. Gtk+ does not terminate applications just
because some of their windows was closed. So the program
continues to run normally, it just do not display any
window now.
You need to connect to the "destroy" signal of the window
and do gtk_main_quit() (which makes gtk_main() return) in
the callback. See the tutorial, section Getting started.
Yeti
--
That's enough.
I had to laugh at myself for failing to realize that I had to do that
in glade (if i planned to use glade, that is) if I wanted it to be
done the "glade way".
With that said, everything is working fine now, thank you very much.
On another note, my gtk-wimp question still stands.
Hopefully some kind soul knowledgeable about it can point me in the
right direction.
-Elden Armbrust
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]