summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Abdallah <ali.slackware@gmail.com>2009-07-18 23:13:13 +0000
committerAli Abdallah <ali.slackware@gmail.com>2009-07-18 23:13:13 +0000
commit63ef29997073acf8341c921fc6d45946dd408bc7 (patch)
tree13fde1a91a6d2fd8d3733d4b5d6bb3be0d0182fb
parentf3a08f98b0f64f653203f0c98ca02b15f64b2f47 (diff)
downloadixfce4-power-manager-63ef29997073acf8341c921fc6d45946dd408bc7.tar.gz
* Allow compilation without network manager support, since some
distros doesn't have it (like Slackware). * settings/xfpm-settings.c connect to the signals after settings up all the widgets this way we don't get property_changed signals for nothing. * Register DBus error code only once at startup to avoid a Metadata warning error domain. * Update README, NEWS. (Old svn revision: 7741)
-rw-r--r--ChangeLog9
-rw-r--r--NEWS17
-rw-r--r--README38
-rw-r--r--configure.ac.in18
-rw-r--r--settings/xfpm-settings.c4
-rw-r--r--src/xfpm-engine.c4
-rw-r--r--src/xfpm-errors.h4
-rw-r--r--src/xfpm-inhibit.c3
-rw-r--r--src/xfpm-manager.c5
-rw-r--r--src/xfpm-network-manager.c3
-rw-r--r--src/xfpm-shutdown.c1
11 files changed, 71 insertions, 35 deletions
diff --git a/ChangeLog b/ChangeLog
index 844ef961..ce95336c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Ali aliov@xfce.org
+ * Allow compilation without network manager support, since some
+ distros doesn't have it (like Slackware).
+ * settings/xfpm-settings.c connect to the signals after settings up all
+ the widgets this way we don't get property_changed signals for nothing.
+ * Register DBus error code only once at startup to avoid a Metadata
+ warning error domain.
+ * Update README, NEWS.
+
2009-07-15: Ali aliov@xfce.org
* Provides the following standard DBus methods:
CanReboot(),CanShutdown(),Reboot(),GetPowerSaveStatus().
diff --git a/NEWS b/NEWS
index 54260ae3..68aeda78 100644
--- a/NEWS
+++ b/NEWS
@@ -1,13 +1,4 @@
-This software is a power manager for the Xfce desktop,
-laptop users can set up a power profile for two different modes
-"on battery power" and "on ac power", desktop users still can change
-DPMS settings and CPU frequency using the settings dialog.
-
-The following features are supported:
-
-Battery monitoring
-Cpu frequency settings
-Monitor DPMS settings
-Suspend/Hibernate via HAL
-LCD brightness
-Lid,sleep and power switches control
+Current
+=======
+- Make it possible to compile without network manager support.
+-
diff --git a/README b/README
index d11aa839..c6555334 100644
--- a/README
+++ b/README
@@ -1,9 +1,33 @@
-A power manager is an important software for laptop users
-This software supports alsmot all the features for making
-power management easy.
+What is it?
+===========
-This software is a part of Xfce goodies projects, in case you use it
-and you find any problems/bugs please report to:
+This software is a power manager for the Xfce desktop, Xfce power manager manages the power sources
+on the computer and the devices that can be controlled to reduce their power consumption
+(such as LCD brightness level, monitor sleep, CPU frequency scaling).
+In addition, xfce4-power-manager provides a set of freedesktop-compliant DBus interfaces to
+inform other applications about current power level so that they can adjust their power consumption.
-http://bugzilla.xfce.org/
-( Please attach the output of lshal ) \ No newline at end of file
+Required packages
+=================
+Parole depends on the following packages:
+
+ - Gtk 2.16 or above.
+ - Glib 2.16 or above.
+ - DBus 0.60 or above.
+ - DBus glib 0.70 or above.
+ - libxfcegui4 4.6.0 or above.
+ - libxfce4util 4.6.0 or above
+ - libnotify 0.4.1 or above.
+ - xfconf 4.6.0 or above.
+ - libxfce4panel 4.6.0 or above (for the panel plugins).
+ - DPMS X extension ( for DPMS support);
+
+ - HAL daemon version 0.5.6 or above is needed.
+
+How to report bugs?
+===================
+
+Bugs should be reported to the Xfce bug tracking system
+(http://bugzilla.xfce.org, product Parole). You will need to
+create an account for yourself.
+( Please attach the output of lshal )
diff --git a/configure.ac.in b/configure.ac.in
index a4dfa84d..d6a898a0 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -108,6 +108,17 @@ if test "x${ac_cv_have_decl_XF86XK_Hibernate}" != "xno"; then
fi
#=======================================================#
+# Network Manager support #
+#=======================================================#
+AC_ARG_ENABLE([network-manager], AC_HELP_STRING([--disable-network-manager], [Disable network manager support]),
+ [ac_network_manager=$enableval], [ac_network_manager=yes])
+AC_MSG_CHECKING([whether to build with network manager support.])
+if test "x$ac_network_manager = xyes"; then
+ AC_DEFINE(WITH_NETWORK_MANAGER, 1 , [Network Manager support])
+fi
+AC_MSG_RESULT([$ac_network_manager])
+
+#=======================================================#
# Panel plugins ? #
#=======================================================#
AC_ARG_ENABLE([panel_plugins],
@@ -186,9 +197,10 @@ echo "
prefix: $prefix
xdg autostart: $sysconfdir/xdg/autostart
- DPMS support: $have_dpms
- Build panel plugins: $build_panel_plugins
- Debug support: $enable_debug
+ DPMS: $have_dpms
+ Network manager: $ac_network_manager
+ Build panel: $build_panel_plugins
+ Debug: $enable_debug
--------------------------------------------------
Configuration finished, type make to compile"
diff --git a/settings/xfpm-settings.c b/settings/xfpm-settings.c
index ddfa3ac9..f9f156cb 100644
--- a/settings/xfpm-settings.c
+++ b/settings/xfpm-settings.c
@@ -1583,8 +1583,6 @@ xfpm_settings_dialog_new (XfconfChannel *channel, gboolean system_laptop,
dialog = GTK_WIDGET (gtk_builder_get_object (xml, "xfpm-settings-dialog"));
nt = GTK_WIDGET (gtk_builder_get_object (xml, "main-notebook"));
- gtk_builder_connect_signals (xml, channel);
-
xfpm_settings_on_ac (channel, user_privilege, can_suspend, can_hibernate, has_lcd_brightness, has_lid );
if ( system_laptop )
@@ -1612,4 +1610,6 @@ xfpm_settings_dialog_new (XfconfChannel *channel, gboolean system_laptop,
g_signal_connect (dialog, "response", G_CALLBACK (dialog_response_cb), channel);
gtk_widget_show (dialog);
}
+
+ gtk_builder_connect_signals (xml, channel);
}
diff --git a/src/xfpm-engine.c b/src/xfpm-engine.c
index 3a29d4bb..37352e49 100644
--- a/src/xfpm-engine.c
+++ b/src/xfpm-engine.c
@@ -734,10 +734,6 @@ xfpm_engine_dbus_class_init (XfpmEngineClass * klass)
{
dbus_g_object_type_install_info (G_TYPE_FROM_CLASS (klass),
&dbus_glib_xfpm_engine_object_info);
-
- dbus_g_error_domain_register (XFPM_ERROR,
- "org.freedesktop.PowerManagement",
- XFPM_TYPE_ERROR);
}
static void
diff --git a/src/xfpm-errors.h b/src/xfpm-errors.h
index 7100a1c4..9f990ec4 100644
--- a/src/xfpm-errors.h
+++ b/src/xfpm-errors.h
@@ -41,8 +41,8 @@ typedef enum
} XfpmError;
-GType xfpm_error_get_type () G_GNUC_CONST;
-GQuark xfpm_get_error_quark ();
+GType xfpm_error_get_type (void) G_GNUC_CONST;
+GQuark xfpm_get_error_quark (void);
G_END_DECLS
diff --git a/src/xfpm-inhibit.c b/src/xfpm-inhibit.c
index 80d49843..aac461bc 100644
--- a/src/xfpm-inhibit.c
+++ b/src/xfpm-inhibit.c
@@ -305,9 +305,6 @@ static void xfpm_inhibit_dbus_class_init (XfpmInhibitClass *klass)
dbus_g_object_type_install_info(G_TYPE_FROM_CLASS(klass),
&dbus_glib_xfpm_inhibit_object_info);
- dbus_g_error_domain_register (XFPM_ERROR,
- "org.freedesktop.PowerManagement.Inhibit",
- XFPM_TYPE_ERROR);
}
static void xfpm_inhibit_dbus_init (XfpmInhibit *inhibit)
diff --git a/src/xfpm-manager.c b/src/xfpm-manager.c
index 24afe505..bf2ee72a 100644
--- a/src/xfpm-manager.c
+++ b/src/xfpm-manager.c
@@ -45,6 +45,7 @@
#include "xfpm-engine.h"
#include "xfpm-session.h"
#include "xfpm-dbus-monitor.h"
+#include "xfpm-errors.h"
static void xfpm_manager_finalize (GObject *object);
@@ -214,6 +215,10 @@ void xfpm_manager_start (XfpmManager *manager)
xfpm_manager_reserve_names (manager);
+ dbus_g_error_domain_register (XFPM_ERROR,
+ NULL,
+ XFPM_TYPE_ERROR);
+
hal_running = xfpm_dbus_monitor_hal_connected (manager->priv->monitor);
if (!hal_running )
diff --git a/src/xfpm-network-manager.c b/src/xfpm-network-manager.c
index e978d984..57d20f0e 100644
--- a/src/xfpm-network-manager.c
+++ b/src/xfpm-network-manager.c
@@ -33,6 +33,8 @@
*/
gboolean xfpm_send_message_to_network_manager (const gchar *message)
{
+#ifdef WITH_NETWORK_MANAGER
+
DBusGConnection *bus = NULL;
DBusGProxy *proxy = NULL;
GError *error = NULL;
@@ -61,5 +63,6 @@ gboolean xfpm_send_message_to_network_manager (const gchar *message)
g_object_unref (G_OBJECT(proxy));
dbus_g_connection_unref (bus);
+#endif /* WITH_NETWORK_MANAGER */
return TRUE;
}
diff --git a/src/xfpm-shutdown.c b/src/xfpm-shutdown.c
index df76d2fb..33b9fe4f 100644
--- a/src/xfpm-shutdown.c
+++ b/src/xfpm-shutdown.c
@@ -413,7 +413,6 @@ void xfpm_shutdown (XfpmShutdown *shutdown, GError **error)
xfpm_send_message_to_network_manager ("sleep");
- //FIXME: Shutdown the system without asking the session to do.
if ( !xfpm_session_shutdown (shutdown->priv->session) )
{
if ( !xfpm_shutdown_internal (dbus_g_connection_get_connection(shutdown->priv->bus), "Shutdown", NULL))