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 784387 - ExecuteMethodDialog does not pretty-print multiple results
ExecuteMethodDialog does not pretty-print multiple results
Status: RESOLVED FIXED
Product: d-feet
Classification: Other
Component: general
0.3.x
Other Linux
: Normal normal
: ---
Assigned To: D-Feet Maintainer(s)
D-Feet Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-06-30 15:19 UTC by Simon McVittie
Modified: 2017-11-24 15:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ExecuteMethodDialog: Pretty-print multiple results (1.32 KB, patch)
2017-06-30 15:19 UTC, Simon McVittie
committed Details | Review

Description Simon McVittie 2017-06-30 15:19:11 UTC
Created attachment 354736 [details] [review]
ExecuteMethodDialog: Pretty-print multiple results

If a D-Bus method returns multiple results, d-feet previously only
pretty-printed the first. Print them one per line, so a method with
return signature 'isa{sv}' might end up showing:

    123,
    "hello, world!",
    {}
Comment 1 Simon McVittie 2017-06-30 15:20:47 UTC
The use of ",\n".join() preserves current behaviour if there is only one result: there is no comma and no newline.

I'm making use of multiple returns (or, technically, multiple 'out' parameters) in <https://bugs.freedesktop.org/show_bug.cgi?id=100344>.
Comment 2 Will Thompson 2017-11-24 15:22:06 UTC
Review of attachment 354736 [details] [review]:

I wrote a very similar patch just now – looks fine to me.

I was about to qualify this with "I'm not a D-Feet maintainer" but apparently I originally contributed pretty-printing back in 2009 https://git.gnome.org/browse/d-feet/commit/?id=fb7e4a296b00f0b3867258eed5af6673492eb160 so arguably that qualifies me to approve this change.
Comment 3 Will Thompson 2017-11-24 15:22:09 UTC
Review of attachment 354736 [details] [review]:

I wrote a very similar patch just now – looks fine to me.

I was about to qualify this with "I'm not a D-Feet maintainer" but apparently I originally contributed pretty-printing back in 2009 https://git.gnome.org/browse/d-feet/commit/?id=fb7e4a296b00f0b3867258eed5af6673492eb160 so arguably that qualifies me to approve this change.
Comment 4 Will Thompson 2017-11-24 15:57:27 UTC
Attachment 354736 [details] pushed as 3d3f0ec - ExecuteMethodDialog: Pretty-print multiple results