aboutsummaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-02-23 00:07:37 -0600
committerTed Gould <ted@gould.cx>2012-02-23 00:07:37 -0600
commit03eb7d3b9f24baa087d5442d4e50c33b287ffd11 (patch)
treeaefef4756eb0fb3bad3d70851398c01a8ef68858 /debian
parent60dc34ccdc9f29862ac4a6bfab98bbeeb1f30153 (diff)
parent9f20c997bf637e5f382c4247503dd6e2a774b48a (diff)
downloadayatana-indicator-messages-03eb7d3b9f24baa087d5442d4e50c33b287ffd11.tar.gz
ayatana-indicator-messages-03eb7d3b9f24baa087d5442d4e50c33b287ffd11.tar.bz2
ayatana-indicator-messages-03eb7d3b9f24baa087d5442d4e50c33b287ffd11.zip
Merging Ubuntu Desktop
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog18
-rw-r--r--debian/control1
-rw-r--r--debian/patches/series1
-rw-r--r--debian/patches/tell-accounts-service.patch240
-rw-r--r--debian/source/format1
5 files changed, 260 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index c9a7c54..41e0896 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,20 @@
-indicator-messages (0.5.91-0ubuntu1~ppa1) precise; urgency=low
+indicator-messages (0.5.91-0ubuntu3) precise; urgency=low
+
+ * debian/source/format:
+ - Make "3.0 (quilt)"
+ * debian/patches/tell-accounts-service.patch:
+ - Tell accountsservice when user has messages for the benefit of
+ LightDM.
+
+ -- Michael Terry <mterry@ubuntu.com> Wed, 15 Feb 2012 15:32:16 -0500
+
+indicator-messages (0.5.91-0ubuntu2) precise; urgency=low
+
+ * debian/control: build-depends on dh-autoreconf as well
+
+ -- Sebastien Bacher <seb128@ubuntu.com> Tue, 14 Feb 2012 23:50:15 +0100
+
+indicator-messages (0.5.91-0ubuntu1) precise; urgency=low
* New upstream release.
* Better lozenges that look nice
diff --git a/debian/control b/debian/control
index 9db6511..4c623c8 100644
--- a/debian/control
+++ b/debian/control
@@ -6,6 +6,7 @@ XSBC-Original-Maintainer: The Ayatana Packagers <pkg-ayatana-devel@lists.alioth.
Uploaders: Evgeni Golov <evgeni@debian.org>
Build-Depends: debhelper (>= 5.0),
cdbs (>= 0.4.41),
+ dh-autoreconf,
libgtk2.0-dev (>= 2.12.0),
libgtk-3-dev,
libdbus-glib-1-dev,
diff --git a/debian/patches/series b/debian/patches/series
index e69de29..e4b5738 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -0,0 +1 @@
+tell-accounts-service.patch
diff --git a/debian/patches/tell-accounts-service.patch b/debian/patches/tell-accounts-service.patch
new file mode 100644
index 0000000..05b59f4
--- /dev/null
+++ b/debian/patches/tell-accounts-service.patch
@@ -0,0 +1,240 @@
+Index: indicator-messages/src/messages-service-dbus.c
+===================================================================
+--- indicator-messages.orig/src/messages-service-dbus.c 2012-02-15 14:36:39.800065000 -0500
++++ indicator-messages/src/messages-service-dbus.c 2012-02-15 14:39:02.823505930 -0500
+@@ -42,6 +42,8 @@
+ struct _MessageServiceDbusPrivate
+ {
+ GDBusConnection * connection;
++ GCancellable * accounts_cancel;
++ GDBusProxy * accounts_user;
+ gboolean dot;
+ gboolean hidden;
+ };
+@@ -155,9 +157,199 @@
+ }
+
+ static void
++accounts_notify_cb (GObject *source_object, GAsyncResult *res,
++ gpointer user_data)
++{
++ GError * error = NULL;
++ GVariant * answer = g_dbus_proxy_call_finish(G_DBUS_PROXY(source_object), res, &error);
++
++ if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
++ g_error_free(error);
++ return; /* Must exit before accessing freed memory */
++ }
++
++ MessageServiceDbusPrivate * priv = MESSAGE_SERVICE_DBUS_GET_PRIVATE(user_data);
++
++ if (priv->accounts_cancel != NULL) {
++ g_object_unref(priv->accounts_cancel);
++ priv->accounts_cancel = NULL;
++ }
++
++ if (error != NULL) {
++ g_warning("Unable to get notify accounts service of message status: %s", error->message);
++ g_error_free(error);
++ return;
++ }
++
++ g_variant_unref (answer);
++}
++
++static void
++accounts_notify (MessageServiceDbus *self)
++{
++ MessageServiceDbusPrivate * priv = MESSAGE_SERVICE_DBUS_GET_PRIVATE(self);
++
++ if (priv->accounts_user == NULL)
++ return; /* We're not able to talk to accounts service */
++
++ if (priv->accounts_cancel != NULL) {
++ /* Cancel old notify before starting new one */
++ g_cancellable_cancel(priv->accounts_cancel);
++ g_object_unref(priv->accounts_cancel);
++ priv->accounts_cancel = NULL;
++ }
++
++ priv->accounts_cancel = g_cancellable_new();
++ g_dbus_proxy_call(priv->accounts_user,
++ "SetXHasMessages",
++ g_variant_new ("(b)", priv->dot),
++ G_DBUS_CALL_FLAGS_NONE,
++ -1, /* timeout */
++ priv->accounts_cancel,
++ accounts_notify_cb,
++ self);
++}
++
++static void
++get_accounts_user_proxy_cb (GObject *source_object, GAsyncResult *res,
++ gpointer user_data)
++{
++ GError * error = NULL;
++ GDBusProxy * proxy = g_dbus_proxy_new_for_bus_finish(res, &error);
++
++ if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
++ g_error_free(error);
++ return; /* Must exit before accessing freed memory */
++ }
++
++ MessageServiceDbusPrivate * priv = MESSAGE_SERVICE_DBUS_GET_PRIVATE(user_data);
++
++ if (priv->accounts_cancel != NULL) {
++ g_object_unref(priv->accounts_cancel);
++ priv->accounts_cancel = NULL;
++ }
++
++ if (error != NULL) {
++ g_warning("Unable to get proxy of accountsservice: %s", error->message);
++ g_error_free(error);
++ return;
++ }
++
++ priv->accounts_user = proxy;
++ accounts_notify (MESSAGE_SERVICE_DBUS (user_data));
++}
++
++static void
++get_accounts_user_find_user_cb (GObject *source_object, GAsyncResult *res,
++ gpointer user_data)
++{
++ GError * error = NULL;
++ GVariant * answer = g_dbus_proxy_call_finish(G_DBUS_PROXY(source_object), res, &error);
++
++ /* We're done with main accounts proxy now */
++ g_object_unref (source_object);
++
++ if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
++ g_error_free(error);
++ return; /* Must exit before accessing freed memory */
++ }
++
++ MessageServiceDbusPrivate * priv = MESSAGE_SERVICE_DBUS_GET_PRIVATE(user_data);
++
++ if (priv->accounts_cancel != NULL) {
++ g_object_unref(priv->accounts_cancel);
++ priv->accounts_cancel = NULL;
++ }
++
++ if (error != NULL) {
++ g_warning("Unable to get object name of user from accountsservice: %s", error->message);
++ g_error_free(error);
++ return;
++ }
++
++ if (!g_variant_is_of_type (answer, G_VARIANT_TYPE ("(o)"))) {
++ g_warning("Unexpected type from FindUserByName: %s", g_variant_get_type_string (answer));
++ g_variant_unref(answer);
++ return;
++ }
++
++ const gchar *path;
++ g_variant_get(answer, "(&o)", &path);
++
++ priv->accounts_cancel = g_cancellable_new();
++ g_dbus_proxy_new_for_bus(G_BUS_TYPE_SYSTEM,
++ G_DBUS_PROXY_FLAGS_NONE,
++ NULL,
++ "org.freedesktop.Accounts",
++ path,
++ "org.freedesktop.Accounts.User",
++ priv->accounts_cancel,
++ get_accounts_user_proxy_cb,
++ user_data);
++
++ g_variant_unref (answer);
++}
++
++static void
++get_accounts_proxy_cb (GObject *source_object, GAsyncResult *res,
++ gpointer user_data)
++{
++ GError * error = NULL;
++ GDBusProxy * proxy = g_dbus_proxy_new_for_bus_finish(res, &error);
++
++ if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
++ g_error_free(error);
++ return; /* Must exit before accessing freed memory */
++ }
++
++ MessageServiceDbusPrivate * priv = MESSAGE_SERVICE_DBUS_GET_PRIVATE(user_data);
++
++ if (priv->accounts_cancel != NULL) {
++ g_object_unref(priv->accounts_cancel);
++ priv->accounts_cancel = NULL;
++ }
++
++ if (error != NULL) {
++ g_warning("Unable to get proxy of accountsservice: %s", error->message);
++ g_error_free(error);
++ return;
++ }
++
++ priv->accounts_cancel = g_cancellable_new();
++ g_dbus_proxy_call(proxy,
++ "FindUserByName",
++ g_variant_new ("(s)", g_get_user_name ()),
++ G_DBUS_CALL_FLAGS_NONE,
++ -1, /* timeout */
++ priv->accounts_cancel,
++ get_accounts_user_find_user_cb,
++ user_data);
++}
++
++static void
++get_accounts_proxy (MessageServiceDbus *self)
++{
++ MessageServiceDbusPrivate * priv = MESSAGE_SERVICE_DBUS_GET_PRIVATE(self);
++
++ g_return_if_fail(priv->accounts_cancel == NULL);
++
++ priv->accounts_cancel = g_cancellable_new();
++ g_dbus_proxy_new_for_bus(G_BUS_TYPE_SYSTEM,
++ G_DBUS_PROXY_FLAGS_NONE,
++ NULL,
++ "org.freedesktop.Accounts",
++ "/org/freedesktop/Accounts",
++ "org.freedesktop.Accounts",
++ priv->accounts_cancel,
++ get_accounts_proxy_cb,
++ self);
++}
++
++static void
+ message_service_dbus_init (MessageServiceDbus *self)
+ {
+ g_bus_get(G_BUS_TYPE_SESSION, NULL, connection_cb, self);
++ get_accounts_proxy (self);
+
+ MessageServiceDbusPrivate * priv = MESSAGE_SERVICE_DBUS_GET_PRIVATE(self);
+
+@@ -177,6 +369,17 @@
+ priv->connection = NULL;
+ }
+
++ if (priv->accounts_cancel != NULL) {
++ g_cancellable_cancel(priv->accounts_cancel);
++ g_object_unref(priv->accounts_cancel);
++ priv->accounts_cancel = NULL;
++ }
++
++ if (priv->accounts_user != NULL) {
++ g_object_unref(priv->accounts_user);
++ priv->accounts_user = NULL;
++ }
++
+ G_OBJECT_CLASS (message_service_dbus_parent_class)->dispose (object);
+ return;
+ }
+@@ -240,6 +443,8 @@
+ g_variant_new("(b)", priv->dot),
+ NULL);
+ }
++
++ accounts_notify (self);
+ }
+ return;
+ }
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)