aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-main-window.c
diff options
context:
space:
mode:
authorPierre-Luc Beaudoin <pierre-luc@pierlux.com>2009-05-11 09:09:40 +0800
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>2009-05-28 00:52:04 +0800
commit30165e135359e217e7a9581277f8bf9b7b5c7459 (patch)
tree015c8956ea3b4a20a48b5e7187e1ad3e51c0d680 /src/empathy-main-window.c
parentc43cfe015de9771fb20c718039f5ea09e56ae1c7 (diff)
downloadgsoc2013-empathy-30165e135359e217e7a9581277f8bf9b7b5c7459.tar
gsoc2013-empathy-30165e135359e217e7a9581277f8bf9b7b5c7459.tar.gz
gsoc2013-empathy-30165e135359e217e7a9581277f8bf9b7b5c7459.tar.bz2
gsoc2013-empathy-30165e135359e217e7a9581277f8bf9b7b5c7459.tar.lz
gsoc2013-empathy-30165e135359e217e7a9581277f8bf9b7b5c7459.tar.xz
gsoc2013-empathy-30165e135359e217e7a9581277f8bf9b7b5c7459.tar.zst
gsoc2013-empathy-30165e135359e217e7a9581277f8bf9b7b5c7459.zip
Add a Contact Map window
Diffstat (limited to 'src/empathy-main-window.c')
-rw-r--r--src/empathy-main-window.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index d453fed44..b21464834 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -56,6 +56,7 @@
#include "empathy-preferences.h"
#include "empathy-about-dialog.h"
#include "empathy-new-chatroom-dialog.h"
+#include "empathy-map-view.h"
#include "empathy-chatrooms-window.h"
#include "empathy-event-manager.h"
#include "empathy-ft-manager.h"
@@ -714,6 +715,15 @@ main_window_view_show_offline_cb (GtkToggleAction *action,
//empathy_sound_set_enabled (TRUE);
}
+#if HAVE_LIBCHAMPLAIN
+static void
+main_window_view_show_map_cb (GtkCheckMenuItem *item,
+ EmpathyMainWindow *window)
+{
+ empathy_map_view_show (window->list_store);
+}
+#endif
+
static void
main_window_favorite_chatroom_join (EmpathyChatroom *chatroom)
{
@@ -1097,6 +1107,7 @@ empathy_main_window_show (void)
GtkWidget *sw;
GtkToggleAction *show_offline_widget;
GtkWidget *ebox;
+ GtkWidget *show_map_widget;
GtkToolItem *item;
gboolean show_offline;
gboolean show_avatars;
@@ -1121,6 +1132,7 @@ empathy_main_window_show (void)
"ui_manager", &window->ui_manager,
"view_show_offline", &show_offline_widget,
"view_history", &window->view_history,
+ "view_show_map", &show_map_widget,
"room_join_favorites", &window->room_join_favorites,
"presence_toolbar", &window->presence_toolbar,
"roster_scrolledwindow", &sw,
@@ -1139,6 +1151,9 @@ empathy_main_window_show (void)
"chat_add_contact", "activate", main_window_chat_add_contact_cb,
"view_show_ft_manager", "activate", main_window_view_show_ft_manager,
"view_show_offline", "toggled", main_window_view_show_offline_cb,
+#if HAVE_LIBCHAMPLAIN
+ "view_show_map", "activate", main_window_view_show_map_cb,
+#endif
"edit", "activate", main_window_edit_cb,
"edit_accounts", "activate", main_window_edit_accounts_cb,
"edit_personal_information", "activate", main_window_edit_personal_information_cb,
@@ -1153,6 +1168,10 @@ empathy_main_window_show (void)
g_object_ref (window->ui_manager);
g_object_unref (gui);
+#if !HAVE_LIBCHAMPLAIN
+ gtk_widget_hide (show_map_widget);
+#endif
+
window->mc = empathy_mission_control_dup_singleton ();
window->account_manager = empathy_account_manager_dup_singleton ();