[empathy] factor out start_from_desktop_file()
- From: Xavier Claessens <xclaesse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] factor out start_from_desktop_file()
- Date: Thu, 26 Jul 2012 13:26:15 +0000 (UTC)
commit a31a050ccad58fda65c076f370c756c1479a644e
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Tue Jul 24 15:31:22 2012 +0200
factor out start_from_desktop_file()
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 2a630d2..8e5f327 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]