[empathy] Add menu option to display FT Managers
- From: Davyd Madeley <davyd src gnome org>
- To: svn-commits-list gnome org
- Subject: [empathy] Add menu option to display FT Managers
- Date: Mon, 27 Apr 2009 05:52:27 -0400 (EDT)
commit 0f2684993d964ae03231c82ea39220da55226144
Author: Davyd Madeley <davyd madeley id au>
Date: Mon Apr 27 10:01:07 2009 +0800
Add menu option to display FT Managers
Fixes GNOME Bug #574626
---
src/empathy-main-window.c | 16 ++++++++++++++++
src/empathy-main-window.ui | 9 +++++++++
2 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index b9993a8..5cbf877 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 cd45bc7..23d55f9 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"/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]