Re: dialog enhancements



On 25 Mar 2000, Havoc Pennington wrote:

> Fritz Jetzek <fritz.jetzek@i-dmedia.com> writes: 
> > So when rethinking the GtkDialog API one should possibly rethink whether
> > the call to gtk_main is really necessary. Apart from not being able to
> 
> It's necessary if you want to block the flow of execution, of course
> you don't have to use gnome_dialog_run(), you can just use callbacks
> instead.

not at all ;)
the simple solution to fritz's (urg, do you actually apostrophe-s
such a name? ;) which also takes care of carrying on the main_quit
flag is (and that's what BEAST's procedure dialog does):

dialog_run (GtkWidget *dialog)
{
  [...]

  gtk_widget_ref (dialog);

  [...]

  gtk_widget_show (dialog); /* GtkWindow.modal cares about modality here */
  do
    g_main_iteration (TRUE);
  while (GTK_WIDGET_VISIBLE (dialog));

  [...]

  gtk_widget_unref (dialog);

  [...]
}

> 
> Havoc
> 

---
ciaoTJ



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