[Bug 13124] Setting your own alias unimplemented

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jul 19 12:20:35 CEST 2010


https://bugs.freedesktop.org/show_bug.cgi?id=13124

--- Comment #10 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-07-19 03:20:34 PDT ---
Review of attachment 37172:
 --> (https://bugs.freedesktop.org/review?bug=13124&attachment=37172)

You're right that producing change notification signals is desirable, so your
patch is better than mine; thanks!

I think your patch is likely to end up with the change notification getting out
of sync with the state recovery, due to Bug #25869? It's better than nothing,
though.

(What I mean by that is: calling RequestAliases or whatever, just after the
change signal, won't give the same answer as the signal)

I'd be inclined to not do the error reporting yet (i.e. behave like we both did
here); I'll open a bug for the lack of error reporting.

::: src/connection-aliasing.c
@@ +179,2 @@
 static void
+set_alias_succeess_cb (PurpleAccount *account,

It's spelled "success" :-)

@@ +189,3 @@
+    g_value_init (&entry, HAZE_TP_ALIAS_PAIR_TYPE);
+    g_value_take_boxed (&entry,
+        dbus_g_type_specialized_construct (HAZE_TP_ALIAS_PAIR_TYPE));

It'd be better to include <telepathy-glib/gtypes.h> and use
TP_STRUCT_TYPE_ALIAS_PAIR (we should kill off all the HAZE_TP_*_TYPE at some
point, now that telepathy-glib generates them all).

With the change I suggest below, this wouldn't be necessary anyway.

@@ +197,3 @@
+
+    aliases = g_ptr_array_sized_new (1);
+    g_ptr_array_add (aliases, g_value_get_boxed (&entry));

We know that TP_STRUCT_TYPE_ALIAS_PAIR is a GValueArray<uint,string>, so since
telepathy-glib 0.9.2 (sadly not available on Maemo 5), you could delete @entry
entirely, and use:

aliases = g_ptr_array_sized_new (1);
g_ptr_array_add (aliases, tp_value_array_build (2,
    G_TYPE_UINT, base_conn->self_handle,
    G_TYPE_STRING, new_alias,
    G_TYPE_INVALID));

To make backporting to Maemo 5 easier, perhaps you could implement my other
suggestions from above (producing a patch suitable for backporting to Maemo),
then do this simplification as a second patch?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the telepathy-bugs mailing list