GNOME Bugzilla – Bug 629369
Make get_sources and get_sources_by_operations accessible from JavaScript
Last modified: 2010-09-16 06:53:09 UTC
Currently GrlPluginRegistry's get_sources and get_sources_by_operations return a zero-terminated array of GrlMediaPlugins. While GObject Introspection supports it, and they can be accessed from PyGObject, currently JavaScript doesn't support it. See JavaScript's bug #560567 and a previous mailing list discussion[1] for more details on the issue. [1] http://mail.gnome.org/archives/grilo-list/2010-August/msg00102.html
Created attachment 170029 [details] [review] core: Make get_sources return a GList * GrlPluginRegistry's get_sources now returns a GList * Added a compare_by_rank method to use with g_list_sort * Updated grilo-test-ui, grl-inspect and tests to expect a GList
Created attachment 170030 [details] [review] core: Make get_sources_by_operations return a GList
The patches attached change both functions to return GLists. As a result, they can be accessed from both JavaScript and PyGObject.
Pushed. Your compare_by_rank function was not sorting properly, I fixed that. --- commit a8f314fdbd9b3196b8a1e89e13da1a686ac3548c Author: Iago Toral Quiroga <itoral@igalia.com> Date: Thu Sep 16 08:45:52 2010 +0200 core: Fix incorrect sorting of ranked plugins. commit 723f3a0e8738a3d4a78232eb6c26b459ee3a2497 Author: Simón Pena <spenap@gmail.com> Date: Tue Sep 14 21:18:29 2010 +0200 core: Make get_sources_by_operations return a GList https://bugzilla.gnome.org/show_bug.cgi?id=629369 Signed-off-by: Iago Toral Quiroga <itoral@igalia.com> commit 21c8f46cb4b64c852f7d659ad5201fd178e83666 Author: Simón Pena <spenap@gmail.com> Date: Tue Sep 14 21:18:28 2010 +0200 core: Make get_sources return a GList * GrlPluginRegistry's get_sources now returns a GList * Added a compare_by_rank method to use with g_list_sort * Updated grilo-test-ui, grl-inspect and tests to expect a GList https://bugzilla.gnome.org/show_bug.cgi?id=629369 Signed-off-by: Iago Toral Quiroga <itoral@igalia.com>