aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-main-window.c
diff options
context:
space:
mode:
authorMike Ruprecht <mike.ruprecht@collabora.co.uk>2010-02-25 04:52:38 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-15 16:14:04 +0800
commit8e638ddd817039c0b6cdf342ce657b1b1e975b45 (patch)
tree7f1fe2a022de9f597f0466c7a0353df9dc868c25 /src/empathy-main-window.c
parentdf53944e1ba92732760d1cfe437b8b56edda526b (diff)
downloadgsoc2013-empathy-8e638ddd817039c0b6cdf342ce657b1b1e975b45.tar
gsoc2013-empathy-8e638ddd817039c0b6cdf342ce657b1b1e975b45.tar.gz
gsoc2013-empathy-8e638ddd817039c0b6cdf342ce657b1b1e975b45.tar.bz2
gsoc2013-empathy-8e638ddd817039c0b6cdf342ce657b1b1e975b45.tar.lz
gsoc2013-empathy-8e638ddd817039c0b6cdf342ce657b1b1e975b45.tar.xz
gsoc2013-empathy-8e638ddd817039c0b6cdf342ce657b1b1e975b45.tar.zst
gsoc2013-empathy-8e638ddd817039c0b6cdf342ce657b1b1e975b45.zip
Separate the debug window into its own process.
Diffstat (limited to 'src/empathy-main-window.c')
-rw-r--r--src/empathy-main-window.c32
1 files changed, 30 insertions, 2 deletions
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index 84331e7bd..c40b0df65 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -1,7 +1,7 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright (C) 2002-2007 Imendio AB
- * Copyright (C) 2007-2008 Collabora Ltd.
+ * Copyright (C) 2007-2010 Collabora Ltd.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -1095,7 +1095,35 @@ static void
main_window_help_debug_cb (GtkAction *action,
EmpathyMainWindow *window)
{
- empathy_debug_window_new (NULL);
+ GdkScreen *screen = gdk_screen_get_default ();
+ GError *error = NULL;
+ gchar *argv[2] = { NULL, };
+ gint i = 0;
+ gchar *path;
+
+ g_return_if_fail (GDK_IS_SCREEN (screen));
+
+ /* Try to run from source directory if possible */
+ path = g_build_filename (g_getenv ("EMPATHY_SRCDIR"), "src",
+ "empathy-debugger", NULL);
+
+ if (!g_file_test (path, G_FILE_TEST_EXISTS)) {
+ g_free (path);
+ path = g_build_filename (BIN_DIR, "empathy-debugger", NULL);
+ }
+
+ argv[i++] = path;
+
+ gdk_spawn_on_screen (screen, NULL, argv, NULL,
+ G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
+ NULL, NULL, NULL, &error);
+
+ if (error) {
+ g_warning ("Failed to open debug window: %s", error->message);
+ g_error_free (error);
+ }
+
+ g_free (path);
}
static void