aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ka-applet.c6
-rw-r--r--src/ka-dbus.c20
-rw-r--r--src/krb5-auth-dialog.desktop.in1
3 files changed, 12 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/src/krb5-auth-dialog.desktop.in b/src/krb5-auth-dialog.desktop.in
index 6f02571..7c2223a 100644
--- a/src/krb5-auth-dialog.desktop.in
+++ b/src/krb5-auth-dialog.desktop.in
@@ -5,6 +5,7 @@ Exec=krb5-auth-dialog
Terminal=false
Type=Application
Icon=krb-valid-ticket
+Categories=GNOME;GTK;Utility;Network;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=krb5-auth-dialog
X-GNOME-Bugzilla-Component=general
bgstack15