Dialog transience relationships
nix at go-nix.ca
Sun Aug 12 04:18:58 EDT 2007
On Sat, 2007-08-11 at 04:27 -0400, Sadrul Habib Chowdhury wrote:
> 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.
The problem is, I cannot determine from within pidgin_request_* which
role the incoming request is for. For example, if I get the
pidgin_request_input for MSN's "Set friendly name", I cannot know that
this is in fact the set-friendly-name request available only from the
buddy lists Accounts -> <MSN Account> -> Set friendly name menu item.
However, it strikes me that, instead of a void *ui_data parameter, we
could add a char *ui_hint parameter, which expresses what part of
libpurple this request is from. This string would be one out of a pool
of strings whose values describe the parts of libpurple ("account",
"blist", "connection", "conversation"). That way, the UI would have a
rough idea what parts of the core the request is related to, and could
find corresponding UI parts to hook the dialogs to.
In Pidgin, these hints could be used as Sadrul said: to identify which
of the currently available toplevel windows the dialog should be made
transient to. The buddy list could serve as a last string fallback.
Of course, the initial pool of strings /could/ slyly coincide with the
roles we have assigned to the various Pidgin windows. This does not
prevent other UIs from making use of these strings in a fashion similar
More information about the Devel