[gnome-applets/wip/muktupavels/gweather-4: 3/3] gweather: port to libgweather 4




commit e62781d7ec65ef0873500b093e82a85b0e4a3e55
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Fri Feb 25 23:34:47 2022 +0200

    gweather: port to libgweather 4

 .gitlab-ci.yml                           |  2 +-
 configure.ac                             |  4 ++--
 gnome-applets/gweather/gweather-applet.c |  6 +++---
 gnome-applets/gweather/gweather-xml.c    | 12 ++++++------
 4 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d597f9267..71b49c25d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -23,7 +23,7 @@ variables:
                   libgtk-3-dev
                   libgtop2-dev
                   libgucharmap-2-90-dev
-                  libgweather-3-dev
+                  libgweather-4-dev
                   libnotify-dev
                   libpolkit-gobject-1-dev
                   libtracker-sparql-3.0-dev
diff --git a/configure.ac b/configure.ac
index 47900c603..9ec7b3163 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,7 +75,7 @@ LIBNOTIFY_REQUIRED=0.7
 UPOWER_REQUIRED=0.99.8
 ADWAITA_ICON_THEME_REQUIRED=3.14.0
 LIBXML_REQUIRED=2.5.0
-GWEATHER_REQUIRED=40.beta
+GWEATHER_REQUIRED=3.91.0
 GUCHARMAP3_REQUIRED=2.33.0
 POLKIT_REQUIRED=0.97
 dnl ***************************************************************************
@@ -171,7 +171,7 @@ dnl -- check for libxml2 (required) ------------------------------------------
 PKG_CHECK_MODULES(XML2, libxml-2.0 >= $LIBXML_REQUIRED)
 
  dnl -- check for libgweather (required) ------------------
-PKG_CHECK_MODULES(LIBGWEATHER, gweather-3.0 >= $GWEATHER_REQUIRED)
+PKG_CHECK_MODULES(LIBGWEATHER, gweather4 >= $GWEATHER_REQUIRED)
 
  dnl -- check for tracker-sparql (required for tracker-search-bar) ------------
 PKG_CHECK_MODULES([TRACKER_SEARCH_BAR], [
diff --git a/gnome-applets/gweather/gweather-applet.c b/gnome-applets/gweather/gweather-applet.c
index bfdca7248..7744bf137 100644
--- a/gnome-applets/gweather/gweather-applet.c
+++ b/gnome-applets/gweather/gweather-applet.c
@@ -56,7 +56,7 @@ get_default_location (GWeatherApplet *gw_applet)
     location = gweather_location_find_by_station_code (world, station_code);
     g_variant_unref (default_loc);
 
-    gweather_location_unref (world);
+    g_object_unref (world);
 
     return location;
 }
@@ -372,7 +372,7 @@ void gweather_applet_create (GWeatherApplet *gw_applet)
 
     location = get_default_location (gw_applet);
     gw_applet->gweather_info = gweather_info_new (location);
-    gweather_location_unref (location);
+    g_object_unref (location);
 
     gweather_info_set_application_id (gw_applet->gweather_info, "org.gnome.gnome-applets");
 
@@ -540,7 +540,7 @@ void gweather_update (GWeatherApplet *gw_applet)
 
     location = get_default_location (gw_applet);
     gweather_info_set_location (gw_applet->gweather_info, location);
-    gweather_location_unref (location);
+    g_object_unref (location);
 
     gweather_info_update (gw_applet->gweather_info);
 }
diff --git a/gnome-applets/gweather/gweather-xml.c b/gnome-applets/gweather/gweather-xml.c
index d7124c2e5..5880f3b92 100644
--- a/gnome-applets/gweather/gweather-xml.c
+++ b/gnome-applets/gweather/gweather-xml.c
@@ -88,7 +88,7 @@ gweather_xml_parse_node (GWeatherLocation *gloc,
                            -1);
 
        if (first_child != NULL) {
-           gweather_location_ref (first_child);
+           g_object_ref (first_child);
            second_child = gweather_location_next_child (gloc, first_child);
 
            if (second_child == NULL) {
@@ -107,7 +107,7 @@ gweather_xml_parse_node (GWeatherLocation *gloc,
                                    -1);
            }
 
-           g_clear_pointer (&second_child, gweather_location_unref);
+           g_clear_object (&second_child);
        }
        break;
 
@@ -122,7 +122,7 @@ gweather_xml_parse_node (GWeatherLocation *gloc,
                if (gweather_location_get_level (parent_loc) == GWEATHER_LOCATION_CITY)
                        name = gweather_location_get_name (parent_loc);
 
-               gweather_location_unref (parent_loc);
+               g_object_unref (parent_loc);
        }
 
        code = gweather_location_get_code (gloc);
@@ -150,12 +150,12 @@ gweather_xml_parse_node (GWeatherLocation *gloc,
        break;
     }
 
-    g_clear_pointer (&first_child, gweather_location_unref);
+    g_clear_object (&first_child);
 
     child = NULL;
     while ((child = gweather_location_next_child (gloc, child)) != NULL) {
        if (!gweather_xml_parse_node (child, store, self)) {
-           gweather_location_unref (child);
+           g_object_unref (child);
            return FALSE;
        }
     }
@@ -180,7 +180,7 @@ gweather_xml_load_locations (void)
        store = NULL;
     }
 
-    gweather_location_unref (world);
+    g_object_unref (world);
 
     return (GtkTreeModel *)store;
 }


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