Commit 8da0a6fe authored by Guillaume Desmottes's avatar Guillaume Desmottes

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.
parent 3241a32e
......@@ -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);
}
}
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment