[gnome-initial-setup/wjt/gweather-4: 2/2] timezone: Reintroduce GisLocationEntry
- From: Will Thompson <wjt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup/wjt/gweather-4: 2/2] timezone: Reintroduce GisLocationEntry
- Date: Tue, 4 Jan 2022 15:30:56 +0000 (UTC)
commit cd90b2deb5b2ee9b498f936d3bacff40a40ef329
Author: Will Thompson <will willthompson co uk>
Date: Tue Jan 4 13:28:03 2022 +0000
timezone: Reintroduce GisLocationEntry
https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/issues/132
gnome-initial-setup/pages/timezone/gis-timezone-page.c | 9 +++------
gnome-initial-setup/pages/timezone/gis-timezone-page.ui | 2 +-
2 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/gnome-initial-setup/pages/timezone/gis-timezone-page.c
b/gnome-initial-setup/pages/timezone/gis-timezone-page.c
index e0a6d3df..c4a5b5de 100644
--- a/gnome-initial-setup/pages/timezone/gis-timezone-page.c
+++ b/gnome-initial-setup/pages/timezone/gis-timezone-page.c
@@ -49,6 +49,7 @@
#include "gis-bubble-widget.h"
#include "gis-page-header.h"
+#include "gis-location-entry.h"
#define DEFAULT_TZ "Europe/London"
#define DESKTOP_ID "gnome-datetime-panel"
@@ -228,15 +229,14 @@ entry_text_changed (GtkEditable *editable,
priv->search_entry_text_changed_id = 0;
}
-#if 0
static void
entry_location_changed (GObject *object, GParamSpec *param, GisTimezonePage *page)
{
GisTimezonePagePrivate *priv = gis_timezone_page_get_instance_private (page);
- GWeatherLocationEntry *entry = GWEATHER_LOCATION_ENTRY (object);
+ GisLocationEntry *entry = GIS_LOCATION_ENTRY (object);
g_autoptr(GWeatherLocation) location = NULL;
- location = gweather_location_entry_get_location (entry);
+ location = gis_location_entry_get_location (entry);
if (!location)
return;
@@ -244,7 +244,6 @@ entry_location_changed (GObject *object, GParamSpec *param, GisTimezonePage *pag
set_location (page, location);
priv->in_search = FALSE;
}
-#endif
#define GETTEXT_PACKAGE_TIMEZONES "gnome-control-center-2.0-timezones"
@@ -446,10 +445,8 @@ gis_timezone_page_constructed (GObject *object)
priv->search_entry_text_changed_id =
g_signal_connect (priv->search_entry, "changed",
G_CALLBACK (entry_text_changed), page);
-#if 0
g_signal_connect (priv->search_entry, "notify::location",
G_CALLBACK (entry_location_changed), page);
-#endif
g_signal_connect (priv->search_entry, "map",
G_CALLBACK (entry_mapped), page);
g_signal_connect (priv->map, "location-changed",
diff --git a/gnome-initial-setup/pages/timezone/gis-timezone-page.ui
b/gnome-initial-setup/pages/timezone/gis-timezone-page.ui
index 1f81d3ed..588ec412 100644
--- a/gnome-initial-setup/pages/timezone/gis-timezone-page.ui
+++ b/gnome-initial-setup/pages/timezone/gis-timezone-page.ui
@@ -28,7 +28,7 @@
<property name="orientation">vertical</property>
<property name="spacing">14</property>
<child>
- <object class="GtkEntry" id="search_entry">
+ <object class="GisLocationEntry" id="search_entry">
<property name="visible">True</property>
<property name="halign">center</property>
<property name="max-width-chars">55</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]