]> git.0d.be Git - empathy.git/commitdiff
protocol-chooser: use TpProtocol
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 5 Jun 2012 13:33:46 +0000 (15:33 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 6 Jun 2012 09:33:25 +0000 (11:33 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=677465

libempathy-gtk/empathy-protocol-chooser.c
libempathy-gtk/empathy-protocol-chooser.h

index 5e26112edf30c53369a5c2d431f8a6cb1e8b370d..117800802fbc42cafae4cfc07103ce339030d361 100644 (file)
@@ -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);
 
index f3c577661a49fb8e549651a4437d8896b2f56a27..5aa0a4c4da6c35002293087a9e7b26f548535a9c 100644 (file)
@@ -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 (