changeset 19818:e4978be98984

propagate from branch 'im.pidgin.pidgin' (head 1aba81cae8b963708281123ed6c438ba5861113d) to branch 'org.maemo.garage.pidgin.pidgin.dialog-transience' (head 3974afed72d35d8c541ef57908fa15be5b2d8501)
author Gabriel Schulhof <nix@go-nix.ca>
date Thu, 09 Aug 2007 16:51:43 +0000
parents fab096e7b804 (current diff) d082ddab1ccc (diff)
children 71548588654d
files pidgin/gtkconv.c
diffstat 5 files changed, 19 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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, "<Branch>", NULL },
 	{ N_("/Tools/Buddy _Pounces"), NULL, pidgin_pounces_manager_show, 0, "<Item>", NULL },
-	{ N_("/Tools/Plu_gins"), "<CTL>U", pidgin_plugin_dialog_show, 0, "<StockItem>", PIDGIN_STOCK_TOOLBAR_PLUGINS },
+	{ N_("/Tools/Plu_gins"), "<CTL>U", pidgin_blist_show_with_parent, (int)pidgin_plugin_dialog_show, "<StockItem>", PIDGIN_STOCK_TOOLBAR_PLUGINS },
 	{ N_("/Tools/Pr_eferences"), "<CTL>P", pidgin_prefs_show, 0, "<StockItem>", GTK_STOCK_PREFERENCES },
 	{ N_("/Tools/Pr_ivacy"), NULL, pidgin_privacy_dialog_show, 0, "<Item>", NULL },
 	{ "/Tools/sep2", NULL, NULL, 0, "<Separator>", NULL },
@@ -2883,7 +2888,7 @@
 	{ N_("/Help/Online _Help"), "F1", gtk_blist_show_onlinehelp_cb, 0, "<StockItem>", GTK_STOCK_HELP },
 	{ N_("/Help/_Debug Window"), NULL, toggle_debug, 0, "<Item>", NULL },
 #if GTK_CHECK_VERSION(2,6,0)	
-	{ N_("/Help/_About"), NULL, pidgin_dialogs_about, 0,  "<StockItem>", GTK_STOCK_ABOUT },
+	{ N_("/Help/_About"), NULL, pidgin_blist_show_with_parent, (int)pidgin_dialogs_about, "<StockItem>", GTK_STOCK_ABOUT },
 #else
 	{ N_("/Help/_About"), NULL, pidgin_dialogs_about, 0,  "<Item>", NULL },
 #endif
--- 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);
--- 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);
--- 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),
--- 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_ */