[Telepathy-commits] [telepathy-gabble/master] Implement channel-properties in buddy-view

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Wed Oct 8 09:48:45 PDT 2008


---
 src/olpc-buddy-view.c |    8 +++++---
 src/olpc-view.c       |   14 +-------------
 2 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/src/olpc-buddy-view.c b/src/olpc-buddy-view.c
index 69c8209..b9a1bc8 100644
--- a/src/olpc-buddy-view.c
+++ b/src/olpc-buddy-view.c
@@ -48,6 +48,8 @@ enum
   PROP_VIEW_PROPERTIES = 1,
   PROP_ALIAS,
 
+  PROP_CHANNEL_PROPERTIES,
+
   LAST_PROPERTY
 };
 
@@ -107,8 +109,6 @@ gabble_olpc_buddy_view_get_property (GObject *object,
 
   switch (property_id)
     {
-       /* FIXME: we should return the BuddyInfo specific props */
-#if 0
       case PROP_CHANNEL_PROPERTIES:
         g_value_take_boxed (value,
             tp_dbus_properties_mixin_make_properties_hash (object,
@@ -126,7 +126,6 @@ gabble_olpc_buddy_view_get_property (GObject *object,
                 GABBLE_IFACE_OLPC_CHANNEL_TYPE_BUDDYVIEW, "Alias",
                 NULL));
         break;
-#endif
       case PROP_VIEW_PROPERTIES:
         g_value_set_boxed (value, priv->properties);
         break;
@@ -319,6 +318,9 @@ gabble_olpc_buddy_view_class_init (
   view_class->create_close_msg = gabble_olpc_buddy_view_create_close_msg;
   view_class->create_request = gabble_olpc_buddy_view_create_request;
 
+  g_object_class_override_property (object_class, PROP_CHANNEL_PROPERTIES,
+      "channel-properties");
+
   param_spec = g_param_spec_boxed ("view-properties", "View's search properties",
       "The buddy properties Gadget should look for",
       TP_HASH_TYPE_STRING_VARIANT_MAP,
diff --git a/src/olpc-view.c b/src/olpc-view.c
index 268525d..80bb46e 100644
--- a/src/olpc-view.c
+++ b/src/olpc-view.c
@@ -269,19 +269,7 @@ gabble_olpc_view_get_property (GObject *object,
         g_value_set_boolean (value, priv->closed);
         break;
       case PROP_CHANNEL_PROPERTIES:
-        g_value_take_boxed (value,
-            tp_dbus_properties_mixin_make_properties_hash (object,
-                TP_IFACE_CHANNEL, "TargetHandle",
-                TP_IFACE_CHANNEL, "TargetHandleType",
-                TP_IFACE_CHANNEL, "ChannelType",
-                TP_IFACE_CHANNEL, "TargetID",
-                GABBLE_IFACE_CHANNEL_FUTURE, "InitiatorHandle",
-                GABBLE_IFACE_CHANNEL_FUTURE, "InitiatorID",
-                GABBLE_IFACE_CHANNEL_FUTURE, "Requested",
-                GABBLE_IFACE_OLPC_CHANNEL_INTERFACE_VIEW, "MaxSize",
-                GABBLE_IFACE_OLPC_CHANNEL_INTERFACE_VIEW, "Buddies",
-                GABBLE_IFACE_OLPC_CHANNEL_INTERFACE_VIEW, "Activities",
-                NULL));
+        /* This property has to be implemented in the concrete classes */
         break;
       case PROP_CONNECTION:
         g_value_set_object (value, self->conn);
-- 
1.5.6.5




More information about the Telepathy-commits mailing list