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 667980 - Port python plugins/scripts from dbus-python to PyGI
Port python plugins/scripts from dbus-python to PyGI
Status: RESOLVED OBSOLETE
Product: rhythmbox
Classification: Other
Component: Plugins (other)
HEAD
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-01-15 23:55 UTC by Nirbheek Chauhan
Modified: 2018-05-24 17:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Port im-status plugin from dbus-python/dbus-glib to PyGI/GDBus (8.90 KB, patch)
2012-01-15 23:55 UTC, Nirbheek Chauhan
committed Details | Review
Port the rb-set-rating.py example script to PyGI/GDBus (1.43 KB, patch)
2012-01-16 01:29 UTC, Nirbheek Chauhan
reviewed Details | Review
Port the rb-set-rating.py example script to PyGI/GDBus (1.43 KB, patch)
2012-01-16 10:26 UTC, Nirbheek Chauhan
committed Details | Review

Description Nirbheek Chauhan 2012-01-15 23:55:25 UTC
Created attachment 205321 [details] [review]
Port im-status plugin from dbus-python/dbus-glib to PyGI/GDBus

The following files in the RB source tree use dbus-python:

plugins/im-status/im-status.py
remote/dbus/rb-print-playing.py
remote/dbus/rb-set-rating.py

The attached patch converts the im-status plugin to PyGI (gdbus). Patches for the two scripts will follow later.
Comment 1 Nirbheek Chauhan 2012-01-16 01:29:01 UTC
Created attachment 205328 [details] [review]
Port the rb-set-rating.py example script to PyGI/GDBus

I'm having some problems with the other script[1], so this one is attached separately.

1. Connecting a callback to the "g-properties-changed" DBusProxy signal causes a buffer overflow when the signal is emitted. Seems to be a pygobject bug.
Comment 2 Nirbheek Chauhan 2012-01-16 05:46:15 UTC
I filed bug 667983 in pygobject about "g-properties-changed".
Comment 3 Jonathan Matthew 2012-01-16 10:02:50 UTC
Review of attachment 205321 [details] [review]:

pushed as commit 63a470c, thanks
Comment 4 Jonathan Matthew 2012-01-16 10:13:52 UTC
Review of attachment 205328 [details] [review]:

::: remote/dbus/rb-set-rating.py
@@ +17,3 @@
+entry_uri = sys.argv[1]
+rating = float(sys.argv[2])
+vrating = GLib.Variant("u", rating)

shouldn't this be "d"?
Comment 5 Nirbheek Chauhan 2012-01-16 10:19:38 UTC
(In reply to comment #4)
> Review of attachment 205328 [details] [review]:
> 
> ::: remote/dbus/rb-set-rating.py
> @@ +17,3 @@
> +entry_uri = sys.argv[1]
> +rating = float(sys.argv[2])
> +vrating = GLib.Variant("u", rating)
> 
> shouldn't this be "d"?

You're right, it should be a double. I guess dbus got a bit liberal and accepted uint32 anyway.
Comment 6 Nirbheek Chauhan 2012-01-16 10:26:07 UTC
Created attachment 205347 [details] [review]
Port the rb-set-rating.py example script to PyGI/GDBus

Changes uint32 to double as is required by the RhythmDB backend; tested to work.
Comment 7 Jonathan Matthew 2012-01-16 10:35:51 UTC
Review of attachment 205347 [details] [review]:

pushed as commit c553358, thanks
Comment 8 GNOME Infrastructure Team 2018-05-24 17:18:01 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/rhythmbox/issues/1148.