[gnome-power-manager] Remove the screensaver integration, it's moved to gnome-settings-daemon
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-power-manager] Remove the screensaver integration, it's moved to gnome-settings-daemon
- Date: Mon, 25 Jul 2011 16:37:58 +0000 (UTC)
commit ec60e116af02bcc80b0c8d719f369e6afee0016a
Author: Richard Hughes <richard hughsie com>
Date: Mon Jul 25 17:11:30 2011 +0100
Remove the screensaver integration, it's moved to gnome-settings-daemon
src/Makefile.am | 4 -
src/gpm-manager.c | 30 -----
src/gpm-screensaver.c | 336 -------------------------------------------------
src/gpm-screensaver.h | 68 ----------
src/gpm-self-test.c | 23 ----
5 files changed, 0 insertions(+), 461 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index ff7b9eb..f6e3d9b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -85,8 +85,6 @@ gnome_power_manager_SOURCES = \
gpm-main.c \
gpm-manager.h \
gpm-manager.c \
- gpm-screensaver.h \
- gpm-screensaver.c \
gpm-stock-icons.h
gnome_power_manager_LDADD = \
@@ -109,8 +107,6 @@ gnome_power_self_test_SOURCES = \
gpm-idle.c \
gpm-common.h \
gpm-common.c \
- gpm-screensaver.h \
- gpm-screensaver.c \
gpm-idletime.h \
gpm-idletime.c \
gpm-array-float.h \
diff --git a/src/gpm-manager.c b/src/gpm-manager.c
index 292946d..17e179e 100644
--- a/src/gpm-manager.c
+++ b/src/gpm-manager.c
@@ -44,7 +44,6 @@
#include "gpm-common.h"
#include "gpm-idle.h"
#include "gpm-manager.h"
-#include "gpm-screensaver.h"
#include "gpm-backlight.h"
#include "gpm-stock-icons.h"
#include "gpm-upower.h"
@@ -64,11 +63,8 @@ struct GpmManagerPrivate
GSettings *settings;
GSettings *settings_gsd;
GpmIdle *idle;
- GpmScreensaver *screensaver;
GpmBacklight *backlight;
EggConsoleKit *console;
- guint32 screensaver_ac_throttle_id;
- guint32 screensaver_lid_throttle_id;
UpClient *client;
gboolean on_battery;
gboolean just_resumed;
@@ -389,20 +385,6 @@ gpm_manager_idle_changed_cb (GpmIdle *idle, GpmIdleMode mode, GpmManager *manage
static void
gpm_manager_update_ac_throttle (GpmManager *manager)
{
- /* Throttle the manager when we are not on AC power so we don't
- waste the battery */
- if (!manager->priv->on_battery) {
- if (manager->priv->screensaver_ac_throttle_id != 0) {
- gpm_screensaver_remove_throttle (manager->priv->screensaver, manager->priv->screensaver_ac_throttle_id);
- manager->priv->screensaver_ac_throttle_id = 0;
- }
- } else {
- /* if throttle already exists then remove */
- if (manager->priv->screensaver_ac_throttle_id != 0)
- gpm_screensaver_remove_throttle (manager->priv->screensaver, manager->priv->screensaver_ac_throttle_id);
- /* TRANSLATORS: this is the gnome-screensaver throttle */
- manager->priv->screensaver_ac_throttle_id = gpm_screensaver_add_throttle (manager->priv->screensaver, _("On battery power"));
- }
}
/**
@@ -439,10 +421,6 @@ gpm_manager_client_changed_cb (UpClient *client, GpmManager *manager)
gpm_manager_update_ac_throttle (manager);
- /* simulate user input, but only when the lid is open */
- if (!lid_is_closed)
- gpm_screensaver_poke (manager->priv->screensaver);
-
/* 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 */
@@ -605,10 +583,6 @@ gpm_manager_init (GpmManager *manager)
{
manager->priv = GPM_MANAGER_GET_PRIVATE (manager);
- /* init to unthrottled */
- manager->priv->screensaver_ac_throttle_id = 0;
- manager->priv->screensaver_lid_throttle_id = 0;
-
/* init to not just_resumed */
manager->priv->just_resumed = FALSE;
@@ -633,9 +607,6 @@ gpm_manager_init (GpmManager *manager)
"on-battery", &manager->priv->on_battery,
NULL);
- /* try and start an interactive service */
- manager->priv->screensaver = gpm_screensaver_new ();
-
/* try an start an interactive service */
manager->priv->backlight = gpm_backlight_new ();
@@ -773,7 +744,6 @@ gpm_manager_finalize (GObject *object)
g_object_unref (manager->priv->settings);
g_object_unref (manager->priv->settings_gsd);
g_object_unref (manager->priv->idle);
- g_object_unref (manager->priv->screensaver);
g_object_unref (manager->priv->backlight);
g_object_unref (manager->priv->console);
g_object_unref (manager->priv->client);
diff --git a/src/gpm-self-test.c b/src/gpm-self-test.c
index 99bba40..9e995eb 100644
--- a/src/gpm-self-test.c
+++ b/src/gpm-self-test.c
@@ -26,7 +26,6 @@
#include <glib-object.h>
#include <gtk/gtk.h>
-#include "gpm-screensaver.h"
#include "gpm-idle.h"
#include "gpm-common.h"
#include "gpm-idletime.h"
@@ -191,27 +190,6 @@ gpm_test_idle_func (void)
}
static void
-gpm_test_screensaver_func (void)
-{
- GpmScreensaver *screensaver;
-// guint value;
- gboolean ret;
-
- screensaver = gpm_screensaver_new ();
- g_assert (screensaver != NULL);
-
- /* lock */
- ret = gpm_screensaver_lock (screensaver);
- g_assert (ret);
-
- /* poke */
- ret = gpm_screensaver_poke (screensaver);
- g_assert (ret);
-
- g_object_unref (screensaver);
-}
-
-static void
gpm_test_precision_func (void)
{
g_assert_cmpint (gpm_precision_round_down (0, 10), ==, 0);
@@ -727,7 +705,6 @@ main (int argc, char **argv)
g_test_add_func ("/power/array_float", gpm_test_array_float_func);
g_test_add_func ("/power/idle", gpm_test_idle_func);
g_test_add_func ("/power/idletime", gpm_test_idletime_func);
- g_test_add_func ("/power/screensaver", gpm_test_screensaver_func);
return g_test_run ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]