[totem] Set preferences window modal and transient to main window.



commit 61884985537d43d1aec2a70cf7c957653fdcdde1
Author: Baptiste Mille-Mathias <baptiste millemathias gmail com>
Date:   Sat Feb 8 17:29:15 2014 +0100

    Set preferences window modal and transient to main window.
    
    Changed also the hint of the preference window to dialog else modal/transient
    properties don't work.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=723828

 data/preferences.ui |    2 +-
 src/totem.c         |    4 ++++
 2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/data/preferences.ui b/data/preferences.ui
index f520fc9..6f9e4cf 100644
--- a/data/preferences.ui
+++ b/data/preferences.ui
@@ -111,7 +111,7 @@
   <property name="decorated">True</property>
   <property name="skip_taskbar_hint">False</property>
   <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="type_hint">dialog</property>
   <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
   <property name="focus_on_map">True</property>
   <property name="urgency_hint">False</property>
diff --git a/src/totem.c b/src/totem.c
index 9e89ace..1720596 100644
--- a/src/totem.c
+++ b/src/totem.c
@@ -157,6 +157,10 @@ app_init (Totem *totem, char **argv)
 
        /* The prefs after the video widget is connected */
        totem->prefs_xml = totem_interface_load ("preferences.ui", TRUE, NULL, totem);
+       totem->prefs = GTK_WIDGET (gtk_builder_get_object (totem->prefs_xml, "totem_preferences_window"));
+
+       gtk_window_set_modal (GTK_WINDOW (totem->prefs), TRUE);
+       gtk_window_set_transient_for (GTK_WINDOW (totem->prefs), GTK_WINDOW(totem->win));
 
        totem_setup_preferences (totem);
 


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