empathy r2779 - trunk/libempathy-gtk



Author: xclaesse
Date: Fri Apr 10 16:53:49 2009
New Revision: 2779
URL: http://svn.gnome.org/viewvc/empathy?rev=2779&view=rev

Log:
Make custom messages dialog a transient of the window containing the presence selector (if possible)

From: Davyd Madeley <davyd madeley id au>

Modified:
   trunk/libempathy-gtk/empathy-presence-chooser.c

Modified: trunk/libempathy-gtk/empathy-presence-chooser.c
==============================================================================
--- trunk/libempathy-gtk/empathy-presence-chooser.c	(original)
+++ trunk/libempathy-gtk/empathy-presence-chooser.c	Fri Apr 10 16:53:49 2009
@@ -107,7 +107,7 @@
 								const gchar                *status);
 static void            presence_chooser_custom_activate_cb     (GtkWidget                  *item,
 								gpointer                    user_data);
-static void            presence_chooser_dialog_show            (void);
+static void            presence_chooser_dialog_show            (GtkWindow                  *parent);
 
 G_DEFINE_TYPE (EmpathyPresenceChooser, empathy_presence_chooser, GTK_TYPE_COMBO_BOX_ENTRY);
 
@@ -734,7 +734,7 @@
 presence_chooser_custom_activate_cb (GtkWidget *item,
 				     gpointer   user_data)
 {
-	presence_chooser_dialog_show ();
+	presence_chooser_dialog_show (NULL);
 }
 
 static McPresence
@@ -899,7 +899,7 @@
 }
 
 static void
-presence_chooser_dialog_show (void)
+presence_chooser_dialog_show (GtkWindow *parent)
 {
 	GladeXML *glade;
 	gchar    *filename;
@@ -945,7 +945,12 @@
 
 	gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (message_dialog->comboboxentry_message), 0);
 
-	/* FIXME: Set transian for a window ? */
+	if (parent)
+	{
+		gtk_window_set_transient_for (
+				GTK_WINDOW (message_dialog->dialog),
+				parent);
+	}
 
 	gtk_widget_show_all (message_dialog->dialog);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]