[gnome-weather/wip/ewlsh/gtk4] Remove unnecessary frame, old signals.



commit d2a29cb79bdda33660bf8580fddd82c5df421bf9
Author: Evan Welsh <contact evanwelsh com>
Date:   Tue Jan 5 15:56:27 2021 -0800

    Remove unnecessary frame, old signals.

 data/day-entry.ui      |  4 ++--
 data/places-popover.ui |  6 +++---
 data/weather-widget.ui | 15 +++++++++------
 src/app/city.js        |  4 +++-
 src/app/window.js      |  3 ---
 5 files changed, 17 insertions(+), 15 deletions(-)
---
diff --git a/data/day-entry.ui b/data/day-entry.ui
index 393c488..d5c0c6f 100644
--- a/data/day-entry.ui
+++ b/data/day-entry.ui
@@ -89,7 +89,7 @@
         </child>
         <child>
           <object class="GtkGrid">
-            <property name="vexpand">1</property>
+            <property name="vexpand">True</property>
             <property name="row_spacing">8</property>
             <property name="row_homogeneous">1</property>
             <property name="column_homogeneous">1</property>
@@ -273,7 +273,7 @@
         <child>
           <object class="GtkImage" id="image">
             <property name="valign">start</property>
-            <property name="vexpand">1</property>
+            <property name="vexpand">True</property>
             <property name="pixel_size">32</property>
             <property name="icon_name">weather-showers-symbolic</property>
           </object>
diff --git a/data/places-popover.ui b/data/places-popover.ui
index 35eb3d1..4ce9bf7 100644
--- a/data/places-popover.ui
+++ b/data/places-popover.ui
@@ -164,13 +164,13 @@
             <child>
               <object class="GtkFrame" id="locations-frame">
                 <property name="name">locations-frame</property>
-                <property name="child">
+                <child>
                   <object class="GtkListBox" id="locations-list-box">
                     <property name="name">locations-list-box</property>
-                    <property name="hexpand">1</property>
+                    <property name="hexpand">True</property>
                     <property name="selection-mode">none</property>
                   </object>
-                </property>
+                </child>
                 <layout>
                   <property name="column">0</property>
                   <property name="row">1</property>
diff --git a/data/weather-widget.ui b/data/weather-widget.ui
index 88d3db5..531f265 100644
--- a/data/weather-widget.ui
+++ b/data/weather-widget.ui
@@ -1,13 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <requires lib="gtk" version="4.0"/>
-  <template class="Gjs_WeatherWidget" parent="GtkFrame">
-    <property name="child">
+  <template class="Gjs_WeatherWidget" parent="GtkWidget">
+    <property name="layout_manager">
+      <object class="GtkBinLayout"/>
+    </property>
+    <child>
       <object class="GtkFrame" id="contentFrame">
         <property name="name">weather-page-content-view</property>
-        <property name="child">
+        <child>
           <object class="GtkGrid" id="outerGrid">
-            <property name="vexpand">1</property>
+            <property name="vexpand">True</property>
             <child>
               <object class="GtkOverlay" id="forecast-overlay">
                 <property name="margin_bottom">24</property>
@@ -197,8 +200,8 @@
               </object>
             </child>
           </object>
-        </property>
+        </child>
       </object>
-    </property>
+    </child>
   </template>
 </interface>
diff --git a/src/app/city.js b/src/app/city.js
index 676ec39..8380bc1 100644
--- a/src/app/city.js
+++ b/src/app/city.js
@@ -43,7 +43,7 @@ var WeatherWidget = GObject.registerClass({
                        'forecast-hourly', 'forecast-hourly-viewport',
                        'forecast-daily', 'forecast-daily-viewport',
                        'updatedTimeLabel', 'attributionLabel'],
-}, class WeatherWidget extends Gtk.Frame {
+}, class WeatherWidget extends Gtk.Widget {
 
     _init(application, window, params) {
         super._init(Object.assign({
@@ -117,6 +117,7 @@ var WeatherWidget = GObject.registerClass({
     }
 
     _cleanup() {
+        this._contentFrame.unparent();
         this._worldView._cleanup();
     }
 
@@ -293,6 +294,7 @@ var WeatherView = GObject.registerClass({
         this.connect('destroy', () => this._onDestroy());
 
         this._desktopSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.interface' });
+        
     }
 
     _cleanup() {
diff --git a/src/app/window.js b/src/app/window.js
index 967fc94..68b127a 100644
--- a/src/app/window.js
+++ b/src/app/window.js
@@ -252,9 +252,6 @@ var MainWindow = GObject.registerClass(
         copyrightLabel.show();
 
         aboutDialog.show();
-        aboutDialog.connect('response', function() {
-            aboutDialog.destroy();
-        });
     }
 
     _close() {


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