aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-main-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/empathy-main-window.c')
-rw-r--r--src/empathy-main-window.c54
1 files changed, 15 insertions, 39 deletions
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index a9e76a286..3ecb939a4 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -1875,9 +1875,9 @@ main_window_edit_blocked_contacts_cb (GtkAction *action,
G_CALLBACK (gtk_widget_destroy), NULL);
}
-static void
-main_window_edit_preferences_cb (GtkAction *action,
- EmpathyMainWindow *window)
+void
+empathy_main_window_show_preferences (EmpathyMainWindow *window,
+ const gchar *tab)
{
EmpathyMainWindowPriv *priv = GET_PRIV (window);
@@ -1890,6 +1890,17 @@ main_window_edit_preferences_cb (GtkAction *action,
} else {
gtk_window_present (GTK_WINDOW (priv->preferences));
}
+
+ if (tab != NULL)
+ empathy_preferences_show_tab (
+ EMPATHY_PREFERENCES (priv->preferences), tab);
+}
+
+static void
+main_window_edit_preferences_cb (GtkAction *action,
+ EmpathyMainWindow *window)
+{
+ empathy_main_window_show_preferences (window, NULL);
}
static void
@@ -1903,42 +1914,7 @@ static void
main_window_help_debug_cb (GtkAction *action,
EmpathyMainWindow *window)
{
- GdkDisplay *display;
- GError *error = NULL;
- gchar *path;
- GAppInfo *app_info;
- GdkAppLaunchContext *context = NULL;
-
- /* 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);
- }
-
- app_info = g_app_info_create_from_commandline (path, NULL, 0, &error);
- if (app_info == NULL) {
- DEBUG ("Failed to create app info: %s", error->message);
- g_error_free (error);
- goto out;
- }
-
- display = gdk_display_get_default ();
- context = gdk_display_get_app_launch_context (display);
-
- if (!g_app_info_launch (app_info, NULL, (GAppLaunchContext *) context,
- &error)) {
- g_warning ("Failed to open debug window: %s", error->message);
- g_error_free (error);
- goto out;
- }
-
-out:
- tp_clear_object (&app_info);
- tp_clear_object (&context);
- g_free (path);
+ empathy_launch_program (BIN_DIR, "empathy-debugger", NULL);
}
static void