src/cc-empathy-accounts-page.c
src/cc-empathy-accounts-panel.c
src/empathy-accounts.c
+src/empathy-debugger.c
empathy-accounts
empathy-chat-chandler
empathy-call-chandler
+empathy-debugger
bin_PROGRAMS = \
empathy \
empathy-accounts \
+ empathy-debugger \
$(NULL)
BUILT_SOURCES=
libempathy-accounts-common.la \
$(NULL)
+empathy_debugger_SOURCES = \
+ empathy-debug-window.c empathy-debug-window.h \
+ empathy-debugger.c \
+ $(NULL)
+
empathy_handwritten_source = \
empathy-about-dialog.c empathy-about-dialog.h \
empathy-call-window-fullscreen.c empathy-call-window-fullscreen.h \
empathy-call-window.c empathy-call-window.h \
empathy-chat-window.c empathy-chat-window.h \
empathy-chatrooms-window.c empathy-chatrooms-window.h \
- empathy-debug-window.c empathy-debug-window.h \
empathy-event-manager.c empathy-event-manager.h \
empathy-ft-manager.c empathy-ft-manager.h \
empathy-invite-participant-dialog.c empathy-invite-participant-dialog.h \
--- /dev/null
+/*
+ * Copyright (C) 2005-2007 Imendio AB
+ * Copyright (C) 2007-2010 Collabora Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <config.h>
+
+#include <gtk/gtk.h>
+#include <glib/gi18n.h>
+
+#include <libempathy/empathy-utils.h>
+#include <libempathy-gtk/empathy-ui-utils.h>
+
+#include "empathy-debug-window.h"
+
+int
+main (int argc,
+ char **argv)
+{
+ GtkWidget *window;
+
+ g_thread_init (NULL);
+ gtk_init (&argc, &argv);
+ empathy_gtk_init ();
+
+ g_set_application_name (_(PACKAGE_NAME " Debugger"));
+
+ gtk_window_set_default_icon_name ("empathy");
+
+ window = empathy_debug_window_new (NULL);
+ g_signal_connect (window, "destroy", gtk_main_quit, NULL);
+
+ gtk_main ();
+
+ return EXIT_SUCCESS;
+}
/* -*- 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
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