Re: GtkDialog
- From: Havoc Pennington <hp redhat com>
- To: Deepa Chacko Pillai <deepa chacko wipro com>
- Cc: gtk <gtk-list gnome org>
- Subject: Re: GtkDialog
- Date: 09 Mar 2002 12:53:21 -0500
Deepa Chacko Pillai <deepa chacko wipro com> writes:
> I have an application which displays some data. I have implemented
> this using GtkDialog. It has 2 buttons - Yes and No. Since I have
> two different callbacks associated with each of these buttons, I
> need to use gtk_dialog_run () to differentiate the response id's
> emitted. gtk_dialog_run () in my case has to be in the main (), as
> I am creating the GtkDialog here. Now I have problem placing
> gtk_dialog_run () and gtk_main () as both will block waiting for
> events. If I place gtk_dialog_run () before gtk_main (), then the
> dialog box will not be able to get any other event from the X
> server. How can I get over this?
>
I don't see the problem - gtk_dialog_run() just enters the main loop,
gtk_main() just enters the main loop also.
So you do:
response = gtk_dialog_run ();
/* handle response */
gtk_main ();
It should work just fine.
You don't even need to use gtk_main(), it's fine to just use
g_main_loop_run() directly as well.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]