[empathy] Pass a boolean saying if the protocol is Google Talk or not to EmpathyProtocolChooserFilterFunc
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy] Pass a boolean saying if the protocol is Google Talk or not to EmpathyProtocolChooserFilterFunc
- Date: Tue, 19 Jan 2010 15:47:13 +0000 (UTC)
commit 8da0a6feaddfa5ab7df373f0f85c7124b31774e8
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Tue Jan 19 14:01:26 2010 +0000
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.
libempathy-gtk/empathy-protocol-chooser.c | 5 ++++-
libempathy-gtk/empathy-protocol-chooser.h | 4 +++-
src/empathy-account-assistant.c | 2 ++
3 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/libempathy-gtk/empathy-protocol-chooser.c b/libempathy-gtk/empathy-protocol-chooser.c
index 9c48917..7b706b0 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 a649aa5..088d1b6 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 eecbb5d..9e6a5fc 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]