]> git.0d.be Git - empathy.git/commitdiff
empathy_accounts_dialog_show_application: try to run "empathy-accounts" from source
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 16 Feb 2010 12:19:10 +0000 (12:19 +0000)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 16 Feb 2010 12:19:10 +0000 (12:19 +0000)
This fix starting the accounts dialog for people (testers mostly) using
Empathy from a not installed build.

src/empathy-accounts-dialog.c

index d438eec048db6f8cce71d87dd2ff70ff72c41a21..f6aaf07ed0c995a617369dddaeac042af3fb5819 100644 (file)
@@ -2243,7 +2243,16 @@ empathy_accounts_dialog_show_application (GdkScreen *screen,
   g_return_if_fail (GDK_IS_SCREEN (screen));
   g_return_if_fail (!selected_account || TP_IS_ACCOUNT (selected_account));
 
-  path = g_build_filename (BIN_DIR, "empathy-accounts", NULL);
+  /* Try to run from source directory if possible */
+  path = g_build_filename (g_getenv ("EMPATHY_SRCDIR"), "src",
+      "empathy-accounts", NULL);
+
+  if (!g_file_test (path, G_FILE_TEST_EXISTS))
+    {
+      g_free (path);
+      path = g_build_filename (BIN_DIR, "empathy-accounts", NULL);
+    }
+
   argv[i++] = path;
 
   if (selected_account)