changeset 21645:d0ea3a86add5

The smiley dialog is transient for the toolbar's parent window, and the about dialog is transient for the buddylist, when available.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Mon, 26 Nov 2007 08:12:40 +0000
parents 6018f0ba6aca
children 2a2496044eef 3aa34d20d798
files pidgin/gtkdialogs.c pidgin/gtkimhtmltoolbar.c
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkdialogs.c	Mon Nov 26 07:35:16 2007 +0000
+++ b/pidgin/gtkdialogs.c	Mon Nov 26 08:12:40 2007 +0000
@@ -349,6 +349,7 @@
 	AtkObject *obj;
 	char* filename, *tmp;
 	GdkPixbuf *pixbuf;
+	PidginBuddyList *buddylist;
 
 	if (about != NULL) {
 		gtk_window_present(GTK_WINDOW(about));
@@ -724,6 +725,11 @@
 	gtk_widget_grab_default(button);
 
 	/* Let's give'em something to talk about -- woah woah woah */
+	buddylist = pidgin_blist_get_default_gtk_blist();
+	if (buddylist)
+		gtk_window_set_transient_for(GTK_WINDOW(about),
+				GTK_WINDOW(buddylist->window));
+
 	gtk_widget_show_all(about);
 	gtk_window_present(GTK_WINDOW(about));
 }
--- a/pidgin/gtkimhtmltoolbar.c	Mon Nov 26 07:35:16 2007 +0000
+++ b/pidgin/gtkimhtmltoolbar.c	Mon Nov 26 08:12:40 2007 +0000
@@ -777,6 +777,8 @@
 	/* show everything */
 	gtk_window_set_title(GTK_WINDOW(dialog), _("Smile!"));
 	gtk_widget_show_all(dialog);
+	gtk_window_set_transient_for(GTK_WINDOW(dialog),
+			GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(toolbar))));
 #ifdef _WIN32
 	winpidgin_ensure_onscreen(dialog);
 #endif