RE: Closing Main window with out Closing the child window



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 pointer to destroy that window.

Secondly if I have more than 3 windows with each having OK and Cancel
button how do I differentiate between them? All these buttons have same
signal on_ok_button_clicked and on_cancel_button_clicked. They are
redefined in callbacks.c. 

What you ought to do to get familiar with Gtk is to read the tutorial
that's at http://www.gtk.org/tutorial/ Once you go through the first
third of the tutorial you will know the answers to all the questions you
have raised.

-----Original Message-----
From: David Necas (Yeti) [mailto:yeti physics muni cz] 
Sent: Friday, March 10, 2006 10:12 AM
To: Prabhakar Muthuswamy
Cc: gtk-app-devel-list gnome org
Subject: Re: Closing Main window with out Closing the child window

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 behind the second window. Is there an API which would allow
me
to close the main window with out closing the entire application?

Closing any window does not terminate the application,
unless you set it up so.  And there is no main window (well,
your app perhaps has a main window, but that concept is
introduced by the app, not by Gtk+).

So, do not terminate the app in the "destroy" callback of
the window, or disconnect the callback, or just stop doing
the thing that makes your app quit.  Then you can simply
destroy the first window when you show the second one.

Yeti


--
That's enough.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
-- 
Your eyes are weary from staring at the CRT.  You feel sleepy.  Notice
how restful it is to watch the cursor blink.  Close your eyes.  The   
opinions stated above are yours.  You cannot imagine why you ever felt
otherwise.




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