Merge lp:~rodrigo-moya/ubuntu/maverick/rhythmbox/unbreak-python-bindings into lp:~ubuntu-desktop/rhythmbox/ubuntu

Proposed by Rodrigo Moya
Status: Merged
Merged at revision: 109
Proposed branch: lp:~rodrigo-moya/ubuntu/maverick/rhythmbox/unbreak-python-bindings
Merge into: lp:~ubuntu-desktop/rhythmbox/ubuntu
Diff against target: 144 lines (+123/-0)
3 files modified
debian/changelog (+8/-0)
debian/patches/22_impl-add-uri-hack.patch (+114/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~rodrigo-moya/ubuntu/maverick/rhythmbox/unbreak-python-bindings
Reviewer Review Type Date Requested Status
Ubuntu Development Team Pending
Review via email: mp+36699@code.launchpad.net

Description of the change

Add upstream patch to unbreak Python bindings for add_uri method

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2010-09-09 19:58:45 +0000
+++ debian/changelog 2010-09-27 11:29:43 +0000
@@ -1,3 +1,11 @@
1rhythmbox (0.13.1-0ubuntu5) maverick; urgency=low
2
3 * debian/patches/22_impl-add-uri-hack.patch:
4 debian/patches/series:
5 - Add upstream patch to unbreak Python bindings for add_uri method.
6
7 -- Rodrigo Moya <rodrigo.moya@canonical.com> Mon, 27 Sep 2010 13:24:54 +0200
8
1rhythmbox (0.13.1-0ubuntu4) maverick; urgency=low9rhythmbox (0.13.1-0ubuntu4) maverick; urgency=low
210
3 * debian/patches/22_hide_on_quit.patch: (LP: #526552):11 * debian/patches/22_hide_on_quit.patch: (LP: #526552):
412
=== added file 'debian/patches/22_impl-add-uri-hack.patch'
--- debian/patches/22_impl-add-uri-hack.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/22_impl-add-uri-hack.patch 2010-09-27 11:29:43 +0000
@@ -0,0 +1,114 @@
1Description: Python bindings were broken by recent changes, so this (temporary) hack from
2 upstream developer Jonathan Matthew unbreaks them, so that the feature
3 of loading u1ms:// links on the music store plugin works again.
4 This is already in rhythmbox GIT master (http://git.gnome.org/browse/rhythmbox/commit/?id=ffd7608f3eae17f0aacbd9223eefd27963a96aa5)
5 so should be removed with next version update.
6Author: Jonathan Matthew
7
8=== modified file 'bindings/python/rb.override'
9--- old/bindings/python/rb.override 2010-06-02 10:51:26 +0000
10+++ new/bindings/python/rb.override 2010-09-27 10:57:34 +0000
11@@ -1714,3 +1714,102 @@
12 Py_DECREF(py_self);
13 pyg_gil_state_release(__py_state);
14 }
15+%%
16+override RBSource__proxy_do_impl_add_uri
17+static gboolean
18+_wrap_RBSource__proxy_do_impl_add_uri(RBSource *self, const char*uri, const char*title, const char*genre, RBSourceAddCallback callback, gpointer data, GDestroyNotify destroy_data)
19+{
20+ PyGILState_STATE __py_state;
21+ PyObject *py_self;
22+ PyObject *py_uri = NULL;
23+ PyObject *py_title;
24+ PyObject *py_genre;
25+ gboolean retval;
26+ PyObject *py_main_retval;
27+ PyObject *py_retval;
28+ PyObject *py_args;
29+ PyObject *py_method;
30+
31+ __py_state = pyg_gil_state_ensure();
32+ py_self = pygobject_new((GObject *) self);
33+ if (!py_self) {
34+ if (PyErr_Occurred())
35+ PyErr_Print();
36+ pyg_gil_state_release(__py_state);
37+ return FALSE;
38+ }
39+ if (uri)
40+ py_uri = PyString_FromString(uri);
41+ if (!py_uri) {
42+ if (PyErr_Occurred())
43+ PyErr_Print();
44+ Py_DECREF(py_self);
45+ pyg_gil_state_release(__py_state);
46+ return FALSE;
47+ }
48+ if (title)
49+ py_title = PyString_FromString(title);
50+ else {
51+ Py_INCREF(Py_None);
52+ py_title = Py_None;
53+ }
54+ if (genre)
55+ py_genre = PyString_FromString(genre);
56+ else {
57+ Py_INCREF(Py_None);
58+ py_genre = Py_None;
59+ }
60+
61+ py_args = PyTuple_New(3);
62+ PyTuple_SET_ITEM(py_args, 0, py_uri);
63+ PyTuple_SET_ITEM(py_args, 1, py_title);
64+ PyTuple_SET_ITEM(py_args, 2, py_genre);
65+
66+ py_method = PyObject_GetAttrString(py_self, "do_impl_add_uri");
67+ if (!py_method) {
68+ if (PyErr_Occurred())
69+ PyErr_Print();
70+ Py_DECREF(py_args);
71+ Py_DECREF(py_self);
72+ pyg_gil_state_release(__py_state);
73+ return FALSE;
74+ }
75+ py_retval = PyObject_CallObject(py_method, py_args);
76+ if (!py_retval) {
77+ if (PyErr_Occurred())
78+ PyErr_Print();
79+ Py_XDECREF(py_retval);
80+ Py_DECREF(py_method);
81+ Py_DECREF(py_args);
82+ Py_DECREF(py_self);
83+ pyg_gil_state_release(__py_state);
84+ return FALSE;
85+ }
86+ py_retval = Py_BuildValue("(N)", py_retval);
87+ if (!PyArg_ParseTuple(py_retval, "O", &py_main_retval)) {
88+ if (PyErr_Occurred())
89+ PyErr_Print();
90+ Py_XDECREF(py_retval);
91+ Py_DECREF(py_method);
92+ Py_DECREF(py_args);
93+ Py_DECREF(py_self);
94+ pyg_gil_state_release(__py_state);
95+ return FALSE;
96+ }
97+ if (callback) {
98+ callback (self, uri, data);
99+ if (destroy_data) {
100+ destroy_data (data);
101+ }
102+ }
103+
104+ retval = PyObject_IsTrue(py_main_retval)? TRUE : FALSE;
105+
106+ Py_XDECREF(py_retval);
107+ Py_DECREF(py_method);
108+ Py_DECREF(py_args);
109+ Py_DECREF(py_self);
110+ pyg_gil_state_release(__py_state);
111+
112+ return retval;
113+}
114
0115
=== modified file 'debian/patches/series'
--- debian/patches/series 2010-09-09 08:47:59 +0000
+++ debian/patches/series 2010-09-27 11:29:43 +0000
@@ -7,5 +7,6 @@
720_pause_button.patch720_pause_button.patch
821_update_louie_imports.patch821_update_louie_imports.patch
922_hide_on_quit.patch922_hide_on_quit.patch
1022_impl-add-uri-hack.patch
1091_git_fix_upnp_support.patch1191_git_fix_upnp_support.patch
1112

Subscribers

People subscribed via source and target branches

to all changes: