]> git.0d.be Git - empathy.git/blobdiff - src/empathy-main-window.c
Merge branch 'debug-window'
[empathy.git] / src / empathy-main-window.c
index 4b1af853d55680a95cddff43f6035bded66b0611..8fb127b90c2a6b2a93f653724af3e86d5373d1fa 100644 (file)
 #include <libempathy-gtk/empathy-sound.h>
 #include <libempathy-gtk/empathy-ui-utils.h>
 
-#include <libmissioncontrol/mission-control.h>
-
 #include "empathy-accounts-dialog.h"
 #include "empathy-main-window.h"
 #include "ephy-spinner.h"
 #include "empathy-preferences.h"
 #include "empathy-about-dialog.h"
-#include "empathy-debug-dialog.h"
+#include "empathy-debug-window.h"
 #include "empathy-new-chatroom-dialog.h"
 #include "empathy-map-view.h"
 #include "empathy-chatrooms-window.h"
@@ -81,7 +79,6 @@
 typedef struct {
        EmpathyContactListView  *list_view;
        EmpathyContactListStore *list_store;
-       MissionControl          *mc;
        EmpathyAccountManager   *account_manager;
        EmpathyChatroomManager  *chatroom_manager;
        EmpathyEventManager     *event_manager;
@@ -611,7 +608,7 @@ main_window_accels_load (void)
 {
        gchar *filename;
 
-       filename = g_build_filename (g_get_home_dir (), ".gnome2", PACKAGE_NAME, ACCELS_FILENAME, NULL);
+       filename = g_build_filename (g_get_user_config_dir (), PACKAGE_NAME, ACCELS_FILENAME, NULL);
        if (g_file_test (filename, G_FILE_TEST_EXISTS)) {
                DEBUG ("Loading from:'%s'", filename);
                gtk_accel_map_load (filename);
@@ -626,7 +623,7 @@ main_window_accels_save (void)
        gchar *dir;
        gchar *file_with_path;
 
-       dir = g_build_filename (g_get_home_dir (), ".gnome2", PACKAGE_NAME, NULL);
+       dir = g_build_filename (g_get_user_config_dir (), PACKAGE_NAME, NULL);
        g_mkdir_with_parents (dir, S_IRUSR | S_IWUSR | S_IXUSR);
        file_with_path = g_build_filename (dir, ACCELS_FILENAME, NULL);
        g_free (dir);
@@ -654,7 +651,6 @@ main_window_destroy_cb (GtkWidget         *widget,
 
        g_list_free (window->actions_connected);
 
-       g_object_unref (window->mc);
        g_object_unref (window->account_manager);
        g_object_unref (window->list_store);
        g_hash_table_destroy (window->errors);
@@ -739,7 +735,7 @@ main_window_notify_sort_contact_cb (EmpathyConf       *conf,
                enum_class = G_ENUM_CLASS (g_type_class_peek (type));
                enum_value = g_enum_get_value_by_nick (enum_class, str);
                if (enum_value) {
-                       /* By changing the value of the GtkRadioAction, 
+                       /* By changing the value of the GtkRadioAction,
                           it emits a signal that calls main_window_view_sort_contacts_cb
                           which updates the contacts list */
                        gtk_radio_action_set_current_value (window->sort_by_name,
@@ -1068,7 +1064,7 @@ static void
 main_window_help_debug_cb (GtkAction         *action,
                           EmpathyMainWindow *window)
 {
-       empathy_debug_dialog_new (GTK_WINDOW (window->window));
+       empathy_debug_window_new (GTK_WINDOW (window->window));
 }
 
 static void
@@ -1252,15 +1248,14 @@ empathy_main_window_show (void)
        gtk_action_set_visible (show_map_widget, FALSE);
 #endif
 
-       window->mc = empathy_mission_control_dup_singleton ();
        window->account_manager = empathy_account_manager_dup_singleton ();
 
        g_signal_connect (window->account_manager,
                          "account-connection-changed",
                          G_CALLBACK (main_window_connection_changed_cb), window);
 
-       window->errors = g_hash_table_new_full (empathy_account_hash,
-                                               empathy_account_equal,
+       window->errors = g_hash_table_new_full (g_direct_hash,
+                                               g_direct_equal,
                                                g_object_unref,
                                                NULL);
 
@@ -1409,6 +1404,8 @@ empathy_main_window_show (void)
 
        main_window_update_status (window, window->account_manager);
 
+       gtk_widget_show (window->window);
+
        return window->window;
 }