changeset 19928:8cef5a905bc5

Stringing pounce windows
author Gabriel Schulhof <nix@go-nix.ca>
date Fri, 17 Aug 2007 23:21:02 +0000
parents 6264022caba0
children b9a6c3f54903
files pidgin/gtkblist.c pidgin/gtkconv.c pidgin/gtkpounce.c
diffstat 3 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkblist.c	Fri Aug 17 22:58:54 2007 +0000
+++ b/pidgin/gtkblist.c	Fri Aug 17 23:21:02 2007 +0000
@@ -475,7 +475,7 @@
 
 static void gtk_blist_menu_bp_cb(GtkWidget *w, PurpleBuddy *b)
 {
-	pidgin_pounce_editor_show(b->account, b->name, NULL);
+	pidgin_pounce_editor_show(GTK_WINDOW(gtkblist->window), b->account, b->name, NULL);
 }
 
 static void gtk_blist_menu_showlog_cb(GtkWidget *w, PurpleBlistNode *node)
--- a/pidgin/gtkconv.c	Fri Aug 17 22:58:54 2007 +0000
+++ b/pidgin/gtkconv.c	Fri Aug 17 23:21:02 2007 +0000
@@ -1210,7 +1210,7 @@
 
 	conv = pidgin_conv_window_get_active_gtkconv(win)->active_conv;
 
-	pidgin_pounce_editor_show(purple_conversation_get_account(conv),
+	pidgin_pounce_editor_show(GTK_WINDOW(win->window), purple_conversation_get_account(conv),
 								purple_conversation_get_name(conv), NULL);
 }
 
--- a/pidgin/gtkpounce.c	Fri Aug 17 22:58:54 2007 +0000
+++ b/pidgin/gtkpounce.c	Fri Aug 17 23:21:02 2007 +0000
@@ -461,7 +461,7 @@
 }
 
 void
-pidgin_pounce_editor_show(PurpleAccount *account, const char *name,
+pidgin_pounce_editor_show(GtkWindow *parent, PurpleAccount *account, const char *name,
 							PurplePounce *cur_pounce)
 {
 	PidginPounceDialog *dialog;
@@ -516,6 +516,7 @@
 	dialog->window = window = pidgin_create_window((cur_pounce == NULL ? _("New Buddy Pounce") : _("Edit Buddy Pounce")),
 		PIDGIN_HIG_BORDER, "buddy_pounce", FALSE) ;
 	gtk_window_set_type_hint(GTK_WINDOW(window), GDK_WINDOW_TYPE_HINT_DIALOG);
+	gtk_window_set_transient_for(GTK_WINDOW(window), parent);
 
 	g_signal_connect(G_OBJECT(window), "delete_event",
 					 G_CALLBACK(delete_win_cb), dialog);
@@ -1057,7 +1058,7 @@
 static void
 pounces_manager_add_cb(GtkButton *button, gpointer user_data)
 {
-	pidgin_pounce_editor_show(NULL, NULL, NULL);
+	pidgin_pounce_editor_show(GTK_WINDOW(pounces_manager->window), NULL, NULL, NULL);
 }
 
 static void
@@ -1067,7 +1068,7 @@
 	PurplePounce *pounce;
 
 	gtk_tree_model_get(model, iter, POUNCES_MANAGER_COLUMN_POUNCE, &pounce, -1);
-	pidgin_pounce_editor_show(NULL, NULL, pounce);
+	pidgin_pounce_editor_show(GTK_WINDOW(pounces_manager->window), NULL, NULL, pounce);
 }
 
 static void
@@ -1167,7 +1168,7 @@
 	if ((pounce != NULL) && (event->button == 1) &&
 		(event->type == GDK_2BUTTON_PRESS))
 	{
-		pidgin_pounce_editor_show(NULL, NULL, pounce);
+		pidgin_pounce_editor_show(GTK_WINDOW(pounces_manager->window), NULL, NULL, pounce);
 		return TRUE;
 	}