After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 627403 - Move default presence messages from Empathy to libfolks
Move default presence messages from Empathy to libfolks
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: libfolks
git master
Other Linux
: Normal normal
: gnome-3.4
Assigned To: folks-maint
folks-maint
Depends on: 628883
Blocks:
 
 
Reported: 2010-08-19 18:13 UTC by Philip Withnall
Modified: 2012-05-30 16:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to add presence name mapping method to folks. (1.22 KB, patch)
2012-05-24 17:41 UTC, Jeremy Whiting
needs-work Details | Review
Clean up issues pwithnall pointed out (1.94 KB, patch)
2012-05-28 18:49 UTC, Travis Reitter
accepted-commit_now Details | Review

Description Philip Withnall 2010-08-19 18:13:40 UTC
Default presence messages should be moved into libfolks from Empathy.

See empathy_presence_get_default_message().
Comment 1 Philip Withnall 2010-09-13 13:54:48 UTC
(Mass changing milestones; please search for this phrase to delete the bug spam.)
Comment 2 Travis Reitter 2011-08-23 16:21:29 UTC
(Setting target bugs for Folks 0.6.1. Search for this phrase to deal with bug mail spam.)
Comment 3 Raul Gutierrez Segales 2011-08-29 12:46:43 UTC
Didn't make this release; punting to 0.6.2.
Comment 4 Travis Reitter 2011-09-05 16:49:26 UTC
(Punting bugs to 0.6.4)
Comment 5 Travis Reitter 2011-10-11 20:36:55 UTC
(mass bump to gnome-3.4 milestone in our new milestone scheme; search this string mass move bug mail)
Comment 6 Jeremy Whiting 2012-05-24 17:41:47 UTC
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.
Comment 7 Jeremy Whiting 2012-05-24 17:44:13 UTC
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
Comment 8 Travis Reitter 2012-05-24 18:19:09 UTC
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).
Comment 9 Travis Reitter 2012-05-24 18:19:44 UTC
(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.
Comment 10 Jeremy Whiting 2012-05-24 19:00:18 UTC
Ok, made those changes.  What do I need to do to be able to push to git.gnome.org repos?
Comment 11 Travis Reitter 2012-05-24 20:55:21 UTC
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(+)
Comment 12 Philip Withnall 2012-05-24 21:05:10 UTC
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. :-)
Comment 13 Philip Withnall 2012-05-27 18:29:10 UTC
(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.)
Comment 14 Travis Reitter 2012-05-28 18:49:24 UTC
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
Comment 15 Travis Reitter 2012-05-28 18:49:58 UTC
(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?
Comment 16 Philip Withnall 2012-05-29 09:19:19 UTC
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.
Comment 17 Travis Reitter 2012-05-30 16:32:58 UTC
(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(-)