[Goodies-commits] r7246 - in xfce4-power-manager/trunk: . panel-plugins/brightness panel-plugins/inhibit settings src
Ali Abdallah
aliov at xfce.org
Mon Apr 20 09:22:11 CEST 2009
Author: aliov
Date: 2009-04-20 07:22:10 +0000 (Mon, 20 Apr 2009)
New Revision: 7246
Modified:
xfce4-power-manager/trunk/ChangeLog
xfce4-power-manager/trunk/panel-plugins/brightness/xfce4-brightness-plugin.desktop.in.in
xfce4-power-manager/trunk/panel-plugins/inhibit/xfce4-inhibit-plugin.desktop.in.in
xfce4-power-manager/trunk/settings/xfce4-power-manager-settings.desktop.in
xfce4-power-manager/trunk/src/org.freedesktop.PowerManagement.xml
xfce4-power-manager/trunk/src/xfpm-engine.c
Log:
Remove all encoding keys from the desktop file thanks to Yves for pointing out
Modified: xfce4-power-manager/trunk/ChangeLog
===================================================================
--- xfce4-power-manager/trunk/ChangeLog 2009-04-19 22:57:19 UTC (rev 7245)
+++ xfce4-power-manager/trunk/ChangeLog 2009-04-20 07:22:10 UTC (rev 7246)
@@ -1,4 +1,7 @@
+2009-04-20 9:22 Ali aliov at xfce.org
+ * : Remove all encoding keys from the desktop file thanks to Yves for pointing out
+
2009-04-19 12:57 Ali aliov at xfce.org
* : Fix brightness level settings issue on ibook
Modified: xfce4-power-manager/trunk/panel-plugins/brightness/xfce4-brightness-plugin.desktop.in.in
===================================================================
--- xfce4-power-manager/trunk/panel-plugins/brightness/xfce4-brightness-plugin.desktop.in.in 2009-04-19 22:57:19 UTC (rev 7245)
+++ xfce4-power-manager/trunk/panel-plugins/brightness/xfce4-brightness-plugin.desktop.in.in 2009-04-20 07:22:10 UTC (rev 7246)
@@ -1,6 +1,5 @@
[Xfce Panel]
Type=X-XFCE-PanelPlugin
-Encoding=UTF-8
_Name=Brightness plugin
_Comment=Control your LCD brightness
Icon=gpm-brightness-lcd
Modified: xfce4-power-manager/trunk/panel-plugins/inhibit/xfce4-inhibit-plugin.desktop.in.in
===================================================================
--- xfce4-power-manager/trunk/panel-plugins/inhibit/xfce4-inhibit-plugin.desktop.in.in 2009-04-19 22:57:19 UTC (rev 7245)
+++ xfce4-power-manager/trunk/panel-plugins/inhibit/xfce4-inhibit-plugin.desktop.in.in 2009-04-20 07:22:10 UTC (rev 7246)
@@ -1,6 +1,5 @@
[Xfce Panel]
Type=X-XFCE-PanelPlugin
-Encoding=UTF-8
_Name=Inhibit plugin
_Comment=Inhibit automatic power savings
Icon=gnome-inhibit-applet
Modified: xfce4-power-manager/trunk/settings/xfce4-power-manager-settings.desktop.in
===================================================================
--- xfce4-power-manager/trunk/settings/xfce4-power-manager-settings.desktop.in 2009-04-19 22:57:19 UTC (rev 7245)
+++ xfce4-power-manager/trunk/settings/xfce4-power-manager-settings.desktop.in 2009-04-20 07:22:10 UTC (rev 7246)
@@ -1,6 +1,5 @@
[Desktop Entry]
Version=1.0
-Encoding=UTF-8
_Name=Xfce 4 Power Manager
_GenericName=Power Manager
_Comment=Settings for the Xfce 4 Power Manager
Modified: xfce4-power-manager/trunk/src/org.freedesktop.PowerManagement.xml
===================================================================
--- xfce4-power-manager/trunk/src/org.freedesktop.PowerManagement.xml 2009-04-19 22:57:19 UTC (rev 7245)
+++ xfce4-power-manager/trunk/src/org.freedesktop.PowerManagement.xml 2009-04-20 07:22:10 UTC (rev 7246)
@@ -7,6 +7,9 @@
<annotation name="org.freedesktop.DBus.GLib.ClientCSymbol"
value="xfpm_engine_dbus_client"/>
+ <method name="Shutdown">
+ </method>
+
<method name="Hibernate">
</method>
Modified: xfce4-power-manager/trunk/src/xfpm-engine.c
===================================================================
--- xfce4-power-manager/trunk/src/xfpm-engine.c 2009-04-19 22:57:19 UTC (rev 7245)
+++ xfce4-power-manager/trunk/src/xfpm-engine.c 2009-04-20 07:22:10 UTC (rev 7246)
@@ -563,9 +563,11 @@
* DBus server implementation for org.freedesktop.PowerManagement
*
*/
-
+static gboolean xfpm_engine_dbus_shutdown (XfpmEngine *engine,
+ GError **error);
+
static gboolean xfpm_engine_dbus_hibernate (XfpmEngine * engine,
- GError ** error);
+ GError **error);
static gboolean xfpm_engine_dbus_suspend (XfpmEngine * engine,
GError ** error);
@@ -609,6 +611,31 @@
G_OBJECT (engine));
}
+static gboolean xfpm_engine_dbus_shutdown (XfpmEngine *engine,
+ GError **error)
+{
+ TRACE ("Hibernate message received");
+ gboolean caller_privilege, can_hibernate;
+
+ g_object_get (G_OBJECT (engine->priv->shutdown),
+ "caller-privilege", &caller_privilege,
+ "can-hibernate", &can_hibernate, NULL);
+
+ if (!caller_privilege)
+ {
+ g_set_error (error, XFPM_ERROR, XFPM_ERROR_PERMISSION_DENIED,
+ _("Permission denied"));
+ return FALSE;
+ }
+
+ if ( engine->priv->inhibited )
+ return TRUE;
+
+ xfpm_shutdown (engine->priv->shutdown, NULL);
+
+ return TRUE;
+}
+
static gboolean
xfpm_engine_dbus_hibernate (XfpmEngine * engine, GError ** error)
{
More information about the Goodies-commits
mailing list