diff options
Diffstat (limited to 'src/gpm-manager.c')
-rw-r--r-- | src/gpm-manager.c | 157 |
1 files changed, 57 insertions, 100 deletions
diff --git a/src/gpm-manager.c b/src/gpm-manager.c index a84f338..6248b97 100644 --- a/src/gpm-manager.c +++ b/src/gpm-manager.c @@ -38,7 +38,6 @@ #include <gtk/gtk.h> #include <dbus/dbus-glib.h> #include <dbus/dbus-glib-lowlevel.h> -#include <mateconf/mateconf-client.h> #include <canberra-gtk.h> #include <libupower-glib/upower.h> #include <libmatenotify/notify.h> @@ -76,7 +75,7 @@ static void gpm_manager_finalize (GObject *object); struct GpmManagerPrivate { GpmButton *button; - MateConfClient *conf; + GSettings *settings; GpmDisks *disks; GpmDpms *dpms; GpmIdle *idle; @@ -198,7 +197,7 @@ gpm_manager_play_loop_start (GpmManager *manager, GpmManagerSound action, gboole gint retval; ca_context *context; - ret = mateconf_client_get_bool (manager->priv->conf, GPM_CONF_UI_ENABLE_SOUND, NULL); + ret = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_ENABLE_SOUND); if (!ret && !force) { egg_debug ("ignoring sound due to policy"); return FALSE; @@ -259,7 +258,7 @@ gpm_manager_play (GpmManager *manager, GpmManagerSound action, gboolean force) gint retval; ca_context *context; - ret = mateconf_client_get_bool (manager->priv->conf, GPM_CONF_UI_ENABLE_SOUND, NULL); + ret = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_ENABLE_SOUND); if (!ret && !force) { egg_debug ("ignoring sound due to policy"); return FALSE; @@ -354,11 +353,11 @@ gpm_manager_sync_policy_sleep (GpmManager *manager) guint sleep_computer; if (!manager->priv->on_battery) { - sleep_computer = mateconf_client_get_int (manager->priv->conf, GPM_CONF_TIMEOUT_SLEEP_COMPUTER_AC, NULL); - sleep_display = mateconf_client_get_int (manager->priv->conf, GPM_CONF_TIMEOUT_SLEEP_DISPLAY_AC, NULL); + sleep_computer = g_settings_get_int (manager->priv->settings, GPM_SETTINGS_SLEEP_COMPUTER_AC); + sleep_display = g_settings_get_int (manager->priv->settings, GPM_SETTINGS_SLEEP_DISPLAY_AC); } else { - sleep_computer = mateconf_client_get_int (manager->priv->conf, GPM_CONF_TIMEOUT_SLEEP_COMPUTER_BATT, NULL); - sleep_display = mateconf_client_get_int (manager->priv->conf, GPM_CONF_TIMEOUT_SLEEP_DISPLAY_BATT, NULL); + sleep_computer = g_settings_get_int (manager->priv->settings, GPM_SETTINGS_SLEEP_COMPUTER_BATT); + sleep_display = g_settings_get_int (manager->priv->settings, GPM_SETTINGS_SLEEP_DISPLAY_BATT); } /* set the new sleep (inactivity) value */ @@ -385,7 +384,7 @@ gpm_manager_blank_screen (GpmManager *manager, GError **noerror) GError *error = NULL; do_lock = gpm_control_get_lock_policy (manager->priv->control, - GPM_CONF_LOCK_ON_BLANK_SCREEN); + GPM_SETTINGS_LOCK_ON_BLANK_SCREEN); if (do_lock) { if (!gpm_screensaver_lock (manager->priv->screensaver)) egg_debug ("Could not lock screen via mate-screensaver"); @@ -421,7 +420,7 @@ gpm_manager_unblank_screen (GpmManager *manager, GError **noerror) ret = FALSE; } - do_lock = gpm_control_get_lock_policy (manager->priv->control, GPM_CONF_LOCK_ON_BLANK_SCREEN); + do_lock = gpm_control_get_lock_policy (manager->priv->control, GPM_SETTINGS_LOCK_ON_BLANK_SCREEN); if (do_lock) gpm_screensaver_poke (manager->priv->screensaver); return ret; @@ -532,7 +531,7 @@ gpm_manager_sleep_failure_response_cb (GtkDialog *dialog, gint response_id, GpmM /* user clicked the help button */ if (response_id == GTK_RESPONSE_HELP) { - uri = mateconf_client_get_string (manager->priv->conf, GPM_CONF_NOTIFY_SLEEP_FAILED_URI, NULL); + uri = g_settings_get_string (manager->priv->settings, GPM_SETTINGS_NOTIFY_SLEEP_FAILED_URI); screen = gdk_screen_get_default(); ret = gtk_show_uri (screen, uri, gtk_get_current_event_time (), &error); if (!ret) { @@ -560,13 +559,13 @@ gpm_manager_sleep_failure (GpmManager *manager, gboolean is_suspend, const gchar const gchar *icon; GtkWidget *dialog; - /* only show this if specified in mateconf */ - show_sleep_failed = mateconf_client_get_bool (manager->priv->conf, GPM_CONF_NOTIFY_SLEEP_FAILED, NULL); + /* only show this if specified in settings */ + show_sleep_failed = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_NOTIFY_SLEEP_FAILED); egg_debug ("sleep failed"); gpm_manager_play (manager, GPM_MANAGER_SOUND_SUSPEND_ERROR, TRUE); - /* only emit if in MateConf */ + /* only emit if specified in settings */ if (!show_sleep_failed) goto out; @@ -597,7 +596,7 @@ gpm_manager_sleep_failure (GpmManager *manager, gboolean is_suspend, const gchar gtk_window_set_icon_name (GTK_WINDOW(dialog), icon); /* show a button? */ - uri = mateconf_client_get_string (manager->priv->conf, GPM_CONF_NOTIFY_SLEEP_FAILED_URI, NULL); + uri = g_settings_get_string (manager->priv->settings, GPM_SETTINGS_NOTIFY_SLEEP_FAILED_URI); if (uri != NULL && uri[0] != '\0') { /* TRANSLATORS: button text, visit the suspend help website */ gtk_dialog_add_button (GTK_DIALOG (dialog), _("Visit help page"), GTK_RESPONSE_HELP); @@ -663,21 +662,19 @@ gpm_manager_action_hibernate (GpmManager *manager, const gchar *reason) * @policy: The policy that we should do, e.g. "suspend" * @reason: The reason we are performing the policy action, e.g. "battery critical" * - * Does one of the policy actions specified in mateconf. + * Does one of the policy actions specified in the settings. **/ static gboolean gpm_manager_perform_policy (GpmManager *manager, const gchar *policy_key, const gchar *reason) { - gchar *action = NULL; GpmActionPolicy policy; /* are we inhibited? */ if (gpm_manager_is_inhibit_valid (manager, FALSE, "policy action") == FALSE) return FALSE; - action = mateconf_client_get_string (manager->priv->conf, policy_key, NULL); - egg_debug ("action: %s set to %s (%s)", policy_key, action, reason); - policy = gpm_action_policy_from_string (action); + policy = g_settings_get_enum (manager->priv->settings, policy_key); + egg_debug ("action: %s set to %i (%s)", policy_key, policy, reason); if (policy == GPM_ACTION_POLICY_NOTHING) { egg_debug ("doing nothing, reason: %s", reason); @@ -701,10 +698,9 @@ gpm_manager_perform_policy (GpmManager *manager, const gchar *policy_key, const gpm_session_logout (session); g_object_unref (session); } else { - egg_warning ("unknown action %s", action); + egg_warning ("unknown action %i", policy); } - g_free (action); return TRUE; } @@ -713,21 +709,19 @@ gpm_manager_perform_policy (GpmManager *manager, const gchar *policy_key, const * @manager: This class instance * * This callback is called when we want to sleep. Use the users - * preference from mateconf, but change it if we can't do the action. + * preference from the settings, but change it if we can't do the action. **/ static void gpm_manager_idle_do_sleep (GpmManager *manager) { - gchar *action = NULL; gboolean ret; GError *error = NULL; GpmActionPolicy policy; if (!manager->priv->on_battery) - action = mateconf_client_get_string (manager->priv->conf, GPM_CONF_ACTIONS_SLEEP_TYPE_AC, NULL); + policy = g_settings_get_enum (manager->priv->settings, GPM_SETTINGS_ACTION_SLEEP_TYPE_AC); else - action = mateconf_client_get_string (manager->priv->conf, GPM_CONF_ACTIONS_SLEEP_TYPE_BATT, NULL); - policy = gpm_action_policy_from_string (action); + policy = g_settings_get_enum (manager->priv->settings, GPM_SETTINGS_ACTION_SLEEP_TYPE_BATT); if (policy == GPM_ACTION_POLICY_NOTHING) { egg_debug ("doing nothing as system idle action"); @@ -760,7 +754,6 @@ gpm_manager_idle_do_sleep (GpmManager *manager) } } } - g_free (action); } /** @@ -824,13 +817,13 @@ gpm_manager_lid_button_pressed (GpmManager *manager, gboolean pressed) if (!manager->priv->on_battery) { egg_debug ("Performing AC policy"); - gpm_manager_perform_policy (manager, GPM_CONF_BUTTON_LID_AC, + gpm_manager_perform_policy (manager, GPM_SETTINGS_BUTTON_LID_AC, "The lid has been closed on ac power."); return; } egg_debug ("Performing battery policy"); - gpm_manager_perform_policy (manager, GPM_CONF_BUTTON_LID_BATT, + gpm_manager_perform_policy (manager, GPM_SETTINGS_BUTTON_LID_BATT, "The lid has been closed on battery power."); } @@ -913,13 +906,13 @@ gpm_manager_button_pressed_cb (GpmButton *button, const gchar *type, GpmManager } if (g_strcmp0 (type, GPM_BUTTON_POWER) == 0) { - gpm_manager_perform_policy (manager, GPM_CONF_BUTTON_POWER, "The power button has been pressed."); + gpm_manager_perform_policy (manager, GPM_SETTINGS_BUTTON_POWER, "The power button has been pressed."); } else if (g_strcmp0 (type, GPM_BUTTON_SLEEP) == 0) { - gpm_manager_perform_policy (manager, GPM_CONF_BUTTON_SUSPEND, "The suspend button has been pressed."); + gpm_manager_perform_policy (manager, GPM_SETTINGS_BUTTON_SUSPEND, "The suspend button has been pressed."); } else if (g_strcmp0 (type, GPM_BUTTON_SUSPEND) == 0) { - gpm_manager_perform_policy (manager, GPM_CONF_BUTTON_SUSPEND, "The suspend button has been pressed."); + gpm_manager_perform_policy (manager, GPM_SETTINGS_BUTTON_SUSPEND, "The suspend button has been pressed."); } else if (g_strcmp0 (type, GPM_BUTTON_HIBERNATE) == 0) { - gpm_manager_perform_policy (manager, GPM_CONF_BUTTON_HIBERNATE, "The hibernate button has been pressed."); + gpm_manager_perform_policy (manager, GPM_SETTINGS_BUTTON_HIBERNATE, "The hibernate button has been pressed."); } else if (g_strcmp0 (type, GPM_BUTTON_LID_OPEN) == 0) { gpm_manager_lid_button_pressed (manager, FALSE); } else if (g_strcmp0 (type, GPM_BUTTON_LID_CLOSED) == 0) { @@ -958,11 +951,11 @@ gpm_manager_get_spindown_timeout (GpmManager *manager) /* get policy */ if (!manager->priv->on_battery) { - enabled = mateconf_client_get_bool (manager->priv->conf, GPM_CONF_DISKS_SPINDOWN_ENABLE_AC, NULL); - timeout = mateconf_client_get_int (manager->priv->conf, GPM_CONF_DISKS_SPINDOWN_TIMEOUT_AC, NULL); + enabled = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_SPINDOWN_ENABLE_AC); + timeout = g_settings_get_int (manager->priv->settings, GPM_SETTINGS_SPINDOWN_TIMEOUT_AC); } else { - enabled = mateconf_client_get_bool (manager->priv->conf, GPM_CONF_DISKS_SPINDOWN_ENABLE_BATT, NULL); - timeout = mateconf_client_get_int (manager->priv->conf, GPM_CONF_DISKS_SPINDOWN_TIMEOUT_BATT, NULL); + enabled = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_SPINDOWN_ENABLE_BATT); + timeout = g_settings_get_int (manager->priv->settings, GPM_SETTINGS_SPINDOWN_TIMEOUT_BATT); } if (!enabled) timeout = 0; @@ -1033,15 +1026,15 @@ gpm_manager_client_changed_cb (UpClient *client, GpmManager *manager) /* We do the lid close on battery action if the ac adapter is removed when the laptop is closed and on battery. Fixes #331655 */ - event_when_closed = mateconf_client_get_bool (manager->priv->conf, GPM_CONF_ACTIONS_SLEEP_WHEN_CLOSED, NULL); + event_when_closed = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_SLEEP_WHEN_CLOSED); /* We keep track of the lid state so we can do the lid close on battery action if the ac adapter is removed when the laptop is closed. Fixes #331655 */ if (event_when_closed && on_battery && lid_is_closed) { - gpm_manager_perform_policy (manager, GPM_CONF_BUTTON_LID_BATT, + gpm_manager_perform_policy (manager, GPM_SETTINGS_BUTTON_LID_BATT, "The lid has been closed, and the ac adapter " - "removed (and mateconf is okay)."); + "removed (and GSettings is okay)."); } } @@ -1061,7 +1054,7 @@ manager_critical_action_do (GpmManager *manager) if (manager->priv->critical_alert_timeout_id) gpm_manager_play_loop_stop (manager); - gpm_manager_perform_policy (manager, GPM_CONF_ACTIONS_CRITICAL_BATT, "Battery is critically low."); + gpm_manager_perform_policy (manager, GPM_SETTINGS_ACTION_CRITICAL_BATT, "Battery is critically low."); return FALSE; } @@ -1078,23 +1071,17 @@ gpm_manager_class_init (GpmManagerClass *klass) } /** - * gpm_conf_mateconf_key_changed_cb: + * gpm_manager_settings_changed_cb: * - * We might have to do things when the mateconf keys change; do them here. + * We might have to do things when the keys change; do them here. **/ static void -gpm_conf_mateconf_key_changed_cb (MateConfClient *client, guint cnxn_id, MateConfEntry *entry, GpmManager *manager) +gpm_manager_settings_changed_cb (GSettings *settings, const gchar *key, GpmManager *manager) { - MateConfValue *value; - - value = mateconf_entry_get_value (entry); - if (value == NULL) - return; - - if (g_strcmp0 (entry->key, GPM_CONF_TIMEOUT_SLEEP_COMPUTER_BATT) == 0 || - g_strcmp0 (entry->key, GPM_CONF_TIMEOUT_SLEEP_COMPUTER_AC) == 0 || - g_strcmp0 (entry->key, GPM_CONF_TIMEOUT_SLEEP_DISPLAY_BATT) == 0 || - g_strcmp0 (entry->key, GPM_CONF_TIMEOUT_SLEEP_DISPLAY_AC) == 0) + if (g_strcmp0 (key, GPM_SETTINGS_SLEEP_COMPUTER_BATT) == 0 || + g_strcmp0 (key, GPM_SETTINGS_SLEEP_COMPUTER_AC) == 0 || + g_strcmp0 (key, GPM_SETTINGS_SLEEP_DISPLAY_BATT) == 0 || + g_strcmp0 (key, GPM_SETTINGS_SLEEP_DISPLAY_AC) == 0) gpm_manager_sync_policy_sleep (manager); } @@ -1139,7 +1126,7 @@ gpm_manager_perhaps_recall_response_cb (GtkDialog *dialog, gint response_id, Gpm /* don't show this again */ if (response_id == GTK_RESPONSE_CANCEL) { - mateconf_client_set_bool (manager->priv->conf, GPM_CONF_NOTIFY_PERHAPS_RECALL, FALSE, NULL); + g_settings_set_boolean (manager->priv->settings, GPM_SETTINGS_NOTIFY_PERHAPS_RECALL, FALSE); goto out; } @@ -1217,9 +1204,9 @@ gpm_manager_engine_perhaps_recall_cb (GpmEngine *engine, UpDevice *device, gchar } /* already shown, and dismissed */ - ret = mateconf_client_get_bool (manager->priv->conf, GPM_CONF_NOTIFY_PERHAPS_RECALL, NULL); + ret = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_NOTIFY_PERHAPS_RECALL); if (!ret) { - egg_debug ("MateConf prevents notification: %s", GPM_CONF_NOTIFY_PERHAPS_RECALL); + egg_debug ("Gsettings prevents notification: %s", GPM_SETTINGS_NOTIFY_PERHAPS_RECALL); return; } @@ -1297,8 +1284,8 @@ gpm_manager_engine_fully_charged_cb (GpmEngine *engine, UpDevice *device, GpmMan guint plural = 1; const gchar *title; - /* only action this if specified in mateconf */ - ret = mateconf_client_get_bool (manager->priv->conf, GPM_CONF_NOTIFY_FULLY_CHARGED, NULL); + /* only action this if specified in the setings */ + ret = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_NOTIFY_FULLY_CHARGED); if (!ret) { egg_debug ("no notification"); goto out; @@ -1351,8 +1338,8 @@ gpm_manager_engine_discharging_cb (GpmEngine *engine, UpDevice *device, GpmManag gchar *icon = NULL; const gchar *kind_desc; - /* only action this if specified in mateconf */ - ret = mateconf_client_get_bool (manager->priv->conf, GPM_CONF_NOTIFY_DISCHARGING, NULL); + /* only action this if specified in the settings */ + ret = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_NOTIFY_DISCHARGING); if (!ret) { egg_debug ("no notification"); goto out; @@ -1560,7 +1547,6 @@ gpm_manager_engine_charge_critical_cb (GpmEngine *engine, UpDevice *device, GpmM { const gchar *title = NULL; gchar *message = NULL; - gchar *action; gchar *icon = NULL; UpDeviceKind kind; gdouble percentage; @@ -1596,8 +1582,7 @@ gpm_manager_engine_charge_critical_cb (GpmEngine *engine, UpDevice *device, GpmM } /* we have to do different warnings depending on the policy */ - action = mateconf_client_get_string (manager->priv->conf, GPM_CONF_ACTIONS_CRITICAL_BATT, NULL); - policy = gpm_action_policy_from_string (action); + policy = g_settings_get_enum (manager->priv->settings, GPM_SETTINGS_ACTION_CRITICAL_BATT); /* use different text for different actions */ if (policy == GPM_ACTION_POLICY_NOTHING) { @@ -1617,7 +1602,6 @@ gpm_manager_engine_charge_critical_cb (GpmEngine *engine, UpDevice *device, GpmM message = g_strdup_printf (_("Computer will shutdown very soon unless it is plugged in.")); } - g_free (action); } else if (kind == UP_DEVICE_KIND_UPS) { gchar *remaining_text; @@ -1727,7 +1711,6 @@ static void gpm_manager_engine_charge_action_cb (GpmEngine *engine, UpDevice *device, GpmManager *manager) { const gchar *title = NULL; - gchar *action; gchar *message = NULL; gchar *icon = NULL; UpDeviceKind kind; @@ -1752,8 +1735,7 @@ gpm_manager_engine_charge_action_cb (GpmEngine *engine, UpDevice *device, GpmMan title = _("Laptop battery critically low"); /* we have to do different warnings depending on the policy */ - action = mateconf_client_get_string (manager->priv->conf, GPM_CONF_ACTIONS_CRITICAL_BATT, NULL); - policy = gpm_action_policy_from_string (action); + policy = g_settings_get_enum (manager->priv->settings, GPM_SETTINGS_ACTION_CRITICAL_BATT); /* use different text for different actions */ if (policy == GPM_ACTION_POLICY_NOTHING) { @@ -1780,8 +1762,6 @@ gpm_manager_engine_charge_action_cb (GpmEngine *engine, UpDevice *device, GpmMan "this computer is about to shutdown.")); } - g_free (action); - /* wait 20 seconds for user-panic */ g_timeout_add_seconds (20, (GSourceFunc) manager_critical_action_do, manager); @@ -1790,8 +1770,7 @@ gpm_manager_engine_charge_action_cb (GpmEngine *engine, UpDevice *device, GpmMan title = _("UPS critically low"); /* we have to do different warnings depending on the policy */ - action = mateconf_client_get_string (manager->priv->conf, GPM_CONF_ACTIONS_CRITICAL_UPS, NULL); - policy = gpm_action_policy_from_string (action); + policy = g_settings_get_enum (manager->priv->settings, GPM_SETTINGS_ACTION_CRITICAL_UPS); /* use different text for different actions */ if (policy == GPM_ACTION_POLICY_NOTHING) { @@ -1814,7 +1793,6 @@ gpm_manager_engine_charge_action_cb (GpmEngine *engine, UpDevice *device, GpmMan /* wait 20 seconds for user-panic */ g_timeout_add_seconds (20, (GSourceFunc) manager_critical_action_do, manager); - g_free (action); } /* not all types have actions */ @@ -1898,7 +1876,6 @@ gpm_manager_init (GpmManager *manager) gint timeout; DBusGConnection *connection; GError *error = NULL; - guint version; manager->priv = GPM_MANAGER_GET_PRIVATE (manager); connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error); @@ -1922,7 +1899,9 @@ gpm_manager_init (GpmManager *manager) manager->priv->notification_discharging = NULL; manager->priv->notification_fully_charged = NULL; manager->priv->disks = gpm_disks_new (); - manager->priv->conf = mateconf_client_get_default (); + manager->priv->settings = g_settings_new (GPM_SETTINGS_SCHEMA); + g_signal_connect (manager->priv->settings, "changed", + G_CALLBACK (gpm_manager_settings_changed_cb), manager); manager->priv->client = up_client_new (); g_signal_connect (manager->priv->client, "changed", G_CALLBACK (gpm_manager_client_changed_cb), manager); @@ -1930,28 +1909,6 @@ gpm_manager_init (GpmManager *manager) /* use libmatenotify */ notify_init (GPM_NAME); - /* watch mate-power-manager keys */ - mateconf_client_add_dir (manager->priv->conf, GPM_CONF_DIR, - MATECONF_CLIENT_PRELOAD_RECURSIVE, NULL); - mateconf_client_notify_add (manager->priv->conf, GPM_CONF_DIR, - (MateConfClientNotifyFunc) gpm_conf_mateconf_key_changed_cb, - manager, NULL, NULL); - - /* check to see if the user has installed the schema properly */ - version = mateconf_client_get_int (manager->priv->conf, GPM_CONF_SCHEMA_VERSION, NULL); - if (version != GPM_CONF_SCHEMA_ID) { - gpm_manager_notify (manager, &manager->priv->notification_general, - /* TRANSLATORS: there was in install problem */ - _("Install problem!"), - /* TRANSLATORS: the MateConf schema was not installed properly */ - _("The configuration defaults for MATE Power Manager have not been installed correctly.\n" - "Please contact your computer administrator."), - GPM_MANAGER_NOTIFY_TIMEOUT_LONG, - GTK_STOCK_DIALOG_WARNING, - NOTIFY_URGENCY_NORMAL); - egg_error ("no mateconf schema installed!"); - } - /* coldplug so we are in the correct state at startup */ g_object_get (manager->priv->client, "on-battery", &manager->priv->on_battery, @@ -1983,7 +1940,7 @@ gpm_manager_init (GpmManager *manager) G_CALLBACK (gpm_manager_idle_changed_cb), manager); /* set up the check_type_cpu, so we can disable the CPU load check */ - check_type_cpu = mateconf_client_get_bool (manager->priv->conf, GPM_CONF_IDLE_CHECK_CPU, NULL); + check_type_cpu = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_IDLE_CHECK_CPU); gpm_idle_set_check_cpu (manager->priv->idle, check_type_cpu); manager->priv->dpms = gpm_dpms_new (); @@ -2062,7 +2019,7 @@ gpm_manager_finalize (GObject *object) if (manager->priv->critical_alert_timeout_id != 0) g_source_remove (manager->priv->critical_alert_timeout_id); - g_object_unref (manager->priv->conf); + g_object_unref (manager->priv->settings); g_object_unref (manager->priv->disks); g_object_unref (manager->priv->dpms); g_object_unref (manager->priv->idle); |