[gnome-maps/wip/notifications2: 9/14] MainWindow: remove unnecessary GtkGrid



commit 82c9106e19e79eb0ab1a1361fb3691b8e13698f5
Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
Date:   Wed Feb 5 16:04:54 2014 +0100

    MainWindow: remove unnecessary GtkGrid
    
    Make the window-content object be a GtkOverlay instead of a GtkGrid and
    hence push the creation of the overlay to the UI-file.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=723996

 src/main-window.ui |    3 +--
 src/mainWindow.js  |    9 +++------
 2 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/src/main-window.ui b/src/main-window.ui
index ac50e0c..5d6afc4 100644
--- a/src/main-window.ui
+++ b/src/main-window.ui
@@ -101,9 +101,8 @@
       </object>
     </child>
     <child>
-      <object class="GtkGrid" id="window-content">
+      <object class="GtkOverlay" id="window-content">
         <property name="visible">True</property>
-        <property name="orientation">vertical</property>
         <child>
         </child>
       </object>
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 00fd633..12a8ad7 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -68,9 +68,8 @@ const MainWindow = new Lang.Class({
         this.window = ui.appWindow;
         this.window.application = app;
 
-        this._mapOverlay = new Gtk.Overlay({ visible: true });
-        this.mapView = new MapView.MapView(this._mapOverlay);
-        this._mapOverlay.add(this.mapView);
+        this.mapView = new MapView.MapView(ui.windowContent);
+        ui.windowContent.add(this.mapView);
 
         this.mapView.gotoUserLocation(false);
 
@@ -82,9 +81,7 @@ const MainWindow = new Lang.Class({
         this._initSignals();
         this._restoreWindowGeometry();
 
-        grid.add(this._mapOverlay);
-
-        grid.show_all();
+        ui.windowContent.show_all();
     },
 
     _initPlaces: function() {


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