[gnome-power-manager] Remove the power engine, it's moved to gnome-settings-daemon



commit cf2541585c9badeb57ec942cc1248123e0240b26
Author: Richard Hughes <richard hughsie com>
Date:   Mon Jul 4 12:48:17 2011 +0100

    Remove the power engine, it's moved to gnome-settings-daemon

 src/Makefile.am   |    4 +-
 src/gpm-engine.c  | 1287 -----------------------------------------------------
 src/gpm-engine.h  |   81 ----
 src/gpm-manager.c |   41 ++-
 4 files changed, 37 insertions(+), 1376 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index fdffd05..565373e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -102,9 +102,7 @@ gnome_power_manager_SOURCES =				\
 	gpm-manager.c					\
 	gpm-screensaver.h				\
 	gpm-screensaver.c				\
-	gpm-stock-icons.h				\
-	gpm-engine.h					\
-	gpm-engine.c
+	gpm-stock-icons.h
 
 gnome_power_manager_LDADD =				\
 	libgpmshared.a					\
diff --git a/src/gpm-manager.c b/src/gpm-manager.c
index e088c2d..05621c1 100644
--- a/src/gpm-manager.c
+++ b/src/gpm-manager.c
@@ -50,7 +50,6 @@
 #include "gpm-screensaver.h"
 #include "gpm-backlight.h"
 #include "gpm-stock-icons.h"
-#include "gpm-engine.h"
 #include "gpm-upower.h"
 
 static void     gpm_manager_finalize	(GObject	 *object);
@@ -72,7 +71,6 @@ struct GpmManagerPrivate
 	GpmIdle			*idle;
 	GpmControl		*control;
 	GpmScreensaver		*screensaver;
-	GpmEngine		*engine;
 	GpmBacklight		*backlight;
 	EggConsoleKit		*console;
 	guint32			 screensaver_ac_throttle_id;
@@ -877,6 +875,42 @@ gpm_manager_perhaps_recall_delay_cb (GpmManager *manager)
 	/* never repeat */
 	return FALSE;
 }
+
+/**
+ * gpm_engine_check_recall:
+ **/
+static gboolean
+gpm_engine_check_recall (GpmEngine *engine, UpDevice *device)
+{
+	UpDeviceKind kind;
+	gboolean recall_notice = FALSE;
+	gchar *recall_vendor = NULL;
+	gchar *recall_url = NULL;
+
+	/* get device properties */
+	g_object_get (device,
+		      "kind", &kind,
+		      "recall-notice", &recall_notice,
+		      "recall-vendor", &recall_vendor,
+		      "recall-url", &recall_url,
+		      NULL);
+
+	/* not battery */
+	if (kind != UP_DEVICE_KIND_BATTERY)
+		goto out;
+
+	/* no recall data */
+	if (!recall_notice)
+		goto out;
+
+	/* emit signal for manager */
+	g_debug ("** EMIT: perhaps-recall");
+out:
+	g_free (recall_vendor);
+	g_free (recall_url);
+	return recall_notice;
+}
+
 #endif
 
 /**
@@ -1023,8 +1057,6 @@ gpm_manager_init (GpmManager *manager)
 
 	gpm_manager_sync_policy_sleep (manager);
 
-	manager->priv->engine = gpm_engine_new ();
-
 	/* update ac throttle */
 	gpm_manager_update_ac_throttle (manager);
 
@@ -1063,7 +1095,6 @@ gpm_manager_finalize (GObject *object)
 	g_object_unref (manager->priv->settings_gsd);
 	g_object_unref (manager->priv->dpms);
 	g_object_unref (manager->priv->idle);
-	g_object_unref (manager->priv->engine);
 	g_object_unref (manager->priv->screensaver);
 	g_object_unref (manager->priv->control);
 	g_object_unref (manager->priv->button);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]