Re: reinitialize application

2006-03-10 Thread Andreas Kotowicz
On Fri, 2006-03-10 at 21:02 +0100, David Necas (Yeti) wrote: > > If you have gtk_main_quit() connected to the "destroy" > signal of the window, you should not be surprised that it > does what you told it to do (quits Gtk main loop when the > window it destroyed). you are absolutely right - I've

Handling Unix signals in a GTK+ application

2006-03-10 Thread Thomas Okken
I would like to catch SIGINT in my GTK+ application, to do a graceful exit. I was looking for the GTK+ equivalent of XtNoticeSignal(), but I guess there isn't one; when I searched the archive, all I found was some mention of a proposed GLib extension called g_signal_notify() -- which looks like wha

Re: reinitialize application

2006-03-10 Thread David Necas (Yeti)
On Fri, Mar 10, 2006 at 08:57:09PM +0100, Andreas Kotowicz wrote: > I tried the destroy and construct way: > > void > on_button4_clicked (GtkButton *button, > gpointer user_data) > { > > gtk_widget_destroy(gtk_widget_get_t

Re: reinitialize application

2006-03-10 Thread Andreas Kotowicz
On Fri, 2006-03-10 at 20:19 +0100, David Necas (Yeti) wrote: > On Fri, Mar 10, 2006 at 07:40:25PM +0100, Andreas Kotowicz wrote: > > > > so what I'm looking after is a way to clear all those entry fields any > > other variables which might have changed during the running program. > > so just rein

Re: reinitialize application

2006-03-10 Thread David Necas (Yeti)
On Fri, Mar 10, 2006 at 07:40:25PM +0100, Andreas Kotowicz wrote: > > so what I'm looking after is a way to clear all those entry fields any > other variables which might have changed during the running program. > so just reinitialize the app :) If you want to reset state of some widgets to a pr

Re: reinitialize application

2006-03-10 Thread Andreas Kotowicz
Hi, >gtk_init( &argc, &argv); /* you do have this somewhere > right? */ sorry, I forgot to post a bit of my main.c. so here's the complete one: int main (int argc, char *argv[]) { GtkWidget *window1; gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE,

Re: reinitialize application

2006-03-10 Thread Nickolai Dobrynin
Andreas, I highly recommend that you go through the GTK+ tutorial first. This will give you some basic grounds on how GTK+ works. Just a few remarks here: 1. You probably want to use gtk_widget_show_all in your 'main' function, rather than just 'gtk_widget_show'. 2. If I understand you corre

RE: Closing Main window with out Closing the child window

2006-03-10 Thread Wallace Owen
On Fri, 2006-03-10 at 11:16 -0500, Prabhakar Muthuswamy wrote: > Thanks Yeti, How do I destroy first the firstwindow when I don't have > that pointer when I pop up the second window? By default glade creates > the first window pointer in main.c. In my callbacks.c I don't have > access to this point

RE: Closing Main window with out Closing the child window

2006-03-10 Thread Prabhakar Muthuswamy
Thanks Yeti, How do I destroy first the firstwindow when I don't have that pointer when I pop up the second window? By default glade creates the first window pointer in main.c. In my callbacks.c I don't have access to this pointer to destroy that window. Secondly if I have more than 3 windows with

reinitialize application

2006-03-10 Thread Andreas Kotowicz
I have a main.c like this: int main (int argc, char *argv[]) { GtkWidget *window1; window1 = create_window1 (); gtk_widget_show (window1); gtk_main (); return 0; } and I have some callbacks in callbacks.c which modify some labels. now I want to create a button "clear" which deletes all

Re: Closing Main window with out Closing the child window

2006-03-10 Thread David Necas (Yeti)
On Fri, Mar 10, 2006 at 09:51:03AM -0500, Prabhakar Muthuswamy wrote: > I have a main window (which is a login screen) after I am > authenticated this main window should go away and other window should > pop up. As of now I am able to pop the second window but the main window > is hiding behin

Closing Main window with out Closing the child window

2006-03-10 Thread Prabhakar Muthuswamy
All I have a main window (which is a login screen) after I am authenticated this main window should go away and other window should pop up. As of now I am able to pop the second window but the main window is hiding behind the second window. Is there an API which would allow me to close the ma