aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavyd Madeley <davyd@madeley.id.au>2009-04-27 10:01:07 +0800
committerDavyd Madeley <davyd@madeley.id.au>2009-04-27 17:51:37 +0800
commit0f2684993d964ae03231c82ea39220da55226144 (patch)
treed002f809f45360d16bd44a0c090b4b4881253f7a
parent72e7a824a9e98c1aad1e1a43902858f49df5e0c1 (diff)
downloadgsoc2013-empathy-0f2684993d964ae03231c82ea39220da55226144.tar
gsoc2013-empathy-0f2684993d964ae03231c82ea39220da55226144.tar.gz
gsoc2013-empathy-0f2684993d964ae03231c82ea39220da55226144.tar.bz2
gsoc2013-empathy-0f2684993d964ae03231c82ea39220da55226144.tar.lz
gsoc2013-empathy-0f2684993d964ae03231c82ea39220da55226144.tar.xz
gsoc2013-empathy-0f2684993d964ae03231c82ea39220da55226144.tar.zst
gsoc2013-empathy-0f2684993d964ae03231c82ea39220da55226144.zip
Add menu option to display FT Managers
Fixes GNOME Bug #574626
-rw-r--r--src/empathy-main-window.c16
-rw-r--r--src/empathy-main-window.ui9
2 files changed, 25 insertions, 0 deletions
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index b9993a8f5..5cbf877e5 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -58,6 +58,7 @@
#include "empathy-new-chatroom-dialog.h"
#include "empathy-chatrooms-window.h"
#include "empathy-event-manager.h"
+#include "empathy-ft-manager.h"
#define DEBUG_FLAG EMPATHY_DEBUG_OTHER
#include <libempathy/empathy-debug.h>
@@ -683,6 +684,20 @@ main_window_chat_add_contact_cb (GtkAction *action,
}
static void
+main_window_chat_show_ft_manager (GtkAction *action,
+ EmpathyMainWindow *window)
+{
+ EmpathyFTManager *manager;
+ GtkWidget *dialog;
+
+ manager = empathy_ft_manager_dup_singleton ();
+ dialog = empathy_ft_manager_get_dialog (manager);
+
+ gtk_window_present (GTK_WINDOW (dialog));
+ g_object_unref (manager);
+}
+
+static void
main_window_chat_show_offline_cb (GtkToggleAction *action,
EmpathyMainWindow *window)
{
@@ -1122,6 +1137,7 @@ empathy_main_window_show (void)
"room_join_favorites", "activate", main_window_room_join_favorites_cb,
"room_manage_favorites", "activate", main_window_room_manage_favorites_cb,
"chat_add_contact", "activate", main_window_chat_add_contact_cb,
+ "chat_show_ft_manager", "activate", main_window_chat_show_ft_manager,
"chat_show_offline", "toggled", main_window_chat_show_offline_cb,
"edit", "activate", main_window_edit_cb,
"edit_accounts", "activate", main_window_edit_accounts_cb,
diff --git a/src/empathy-main-window.ui b/src/empathy-main-window.ui
index cd45bc7d7..23d55f95b 100644
--- a/src/empathy-main-window.ui
+++ b/src/empathy-main-window.ui
@@ -34,6 +34,13 @@
</object>
</child>
<child>
+ <object class="GtkAction" id="chat_show_ft_manager">
+ <property name="icon-name">document-send</property>
+ <property name="name">chat_show_ft_manager</property>
+ <property name="label" translatable="yes">Show _File Transfers</property>
+ </object>
+ </child>
+ <child>
<object class="GtkToggleAction" id="chat_show_offline">
<property name="name">chat_show_offline</property>
<property name="label" translatable="yes">Show _Offline Contacts</property>
@@ -135,6 +142,8 @@
<separator/>
<menuitem action="chat_add_contact"/>
<separator/>
+ <menuitem action="chat_show_ft_manager"/>
+ <separator/>
<menuitem action="chat_show_offline"/>
<separator/>
<menuitem action="chat_quit"/>