diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-07-24 21:31:22 +0800 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.co.uk> | 2012-07-26 21:26:08 +0800 |
commit | a31a050ccad58fda65c076f370c756c1479a644e (patch) | |
tree | 4c18a1cd4277ee6f184ae2e29ff0fddbbff1fa55 /src | |
parent | d6ed1db06563305c839f193251af050cd8fc8111 (diff) | |
download | gsoc2013-empathy-a31a050ccad58fda65c076f370c756c1479a644e.tar gsoc2013-empathy-a31a050ccad58fda65c076f370c756c1479a644e.tar.gz gsoc2013-empathy-a31a050ccad58fda65c076f370c756c1479a644e.tar.bz2 gsoc2013-empathy-a31a050ccad58fda65c076f370c756c1479a644e.tar.lz gsoc2013-empathy-a31a050ccad58fda65c076f370c756c1479a644e.tar.xz gsoc2013-empathy-a31a050ccad58fda65c076f370c756c1479a644e.tar.zst gsoc2013-empathy-a31a050ccad58fda65c076f370c756c1479a644e.zip |
factor out start_from_desktop_file()
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-accounts-dialog.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index 2a630d257..8e5f32785 100644 --- a/src/empathy-accounts-dialog.c +++ b/src/empathy-accounts-dialog.c @@ -659,6 +659,22 @@ start_external_app (GAppInfo *app_info) } static void +start_from_desktop_file (const char *desktop) +{ + GDesktopAppInfo *desktop_info; + + desktop_info = g_desktop_app_info_new (desktop); + if (desktop_info == NULL) + { + g_critical ("Could not locate '%s'", desktop); + return; + } + + start_external_app (G_APP_INFO (desktop_info)); + g_object_unref (desktop_info); +} + +static void use_external_storage_provider (EmpathyAccountsDialog *self, TpAccount *account) { @@ -702,20 +718,7 @@ use_external_storage_provider (EmpathyAccountsDialog *self, } else if (!tp_strdiff (provider, "org.gnome.OnlineAccounts")) { - GDesktopAppInfo *desktop_info; - - desktop_info = g_desktop_app_info_new ( - "gnome-online-accounts-panel.desktop"); - if (desktop_info == NULL) - { - g_critical ("Could not locate 'gnome-online-accounts-panel.desktop'"); - } - else - { - start_external_app (G_APP_INFO (desktop_info)); - g_object_unref (desktop_info); - } - + start_from_desktop_file ("gnome-online-accounts-panel.desktop"); return; } else |