aboutsummaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2011-09-27 23:41:17 +0200
committerGuido Günther <agx@sigxcpu.org>2011-09-27 23:41:26 +0200
commit61ad4080943d4cba8f09b3e5f04c8caee0070456 (patch)
tree1cab3fa7aa0ccf44cd87853c88c8e906c2a2a85b /debian
parentNew patch 0001-Add-categories-to-desktop-file.patch (diff)
downloadkrb5-auth-dialog-61ad4080943d4cba8f09b3e5f04c8caee0070456.tar.gz
krb5-auth-dialog-61ad4080943d4cba8f09b3e5f04c8caee0070456.tar.bz2
krb5-auth-dialog-61ad4080943d4cba8f09b3e5f04c8caee0070456.zip
New patch 0002-Register-org.gnome.KrbAuthDialog-early.patch
Register org.gnome.KrbAuthDialog early
Diffstat (limited to 'debian')
-rw-r--r--debian/patches/0002-Register-org.gnome.KrbAuthDialog-early.patch84
-rw-r--r--debian/patches/series2
2 files changed, 86 insertions, 0 deletions
diff --git a/debian/patches/0002-Register-org.gnome.KrbAuthDialog-early.patch b/debian/patches/0002-Register-org.gnome.KrbAuthDialog-early.patch
new file mode 100644
index 0000000..14bccfc
--- /dev/null
+++ b/debian/patches/0002-Register-org.gnome.KrbAuthDialog-early.patch
@@ -0,0 +1,84 @@
+From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
+Date: Tue, 27 Sep 2011 20:47:54 +0200
+Subject: Register org.gnome.KrbAuthDialog early
+
+and get the bus via g_bus_get_sync unbreak DBus activation.
+---
+ src/ka-applet.c | 6 ++----
+ src/ka-dbus.c | 20 +++++++++-----------
+ 2 files changed, 11 insertions(+), 15 deletions(-)
+
+diff --git a/src/ka-applet.c b/src/ka-applet.c
+index f1fffbf..56d4b14 100644
+--- a/src/ka-applet.c
++++ b/src/ka-applet.c
+@@ -188,10 +188,6 @@ ka_applet_startup (GApplication *application)
+ KA_DEBUG ("Primary application");
+
+ self->priv->startup_ccache = ka_kerberos_init (self);
+- if (!ka_dbus_connect (self)) {
+- ka_applet_destroy (self);
+- }
+-
+ main_window = ka_main_window_create (self, self->priv->uixml);
+ gtk_application_add_window (GTK_APPLICATION(self), main_window);
+ ka_preferences_window_create (self, self->priv->uixml);
+@@ -1080,6 +1076,8 @@ ka_applet_create ()
+ applet->priv->loader = ka_plugin_loader_create (applet);
+ g_return_val_if_fail (applet->priv->loader != NULL, NULL);
+
++ g_return_val_if_fail (ka_dbus_connect (applet), NULL);
++
+ return applet;
+ }
+
+diff --git a/src/ka-dbus.c b/src/ka-dbus.c
+index 2b84adc..c88561e 100644
+--- a/src/ka-dbus.c
++++ b/src/ka-dbus.c
+@@ -169,15 +169,11 @@ static const GDBusInterfaceVTable interface_vtable =
+ };
+
+
+-static void
+-ka_dbus_on_get_bus_cb (GObject *source_object G_GNUC_UNUSED,
+- GAsyncResult *res,
+- gpointer user_data)
++static gboolean
++ka_dbus_register (KaApplet *applet)
+ {
+- KaApplet *applet = user_data;
+ guint id;
+
+- dbus_connection = g_bus_get_finish (res, NULL);
+ introspection_data = g_dbus_node_info_new_for_xml (
+ ka_dbus_introspection_xml,
+ NULL);
+@@ -189,9 +185,10 @@ ka_dbus_on_get_bus_cb (GObject *source_object G_GNUC_UNUSED,
+ applet,
+ NULL, /* user_data_free_func */
+ NULL); /* GError** */
+- if (!id)
+- g_error ("Failed to register DBus object");
++
++ g_return_val_if_fail(id, FALSE);
+ ka_dbus_connect_signals (applet);
++ return TRUE;
+ }
+
+
+@@ -212,9 +209,10 @@ ka_dbus_connect (KaApplet *applet)
+ {
+ g_return_val_if_fail (applet != 0, FALSE);
+
+- g_bus_get (G_BUS_TYPE_SESSION, NULL, ka_dbus_on_get_bus_cb,
+- applet);
+- return TRUE;
++ dbus_connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
++ g_return_val_if_fail (dbus_connection != NULL, FALSE);
++
++ return ka_dbus_register(applet);
+ }
+
+ /*
+--
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..49ba7c1
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+0001-Add-categories-to-desktop-file.patch
+0002-Register-org.gnome.KrbAuthDialog-early.patch
bgstack15