]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-individual-information-dialog.c
don't pass a GError when first trying to start gnome-contacts
[empathy.git] / libempathy-gtk / empathy-individual-information-dialog.c
index 2e8fcb666a5372aa7a8fb057a4e95e769d606644..baa1e4c0409e45acd57f996b31aae1a8a66a0a60 100644 (file)
  *          Travis Reitter <travis.reitter@collabora.co.uk>
  */
 
-#include <config.h>
-
-#include <string.h>
-#include <stdlib.h>
+#include "config.h"
+#include "empathy-individual-information-dialog.h"
 
-#include <gtk/gtk.h>
 #include <glib/gi18n-lib.h>
-#include <gio/gdesktopappinfo.h>
-
-#include <telepathy-glib/util.h>
-#include <folks/folks.h>
-#include <folks/folks-telepathy.h>
-
-#include <libempathy/empathy-individual-manager.h>
-#include <libempathy/empathy-utils.h>
-#include <libempathy/empathy-pkg-kit.h>
 
-#include "empathy-individual-information-dialog.h"
+#include "empathy-individual-manager.h"
 #include "empathy-individual-widget.h"
+#include "empathy-pkg-kit.h"
 #include "empathy-ui-utils.h"
+#include "empathy-utils.h"
 
 #define DEBUG_FLAG EMPATHY_DEBUG_CONTACT
-#include <libempathy/empathy-debug.h>
+#include "empathy-debug.h"
 
 #define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyIndividualInformationDialog)
 typedef struct {
@@ -380,7 +370,11 @@ start_gnome_contacts (FolksIndividual *individual,
 
   args = g_strdup_printf ("-i %s", folks_individual_get_id (individual));
 
-  if (!empathy_launch_external_app ("gnome-contacts.desktop", args, &error))
+  /* First try the old desktop name */
+  if (empathy_launch_external_app ("gnome-contacts.desktop", args, NULL))
+    goto out;
+
+  if (!empathy_launch_external_app ("org.gnome.Contacts.desktop", args, &error))
     {
       if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
         {
@@ -400,6 +394,7 @@ start_gnome_contacts (FolksIndividual *individual,
         }
     }
 
+out:
   g_free (args);
 }