# HG changeset patch # User Gabriel Schulhof # Date 1186678303 0 # Node ID e4978be9898438575eb9dcf032982d8acb9a2f49 # Parent fab096e7b8047a720c2179ca1a860e3f62255c40# Parent d082ddab1cccc37d6495ec567c30735e08952501 propagate from branch 'im.pidgin.pidgin' (head 1aba81cae8b963708281123ed6c438ba5861113d) to branch 'org.maemo.garage.pidgin.pidgin.dialog-transience' (head 3974afed72d35d8c541ef57908fa15be5b2d8501) diff -r fab096e7b804 -r e4978be98984 pidgin/gtkblist.c --- a/pidgin/gtkblist.c Thu Aug 09 02:42:49 2007 +0000 +++ b/pidgin/gtkblist.c Thu Aug 09 16:51:43 2007 +0000 @@ -2837,6 +2837,11 @@ !purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/debug/enabled")); } +static void +pidgin_blist_show_with_parent(gpointer data1, void (*callback)(GtkWindow *parent), gpointer data3) +{ + callback(GTK_WINDOW(gtkblist->window)); +} /*************************************************** * Crap * @@ -2869,7 +2874,7 @@ /* Tools */ { N_("/_Tools"), NULL, NULL, 0, "", NULL }, { N_("/Tools/Buddy _Pounces"), NULL, pidgin_pounces_manager_show, 0, "", NULL }, - { N_("/Tools/Plu_gins"), "U", pidgin_plugin_dialog_show, 0, "", PIDGIN_STOCK_TOOLBAR_PLUGINS }, + { N_("/Tools/Plu_gins"), "U", pidgin_blist_show_with_parent, (int)pidgin_plugin_dialog_show, "", PIDGIN_STOCK_TOOLBAR_PLUGINS }, { N_("/Tools/Pr_eferences"), "P", pidgin_prefs_show, 0, "", GTK_STOCK_PREFERENCES }, { N_("/Tools/Pr_ivacy"), NULL, pidgin_privacy_dialog_show, 0, "", NULL }, { "/Tools/sep2", NULL, NULL, 0, "", NULL }, @@ -2883,7 +2888,7 @@ { N_("/Help/Online _Help"), "F1", gtk_blist_show_onlinehelp_cb, 0, "", GTK_STOCK_HELP }, { N_("/Help/_Debug Window"), NULL, toggle_debug, 0, "", NULL }, #if GTK_CHECK_VERSION(2,6,0) - { N_("/Help/_About"), NULL, pidgin_dialogs_about, 0, "", GTK_STOCK_ABOUT }, + { N_("/Help/_About"), NULL, pidgin_blist_show_with_parent, (int)pidgin_dialogs_about, "", GTK_STOCK_ABOUT }, #else { N_("/Help/_About"), NULL, pidgin_dialogs_about, 0, "", NULL }, #endif diff -r fab096e7b804 -r e4978be98984 pidgin/gtkconv.c diff -r fab096e7b804 -r e4978be98984 pidgin/gtkdialogs.c --- a/pidgin/gtkdialogs.c Thu Aug 09 02:42:49 2007 +0000 +++ b/pidgin/gtkdialogs.c Thu Aug 09 16:51:43 2007 +0000 @@ -314,7 +314,7 @@ g_object_unref(G_OBJECT(pixmap)); } -void pidgin_dialogs_about() +void pidgin_dialogs_about(GtkWindow *parent) { GtkWidget *hbox; GtkWidget *vbox; @@ -331,11 +331,15 @@ GdkPixbuf *pixbuf; if (about != NULL) { + if (parent) + gtk_window_set_transient_for(GTK_WINDOW(about), parent); gtk_window_present(GTK_WINDOW(about)); return; } PIDGIN_DIALOG(about); + if (parent) + gtk_window_set_transient_for(GTK_WINDOW(about), parent); tmp = g_strdup_printf(_("About %s"), PIDGIN_NAME); gtk_window_set_title(GTK_WINDOW(about), tmp); g_free(tmp); diff -r fab096e7b804 -r e4978be98984 pidgin/gtkdialogs.h --- a/pidgin/gtkdialogs.h Thu Aug 09 02:42:49 2007 +0000 +++ b/pidgin/gtkdialogs.h Thu Aug 09 16:51:43 2007 +0000 @@ -31,7 +31,7 @@ /* Functions in gtkdialogs.c (these should actually stay in this file) */ void pidgin_dialogs_destroy_all(void); -void pidgin_dialogs_about(void); +void pidgin_dialogs_about(GtkWindow *parent); void pidgin_dialogs_im(void); void pidgin_dialogs_im_with_user(PurpleAccount *, const char *); void pidgin_dialogs_info(void); diff -r fab096e7b804 -r e4978be98984 pidgin/gtkplugin.c --- a/pidgin/gtkplugin.c Thu Aug 09 02:42:49 2007 +0000 +++ b/pidgin/gtkplugin.c Thu Aug 09 16:51:43 2007 +0000 @@ -513,7 +513,7 @@ plugin_dialog_response_cb(dialog, PIDGIN_RESPONSE_CONFIGURE, sel); } -void pidgin_plugin_dialog_show() +void pidgin_plugin_dialog_show(GtkWindow *parent) { GtkWidget *sw; GtkWidget *event_view; @@ -523,6 +523,8 @@ GtkTreeSelection *sel; if (plugin_dialog != NULL) { + if (parent) + gtk_window_set_transient_for(GTK_WINDOW(plugin_dialog), parent); gtk_window_present(GTK_WINDOW(plugin_dialog)); return; } @@ -531,6 +533,8 @@ NULL, GTK_DIALOG_NO_SEPARATOR, NULL); + if (parent) + gtk_window_set_transient_for(GTK_WINDOW(plugin_dialog), parent); pref_button = gtk_dialog_add_button(GTK_DIALOG(plugin_dialog), _("Configure Pl_ugin"), PIDGIN_RESPONSE_CONFIGURE); gtk_dialog_add_button(GTK_DIALOG(plugin_dialog), diff -r fab096e7b804 -r e4978be98984 pidgin/gtkplugin.h --- a/pidgin/gtkplugin.h Thu Aug 09 02:42:49 2007 +0000 +++ b/pidgin/gtkplugin.h Thu Aug 09 16:51:43 2007 +0000 @@ -74,6 +74,6 @@ /** * Shows the Plugins dialog */ -void pidgin_plugin_dialog_show(void); +void pidgin_plugin_dialog_show(GtkWindow *parent); #endif /* _PIDGINPLUGIN_H_ */