[gnome-settings-daemon/docking-stations] Remove the XRANDR.Internal paraphernalia from the power plugin
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/docking-stations] Remove the XRANDR.Internal paraphernalia from the power plugin
- Date: Wed, 7 Dec 2011 19:11:55 +0000 (UTC)
commit e781c6e955af4b75db68d0164e5f42064ff410e6
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Dec 7 11:30:22 2011 -0600
Remove the XRANDR.Internal paraphernalia from the power plugin
Signed-off-by: Federico Mena Quintero <federico gnome org>
plugins/power/gsd-power-manager.c | 52 +------------------------------------
1 files changed, 1 insertions(+), 51 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index fa6f272..9629079 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -71,10 +71,6 @@
#define GS_DBUS_PATH "/"
#define GS_DBUS_INTERFACE "org.gnome.ScreenSaver"
-#define XRANDR_DBUS_NAME GSD_DBUS_SERVICE
-#define XRANDR_DBUS_PATH GSD_DBUS_PATH "/XRANDR"
-#define XRANDR_INTERNAL_DBUS_INTERFACE "org.gnome.SettingsDaemon.XRANDR.Internal"
-
#define GSD_POWER_MANAGER_NOTIFY_TIMEOUT_NEVER 0 /* ms */
#define GSD_POWER_MANAGER_NOTIFY_TIMEOUT_SHORT 10 * 1000 /* ms */
#define GSD_POWER_MANAGER_NOTIFY_TIMEOUT_LONG 30 * 1000 /* ms */
@@ -162,7 +158,6 @@ struct GsdPowerManagerPrivate
GCancellable *bus_cancellable;
GDBusProxy *upower_proxy;
GDBusProxy *upower_kdb_proxy;
- GDBusProxy *xrandr_internal_proxy;
gint kbd_brightness_now;
gint kbd_brightness_max;
gint kbd_brightness_old;
@@ -2210,18 +2205,6 @@ up_client_changed_cb (UpClient *client, GsdPowerManager *manager)
return;
manager->priv->lid_is_closed = tmp;
- /* tell the RANDR plugin to update its state; the display on the lid needs to be turned off */
- if (manager->priv->xrandr_internal_proxy != NULL) {
- g_dbus_proxy_call (manager->priv->xrandr_internal_proxy,
- "LidStateChanged",
- NULL, /* parameters */
- G_DBUS_CALL_FLAGS_NONE, /* flags */
- -1, /* timeout */
- NULL, /* cancellable */
- NULL, /* callback */
- NULL); /* user_data */
- }
-
/* fake a keypress */
if (tmp)
do_lid_closed_action (manager);
@@ -3222,23 +3205,6 @@ out:
}
static void
-xrandr_proxy_ready_cb (GObject *source_object,
- GAsyncResult *res,
- gpointer user_data)
-{
- GsdPowerManager *manager = GSD_POWER_MANAGER (user_data);
- GError *error;
-
- error = NULL;
- manager->priv->xrandr_internal_proxy = g_dbus_proxy_new_for_bus_finish (res, &error);
- if (manager->priv->xrandr_internal_proxy == NULL) {
- g_warning ("Could not connect to the XRANDR.Internal interface: %s", error->message);
- g_error_free (error);
- return;
- }
-}
-
-static void
upower_notify_sleep_cb (UpClient *client,
UpSleepKind sleep_kind,
GsdPowerManager *manager)
@@ -3420,17 +3386,6 @@ gsd_power_manager_start (GsdPowerManager *manager,
screensaver_proxy_ready_cb,
manager);
- /* connect to the xrandr plugin */
- g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
- G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
- NULL,
- XRANDR_DBUS_NAME,
- XRANDR_DBUS_PATH,
- XRANDR_INTERNAL_DBUS_INTERFACE,
- NULL,
- xrandr_proxy_ready_cb,
- manager);
-
/* connect to the session */
g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
@@ -3597,14 +3552,9 @@ gsd_power_manager_stop (GsdPowerManager *manager)
manager->priv->session_presence_proxy = NULL;
}
- if (manager->priv->xrandr_internal_proxy != NULL) {
- g_object_unref (manager->priv->xrandr_internal_proxy);
- manager->priv->xrandr_internal_proxy = NULL;
- }
-
if (manager->priv->critical_alert_timeout_id > 0) {
g_source_remove (manager->priv->critical_alert_timeout_id);
- manager->priv->critical_alert_timeout_id = NULL;
+ manager->priv->critical_alert_timeout_id = 0;
}
gpm_idletime_alarm_remove (manager->priv->idletime,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]