[totem] main: Move overlay creation to GtkBuilder



commit 22ff1a7584c19efb5944c538bb3c7518694f1285
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Oct 14 17:01:14 2014 +0200

    main: Move overlay creation to GtkBuilder

 data/totem.ui      |    6 ++++++
 src/totem-object.c |   11 +----------
 2 files changed, 7 insertions(+), 10 deletions(-)
---
diff --git a/data/totem.ui b/data/totem.ui
index bc1b558..d5a56ce 100644
--- a/data/totem.ui
+++ b/data/totem.ui
@@ -192,6 +192,12 @@
                       <object class="GtkOverlay" id="tmw_bvw_box">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
+                        <child type="overlay">
+                          <object class="GtkRevealer" id="toolbar-revealer">
+                            <property name="halign">fill</property>
+                            <property name="valign">start</property>
+                          </object>
+                        </child>
                       </object>
                       <packing>
                         <property name="expand">True</property>
diff --git a/src/totem-object.c b/src/totem-object.c
index 52b13d3..5a582bf 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -3804,17 +3804,10 @@ grilo_widget_setup (TotemObject *totem)
 static void
 add_fullscreen_toolbar (TotemObject *totem)
 {
-       GtkWidget *overlay;
        GtkWidget *item;
        GMenuModel *menu;
 
-       overlay = GTK_WIDGET (gtk_builder_get_object (totem->xml, "tmw_bvw_box"));
-       totem->revealer = gtk_revealer_new ();
-       g_object_set (G_OBJECT (totem->revealer),
-                     "halign", GTK_ALIGN_FILL,
-                     "valign", GTK_ALIGN_START,
-                     NULL);
-
+       totem->revealer = GTK_WIDGET (gtk_builder_get_object (totem->xml, "toolbar-revealer"));
        totem->fullscreen_header = g_object_new (TOTEM_TYPE_MAIN_TOOLBAR,
                                                 "show-search-button", FALSE,
                                                 "show-select-button", FALSE,
@@ -3850,8 +3843,6 @@ add_fullscreen_toolbar (TotemObject *totem)
 
        gtk_container_add (GTK_CONTAINER (totem->revealer), totem->fullscreen_header);
        gtk_widget_show_all (totem->revealer);
-
-       gtk_overlay_add_overlay (GTK_OVERLAY (overlay), totem->revealer);
 }
 
 void


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