aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTravis Reitter <travis.reitter@collabora.co.uk>2010-10-22 05:31:23 +0800
committerTravis Reitter <travis.reitter@collabora.co.uk>2010-10-22 08:43:09 +0800
commitca04b3480cf5a55767065324b29e5babb2039b37 (patch)
treed94f9068c283a710652917910a4a7580fdd83bdd
parent73c0679204bc2e268f866ca802772c3f6a26288c (diff)
downloadgsoc2013-empathy-ca04b3480cf5a55767065324b29e5babb2039b37.tar
gsoc2013-empathy-ca04b3480cf5a55767065324b29e5babb2039b37.tar.gz
gsoc2013-empathy-ca04b3480cf5a55767065324b29e5babb2039b37.tar.bz2
gsoc2013-empathy-ca04b3480cf5a55767065324b29e5babb2039b37.tar.lz
gsoc2013-empathy-ca04b3480cf5a55767065324b29e5babb2039b37.tar.xz
gsoc2013-empathy-ca04b3480cf5a55767065324b29e5babb2039b37.tar.zst
gsoc2013-empathy-ca04b3480cf5a55767065324b29e5babb2039b37.zip
Port the accounts dialog to new G/tkApplication.
Helps bgo#632846.
-rw-r--r--src/empathy-accounts.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/empathy-accounts.c b/src/empathy-accounts.c
index 4131100fb..e491ea160 100644
--- a/src/empathy-accounts.c
+++ b/src/empathy-accounts.c
@@ -135,7 +135,7 @@ account_manager_ready_for_accounts_cb (GObject *source_object,
}
static void
-app_activated_cb (GtkApplication *app)
+app_activate_cb (GApplication *app)
{
TpAccountManager *account_manager;
@@ -199,17 +199,19 @@ main (int argc, char *argv[])
gtk_window_set_default_icon_name ("empathy");
textdomain (GETTEXT_PACKAGE);
- app = gtk_application_new (EMPATHY_ACCOUNTS_DBUS_NAME, &argc, &argv);
+ app = gtk_application_new (EMPATHY_ACCOUNTS_DBUS_NAME,
+ G_APPLICATION_IS_SERVICE);
account_manager = tp_account_manager_dup ();
tp_account_manager_prepare_async (account_manager, NULL,
account_manager_ready_for_accounts_cb, selected_account_name);
- g_signal_connect (app, "activated",
- G_CALLBACK (app_activated_cb), NULL);
+ g_signal_connect (app, "activate", G_CALLBACK (app_activate_cb), NULL);
- gtk_application_run (app);
+ /* don't let this application exit automatically */
+ g_application_hold (G_APPLICATION (app));
+ g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (account_manager);
g_object_unref (app);