[Xfce4-commits] <xfce4-power-manager:master> Support NetworkManager 0.9
Ali Abdallah
noreply at xfce.org
Thu May 12 11:38:01 CEST 2011
Updating branch refs/heads/master
to 2a8d115e4172c4d09be86cb8182af89b97e1250b (commit)
from 982896227688e2dfdfef976f1a19024aefbc9f28 (commit)
commit 2a8d115e4172c4d09be86cb8182af89b97e1250b
Author: Mikhail Efremov <sem at altlinux.org>
Date: Tue Mar 15 19:59:50 2011 +0300
Support NetworkManager 0.9
src/xfpm-network-manager.c | 5 ++---
src/xfpm-network-manager.h | 2 +-
src/xfpm-power.c | 4 ++--
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/xfpm-network-manager.c b/src/xfpm-network-manager.c
index 651f746..908b813 100644
--- a/src/xfpm-network-manager.c
+++ b/src/xfpm-network-manager.c
@@ -29,9 +29,8 @@
/*
* Inform the Network Manager when we do suspend/hibernate
- * message is either "wake" or "sleep"
*/
-gboolean xfpm_send_message_to_network_manager (const gchar *message)
+gboolean xfpm_network_manager_sleep (gboolean sleep)
{
#ifdef WITH_NETWORK_MANAGER
@@ -59,7 +58,7 @@ gboolean xfpm_send_message_to_network_manager (const gchar *message)
return FALSE;
}
- dbus_g_proxy_call_no_reply (proxy, message, G_TYPE_INVALID);
+ dbus_g_proxy_call_no_reply (proxy, "Sleep", G_TYPE_BOOLEAN, sleep, G_TYPE_INVALID);
g_object_unref (G_OBJECT(proxy));
dbus_g_connection_unref (bus);
diff --git a/src/xfpm-network-manager.h b/src/xfpm-network-manager.h
index 9d77ab8..51d0987 100644
--- a/src/xfpm-network-manager.h
+++ b/src/xfpm-network-manager.h
@@ -23,7 +23,7 @@
G_BEGIN_DECLS
-gboolean xfpm_send_message_to_network_manager (const gchar *message);
+gboolean xfpm_network_manager_sleep (gboolean sleep);
G_END_DECLS
diff --git a/src/xfpm-power.c b/src/xfpm-power.c
index bbe1a77..d22e502 100644
--- a/src/xfpm-power.c
+++ b/src/xfpm-power.c
@@ -337,7 +337,7 @@ xfpm_power_sleep (XfpmPower *power, const gchar *sleep_time, gboolean force)
}
g_signal_emit (G_OBJECT (power), signals [SLEEPING], 0);
- xfpm_send_message_to_network_manager ("sleep");
+ xfpm_network_manager_sleep (TRUE);
g_object_get (G_OBJECT (power->priv->conf),
LOCK_SCREEN_ON_SLEEP, &lock_screen,
@@ -373,7 +373,7 @@ xfpm_power_sleep (XfpmPower *power, const gchar *sleep_time, gboolean force)
}
g_signal_emit (G_OBJECT (power), signals [WAKING_UP], 0);
- xfpm_send_message_to_network_manager ("wake");
+ xfpm_network_manager_sleep (FALSE);
}
static void
More information about the Xfce4-commits
mailing list