]> git.0d.be Git - empathy.git/commitdiff
Add menu option to display FT Managers
authorDavyd Madeley <davyd@madeley.id.au>
Mon, 27 Apr 2009 02:01:07 +0000 (10:01 +0800)
committerDavyd Madeley <davyd@madeley.id.au>
Mon, 27 Apr 2009 09:51:37 +0000 (17:51 +0800)
Fixes GNOME Bug #574626

src/empathy-main-window.c
src/empathy-main-window.ui

index b9993a8f543edc65dbefc9b49119506f91658f20..5cbf877e5b739a8b38931bec4ee45625c2af159b 100644 (file)
@@ -58,6 +58,7 @@
 #include "empathy-new-chatroom-dialog.h"
 #include "empathy-chatrooms-window.h"
 #include "empathy-event-manager.h"
 #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>
 
 #define DEBUG_FLAG EMPATHY_DEBUG_OTHER
 #include <libempathy/empathy-debug.h>
@@ -682,6 +683,20 @@ main_window_chat_add_contact_cb (GtkAction         *action,
        empathy_new_contact_dialog_show (GTK_WINDOW (window->window));
 }
 
        empathy_new_contact_dialog_show (GTK_WINDOW (window->window));
 }
 
+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)
 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,
                              "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,
                              "chat_show_offline", "toggled", main_window_chat_show_offline_cb,
                              "edit", "activate", main_window_edit_cb,
                              "edit_accounts", "activate", main_window_edit_accounts_cb,
index cd45bc7d7fc5faf8a9472dba955bcf023171aaf7..23d55f95b8b7ca3783a238527d3b61e95439f5e8 100644 (file)
             <property name="label" translatable="yes">_Add Contact...</property>
           </object>
         </child>
             <property name="label" translatable="yes">_Add Contact...</property>
           </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>
         <child>
           <object class="GtkToggleAction" id="chat_show_offline">
             <property name="name">chat_show_offline</property>
           <separator/>
           <menuitem action="chat_add_contact"/>
           <separator/>
           <separator/>
           <menuitem action="chat_add_contact"/>
           <separator/>
+          <menuitem action="chat_show_ft_manager"/>
+          <separator/>
           <menuitem action="chat_show_offline"/>
           <separator/>
           <menuitem action="chat_quit"/>
           <menuitem action="chat_show_offline"/>
           <separator/>
           <menuitem action="chat_quit"/>