Sync with f18

This commit is contained in:
Matthias Clasen 2012-10-02 13:42:16 -04:00
parent 1e85add7f4
commit 12be0e2e6a
3 changed files with 1576 additions and 1 deletions

View File

@ -0,0 +1,100 @@
From d5638d181649b567292b033fc6d26b449632fd50 Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@redhat.com>
Date: Mon, 1 Oct 2012 13:22:31 -0400
Subject: [PATCH 1/2] Clean up gsd_power_stop
Using g_clear_object makes this a bit nicer.
---
plugins/power/gsd-power-manager.c | 59 ++++++++++-----------------------------
1 file changed, 14 insertions(+), 45 deletions(-)
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index d4bf937..0e06495 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -3798,68 +3798,37 @@ gsd_power_manager_stop (GsdPowerManager *manager)
manager->priv->introspection_data = NULL;
}
- if (manager->priv->connection != NULL) {
- g_object_unref (manager->priv->connection);
- manager->priv->connection = NULL;
- }
-
kill_lid_close_safety_timer (manager);
g_signal_handlers_disconnect_by_data (manager->priv->up_client, manager);
- g_object_unref (manager->priv->session);
- g_object_unref (manager->priv->settings);
- g_object_unref (manager->priv->settings_screensaver);
- g_object_unref (manager->priv->up_client);
- manager->priv->session = NULL;
- manager->priv->settings = NULL;
- manager->priv->settings_screensaver = NULL;
- manager->priv->up_client = NULL;
-
- if (manager->priv->x11_screen != NULL) {
- g_object_unref (manager->priv->x11_screen);
- manager->priv->x11_screen = NULL;
- }
+ g_clear_object (&manager->priv->connection);
+ g_clear_object (&manager->priv->session);
+ g_clear_object (&manager->priv->settings);
+ g_clear_object (&manager->priv->settings_screensaver);
+ g_clear_object (&manager->priv->up_client);
+ g_clear_object (&manager->priv->x11_screen);
g_ptr_array_unref (manager->priv->devices_array);
- g_object_unref (manager->priv->phone);
- g_object_unref (manager->priv->device_composite);
manager->priv->devices_array = NULL;
- manager->priv->phone = NULL;
- manager->priv->device_composite = NULL;
-
- if (manager->priv->previous_icon != NULL) {
- g_object_unref (manager->priv->previous_icon);
- manager->priv->previous_icon = NULL;
- }
+ g_clear_object (&manager->priv->phone);
+ g_clear_object (&manager->priv->device_composite);
+ g_clear_object (&manager->priv->previous_icon);
g_free (manager->priv->previous_summary);
manager->priv->previous_summary = NULL;
- if (manager->priv->upower_proxy != NULL) {
- g_object_unref (manager->priv->upower_proxy);
- manager->priv->upower_proxy = NULL;
- }
-
- if (manager->priv->session_proxy != NULL) {
- g_object_unref (manager->priv->session_proxy);
- manager->priv->session_proxy = NULL;
- }
-
- if (manager->priv->session_presence_proxy != NULL) {
- g_object_unref (manager->priv->session_presence_proxy);
- manager->priv->session_presence_proxy = NULL;
- }
+ g_clear_object (&manager->priv->upower_proxy);
+ g_clear_object (&manager->priv->session_proxy);
+ g_clear_object (&manager->priv->session_presence_proxy);
if (manager->priv->critical_alert_timeout_id > 0) {
g_source_remove (manager->priv->critical_alert_timeout_id);
manager->priv->critical_alert_timeout_id = 0;
}
- g_object_unref (manager->priv->idletime);
- g_object_unref (manager->priv->status_icon);
- manager->priv->idletime = NULL;
- manager->priv->status_icon = NULL;
+ g_clear_object (&manager->priv->idletime);
+ g_clear_object (&manager->priv->status_icon);
}
static void
--
1.7.12.1

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
Name: gnome-settings-daemon
Version: 3.6.0
Release: 2%{?dist}
Release: 3%{?dist}
Summary: The daemon sharing settings from GNOME to GTK+/KDE applications
Group: System Environment/Daemons
@ -11,6 +11,11 @@ Source: http://download.gnome.org/sources/%{name}/3.5/%{name}-%{version}
# disable wacom for ppc/ppc64 (used on RHEL)
Patch0: %{name}-3.5.4-ppc-no-wacom.patch
# upstream cleanup
Patch1: 0001-Clean-up-gsd_power_stop.patch
# https://bugzilla.gnome.org/show_bug.cgi?id=680689
Patch2: 0001-power-and-media-keys-Use-logind-for-suspending-and-r.patch
Requires: control-center-filesystem
BuildRequires: dbus-glib-devel
@ -74,6 +79,9 @@ The %{name}-updates package contains the updates plugin for %{name}
%patch0 -p1 -b .ppc-no-wacom
%endif
%patch1 -p1
%patch2 -p1
autoreconf -i -f
%build
@ -249,6 +257,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%{_datadir}/dbus-1/interfaces/org.gnome.SettingsDaemonUpdates.xml
%changelog
* Tue Oct 2 2012 Matthias Clasen <mclasen@redhat.com> - 3.6.0-3
- Fix lid close handling with new systemd
* Fri Sep 28 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 3.6.0-2
- Split out PackageKit into a sub package. Fixes #699348