[gnome-maps/wip/notifications: 1/4] MainWindow: remove unnecessary GtkGrid



commit 2032aa39b420ede0d7590b118d1c5b9c5524148d
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  |   12 ++++--------
 2 files changed, 5 insertions(+), 10 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 97f6261..6788a6d 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -62,15 +62,13 @@ const MainWindow = new Lang.Class({
                                                     'window-content',
                                                     'search-entry',
                                                     'search-completion']);
-        let grid = ui.windowContent;
         this._searchEntry = ui.searchEntry;
         this._searchCompletion = ui.searchCompletion;
         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,11 +80,9 @@ const MainWindow = new Lang.Class({
         this._initSignals();
         this._restoreWindowGeometry();
 
-        this._mapOverlay.add_overlay(this._searchPopup);
+        ui.windowContent.add_overlay(this._searchPopup);
 
-        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]