aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-05 21:33:46 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-06 17:33:25 +0800
commit899be9904bd53eb37bee357f22ecdb434f1e28b0 (patch)
tree6077356b0e68db2eac56e971e0cdaccdc7380660 /libempathy-gtk
parent0e095b8af9cd07ae32823f73b889fdbfb47d6f2a (diff)
downloadgsoc2013-empathy-899be9904bd53eb37bee357f22ecdb434f1e28b0.tar
gsoc2013-empathy-899be9904bd53eb37bee357f22ecdb434f1e28b0.tar.gz
gsoc2013-empathy-899be9904bd53eb37bee357f22ecdb434f1e28b0.tar.bz2
gsoc2013-empathy-899be9904bd53eb37bee357f22ecdb434f1e28b0.tar.lz
gsoc2013-empathy-899be9904bd53eb37bee357f22ecdb434f1e28b0.tar.xz
gsoc2013-empathy-899be9904bd53eb37bee357f22ecdb434f1e28b0.tar.zst
gsoc2013-empathy-899be9904bd53eb37bee357f22ecdb434f1e28b0.zip
protocol-chooser: use TpProtocol
https://bugzilla.gnome.org/show_bug.cgi?id=677465
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-protocol-chooser.c19
-rw-r--r--libempathy-gtk/empathy-protocol-chooser.h4
2 files changed, 12 insertions, 11 deletions
diff --git a/libempathy-gtk/empathy-protocol-chooser.c b/libempathy-gtk/empathy-protocol-chooser.c
index 5e26112ed..117800802 100644
--- a/libempathy-gtk/empathy-protocol-chooser.c
+++ b/libempathy-gtk/empathy-protocol-chooser.c
@@ -434,10 +434,9 @@ protocol_chooser_filter_visible_func (GtkTreeModel *model,
if (cm != NULL && protocol_name != NULL)
{
- TpConnectionManagerProtocol *protocol;
+ TpProtocol *protocol;
- protocol = (TpConnectionManagerProtocol *)
- tp_connection_manager_get_protocol (cm, protocol_name);
+ protocol = tp_connection_manager_get_protocol_object (cm, protocol_name);
if (protocol != NULL)
{
@@ -467,7 +466,7 @@ protocol_chooser_filter_visible_func (GtkTreeModel *model,
TpConnectionManager *
empathy_protocol_chooser_dup_selected (
EmpathyProtocolChooser *protocol_chooser,
- TpConnectionManagerProtocol **protocol,
+ TpProtocol **protocol,
gchar **service)
{
GtkTreeIter iter;
@@ -495,8 +494,8 @@ empathy_protocol_chooser_dup_selected (
COL_PROTOCOL_NAME, &protocol_name,
-1);
- *protocol = (TpConnectionManagerProtocol *)
- tp_connection_manager_get_protocol (cm, protocol_name);
+ *protocol = tp_connection_manager_get_protocol_object (cm,
+ protocol_name);
g_free (protocol_name);
@@ -569,7 +568,7 @@ empathy_protocol_chooser_create_account_settings (EmpathyProtocolChooser *self)
gchar *str;
const gchar *display_name;
TpConnectionManager *cm;
- TpConnectionManagerProtocol *proto;
+ TpProtocol *proto;
gchar *service = NULL;
cm = empathy_protocol_chooser_dup_selected (self, &proto, &service);
@@ -579,14 +578,16 @@ empathy_protocol_chooser_create_account_settings (EmpathyProtocolChooser *self)
if (service != NULL)
display_name = empathy_service_name_to_display_name (service);
else
- display_name = empathy_protocol_name_to_display_name (proto->name);
+ display_name = empathy_protocol_name_to_display_name (
+ tp_protocol_get_name (proto));
/* Create account */
/* To translator: %s is the name of the protocol, such as "Google Talk" or
* "Yahoo!"
*/
str = g_strdup_printf (_("New %s account"), display_name);
- settings = empathy_account_settings_new (cm->name, proto->name, service, str);
+ settings = empathy_account_settings_new (cm->name,
+ tp_protocol_get_name (proto), service, str);
g_free (str);
diff --git a/libempathy-gtk/empathy-protocol-chooser.h b/libempathy-gtk/empathy-protocol-chooser.h
index f3c577661..5aa0a4c4d 100644
--- a/libempathy-gtk/empathy-protocol-chooser.h
+++ b/libempathy-gtk/empathy-protocol-chooser.h
@@ -61,7 +61,7 @@ struct _EmpathyProtocolChooserClass
};
typedef gboolean (*EmpathyProtocolChooserFilterFunc) (TpConnectionManager *cm,
- TpConnectionManagerProtocol *protocol,
+ TpProtocol *protocol,
const gchar *service,
gpointer user_data);
@@ -69,7 +69,7 @@ GType empathy_protocol_chooser_get_type (void) G_GNUC_CONST;
GtkWidget * empathy_protocol_chooser_new (void);
TpConnectionManager *empathy_protocol_chooser_dup_selected (
EmpathyProtocolChooser *protocol_chooser,
- TpConnectionManagerProtocol **protocol,
+ TpProtocol **protocol,
gchar **service);
void empathy_protocol_chooser_set_visible (