Merge lp:~laney/rhythmbox/rb-2.97-update into lp:~ubuntu-desktop/rhythmbox/ubuntu
- rb-2.97-update
- Merge into ubuntu
Proposed by
Iain Lane
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 173 | ||||
Proposed branch: | lp:~laney/rhythmbox/rb-2.97-update | ||||
Merge into: | lp:~ubuntu-desktop/rhythmbox/ubuntu | ||||
Diff against target: |
1299 lines (+58/-1045) 18 files modified
debian/changelog (+21/-0) debian/control (+1/-0) debian/control.in (+1/-0) debian/patches/02_use_escaped_podcast_uri.patch (+5/-4) debian/patches/03_magnatune_partner.patch (+5/-4) debian/patches/04_pause_button.patch (+13/-13) debian/patches/05_hide_on_quit.patch (+8/-8) debian/patches/06_manual_connect_daap_host.patch (+0/-21) debian/patches/07_quicklists.patch (+3/-3) debian/patches/git_ipod_no_private_source.patch (+0/-161) debian/patches/git_ipod_playlist_handler.patch (+0/-632) debian/patches/git_local_art_search_typo.patch (+0/-23) debian/patches/git_magnatune_dialog_segfault.patch (+0/-24) debian/patches/git_mpris_playlists.patch (+0/-118) debian/patches/git_playlists_sync_segfault.patch (+0/-25) debian/patches/series (+0/-6) debian/rhythmbox-plugins.install (+0/-2) debian/rhythmbox.gsettings-override (+1/-1) |
||||
To merge this branch: | bzr merge lp:~laney/rhythmbox/rb-2.97-update | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Desktop | Pending | ||
Review via email: mp+108536@code.launchpad.net |
Commit message
Description of the change
Update to 2.97
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 2012-05-17 23:12:21 +0000 | |||
3 | +++ debian/changelog 2012-06-04 10:19:20 +0000 | |||
4 | @@ -1,3 +1,24 @@ | |||
5 | 1 | rhythmbox (2.97-0ubuntu1) UNRELEASED; urgency=low | ||
6 | 2 | |||
7 | 3 | * New upstream release 2.97 (LP: #1008406) | ||
8 | 4 | - New more compact header layout, including album art | ||
9 | 5 | - Deprecated artdisplay plugin | ||
10 | 6 | - Fixed buffering for network streams | ||
11 | 7 | - Configurable encoding settings for the library, using GStreamer presets or | ||
12 | 8 | simple quality settings | ||
13 | 9 | - Doesn't preserve mtime on metadata updates | ||
14 | 10 | - Fixed audio CD extraction speed | ||
15 | 11 | - New podcast subscription interface, including iTunes and Miroguide | ||
16 | 12 | searching and auditioning before subscription | ||
17 | 13 | * Drop all git backported packages; in this release. | ||
18 | 14 | * Drop debian/patches/06_manual_connect_daap_host.patch: upstream and not | ||
19 | 15 | in series. | ||
20 | 16 | * Refresh other patches. | ||
21 | 17 | * Add BD on libxml2-dev, as required by configure. | ||
22 | 18 | * Adjust packaging for removal of artdisplay. | ||
23 | 19 | |||
24 | 20 | -- Iain Lane <iain.lane@canonical.com> Mon, 04 Jun 2012 10:02:09 +0100 | ||
25 | 21 | |||
26 | 1 | rhythmbox (2.96-0ubuntu6) quantal; urgency=low | 22 | rhythmbox (2.96-0ubuntu6) quantal; urgency=low |
27 | 2 | 23 | ||
28 | 3 | * debian/rhythmbox.install: | 24 | * debian/rhythmbox.install: |
29 | 4 | 25 | ||
30 | === modified file 'debian/control' | |||
31 | --- debian/control 2012-05-14 04:30:50 +0000 | |||
32 | +++ debian/control 2012-06-04 10:19:20 +0000 | |||
33 | @@ -47,6 +47,7 @@ | |||
34 | 47 | libgnome-keyring-dev, | 47 | libgnome-keyring-dev, |
35 | 48 | libpeas-dev (>= 0.7.3), | 48 | libpeas-dev (>= 0.7.3), |
36 | 49 | zlib1g-dev, | 49 | zlib1g-dev, |
37 | 50 | libxml2-dev (>= 2.7.8), | ||
38 | 50 | libxt-dev, | 51 | libxt-dev, |
39 | 51 | x11proto-core-dev, | 52 | x11proto-core-dev, |
40 | 52 | libgconf2-dev, | 53 | libgconf2-dev, |
41 | 53 | 54 | ||
42 | === modified file 'debian/control.in' | |||
43 | --- debian/control.in 2012-05-14 04:30:50 +0000 | |||
44 | +++ debian/control.in 2012-06-04 10:19:20 +0000 | |||
45 | @@ -42,6 +42,7 @@ | |||
46 | 42 | libgnome-keyring-dev, | 42 | libgnome-keyring-dev, |
47 | 43 | libpeas-dev (>= 0.7.3), | 43 | libpeas-dev (>= 0.7.3), |
48 | 44 | zlib1g-dev, | 44 | zlib1g-dev, |
49 | 45 | libxml2-dev (>= 2.7.8), | ||
50 | 45 | libxt-dev, | 46 | libxt-dev, |
51 | 46 | x11proto-core-dev, | 47 | x11proto-core-dev, |
52 | 47 | libgconf2-dev, | 48 | libgconf2-dev, |
53 | 48 | 49 | ||
54 | === modified file 'debian/patches/02_use_escaped_podcast_uri.patch' | |||
55 | --- debian/patches/02_use_escaped_podcast_uri.patch 2012-03-14 09:14:08 +0000 | |||
56 | +++ debian/patches/02_use_escaped_podcast_uri.patch 2012-06-04 10:19:20 +0000 | |||
57 | @@ -1,6 +1,8 @@ | |||
58 | 1 | === modified file 'podcast/rb-podcast-manager.c' | 1 | === modified file 'podcast/rb-podcast-manager.c' |
61 | 2 | --- old/podcast/rb-podcast-manager.c 2012-03-08 20:38:49 +0000 | 2 | Index: rhythmbox-2.97/podcast/rb-podcast-manager.c |
62 | 3 | +++ new/podcast/rb-podcast-manager.c 2012-03-08 21:02:02 +0000 | 3 | =================================================================== |
63 | 4 | --- rhythmbox-2.97.orig/podcast/rb-podcast-manager.c 2012-06-04 10:24:44.591435382 +0100 | ||
64 | 5 | +++ rhythmbox-2.97/podcast/rb-podcast-manager.c 2012-06-04 10:24:55.207434915 +0100 | ||
65 | 4 | @@ -29,6 +29,7 @@ | 6 | @@ -29,6 +29,7 @@ |
66 | 5 | #include "config.h" | 7 | #include "config.h" |
67 | 6 | 8 | ||
68 | @@ -9,7 +11,7 @@ | |||
69 | 9 | #define __USE_XOPEN | 11 | #define __USE_XOPEN |
70 | 10 | #include <time.h> | 12 | #include <time.h> |
71 | 11 | 13 | ||
73 | 12 | @@ -865,9 +866,15 @@ download_podcast (GFileInfo *src_info, R | 14 | @@ -859,9 +860,15 @@ |
74 | 13 | } | 15 | } |
75 | 14 | 16 | ||
76 | 15 | if (local_file_name == NULL) { | 17 | if (local_file_name == NULL) { |
77 | @@ -28,4 +30,3 @@ | |||
78 | 28 | } | 30 | } |
79 | 29 | 31 | ||
80 | 30 | /* if the filename ends with the query string from the original URI, | 32 | /* if the filename ends with the query string from the original URI, |
81 | 31 | |||
82 | 32 | 33 | ||
83 | === modified file 'debian/patches/03_magnatune_partner.patch' | |||
84 | --- debian/patches/03_magnatune_partner.patch 2012-03-14 09:14:08 +0000 | |||
85 | +++ debian/patches/03_magnatune_partner.patch 2012-06-04 10:19:20 +0000 | |||
86 | @@ -1,7 +1,9 @@ | |||
87 | 1 | === modified file 'plugins/magnatune/MagnatuneSource.py' | 1 | === modified file 'plugins/magnatune/MagnatuneSource.py' |
91 | 2 | --- old/plugins/magnatune/MagnatuneSource.py 2012-03-08 20:38:49 +0000 | 2 | Index: rhythmbox-2.97/plugins/magnatune/MagnatuneSource.py |
92 | 3 | +++ new/plugins/magnatune/MagnatuneSource.py 2012-03-08 21:03:17 +0000 | 3 | =================================================================== |
93 | 4 | @@ -44,7 +44,7 @@ import MagnatuneAccount | 4 | --- rhythmbox-2.97.orig/plugins/magnatune/MagnatuneSource.py 2012-06-04 10:24:44.559435384 +0100 |
94 | 5 | +++ rhythmbox-2.97/plugins/magnatune/MagnatuneSource.py 2012-06-04 10:24:55.411434906 +0100 | ||
95 | 6 | @@ -44,7 +44,7 @@ | ||
96 | 5 | import gettext | 7 | import gettext |
97 | 6 | gettext.install('rhythmbox', RB.locale_dir()) | 8 | gettext.install('rhythmbox', RB.locale_dir()) |
98 | 7 | 9 | ||
99 | @@ -10,4 +12,3 @@ | |||
100 | 10 | 12 | ||
101 | 11 | # URIs | 13 | # URIs |
102 | 12 | magnatune_song_info_uri = "http://magnatune.com/info/song_info_xml.zip" | 14 | magnatune_song_info_uri = "http://magnatune.com/info/song_info_xml.zip" |
103 | 13 | |||
104 | 14 | 15 | ||
105 | === modified file 'debian/patches/04_pause_button.patch' | |||
106 | --- debian/patches/04_pause_button.patch 2011-08-03 15:25:12 +0000 | |||
107 | +++ debian/patches/04_pause_button.patch 2012-06-04 10:19:20 +0000 | |||
108 | @@ -5,11 +5,11 @@ | |||
109 | 5 | Author: Bilal Akhtar <bilalakhtar@ubuntu.com> | 5 | Author: Bilal Akhtar <bilalakhtar@ubuntu.com> |
110 | 6 | Bug-Ubuntu: https://bugs.edge.launchpad.net/hundredpapercuts/+bug/71228 | 6 | Bug-Ubuntu: https://bugs.edge.launchpad.net/hundredpapercuts/+bug/71228 |
111 | 7 | Forwarded: https://bugzilla.gnome.org/show_bug.cgi?id=326066 | 7 | Forwarded: https://bugzilla.gnome.org/show_bug.cgi?id=326066 |
113 | 8 | Index: rhythmbox-2.90.1~20110802/shell/rb-shell-player.c | 8 | Index: rhythmbox-2.97/shell/rb-shell-player.c |
114 | 9 | =================================================================== | 9 | =================================================================== |
118 | 10 | --- rhythmbox-2.90.1~20110802.orig/shell/rb-shell-player.c | 10 | --- rhythmbox-2.97.orig/shell/rb-shell-player.c 2012-06-04 10:24:44.511435386 +0100 |
119 | 11 | +++ rhythmbox-2.90.1~20110802/shell/rb-shell-player.c | 11 | +++ rhythmbox-2.97/shell/rb-shell-player.c 2012-06-04 10:24:55.611434898 +0100 |
120 | 12 | @@ -291,6 +291,9 @@ | 12 | @@ -294,6 +294,9 @@ |
121 | 13 | 13 | ||
122 | 14 | static GtkActionEntry rb_shell_player_actions [] = | 14 | static GtkActionEntry rb_shell_player_actions [] = |
123 | 15 | { | 15 | { |
124 | @@ -19,7 +19,7 @@ | |||
125 | 19 | { "ControlPrevious", GTK_STOCK_MEDIA_PREVIOUS, N_("Pre_vious"), "<alt>Left", | 19 | { "ControlPrevious", GTK_STOCK_MEDIA_PREVIOUS, N_("Pre_vious"), "<alt>Left", |
126 | 20 | N_("Start playing the previous song"), | 20 | N_("Start playing the previous song"), |
127 | 21 | G_CALLBACK (rb_shell_player_cmd_previous) }, | 21 | G_CALLBACK (rb_shell_player_cmd_previous) }, |
129 | 22 | @@ -308,9 +311,6 @@ | 22 | @@ -311,9 +314,6 @@ |
130 | 23 | 23 | ||
131 | 24 | static GtkToggleActionEntry rb_shell_player_toggle_entries [] = | 24 | static GtkToggleActionEntry rb_shell_player_toggle_entries [] = |
132 | 25 | { | 25 | { |
133 | @@ -29,17 +29,17 @@ | |||
134 | 29 | { "ControlShuffle", GNOME_MEDIA_SHUFFLE, N_("Sh_uffle"), "<control>U", | 29 | { "ControlShuffle", GNOME_MEDIA_SHUFFLE, N_("Sh_uffle"), "<control>U", |
135 | 30 | N_("Play songs in a random order"), | 30 | N_("Play songs in a random order"), |
136 | 31 | G_CALLBACK (rb_shell_player_shuffle_changed_cb) }, | 31 | G_CALLBACK (rb_shell_player_shuffle_changed_cb) }, |
140 | 32 | @@ -697,9 +697,6 @@ | 32 | @@ -705,9 +705,6 @@ |
141 | 33 | action, "active", | 33 | player_settings_changed_cb (player->priv->settings, "transition-time", player); |
142 | 34 | G_SETTINGS_BIND_INVERT_BOOLEAN | G_SETTINGS_BIND_NO_SENSITIVITY); | 34 | player_settings_changed_cb (player->priv->settings, "play-order", player); |
143 | 35 | 35 | ||
144 | 36 | - action = gtk_action_group_get_action (player->priv->actiongroup, | 36 | - action = gtk_action_group_get_action (player->priv->actiongroup, |
145 | 37 | - "ControlPlay"); | 37 | - "ControlPlay"); |
146 | 38 | - g_object_set (action, "is-important", TRUE, NULL); | 38 | - g_object_set (action, "is-important", TRUE, NULL); |
147 | 39 | 39 | ||
151 | 40 | player->priv->syncing_state = TRUE; | 40 | action = gtk_action_group_get_action (player->priv->actiongroup, "ControlPrevious"); |
152 | 41 | rb_shell_player_set_playing_source (player, NULL); | 41 | g_object_bind_property (player, "has-prev", action, "sensitive", G_BINDING_DEFAULT); |
153 | 42 | @@ -3777,7 +3774,6 @@ | 42 | @@ -3825,7 +3822,6 @@ |
154 | 43 | 43 | ||
155 | 44 | /* sync the active state of the action again */ | 44 | /* sync the active state of the action again */ |
156 | 45 | g_object_get (player, "playing", &playing, NULL); | 45 | g_object_get (player, "playing", &playing, NULL); |
157 | @@ -47,7 +47,7 @@ | |||
158 | 47 | 47 | ||
159 | 48 | g_signal_handlers_unblock_by_func (action, rb_shell_player_cmd_play, player); | 48 | g_signal_handlers_unblock_by_func (action, rb_shell_player_cmd_play, player); |
160 | 49 | 49 | ||
162 | 50 | @@ -3800,11 +3796,17 @@ | 50 | @@ -3848,11 +3844,17 @@ |
163 | 51 | if (playing) { | 51 | if (playing) { |
164 | 52 | if (rb_source_can_pause (player->priv->source)) { | 52 | if (rb_source_can_pause (player->priv->source)) { |
165 | 53 | tooltip = g_strdup (_("Pause playback")); | 53 | tooltip = g_strdup (_("Pause playback")); |
166 | @@ -65,7 +65,7 @@ | |||
167 | 65 | } | 65 | } |
168 | 66 | g_object_set (action, "tooltip", tooltip, NULL); | 66 | g_object_set (action, "tooltip", tooltip, NULL); |
169 | 67 | g_free (tooltip); | 67 | g_free (tooltip); |
171 | 68 | @@ -3816,7 +3818,6 @@ | 68 | @@ -3864,7 +3866,6 @@ |
172 | 69 | if (player->priv->unblock_play_id == 0) { | 69 | if (player->priv->unblock_play_id == 0) { |
173 | 70 | g_signal_handlers_block_by_func (action, rb_shell_player_cmd_play, player); | 70 | g_signal_handlers_block_by_func (action, rb_shell_player_cmd_play, player); |
174 | 71 | } | 71 | } |
175 | 72 | 72 | ||
176 | === modified file 'debian/patches/05_hide_on_quit.patch' | |||
177 | --- debian/patches/05_hide_on_quit.patch 2011-08-03 15:25:12 +0000 | |||
178 | +++ debian/patches/05_hide_on_quit.patch 2012-06-04 10:19:20 +0000 | |||
179 | @@ -5,11 +5,11 @@ | |||
180 | 5 | Author: Didier Roche | 5 | Author: Didier Roche |
181 | 6 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/526552 | 6 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/526552 |
182 | 7 | 7 | ||
184 | 8 | Index: rhythmbox-2.90.1~20110802/shell/rb-shell.c | 8 | Index: rhythmbox-2.97/shell/rb-shell.c |
185 | 9 | =================================================================== | 9 | =================================================================== |
189 | 10 | --- rhythmbox-2.90.1~20110802.orig/shell/rb-shell.c | 10 | --- rhythmbox-2.97.orig/shell/rb-shell.c 2012-06-04 10:24:44.475435388 +0100 |
190 | 11 | +++ rhythmbox-2.90.1~20110802/shell/rb-shell.c | 11 | +++ rhythmbox-2.97/shell/rb-shell.c 2012-06-04 10:24:55.827434888 +0100 |
191 | 12 | @@ -1915,11 +1915,42 @@ | 12 | @@ -2276,11 +2276,42 @@ |
192 | 13 | return FALSE; | 13 | return FALSE; |
193 | 14 | } | 14 | } |
194 | 15 | 15 | ||
195 | @@ -52,11 +52,11 @@ | |||
196 | 52 | if (shell->priv->party_mode) { | 52 | if (shell->priv->party_mode) { |
197 | 53 | return TRUE; | 53 | return TRUE; |
198 | 54 | } | 54 | } |
200 | 55 | Index: rhythmbox-2.90.1~20110802/shell/rb-shell.h | 55 | Index: rhythmbox-2.97/shell/rb-shell.h |
201 | 56 | =================================================================== | 56 | =================================================================== |
205 | 57 | --- rhythmbox-2.90.1~20110802.orig/shell/rb-shell.h | 57 | --- rhythmbox-2.97.orig/shell/rb-shell.h 2012-06-04 10:24:44.475435388 +0100 |
206 | 58 | +++ rhythmbox-2.90.1~20110802/shell/rb-shell.h | 58 | +++ rhythmbox-2.97/shell/rb-shell.h 2012-06-04 10:24:55.827434888 +0100 |
207 | 59 | @@ -183,6 +183,8 @@ | 59 | @@ -160,6 +160,8 @@ |
208 | 60 | 60 | ||
209 | 61 | gboolean rb_shell_get_party_mode (RBShell *shell); | 61 | gboolean rb_shell_get_party_mode (RBShell *shell); |
210 | 62 | 62 | ||
211 | 63 | 63 | ||
212 | === removed file 'debian/patches/06_manual_connect_daap_host.patch' | |||
213 | --- debian/patches/06_manual_connect_daap_host.patch 2011-05-26 16:45:50 +0000 | |||
214 | +++ debian/patches/06_manual_connect_daap_host.patch 1970-01-01 00:00:00 +0000 | |||
215 | @@ -1,21 +0,0 @@ | |||
216 | 1 | From e710ae5e83a965147b63af9ad6179338de81f20b Mon Sep 17 00:00:00 2001 | ||
217 | 2 | From: W. Michael Petullo <mike@flyn.org> | ||
218 | 3 | Date: Wed, 04 May 2011 17:18:44 +0000 | ||
219 | 4 | Subject: DAAP: allow a user to provide a port for specified server | ||
220 | 5 | |||
221 | 6 | Bug: https://bugzilla.gnome.org/show_bug.cgi?id=649288 | ||
222 | 7 | Bug-Ubuntu: https://launchpad.net/bugs/665168 | ||
223 | 8 | --- | ||
224 | 9 | Index: rhythmbox-0.13.3/plugins/daap/rb-daap-plugin.c | ||
225 | 10 | =================================================================== | ||
226 | 11 | --- rhythmbox-0.13.3.orig/plugins/daap/rb-daap-plugin.c 2011-01-16 10:10:40.000000000 +0100 | ||
227 | 12 | +++ rhythmbox-0.13.3/plugins/daap/rb-daap-plugin.c 2011-05-05 07:27:37.536527475 +0200 | ||
228 | 13 | @@ -723,7 +723,7 @@ | ||
229 | 14 | |||
230 | 15 | rb_debug ("adding manually specified DAAP share at %s", location); | ||
231 | 16 | service.name = (char *) location; | ||
232 | 17 | - service.host = (char *) location; | ||
233 | 18 | + service.host = (char *) host; | ||
234 | 19 | service.port = port; | ||
235 | 20 | service.password_protected = FALSE; | ||
236 | 21 | mdns_service_added (NULL, | ||
237 | 22 | 0 | ||
238 | === modified file 'debian/patches/07_quicklists.patch' | |||
239 | --- debian/patches/07_quicklists.patch 2012-03-20 12:01:59 +0000 | |||
240 | +++ debian/patches/07_quicklists.patch 2012-06-04 10:19:20 +0000 | |||
241 | @@ -1,8 +1,8 @@ | |||
242 | 1 | === modified file 'a/data/rhythmbox.desktop.in.in' | 1 | === modified file 'a/data/rhythmbox.desktop.in.in' |
244 | 2 | Index: rhythmbox-2.95.5/data/rhythmbox.desktop.in.in | 2 | Index: rhythmbox-2.97/data/rhythmbox.desktop.in.in |
245 | 3 | =================================================================== | 3 | =================================================================== |
248 | 4 | --- rhythmbox-2.95.5.orig/data/rhythmbox.desktop.in.in 2012-02-12 01:13:10.000000000 -0500 | 4 | --- rhythmbox-2.97.orig/data/rhythmbox.desktop.in.in 2012-06-04 10:24:44.407435390 +0100 |
249 | 5 | +++ rhythmbox-2.95.5/data/rhythmbox.desktop.in.in 2012-03-15 15:08:33.263349627 -0400 | 5 | +++ rhythmbox-2.97/data/rhythmbox.desktop.in.in 2012-06-04 10:24:56.031434879 +0100 |
250 | 6 | @@ -16,3 +16,20 @@ | 6 | @@ -16,3 +16,20 @@ |
251 | 7 | X-GNOME-Bugzilla-Component=general | 7 | X-GNOME-Bugzilla-Component=general |
252 | 8 | X-GNOME-Bugzilla-OtherBinaries=rhythmbox-client;rhythmbox-metadata; | 8 | X-GNOME-Bugzilla-OtherBinaries=rhythmbox-client;rhythmbox-metadata; |
253 | 9 | 9 | ||
254 | === removed file 'debian/patches/git_ipod_no_private_source.patch' | |||
255 | --- debian/patches/git_ipod_no_private_source.patch 2012-03-16 11:11:59 +0000 | |||
256 | +++ debian/patches/git_ipod_no_private_source.patch 1970-01-01 00:00:00 +0000 | |||
257 | @@ -1,161 +0,0 @@ | |||
258 | 1 | From 63a5411ebd6058c8c6ffc618a8c3ce940c210ecc Mon Sep 17 00:00:00 2001 | ||
259 | 2 | From: Cole Robinson <crobinso@redhat.com> | ||
260 | 3 | Date: Mon, 12 Mar 2012 22:43:01 +0000 | ||
261 | 4 | Subject: ipod: playlist handlers shouldn't need private source access | ||
262 | 5 | |||
263 | 6 | Accomplist this by adding an ipod source method to lookup a track | ||
264 | 7 | in the private entry_map. | ||
265 | 8 | |||
266 | 9 | Signed-off-by: Cole Robinson <crobinso@redhat.com> | ||
267 | 10 | --- | ||
268 | 11 | diff --git a/plugins/ipod/rb-ipod-source.c b/plugins/ipod/rb-ipod-source.c | ||
269 | 12 | index aea499e..7a23d0c 100644 | ||
270 | 13 | --- a/plugins/ipod/rb-ipod-source.c | ||
271 | 14 | +++ b/plugins/ipod/rb-ipod-source.c | ||
272 | 15 | @@ -594,15 +594,15 @@ playlist_track_removed (RhythmDBQueryModel *m, | ||
273 | 16 | RBIpodStaticPlaylistSource *playlist = RB_IPOD_STATIC_PLAYLIST_SOURCE (data); | ||
274 | 17 | Itdb_Playlist *ipod_pl = rb_ipod_static_playlist_source_get_itdb_playlist (playlist); | ||
275 | 18 | RBiPodSource *ipod = rb_ipod_static_playlist_source_get_ipod_source (playlist); | ||
276 | 19 | - RBiPodSourcePrivate *priv = IPOD_SOURCE_GET_PRIVATE (ipod); | ||
277 | 20 | + RbIpodDb *ipod_db = rb_ipod_static_playlist_source_get_ipod_db (playlist); | ||
278 | 21 | Itdb_Track *track; | ||
279 | 22 | |||
280 | 23 | g_return_if_fail (ipod != NULL); | ||
281 | 24 | g_return_if_fail (ipod_pl != NULL); | ||
282 | 25 | |||
283 | 26 | - track = g_hash_table_lookup (priv->entry_map, entry); | ||
284 | 27 | + track = rb_ipod_source_lookup_track (ipod, entry); | ||
285 | 28 | g_return_if_fail (track != NULL); | ||
286 | 29 | - rb_ipod_db_remove_from_playlist (priv->ipod_db, ipod_pl, track); | ||
287 | 30 | + rb_ipod_db_remove_from_playlist (ipod_db, ipod_pl, track); | ||
288 | 31 | } | ||
289 | 32 | |||
290 | 33 | static void | ||
291 | 34 | @@ -612,7 +612,7 @@ playlist_track_added (GtkTreeModel *model, GtkTreePath *path, | ||
292 | 35 | RBIpodStaticPlaylistSource *playlist = RB_IPOD_STATIC_PLAYLIST_SOURCE (data); | ||
293 | 36 | Itdb_Playlist *ipod_pl = rb_ipod_static_playlist_source_get_itdb_playlist (playlist); | ||
294 | 37 | RBiPodSource *ipod = rb_ipod_static_playlist_source_get_ipod_source (playlist); | ||
295 | 38 | - RBiPodSourcePrivate *priv = IPOD_SOURCE_GET_PRIVATE (ipod); | ||
296 | 39 | + RbIpodDb *ipod_db = rb_ipod_static_playlist_source_get_ipod_db (playlist); | ||
297 | 40 | Itdb_Track *track; | ||
298 | 41 | RhythmDBEntry *entry; | ||
299 | 42 | |||
300 | 43 | @@ -620,10 +620,10 @@ playlist_track_added (GtkTreeModel *model, GtkTreePath *path, | ||
301 | 44 | g_return_if_fail (ipod_pl != NULL); | ||
302 | 45 | |||
303 | 46 | gtk_tree_model_get (model, iter, 0, &entry, -1); | ||
304 | 47 | - track = g_hash_table_lookup (priv->entry_map, entry); | ||
305 | 48 | + track = rb_ipod_source_lookup_track (ipod, entry); | ||
306 | 49 | g_return_if_fail (track != NULL); | ||
307 | 50 | |||
308 | 51 | - rb_ipod_db_add_to_playlist (priv->ipod_db, ipod_pl, track); | ||
309 | 52 | + rb_ipod_db_add_to_playlist (ipod_db, ipod_pl, track); | ||
310 | 53 | } | ||
311 | 54 | |||
312 | 55 | static void | ||
313 | 56 | @@ -633,7 +633,6 @@ playlist_before_save (RbIpodDb *ipod_db, gpointer data) | ||
314 | 57 | GtkTreeModel *model = GTK_TREE_MODEL (rb_playlist_source_get_query_model (RB_PLAYLIST_SOURCE (playlist))); | ||
315 | 58 | Itdb_Playlist *ipod_pl = rb_ipod_static_playlist_source_get_itdb_playlist (playlist); | ||
316 | 59 | RBiPodSource *ipod = rb_ipod_static_playlist_source_get_ipod_source (playlist); | ||
317 | 60 | - RBiPodSourcePrivate *priv = IPOD_SOURCE_GET_PRIVATE (ipod); | ||
318 | 61 | GtkTreeIter iter; | ||
319 | 62 | |||
320 | 63 | if (!rb_ipod_static_playlist_source_get_was_reordered (playlist)) { | ||
321 | 64 | @@ -650,7 +649,7 @@ playlist_before_save (RbIpodDb *ipod_db, gpointer data) | ||
322 | 65 | Itdb_Track *track; | ||
323 | 66 | |||
324 | 67 | gtk_tree_model_get (model, &iter, 0, &entry, -1); | ||
325 | 68 | - track = g_hash_table_lookup (priv->entry_map, entry); | ||
326 | 69 | + track = rb_ipod_source_lookup_track (ipod, entry); | ||
327 | 70 | |||
328 | 71 | g_return_if_fail (track != NULL); | ||
329 | 72 | } while (gtk_tree_model_iter_next (model, &iter)); | ||
330 | 73 | @@ -675,7 +674,7 @@ playlist_before_save (RbIpodDb *ipod_db, gpointer data) | ||
331 | 74 | Itdb_Track *track; | ||
332 | 75 | |||
333 | 76 | gtk_tree_model_get (model, &iter, 0, &entry, -1); | ||
334 | 77 | - track = g_hash_table_lookup (priv->entry_map, entry); | ||
335 | 78 | + track = rb_ipod_source_lookup_track (ipod, entry); | ||
336 | 79 | |||
337 | 80 | rb_debug ("adding \"%s\" to \"%s\"", track->title, ipod_pl->name); | ||
338 | 81 | |||
339 | 82 | @@ -692,13 +691,12 @@ playlist_rows_reordered (GtkTreeModel *model, | ||
340 | 83 | gint *order, gpointer data) | ||
341 | 84 | { | ||
342 | 85 | RBIpodStaticPlaylistSource *playlist = RB_IPOD_STATIC_PLAYLIST_SOURCE (data); | ||
343 | 86 | - RBiPodSource *ipod = rb_ipod_static_playlist_source_get_ipod_source (playlist); | ||
344 | 87 | - RBiPodSourcePrivate *priv = IPOD_SOURCE_GET_PRIVATE (ipod); | ||
345 | 88 | + RbIpodDb *ipod_db = rb_ipod_static_playlist_source_get_ipod_db (playlist); | ||
346 | 89 | |||
347 | 90 | /* Mark as reordered; will check before save */ | ||
348 | 91 | rb_ipod_static_playlist_source_set_was_reordered (playlist, TRUE); | ||
349 | 92 | |||
350 | 93 | - rb_ipod_db_save_async (priv->ipod_db); | ||
351 | 94 | + rb_ipod_db_save_async (ipod_db); | ||
352 | 95 | } | ||
353 | 96 | |||
354 | 97 | static void | ||
355 | 98 | @@ -2064,6 +2062,16 @@ rb_ipod_source_remove_playlist (RBiPodSource *ipod_source, | ||
356 | 99 | rb_ipod_db_remove_playlist (priv->ipod_db, rb_ipod_static_playlist_source_get_itdb_playlist (playlist_source)); | ||
357 | 100 | } | ||
358 | 101 | |||
359 | 102 | + | ||
360 | 103 | +Itdb_Track * | ||
361 | 104 | +rb_ipod_source_lookup_track (RBiPodSource *source, | ||
362 | 105 | + RhythmDBEntry *entry) | ||
363 | 106 | +{ | ||
364 | 107 | + RBiPodSourcePrivate *priv = IPOD_SOURCE_GET_PRIVATE (source); | ||
365 | 108 | + | ||
366 | 109 | + return g_hash_table_lookup (priv->entry_map, entry); | ||
367 | 110 | +} | ||
368 | 111 | + | ||
369 | 112 | static gboolean | ||
370 | 113 | ipod_name_changed_cb (GtkWidget *widget, | ||
371 | 114 | GdkEventFocus *event, | ||
372 | 115 | diff --git a/plugins/ipod/rb-ipod-source.h b/plugins/ipod/rb-ipod-source.h | ||
373 | 116 | index f95d735..9af5fa3 100644 | ||
374 | 117 | --- a/plugins/ipod/rb-ipod-source.h | ||
375 | 118 | +++ b/plugins/ipod/rb-ipod-source.h | ||
376 | 119 | @@ -71,6 +71,9 @@ void rb_ipod_source_show_properties (RBiPodSource *source); | ||
377 | 120 | void rb_ipod_source_delete_entries (RBiPodSource *source, | ||
378 | 121 | GList *entries); | ||
379 | 122 | |||
380 | 123 | +Itdb_Track * rb_ipod_source_lookup_track (RBiPodSource *source, | ||
381 | 124 | + RhythmDBEntry *entry); | ||
382 | 125 | + | ||
383 | 126 | G_END_DECLS | ||
384 | 127 | |||
385 | 128 | #endif /* __RB_IPOD_SOURCE_H */ | ||
386 | 129 | diff --git a/plugins/ipod/rb-ipod-static-playlist-source.c b/plugins/ipod/rb-ipod-static-playlist-source.c | ||
387 | 130 | index a2f0248..0a95dc8 100644 | ||
388 | 131 | --- a/plugins/ipod/rb-ipod-static-playlist-source.c | ||
389 | 132 | +++ b/plugins/ipod/rb-ipod-static-playlist-source.c | ||
390 | 133 | @@ -262,6 +262,14 @@ rb_ipod_static_playlist_source_get_ipod_source (RBIpodStaticPlaylistSource *play | ||
391 | 134 | return priv->ipod_source; | ||
392 | 135 | } | ||
393 | 136 | |||
394 | 137 | +RbIpodDb* | ||
395 | 138 | +rb_ipod_static_playlist_source_get_ipod_db (RBIpodStaticPlaylistSource *playlist) | ||
396 | 139 | +{ | ||
397 | 140 | + RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (playlist); | ||
398 | 141 | + | ||
399 | 142 | + return priv->ipod_db; | ||
400 | 143 | +} | ||
401 | 144 | + | ||
402 | 145 | gboolean | ||
403 | 146 | rb_ipod_static_playlist_source_get_was_reordered (RBIpodStaticPlaylistSource *playlist) | ||
404 | 147 | { | ||
405 | 148 | diff --git a/plugins/ipod/rb-ipod-static-playlist-source.h b/plugins/ipod/rb-ipod-static-playlist-source.h | ||
406 | 149 | index 38afff0..49c833f 100644 | ||
407 | 150 | --- a/plugins/ipod/rb-ipod-static-playlist-source.h | ||
408 | 151 | +++ b/plugins/ipod/rb-ipod-static-playlist-source.h | ||
409 | 152 | @@ -56,6 +56,7 @@ RBIpodStaticPlaylistSource * rb_ipod_static_playlist_source_new (RBShell *shell, | ||
410 | 153 | |||
411 | 154 | Itdb_Playlist* rb_ipod_static_playlist_source_get_itdb_playlist (RBIpodStaticPlaylistSource *playlist); | ||
412 | 155 | RBiPodSource* rb_ipod_static_playlist_source_get_ipod_source (RBIpodStaticPlaylistSource *playlist); | ||
413 | 156 | +RbIpodDb* rb_ipod_static_playlist_source_get_ipod_db (RBIpodStaticPlaylistSource *playlist); | ||
414 | 157 | gboolean rb_ipod_static_playlist_source_get_was_reordered (RBIpodStaticPlaylistSource *playlist); | ||
415 | 158 | void rb_ipod_static_playlist_source_set_was_reordered (RBIpodStaticPlaylistSource *playlist, gboolean was_reordered); | ||
416 | 159 | |||
417 | 160 | -- | ||
418 | 161 | cgit v0.9.0.2 | ||
419 | 162 | 0 | ||
420 | === removed file 'debian/patches/git_ipod_playlist_handler.patch' | |||
421 | --- debian/patches/git_ipod_playlist_handler.patch 2012-03-16 11:11:59 +0000 | |||
422 | +++ debian/patches/git_ipod_playlist_handler.patch 1970-01-01 00:00:00 +0000 | |||
423 | @@ -1,632 +0,0 @@ | |||
424 | 1 | From d99a239c500516c792d50712834a2be76c10feb2 Mon Sep 17 00:00:00 2001 | ||
425 | 2 | From: Jonathan Matthew <jonathan@d14n.org> | ||
426 | 3 | Date: Wed, 14 Mar 2012 13:16:50 +0000 | ||
427 | 4 | Subject: ipod: Move all playlist handlers to private playlist code | ||
428 | 5 | |||
429 | 6 | Various other cleanups, removal of the notify::base-query-model | ||
430 | 7 | signal handler that would never have worked, and stuff moved | ||
431 | 8 | from impl_delete_thyself to the dispose method where it belongs. | ||
432 | 9 | |||
433 | 10 | based on a patch by Cole Robinson <crobinso@redhat.com> | ||
434 | 11 | --- | ||
435 | 12 | diff --git a/plugins/ipod/rb-ipod-plugin.c b/plugins/ipod/rb-ipod-plugin.c | ||
436 | 13 | index 089c1b4..e0907bc 100644 | ||
437 | 14 | --- a/plugins/ipod/rb-ipod-plugin.c | ||
438 | 15 | +++ b/plugins/ipod/rb-ipod-plugin.c | ||
439 | 16 | @@ -277,14 +277,13 @@ rb_ipod_plugin_cmd_playlist_rename (GtkAction *action, RBSource *source) | ||
440 | 17 | static void | ||
441 | 18 | rb_ipod_plugin_cmd_playlist_delete (GtkAction *action, RBSource *source) | ||
442 | 19 | { | ||
443 | 20 | - RBIpodStaticPlaylistSource *psource; | ||
444 | 21 | RBiPodSource *ipod_source; | ||
445 | 22 | |||
446 | 23 | g_return_if_fail (RB_IS_IPOD_STATIC_PLAYLIST_SOURCE (source)); | ||
447 | 24 | - psource = RB_IPOD_STATIC_PLAYLIST_SOURCE (source); | ||
448 | 25 | |||
449 | 26 | - ipod_source = rb_ipod_static_playlist_source_get_ipod_source (psource); | ||
450 | 27 | + g_object_get (source, "ipod-source", &ipod_source, NULL); | ||
451 | 28 | rb_ipod_source_remove_playlist (ipod_source, source); | ||
452 | 29 | + g_object_unref (ipod_source); | ||
453 | 30 | } | ||
454 | 31 | |||
455 | 32 | static void | ||
456 | 33 | diff --git a/plugins/ipod/rb-ipod-source.c b/plugins/ipod/rb-ipod-source.c | ||
457 | 34 | index 7a23d0c..194807c 100644 | ||
458 | 35 | --- a/plugins/ipod/rb-ipod-source.c | ||
459 | 36 | +++ b/plugins/ipod/rb-ipod-source.c | ||
460 | 37 | @@ -587,170 +587,6 @@ ipod_path_to_uri (const char *mount_point, const char *ipod_path) | ||
461 | 38 | } | ||
462 | 39 | |||
463 | 40 | static void | ||
464 | 41 | -playlist_track_removed (RhythmDBQueryModel *m, | ||
465 | 42 | - RhythmDBEntry *entry, | ||
466 | 43 | - gpointer data) | ||
467 | 44 | -{ | ||
468 | 45 | - RBIpodStaticPlaylistSource *playlist = RB_IPOD_STATIC_PLAYLIST_SOURCE (data); | ||
469 | 46 | - Itdb_Playlist *ipod_pl = rb_ipod_static_playlist_source_get_itdb_playlist (playlist); | ||
470 | 47 | - RBiPodSource *ipod = rb_ipod_static_playlist_source_get_ipod_source (playlist); | ||
471 | 48 | - RbIpodDb *ipod_db = rb_ipod_static_playlist_source_get_ipod_db (playlist); | ||
472 | 49 | - Itdb_Track *track; | ||
473 | 50 | - | ||
474 | 51 | - g_return_if_fail (ipod != NULL); | ||
475 | 52 | - g_return_if_fail (ipod_pl != NULL); | ||
476 | 53 | - | ||
477 | 54 | - track = rb_ipod_source_lookup_track (ipod, entry); | ||
478 | 55 | - g_return_if_fail (track != NULL); | ||
479 | 56 | - rb_ipod_db_remove_from_playlist (ipod_db, ipod_pl, track); | ||
480 | 57 | -} | ||
481 | 58 | - | ||
482 | 59 | -static void | ||
483 | 60 | -playlist_track_added (GtkTreeModel *model, GtkTreePath *path, | ||
484 | 61 | - GtkTreeIter *iter, gpointer data) | ||
485 | 62 | -{ | ||
486 | 63 | - RBIpodStaticPlaylistSource *playlist = RB_IPOD_STATIC_PLAYLIST_SOURCE (data); | ||
487 | 64 | - Itdb_Playlist *ipod_pl = rb_ipod_static_playlist_source_get_itdb_playlist (playlist); | ||
488 | 65 | - RBiPodSource *ipod = rb_ipod_static_playlist_source_get_ipod_source (playlist); | ||
489 | 66 | - RbIpodDb *ipod_db = rb_ipod_static_playlist_source_get_ipod_db (playlist); | ||
490 | 67 | - Itdb_Track *track; | ||
491 | 68 | - RhythmDBEntry *entry; | ||
492 | 69 | - | ||
493 | 70 | - g_return_if_fail (ipod != NULL); | ||
494 | 71 | - g_return_if_fail (ipod_pl != NULL); | ||
495 | 72 | - | ||
496 | 73 | - gtk_tree_model_get (model, iter, 0, &entry, -1); | ||
497 | 74 | - track = rb_ipod_source_lookup_track (ipod, entry); | ||
498 | 75 | - g_return_if_fail (track != NULL); | ||
499 | 76 | - | ||
500 | 77 | - rb_ipod_db_add_to_playlist (ipod_db, ipod_pl, track); | ||
501 | 78 | -} | ||
502 | 79 | - | ||
503 | 80 | -static void | ||
504 | 81 | -playlist_before_save (RbIpodDb *ipod_db, gpointer data) | ||
505 | 82 | -{ | ||
506 | 83 | - RBIpodStaticPlaylistSource *playlist = RB_IPOD_STATIC_PLAYLIST_SOURCE (data); | ||
507 | 84 | - GtkTreeModel *model = GTK_TREE_MODEL (rb_playlist_source_get_query_model (RB_PLAYLIST_SOURCE (playlist))); | ||
508 | 85 | - Itdb_Playlist *ipod_pl = rb_ipod_static_playlist_source_get_itdb_playlist (playlist); | ||
509 | 86 | - RBiPodSource *ipod = rb_ipod_static_playlist_source_get_ipod_source (playlist); | ||
510 | 87 | - GtkTreeIter iter; | ||
511 | 88 | - | ||
512 | 89 | - if (!rb_ipod_static_playlist_source_get_was_reordered (playlist)) { | ||
513 | 90 | - return; | ||
514 | 91 | - } | ||
515 | 92 | - | ||
516 | 93 | - rb_ipod_static_playlist_source_set_was_reordered (playlist, FALSE); | ||
517 | 94 | - | ||
518 | 95 | - /* Sanity check that all tracks are in entry_map */ | ||
519 | 96 | - | ||
520 | 97 | - if (gtk_tree_model_get_iter_first (model, &iter)) { | ||
521 | 98 | - do { | ||
522 | 99 | - RhythmDBEntry *entry; | ||
523 | 100 | - Itdb_Track *track; | ||
524 | 101 | - | ||
525 | 102 | - gtk_tree_model_get (model, &iter, 0, &entry, -1); | ||
526 | 103 | - track = rb_ipod_source_lookup_track (ipod, entry); | ||
527 | 104 | - | ||
528 | 105 | - g_return_if_fail (track != NULL); | ||
529 | 106 | - } while (gtk_tree_model_iter_next (model, &iter)); | ||
530 | 107 | - } | ||
531 | 108 | - | ||
532 | 109 | - /* Remove all tracks then re-add in correct order */ | ||
533 | 110 | - | ||
534 | 111 | - while (ipod_pl->members != NULL) { | ||
535 | 112 | - Itdb_Track *track; | ||
536 | 113 | - | ||
537 | 114 | - track = (Itdb_Track *)ipod_pl->members->data; | ||
538 | 115 | - | ||
539 | 116 | - rb_debug ("removing \"%s\" from \"%s\"", track->title, ipod_pl->name); | ||
540 | 117 | - | ||
541 | 118 | - /* Call directly to itdb to avoid scheduling another save */ | ||
542 | 119 | - itdb_playlist_remove_track (ipod_pl, track); | ||
543 | 120 | - } | ||
544 | 121 | - | ||
545 | 122 | - if (gtk_tree_model_get_iter_first (model, &iter)) { | ||
546 | 123 | - do { | ||
547 | 124 | - RhythmDBEntry *entry; | ||
548 | 125 | - Itdb_Track *track; | ||
549 | 126 | - | ||
550 | 127 | - gtk_tree_model_get (model, &iter, 0, &entry, -1); | ||
551 | 128 | - track = rb_ipod_source_lookup_track (ipod, entry); | ||
552 | 129 | - | ||
553 | 130 | - rb_debug ("adding \"%s\" to \"%s\"", track->title, ipod_pl->name); | ||
554 | 131 | - | ||
555 | 132 | - /* Call directly to itdb to avoid scheduling another save */ | ||
556 | 133 | - itdb_playlist_add_track (ipod_pl, track, -1); | ||
557 | 134 | - } while (gtk_tree_model_iter_next (model, &iter)); | ||
558 | 135 | - } | ||
559 | 136 | -} | ||
560 | 137 | - | ||
561 | 138 | -static void | ||
562 | 139 | -playlist_rows_reordered (GtkTreeModel *model, | ||
563 | 140 | - GtkTreePath *path, | ||
564 | 141 | - GtkTreeIter *iter, | ||
565 | 142 | - gint *order, gpointer data) | ||
566 | 143 | -{ | ||
567 | 144 | - RBIpodStaticPlaylistSource *playlist = RB_IPOD_STATIC_PLAYLIST_SOURCE (data); | ||
568 | 145 | - RbIpodDb *ipod_db = rb_ipod_static_playlist_source_get_ipod_db (playlist); | ||
569 | 146 | - | ||
570 | 147 | - /* Mark as reordered; will check before save */ | ||
571 | 148 | - rb_ipod_static_playlist_source_set_was_reordered (playlist, TRUE); | ||
572 | 149 | - | ||
573 | 150 | - rb_ipod_db_save_async (ipod_db); | ||
574 | 151 | -} | ||
575 | 152 | - | ||
576 | 153 | -static void | ||
577 | 154 | -playlist_source_model_disconnect_signals (GObject *model, RBIpodStaticPlaylistSource *playlist_source) | ||
578 | 155 | -{ | ||
579 | 156 | - g_return_if_fail (RB_IS_IPOD_STATIC_PLAYLIST_SOURCE (playlist_source)); | ||
580 | 157 | - | ||
581 | 158 | - g_signal_handlers_disconnect_by_func (model, | ||
582 | 159 | - G_CALLBACK (playlist_track_added), | ||
583 | 160 | - playlist_source); | ||
584 | 161 | - g_signal_handlers_disconnect_by_func (model, | ||
585 | 162 | - G_CALLBACK (playlist_track_removed), | ||
586 | 163 | - playlist_source); | ||
587 | 164 | - g_signal_handlers_disconnect_by_func (model, | ||
588 | 165 | - G_CALLBACK (playlist_rows_reordered), | ||
589 | 166 | - playlist_source); | ||
590 | 167 | -} | ||
591 | 168 | - | ||
592 | 169 | -static void | ||
593 | 170 | -playlist_source_model_connect_signals (RBIpodStaticPlaylistSource *playlist_source) | ||
594 | 171 | -{ | ||
595 | 172 | - RhythmDBQueryModel *model; | ||
596 | 173 | - | ||
597 | 174 | - g_return_if_fail (RB_IS_IPOD_STATIC_PLAYLIST_SOURCE (playlist_source)); | ||
598 | 175 | - | ||
599 | 176 | - g_object_get (G_OBJECT (playlist_source), | ||
600 | 177 | - "base-query-model", &model, NULL); | ||
601 | 178 | - g_signal_connect (model, "row-inserted", | ||
602 | 179 | - G_CALLBACK (playlist_track_added), | ||
603 | 180 | - playlist_source); | ||
604 | 181 | - g_signal_connect (model, "entry-removed", | ||
605 | 182 | - G_CALLBACK (playlist_track_removed), | ||
606 | 183 | - playlist_source); | ||
607 | 184 | - g_signal_connect (model, "rows-reordered", | ||
608 | 185 | - G_CALLBACK (playlist_rows_reordered), | ||
609 | 186 | - playlist_source); | ||
610 | 187 | - g_object_unref (model); | ||
611 | 188 | -} | ||
612 | 189 | - | ||
613 | 190 | -static void | ||
614 | 191 | -playlist_source_model_changed (GObject *obj, GParamSpec *pspec, gpointer old_model) | ||
615 | 192 | -{ | ||
616 | 193 | - RBIpodStaticPlaylistSource *playlist_source; | ||
617 | 194 | - | ||
618 | 195 | - rb_debug ("base model changed for iPod playlist"); | ||
619 | 196 | - | ||
620 | 197 | - playlist_source = RB_IPOD_STATIC_PLAYLIST_SOURCE (obj); | ||
621 | 198 | - | ||
622 | 199 | - playlist_source_model_disconnect_signals (G_OBJECT (old_model), playlist_source); | ||
623 | 200 | - | ||
624 | 201 | - playlist_source_model_connect_signals (playlist_source); | ||
625 | 202 | -} | ||
626 | 203 | - | ||
627 | 204 | -static void | ||
628 | 205 | set_podcast_icon (RBIpodStaticPlaylistSource *source) | ||
629 | 206 | { | ||
630 | 207 | GdkPixbuf *pixbuf; | ||
631 | 208 | @@ -776,7 +612,6 @@ add_rb_playlist (RBiPodSource *source, Itdb_Playlist *playlist) | ||
632 | 209 | GList *it; | ||
633 | 210 | RBiPodSourcePrivate *priv = IPOD_SOURCE_GET_PRIVATE (source); | ||
634 | 211 | RhythmDBEntryType *entry_type; | ||
635 | 212 | - RhythmDBQueryModel *model; | ||
636 | 213 | |||
637 | 214 | g_object_get (source, | ||
638 | 215 | "shell", &shell, | ||
639 | 216 | @@ -812,17 +647,6 @@ add_rb_playlist (RBiPodSource *source, Itdb_Playlist *playlist) | ||
640 | 217 | playlist->userdata_destroy = g_object_unref; | ||
641 | 218 | playlist->userdata_duplicate = g_object_ref; | ||
642 | 219 | |||
643 | 220 | - g_object_get (G_OBJECT (playlist_source), | ||
644 | 221 | - "base-query-model", &model, NULL); | ||
645 | 222 | - g_signal_connect (playlist_source, "notify::base-query-model", | ||
646 | 223 | - G_CALLBACK (playlist_source_model_changed), | ||
647 | 224 | - playlist_source); | ||
648 | 225 | - g_signal_connect (priv->ipod_db, "before-save", | ||
649 | 226 | - G_CALLBACK (playlist_before_save), | ||
650 | 227 | - playlist_source); | ||
651 | 228 | - g_object_unref (model); | ||
652 | 229 | - playlist_source_model_connect_signals (playlist_source); | ||
653 | 230 | - | ||
654 | 231 | if (itdb_playlist_is_podcasts(playlist)) { | ||
655 | 232 | priv->podcast_pl = playlist_source; | ||
656 | 233 | set_podcast_icon (playlist_source); | ||
657 | 234 | @@ -2013,17 +1837,8 @@ impl_delete_thyself (RBDisplayPage *page) | ||
658 | 235 | Itdb_Playlist *playlist = (Itdb_Playlist *)p->data; | ||
659 | 236 | if (!itdb_playlist_is_mpl (playlist) && !playlist->is_spl) { | ||
660 | 237 | RBSource *rb_playlist; | ||
661 | 238 | - RhythmDBQueryModel *model; | ||
662 | 239 | |||
663 | 240 | rb_playlist = RB_SOURCE (playlist->userdata); | ||
664 | 241 | - g_object_get (G_OBJECT (rb_playlist), | ||
665 | 242 | - "base-query-model", &model, NULL); | ||
666 | 243 | - | ||
667 | 244 | - /* remove these to ensure they aren't called during source deletion */ | ||
668 | 245 | - playlist_source_model_disconnect_signals (G_OBJECT (model), | ||
669 | 246 | - RB_IPOD_STATIC_PLAYLIST_SOURCE (rb_playlist)); | ||
670 | 247 | - | ||
671 | 248 | - g_object_unref (model); | ||
672 | 249 | rb_display_page_delete_thyself (RB_DISPLAY_PAGE (rb_playlist)); | ||
673 | 250 | } | ||
674 | 251 | } | ||
675 | 252 | @@ -2057,9 +1872,12 @@ rb_ipod_source_remove_playlist (RBiPodSource *ipod_source, | ||
676 | 253 | { | ||
677 | 254 | RBiPodSourcePrivate *priv = IPOD_SOURCE_GET_PRIVATE (ipod_source); | ||
678 | 255 | RBIpodStaticPlaylistSource *playlist_source = RB_IPOD_STATIC_PLAYLIST_SOURCE (source); | ||
679 | 256 | + Itdb_Playlist *playlist; | ||
680 | 257 | |||
681 | 258 | rb_display_page_delete_thyself (RB_DISPLAY_PAGE (source)); | ||
682 | 259 | - rb_ipod_db_remove_playlist (priv->ipod_db, rb_ipod_static_playlist_source_get_itdb_playlist (playlist_source)); | ||
683 | 260 | + | ||
684 | 261 | + g_object_get (playlist_source, "itdb-playlist", &playlist, NULL); | ||
685 | 262 | + rb_ipod_db_remove_playlist (priv->ipod_db, playlist); | ||
686 | 263 | } | ||
687 | 264 | |||
688 | 265 | |||
689 | 266 | diff --git a/plugins/ipod/rb-ipod-static-playlist-source.c b/plugins/ipod/rb-ipod-static-playlist-source.c | ||
690 | 267 | index 0a95dc8..261c4c4 100644 | ||
691 | 268 | --- a/plugins/ipod/rb-ipod-static-playlist-source.c | ||
692 | 269 | +++ b/plugins/ipod/rb-ipod-static-playlist-source.c | ||
693 | 270 | @@ -45,11 +45,6 @@ static void rb_ipod_static_playlist_source_get_property (GObject *object, | ||
694 | 271 | GParamSpec *pspec); | ||
695 | 272 | |||
696 | 273 | static gboolean impl_show_popup (RBDisplayPage *page); | ||
697 | 274 | -static void impl_delete_thyself (RBDisplayPage *page); | ||
698 | 275 | - | ||
699 | 276 | -static void source_name_changed_cb (RBIpodStaticPlaylistSource *source, | ||
700 | 277 | - GParamSpec *spec, | ||
701 | 278 | - gpointer data); | ||
702 | 279 | |||
703 | 280 | typedef struct | ||
704 | 281 | { | ||
705 | 282 | @@ -67,10 +62,168 @@ enum { | ||
706 | 283 | PROP_0, | ||
707 | 284 | PROP_IPOD_SOURCE, | ||
708 | 285 | PROP_IPOD_DB, | ||
709 | 286 | - PROP_ITDB_PLAYLIST, | ||
710 | 287 | - PROP_WAS_REORDERED | ||
711 | 288 | + PROP_ITDB_PLAYLIST | ||
712 | 289 | }; | ||
713 | 290 | |||
714 | 291 | +static void | ||
715 | 292 | +playlist_track_removed (RhythmDBQueryModel *m, | ||
716 | 293 | + RhythmDBEntry *entry, | ||
717 | 294 | + gpointer data) | ||
718 | 295 | +{ | ||
719 | 296 | + RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (data); | ||
720 | 297 | + Itdb_Track *track; | ||
721 | 298 | + | ||
722 | 299 | + track = rb_ipod_source_lookup_track (priv->ipod_source, entry); | ||
723 | 300 | + g_return_if_fail (track != NULL); | ||
724 | 301 | + rb_ipod_db_remove_from_playlist (priv->ipod_db, priv->itdb_playlist, track); | ||
725 | 302 | +} | ||
726 | 303 | + | ||
727 | 304 | +static void | ||
728 | 305 | +playlist_track_added (GtkTreeModel *model, | ||
729 | 306 | + GtkTreePath *path, | ||
730 | 307 | + GtkTreeIter *iter, | ||
731 | 308 | + gpointer data) | ||
732 | 309 | +{ | ||
733 | 310 | + RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (data); | ||
734 | 311 | + Itdb_Track *track; | ||
735 | 312 | + RhythmDBEntry *entry; | ||
736 | 313 | + | ||
737 | 314 | + gtk_tree_model_get (model, iter, 0, &entry, -1); | ||
738 | 315 | + track = rb_ipod_source_lookup_track (priv->ipod_source, entry); | ||
739 | 316 | + g_return_if_fail (track != NULL); | ||
740 | 317 | + | ||
741 | 318 | + rb_ipod_db_add_to_playlist (priv->ipod_db, priv->itdb_playlist, track); | ||
742 | 319 | +} | ||
743 | 320 | + | ||
744 | 321 | +static void | ||
745 | 322 | +playlist_before_save (RbIpodDb *ipod_db, gpointer data) | ||
746 | 323 | +{ | ||
747 | 324 | + RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (data); | ||
748 | 325 | + RhythmDBQueryModel *model; | ||
749 | 326 | + GtkTreeIter iter; | ||
750 | 327 | + | ||
751 | 328 | + if (priv->was_reordered == FALSE) | ||
752 | 329 | + return; | ||
753 | 330 | + priv->was_reordered = FALSE; | ||
754 | 331 | + | ||
755 | 332 | + /* Sanity check that all tracks are in entry_map */ | ||
756 | 333 | + | ||
757 | 334 | + g_object_get (G_OBJECT (data), "base-query-model", &model, NULL); | ||
758 | 335 | + if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &iter)) { | ||
759 | 336 | + do { | ||
760 | 337 | + RhythmDBEntry *entry; | ||
761 | 338 | + Itdb_Track *track; | ||
762 | 339 | + | ||
763 | 340 | + gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, 0, &entry, -1); | ||
764 | 341 | + track = rb_ipod_source_lookup_track (priv->ipod_source, entry); | ||
765 | 342 | + | ||
766 | 343 | + g_return_if_fail (track != NULL); | ||
767 | 344 | + } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter)); | ||
768 | 345 | + } | ||
769 | 346 | + | ||
770 | 347 | + /* Remove all tracks then re-add in correct order */ | ||
771 | 348 | + | ||
772 | 349 | + while (priv->itdb_playlist->members != NULL) { | ||
773 | 350 | + Itdb_Track *track; | ||
774 | 351 | + | ||
775 | 352 | + track = (Itdb_Track *)priv->itdb_playlist->members->data; | ||
776 | 353 | + | ||
777 | 354 | + rb_debug ("removing \"%s\" from \"%s\"", track->title, priv->itdb_playlist->name); | ||
778 | 355 | + | ||
779 | 356 | + /* Call directly to itdb to avoid scheduling another save */ | ||
780 | 357 | + itdb_playlist_remove_track (priv->itdb_playlist, track); | ||
781 | 358 | + } | ||
782 | 359 | + | ||
783 | 360 | + if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &iter)) { | ||
784 | 361 | + do { | ||
785 | 362 | + RhythmDBEntry *entry; | ||
786 | 363 | + Itdb_Track *track; | ||
787 | 364 | + | ||
788 | 365 | + gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, 0, &entry, -1); | ||
789 | 366 | + track = rb_ipod_source_lookup_track (priv->ipod_source, entry); | ||
790 | 367 | + | ||
791 | 368 | + rb_debug ("adding \"%s\" to \"%s\"", track->title, priv->itdb_playlist->name); | ||
792 | 369 | + | ||
793 | 370 | + /* Call directly to itdb to avoid scheduling another save */ | ||
794 | 371 | + itdb_playlist_add_track (priv->itdb_playlist, track, -1); | ||
795 | 372 | + } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter)); | ||
796 | 373 | + } | ||
797 | 374 | + | ||
798 | 375 | + g_object_unref (model); | ||
799 | 376 | +} | ||
800 | 377 | + | ||
801 | 378 | +static void | ||
802 | 379 | +playlist_rows_reordered (GtkTreeModel *model, | ||
803 | 380 | + GtkTreePath *path, | ||
804 | 381 | + GtkTreeIter *iter, | ||
805 | 382 | + gint *order, | ||
806 | 383 | + gpointer data) | ||
807 | 384 | +{ | ||
808 | 385 | + RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (data); | ||
809 | 386 | + priv->was_reordered = TRUE; | ||
810 | 387 | + | ||
811 | 388 | + rb_ipod_db_save_async (priv->ipod_db); | ||
812 | 389 | +} | ||
813 | 390 | + | ||
814 | 391 | +static void | ||
815 | 392 | +playlist_source_model_disconnect_signals (RBIpodStaticPlaylistSource *source) | ||
816 | 393 | +{ | ||
817 | 394 | + RhythmDBQueryModel *model; | ||
818 | 395 | + | ||
819 | 396 | + g_return_if_fail (RB_IS_IPOD_STATIC_PLAYLIST_SOURCE (source)); | ||
820 | 397 | + | ||
821 | 398 | + g_object_get (source, "base-query-model", &model, NULL); | ||
822 | 399 | + | ||
823 | 400 | + g_signal_handlers_disconnect_by_func (model, | ||
824 | 401 | + G_CALLBACK (playlist_track_added), | ||
825 | 402 | + source); | ||
826 | 403 | + g_signal_handlers_disconnect_by_func (model, | ||
827 | 404 | + G_CALLBACK (playlist_track_removed), | ||
828 | 405 | + source); | ||
829 | 406 | + g_signal_handlers_disconnect_by_func (model, | ||
830 | 407 | + G_CALLBACK (playlist_rows_reordered), | ||
831 | 408 | + source); | ||
832 | 409 | + | ||
833 | 410 | + g_object_unref (model); | ||
834 | 411 | +} | ||
835 | 412 | + | ||
836 | 413 | +static void | ||
837 | 414 | +playlist_source_model_connect_signals (RBIpodStaticPlaylistSource *playlist_source) | ||
838 | 415 | +{ | ||
839 | 416 | + RhythmDBQueryModel *model; | ||
840 | 417 | + | ||
841 | 418 | + g_return_if_fail (RB_IS_IPOD_STATIC_PLAYLIST_SOURCE (playlist_source)); | ||
842 | 419 | + | ||
843 | 420 | + g_object_get (playlist_source, "base-query-model", &model, NULL); | ||
844 | 421 | + g_signal_connect (model, "row-inserted", | ||
845 | 422 | + G_CALLBACK (playlist_track_added), | ||
846 | 423 | + playlist_source); | ||
847 | 424 | + g_signal_connect (model, "entry-removed", | ||
848 | 425 | + G_CALLBACK (playlist_track_removed), | ||
849 | 426 | + playlist_source); | ||
850 | 427 | + g_signal_connect (model, "rows-reordered", | ||
851 | 428 | + G_CALLBACK (playlist_rows_reordered), | ||
852 | 429 | + playlist_source); | ||
853 | 430 | + g_object_unref (model); | ||
854 | 431 | +} | ||
855 | 432 | + | ||
856 | 433 | +static void | ||
857 | 434 | +source_name_changed_cb (RBIpodStaticPlaylistSource *source, | ||
858 | 435 | + GParamSpec *spec, | ||
859 | 436 | + gpointer data) | ||
860 | 437 | +{ | ||
861 | 438 | + RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (source); | ||
862 | 439 | + char *name; | ||
863 | 440 | + | ||
864 | 441 | + g_object_get (source, "name", &name, NULL); | ||
865 | 442 | + | ||
866 | 443 | + if ((priv->itdb_playlist != NULL) && (strcmp (name, priv->itdb_playlist->name) != 0)) { | ||
867 | 444 | + rb_debug ("changing playlist name to %s", name); | ||
868 | 445 | + rb_ipod_db_rename_playlist (priv->ipod_db, priv->itdb_playlist, name); | ||
869 | 446 | + } | ||
870 | 447 | + g_free (name); | ||
871 | 448 | +} | ||
872 | 449 | + | ||
873 | 450 | |||
874 | 451 | static void | ||
875 | 452 | rb_ipod_static_playlist_source_class_init (RBIpodStaticPlaylistSourceClass *klass) | ||
876 | 453 | @@ -85,7 +238,6 @@ rb_ipod_static_playlist_source_class_init (RBIpodStaticPlaylistSourceClass *klas | ||
877 | 454 | object_class->set_property = rb_ipod_static_playlist_source_set_property; | ||
878 | 455 | |||
879 | 456 | page_class->show_popup = impl_show_popup; | ||
880 | 457 | - page_class->delete_thyself = impl_delete_thyself; | ||
881 | 458 | |||
882 | 459 | source_class->impl_can_move_to_trash = (RBSourceFeatureFunc) rb_false_function; | ||
883 | 460 | source_class->impl_can_delete = (RBSourceFeatureFunc) rb_true_function; | ||
884 | 461 | @@ -115,13 +267,6 @@ rb_ipod_static_playlist_source_class_init (RBIpodStaticPlaylistSourceClass *klas | ||
885 | 462 | "itdb-playlist", | ||
886 | 463 | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); | ||
887 | 464 | |||
888 | 465 | - g_object_class_install_property (object_class, | ||
889 | 466 | - PROP_WAS_REORDERED, | ||
890 | 467 | - g_param_spec_pointer ("was-reordered", | ||
891 | 468 | - "was-reordered", | ||
892 | 469 | - "was-reordered", | ||
893 | 470 | - G_PARAM_READWRITE)); | ||
894 | 471 | - | ||
895 | 472 | g_type_class_add_private (klass, sizeof (RBIpodStaticPlaylistSourcePrivate)); | ||
896 | 473 | } | ||
897 | 474 | |||
898 | 475 | @@ -139,20 +284,27 @@ rb_ipod_static_playlist_source_init (RBIpodStaticPlaylistSource *source) | ||
899 | 476 | static void | ||
900 | 477 | rb_ipod_static_playlist_source_constructed (GObject *object) | ||
901 | 478 | { | ||
902 | 479 | + RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (object); | ||
903 | 480 | + RhythmDBQueryModel *model; | ||
904 | 481 | + | ||
905 | 482 | RB_CHAIN_GOBJECT_METHOD (rb_ipod_static_playlist_source_parent_class, constructed, object); | ||
906 | 483 | + | ||
907 | 484 | g_signal_connect (object, "notify::name", (GCallback)source_name_changed_cb, NULL); | ||
908 | 485 | -} | ||
909 | 486 | |||
910 | 487 | -static void | ||
911 | 488 | -rb_ipod_static_playlist_source_dispose (GObject *object) | ||
912 | 489 | -{ | ||
913 | 490 | - G_OBJECT_CLASS (rb_ipod_static_playlist_source_parent_class)->dispose (object); | ||
914 | 491 | + g_object_get (object, "base-query-model", &model, NULL); | ||
915 | 492 | + g_signal_connect (priv->ipod_db, "before-save", | ||
916 | 493 | + G_CALLBACK (playlist_before_save), | ||
917 | 494 | + object); | ||
918 | 495 | + g_object_unref (model); | ||
919 | 496 | + playlist_source_model_connect_signals (RB_IPOD_STATIC_PLAYLIST_SOURCE (object)); | ||
920 | 497 | + | ||
921 | 498 | } | ||
922 | 499 | |||
923 | 500 | static void | ||
924 | 501 | -impl_delete_thyself (RBDisplayPage *page) | ||
925 | 502 | +rb_ipod_static_playlist_source_dispose (GObject *object) | ||
926 | 503 | { | ||
927 | 504 | - RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (page); | ||
928 | 505 | + RBIpodStaticPlaylistSource *source = RB_IPOD_STATIC_PLAYLIST_SOURCE (object); | ||
929 | 506 | + RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (object); | ||
930 | 507 | |||
931 | 508 | if (priv->ipod_source) { | ||
932 | 509 | g_object_unref (priv->ipod_source); | ||
933 | 510 | @@ -162,8 +314,10 @@ impl_delete_thyself (RBDisplayPage *page) | ||
934 | 511 | g_object_unref (priv->ipod_db); | ||
935 | 512 | priv->ipod_db = NULL; | ||
936 | 513 | } | ||
937 | 514 | - | ||
938 | 515 | - RB_DISPLAY_PAGE_CLASS (rb_ipod_static_playlist_source_parent_class)->delete_thyself (page); | ||
939 | 516 | + | ||
940 | 517 | + playlist_source_model_disconnect_signals (source); | ||
941 | 518 | + | ||
942 | 519 | + G_OBJECT_CLASS (rb_ipod_static_playlist_source_parent_class)->dispose (object); | ||
943 | 520 | } | ||
944 | 521 | |||
945 | 522 | RBIpodStaticPlaylistSource * | ||
946 | 523 | @@ -209,9 +363,6 @@ rb_ipod_static_playlist_source_set_property (GObject *object, | ||
947 | 524 | case PROP_ITDB_PLAYLIST: | ||
948 | 525 | priv->itdb_playlist = g_value_get_pointer (value); | ||
949 | 526 | break; | ||
950 | 527 | - case PROP_WAS_REORDERED: | ||
951 | 528 | - priv->was_reordered = g_value_get_boolean (value); | ||
952 | 529 | - break; | ||
953 | 530 | default: | ||
954 | 531 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); | ||
955 | 532 | break; | ||
956 | 533 | @@ -236,56 +387,12 @@ rb_ipod_static_playlist_source_get_property (GObject *object, | ||
957 | 534 | case PROP_ITDB_PLAYLIST: | ||
958 | 535 | g_value_set_pointer (value, priv->itdb_playlist); | ||
959 | 536 | break; | ||
960 | 537 | - case PROP_WAS_REORDERED: | ||
961 | 538 | - g_value_set_boolean (value, priv->was_reordered); | ||
962 | 539 | - break; | ||
963 | 540 | default: | ||
964 | 541 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); | ||
965 | 542 | break; | ||
966 | 543 | } | ||
967 | 544 | } | ||
968 | 545 | |||
969 | 546 | - | ||
970 | 547 | -Itdb_Playlist* | ||
971 | 548 | -rb_ipod_static_playlist_source_get_itdb_playlist (RBIpodStaticPlaylistSource *playlist) | ||
972 | 549 | -{ | ||
973 | 550 | - RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (playlist); | ||
974 | 551 | - | ||
975 | 552 | - return priv->itdb_playlist; | ||
976 | 553 | -} | ||
977 | 554 | - | ||
978 | 555 | -RBiPodSource* | ||
979 | 556 | -rb_ipod_static_playlist_source_get_ipod_source (RBIpodStaticPlaylistSource *playlist) | ||
980 | 557 | -{ | ||
981 | 558 | - RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (playlist); | ||
982 | 559 | - | ||
983 | 560 | - return priv->ipod_source; | ||
984 | 561 | -} | ||
985 | 562 | - | ||
986 | 563 | -RbIpodDb* | ||
987 | 564 | -rb_ipod_static_playlist_source_get_ipod_db (RBIpodStaticPlaylistSource *playlist) | ||
988 | 565 | -{ | ||
989 | 566 | - RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (playlist); | ||
990 | 567 | - | ||
991 | 568 | - return priv->ipod_db; | ||
992 | 569 | -} | ||
993 | 570 | - | ||
994 | 571 | -gboolean | ||
995 | 572 | -rb_ipod_static_playlist_source_get_was_reordered (RBIpodStaticPlaylistSource *playlist) | ||
996 | 573 | -{ | ||
997 | 574 | - RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (playlist); | ||
998 | 575 | - | ||
999 | 576 | - return priv->was_reordered; | ||
1000 | 577 | -} | ||
1001 | 578 | - | ||
1002 | 579 | -void | ||
1003 | 580 | -rb_ipod_static_playlist_source_set_was_reordered (RBIpodStaticPlaylistSource *playlist, gboolean was_reordered) | ||
1004 | 581 | -{ | ||
1005 | 582 | - RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (playlist); | ||
1006 | 583 | - | ||
1007 | 584 | - priv->was_reordered = was_reordered; | ||
1008 | 585 | -} | ||
1009 | 586 | - | ||
1010 | 587 | static gboolean | ||
1011 | 588 | impl_show_popup (RBDisplayPage *page) | ||
1012 | 589 | { | ||
1013 | 590 | @@ -293,23 +400,6 @@ impl_show_popup (RBDisplayPage *page) | ||
1014 | 591 | return TRUE; | ||
1015 | 592 | } | ||
1016 | 593 | |||
1017 | 594 | -static void | ||
1018 | 595 | -source_name_changed_cb (RBIpodStaticPlaylistSource *source, | ||
1019 | 596 | - GParamSpec *spec, | ||
1020 | 597 | - gpointer data) | ||
1021 | 598 | -{ | ||
1022 | 599 | - RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (source); | ||
1023 | 600 | - char *name; | ||
1024 | 601 | - | ||
1025 | 602 | - g_object_get (source, "name", &name, NULL); | ||
1026 | 603 | - | ||
1027 | 604 | - if ((priv->itdb_playlist != NULL) && (strcmp (name, priv->itdb_playlist->name) != 0)) { | ||
1028 | 605 | - rb_debug ("changing playlist name to %s", name); | ||
1029 | 606 | - rb_ipod_db_rename_playlist (priv->ipod_db, priv->itdb_playlist, name); | ||
1030 | 607 | - } | ||
1031 | 608 | - g_free (name); | ||
1032 | 609 | -} | ||
1033 | 610 | - | ||
1034 | 611 | void | ||
1035 | 612 | _rb_ipod_static_playlist_source_register_type (GTypeModule *module) | ||
1036 | 613 | { | ||
1037 | 614 | diff --git a/plugins/ipod/rb-ipod-static-playlist-source.h b/plugins/ipod/rb-ipod-static-playlist-source.h | ||
1038 | 615 | index 49c833f..383b447 100644 | ||
1039 | 616 | --- a/plugins/ipod/rb-ipod-static-playlist-source.h | ||
1040 | 617 | +++ b/plugins/ipod/rb-ipod-static-playlist-source.h | ||
1041 | 618 | @@ -54,12 +54,6 @@ RBIpodStaticPlaylistSource * rb_ipod_static_playlist_source_new (RBShell *shell, | ||
1042 | 619 | Itdb_Playlist *playlist, | ||
1043 | 620 | RhythmDBEntryType *entry_type); | ||
1044 | 621 | |||
1045 | 622 | -Itdb_Playlist* rb_ipod_static_playlist_source_get_itdb_playlist (RBIpodStaticPlaylistSource *playlist); | ||
1046 | 623 | -RBiPodSource* rb_ipod_static_playlist_source_get_ipod_source (RBIpodStaticPlaylistSource *playlist); | ||
1047 | 624 | -RbIpodDb* rb_ipod_static_playlist_source_get_ipod_db (RBIpodStaticPlaylistSource *playlist); | ||
1048 | 625 | -gboolean rb_ipod_static_playlist_source_get_was_reordered (RBIpodStaticPlaylistSource *playlist); | ||
1049 | 626 | -void rb_ipod_static_playlist_source_set_was_reordered (RBIpodStaticPlaylistSource *playlist, gboolean was_reordered); | ||
1050 | 627 | - | ||
1051 | 628 | G_END_DECLS | ||
1052 | 629 | |||
1053 | 630 | #endif /* __RB_IPOD_STATIC_PLAYLIST_SOURCE_H */ | ||
1054 | 631 | -- | ||
1055 | 632 | cgit v0.9.0.2 | ||
1056 | 633 | 0 | ||
1057 | === removed file 'debian/patches/git_local_art_search_typo.patch' | |||
1058 | --- debian/patches/git_local_art_search_typo.patch 2012-03-16 11:11:59 +0000 | |||
1059 | +++ debian/patches/git_local_art_search_typo.patch 1970-01-01 00:00:00 +0000 | |||
1060 | @@ -1,23 +0,0 @@ | |||
1061 | 1 | From b1887b43d6543021dd8e6266e6acdbcfb030feda Mon Sep 17 00:00:00 2001 | ||
1062 | 2 | From: Jonathan Matthew <jonathan@d14n.org> | ||
1063 | 3 | Date: Mon, 12 Mar 2012 22:42:42 +0000 | ||
1064 | 4 | Subject: artsearch: fix typo in local search (bug #671950) | ||
1065 | 5 | |||
1066 | 6 | spotted by Patrice Duroux <duroux.patrice@orange.fr> | ||
1067 | 7 | --- | ||
1068 | 8 | diff --git a/plugins/artsearch/local.py b/plugins/artsearch/local.py | ||
1069 | 9 | index a914b1d..819fbaa 100644 | ||
1070 | 10 | --- a/plugins/artsearch/local.py | ||
1071 | 11 | +++ b/plugins/artsearch/local.py | ||
1072 | 12 | @@ -73,7 +73,7 @@ class LocalSearch: | ||
1073 | 13 | nkey.add_field("artist", artist) | ||
1074 | 14 | uri = parent.resolve_relative_path(f_name).get_uri() | ||
1075 | 15 | print "found album+artist match " + uri | ||
1076 | 16 | - self.store.store_uri(nkey. RB.ExtDBSourceType.USER, uri) | ||
1077 | 17 | + self.store.store_uri(nkey, RB.ExtDBSourceType.USER, uri) | ||
1078 | 18 | |||
1079 | 19 | # if that didn't work, look for the longest shared prefix | ||
1080 | 20 | # only accept matches longer than 2 to avoid weird false positives | ||
1081 | 21 | -- | ||
1082 | 22 | cgit v0.9.0.2 | ||
1083 | 23 | |||
1084 | 24 | 0 | ||
1085 | === removed file 'debian/patches/git_magnatune_dialog_segfault.patch' | |||
1086 | --- debian/patches/git_magnatune_dialog_segfault.patch 2012-03-16 11:11:59 +0000 | |||
1087 | +++ debian/patches/git_magnatune_dialog_segfault.patch 1970-01-01 00:00:00 +0000 | |||
1088 | @@ -1,24 +0,0 @@ | |||
1089 | 1 | From 7b344c68e25ec6ac61b4eef15659316d7859ed91 Mon Sep 17 00:00:00 2001 | ||
1090 | 2 | From: Ole Laursen <olau@hardworking.dk> | ||
1091 | 3 | Date: Wed, 14 Mar 2012 21:35:48 +0000 | ||
1092 | 4 | Subject: magnatune: fix crash opening preferences dialog (bug #672084) | ||
1093 | 5 | |||
1094 | 6 | --- | ||
1095 | 7 | diff --git a/plugins/magnatune/magnatune.py b/plugins/magnatune/magnatune.py | ||
1096 | 8 | index ce2aeb3..e88f0e2 100644 | ||
1097 | 9 | --- a/plugins/magnatune/magnatune.py | ||
1098 | 10 | +++ b/plugins/magnatune/magnatune.py | ||
1099 | 11 | @@ -214,8 +214,8 @@ class MagnatuneConfig(GObject.GObject, PeasGtk.Configurable): | ||
1100 | 12 | builder.get_object("stream_account_radio").set_active(account_type == "stream") | ||
1101 | 13 | builder.get_object("download_account_radio").set_active(account_type == "download") | ||
1102 | 14 | |||
1103 | 15 | - builder.get_object("username_entry").set_text(username) | ||
1104 | 16 | - builder.get_object("password_entry").set_text(password) | ||
1105 | 17 | + builder.get_object("username_entry").set_text(username or "") | ||
1106 | 18 | + builder.get_object("password_entry").set_text(password or "") | ||
1107 | 19 | |||
1108 | 20 | update_sensitivity(account_type) | ||
1109 | 21 | |||
1110 | 22 | -- | ||
1111 | 23 | cgit v0.9.0.2 | ||
1112 | 24 | |||
1113 | 25 | 0 | ||
1114 | === removed file 'debian/patches/git_mpris_playlists.patch' | |||
1115 | --- debian/patches/git_mpris_playlists.patch 2012-04-05 19:23:42 +0000 | |||
1116 | +++ debian/patches/git_mpris_playlists.patch 1970-01-01 00:00:00 +0000 | |||
1117 | @@ -1,118 +0,0 @@ | |||
1118 | 1 | Index: rhythmbox-2.96/sources/rb-display-page-model.c | ||
1119 | 2 | =================================================================== | ||
1120 | 3 | --- rhythmbox-2.96.orig/sources/rb-display-page-model.c 2012-03-10 11:22:26.000000000 +0100 | ||
1121 | 4 | +++ rhythmbox-2.96/sources/rb-display-page-model.c 2012-04-05 21:22:35.725425083 +0200 | ||
1122 | 5 | @@ -70,6 +70,7 @@ | ||
1123 | 6 | enum | ||
1124 | 7 | { | ||
1125 | 8 | DROP_RECEIVED, | ||
1126 | 9 | + PAGE_INSERTED, | ||
1127 | 10 | LAST_SIGNAL | ||
1128 | 11 | }; | ||
1129 | 12 | |||
1130 | 13 | @@ -670,6 +671,7 @@ | ||
1131 | 14 | RB_DISPLAY_PAGE_MODEL_COLUMN_PLAYING, FALSE, | ||
1132 | 15 | RB_DISPLAY_PAGE_MODEL_COLUMN_PAGE, page, | ||
1133 | 16 | -1); | ||
1134 | 17 | + g_signal_emit (G_OBJECT (page_model), rb_display_page_model_signals[PAGE_INSERTED], 0, page, &iter); | ||
1135 | 18 | |||
1136 | 19 | g_signal_connect_object (page, "notify::name", G_CALLBACK (page_notify_cb), page_model, 0); | ||
1137 | 20 | g_signal_connect_object (page, "notify::visibility", G_CALLBACK (page_notify_cb), page_model, 0); | ||
1138 | 21 | @@ -872,6 +874,27 @@ | ||
1139 | 22 | 3, | ||
1140 | 23 | RB_TYPE_DISPLAY_PAGE, G_TYPE_INT, G_TYPE_POINTER); | ||
1141 | 24 | |||
1142 | 25 | + /** | ||
1143 | 26 | + * RBDisplayPageModel::page-inserted: | ||
1144 | 27 | + * @model: the #RBDisplayPageModel | ||
1145 | 28 | + * @page: the #RBDisplayPage that was inserted | ||
1146 | 29 | + * @iter: a #GtkTreeIter indicating the page position | ||
1147 | 30 | + * | ||
1148 | 31 | + * Emitted when a new page is inserted into the model. | ||
1149 | 32 | + * Use this instead of GtkTreeModel::row-inserted as this | ||
1150 | 33 | + * doesn't get complicated by visibility filtering. | ||
1151 | 34 | + */ | ||
1152 | 35 | + rb_display_page_model_signals[PAGE_INSERTED] = | ||
1153 | 36 | + g_signal_new ("page-inserted", | ||
1154 | 37 | + G_OBJECT_CLASS_TYPE (object_class), | ||
1155 | 38 | + G_SIGNAL_RUN_LAST, | ||
1156 | 39 | + G_STRUCT_OFFSET (RBDisplayPageModelClass, page_inserted), | ||
1157 | 40 | + NULL, NULL, | ||
1158 | 41 | + NULL, | ||
1159 | 42 | + G_TYPE_NONE, | ||
1160 | 43 | + 2, | ||
1161 | 44 | + RB_TYPE_DISPLAY_PAGE, GTK_TYPE_TREE_ITER); | ||
1162 | 45 | + | ||
1163 | 46 | if (!drag_target_list) { | ||
1164 | 47 | drag_target_list = gtk_target_list_new (dnd_targets, G_N_ELEMENTS (dnd_targets)); | ||
1165 | 48 | } | ||
1166 | 49 | Index: rhythmbox-2.96/sources/rb-display-page-model.h | ||
1167 | 50 | =================================================================== | ||
1168 | 51 | --- rhythmbox-2.96.orig/sources/rb-display-page-model.h 2012-02-27 11:08:45.000000000 +0100 | ||
1169 | 52 | +++ rhythmbox-2.96/sources/rb-display-page-model.h 2012-04-05 21:22:35.725425083 +0200 | ||
1170 | 53 | @@ -67,6 +67,9 @@ | ||
1171 | 54 | RBDisplayPage *target, | ||
1172 | 55 | GtkTreeViewDropPosition pos, | ||
1173 | 56 | GtkSelectionData *data); | ||
1174 | 57 | + void (*page_inserted) (RBDisplayPageModel *model, | ||
1175 | 58 | + RBDisplayPage *page, | ||
1176 | 59 | + GtkTreeIter *iter); | ||
1177 | 60 | }; | ||
1178 | 61 | |||
1179 | 62 | GType rb_display_page_model_get_type (void); | ||
1180 | 63 | Index: rhythmbox-2.96/plugins/mpris/rb-mpris-plugin.c | ||
1181 | 64 | =================================================================== | ||
1182 | 65 | --- rhythmbox-2.96.orig/plugins/mpris/rb-mpris-plugin.c 2012-03-10 11:22:26.000000000 +0100 | ||
1183 | 66 | +++ rhythmbox-2.96/plugins/mpris/rb-mpris-plugin.c 2012-04-05 21:22:35.729425083 +0200 | ||
1184 | 67 | @@ -1346,14 +1346,9 @@ | ||
1185 | 68 | add_playlist_property_change (plugin, "PlaylistCount", g_variant_new_uint32 (plugin->playlist_count)); | ||
1186 | 69 | } | ||
1187 | 70 | |||
1188 | 71 | -static gboolean | ||
1189 | 72 | -display_page_inserted_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, RBMprisPlugin *plugin) | ||
1190 | 73 | +static void | ||
1191 | 74 | +display_page_inserted_cb (RBDisplayPageModel *model, RBDisplayPage *page, GtkTreeIter *iter, RBMprisPlugin *plugin) | ||
1192 | 75 | { | ||
1193 | 76 | - RBDisplayPage *page; | ||
1194 | 77 | - | ||
1195 | 78 | - gtk_tree_model_get (model, iter, | ||
1196 | 79 | - RB_DISPLAY_PAGE_MODEL_COLUMN_PAGE, &page, | ||
1197 | 80 | - -1); | ||
1198 | 81 | if (RB_IS_PLAYLIST_SOURCE (page)) { | ||
1199 | 82 | gboolean is_local; | ||
1200 | 83 | |||
1201 | 84 | @@ -1371,11 +1366,19 @@ | ||
1202 | 85 | g_signal_connect_object (page, "deleted", G_CALLBACK (source_deleted_cb), plugin, 0); | ||
1203 | 86 | } | ||
1204 | 87 | } | ||
1205 | 88 | +} | ||
1206 | 89 | + | ||
1207 | 90 | +static gboolean | ||
1208 | 91 | +display_page_foreach_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, RBMprisPlugin *plugin) | ||
1209 | 92 | +{ | ||
1210 | 93 | + RBDisplayPage *page; | ||
1211 | 94 | + | ||
1212 | 95 | + gtk_tree_model_get (model, iter, RB_DISPLAY_PAGE_MODEL_COLUMN_PAGE, &page, -1); | ||
1213 | 96 | + display_page_inserted_cb (RB_DISPLAY_PAGE_MODEL (model), page, iter, plugin); | ||
1214 | 97 | |||
1215 | 98 | return FALSE; | ||
1216 | 99 | } | ||
1217 | 100 | |||
1218 | 101 | - | ||
1219 | 102 | static void | ||
1220 | 103 | name_acquired_cb (GDBusConnection *connection, const char *name, RBMprisPlugin *plugin) | ||
1221 | 104 | { | ||
1222 | 105 | @@ -1499,11 +1502,11 @@ | ||
1223 | 106 | G_CALLBACK (elapsed_nano_changed_cb), | ||
1224 | 107 | plugin, 0); | ||
1225 | 108 | g_signal_connect_object (plugin->page_model, | ||
1226 | 109 | - "row-inserted", | ||
1227 | 110 | + "page-inserted", | ||
1228 | 111 | G_CALLBACK (display_page_inserted_cb), | ||
1229 | 112 | plugin, 0); | ||
1230 | 113 | gtk_tree_model_foreach (GTK_TREE_MODEL (plugin->page_model), | ||
1231 | 114 | - (GtkTreeModelForeachFunc) display_page_inserted_cb, | ||
1232 | 115 | + (GtkTreeModelForeachFunc) display_page_foreach_cb, | ||
1233 | 116 | plugin); | ||
1234 | 117 | |||
1235 | 118 | plugin->art_store = rb_ext_db_new ("album-art"); | ||
1236 | 119 | 0 | ||
1237 | === removed file 'debian/patches/git_playlists_sync_segfault.patch' | |||
1238 | --- debian/patches/git_playlists_sync_segfault.patch 2012-03-16 11:11:59 +0000 | |||
1239 | +++ debian/patches/git_playlists_sync_segfault.patch 1970-01-01 00:00:00 +0000 | |||
1240 | @@ -1,25 +0,0 @@ | |||
1241 | 1 | From d6127eba18bf088f3a43a3a693cad8691b061d39 Mon Sep 17 00:00:00 2001 | ||
1242 | 2 | From: Cole Robinson <crobinso@redhat.com> | ||
1243 | 3 | Date: Mon, 12 Mar 2012 23:10:31 +0000 | ||
1244 | 4 | Subject: ipod: Fix segfault when syncing playlists (bz 661217) | ||
1245 | 5 | |||
1246 | 6 | Signed-off-by: Cole Robinson <crobinso@redhat.com> | ||
1247 | 7 | --- | ||
1248 | 8 | diff --git a/plugins/ipod/rb-ipod-static-playlist-source.c b/plugins/ipod/rb-ipod-static-playlist-source.c | ||
1249 | 9 | index 261c4c4..d389baa 100644 | ||
1250 | 10 | --- a/plugins/ipod/rb-ipod-static-playlist-source.c | ||
1251 | 11 | +++ b/plugins/ipod/rb-ipod-static-playlist-source.c | ||
1252 | 12 | @@ -311,6 +311,10 @@ rb_ipod_static_playlist_source_dispose (GObject *object) | ||
1253 | 13 | priv->ipod_source = NULL; | ||
1254 | 14 | } | ||
1255 | 15 | if (priv->ipod_db) { | ||
1256 | 16 | + g_signal_handlers_disconnect_by_func (priv->ipod_db, | ||
1257 | 17 | + G_CALLBACK (playlist_before_save), | ||
1258 | 18 | + source); | ||
1259 | 19 | + | ||
1260 | 20 | g_object_unref (priv->ipod_db); | ||
1261 | 21 | priv->ipod_db = NULL; | ||
1262 | 22 | } | ||
1263 | 23 | -- | ||
1264 | 24 | cgit v0.9.0.2 | ||
1265 | 25 | |||
1266 | 26 | 0 | ||
1267 | === modified file 'debian/patches/series' | |||
1268 | --- debian/patches/series 2012-05-14 04:30:50 +0000 | |||
1269 | +++ debian/patches/series 2012-06-04 10:19:20 +0000 | |||
1270 | @@ -3,9 +3,3 @@ | |||
1271 | 3 | 04_pause_button.patch | 3 | 04_pause_button.patch |
1272 | 4 | 05_hide_on_quit.patch | 4 | 05_hide_on_quit.patch |
1273 | 5 | 07_quicklists.patch | 5 | 07_quicklists.patch |
1274 | 6 | git_local_art_search_typo.patch | ||
1275 | 7 | git_magnatune_dialog_segfault.patch | ||
1276 | 8 | git_ipod_no_private_source.patch | ||
1277 | 9 | git_ipod_playlist_handler.patch | ||
1278 | 10 | git_playlists_sync_segfault.patch | ||
1279 | 11 | git_mpris_playlists.patch | ||
1280 | 12 | 6 | ||
1281 | === modified file 'debian/rhythmbox-plugins.install' | |||
1282 | --- debian/rhythmbox-plugins.install 2012-03-14 09:14:08 +0000 | |||
1283 | +++ debian/rhythmbox-plugins.install 2012-06-04 10:19:20 +0000 | |||
1284 | @@ -1,5 +1,3 @@ | |||
1285 | 1 | usr/lib/rhythmbox/plugins/artdisplay | ||
1286 | 2 | usr/share/rhythmbox/plugins/artdisplay | ||
1287 | 3 | usr/lib/rhythmbox/plugins/artsearch | 1 | usr/lib/rhythmbox/plugins/artsearch |
1288 | 4 | usr/lib/rhythmbox/plugins/audioscrobbler | 2 | usr/lib/rhythmbox/plugins/audioscrobbler |
1289 | 5 | usr/share/rhythmbox/plugins/audioscrobbler | 3 | usr/share/rhythmbox/plugins/audioscrobbler |
1290 | 6 | 4 | ||
1291 | === modified file 'debian/rhythmbox.gsettings-override' | |||
1292 | --- debian/rhythmbox.gsettings-override 2011-12-16 12:45:30 +0000 | |||
1293 | +++ debian/rhythmbox.gsettings-override 2012-06-04 10:19:20 +0000 | |||
1294 | @@ -2,4 +2,4 @@ | |||
1295 | 2 | monitor-library=true | 2 | monitor-library=true |
1296 | 3 | 3 | ||
1297 | 4 | [org.gnome.rhythmbox.plugins] | 4 | [org.gnome.rhythmbox.plugins] |
1299 | 5 | active-plugins=['artdisplay','audiocd','audioscrobbler','cd-recorder','daap','dbus-media-server','generic-player','ipod','iradio','mmkeys','mpris','mtpdevice','notification','power-manager'] | 5 | active-plugins=['audiocd','audioscrobbler','cd-recorder','daap','dbus-media-server','generic-player','ipod','iradio','mmkeys','mpris','mtpdevice','notification','power-manager'] |