# HG changeset patch # User Gabriel Schulhof # Date 1186600788 0 # Node ID 9a31c183b4703f03757688714bec7ac860ac56b2 # Parent c11c4afe90249d35d35c514076a66c088f1402cd Adding parameter void *ui_data for parent window diff -r c11c4afe9024 -r 9a31c183b470 libpurple/request.c --- a/libpurple/request.c Wed Aug 08 18:56:57 2007 +0000 +++ b/libpurple/request.c Wed Aug 08 19:19:48 2007 +0000 @@ -1288,7 +1288,7 @@ const char *ok_text, GCallback ok_cb, const char *cancel_text, GCallback cancel_cb, PurpleAccount *account, const char *who, PurpleConversation *conv, - void *user_data) + void *ui_data, void *user_data) { PurpleRequestUiOps *ops; @@ -1308,7 +1308,7 @@ fields, ok_text, ok_cb, cancel_text, cancel_cb, account, who, conv, - user_data); + ui_data, user_data); handles = g_list_append(handles, info); diff -r c11c4afe9024 -r 9a31c183b470 libpurple/request.h --- a/libpurple/request.h Wed Aug 08 18:56:57 2007 +0000 +++ b/libpurple/request.h Wed Aug 08 19:19:48 2007 +0000 @@ -205,7 +205,7 @@ const char *ok_text, GCallback ok_cb, const char *cancel_text, GCallback cancel_cb, PurpleAccount *account, const char *who, PurpleConversation *conv, - void *user_data); + void *ui_data, void *user_data); void *(*request_file)(const char *title, const char *filename, gboolean savedialog, GCallback ok_cb, GCallback cancel_cb, PurpleAccount *account, const char *who, PurpleConversation *conv, @@ -1349,7 +1349,7 @@ const char *ok_text, GCallback ok_cb, const char *cancel_text, GCallback cancel_cb, PurpleAccount *account, const char *who, PurpleConversation *conv, - void *user_data); + void *ui_data, void *user_data); /** * Closes a request. diff -r c11c4afe9024 -r 9a31c183b470 pidgin/gtkdialogs.c --- a/pidgin/gtkdialogs.c Wed Aug 08 18:56:57 2007 +0000 +++ b/pidgin/gtkdialogs.c Wed Aug 08 19:19:48 2007 +0000 @@ -738,7 +738,6 @@ purple_request_field_set_required(field, TRUE); purple_request_field_group_add_field(group, field); - g_print("pidgin_dialogs_im: Calling purple_request_fields\n"); purple_request_fields(purple_get_blist(), _("New Instant Message"), NULL, _("Please enter the screen name or alias of the person " @@ -747,8 +746,7 @@ _("OK"), G_CALLBACK(pidgin_dialogs_im_cb), _("Cancel"), NULL, NULL, NULL, NULL, - NULL); - g_print("pidgin_dialogs_im: Called purple_request_fields\n"); + parent, NULL); } void diff -r c11c4afe9024 -r 9a31c183b470 pidgin/gtkrequest.c --- a/pidgin/gtkrequest.c Wed Aug 08 18:56:57 2007 +0000 +++ b/pidgin/gtkrequest.c Wed Aug 08 19:19:48 2007 +0000 @@ -1048,7 +1048,7 @@ const char *ok_text, GCallback ok_cb, const char *cancel_text, GCallback cancel_cb, PurpleAccount *account, const char *who, PurpleConversation *conv, - void *user_data) + void *ui_data, void *user_data) { PidginRequestData *data; GtkWidget *win; @@ -1062,6 +1062,7 @@ GtkWidget *button; GtkWidget *img; GtkWidget *sw; + GtkWindow *parent = GTK_WINDOW(ui_data); GtkSizeGroup *sg; GList *gl, *fl; PurpleRequestFieldGroup *group; @@ -1089,6 +1090,8 @@ #else /* !_WIN32 */ data->dialog = win = pidgin_create_window(title, PIDGIN_HIG_BORDER, "multifield", TRUE) ; #endif /* _WIN32 */ + if (parent) + gtk_window_set_transient_for(GTK_WINDOW(data->dialog), parent); g_signal_connect(G_OBJECT(win), "delete_event", G_CALLBACK(destroy_multifield_cb), data);