Dialog transience relationships

Sadrul Habib Chowdhury imadil at gmail.com
Sat Aug 11 04:27:09 EDT 2007


* Gabriel Schulhof had this to say on [11 Aug 2007, 10:58:45 +0300]:
> On Thu, 2007-08-09 at 16:03 -0500, Richard Laager wrote:
> > On Wed, 2007-08-08 at 23:35 +0300, Gabriel Schulhof wrote:
> > > 1. Add a parameter of the form void *ui_data to all the
> > > {pidgin,purple}_request_* functions just before void *user_data. This
> > > parameter can be NULL, but, if set, it is a GtkWindow * of the parent.
> > 
> > This seems reasonable, but how are you going to solve the original
> > problem for dialogs requested by the core? It's not going to have a
> > ui_data to pass.
> 
> Indeed. I grepped the code and found many places where things bubble up
> from the core, or some prpl.
> 
> I suppose, if (!ui_data), I could use
> pidgin_blist_get_default_gtk_blist() to retrieve the buddy list and
> if /that's/ not NULL, use blist->window.
> 

You can probably use gtk_window_list_toplevels() and select any of the
windows (or look at the role of a window and try to determine the
'best one') from the list as the parent.

Sadrul




More information about the Devel mailing list