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

Subscribers

People subscribed via source and target branches

to all changes: