[gnome-weather/wip/cdavis/revert-222e5469] Revert "dailyForecast: Adjust popovers"




commit 13c2c6774b26ff6a5e0cde125371bc3c897570d8
Author: Christopher Davis <brainblasted disroot org>
Date:   Thu Nov 26 13:22:56 2020 -0800

    Revert "dailyForecast: Adjust popovers"
    
    This reverts commit 222e5469c1e2d3e5c4f53f211a5747f11833694c.

 data/application.css                               |  4 --
 data/day-entry.ui                                  |  7 +--
 .../scalable/status/temperature-symbolic.svg       | 56 ----------------------
 org.gnome.Weather.json                             |  3 +-
 src/app/dailyForecast.js                           | 19 ++------
 5 files changed, 7 insertions(+), 82 deletions(-)
---
diff --git a/data/application.css b/data/application.css
index 17501ce..2f44eee 100644
--- a/data/application.css
+++ b/data/application.css
@@ -105,10 +105,6 @@ button.osd.circular > image {
   padding: 12px;
 }
 
-.day-popover {
-  background-color: @theme_base_color;
-}
-
 .small-label {
   font-size: 9pt;
 }
diff --git a/data/day-entry.ui b/data/day-entry.ui
index b3b7e62..6029352 100644
--- a/data/day-entry.ui
+++ b/data/day-entry.ui
@@ -4,9 +4,6 @@
   <requires lib="gtk+" version="3.20"/>
   <object class="GtkPopoverMenu" id="more_menu">
     <property name="can_focus">False</property>
-    <style>
-      <class name="day-popover"/>
-    </style>
     <child>
       <object class="GtkGrid">
         <property name="visible">True</property>
@@ -166,7 +163,7 @@
               <object class="GtkImage">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="icon_name">temperature-symbolic</property>
+                <property name="icon_name">weather-windy</property>
               </object>
               <packing>
                 <property name="left_attach">0</property>
@@ -177,7 +174,7 @@
               <object class="GtkImage">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="icon_name">weather-showers-scattered-symbolic</property>
+                <property name="icon_name">weather-windy</property>
               </object>
               <packing>
                 <property name="left_attach">1</property>
diff --git a/org.gnome.Weather.json b/org.gnome.Weather.json
index 632fad9..a1899fc 100644
--- a/org.gnome.Weather.json
+++ b/org.gnome.Weather.json
@@ -53,8 +53,7 @@
             "sources" : [
                 {
                     "type" : "git",
-                    "url" : "https://gitlab.gnome.org/GNOME/libgweather.git";,
-                    "branch" : "wip/cdavis/windspeed-string"
+                    "url" : "https://gitlab.gnome.org/GNOME/libgweather.git";
                 }
             ]
         },
diff --git a/src/app/dailyForecast.js b/src/app/dailyForecast.js
index 3fd67a9..6b8cbd4 100644
--- a/src/app/dailyForecast.js
+++ b/src/app/dailyForecast.js
@@ -20,7 +20,6 @@ const Gio = imports.gi.Gio;
 const GLib = imports.gi.GLib;
 const GObject = imports.gi.GObject;
 const Gtk = imports.gi.Gtk;
-const GWeather = imports.gi.GWeather;
 
 const Util = imports.misc.util;
 
@@ -189,22 +188,22 @@ var DailyForecastFrame = GObject.registerClass(class DailyForecastFrame extends
         dayEntry.nightTemperatureLabel.label = Util.getTempString(nightInfo);
         dayEntry.nightImage.iconName = nightInfo.get_icon_name() + '-small';
         dayEntry.nightHumidity.label = nightInfo.get_humidity();
-        this._setWindInfo(nightInfo, dayEntry.nightWind);
+        dayEntry.nightWind.label = nightInfo.get_wind();
 
         dayEntry.morningTemperatureLabel.label = Util.getTempString(morningInfo);
         dayEntry.morningImage.iconName = morningInfo.get_icon_name() + '-small';
         dayEntry.morningHumidity.label = morningInfo.get_humidity();
-        this._setWindInfo(morningInfo, dayEntry.morningWind);
+        dayEntry.morningWind.label = morningInfo.get_wind();
 
         dayEntry.afternoonTemperatureLabel.label = Util.getTempString(afternoonInfo);
         dayEntry.afternoonImage.iconName = afternoonInfo.get_icon_name() + '-small';
         dayEntry.afternoonHumidity.label = afternoonInfo.get_humidity();
-        this._setWindInfo(afternoonInfo, dayEntry.afternoonWind);
+        dayEntry.afternoonWind.label = afternoonInfo.get_wind();
 
         dayEntry.eveningTemperatureLabel.label = Util.getTempString(eveningInfo);
         dayEntry.eveningImage.iconName = eveningInfo.get_icon_name() + '-small';
         dayEntry.eveningHumidity.label = eveningInfo.get_humidity();
-        this._setWindInfo(eveningInfo, dayEntry.eveningWind);
+        dayEntry.eveningWind.label = eveningInfo.get_wind();
 
         this._box.pack_start(dayEntry, false, false, 0);
     }
@@ -215,16 +214,6 @@ var DailyForecastFrame = GObject.registerClass(class DailyForecastFrame extends
         this._box.pack_start(separator, false, false, 0);
     }
 
-    _setWindInfo(info, label) {
-        let [ok, speed, direction] = info.get_value_wind(GWeather.SpeedUnit.DEFAULT);
-        if (ok) {
-            label.label = speed.toFixed(1).toString() + ' ' +  
GWeather.speed_unit_to_string(GWeather.SpeedUnit.DEFAULT);
-        } else {
-            /* Fall back to get_wind() */
-            label.label = info.get_wind();
-        }
-    }
-
     clear() {
         this._box.foreach(function(w) { w.destroy(); });
     }


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