[empathy] Add an INDIVIDUAL_CALL feature to EmpathyIndividualView
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] Add an INDIVIDUAL_CALL feature to EmpathyIndividualView
- Date: Wed, 1 Sep 2010 09:13:36 +0000 (UTC)
commit 69a4acc92a7891595c624e89f2d5d0fc4e9327ff
Author: Philip Withnall <philip withnall collabora co uk>
Date: Tue Aug 31 18:25:55 2010 +0100
Add an INDIVIDUAL_CALL feature to EmpathyIndividualView
This allows the context menu on the VoIP icon to be disabled, so that it
can't be used from the linking dialogue. Closes: bgo#628433
libempathy-gtk/empathy-individual-view.c | 4 ++++
libempathy-gtk/empathy-individual-view.h | 7 ++++---
2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index f8822bc..d18fb2a 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -961,6 +961,7 @@ individual_view_call_activated_cb (EmpathyCellRendererActivatable *cell,
const gchar *path_string,
EmpathyIndividualView *view)
{
+ EmpathyIndividualViewPriv *priv = GET_PRIV (view);
GtkWidget *menu;
GtkTreeModel *model;
GtkTreeIter iter;
@@ -969,6 +970,9 @@ individual_view_call_activated_cb (EmpathyCellRendererActivatable *cell,
GtkMenuShell *shell;
GtkWidget *item;
+ if (!(priv->view_features & EMPATHY_INDIVIDUAL_VIEW_FEATURE_INDIVIDUAL_CALL))
+ return;
+
model = gtk_tree_view_get_model (GTK_TREE_VIEW (view));
if (!gtk_tree_model_get_iter_from_string (model, &iter, path_string))
return;
diff --git a/libempathy-gtk/empathy-individual-view.h b/libempathy-gtk/empathy-individual-view.h
index 3c14102..51a487d 100644
--- a/libempathy-gtk/empathy-individual-view.h
+++ b/libempathy-gtk/empathy-individual-view.h
@@ -60,9 +60,10 @@ typedef enum
EMPATHY_INDIVIDUAL_VIEW_FEATURE_INDIVIDUAL_DROP = 1 << 5,
EMPATHY_INDIVIDUAL_VIEW_FEATURE_INDIVIDUAL_DRAG = 1 << 6,
EMPATHY_INDIVIDUAL_VIEW_FEATURE_INDIVIDUAL_TOOLTIP = 1 << 7,
- EMPATHY_INDIVIDUAL_VIEW_FEATURE_PERSONA_DROP = 1 << 8,
- EMPATHY_INDIVIDUAL_VIEW_FEATURE_FILE_DROP = 1 << 9,
- EMPATHY_INDIVIDUAL_VIEW_FEATURE_ALL = (1 << 10) - 1,
+ EMPATHY_INDIVIDUAL_VIEW_FEATURE_INDIVIDUAL_CALL = 1 << 8,
+ EMPATHY_INDIVIDUAL_VIEW_FEATURE_PERSONA_DROP = 1 << 9,
+ EMPATHY_INDIVIDUAL_VIEW_FEATURE_FILE_DROP = 1 << 10,
+ EMPATHY_INDIVIDUAL_VIEW_FEATURE_ALL = (1 << 11) - 1,
} EmpathyIndividualViewFeatureFlags;
struct _EmpathyIndividualView
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]