]> git.0d.be Git - empathy.git/blobdiff - src/empathy-accounts-dialog.c
factor out empathy_launch_external_app()
[empathy.git] / src / empathy-accounts-dialog.c
index 74e2e3d69d55d0db926b4445a740f492c9a1d98f..a4096b86f7cf0c91d06bdcbcdbb7d6c12a9cc509 100644 (file)
@@ -661,22 +661,6 @@ start_external_app (GAppInfo *app_info)
   tp_clear_object (&context);
 }
 
-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)
@@ -721,12 +705,12 @@ use_external_storage_provider (EmpathyAccountsDialog *self,
     }
   else if (!tp_strdiff (provider, EMPATHY_GOA_PROVIDER))
     {
-      start_from_desktop_file ("gnome-online-accounts-panel.desktop");
+      empathy_launch_external_app ("gnome-online-accounts-panel.desktop", NULL);
       return;
     }
   else if (!tp_strdiff (provider, EMPATHY_UOA_PROVIDER))
     {
-      start_from_desktop_file ("gnome-credentials-panel.desktop");
+      empathy_launch_external_app ("gnome-credentials-panel.desktop", NULL);
       return;
     }
   else