[empathy] don't display 'Send file' menu item in empathy-chat
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] don't display 'Send file' menu item in empathy-chat
- Date: Tue, 26 Jun 2012 09:15:56 +0000 (UTC)
commit 13d6036bb4dd8adb673bd82a591fe1bbc449ca96
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Mon Jun 25 15:08:56 2012 +0200
don't display 'Send file' menu item in empathy-chat
We only support requesting FT channel in the same process as the FT handler.
https://bugzilla.gnome.org/show_bug.cgi?id=678331
libempathy-gtk/empathy-individual-menu.c | 20 +++++++++++++-------
libempathy-gtk/empathy-individual-menu.h | 1 +
src/empathy-roster-window.c | 3 ++-
3 files changed, 16 insertions(+), 8 deletions(-)
---
diff --git a/libempathy-gtk/empathy-individual-menu.c b/libempathy-gtk/empathy-individual-menu.c
index dffc657..bd02325 100644
--- a/libempathy-gtk/empathy-individual-menu.c
+++ b/libempathy-gtk/empathy-individual-menu.c
@@ -229,10 +229,13 @@ individual_menu_add_personas (GtkMenuShell *menu,
gtk_widget_show (action);
/* File transfer */
- action = empathy_individual_file_transfer_menu_item_new (
- single_individual);
- gtk_menu_shell_append (GTK_MENU_SHELL (contact_submenu), action);
- gtk_widget_show (action);
+ if (features & EMPATHY_INDIVIDUAL_FEATURE_FILE_TRANSFER)
+ {
+ action = empathy_individual_file_transfer_menu_item_new (
+ single_individual);
+ gtk_menu_shell_append (GTK_MENU_SHELL (contact_submenu), action);
+ gtk_widget_show (action);
+ }
/* Share my desktop */
action = empathy_individual_share_my_desktop_menu_item_new (
@@ -940,9 +943,12 @@ constructed (GObject *object)
gtk_widget_show (item);
/* File transfer */
- item = empathy_individual_file_transfer_menu_item_new (individual);
- gtk_menu_shell_append (shell, item);
- gtk_widget_show (item);
+ if (features & EMPATHY_INDIVIDUAL_FEATURE_FILE_TRANSFER)
+ {
+ item = empathy_individual_file_transfer_menu_item_new (individual);
+ gtk_menu_shell_append (shell, item);
+ gtk_widget_show (item);
+ }
/* Share my desktop */
/* FIXME we should add the "Share my desktop" menu item if Vino is
diff --git a/libempathy-gtk/empathy-individual-menu.h b/libempathy-gtk/empathy-individual-menu.h
index 332433f..41e289f 100644
--- a/libempathy-gtk/empathy-individual-menu.h
+++ b/libempathy-gtk/empathy-individual-menu.h
@@ -42,6 +42,7 @@ typedef enum {
EMPATHY_INDIVIDUAL_FEATURE_ADD_CONTACT = 1 << 8,
EMPATHY_INDIVIDUAL_FEATURE_BLOCK = 1 << 9,
EMPATHY_INDIVIDUAL_FEATURE_REMOVE = 1 << 10,
+ EMPATHY_INDIVIDUAL_FEATURE_FILE_TRANSFER = 1 << 11,
} EmpathyIndividualFeatureFlags;
#define EMPATHY_TYPE_INDIVIDUAL_MENU (empathy_individual_menu_get_type ())
diff --git a/src/empathy-roster-window.c b/src/empathy-roster-window.c
index abff479..a027e99 100644
--- a/src/empathy-roster-window.c
+++ b/src/empathy-roster-window.c
@@ -1871,7 +1871,8 @@ popup_individual_menu_cb (EmpathyRosterView *view,
EMPATHY_INDIVIDUAL_FEATURE_LOG |
EMPATHY_INDIVIDUAL_FEATURE_SMS |
EMPATHY_INDIVIDUAL_FEATURE_CALL_PHONE |
- EMPATHY_INDIVIDUAL_FEATURE_REMOVE;
+ EMPATHY_INDIVIDUAL_FEATURE_REMOVE |
+ EMPATHY_INDIVIDUAL_FEATURE_FILE_TRANSFER;
menu = empathy_individual_menu_new (individual, features, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]