aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-01-19 22:01:26 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-01-19 23:46:54 +0800
commit8da0a6feaddfa5ab7df373f0f85c7124b31774e8 (patch)
treea14e5cdc29bb6ae642d75ec1a102d2e14a75f745
parent3241a32e5b7fc4ee8ae8907fbdde74d98660ebca (diff)
downloadgsoc2013-empathy-8da0a6feaddfa5ab7df373f0f85c7124b31774e8.tar
gsoc2013-empathy-8da0a6feaddfa5ab7df373f0f85c7124b31774e8.tar.gz
gsoc2013-empathy-8da0a6feaddfa5ab7df373f0f85c7124b31774e8.tar.bz2
gsoc2013-empathy-8da0a6feaddfa5ab7df373f0f85c7124b31774e8.tar.lz
gsoc2013-empathy-8da0a6feaddfa5ab7df373f0f85c7124b31774e8.tar.xz
gsoc2013-empathy-8da0a6feaddfa5ab7df373f0f85c7124b31774e8.tar.zst
gsoc2013-empathy-8da0a6feaddfa5ab7df373f0f85c7124b31774e8.zip
Pass a boolean saying if the protocol is Google Talk or not to EmpathyProtocolChooserFilterFunc
That's the only way to filter Google Talk if we want to.
-rw-r--r--libempathy-gtk/empathy-protocol-chooser.c5
-rw-r--r--libempathy-gtk/empathy-protocol-chooser.h4
-rw-r--r--src/empathy-account-assistant.c2
3 files changed, 9 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-protocol-chooser.c b/libempathy-gtk/empathy-protocol-chooser.c
index 9c4891765..7b706b05d 100644
--- a/libempathy-gtk/empathy-protocol-chooser.c
+++ b/libempathy-gtk/empathy-protocol-chooser.c
@@ -395,10 +395,12 @@ protocol_chooser_filter_visible_func (GtkTreeModel *model,
TpConnectionManager *cm = NULL;
gchar *protocol_name = NULL;
gboolean visible = FALSE;
+ gboolean is_gtalk;
gtk_tree_model_get (model, iter,
COL_CM, &cm,
COL_PROTOCOL_NAME, &protocol_name,
+ COL_IS_GTALK, &is_gtalk,
-1);
if (cm != NULL && protocol_name != NULL)
@@ -410,7 +412,8 @@ protocol_chooser_filter_visible_func (GtkTreeModel *model,
if (protocol != NULL)
{
- visible = priv->filter_func (cm, protocol, priv->filter_user_data);
+ visible = priv->filter_func (cm, protocol, is_gtalk,
+ priv->filter_user_data);
}
}
diff --git a/libempathy-gtk/empathy-protocol-chooser.h b/libempathy-gtk/empathy-protocol-chooser.h
index a649aa578..088d1b664 100644
--- a/libempathy-gtk/empathy-protocol-chooser.h
+++ b/libempathy-gtk/empathy-protocol-chooser.h
@@ -59,7 +59,9 @@ struct _EmpathyProtocolChooserClass
};
typedef gboolean (*EmpathyProtocolChooserFilterFunc) (TpConnectionManager *cm,
- TpConnectionManagerProtocol *protocol, gpointer user_data);
+ TpConnectionManagerProtocol *protocol,
+ gboolean is_gtalk,
+ gpointer user_data);
GType empathy_protocol_chooser_get_type (void) G_GNUC_CONST;
GtkWidget * empathy_protocol_chooser_new (void);
diff --git a/src/empathy-account-assistant.c b/src/empathy-account-assistant.c
index eecbb5d7b..9e6a5fc04 100644
--- a/src/empathy-account-assistant.c
+++ b/src/empathy-account-assistant.c
@@ -373,6 +373,7 @@ static gboolean
account_assistant_chooser_enter_details_filter_func (
TpConnectionManager *cm,
TpConnectionManagerProtocol *protocol,
+ gboolean is_gtalk,
gpointer user_data)
{
if (!tp_strdiff (protocol->name, "local-xmpp") ||
@@ -386,6 +387,7 @@ static gboolean
account_assistant_chooser_create_account_filter_func (
TpConnectionManager *cm,
TpConnectionManagerProtocol *protocol,
+ gboolean is_gtalk,
gpointer user_data)
{
return tp_connection_manager_protocol_can_register (protocol);