summaryrefslogtreecommitdiff
path: root/nonprism/gnome-settings-daemon
diff options
context:
space:
mode:
Diffstat (limited to 'nonprism/gnome-settings-daemon')
-rw-r--r--nonprism/gnome-settings-daemon/PKGBUILD15
-rw-r--r--nonprism/gnome-settings-daemon/nonprism.patch166
2 files changed, 134 insertions, 47 deletions
diff --git a/nonprism/gnome-settings-daemon/PKGBUILD b/nonprism/gnome-settings-daemon/PKGBUILD
index 8ab16fd90..d9ff56073 100644
--- a/nonprism/gnome-settings-daemon/PKGBUILD
+++ b/nonprism/gnome-settings-daemon/PKGBUILD
@@ -1,26 +1,31 @@
+# $Id$
# Maintainer (Arch): Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
-# Maintainer: André Silva <emulatorman@hyperbola.info>
+# Contributor: Andreas Grapentin <andreas@grapentin.org>
+# Contributor: André Silva <emulatorman@hyperbola.info>
# Contributor: Isaac David <isacdaavid@at@isacdaavid.info>
+# parabola changes and rationale:
+# - removed geoclue2 support
+
pkgname=gnome-settings-daemon
-pkgver=3.24.2
+pkgver=3.26.2
pkgrel=1.nonprism1
pkgdesc="GNOME Settings Daemon, without geoclue2 support"
url="https://git.gnome.org/browse/gnome-settings-daemon"
-arch=(i686 x86_64 armv7h)
+arch=(x86_64 i686 armv7h)
license=(GPL)
depends=(dconf gnome-desktop gsettings-desktop-schemas libcanberra-pulse libnotify libsystemd
libwacom pulseaudio pulseaudio-alsa upower librsvg libgweather geocode-glib nss
libgudev gtk3-print-backends libnm)
makedepends=(intltool xf86-input-wacom libxslt docbook-xsl python git gnome-common)
groups=(gnome)
-_commit=2ff67385f2b7c7adb0ab438cb41d114235a8e40a # tags/GNOME_SETTINGS_DAEMON_3_24_2^0
+_commit=b4a1b1ab4da2be6628811a763376fc39c116cdbe # tags/GNOME_SETTINGS_DAEMON_3_26_2^0
source=("git+https://git.gnome.org/browse/gnome-settings-daemon#commit=$_commit"
"git+https://git.gnome.org/browse/libgnome-volume-control"
nonprism.patch)
sha256sums=('SKIP'
'SKIP'
- '04217ba23fe3d76b04bdb92059257972ee7511aec6f713d807434f6a10e3d1a5')
+ '6ac18c459d9d2541be9bf9cf94f31c844920dd627f82c159d43490bb6f905ad4')
pkgver() {
cd $pkgname
diff --git a/nonprism/gnome-settings-daemon/nonprism.patch b/nonprism/gnome-settings-daemon/nonprism.patch
index 2e35a49c1..eab945907 100644
--- a/nonprism/gnome-settings-daemon/nonprism.patch
+++ b/nonprism/gnome-settings-daemon/nonprism.patch
@@ -10,7 +10,7 @@ index 84c8ce234..856eaeb49 100644
NM_REQUIRED_VERSION=1.0
LCMS_REQUIRED_VERSION=2.2
-@@ -162,13 +161,11 @@ PKG_CHECK_MODULES(COLOR,
+@@ -163,13 +162,11 @@ PKG_CHECK_MODULES(COLOR,
colord >= 1.0.2
gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION
libcanberra-gtk3
@@ -60,13 +60,14 @@ index 67415f1d8..7f5118468 100644
gint disabled_day_of_month;
- GClueClient *geoclue_client;
- GClueSimple *geoclue_simple;
+ GSettings *location_settings;
gdouble cached_sunrise;
gdouble cached_sunset;
- gdouble cached_temperature;
-@@ -407,66 +403,6 @@ settings_changed_cb (GSettings *settings, gchar *key, gpointer user_data)
+@@ -407,91 +403,6 @@ settings_changed_cb (GSettings *settings, gchar *key, gpointer user_data)
+ g_debug ("settings changed");
night_light_recheck (self);
}
-
+-
-static void
-on_location_notify (GClueSimple *simple,
- GParamSpec *pspec,
@@ -109,6 +110,8 @@ index 67415f1d8..7f5118468 100644
-
- self->geoclue_simple = geoclue_simple;
- self->geoclue_client = gclue_simple_get_client (self->geoclue_simple);
+- g_object_set (G_OBJECT (self->geoclue_client),
+- "time-threshold", 60*60, NULL); /* 1 hour */
-
- g_signal_connect (self->geoclue_simple, "notify::location",
- G_CALLBACK (on_location_notify), user_data);
@@ -117,8 +120,9 @@ index 67415f1d8..7f5118468 100644
-}
-
-static void
--register_geoclue (GsdNightLight *self)
+-start_geoclue (GsdNightLight *self)
-{
+- self->cancellable = g_cancellable_new ();
- gclue_simple_new (DESKTOP_ID,
- GCLUE_ACCURACY_LEVEL_CITY,
- self->cancellable,
@@ -127,10 +131,31 @@ index 67415f1d8..7f5118468 100644
-
-}
-
+-static void
+-stop_geoclue (GsdNightLight *self)
+-{
+- g_cancellable_cancel (self->cancellable);
+- g_clear_object (&self->cancellable);
+-
+- if (self->geoclue_client != NULL) {
+- gclue_client_call_stop (self->geoclue_client, NULL, NULL, NULL);
+- self->geoclue_client = NULL;
+- }
+- g_clear_object (&self->geoclue_simple);
+-}
+-
+-static void
+-check_location_settings (GsdNightLight *self)
+-{
+- if (g_settings_get_boolean (self->location_settings, "enabled") && self->geoclue_enabled)
+- start_geoclue (self);
+- else
+- stop_geoclue (self);
+-}
+
void
gsd_night_light_set_disabled_until_tmw (GsdNightLight *self, gboolean value)
- {
-@@ -511,19 +447,10 @@ gsd_night_light_get_temperature (GsdNightLight *self)
+@@ -537,12 +448,6 @@ gsd_night_light_get_temperature (GsdNightLight *self)
return self->cached_temperature;
}
@@ -143,24 +168,25 @@ index 67415f1d8..7f5118468 100644
gboolean
gsd_night_light_start (GsdNightLight *self, GError **error)
{
+@@ -553,9 +458,6 @@
+ g_signal_connect (self->settings, "changed",
+ G_CALLBACK (settings_changed_cb), self);
-- if (self->geoclue_enabled)
-- register_geoclue (self);
--
- night_light_recheck (self);
- poll_timeout_create (self);
+- g_signal_connect_swapped (self->location_settings, "changed::enabled",
+- G_CALLBACK (check_location_settings), self);
+- check_location_settings (self);
-@@ -554,9 +481,6 @@ gsd_night_light_finalize (GObject *object)
- self->validate_id = 0;
- }
-
-- if (self->geoclue_client != NULL)
-- gclue_client_call_stop (self->geoclue_client, NULL, NULL, NULL);
-- g_clear_object (&self->geoclue_simple);
- G_OBJECT_CLASS (gsd_night_light_parent_class)->finalize (object);
+ return TRUE;
}
+@@ -565,7 +467,6 @@ gsd_night_light_finalize (GObject *object)
+ {
+ GsdNightLight *self = GSD_NIGHT_LIGHT (object);
+
+- stop_geoclue (self);
-@@ -675,7 +599,6 @@ gsd_night_light_class_init (GsdNightLightClass *klass)
+ poll_timeout_destroy (self);
+ poll_smooth_destroy (self);
+@@ -697,7 +598,6 @@ gsd_night_light_class_init (GsdNightLightClass *klass)
static void
gsd_night_light_init (GsdNightLight *self)
{
@@ -193,20 +219,44 @@ index 2ac864875..5bc4b2932 100644
#include <geocode-glib/geocode-glib.h>
#include <polkit/polkit.h>
-@@ -43,8 +42,6 @@ typedef struct
- {
- GCancellable *cancellable;
+@@ -45,9 +44,6 @@ typedef struct
GPermission *permission;
+ Timedate1 *dtm;
+
- GClueClient *geoclue_client;
- GClueSimple *geoclue_simple;
- Timedate1 *dtm;
+- GCancellable *geoclue_cancellable;
TzDB *tzdb;
-@@ -265,65 +262,6 @@ start_reverse_geocoding (GsdTimezoneMonitor *self,
- g_object_unref (reverse);
+ WeatherTzDB *weather_tzdb;
+@@ -246,105 +242,6 @@ start_reverse_geocoding (GsdTimezoneMonitor *self,
+ g_object_unref (place);
}
-static void
+-start_reverse_geocoding (GsdTimezoneMonitor *self,
+- gdouble latitude,
+- gdouble longitude)
+-{
+- GeocodeLocation *location;
+- GeocodeReverse *reverse;
+- GsdTimezoneMonitorPrivate *priv = gsd_timezone_monitor_get_instance_private (self);
+-
+- location = geocode_location_new (latitude,
+- longitude,
+- GEOCODE_LOCATION_ACCURACY_CITY);
+-
+- reverse = geocode_reverse_new_for_location (location);
+- geocode_reverse_resolve_async (reverse,
+- priv->geoclue_cancellable,
+- on_reverse_geocoding_ready,
+- self);
+-
+- g_object_unref (location);
+- g_object_unref (reverse);
+-}
+-
+-static void
-on_location_notify (GClueSimple *simple,
- GParamSpec *pspec,
- gpointer user_data)
@@ -253,36 +303,68 @@ index 2ac864875..5bc4b2932 100644
-}
-
-static void
--register_geoclue (GsdTimezoneMonitor *self)
+-start_geoclue (GsdTimezoneMonitor *self)
-{
- GsdTimezoneMonitorPrivate *priv = gsd_timezone_monitor_get_instance_private (self);
-
+- priv->geoclue_cancellable = g_cancellable_new ();
- gclue_simple_new (DESKTOP_ID,
- GCLUE_ACCURACY_LEVEL_CITY,
-- priv->cancellable,
+- priv->geoclue_cancellable,
- on_geoclue_simple_ready,
- self);
-
-}
-
+-static void
+-stop_geoclue (GsdTimezoneMonitor *self)
+-{
+- GsdTimezoneMonitorPrivate *priv = gsd_timezone_monitor_get_instance_private (self);
+-
+- g_cancellable_cancel (priv->geoclue_cancellable);
+- g_clear_object (&priv->geoclue_cancellable);
+-
+- if (priv->geoclue_client) {
+- gclue_client_call_stop (priv->geoclue_client, NULL, NULL, NULL);
+- priv->geoclue_client = NULL;
+- }
+-
+- g_clear_object (&priv->geoclue_simple);
+-}
+-
GsdTimezoneMonitor *
gsd_timezone_monitor_new (void)
{
-@@ -343,11 +281,8 @@ gsd_timezone_monitor_finalize (GObject *obj)
- g_clear_object (&priv->cancellable);
- }
+@@ -359,7 +296,6 @@ gsd_timezone_monitor_finalize (GObject *obj)
-- if (priv->geoclue_client)
-- gclue_client_call_stop (priv->geoclue_client, NULL, NULL, NULL);
+ g_debug ("Stopping timezone monitor");
- g_clear_object (&priv->dtm);
-- g_clear_object (&priv->geoclue_simple);
- g_clear_object (&priv->permission);
- g_clear_pointer (&priv->current_timezone, g_free);
- g_clear_pointer (&priv->tzdb, tz_db_free);
-@@ -414,5 +349,4 @@ gsd_timezone_monitor_init (GsdTimezoneMonitor *self)
- priv->tzdb = tz_load_db ();
+- stop_geoclue (monitor);
+
+ if (priv->cancellable) {
+ g_cancellable_cancel (priv->cancellable);
+@@ -394,16 +290,6 @@
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
+ }
+
+-static void
+-check_location_settings (GsdTimezoneMonitor *self)
+-{
+- GsdTimezoneMonitorPrivate *priv = gsd_timezone_monitor_get_instance_private (self);
+- if (g_settings_get_boolean (priv->location_settings, "enabled"))
+- start_geoclue (self);
+- else
+- stop_geoclue (self);
+-}
+-
+ static void
+ gsd_timezone_monitor_init (GsdTimezoneMonitor *self)
+ {
+@@ -446,7 +382,4 @@ gsd_timezone_monitor_init (GsdTimezoneMonitor *self)
priv->weather_tzdb = weather_tz_db_new ();
-- register_geoclue (self);
+ priv->location_settings = g_settings_new ("org.gnome.system.location");
+- g_signal_connect_swapped (priv->location_settings, "changed::enabled",
+- G_CALLBACK (check_location_settings), self);
+- check_location_settings (self);
}