diff options
author | Ted Gould <ted@gould.cx> | 2010-02-18 09:42:40 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-02-18 09:42:40 -0600 |
commit | 414afb961106144fa9339550e8654c59c1e734a0 (patch) | |
tree | e7253670c864660f8e51999b9bfdcc4447bb4ba1 | |
parent | 0220665c7ca73221e549e0f612cd16c06c93b906 (diff) | |
parent | 660778db015611be9a011e7bf805c12689def159 (diff) | |
download | ayatana-indicator-session-414afb961106144fa9339550e8654c59c1e734a0.tar.gz ayatana-indicator-session-414afb961106144fa9339550e8654c59c1e734a0.tar.bz2 ayatana-indicator-session-414afb961106144fa9339550e8654c59c1e734a0.zip |
Sync with ubuntu-desktop
-rw-r--r-- | debian/changelog | 12 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | debian/patches/01_port_to_upower.patch | 151 |
3 files changed, 163 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index 2e15527..f28b6c5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,14 @@ -indicator-session (0.2.2-0ubuntu1~ppa1) lucid; urgency=low +indicator-session (0.2.2-0ubuntu2) lucid; urgency=low + + * debian/control: Update devicekit-power dependency to upower. + * Add debian/patches/01_port_to_upower.patch: Straightforward port to + upower's D-Bus API. A more elaborate port to libupower-glib has been + proposed upstream as well, but it's not yet clear whether to use the + client library or the D-Bus API. + + -- Martin Pitt <martin.pitt@ubuntu.com> Wed, 17 Feb 2010 11:30:00 +0100 + +indicator-session (0.2.2-0ubuntu1) lucid; urgency=low * Upstream release 0.2.2 * Check the user_switching lockdown key to disable user_switching diff --git a/debian/control b/debian/control index 939784c..72076b3 100644 --- a/debian/control +++ b/debian/control @@ -20,7 +20,7 @@ Vcs-Browser: http://bazaar.launchpad.net/~ubuntu-desktop/indicator-session/ubunt Package: indicator-session Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, indicator-applet (>= 0.2), devicekit-power, gdm +Depends: ${shlibs:Depends}, ${misc:Depends}, indicator-applet (>= 0.2), upower, gdm Conflicts: gdm (<= 2.27.4-0ubuntu9), indicator-sus Replaces: indicator-sus Description: An indicator showing session management, status and user switching. diff --git a/debian/patches/01_port_to_upower.patch b/debian/patches/01_port_to_upower.patch new file mode 100644 index 0000000..f04c1c7 --- /dev/null +++ b/debian/patches/01_port_to_upower.patch @@ -0,0 +1,151 @@ +Description: Port to upower +Author: Martin Pitt <martin.pitt@ubuntu.com> +Upstream: https://code.launchpad.net/~pitti/indicator-session/upower/+merge/19472 +--- indicator-session/src/session-service.c 2010-02-16 10:25:28.000000000 +0100 ++++ indicator-session.new/src/session-service.c 2010-02-17 11:11:18.149652860 +0100 +@@ -44,9 +44,9 @@ + #include "users-service-dbus.h" + #include "lock-helper.h" + +-#define DKP_ADDRESS "org.freedesktop.DeviceKit.Power" +-#define DKP_OBJECT "/org/freedesktop/DeviceKit/Power" +-#define DKP_INTERFACE "org.freedesktop.DeviceKit.Power" ++#define UP_ADDRESS "org.freedesktop.UPower" ++#define UP_OBJECT "/org/freedesktop/UPower" ++#define UP_INTERFACE "org.freedesktop.UPower" + + #define GUEST_SESSION_LAUNCHER "/usr/share/gdm/guest-session/guest-session-launch" + +@@ -72,8 +72,8 @@ + + static DbusmenuMenuitem * root_menuitem = NULL; + static GMainLoop * mainloop = NULL; +-static DBusGProxy * dkp_main_proxy = NULL; +-static DBusGProxy * dkp_prop_proxy = NULL; ++static DBusGProxy * up_main_proxy = NULL; ++static DBusGProxy * up_prop_proxy = NULL; + + static DBusGProxyCall * suspend_call = NULL; + static DBusGProxyCall * hibernate_call = NULL; +@@ -147,14 +147,14 @@ + { + gchar * type = (gchar *)userdata; + +- if (dkp_main_proxy == NULL) { +- g_warning("Can not %s as no DeviceKit Power Proxy", type); ++ if (up_main_proxy == NULL) { ++ g_warning("Can not %s as no upower proxy", type); + } + + screensaver_throttle(type); + lock_screen(NULL, 0, NULL); + +- dbus_g_proxy_begin_call(dkp_main_proxy, ++ dbus_g_proxy_begin_call(up_main_proxy, + type, + sleep_response, + NULL, +@@ -213,17 +213,17 @@ + /* A signal that we need to recheck to ensure we can still + hibernate and/or suspend */ + static void +-dpk_changed_cb (DBusGProxy * proxy, gpointer user_data) ++up_changed_cb (DBusGProxy * proxy, gpointer user_data) + { + /* Start Async call to see if we can hibernate */ + if (suspend_call == NULL) { +- suspend_call = dbus_g_proxy_begin_call(dkp_prop_proxy, ++ suspend_call = dbus_g_proxy_begin_call(up_prop_proxy, + "Get", + suspend_prop_cb, + NULL, + NULL, + G_TYPE_STRING, +- DKP_INTERFACE, ++ UP_INTERFACE, + G_TYPE_STRING, + "can-suspend", + G_TYPE_INVALID, +@@ -233,13 +233,13 @@ + + /* Start Async call to see if we can suspend */ + if (hibernate_call == NULL) { +- hibernate_call = dbus_g_proxy_begin_call(dkp_prop_proxy, ++ hibernate_call = dbus_g_proxy_begin_call(up_prop_proxy, + "Get", + hibernate_prop_cb, + NULL, + NULL, + G_TYPE_STRING, +- DKP_INTERFACE, ++ UP_INTERFACE, + G_TYPE_STRING, + "can-hibernate", + G_TYPE_INVALID, +@@ -254,39 +254,39 @@ + DKp checking. We're even setting up the calls for the props + we need */ + static void +-setup_dkp (void) { ++setup_up (void) { + DBusGConnection * bus = dbus_g_bus_get(DBUS_BUS_SYSTEM, NULL); + g_return_if_fail(bus != NULL); + +- if (dkp_main_proxy == NULL) { +- dkp_main_proxy = dbus_g_proxy_new_for_name(bus, +- DKP_ADDRESS, +- DKP_OBJECT, +- DKP_INTERFACE); +- } +- g_return_if_fail(dkp_main_proxy != NULL); +- +- if (dkp_prop_proxy == NULL) { +- dkp_prop_proxy = dbus_g_proxy_new_for_name(bus, +- DKP_ADDRESS, +- DKP_OBJECT, ++ if (up_main_proxy == NULL) { ++ up_main_proxy = dbus_g_proxy_new_for_name(bus, ++ UP_ADDRESS, ++ UP_OBJECT, ++ UP_INTERFACE); ++ } ++ g_return_if_fail(up_main_proxy != NULL); ++ ++ if (up_prop_proxy == NULL) { ++ up_prop_proxy = dbus_g_proxy_new_for_name(bus, ++ UP_ADDRESS, ++ UP_OBJECT, + DBUS_INTERFACE_PROPERTIES); + } +- g_return_if_fail(dkp_prop_proxy != NULL); ++ g_return_if_fail(up_prop_proxy != NULL); + + /* Connect to changed signal */ +- dbus_g_proxy_add_signal(dkp_main_proxy, ++ dbus_g_proxy_add_signal(up_main_proxy, + "Changed", + G_TYPE_INVALID); + +- dbus_g_proxy_connect_signal(dkp_main_proxy, ++ dbus_g_proxy_connect_signal(up_main_proxy, + "Changed", +- G_CALLBACK(dpk_changed_cb), ++ G_CALLBACK(up_changed_cb), + NULL, + NULL); + + /* Force an original "changed" event */ +- dpk_changed_cb(dkp_main_proxy, NULL); ++ up_changed_cb(up_main_proxy, NULL); + + return; + } +@@ -639,7 +639,7 @@ + G_CALLBACK (user_removed), + root_menuitem); + +- setup_dkp(); ++ setup_up(); + + DbusmenuServer * server = dbusmenu_server_new(INDICATOR_SESSION_DBUS_OBJECT); + dbusmenu_server_set_root(server, root_menuitem); |