Re: [gtk-list] Re: Modal Dialog Box



On Sun, 24 May 1998, Didimo E. Grimaldo T. wrote:
>   the 'type'. Again, a pity that GtkDialog is missing a pixmap on the
>   side :(. Is it possible to append this to the vbox member with 
>   *pack_start() ?

I have done such a thing using a table.

>   On the code example from above the gtk_widget_realize() didn't work, I
>   took it out and used gtk_show_widget() instead.

Sorry, I thought it was clear that you have to show the widget - my
mistake. 


>   And ye a more important question (hammering until it works is not
>   very productive) since the application code is actually waiting for
>   a YES/NO confirmation the app code needs to wait until the dialog
>   (or modal window) comes back with an answer. How do I achieve that?
>   I mean, the callback does get to know the YES/NO but the other part
>   right after the createDialog() should wait, but a simple while loop
>   would work against GTK's event processing queue.

To process GTK events: 
  while gtk_events_pending() gtk_main_iteration()
as shown in the docs.

You could place the code, which would be executed into the callbacks of
the buttons. I see no need to place the code into the calling function.
So the OK button callback would delete a file, the CANCEL button callback
would do nothing.

Regards
Karsten



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