summaryrefslogtreecommitdiff
path: root/extra/gnome-settings-daemon
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-07-09 01:22:21 -0700
committerroot <root@rshg054.dnsready.net>2013-07-09 01:22:21 -0700
commit10aa61ef39e662453e1d817046e359372fe3b326 (patch)
treeb4b80fca9ddca701f90f9a5f3e538da42afc65eb /extra/gnome-settings-daemon
parentf6f03b59111d2fa5eb1b97f04001c69cd99cca6c (diff)
Tue Jul 9 01:22:19 PDT 2013
Diffstat (limited to 'extra/gnome-settings-daemon')
-rw-r--r--extra/gnome-settings-daemon/PKGBUILD18
-rw-r--r--extra/gnome-settings-daemon/git-fixes.patch258
2 files changed, 272 insertions, 4 deletions
diff --git a/extra/gnome-settings-daemon/PKGBUILD b/extra/gnome-settings-daemon/PKGBUILD
index 5fff6c3b4..beb1607a9 100644
--- a/extra/gnome-settings-daemon/PKGBUILD
+++ b/extra/gnome-settings-daemon/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 187903 2013-06-07 22:41:57Z heftig $
+# $Id: PKGBUILD 189793 2013-07-08 08:16:03Z jgc $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
pkgname=gnome-settings-daemon
pkgver=3.8.3
-pkgrel=1
+pkgrel=2
pkgdesc="The GNOME Settings daemon"
arch=('i686' 'x86_64')
license=('GPL')
@@ -14,11 +14,21 @@ options=('!emptydirs' '!libtool')
install=gnome-settings-daemon.install
url="http://www.gnome.org"
groups=('gnome')
-source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz)
-sha256sums=('00e7f46c9a6fb8b148255adfcdd26bc5f2c1d393b8dfbac69da100c8dcfa1b6c')
+source=(http://ftp.gnome.org/pub/gnome/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz
+ git-fixes.patch)
+sha256sums=('00e7f46c9a6fb8b148255adfcdd26bc5f2c1d393b8dfbac69da100c8dcfa1b6c'
+ '30b0a42df9ea0c6c18ed51cb8f150008e4b5ab624eb420f0251d08ab2503c330')
+
+prepare() {
+ cd $pkgname-$pkgver
+ patch -Np1 -i ../git-fixes.patch
+}
build() {
cd $pkgname-$pkgver
+ aclocal
+ autoconf
+ automake --add-missing
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
--libexecdir=/usr/lib/gnome-settings-daemon --disable-static
diff --git a/extra/gnome-settings-daemon/git-fixes.patch b/extra/gnome-settings-daemon/git-fixes.patch
new file mode 100644
index 000000000..a56033ce1
--- /dev/null
+++ b/extra/gnome-settings-daemon/git-fixes.patch
@@ -0,0 +1,258 @@
+diff --git a/data/gnome-settings-daemon.desktop.in.in b/data/gnome-settings-daemon.desktop.in.in
+index c5a5518..ff71eee 100644
+--- a/data/gnome-settings-daemon.desktop.in.in
++++ b/data/gnome-settings-daemon.desktop.in.in
+@@ -1,7 +1,7 @@
+ [Desktop Entry]
+ Type=Application
+ _Name=GNOME Settings Daemon
+-Exec=@libexecdir@/gnome-settings-daemon
++Exec=@libexecdir@/gnome-settings-daemon-localeexec
+ OnlyShowIn=GNOME;
+ NoDisplay=true
+ X-GNOME-Autostart-Phase=Initialization
+diff --git a/gnome-settings-daemon/Makefile.am b/gnome-settings-daemon/Makefile.am
+index 194a7cc..94b3861 100644
+--- a/gnome-settings-daemon/Makefile.am
++++ b/gnome-settings-daemon/Makefile.am
+@@ -48,6 +48,15 @@ gsddir = $(libexecdir)
+ gsd_PROGRAMS = \
+ gnome-settings-daemon
+
++gsd_SCRIPTS = \
++ gnome-settings-daemon-localeexec
++
++EXTRA_DIST = \
++ gnome-settings-daemon-localeexec.in
++
++gnome-settings-daemon-localeexec: gnome-settings-daemon-localeexec.in
++ $(AM_V_GEN) sed -e "s|\@libexecdir\@|$(libexecdir)|" -e "s|\@prefix\@|$(prefix)|" $< > $@.tmp && mv $@.tmp $@
++
+ apidir = $(includedir)/gnome-settings-daemon-$(GSD_API_VERSION)/gnome-settings-daemon
+ api_DATA = \
+ gnome-settings-plugin.h
+diff --git a/gnome-settings-daemon/gnome-settings-daemon-localeexec.in b/gnome-settings-daemon/gnome-settings-daemon-localeexec.in
+new file mode 100755
+index 0000000..eed91a4
+--- /dev/null
++++ b/gnome-settings-daemon/gnome-settings-daemon-localeexec.in
+@@ -0,0 +1,20 @@
++#!/bin/sh
++
++SETTING=$(gsettings get org.gnome.system.locale region)
++REGION=${SETTING#\'}
++REGION=${REGION%\'}
++
++if [ -n "$REGION" ]; then
++ export LC_TIME=$REGION
++ export LC_NUMERIC=$REGION
++ export LC_MONETARY=$REGION
++ export LC_MEASUREMENT=$REGION
++ export LC_PAPER=$REGION
++fi
++
++if [ -x @prefix@/bin/ibus-daemon ]; then
++ export QT_IM_MODULE=ibus
++ export XMODIFIERS=@im=ibus
++fi
++
++exec @libexecdir@/gnome-settings-daemon
+diff --git a/gnome-settings-daemon/main.c b/gnome-settings-daemon/main.c
+index 24c1598..16017df 100644
+--- a/gnome-settings-daemon/main.c
++++ b/gnome-settings-daemon/main.c
+@@ -279,37 +279,6 @@ set_legacy_ibus_env_vars (GDBusProxy *proxy)
+ }
+ #endif
+
+-/* Keep synchronised with set_locale() and
+- * set_legacy_ibus_env_vars() above */
+-static void
+-set_locale_env (void)
+-{
+- GSettings *locale_settings;
+- gchar *region;
+-
+- /* Set locale environment */
+- locale_settings = g_settings_new ("org.gnome.system.locale");
+- region = g_settings_get_string (locale_settings, "region");
+- if (region[0]) {
+- g_setenv ("LC_TIME", region, TRUE);
+- g_setenv ("LC_NUMERIC", region, TRUE);
+- g_setenv ("LC_MONETARY", region, TRUE);
+- g_setenv ("LC_MEASUREMENT", region, TRUE);
+- g_setenv ("LC_PAPER", region, TRUE);
+- }
+- g_free (region);
+- g_object_unref (locale_settings);
+-
+-#ifdef HAVE_IBUS
+- /* Set IBus legacy environment */
+- if (is_program_in_path ("ibus-daemon") &&
+- keyboard_plugin_is_enabled ()) {
+- g_setenv ("QT_IM_MODULE", "ibus", TRUE);
+- g_setenv ("XMODIFIERS", "@im=ibus", TRUE);
+- }
+-#endif
+-}
+-
+ static void
+ register_with_gnome_session (GDBusProxy *proxy)
+ {
+@@ -499,8 +468,6 @@ main (int argc, char *argv[])
+
+ g_log_set_default_handler (gsd_log_default_handler, NULL);
+
+- set_locale_env ();
+-
+ notify_init ("gnome-settings-daemon");
+
+ bus_register ();
+diff --git a/plugins/housekeeping/gsd-housekeeping-manager.c b/plugins/housekeeping/gsd-housekeeping-manager.c
+index 45393ec..f51d520 100644
+--- a/plugins/housekeeping/gsd-housekeeping-manager.c
++++ b/plugins/housekeeping/gsd-housekeeping-manager.c
+@@ -372,12 +372,20 @@ gboolean
+ gsd_housekeeping_manager_start (GsdHousekeepingManager *manager,
+ GError **error)
+ {
++ gchar *dir;
++
+ g_debug ("Starting housekeeping manager");
+ gnome_settings_profile_start (NULL);
+
+ /* Create ~/.local/ as early as possible */
+ g_mkdir_with_parents(g_get_user_data_dir (), 0700);
+
++ /* Create ~/.local/share/applications/, see
++ * https://bugzilla.gnome.org/show_bug.cgi?id=703048 */
++ dir = g_build_filename (g_get_user_data_dir (), "applications", NULL);
++ g_mkdir (dir, 0700);
++ g_free (dir);
++
+ gsd_ldsm_setup (FALSE);
+
+ manager->priv->settings = g_settings_new (THUMB_PREFIX);
+diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
+index e6380bd..96da3d1 100644
+--- a/plugins/power/gsd-power-manager.c
++++ b/plugins/power/gsd-power-manager.c
+@@ -261,11 +261,12 @@ gsd_power_manager_error_quark (void)
+ }
+
+ static void
+-notify_close_if_showing (NotifyNotification *notification)
++notify_close_if_showing (NotifyNotification **notification)
+ {
+- if (notification == NULL)
++ if (*notification == NULL)
+ return;
+- notify_notification_close (notification, NULL);
++ notify_notification_close (*notification, NULL);
++ g_clear_object (notification);
+ }
+
+ typedef enum {
+@@ -1214,7 +1215,7 @@ engine_ups_discharging (GsdPowerManager *manager, UpDevice *device)
+ icon = gpm_upower_get_device_icon (device, TRUE);
+
+ /* close any existing notification of this class */
+- notify_close_if_showing (manager->priv->notification_ups_discharging);
++ notify_close_if_showing (&manager->priv->notification_ups_discharging);
+
+ /* create a new notification */
+ create_notification (title, message->str,
+@@ -1424,7 +1425,7 @@ engine_charge_low (GsdPowerManager *manager, UpDevice *device)
+ icon = gpm_upower_get_device_icon (device, TRUE);
+
+ /* close any existing notification of this class */
+- notify_close_if_showing (manager->priv->notification_low);
++ notify_close_if_showing (&manager->priv->notification_low);
+
+ /* create a new notification */
+ create_notification (title, message,
+@@ -1597,7 +1598,7 @@ engine_charge_critical (GsdPowerManager *manager, UpDevice *device)
+ icon = gpm_upower_get_device_icon (device, TRUE);
+
+ /* close any existing notification of this class */
+- notify_close_if_showing (manager->priv->notification_low);
++ notify_close_if_showing (&manager->priv->notification_low);
+
+ /* create a new notification */
+ create_notification (title, message,
+@@ -1735,7 +1736,7 @@ engine_charge_action (GsdPowerManager *manager, UpDevice *device)
+ icon = gpm_upower_get_device_icon (device, TRUE);
+
+ /* close any existing notification of this class */
+- notify_close_if_showing (manager->priv->notification_low);
++ notify_close_if_showing (&manager->priv->notification_low);
+
+ /* create a new notification */
+ create_notification (title, message,
+@@ -1797,8 +1798,8 @@ engine_device_changed_cb (UpClient *client, UpDevice *device, GsdPowerManager *m
+ } else if (state == UP_DEVICE_STATE_FULLY_CHARGED ||
+ state == UP_DEVICE_STATE_CHARGING) {
+ g_debug ("fully charged or charging, hiding notifications if any");
+- notify_close_if_showing (manager->priv->notification_low);
+- notify_close_if_showing (manager->priv->notification_ups_discharging);
++ notify_close_if_showing (&manager->priv->notification_low);
++ notify_close_if_showing (&manager->priv->notification_ups_discharging);
+ main_battery_or_ups_low_changed (manager, FALSE);
+ }
+
+@@ -2268,7 +2269,7 @@ up_client_changed_cb (UpClient *client, GsdPowerManager *manager)
+ if (!up_client_get_on_battery (client)) {
+ /* if we are playing a critical charge sound loop on AC, stop it */
+ play_loop_stop (&manager->priv->critical_alert_timeout_id);
+- notify_close_if_showing (manager->priv->notification_low);
++ notify_close_if_showing (&manager->priv->notification_low);
+ main_battery_or_ups_low_changed (manager, FALSE);
+ }
+
+@@ -2638,7 +2639,7 @@ idle_configure (GsdPowerManager *manager)
+ &manager->priv->idle_dim_id);
+ clear_idle_watch (manager->priv->idle_monitor,
+ &manager->priv->idle_sleep_warning_id);
+- notify_close_if_showing (manager->priv->notification_sleep_warning);
++ notify_close_if_showing (&manager->priv->notification_sleep_warning);
+ return;
+ }
+
+@@ -2705,7 +2706,7 @@ idle_configure (GsdPowerManager *manager)
+ }
+
+ if (manager->priv->idle_sleep_warning_id == 0)
+- notify_close_if_showing (manager->priv->notification_sleep_warning);
++ notify_close_if_showing (&manager->priv->notification_sleep_warning);
+
+ /* set up dim callback for when the screen lock is not active,
+ * but only if we actually want to dim. */
+@@ -3038,7 +3039,7 @@ static void
+ show_sleep_warning (GsdPowerManager *manager)
+ {
+ /* close any existing notification of this class */
+- notify_close_if_showing (manager->priv->notification_sleep_warning);
++ notify_close_if_showing (&manager->priv->notification_sleep_warning);
+
+ /* create a new notification */
+ switch (manager->priv->sleep_action_type) {
+@@ -3109,7 +3110,7 @@ idle_became_active_cb (GnomeIdleMonitor *monitor,
+ set_temporary_unidle_on_ac (manager, FALSE);
+
+ /* close any existing notification about idleness */
+- notify_close_if_showing (manager->priv->notification_sleep_warning);
++ notify_close_if_showing (&manager->priv->notification_sleep_warning);
+
+ idle_set_mode (manager, GSD_POWER_IDLE_MODE_NORMAL);
+ }
+@@ -3344,8 +3345,8 @@ handle_resume_actions (GsdPowerManager *manager)
+ {
+ /* close existing notifications on resume, the system power
+ * state is probably different now */
+- notify_close_if_showing (manager->priv->notification_low);
+- notify_close_if_showing (manager->priv->notification_ups_discharging);
++ notify_close_if_showing (&manager->priv->notification_low);
++ notify_close_if_showing (&manager->priv->notification_ups_discharging);
+ main_battery_or_ups_low_changed (manager, FALSE);
+
+ /* ensure we turn the panel back on after resume */