GNOME Bugzilla – Bug 627403
Move default presence messages from Empathy to libfolks
Last modified: 2012-05-30 16:32:58 UTC
Default presence messages should be moved into libfolks from Empathy. See empathy_presence_get_default_message().
(Mass changing milestones; please search for this phrase to delete the bug spam.)
(Setting target bugs for Folks 0.6.1. Search for this phrase to deal with bug mail spam.)
Didn't make this release; punting to 0.6.2.
(Punting bugs to 0.6.4)
(mass bump to gnome-3.4 milestone in our new milestone scheme; search this string mass move bug mail)
Created attachment 214883 [details] [review] Patch to add presence name mapping method to folks. Not sure if default_message is enough or if it should be get_default_message. Tested this with changes to gnome-contacts and empathy and it works fine though.
Forgot to add, the public branch for the patch can be found here: http://cgit.collabora.com/git/user/jwhiting/folks.git/log/?h=presencestrings
Review of attachment 214883 [details] [review]: I think a better name would be get_default_message_from_type() just to be a little more explicit. "default_message" on its own looks a little bit like a property name. Also, be sure to note the addition of API in the NEWS file (see older entries).
(In reply to comment #8) > Review of attachment 214883 [details] [review]: > > I think a better name would be get_default_message_from_type() just to be a > little more explicit. "default_message" on its own looks a little bit like a > property name. > > Also, be sure to note the addition of API in the NEWS file (see older entries). Feel free to commit after making those changes though.
Ok, made those changes. What do I need to do to be able to push to git.gnome.org repos?
Pushed to master while Jeremy awaits his account: commit 529e859ec6ac2260f15f7066b76c022dcd620242 Author: Jeremy Whiting <jpwhiting@kde.org> Date: Thu May 24 14:31:40 2012 -0600 Bug 627402 Move default presence messages from Empathy to libfolks Move presence string mapping into folks from gnome-contacts. Closes: https://bugzilla.gnome.org/show_bug.cgi?id=627402 NEWS | 3 +++ folks/presence-details.vala | 31 +++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+)
Review of attachment 214883 [details] [review]: Shouldn’t presence-details.vala be added to POTFILES.in now? (Sorry for the late review; I’m now T-11 days from exams so replies may be patchy.) ::: folks/presence-details.vala @@ +145,3 @@ + * The default message for a presence type. + * + * @since UNRELEASED This is missing @param and @returns lines. @@ +147,3 @@ + * @since UNRELEASED + */ + public static string default_message (PresenceType type) This should probably be of type “unowned string” rather than just “string”. Let’s save some string copies where possible. :-)
(In reply to comment #12) > Review of attachment 214883 [details] [review]: Poke. (Not making the changes myself because I think the “unowned string” change warrants some oversight/discussion.)
Created attachment 215148 [details] [review] Clean up issues pwithnall pointed out Patch for branch: http://cgit.collabora.com/git/user/treitter/folks.git/log/?h=bgo627403-presence-messages
(In reply to comment #12) > Review of attachment 214883 [details] [review]: > > Shouldn’t presence-details.vala be added to POTFILES.in now? > > (Sorry for the late review; I’m now T-11 days from exams so replies may be > patchy.) > > ::: folks/presence-details.vala > @@ +145,3 @@ > + * The default message for a presence type. > + * > + * @since UNRELEASED > > This is missing @param and @returns lines. > > @@ +147,3 @@ > + * @since UNRELEASED > + */ > + public static string default_message (PresenceType type) > > This should probably be of type “unowned string” rather than just “string”. > Let’s save some string copies where possible. :-) Thanks. The things you miss when you're out of practice.... How's the new patch?
Review of attachment 215148 [details] [review]: ✓ ::: folks/presence-details.vala @@ +146,3 @@ * + * @param type a {@link PresenceType} to retrieve a display string for + * @return a default display string for the given {@link PresenceType} Might be useful to mention that the string is translated.
(In reply to comment #16) > Review of attachment 215148 [details] [review]: > > ✓ > > ::: folks/presence-details.vala > @@ +146,3 @@ > * > + * @param type a {@link PresenceType} to retrieve a display string for > + * @return a default display string for the given {@link PresenceType} > > Might be useful to mention that the string is translated. Fixed and pushed: commit e89332de2fd99f8646bb0a0ac73aab17cb4eb747 Author: Travis Reitter <travis.reitter@collabora.co.uk> Date: Mon May 28 11:02:26 2012 -0700 Clean up some bits related to bgo#627403 * make get_default_message_from_presence_type() return an unowned string * add @param and @return lines to said function * add presence-details.vala to translated files folks/presence-details.vala | 6 +++++- po/POTFILES.in | 1 + po/POTFILES.skip | 1 + 3 files changed, 7 insertions(+), 1 deletion(-)