Accepting request 212821 from GNOME:Factory
Allow updating (and require!) UPower 1.0. This was wanted by the SLE Guys apparently. OBS-URL: https://build.opensuse.org/request/show/212821 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnome-settings-daemon?expand=0&rev=102
This commit is contained in:
commit
52da3e94bf
76
gnome-settings-daemon-upower-backport.patch
Normal file
76
gnome-settings-daemon-upower-backport.patch
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
From: Mike Gorse <mgorse@suse.com>
|
||||||
|
Date: Tue Dec 10 14:36:49 CST 2013
|
||||||
|
Subject: [PATCH] Support new libupower-glib API
|
||||||
|
|
||||||
|
Support upower 0.99. Based on commits 88de07 and 3ebfd1 from upstream.
|
||||||
|
---
|
||||||
|
plugins/power/gsd-power-manager.c | 6 +++---
|
||||||
|
diff -ur gnome-settings-daemon-3.10.2.orig/plugins/power/gsd-power-manager.c gnome-settings-daemon-3.10.2/plugins/power/gsd-power-manager.c
|
||||||
|
--- gnome-settings-daemon-3.10.2.orig/plugins/power/gsd-power-manager.c 2013-11-12 12:33:05.000000000 -0600
|
||||||
|
+++ gnome-settings-daemon-3.10.2/plugins/power/gsd-power-manager.c 2013-12-10 14:21:08.857851976 -0600
|
||||||
|
@@ -991,16 +991,6 @@
|
||||||
|
guint i;
|
||||||
|
GPtrArray *array = NULL;
|
||||||
|
UpDevice *device;
|
||||||
|
- gboolean ret;
|
||||||
|
- GError *error = NULL;
|
||||||
|
-
|
||||||
|
- /* get devices from UPower */
|
||||||
|
- ret = up_client_enumerate_devices_sync (manager->priv->up_client, NULL, &error);
|
||||||
|
- if (!ret) {
|
||||||
|
- g_warning ("failed to get device list: %s", error->message);
|
||||||
|
- g_error_free (error);
|
||||||
|
- return FALSE;
|
||||||
|
- }
|
||||||
|
|
||||||
|
engine_recalculate_state (manager);
|
||||||
|
|
||||||
|
@@ -1031,13 +1021,22 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
-engine_device_removed_cb (UpClient *client, UpDevice *device, GsdPowerManager *manager)
|
||||||
|
+engine_device_removed_cb (UpClient *client, const char *object_path, GsdPowerManager *manager)
|
||||||
|
{
|
||||||
|
- gboolean ret;
|
||||||
|
- ret = g_ptr_array_remove (manager->priv->devices_array, device);
|
||||||
|
- if (!ret)
|
||||||
|
- return;
|
||||||
|
- engine_recalculate_state (manager);
|
||||||
|
+ gboolean ret = FALSE;
|
||||||
|
+ guint i;
|
||||||
|
+
|
||||||
|
+ for (i = 0; i < manager->priv->devices_array->len; i++) {
|
||||||
|
+ UpDevice *device = g_ptr_array_index (manager->priv->devices_array, i);
|
||||||
|
+
|
||||||
|
+ if (g_strcmp0 (object_path, up_device_get_object_path (device)) == 0) {
|
||||||
|
+ g_ptr_array_remove_index (manager->priv->devices_array, i);
|
||||||
|
+ ret = TRUE;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ if (ret)
|
||||||
|
+ engine_recalculate_state (manager);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
@@ -2172,7 +2172,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
-up_client_changed_cb (UpClient *client, GsdPowerManager *manager)
|
||||||
|
+lid_state_changed_cb (UpClient *client, GParamSpec *pspec, GsdPowerManager *manager)
|
||||||
|
{
|
||||||
|
gboolean tmp;
|
||||||
|
|
||||||
|
@@ -3276,8 +3276,8 @@
|
||||||
|
G_CALLBACK (engine_device_removed_cb), manager);
|
||||||
|
g_signal_connect (manager->priv->up_client, "device-changed",
|
||||||
|
G_CALLBACK (engine_device_changed_cb), manager);
|
||||||
|
- g_signal_connect_after (manager->priv->up_client, "changed",
|
||||||
|
- G_CALLBACK (up_client_changed_cb), manager);
|
||||||
|
+ g_signal_connect_after (manager->priv->up_client, "notify::lid-is-closed",
|
||||||
|
+ G_CALLBACK (lid_state_changed_cb), manager);
|
||||||
|
g_signal_connect (manager->priv->up_client, "notify::on-battery",
|
||||||
|
G_CALLBACK (up_client_on_battery_cb), manager);
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Dec 20 00:16:59 UTC 2013 - mgorse@suse.com
|
||||||
|
|
||||||
|
- Add gnome-settings-daemon-upower-backport.patch: support UPower
|
||||||
|
version 0.99.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Dec 14 21:42:59 UTC 2013 - zaitor@opensuse.org
|
Sat Dec 14 21:42:59 UTC 2013 - zaitor@opensuse.org
|
||||||
|
|
||||||
|
@ -51,6 +51,8 @@ Patch17: gnome-settings-daemon-stop-reload-proxy-settings.patch
|
|||||||
Patch19: gnome-settings-daemon-notify-idle-resumed.patch
|
Patch19: gnome-settings-daemon-notify-idle-resumed.patch
|
||||||
# PATCH-FIX-UPSTREAM gnome-settings-daemon-export-Gtk_ShellShowsDesktop-setting.patch bgo#712302 zaitor@opensuse.org -- Stop showing desktopfolder in nautilus sidebar when using gnome-shell.
|
# PATCH-FIX-UPSTREAM gnome-settings-daemon-export-Gtk_ShellShowsDesktop-setting.patch bgo#712302 zaitor@opensuse.org -- Stop showing desktopfolder in nautilus sidebar when using gnome-shell.
|
||||||
Patch20: gnome-settings-daemon-export-Gtk_ShellShowsDesktop-setting.patch
|
Patch20: gnome-settings-daemon-export-Gtk_ShellShowsDesktop-setting.patch
|
||||||
|
# PATCH-FEATURE-UPSTREAM gnome-settings-daemon-upower-backport.patch mgorse@suse.com -- Update for libupower-glib API changes.
|
||||||
|
Patch21: gnome-settings-daemon-upower-backport.patch
|
||||||
BuildRequires: cups-devel
|
BuildRequires: cups-devel
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: gnome-common
|
BuildRequires: gnome-common
|
||||||
@ -94,7 +96,7 @@ BuildRequires: pkgconfig(nss)
|
|||||||
BuildRequires: pkgconfig(packagekit-glib2) >= 0.8.1
|
BuildRequires: pkgconfig(packagekit-glib2) >= 0.8.1
|
||||||
BuildRequires: pkgconfig(pango) >= 1.20.0
|
BuildRequires: pkgconfig(pango) >= 1.20.0
|
||||||
BuildRequires: pkgconfig(polkit-gobject-1) >= 0.103
|
BuildRequires: pkgconfig(polkit-gobject-1) >= 0.103
|
||||||
BuildRequires: pkgconfig(upower-glib) >= 0.9.11
|
BuildRequires: pkgconfig(upower-glib) >= 0.99.0
|
||||||
BuildRequires: pkgconfig(x11)
|
BuildRequires: pkgconfig(x11)
|
||||||
BuildRequires: pkgconfig(xext)
|
BuildRequires: pkgconfig(xext)
|
||||||
BuildRequires: pkgconfig(xfixes)
|
BuildRequires: pkgconfig(xfixes)
|
||||||
@ -145,6 +147,7 @@ translation-update-upstream
|
|||||||
%patch17 -p1
|
%patch17 -p1
|
||||||
%patch19 -p1
|
%patch19 -p1
|
||||||
%patch20 -p1
|
%patch20 -p1
|
||||||
|
%patch21 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -f -i
|
autoreconf -f -i
|
||||||
|
Loading…
Reference in New Issue
Block a user