[gnome-maps/wip/mlundblad/drop-network-monitor: 2/9] mainWindow: Remove no network view




commit 0777e6e6fd0343dcc9d09fd51dc13122a9e28cce
Author: Marcus Lundblad <ml dfupdate se>
Date:   Tue Mar 8 23:09:43 2022 +0100

    mainWindow: Remove no network view
    
    Remove the "no network" view and checking
    the state of the network monitor.

 data/ui/main-window.ui | 63 --------------------------------------------------
 src/mainWindow.js      | 12 +---------
 2 files changed, 1 insertion(+), 74 deletions(-)
---
diff --git a/data/ui/main-window.ui b/data/ui/main-window.ui
index c87b6321..a80a2985 100644
--- a/data/ui/main-window.ui
+++ b/data/ui/main-window.ui
@@ -69,69 +69,6 @@
       <object class="GtkGrid" id="grid">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <child>
-          <object class="GtkStack" id="mainStack">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <property name="transition-type">crossfade</property>
-            <child>
-              <object class="GtkGrid" id="mainGrid">
-                <property name="visible">True</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkSpinner" id="network-spinner">
-                <property name="visible">True</property>
-                <property name="active">True</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkGrid" id="noNetworkView">
-                <property name="visible">True</property>
-                <property name="orientation">vertical</property>
-                <property name="can_focus">False</property>
-                <property name="halign">center</property>
-                <property name="valign">center</property>
-                <property name="row_spacing">6</property>
-                <property name="margin">18</property>
-                <child>
-                  <object class="GtkImage" id="no-network-conn-image">
-                    <property name="visible">True</property>
-                    <property name="pixel-size">100</property>
-                    <property name="icon-name">network-offline-symbolic</property>
-                  </object>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="no-network-conn-header">
-                    <attributes>
-                      <attribute name="weight" value="bold" />
-                      <attribute name="scale" value="2" />
-                    </attributes>
-                    <property name="label" translatable="yes">Maps is offline!</property>
-                    <property name="justify">center</property>
-                    <property name="wrap">True</property>
-                  </object>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="no-network-conn-text-1">
-                    <property name="wrap">True</property>
-                    <property name="max-width-chars">45</property>
-                    <property name="label" translatable="yes">Maps need an active internet connection to 
function properly, but one can’t be found.</property>
-                    <property name="justify">center</property>
-                  </object>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="no-network-conn-text-2">
-                    <property name="wrap">True</property>
-                    <property name="max-width-chars">45</property>
-                    <property name="label" translatable="yes">Check your connection and proxy 
settings.</property>
-                    <property name="justify">center</property>
-                  </object>
-                </child>
-              </object>
-            </child>
-          </object>
-        </child>
         <child>
           <object class="GtkBox" id="placeBarContainer">
             <property name="visible">True</property>
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 37ee8e8f..2ef3626b 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -81,9 +81,6 @@ var MainWindow = GObject.registerClass({
     Template: 'resource:///org/gnome/Maps/ui/main-window.ui',
     InternalChildren: [ 'headerBar',
                         'grid',
-                        'mainStack',
-                        'mainGrid',
-                        'noNetworkView',
                         'actionBar',
                         'actionBarRevealer',
                         'placeBarContainer']
@@ -107,7 +104,7 @@ var MainWindow = GObject.registerClass({
                 MapView.MapType.LOCAL : undefined,
             mainWindow: this });
 
-        this._mainGrid.attach(this._mapView, 0, 0, 1, 1);
+        this._grid.attach(this._mapView, 0, 0, 1, 1);
 
         this._mapView.gotoUserLocation(false);
 
@@ -282,13 +279,6 @@ var MainWindow = GObject.registerClass({
             Mainloop.idle_add(() => this._mapView.grab_focus());
         });
 
-        this.application.connect('notify::connected', () => {
-            if (this.application.connected || this.application.local_tile_path)
-                this._mainStack.visible_child = this._mainGrid;
-            else
-                this._mainStack.visible_child = this._noNetworkView;
-        });
-
         /*
          * If the currently focused widget is an entry then we will
          * hijack the key-press to the main window and make sure that


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