Rebase patches and remove obsolete ones
This commit is contained in:
parent
6a36d7e86e
commit
62335043e8
@ -1,100 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
From a26f7c5190ebc82f9f17e0446159311377b20d3f Mon Sep 17 00:00:00 2001
|
From 9b9f6560d33b4586c6e1e3686074384ee6e09bc3 Mon Sep 17 00:00:00 2001
|
||||||
From: Richard Hughes <richard@hughsie.com>
|
From: Richard Hughes <richard@hughsie.com>
|
||||||
Date: Fri, 21 Sep 2012 11:56:53 +0100
|
Date: Fri, 21 Sep 2012 11:56:53 +0100
|
||||||
Subject: [PATCH] power and media-keys: Use logind for suspending and
|
Subject: [PATCH] power and media-keys: Use logind for suspending and
|
||||||
@ -18,8 +18,8 @@ https://bugzilla.gnome.org/show_bug.cgi?id=680689
|
|||||||
plugins/common/gsd-power-helper.c | 203 --------
|
plugins/common/gsd-power-helper.c | 203 --------
|
||||||
plugins/common/gsd-power-helper.h | 35 --
|
plugins/common/gsd-power-helper.h | 35 --
|
||||||
plugins/media-keys/gsd-media-keys-manager.c | 156 +++++--
|
plugins/media-keys/gsd-media-keys-manager.c | 156 +++++--
|
||||||
plugins/power/gsd-power-manager.c | 699 +++++++++++++++++++---------
|
plugins/power/gsd-power-manager.c | 701 +++++++++++++++++++---------
|
||||||
5 files changed, 595 insertions(+), 502 deletions(-)
|
5 files changed, 595 insertions(+), 504 deletions(-)
|
||||||
delete mode 100644 plugins/common/gsd-power-helper.c
|
delete mode 100644 plugins/common/gsd-power-helper.c
|
||||||
delete mode 100644 plugins/common/gsd-power-helper.h
|
delete mode 100644 plugins/common/gsd-power-helper.h
|
||||||
|
|
||||||
@ -545,7 +545,7 @@ index 9c84d7f..a2f277e 100644
|
|||||||
|
|
||||||
GsdMediaKeysManager *
|
GsdMediaKeysManager *
|
||||||
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
|
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
|
||||||
index 0e06495..7c120c4 100644
|
index 1c594d8..2759f07 100644
|
||||||
--- a/plugins/power/gsd-power-manager.c
|
--- a/plugins/power/gsd-power-manager.c
|
||||||
+++ b/plugins/power/gsd-power-manager.c
|
+++ b/plugins/power/gsd-power-manager.c
|
||||||
@@ -1,7 +1,7 @@
|
@@ -1,7 +1,7 @@
|
||||||
@ -557,7 +557,7 @@ index 0e06495..7c120c4 100644
|
|||||||
* Copyright (C) 2011 Ritesh Khadgaray <khadgaray@gmail.com>
|
* Copyright (C) 2011 Ritesh Khadgaray <khadgaray@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -31,6 +31,7 @@
|
@@ -32,6 +32,7 @@
|
||||||
#include <libupower-glib/upower.h>
|
#include <libupower-glib/upower.h>
|
||||||
#include <libnotify/notify.h>
|
#include <libnotify/notify.h>
|
||||||
#include <canberra-gtk.h>
|
#include <canberra-gtk.h>
|
||||||
@ -565,7 +565,7 @@ index 0e06495..7c120c4 100644
|
|||||||
|
|
||||||
#define GNOME_DESKTOP_USE_UNSTABLE_API
|
#define GNOME_DESKTOP_USE_UNSTABLE_API
|
||||||
#include <libgnome-desktop/gnome-rr.h>
|
#include <libgnome-desktop/gnome-rr.h>
|
||||||
@@ -42,7 +43,6 @@
|
@@ -43,7 +44,6 @@
|
||||||
#include "gnome-settings-session.h"
|
#include "gnome-settings-session.h"
|
||||||
#include "gsd-enums.h"
|
#include "gsd-enums.h"
|
||||||
#include "gsd-power-manager.h"
|
#include "gsd-power-manager.h"
|
||||||
@ -573,7 +573,7 @@ index 0e06495..7c120c4 100644
|
|||||||
|
|
||||||
#define GNOME_SESSION_DBUS_NAME "org.gnome.SessionManager"
|
#define GNOME_SESSION_DBUS_NAME "org.gnome.SessionManager"
|
||||||
#define GNOME_SESSION_DBUS_PATH "/org/gnome/SessionManager"
|
#define GNOME_SESSION_DBUS_PATH "/org/gnome/SessionManager"
|
||||||
@@ -77,6 +77,10 @@
|
@@ -78,6 +78,10 @@
|
||||||
#define GSD_POWER_MANAGER_RECALL_DELAY 30 /* seconds */
|
#define GSD_POWER_MANAGER_RECALL_DELAY 30 /* seconds */
|
||||||
#define GSD_POWER_MANAGER_LID_CLOSE_SAFETY_TIMEOUT 30 /* seconds */
|
#define GSD_POWER_MANAGER_LID_CLOSE_SAFETY_TIMEOUT 30 /* seconds */
|
||||||
|
|
||||||
@ -584,7 +584,7 @@ index 0e06495..7c120c4 100644
|
|||||||
/* Keep this in sync with gnome-shell */
|
/* Keep this in sync with gnome-shell */
|
||||||
#define SCREENSAVER_FADE_TIME 10 /* seconds */
|
#define SCREENSAVER_FADE_TIME 10 /* seconds */
|
||||||
|
|
||||||
@@ -190,13 +194,19 @@ struct GsdPowerManagerPrivate
|
@@ -193,15 +197,21 @@ struct GsdPowerManagerPrivate
|
||||||
ca_context *canberra_context;
|
ca_context *canberra_context;
|
||||||
ca_proplist *critical_alert_loop_props;
|
ca_proplist *critical_alert_loop_props;
|
||||||
guint32 critical_alert_timeout_id;
|
guint32 critical_alert_timeout_id;
|
||||||
@ -595,6 +595,8 @@ index 0e06495..7c120c4 100644
|
|||||||
GsdPowerIdleMode current_idle_mode;
|
GsdPowerIdleMode current_idle_mode;
|
||||||
- guint lid_close_safety_timer_id;
|
- guint lid_close_safety_timer_id;
|
||||||
GtkStatusIcon *status_icon;
|
GtkStatusIcon *status_icon;
|
||||||
|
guint xscreensaver_watchdog_timer_id;
|
||||||
|
gboolean is_virtual_machine;
|
||||||
+
|
+
|
||||||
+ /* systemd stuff */
|
+ /* systemd stuff */
|
||||||
+ GDBusProxy *logind_proxy;
|
+ GDBusProxy *logind_proxy;
|
||||||
@ -606,7 +608,7 @@ index 0e06495..7c120c4 100644
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@@ -213,8 +223,8 @@ static GIcon *engine_get_icon (GsdPowerManager *manager);
|
@@ -218,8 +228,8 @@ static GIcon *engine_get_icon (GsdPowerManager *manager);
|
||||||
static gchar *engine_get_summary (GsdPowerManager *manager);
|
static gchar *engine_get_summary (GsdPowerManager *manager);
|
||||||
static void do_power_action_type (GsdPowerManager *manager, GsdPowerActionType action_type);
|
static void do_power_action_type (GsdPowerManager *manager, GsdPowerActionType action_type);
|
||||||
static void do_lid_closed_action (GsdPowerManager *manager);
|
static void do_lid_closed_action (GsdPowerManager *manager);
|
||||||
@ -617,7 +619,7 @@ index 0e06495..7c120c4 100644
|
|||||||
|
|
||||||
G_DEFINE_TYPE (GsdPowerManager, gsd_power_manager, G_TYPE_OBJECT)
|
G_DEFINE_TYPE (GsdPowerManager, gsd_power_manager, G_TYPE_OBJECT)
|
||||||
|
|
||||||
@@ -2044,6 +2054,57 @@ gnome_session_shutdown (void)
|
@@ -2049,6 +2059,57 @@ gnome_session_shutdown (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -675,7 +677,7 @@ index 0e06495..7c120c4 100644
|
|||||||
do_power_action_type (GsdPowerManager *manager,
|
do_power_action_type (GsdPowerManager *manager,
|
||||||
GsdPowerActionType action_type)
|
GsdPowerActionType action_type)
|
||||||
{
|
{
|
||||||
@@ -2052,19 +2113,19 @@ do_power_action_type (GsdPowerManager *manager,
|
@@ -2057,19 +2118,19 @@ do_power_action_type (GsdPowerManager *manager,
|
||||||
|
|
||||||
switch (action_type) {
|
switch (action_type) {
|
||||||
case GSD_POWER_ACTION_SUSPEND:
|
case GSD_POWER_ACTION_SUSPEND:
|
||||||
@ -698,7 +700,7 @@ index 0e06495..7c120c4 100644
|
|||||||
break;
|
break;
|
||||||
case GSD_POWER_ACTION_BLANK:
|
case GSD_POWER_ACTION_BLANK:
|
||||||
ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
|
ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
|
||||||
@@ -2136,85 +2197,20 @@ upower_kbd_toggle (GsdPowerManager *manager,
|
@@ -2141,85 +2202,20 @@ upower_kbd_toggle (GsdPowerManager *manager,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -739,10 +741,9 @@ index 0e06495..7c120c4 100644
|
|||||||
- kill_lid_close_safety_timer (manager);
|
- kill_lid_close_safety_timer (manager);
|
||||||
-}
|
-}
|
||||||
-
|
-
|
||||||
static gboolean
|
-static gboolean
|
||||||
-is_on (GnomeRROutput *output)
|
-is_on (GnomeRROutput *output)
|
||||||
+inhibit_lid_switch_timer_cb (GsdPowerManager *manager)
|
-{
|
||||||
{
|
|
||||||
- GnomeRRCrtc *crtc;
|
- GnomeRRCrtc *crtc;
|
||||||
-
|
-
|
||||||
- crtc = gnome_rr_output_get_crtc (output);
|
- crtc = gnome_rr_output_get_crtc (output);
|
||||||
@ -751,9 +752,10 @@ index 0e06495..7c120c4 100644
|
|||||||
- return gnome_rr_crtc_get_current_mode (crtc) != NULL;
|
- return gnome_rr_crtc_get_current_mode (crtc) != NULL;
|
||||||
-}
|
-}
|
||||||
-
|
-
|
||||||
-static gboolean
|
static gboolean
|
||||||
-non_laptop_outputs_are_all_off (GnomeRRScreen *screen)
|
-non_laptop_outputs_are_all_off (GnomeRRScreen *screen)
|
||||||
-{
|
+inhibit_lid_switch_timer_cb (GsdPowerManager *manager)
|
||||||
|
{
|
||||||
- GnomeRROutput **outputs;
|
- GnomeRROutput **outputs;
|
||||||
- int i;
|
- int i;
|
||||||
-
|
-
|
||||||
@ -794,7 +796,7 @@ index 0e06495..7c120c4 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Sets up a timer to be triggered some seconds after closing the laptop lid
|
/* Sets up a timer to be triggered some seconds after closing the laptop lid
|
||||||
@@ -2222,82 +2218,73 @@ lid_close_safety_timer_cb (GsdPowerManager *manager)
|
@@ -2227,23 +2223,28 @@ lid_close_safety_timer_cb (GsdPowerManager *manager)
|
||||||
* again in the timeout handler to see if we can suspend then.
|
* again in the timeout handler to see if we can suspend then.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
@ -802,20 +804,22 @@ index 0e06495..7c120c4 100644
|
|||||||
+setup_inhibit_lid_switch_timer (GsdPowerManager *manager)
|
+setup_inhibit_lid_switch_timer (GsdPowerManager *manager)
|
||||||
{
|
{
|
||||||
- if (manager->priv->lid_close_safety_timer_id != 0)
|
- if (manager->priv->lid_close_safety_timer_id != 0)
|
||||||
+ if (manager->priv->inhibit_lid_switch_timer_id != 0) {
|
- return;
|
||||||
+ g_debug ("lid close safety timer already set up");
|
-
|
||||||
return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ g_debug ("setting up lid close safety timer");
|
|
||||||
|
|
||||||
- manager->priv->lid_close_safety_timer_id = g_timeout_add_seconds (GSD_POWER_MANAGER_LID_CLOSE_SAFETY_TIMEOUT,
|
- manager->priv->lid_close_safety_timer_id = g_timeout_add_seconds (GSD_POWER_MANAGER_LID_CLOSE_SAFETY_TIMEOUT,
|
||||||
- (GSourceFunc) lid_close_safety_timer_cb,
|
- (GSourceFunc) lid_close_safety_timer_cb,
|
||||||
+ manager->priv->inhibit_lid_switch_timer_id = g_timeout_add_seconds (GSD_POWER_MANAGER_LID_CLOSE_SAFETY_TIMEOUT,
|
- manager);
|
||||||
+ (GSourceFunc) inhibit_lid_switch_timer_cb,
|
|
||||||
manager);
|
|
||||||
- g_source_set_name_by_id (manager->priv->lid_close_safety_timer_id, "[GsdPowerManager] lid close safety timer");
|
- g_source_set_name_by_id (manager->priv->lid_close_safety_timer_id, "[GsdPowerManager] lid close safety timer");
|
||||||
+ g_source_set_name_by_id (manager->priv->inhibit_lid_switch_timer_id, "[GsdPowerManager] lid close safety timer");
|
+ if (manager->priv->inhibit_lid_switch_timer_id != 0) {
|
||||||
|
+ g_debug ("lid close safety timer already set up");
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ g_debug ("setting up lid close safety timer");
|
||||||
|
+ manager->priv->inhibit_lid_switch_timer_id = g_timeout_add_seconds (GSD_POWER_MANAGER_LID_CLOSE_SAFETY_TIMEOUT,
|
||||||
|
+ (GSourceFunc) inhibit_lid_switch_timer_cb,
|
||||||
|
+ manager);
|
||||||
|
+ g_source_set_name_by_id (manager->priv->inhibit_lid_switch_timer_id, "[GsdPowerManager] lid close safety timer");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -825,22 +829,20 @@ index 0e06495..7c120c4 100644
|
|||||||
- if (manager->priv->lid_close_safety_timer_id != 0) {
|
- if (manager->priv->lid_close_safety_timer_id != 0) {
|
||||||
- g_source_remove (manager->priv->lid_close_safety_timer_id);
|
- g_source_remove (manager->priv->lid_close_safety_timer_id);
|
||||||
- manager->priv->lid_close_safety_timer_id = 0;
|
- manager->priv->lid_close_safety_timer_id = 0;
|
||||||
+ if (manager->priv->inhibit_lid_switch_timer_id != 0) {
|
+ if (manager->priv->inhibit_lid_switch_timer_id != 0) {
|
||||||
+ g_debug ("restarting lid close safety timer");
|
+ g_debug ("restarting lid close safety timer");
|
||||||
+ g_source_remove (manager->priv->inhibit_lid_switch_timer_id);
|
+ g_source_remove (manager->priv->inhibit_lid_switch_timer_id);
|
||||||
+ manager->priv->inhibit_lid_switch_timer_id = 0;
|
+ manager->priv->inhibit_lid_switch_timer_id = 0;
|
||||||
+ setup_inhibit_lid_switch_timer (manager);
|
+ setup_inhibit_lid_switch_timer (manager);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
@@ -2252,57 +2253,41 @@ suspend_with_lid_closed (GsdPowerManager *manager)
|
||||||
-suspend_with_lid_closed (GsdPowerManager *manager)
|
|
||||||
+do_lid_open_action (GsdPowerManager *manager)
|
|
||||||
{
|
{
|
||||||
gboolean ret;
|
gboolean ret;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
- GsdPowerActionType action_type;
|
- GsdPowerActionType action_type;
|
||||||
|
-
|
||||||
- /* maybe lock the screen if the lid is closed */
|
- /* maybe lock the screen if the lid is closed */
|
||||||
- lock_screensaver (manager);
|
- lock_screensaver (manager);
|
||||||
-
|
-
|
||||||
@ -879,8 +881,7 @@ index 0e06495..7c120c4 100644
|
|||||||
- g_warning ("failed to turn the panel off after lid close: %s",
|
- g_warning ("failed to turn the panel off after lid close: %s",
|
||||||
+ g_warning ("failed to turn the panel on after lid open: %s",
|
+ g_warning ("failed to turn the panel on after lid open: %s",
|
||||||
error->message);
|
error->message);
|
||||||
- g_error_free (error);
|
g_clear_error (&error);
|
||||||
+ g_clear_error (&error);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- /* only toggle keyboard if present and not already toggled */
|
- /* only toggle keyboard if present and not already toggled */
|
||||||
@ -910,7 +911,7 @@ index 0e06495..7c120c4 100644
|
|||||||
/* play a sound, using sounds from the naming spec */
|
/* play a sound, using sounds from the naming spec */
|
||||||
ca_context_play (manager->priv->canberra_context, 0,
|
ca_context_play (manager->priv->canberra_context, 0,
|
||||||
CA_PROP_EVENT_ID, "lid-close",
|
CA_PROP_EVENT_ID, "lid-close",
|
||||||
@@ -2305,21 +2292,22 @@ do_lid_closed_action (GsdPowerManager *manager)
|
@@ -2310,21 +2295,22 @@ do_lid_closed_action (GsdPowerManager *manager)
|
||||||
CA_PROP_EVENT_DESCRIPTION, _("Lid has been closed"),
|
CA_PROP_EVENT_DESCRIPTION, _("Lid has been closed"),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
@ -943,7 +944,7 @@ index 0e06495..7c120c4 100644
|
|||||||
static void
|
static void
|
||||||
up_client_changed_cb (UpClient *client, GsdPowerManager *manager)
|
up_client_changed_cb (UpClient *client, GsdPowerManager *manager)
|
||||||
{
|
{
|
||||||
@@ -2339,6 +2327,7 @@ up_client_changed_cb (UpClient *client, GsdPowerManager *manager)
|
@@ -2344,6 +2330,7 @@ up_client_changed_cb (UpClient *client, GsdPowerManager *manager)
|
||||||
if (manager->priv->lid_is_closed == tmp)
|
if (manager->priv->lid_is_closed == tmp)
|
||||||
return;
|
return;
|
||||||
manager->priv->lid_is_closed = tmp;
|
manager->priv->lid_is_closed = tmp;
|
||||||
@ -951,7 +952,7 @@ index 0e06495..7c120c4 100644
|
|||||||
|
|
||||||
/* fake a keypress */
|
/* fake a keypress */
|
||||||
if (tmp)
|
if (tmp)
|
||||||
@@ -3290,30 +3279,6 @@ gsd_power_manager_class_init (GsdPowerManagerClass *klass)
|
@@ -3302,30 +3289,6 @@ gsd_power_manager_class_init (GsdPowerManagerClass *klass)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -982,7 +983,7 @@ index 0e06495..7c120c4 100644
|
|||||||
idle_dbus_signal_cb (GDBusProxy *proxy,
|
idle_dbus_signal_cb (GDBusProxy *proxy,
|
||||||
const gchar *sender_name,
|
const gchar *sender_name,
|
||||||
const gchar *signal_name,
|
const gchar *signal_name,
|
||||||
@@ -3465,75 +3430,38 @@ out:
|
@@ -3477,75 +3440,38 @@ out:
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1016,7 +1017,7 @@ index 0e06495..7c120c4 100644
|
|||||||
- NULL,
|
- NULL,
|
||||||
- sleep_cb_screensaver_proxy_ready_cb,
|
- sleep_cb_screensaver_proxy_ready_cb,
|
||||||
- manager);
|
- manager);
|
||||||
}
|
- }
|
||||||
-}
|
-}
|
||||||
-
|
-
|
||||||
-static void
|
-static void
|
||||||
@ -1043,13 +1044,13 @@ index 0e06495..7c120c4 100644
|
|||||||
- NULL,
|
- NULL,
|
||||||
- G_DBUS_CALL_FLAGS_NONE,
|
- G_DBUS_CALL_FLAGS_NONE,
|
||||||
- -1, NULL, NULL, NULL);
|
- -1, NULL, NULL, NULL);
|
||||||
- }
|
}
|
||||||
-
|
|
||||||
- /* close existing notifications on resume, the system power
|
- /* close existing notifications on resume, the system power
|
||||||
- * state is probably different now */
|
- * state is probably different now */
|
||||||
- notify_close_if_showing (manager->priv->notification_low);
|
- notify_close_if_showing (manager->priv->notification_low);
|
||||||
- notify_close_if_showing (manager->priv->notification_discharging);
|
- notify_close_if_showing (manager->priv->notification_discharging);
|
||||||
|
-
|
||||||
- /* ensure we turn the panel back on after resume */
|
- /* ensure we turn the panel back on after resume */
|
||||||
- ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
|
- ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
|
||||||
- GNOME_RR_DPMS_ON,
|
- GNOME_RR_DPMS_ON,
|
||||||
@ -1082,8 +1083,8 @@ index 0e06495..7c120c4 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -3621,6 +3549,287 @@ engine_session_active_changed_cb (GnomeSettingsSession *session,
|
@@ -3755,6 +3681,287 @@ out:
|
||||||
idle_set_mode (manager, GSD_POWER_IDLE_MODE_NORMAL);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
+static void
|
+static void
|
||||||
@ -1370,7 +1371,7 @@ index 0e06495..7c120c4 100644
|
|||||||
gboolean
|
gboolean
|
||||||
gsd_power_manager_start (GsdPowerManager *manager,
|
gsd_power_manager_start (GsdPowerManager *manager,
|
||||||
GError **error)
|
GError **error)
|
||||||
@@ -3630,6 +3839,25 @@ gsd_power_manager_start (GsdPowerManager *manager,
|
@@ -3764,6 +3971,25 @@ gsd_power_manager_start (GsdPowerManager *manager,
|
||||||
g_debug ("Starting power manager");
|
g_debug ("Starting power manager");
|
||||||
gnome_settings_profile_start (NULL);
|
gnome_settings_profile_start (NULL);
|
||||||
|
|
||||||
@ -1396,7 +1397,7 @@ index 0e06495..7c120c4 100644
|
|||||||
/* track the active session */
|
/* track the active session */
|
||||||
manager->priv->session = gnome_settings_session_new ();
|
manager->priv->session = gnome_settings_session_new ();
|
||||||
g_signal_connect (manager->priv->session, "notify::state",
|
g_signal_connect (manager->priv->session, "notify::state",
|
||||||
@@ -3644,10 +3872,6 @@ gsd_power_manager_start (GsdPowerManager *manager,
|
@@ -3778,10 +4004,6 @@ gsd_power_manager_start (GsdPowerManager *manager,
|
||||||
G_CALLBACK (engine_settings_key_changed_cb), manager);
|
G_CALLBACK (engine_settings_key_changed_cb), manager);
|
||||||
manager->priv->settings_screensaver = g_settings_new ("org.gnome.desktop.screensaver");
|
manager->priv->settings_screensaver = g_settings_new ("org.gnome.desktop.screensaver");
|
||||||
manager->priv->up_client = up_client_new ();
|
manager->priv->up_client = up_client_new ();
|
||||||
@ -1407,7 +1408,7 @@ index 0e06495..7c120c4 100644
|
|||||||
manager->priv->lid_is_closed = up_client_get_lid_is_closed (manager->priv->up_client);
|
manager->priv->lid_is_closed = up_client_get_lid_is_closed (manager->priv->up_client);
|
||||||
g_signal_connect (manager->priv->up_client, "device-added",
|
g_signal_connect (manager->priv->up_client, "device-added",
|
||||||
G_CALLBACK (engine_device_added_cb), manager);
|
G_CALLBACK (engine_device_added_cb), manager);
|
||||||
@@ -3761,6 +3985,9 @@ gsd_power_manager_start (GsdPowerManager *manager,
|
@@ -3895,6 +4117,9 @@ gsd_power_manager_start (GsdPowerManager *manager,
|
||||||
manager->priv->x11_screen = gnome_rr_screen_new (gdk_screen_get_default (), error);
|
manager->priv->x11_screen = gnome_rr_screen_new (gdk_screen_get_default (), error);
|
||||||
if (manager->priv->x11_screen == NULL)
|
if (manager->priv->x11_screen == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -1417,7 +1418,7 @@ index 0e06495..7c120c4 100644
|
|||||||
|
|
||||||
/* ensure the default dpms timeouts are cleared */
|
/* ensure the default dpms timeouts are cleared */
|
||||||
ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
|
ret = gnome_rr_screen_set_dpms_mode (manager->priv->x11_screen,
|
||||||
@@ -3787,6 +4014,11 @@ gsd_power_manager_stop (GsdPowerManager *manager)
|
@@ -3927,6 +4152,11 @@ gsd_power_manager_stop (GsdPowerManager *manager)
|
||||||
{
|
{
|
||||||
g_debug ("Stopping power manager");
|
g_debug ("Stopping power manager");
|
||||||
|
|
||||||
@ -1429,7 +1430,7 @@ index 0e06495..7c120c4 100644
|
|||||||
if (manager->priv->bus_cancellable != NULL) {
|
if (manager->priv->bus_cancellable != NULL) {
|
||||||
g_cancellable_cancel (manager->priv->bus_cancellable);
|
g_cancellable_cancel (manager->priv->bus_cancellable);
|
||||||
g_object_unref (manager->priv->bus_cancellable);
|
g_object_unref (manager->priv->bus_cancellable);
|
||||||
@@ -3798,8 +4030,6 @@ gsd_power_manager_stop (GsdPowerManager *manager)
|
@@ -3938,8 +4168,6 @@ gsd_power_manager_stop (GsdPowerManager *manager)
|
||||||
manager->priv->introspection_data = NULL;
|
manager->priv->introspection_data = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1438,7 +1439,7 @@ index 0e06495..7c120c4 100644
|
|||||||
g_signal_handlers_disconnect_by_data (manager->priv->up_client, manager);
|
g_signal_handlers_disconnect_by_data (manager->priv->up_client, manager);
|
||||||
|
|
||||||
g_clear_object (&manager->priv->connection);
|
g_clear_object (&manager->priv->connection);
|
||||||
@@ -3807,6 +4037,19 @@ gsd_power_manager_stop (GsdPowerManager *manager)
|
@@ -3947,6 +4175,19 @@ gsd_power_manager_stop (GsdPowerManager *manager)
|
||||||
g_clear_object (&manager->priv->settings);
|
g_clear_object (&manager->priv->settings);
|
||||||
g_clear_object (&manager->priv->settings_screensaver);
|
g_clear_object (&manager->priv->settings_screensaver);
|
||||||
g_clear_object (&manager->priv->up_client);
|
g_clear_object (&manager->priv->up_client);
|
||||||
@ -1458,7 +1459,7 @@ index 0e06495..7c120c4 100644
|
|||||||
g_clear_object (&manager->priv->x11_screen);
|
g_clear_object (&manager->priv->x11_screen);
|
||||||
|
|
||||||
g_ptr_array_unref (manager->priv->devices_array);
|
g_ptr_array_unref (manager->priv->devices_array);
|
||||||
@@ -3835,6 +4078,8 @@ static void
|
@@ -3980,6 +4221,8 @@ static void
|
||||||
gsd_power_manager_init (GsdPowerManager *manager)
|
gsd_power_manager_init (GsdPowerManager *manager)
|
||||||
{
|
{
|
||||||
manager->priv = GSD_POWER_MANAGER_GET_PRIVATE (manager);
|
manager->priv = GSD_POWER_MANAGER_GET_PRIVATE (manager);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From d86992c2ea731194dbf9bb288fe1d5d78114f478 Mon Sep 17 00:00:00 2001
|
From b33a8940f58560ccdbc67e7b8127f96079c4dc4f Mon Sep 17 00:00:00 2001
|
||||||
From: Olivier Fourdan <ofourdan@redhat.com>
|
From: Olivier Fourdan <ofourdan@redhat.com>
|
||||||
Date: Tue, 3 Jul 2012 09:39:42 +0200
|
Date: Tue, 3 Jul 2012 09:39:42 +0200
|
||||||
Subject: [PATCH] wacom: implement OSD help window
|
Subject: [PATCH] wacom: implement OSD help window
|
||||||
@ -25,7 +25,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=679062
|
|||||||
create mode 100644 plugins/wacom/test-osd-window.c
|
create mode 100644 plugins/wacom/test-osd-window.c
|
||||||
|
|
||||||
diff --git a/data/gsd-enums.h b/data/gsd-enums.h
|
diff --git a/data/gsd-enums.h b/data/gsd-enums.h
|
||||||
index 6c4edd4..6b153fd 100644
|
index 49e07db..1aff185 100644
|
||||||
--- a/data/gsd-enums.h
|
--- a/data/gsd-enums.h
|
||||||
+++ b/data/gsd-enums.h
|
+++ b/data/gsd-enums.h
|
||||||
@@ -94,7 +94,8 @@ typedef enum
|
@@ -94,7 +94,8 @@ typedef enum
|
||||||
@ -106,7 +106,7 @@ index 662388b..7a5dab7 100644
|
|||||||
|
|
||||||
plugin_DATA = $(plugin_in_files:.gnome-settings-plugin.in=.gnome-settings-plugin)
|
plugin_DATA = $(plugin_in_files:.gnome-settings-plugin.in=.gnome-settings-plugin)
|
||||||
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
|
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
|
||||||
index 2f52d2a..22ff967 100644
|
index 7b9a3e1..9fdf34f 100644
|
||||||
--- a/plugins/wacom/gsd-wacom-device.c
|
--- a/plugins/wacom/gsd-wacom-device.c
|
||||||
+++ b/plugins/wacom/gsd-wacom-device.c
|
+++ b/plugins/wacom/gsd-wacom-device.c
|
||||||
@@ -255,6 +255,7 @@ gsd_wacom_tablet_button_new (const char *name,
|
@@ -255,6 +255,7 @@ gsd_wacom_tablet_button_new (const char *name,
|
||||||
@ -160,7 +160,7 @@ index 2f52d2a..22ff967 100644
|
|||||||
current_idx++;
|
current_idx++;
|
||||||
|
|
||||||
num_modes = GPOINTER_TO_INT (g_hash_table_lookup (device->priv->num_modes, GINT_TO_POINTER(group_id)));
|
num_modes = GPOINTER_TO_INT (g_hash_table_lookup (device->priv->num_modes, GINT_TO_POINTER(group_id)));
|
||||||
@@ -1011,7 +1027,7 @@ gsd_wacom_device_add_ring_modes (WacomDevice *wacom_device,
|
@@ -1012,7 +1028,7 @@ gsd_wacom_device_add_ring_modes (WacomDevice *wacom_device,
|
||||||
for (i = 1; i <= num_modes; i++) {
|
for (i = 1; i <= num_modes; i++) {
|
||||||
name = g_strdup_printf (_("Left Ring Mode #%d"), i);
|
name = g_strdup_printf (_("Left Ring Mode #%d"), i);
|
||||||
id = g_strdup_printf ("left-ring-mode-%d", i);
|
id = g_strdup_printf ("left-ring-mode-%d", i);
|
||||||
@ -169,7 +169,7 @@ index 2f52d2a..22ff967 100644
|
|||||||
g_free (name);
|
g_free (name);
|
||||||
g_free (id);
|
g_free (id);
|
||||||
}
|
}
|
||||||
@@ -1020,7 +1036,7 @@ gsd_wacom_device_add_ring_modes (WacomDevice *wacom_device,
|
@@ -1022,7 +1038,7 @@ gsd_wacom_device_add_ring_modes (WacomDevice *wacom_device,
|
||||||
for (i = 1; i <= num_modes; i++) {
|
for (i = 1; i <= num_modes; i++) {
|
||||||
name = g_strdup_printf (_("Right Ring Mode #%d"), i);
|
name = g_strdup_printf (_("Right Ring Mode #%d"), i);
|
||||||
id = g_strdup_printf ("right-ring-mode-%d", i);
|
id = g_strdup_printf ("right-ring-mode-%d", i);
|
||||||
@ -178,7 +178,7 @@ index 2f52d2a..22ff967 100644
|
|||||||
g_free (name);
|
g_free (name);
|
||||||
g_free (id);
|
g_free (id);
|
||||||
}
|
}
|
||||||
@@ -1050,7 +1066,7 @@ gsd_wacom_device_add_strip_modes (WacomDevice *wacom_device,
|
@@ -1053,7 +1069,7 @@ gsd_wacom_device_add_strip_modes (WacomDevice *wacom_device,
|
||||||
for (i = 1; i <= num_modes; i++) {
|
for (i = 1; i <= num_modes; i++) {
|
||||||
name = g_strdup_printf (_("Left Touchstrip Mode #%d"), i);
|
name = g_strdup_printf (_("Left Touchstrip Mode #%d"), i);
|
||||||
id = g_strdup_printf ("left-strip-mode-%d", i);
|
id = g_strdup_printf ("left-strip-mode-%d", i);
|
||||||
@ -187,7 +187,7 @@ index 2f52d2a..22ff967 100644
|
|||||||
g_free (name);
|
g_free (name);
|
||||||
g_free (id);
|
g_free (id);
|
||||||
}
|
}
|
||||||
@@ -1059,7 +1075,7 @@ gsd_wacom_device_add_strip_modes (WacomDevice *wacom_device,
|
@@ -1063,7 +1079,7 @@ gsd_wacom_device_add_strip_modes (WacomDevice *wacom_device,
|
||||||
for (i = 1; i <= num_modes; i++) {
|
for (i = 1; i <= num_modes; i++) {
|
||||||
name = g_strdup_printf (_("Right Touchstrip Mode #%d"), i);
|
name = g_strdup_printf (_("Right Touchstrip Mode #%d"), i);
|
||||||
id = g_strdup_printf ("right-strip-mode-%d", i);
|
id = g_strdup_printf ("right-strip-mode-%d", i);
|
||||||
@ -196,7 +196,7 @@ index 2f52d2a..22ff967 100644
|
|||||||
g_free (name);
|
g_free (name);
|
||||||
g_free (id);
|
g_free (id);
|
||||||
}
|
}
|
||||||
@@ -1089,6 +1105,23 @@ gsd_wacom_device_modeswitch_name (WacomButtonFlags flags,
|
@@ -1093,6 +1109,23 @@ gsd_wacom_device_modeswitch_name (WacomButtonFlags flags,
|
||||||
return g_strdup_printf (_("Mode Switch #%d"), button_num);
|
return g_strdup_printf (_("Mode Switch #%d"), button_num);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ index 2f52d2a..22ff967 100644
|
|||||||
static GList *
|
static GList *
|
||||||
gsd_wacom_device_add_buttons_dir (WacomDevice *wacom_device,
|
gsd_wacom_device_add_buttons_dir (WacomDevice *wacom_device,
|
||||||
const char *settings_path,
|
const char *settings_path,
|
||||||
@@ -1115,7 +1148,7 @@ gsd_wacom_device_add_buttons_dir (WacomDevice *wacom_device,
|
@@ -1119,7 +1152,7 @@ gsd_wacom_device_add_buttons_dir (WacomDevice *wacom_device,
|
||||||
|
|
||||||
name = g_strdup_printf (button_str, button_num++);
|
name = g_strdup_printf (button_str, button_num++);
|
||||||
id = g_strdup_printf ("%s%c", button_str_id, i);
|
id = g_strdup_printf ("%s%c", button_str_id, i);
|
||||||
@ -229,7 +229,7 @@ index 2f52d2a..22ff967 100644
|
|||||||
g_free (name);
|
g_free (name);
|
||||||
g_free (id);
|
g_free (id);
|
||||||
}
|
}
|
||||||
@@ -1134,7 +1167,7 @@ gsd_wacom_device_add_buttons_dir (WacomDevice *wacom_device,
|
@@ -1138,7 +1171,7 @@ gsd_wacom_device_add_buttons_dir (WacomDevice *wacom_device,
|
||||||
|
|
||||||
name = gsd_wacom_device_modeswitch_name (flags, button_num++);
|
name = gsd_wacom_device_modeswitch_name (flags, button_num++);
|
||||||
id = g_strdup_printf ("%s%c", button_str_id, i);
|
id = g_strdup_printf ("%s%c", button_str_id, i);
|
||||||
@ -237,7 +237,7 @@ index 2f52d2a..22ff967 100644
|
|||||||
+ l = g_list_append (l, gsd_wacom_tablet_button_new (name, id, settings_path, WACOM_TABLET_BUTTON_TYPE_HARDCODED, gsd_wacom_device_button_pos (flags), flags_to_group (flags), -1));
|
+ l = g_list_append (l, gsd_wacom_tablet_button_new (name, id, settings_path, WACOM_TABLET_BUTTON_TYPE_HARDCODED, gsd_wacom_device_button_pos (flags), flags_to_group (flags), -1));
|
||||||
g_free (name);
|
g_free (name);
|
||||||
g_free (id);
|
g_free (id);
|
||||||
|
}
|
||||||
diff --git a/plugins/wacom/gsd-wacom-device.h b/plugins/wacom/gsd-wacom-device.h
|
diff --git a/plugins/wacom/gsd-wacom-device.h b/plugins/wacom/gsd-wacom-device.h
|
||||||
index 24e6e06..b4ad07f 100644
|
index 24e6e06..b4ad07f 100644
|
||||||
--- a/plugins/wacom/gsd-wacom-device.h
|
--- a/plugins/wacom/gsd-wacom-device.h
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
diff -up gnome-settings-daemon-3.2.1/plugins/media-keys/gsd-media-keys-manager.c.calculator gnome-settings-daemon-3.2.1/plugins/media-keys/gsd-media-keys-manager.c
|
|
||||||
--- gnome-settings-daemon-3.2.1/plugins/media-keys/gsd-media-keys-manager.c.calculator 2011-10-24 18:37:57.154770995 -0400
|
|
||||||
+++ gnome-settings-daemon-3.2.1/plugins/media-keys/gsd-media-keys-manager.c 2011-10-24 18:38:12.044771972 -0400
|
|
||||||
@@ -1496,7 +1496,7 @@ do_action (GsdMediaKeysManager *manager,
|
|
||||||
do_media_action (manager, timestamp);
|
|
||||||
break;
|
|
||||||
case CALCULATOR_KEY:
|
|
||||||
- do_execute_desktop (manager, "gcalctool.desktop", timestamp);
|
|
||||||
+ do_execute_desktop (manager, "gnome-gcalctool.desktop", timestamp);
|
|
||||||
break;
|
|
||||||
case PLAY_KEY:
|
|
||||||
return do_multimedia_player_action (manager, "Play");
|
|
Loading…
Reference in New Issue
Block a user