[gnome-power-manager] HAL is no longer a dependency of gnome-power-manager
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-power-manager] HAL is no longer a dependency of gnome-power-manager
- Date: Fri, 3 Jul 2009 12:54:30 +0000 (UTC)
commit f884a1ae954d14928a6a7055d4d4b182fbb2a3bc
Author: Richard Hughes <richard hughsie com>
Date: Fri Jul 3 13:49:05 2009 +0100
HAL is no longer a dependency of gnome-power-manager
Makefile.am | 1 -
README | 38 ++--
TODO | 9 +-
applets/brightness/Makefile.am | 1 -
applets/inhibit/Makefile.am | 1 -
configure.ac | 7 -
libhal-glib/.gitignore | 9 -
libhal-glib/Makefile.am | 52 ----
libhal-glib/egg-dbus-monitor.c | 1 -
libhal-glib/egg-dbus-monitor.h | 1 -
libhal-glib/egg-dbus-proxy.c | 1 -
libhal-glib/egg-dbus-proxy.h | 1 -
libhal-glib/egg-debug.c | 1 -
libhal-glib/egg-debug.h | 1 -
libhal-glib/hal-device.c | 262 --------------------
libhal-glib/hal-device.h | 71 ------
libhal-glib/hal-manager.c | 358 ---------------------------
libhal-glib/hal-manager.h | 86 -------
libhal-glib/hal-marshal.list | 9 -
src/Makefile.am | 12 -
src/gpm-brightness-hal.c | 528 ----------------------------------------
src/gpm-brightness-hal.h | 67 -----
src/gpm-brightness.c | 62 +----
23 files changed, 28 insertions(+), 1551 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 6c225e6..36f06a1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,6 @@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = \
- libhal-glib \
src \
po \
docs \
diff --git a/README b/README
index ddd9542..28b6078 100644
--- a/README
+++ b/README
@@ -1,17 +1,11 @@
GNOME Power Manager
A Power Manager for GNOME
-GNOME Power Manager is a GNOME session daemon that acts as a policy agent on top of
-the Project Utopia stack, which includes the kernel, hotplug, udev, and HAL. GNOME
-Power Manager listens for HAL events and responds with user-configurable reactions.
-Currently it supports UPS's, laptop batteries and AC adapters. Its goal is to be
-architecture neutral and free of polling and other hacks.
+GNOME Power Manager is a GNOME session daemon that acts as a policy agent on top of
+the DeviceKit stack, which requires fairly new versions of the kernel and udev.
+GNOME Power Manager listens for system events and responds with user-configurable actions.
-Most of the code is actually in HAL for abstracting various power aware devices
-(UPS's) and frameworks (ACPI, PMU, APM etc.) - so the desktop parts are fairly
-lightweight and straightforward to write.
-
-GNOME Power Manager comes in three parts:
+GNOME Power Manager comes in three main parts:
- gnome-power-manager: the manager daemon itself
- gnome-power-preferences: the control panel program, for configuration
@@ -19,13 +13,21 @@ GNOME Power Manager comes in three parts:
To build, GNOME Power Manager requires
- - libgnomeui-2.0
- - libglade-2.0
- - libhal-0 (from HAL 0.5.7 , 0.5.8 recommended)
- - libdbus-1 (from D-BUS 0.70 or later)
- - libdbus-glib-1 (from D-BUS 0.70 or later)
- - libnotify (from 0.3.0 or later, 0.4.3 recommended)
-
-To work properly, gnome-power-manager requires hald to be running.
+ - Glib (2.13.0 or later)
+ - Gtk2+ (2.11.0 or later)
+ - GNOME Keyring (0.6.0 or later)
+ - DBus (0.70 or later)
+ - libnotify (0.4.3 or later)
+ - libwnck (2.10.0 or later)
+ - Cairo (1.0.0 or later)
+ - Unique (0.9.4 or later)
+ - libpanel (2.0.0 or later)
+ - xrandr (1.2.0 or later)
+ - Canberra (0.10 or later)
+ - DeviceKit (001 or later)
+ - DeviceKit-power (008 or later)
+
+To work properly, gnome-power-manager requires udevd, DeviceKit-power and
+DeviceKit-disks to be running.
For more information, please see http://www.gnome.org/projects/gnome-power-manager/
diff --git a/TODO b/TODO
index cb390c5..8cf2294 100644
--- a/TODO
+++ b/TODO
@@ -1,8 +1 @@
-TODO:
-
- * Implement the low power changed signal
- * Throw dbus errors when we fail dbus methods: org.gnome.PowerManager.NotInhibited.
- * Make strings more translatable
- * Integrate g-p-m with more modules, e.g. nautilus.
- * Give the user the ability to force an Inhibit()'d action
- * use the updated hal can_suspend_to_disk keys
+Ask on the mailing list!
diff --git a/applets/brightness/Makefile.am b/applets/brightness/Makefile.am
index 14b18b3..4ba35a9 100644
--- a/applets/brightness/Makefile.am
+++ b/applets/brightness/Makefile.am
@@ -1,7 +1,6 @@
INCLUDES = \
-I. -I$(srcdir) \
$(GLIB_CFLAGS) \
- $(HAL_CFLAGS) \
$(DBUS_CFLAGS) \
$(GNOME_CFLAGS) \
$(LIBNOTIFY_CFLAGS) \
diff --git a/applets/inhibit/Makefile.am b/applets/inhibit/Makefile.am
index 6cd275f..788a7e8 100644
--- a/applets/inhibit/Makefile.am
+++ b/applets/inhibit/Makefile.am
@@ -1,7 +1,6 @@
INCLUDES = \
-I. -I$(srcdir) \
$(GLIB_CFLAGS) \
- $(HAL_CFLAGS) \
$(DBUS_CFLAGS) \
$(GNOME_CFLAGS) \
$(LIBNOTIFY_CFLAGS) \
diff --git a/configure.ac b/configure.ac
index 601f30a..8490fb1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -94,7 +94,6 @@ GLIB_REQUIRED=2.13.0
GTK_REQUIRED=2.11.0
GDK_REQUIRED=2.11.0
GNOME_KEYRING_REQUIRED=0.6.0
-HAL_REQUIRED=0.5.8
DBUS_REQUIRED=0.70
LIBNOTIFY_REQUIRED=0.4.3
LIBWNCK_REQUIRED=2.10.0
@@ -113,7 +112,6 @@ dnl ---------------------------------------------------------------------------
AC_SUBST(GLIB_REQUIRED)
AC_SUBST(GTK_REQUIRED)
AC_SUBST(GDK_REQUIRED)
-AC_SUBST(HAL_REQUIRED)
AC_SUBST(DBUS_REQUIRED)
AC_SUBST(LIBNOTIFY_REQUIRED)
AC_SUBST(LIBWNCK_REQUIRED)
@@ -130,10 +128,6 @@ PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
-PKG_CHECK_MODULES(HAL, hal >= $HAL_REQUIRED)
-AC_SUBST(HAL_CFLAGS)
-AC_SUBST(HAL_LIBS)
-
PKG_CHECK_MODULES(CANBERRA, libcanberra-gtk >= $CANBERRA_REQUIRED)
AC_SUBST(CANBERRA_CFLAGS)
AC_SUBST(CANBERRA_LIBS)
@@ -608,7 +602,6 @@ src/Makefile
applets/Makefile
applets/brightness/Makefile
applets/inhibit/Makefile
-libhal-glib/Makefile
docs/Makefile
man/Makefile
help/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index f0af417..8295f32 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -11,7 +11,6 @@ EXTRA_DIST = \
INCLUDES = \
$(GLIB_CFLAGS) \
- $(HAL_CFLAGS) \
$(DBUS_CFLAGS) \
$(GNOME_CFLAGS) \
$(UNIQUE_CFLAGS) \
@@ -37,12 +36,8 @@ INCLUDES = \
-DEGG_LOGGING="\"GPM_LOGGING\"" \
-DEGG_CONSOLE="\"GPM_CONSOLE\"" \
-I$(top_srcdir) \
- -I$(top_srcdir)/libhal-glib \
$(NULL)
-LOCAL_LIBHAL_LIBS = \
- $(top_builddir)/libhal-glib/libhal.la
-
bin_PROGRAMS = \
gnome-power-manager \
gnome-power-preferences \
@@ -122,12 +117,10 @@ gnome_power_preferences_SOURCES = \
gnome_power_preferences_LDADD = \
$(GLIB_LIBS) \
$(GNOME_LIBS) \
- $(HAL_LIBS) \
$(DBUS_LIBS) \
$(UNIQUE_LIBS) \
$(POLKIT_GNOME_LIBS) \
$(GPM_EXTRA_LIBS) \
- $(LOCAL_LIBHAL_LIBS) \
$(DEVKIT_LIBS) \
$(NULL)
@@ -172,8 +165,6 @@ gnome_power_manager_SOURCES = \
gpm-button.c \
gpm-brightness.h \
gpm-brightness.c \
- gpm-brightness-hal.h \
- gpm-brightness-hal.c \
gpm-brightness-xrandr.h \
gpm-brightness-xrandr.c \
gpm-brightness-dkp.h \
@@ -209,14 +200,12 @@ gnome_power_manager_LDADD = \
$(GLIB_LIBS) \
$(GSTREAMER_LIBS) \
$(GNOME_LIBS) \
- $(HAL_LIBS) \
$(POLKIT_LIBS) \
$(DBUS_LIBS) \
$(XRANDR_LIBS) \
$(CANBERRA_LIBS) \
$(LIBNOTIFY_LIBS) \
$(GPM_EXTRA_LIBS) \
- $(LOCAL_LIBHAL_LIBS) \
$(DEVKIT_LIBS) \
$(NULL)
@@ -286,7 +275,6 @@ gnome_power_self_test_LDADD = \
$(DEVKIT_LIBS) \
$(DBUS_LIBS) \
$(LIBNOTIFY_LIBS) \
- $(LOCAL_LIBHAL_LIBS) \
$(GPM_EXTRA_LIBS) \
$(NULL)
diff --git a/src/gpm-brightness.c b/src/gpm-brightness.c
index 5a574da..2c576ca 100644
--- a/src/gpm-brightness.c
+++ b/src/gpm-brightness.c
@@ -36,7 +36,6 @@
#endif /* HAVE_UNISTD_H */
#include "gpm-brightness.h"
-#include "gpm-brightness-hal.h"
#include "gpm-brightness-dkp.h"
#include "gpm-brightness-xrandr.h"
#include "gpm-common.h"
@@ -49,12 +48,10 @@
struct GpmBrightnessPrivate
{
gboolean use_xrandr;
- gboolean use_hal;
gboolean use_dkp;
gboolean has_changed_events;
gboolean cache_trusted;
guint cache_percentage;
- GpmBrightnessHal *hal;
GpmBrightnessDkp *dkp;
GpmBrightnessXRandR *xrandr;
};
@@ -135,7 +132,7 @@ gpm_brightness_set (GpmBrightness *brightness, guint percentage, gboolean *hw_ch
ret = gpm_brightness_xrandr_set (brightness->priv->xrandr, percentage, &hw_changed_local);
if (ret)
goto out;
- egg_warning ("failed to set using xrandr, falling back to HAL");
+ egg_warning ("failed to set using xrandr, falling back to DeviceKit-power");
brightness->priv->use_xrandr = FALSE;
}
if (brightness->priv->use_dkp) {
@@ -144,12 +141,6 @@ gpm_brightness_set (GpmBrightness *brightness, guint percentage, gboolean *hw_ch
goto out;
egg_warning ("failed to set using DeviceKit-power");
}
- if (brightness->priv->use_hal) {
- ret = gpm_brightness_hal_set (brightness->priv->hal, percentage, &hw_changed_local);
- if (ret)
- goto out;
- egg_warning ("failed to set using HAL");
- }
egg_debug ("no hardware support");
return FALSE;
out:
@@ -194,7 +185,7 @@ gpm_brightness_get (GpmBrightness *brightness, guint *percentage)
ret = gpm_brightness_xrandr_get (brightness->priv->xrandr, &percentage_local);
if (ret)
goto out;
- egg_warning ("failed to set using xrandr, falling back to HAL");
+ egg_warning ("failed to set using xrandr, falling back to DeviceKit-power");
brightness->priv->use_xrandr = FALSE;
}
if (brightness->priv->use_dkp) {
@@ -203,12 +194,6 @@ gpm_brightness_get (GpmBrightness *brightness, guint *percentage)
goto out;
egg_warning ("failed to set using DeviceKit-power");
}
- if (brightness->priv->use_hal) {
- ret = gpm_brightness_hal_get (brightness->priv->hal, &percentage_local);
- if (ret)
- goto out;
- egg_warning ("failed to set using HAL");
- }
egg_debug ("no hardware support");
return FALSE;
out:
@@ -248,7 +233,7 @@ gpm_brightness_up (GpmBrightness *brightness, gboolean *hw_changed)
ret = gpm_brightness_xrandr_up (brightness->priv->xrandr, &hw_changed_local);
if (ret)
goto out;
- egg_warning ("failed to set using xrandr, falling back to HAL");
+ egg_warning ("failed to set using xrandr, falling back to DeviceKit-power");
brightness->priv->use_xrandr = FALSE;
}
if (brightness->priv->use_dkp) {
@@ -257,12 +242,6 @@ gpm_brightness_up (GpmBrightness *brightness, gboolean *hw_changed)
goto out;
egg_warning ("failed to set using DeviceKit-power");
}
- if (brightness->priv->use_hal) {
- ret = gpm_brightness_hal_up (brightness->priv->hal, &hw_changed_local);
- if (ret)
- goto out;
- egg_warning ("failed to set using HAL");
- }
egg_debug ("no hardware support");
return FALSE;
out:
@@ -296,7 +275,7 @@ gpm_brightness_down (GpmBrightness *brightness, gboolean *hw_changed)
ret = gpm_brightness_xrandr_down (brightness->priv->xrandr, &hw_changed_local);
if (ret)
goto out;
- egg_warning ("failed to set using xrandr, falling back to HAL");
+ egg_warning ("failed to set using xrandr, falling back to DeviceKit-power");
brightness->priv->use_xrandr = FALSE;
}
if (brightness->priv->use_dkp) {
@@ -305,12 +284,6 @@ gpm_brightness_down (GpmBrightness *brightness, gboolean *hw_changed)
goto out;
egg_warning ("failed to set using DeviceKit-power");
}
- if (brightness->priv->use_hal) {
- ret = gpm_brightness_hal_down (brightness->priv->hal, &hw_changed_local);
- if (ret)
- goto out;
- egg_warning ("failed to set using HAL");
- }
egg_debug ("no hardware support");
return FALSE;
out:
@@ -331,7 +304,7 @@ gboolean
gpm_brightness_has_hw (GpmBrightness *brightness)
{
g_return_val_if_fail (GPM_IS_BRIGHTNESS (brightness), FALSE);
- return (brightness->priv->use_xrandr || brightness->priv->use_dkp || brightness->priv->use_hal);
+ return (brightness->priv->use_xrandr || brightness->priv->use_dkp);
}
/**
@@ -345,7 +318,6 @@ gpm_brightness_finalize (GObject *object)
g_return_if_fail (GPM_IS_BRIGHTNESS (object));
brightness = GPM_BRIGHTNESS (object);
g_object_unref (brightness->priv->dkp);
- g_object_unref (brightness->priv->hal);
g_object_unref (brightness->priv->xrandr);
G_OBJECT_CLASS (gpm_brightness_parent_class)->finalize (object);
}
@@ -421,18 +393,6 @@ gpm_brightness_dkp_changed_cb (GpmBrightnessDkp *dkp, guint percentage, GpmBrigh
}
/**
- * gpm_brightness_hal_changed_cb:
- * This callback is called when the brightness value changes.
- **/
-static void
-gpm_brightness_hal_changed_cb (GpmBrightnessHal *hal, guint percentage, GpmBrightness *brightness)
-{
- g_return_if_fail (GPM_IS_BRIGHTNESS (brightness));
- if (brightness->priv->use_hal)
- gpm_brightness_changed (brightness, percentage);
-}
-
-/**
* gpm_brightness_init:
* @brightness: This brightness class instance
**/
@@ -443,7 +403,6 @@ gpm_brightness_init (GpmBrightness *brightness)
brightness->priv->use_xrandr = FALSE;
brightness->priv->use_dkp = FALSE;
- brightness->priv->use_hal = FALSE;
brightness->priv->cache_trusted = FALSE;
brightness->priv->has_changed_events = FALSE;
brightness->priv->cache_percentage = 0;
@@ -458,17 +417,10 @@ gpm_brightness_init (GpmBrightness *brightness)
egg_debug ("detected DeviceKit-power hardware");
brightness->priv->use_dkp = TRUE;
}
- brightness->priv->hal = gpm_brightness_hal_new ();
- if (gpm_brightness_hal_has_hw (brightness->priv->hal)) {
- egg_debug ("detected HAL hardware");
- brightness->priv->use_hal = TRUE;
- }
- g_signal_connect (brightness->priv->dkp, "brightness-changed",
- G_CALLBACK (gpm_brightness_dkp_changed_cb), brightness);
- g_signal_connect (brightness->priv->hal, "brightness-changed",
- G_CALLBACK (gpm_brightness_hal_changed_cb), brightness);
g_signal_connect (brightness->priv->xrandr, "brightness-changed",
G_CALLBACK (gpm_brightness_xrandr_changed_cb), brightness);
+ g_signal_connect (brightness->priv->dkp, "brightness-changed",
+ G_CALLBACK (gpm_brightness_dkp_changed_cb), brightness);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]