]> git.0d.be Git - empathy.git/blobdiff - src/empathy-main-window.c
Merge branch 'people-nearby-fake-group-613558'
[empathy.git] / src / empathy-main-window.c
index 84331e7bd92f37e22d89f0423df0982290e905cf..635627e742c865a6240389858c99223ba67e71e1 100644 (file)
@@ -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
@@ -362,7 +362,7 @@ main_window_error_edit_clicked_cb (GtkButton *button,
        account = g_object_get_data (G_OBJECT (button), "account");
 
        empathy_accounts_dialog_show_application (
-                       gtk_widget_get_screen (GTK_WIDGET (button)), NULL, NULL,
+                       gtk_widget_get_screen (GTK_WIDGET (button)),
                        account, FALSE, FALSE);
 
        main_window_remove_error (window, account);
@@ -424,6 +424,7 @@ main_window_error_display (EmpathyMainWindow *window,
        label = gtk_label_new (str);
        gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
        gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
+       gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
        gtk_widget_show (label);
        g_free (str);
 
@@ -656,6 +657,7 @@ main_window_destroy_cb (GtkWidget         *widget,
                                              window);
        g_object_unref (window->event_manager);
        g_object_unref (window->ui_manager);
+       g_object_unref (window->chatroom_manager);
 
        g_free (window);
 }
@@ -1067,7 +1069,7 @@ main_window_edit_accounts_cb (GtkAction         *action,
                              EmpathyMainWindow *window)
 {
        empathy_accounts_dialog_show_application (gdk_screen_get_default (),
-                       NULL, NULL, NULL, FALSE, FALSE);
+                       NULL, FALSE, FALSE);
 }
 
 static void
@@ -1095,7 +1097,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,
+                       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
@@ -1117,7 +1147,7 @@ main_window_throbber_button_press_event_cb (GtkWidget         *throbber_ebox,
 
        empathy_accounts_dialog_show_application (
                        gtk_widget_get_screen (GTK_WIDGET (throbber_ebox)),
-                       NULL, NULL, NULL, FALSE, FALSE);
+                       NULL, FALSE, FALSE);
 
        return FALSE;
 }
@@ -1277,7 +1307,7 @@ empathy_main_window_show (void)
        GSList                   *l;
 
        if (main_window) {
-               empathy_window_present (GTK_WINDOW (main_window->window), TRUE);
+               empathy_window_present (GTK_WINDOW (main_window->window));
                return main_window->window;
        }