Bug 34907 - Need tp_text_channel_get_message_types()
Summary: Need tp_text_channel_get_message_types()
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/ca...
Whiteboard: review+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-03-02 01:44 UTC by Guillaume Desmottes
Modified: 2011-03-02 06:58 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Comment 1 Guillaume Desmottes 2011-03-02 01:46:13 UTC
This is needed by gnome-shell btw: https://bugzilla.gnome.org/show_bug.cgi?id=642793
Comment 3 Will Thompson 2011-03-02 04:02:49 UTC
12:01              wjt | cassidy: comments like +      /* Copy the array */
12:01              wjt | cassidy: don't add anything
12:01              wjt | cassidy: +      DEBUG ("Channel doesn't have 
                         Messages.MessageTypes in its "
12:01              wjt | +          "immutable properties");
12:01              wjt | cassidy: include the channel's path

Also I imagine API like gboolean tp_text_channel_supports_message_type (TpTextChannel *, TpChannelTextMessageType) might be useful in C, where it's a PITA to check whether a GArray contains an element. Not a merge blocker.
Comment 4 Guillaume Desmottes 2011-03-02 04:59:41 UTC
(In reply to comment #3)
> 12:01              wjt | cassidy: comments like +      /* Copy the array */
> 12:01              wjt | cassidy: don't add anything

Why on earth did I write that? I hate this kind of comments as well. Removed (squashed).

> 12:01              wjt | cassidy: +      DEBUG ("Channel doesn't have 
>                          Messages.MessageTypes in its "
> 12:01              wjt | +          "immutable properties");
> 12:01              wjt | cassidy: include the channel's path

Done.

> Also I imagine API like gboolean tp_text_channel_supports_message_type
> (TpTextChannel *, TpChannelTextMessageType) might be useful in C, where it's a
> PITA to check whether a GArray contains an element. Not a merge blocker.

All cool kids use javascript these days. :p
But yeah, that's a good idea, I've added it.
Comment 5 Will Thompson 2011-03-02 05:03:56 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > 12:01              wjt | cassidy: comments like +      /* Copy the array */
> > 12:01              wjt | cassidy: don't add anything
> 
> Why on earth did I write that? I hate this kind of comments as well. Removed
> (squashed).

But you didn't remove the thing right below it…

+      /* Create an empty array */
+      self->priv->message_types = g_array_new (FALSE, FALSE,
+          sizeof (TpChannelTextMessageType));

> > 12:01              wjt | cassidy: +      DEBUG ("Channel doesn't have 
> >                          Messages.MessageTypes in its "
> > 12:01              wjt | +          "immutable properties");
> > 12:01              wjt | cassidy: include the channel's path
> 
> Done.

Awesome.
> 
> > Also I imagine API like gboolean tp_text_channel_supports_message_type
> > (TpTextChannel *, TpChannelTextMessageType) might be useful in C, where it's a
> > PITA to check whether a GArray contains an element. Not a merge blocker.
> 
> All cool kids use javascript these days. :p
> But yeah, that's a good idea, I've added it.

+ * Check if message of type @type can be send on this channel.

                                          ^^^^ should be ‘sent’

ditto the next line.
Comment 6 Guillaume Desmottes 2011-03-02 06:06:20 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > 12:01              wjt | cassidy: comments like +      /* Copy the array */
> > > 12:01              wjt | cassidy: don't add anything
> > 
> > Why on earth did I write that? I hate this kind of comments as well. Removed
> > (squashed).
> 
> But you didn't remove the thing right below it…
> 
> +      /* Create an empty array */
> +      self->priv->message_types = g_array_new (FALSE, FALSE,
> +          sizeof (TpChannelTextMessageType));

removed (squashed).

> + * Check if message of type @type can be send on this channel.
> 
>                                           ^^^^ should be ‘sent’
> 
> ditto the next line.

fixed (squashed).
Comment 7 Will Thompson 2011-03-02 06:52:38 UTC
yup!
Comment 8 Guillaume Desmottes 2011-03-02 06:58:38 UTC
Merged to master; will be in 0.13.16.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.