diff options
author | Marcus Lundblad <ml@dfupdate.se> | 2022-03-08 23:09:43 +0100 |
---|---|---|
committer | Marcus Lundblad <ml@dfupdate.se> | 2022-04-03 22:12:14 +0200 |
commit | d7bbc657a4220b9bcfe6f069ea91121e00bf93c7 (patch) | |
tree | fc6711ec4affb6e0765366bbdd0b1cb1001fe5cf | |
parent | 74d2c5f760d8f529b539c9a3e1fc63c828968518 (diff) | |
download | gnome-maps-d7bbc657a4220b9bcfe6f069ea91121e00bf93c7.tar.gz |
mainWindow: Remove no network view
Remove the "no network" view and checking
the state of the network monitor.
-rw-r--r-- | data/ui/main-window.ui | 63 | ||||
-rw-r--r-- | src/mainWindow.js | 12 |
2 files changed, 1 insertions, 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 @@ -70,69 +70,6 @@ <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> </object> 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 |