[totem/wip/hadess/bvw-template: 4/6] main: Move bvw_grid to GtkBuilder




commit 75bf9710e9a5d0ef25111bd9e4fccec044fc44fa
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Feb 9 14:02:38 2022 +0100

    main: Move bvw_grid to GtkBuilder

 data/totem.ui      | 7 +++++++
 src/totem-object.c | 6 +-----
 2 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/data/totem.ui b/data/totem.ui
index 891ecb659..415fff3d7 100644
--- a/data/totem.ui
+++ b/data/totem.ui
@@ -189,6 +189,13 @@
         <child>
           <object class="BaconVideoWidget" id="bvw">
             <property name="visible">True</property>
+            <child type="overlay">
+              <object class="GtkGrid" id="bvw_grid">
+                <property name="visible">True</property>
+                <property name="halign">fill</property>
+                <property name="valign">fill</property>
+              </object>
+            </child>
           </object>
           <packing>
             <property name="name">player</property>
diff --git a/src/totem-object.c b/src/totem-object.c
index fa505e5cb..f780db92a 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -4288,11 +4288,7 @@ video_widget_create (TotemObject *totem)
                          G_CALLBACK (on_bvw_motion_notify_cb),
                          totem);
 
-       totem->bvw_grid = gtk_grid_new ();
-       gtk_overlay_add_overlay (GTK_OVERLAY (totem->bvw), totem->bvw_grid);
-       gtk_widget_set_halign (totem->bvw_grid, GTK_ALIGN_FILL);
-       gtk_widget_set_valign (totem->bvw_grid, GTK_ALIGN_FILL);
-       gtk_widget_show (totem->bvw_grid);
+       totem->bvw_grid = GTK_WIDGET (gtk_builder_get_object (totem->xml, "bvw_grid"));
        add_fullscreen_toolbar (totem, totem->bvw_grid);
 
        /* Events for the widget video window as well */


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