Dialog transience relationships

Gabriel Schulhof nix at go-nix.ca
Tue Aug 14 02:52:48 EDT 2007


On Tue, 2007-08-14 at 00:31 -0500, Mark Doliner wrote:
> On Wed, 08 Aug 2007 23:35:16 +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.
[...]
> I also like the other suggestion about using a hint to specify if the dialog
> should be associated with the buddy list, or the accounts window, or a
> conversation window.  It seems like that would cover most cases.

I figured that might be better. Currently, I'm using const char *ui_hint
instead of void *ui_data, and I'm working with the following list:

"account"
"blist"
"buddy"
"register-account"
"xfer"
"chat"

I figure, I could list all the toplevels and, based on these hints /and/
things like the PurpleConversation parameter to these functions, which
also may be there, decide on a toplevel to pick as the "window of
transience".

The way I identify all the locations where purple_request_* calls need
changing is to have changed request.h and then try to compile, and watch
for warnings (in the case of purple_request_action(), which is a (...)
function) and errors.

Unfortunately, I'm not familiar enough with all the protocols and
plugins that produce these messages, so, some of the requests may end up
mis-hinted. I'm also not 100% sure about my list of strings. Once the
modifications are complete, of course, we can tweak both the list, and
the value out of that list we use with each purple_request_* call.

Thanks for your thoughts,



Gabriel




More information about the Devel mailing list