Merge lp:~laney/rhythmbox/rb-2.97-update into lp:~ubuntu-desktop/rhythmbox/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
Reviewer Review Type Date Requested Status
Ubuntu Desktop Pending
Review via email: mp+108536@code.launchpad.net

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
=== modified file 'debian/changelog'
--- debian/changelog 2012-05-17 23:12:21 +0000
+++ debian/changelog 2012-06-04 10:19:20 +0000
@@ -1,3 +1,24 @@
1rhythmbox (2.97-0ubuntu1) UNRELEASED; urgency=low
2
3 * New upstream release 2.97 (LP: #1008406)
4 - New more compact header layout, including album art
5 - Deprecated artdisplay plugin
6 - Fixed buffering for network streams
7 - Configurable encoding settings for the library, using GStreamer presets or
8 simple quality settings
9 - Doesn't preserve mtime on metadata updates
10 - Fixed audio CD extraction speed
11 - New podcast subscription interface, including iTunes and Miroguide
12 searching and auditioning before subscription
13 * Drop all git backported packages; in this release.
14 * Drop debian/patches/06_manual_connect_daap_host.patch: upstream and not
15 in series.
16 * Refresh other patches.
17 * Add BD on libxml2-dev, as required by configure.
18 * Adjust packaging for removal of artdisplay.
19
20 -- Iain Lane <iain.lane@canonical.com> Mon, 04 Jun 2012 10:02:09 +0100
21
1rhythmbox (2.96-0ubuntu6) quantal; urgency=low22rhythmbox (2.96-0ubuntu6) quantal; urgency=low
223
3 * debian/rhythmbox.install:24 * debian/rhythmbox.install:
425
=== modified file 'debian/control'
--- debian/control 2012-05-14 04:30:50 +0000
+++ debian/control 2012-06-04 10:19:20 +0000
@@ -47,6 +47,7 @@
47 libgnome-keyring-dev,47 libgnome-keyring-dev,
48 libpeas-dev (>= 0.7.3),48 libpeas-dev (>= 0.7.3),
49 zlib1g-dev,49 zlib1g-dev,
50 libxml2-dev (>= 2.7.8),
50 libxt-dev,51 libxt-dev,
51 x11proto-core-dev,52 x11proto-core-dev,
52 libgconf2-dev,53 libgconf2-dev,
5354
=== modified file 'debian/control.in'
--- debian/control.in 2012-05-14 04:30:50 +0000
+++ debian/control.in 2012-06-04 10:19:20 +0000
@@ -42,6 +42,7 @@
42 libgnome-keyring-dev,42 libgnome-keyring-dev,
43 libpeas-dev (>= 0.7.3),43 libpeas-dev (>= 0.7.3),
44 zlib1g-dev,44 zlib1g-dev,
45 libxml2-dev (>= 2.7.8),
45 libxt-dev,46 libxt-dev,
46 x11proto-core-dev,47 x11proto-core-dev,
47 libgconf2-dev,48 libgconf2-dev,
4849
=== modified file 'debian/patches/02_use_escaped_podcast_uri.patch'
--- debian/patches/02_use_escaped_podcast_uri.patch 2012-03-14 09:14:08 +0000
+++ debian/patches/02_use_escaped_podcast_uri.patch 2012-06-04 10:19:20 +0000
@@ -1,6 +1,8 @@
1=== modified file 'podcast/rb-podcast-manager.c'1=== modified file 'podcast/rb-podcast-manager.c'
2--- old/podcast/rb-podcast-manager.c 2012-03-08 20:38:49 +00002Index: rhythmbox-2.97/podcast/rb-podcast-manager.c
3+++ new/podcast/rb-podcast-manager.c 2012-03-08 21:02:02 +00003===================================================================
4--- rhythmbox-2.97.orig/podcast/rb-podcast-manager.c 2012-06-04 10:24:44.591435382 +0100
5+++ rhythmbox-2.97/podcast/rb-podcast-manager.c 2012-06-04 10:24:55.207434915 +0100
4@@ -29,6 +29,7 @@6@@ -29,6 +29,7 @@
5 #include "config.h"7 #include "config.h"
6 8
@@ -9,7 +11,7 @@
9 #define __USE_XOPEN11 #define __USE_XOPEN
10 #include <time.h>12 #include <time.h>
11 13
12@@ -865,9 +866,15 @@ download_podcast (GFileInfo *src_info, R14@@ -859,9 +860,15 @@
13 }15 }
14 16
15 if (local_file_name == NULL) {17 if (local_file_name == NULL) {
@@ -28,4 +30,3 @@
28 }30 }
29 31
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,
31
3233
=== modified file 'debian/patches/03_magnatune_partner.patch'
--- debian/patches/03_magnatune_partner.patch 2012-03-14 09:14:08 +0000
+++ debian/patches/03_magnatune_partner.patch 2012-06-04 10:19:20 +0000
@@ -1,7 +1,9 @@
1=== modified file 'plugins/magnatune/MagnatuneSource.py'1=== modified file 'plugins/magnatune/MagnatuneSource.py'
2--- old/plugins/magnatune/MagnatuneSource.py 2012-03-08 20:38:49 +00002Index: rhythmbox-2.97/plugins/magnatune/MagnatuneSource.py
3+++ new/plugins/magnatune/MagnatuneSource.py 2012-03-08 21:03:17 +00003===================================================================
4@@ -44,7 +44,7 @@ import MagnatuneAccount4--- rhythmbox-2.97.orig/plugins/magnatune/MagnatuneSource.py 2012-06-04 10:24:44.559435384 +0100
5+++ rhythmbox-2.97/plugins/magnatune/MagnatuneSource.py 2012-06-04 10:24:55.411434906 +0100
6@@ -44,7 +44,7 @@
5 import gettext7 import gettext
6 gettext.install('rhythmbox', RB.locale_dir())8 gettext.install('rhythmbox', RB.locale_dir())
7 9
@@ -10,4 +12,3 @@
10 12
11 # URIs13 # URIs
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"
13
1415
=== modified file 'debian/patches/04_pause_button.patch'
--- debian/patches/04_pause_button.patch 2011-08-03 15:25:12 +0000
+++ debian/patches/04_pause_button.patch 2012-06-04 10:19:20 +0000
@@ -5,11 +5,11 @@
5Author: Bilal Akhtar <bilalakhtar@ubuntu.com>5Author: Bilal Akhtar <bilalakhtar@ubuntu.com>
6Bug-Ubuntu: https://bugs.edge.launchpad.net/hundredpapercuts/+bug/712286Bug-Ubuntu: https://bugs.edge.launchpad.net/hundredpapercuts/+bug/71228
7Forwarded: https://bugzilla.gnome.org/show_bug.cgi?id=3260667Forwarded: https://bugzilla.gnome.org/show_bug.cgi?id=326066
8Index: rhythmbox-2.90.1~20110802/shell/rb-shell-player.c8Index: rhythmbox-2.97/shell/rb-shell-player.c
9===================================================================9===================================================================
10--- rhythmbox-2.90.1~20110802.orig/shell/rb-shell-player.c10--- rhythmbox-2.97.orig/shell/rb-shell-player.c 2012-06-04 10:24:44.511435386 +0100
11+++ rhythmbox-2.90.1~20110802/shell/rb-shell-player.c11+++ rhythmbox-2.97/shell/rb-shell-player.c 2012-06-04 10:24:55.611434898 +0100
12@@ -291,6 +291,9 @@12@@ -294,6 +294,9 @@
13 13
14 static GtkActionEntry rb_shell_player_actions [] =14 static GtkActionEntry rb_shell_player_actions [] =
15 {15 {
@@ -19,7 +19,7 @@
19 { "ControlPrevious", GTK_STOCK_MEDIA_PREVIOUS, N_("Pre_vious"), "<alt>Left",19 { "ControlPrevious", GTK_STOCK_MEDIA_PREVIOUS, N_("Pre_vious"), "<alt>Left",
20 N_("Start playing the previous song"),20 N_("Start playing the previous song"),
21 G_CALLBACK (rb_shell_player_cmd_previous) },21 G_CALLBACK (rb_shell_player_cmd_previous) },
22@@ -308,9 +311,6 @@22@@ -311,9 +314,6 @@
23 23
24 static GtkToggleActionEntry rb_shell_player_toggle_entries [] =24 static GtkToggleActionEntry rb_shell_player_toggle_entries [] =
25 {25 {
@@ -29,17 +29,17 @@
29 { "ControlShuffle", GNOME_MEDIA_SHUFFLE, N_("Sh_uffle"), "<control>U",29 { "ControlShuffle", GNOME_MEDIA_SHUFFLE, N_("Sh_uffle"), "<control>U",
30 N_("Play songs in a random order"),30 N_("Play songs in a random order"),
31 G_CALLBACK (rb_shell_player_shuffle_changed_cb) },31 G_CALLBACK (rb_shell_player_shuffle_changed_cb) },
32@@ -697,9 +697,6 @@32@@ -705,9 +705,6 @@
33 action, "active",33 player_settings_changed_cb (player->priv->settings, "transition-time", player);
34 G_SETTINGS_BIND_INVERT_BOOLEAN | G_SETTINGS_BIND_NO_SENSITIVITY);34 player_settings_changed_cb (player->priv->settings, "play-order", player);
35 35
36- action = gtk_action_group_get_action (player->priv->actiongroup,36- action = gtk_action_group_get_action (player->priv->actiongroup,
37- "ControlPlay");37- "ControlPlay");
38- g_object_set (action, "is-important", TRUE, NULL);38- g_object_set (action, "is-important", TRUE, NULL);
39 39
40 player->priv->syncing_state = TRUE;40 action = gtk_action_group_get_action (player->priv->actiongroup, "ControlPrevious");
41 rb_shell_player_set_playing_source (player, NULL);41 g_object_bind_property (player, "has-prev", action, "sensitive", G_BINDING_DEFAULT);
42@@ -3777,7 +3774,6 @@42@@ -3825,7 +3822,6 @@
43 43
44 /* sync the active state of the action again */44 /* sync the active state of the action again */
45 g_object_get (player, "playing", &playing, NULL);45 g_object_get (player, "playing", &playing, NULL);
@@ -47,7 +47,7 @@
47 47
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);
49 49
50@@ -3800,11 +3796,17 @@50@@ -3848,11 +3844,17 @@
51 if (playing) {51 if (playing) {
52 if (rb_source_can_pause (player->priv->source)) {52 if (rb_source_can_pause (player->priv->source)) {
53 tooltip = g_strdup (_("Pause playback"));53 tooltip = g_strdup (_("Pause playback"));
@@ -65,7 +65,7 @@
65 }65 }
66 g_object_set (action, "tooltip", tooltip, NULL);66 g_object_set (action, "tooltip", tooltip, NULL);
67 g_free (tooltip);67 g_free (tooltip);
68@@ -3816,7 +3818,6 @@68@@ -3864,7 +3866,6 @@
69 if (player->priv->unblock_play_id == 0) {69 if (player->priv->unblock_play_id == 0) {
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);
71 }71 }
7272
=== modified file 'debian/patches/05_hide_on_quit.patch'
--- debian/patches/05_hide_on_quit.patch 2011-08-03 15:25:12 +0000
+++ debian/patches/05_hide_on_quit.patch 2012-06-04 10:19:20 +0000
@@ -5,11 +5,11 @@
5Author: Didier Roche5Author: Didier Roche
6Bug-Ubuntu: https://bugs.launchpad.net/bugs/5265526Bug-Ubuntu: https://bugs.launchpad.net/bugs/526552
77
8Index: rhythmbox-2.90.1~20110802/shell/rb-shell.c8Index: rhythmbox-2.97/shell/rb-shell.c
9===================================================================9===================================================================
10--- rhythmbox-2.90.1~20110802.orig/shell/rb-shell.c10--- rhythmbox-2.97.orig/shell/rb-shell.c 2012-06-04 10:24:44.475435388 +0100
11+++ rhythmbox-2.90.1~20110802/shell/rb-shell.c11+++ rhythmbox-2.97/shell/rb-shell.c 2012-06-04 10:24:55.827434888 +0100
12@@ -1915,11 +1915,42 @@12@@ -2276,11 +2276,42 @@
13 return FALSE;13 return FALSE;
14 }14 }
15 15
@@ -52,11 +52,11 @@
52 if (shell->priv->party_mode) {52 if (shell->priv->party_mode) {
53 return TRUE;53 return TRUE;
54 }54 }
55Index: rhythmbox-2.90.1~20110802/shell/rb-shell.h55Index: rhythmbox-2.97/shell/rb-shell.h
56===================================================================56===================================================================
57--- rhythmbox-2.90.1~20110802.orig/shell/rb-shell.h57--- rhythmbox-2.97.orig/shell/rb-shell.h 2012-06-04 10:24:44.475435388 +0100
58+++ rhythmbox-2.90.1~20110802/shell/rb-shell.h58+++ rhythmbox-2.97/shell/rb-shell.h 2012-06-04 10:24:55.827434888 +0100
59@@ -183,6 +183,8 @@59@@ -160,6 +160,8 @@
60 60
61 gboolean rb_shell_get_party_mode (RBShell *shell);61 gboolean rb_shell_get_party_mode (RBShell *shell);
62 62
6363
=== removed file 'debian/patches/06_manual_connect_daap_host.patch'
--- debian/patches/06_manual_connect_daap_host.patch 2011-05-26 16:45:50 +0000
+++ debian/patches/06_manual_connect_daap_host.patch 1970-01-01 00:00:00 +0000
@@ -1,21 +0,0 @@
1From e710ae5e83a965147b63af9ad6179338de81f20b Mon Sep 17 00:00:00 2001
2From: W. Michael Petullo <mike@flyn.org>
3Date: Wed, 04 May 2011 17:18:44 +0000
4Subject: DAAP: allow a user to provide a port for specified server
5
6Bug: https://bugzilla.gnome.org/show_bug.cgi?id=649288
7Bug-Ubuntu: https://launchpad.net/bugs/665168
8---
9Index: rhythmbox-0.13.3/plugins/daap/rb-daap-plugin.c
10===================================================================
11--- rhythmbox-0.13.3.orig/plugins/daap/rb-daap-plugin.c 2011-01-16 10:10:40.000000000 +0100
12+++ rhythmbox-0.13.3/plugins/daap/rb-daap-plugin.c 2011-05-05 07:27:37.536527475 +0200
13@@ -723,7 +723,7 @@
14
15 rb_debug ("adding manually specified DAAP share at %s", location);
16 service.name = (char *) location;
17- service.host = (char *) location;
18+ service.host = (char *) host;
19 service.port = port;
20 service.password_protected = FALSE;
21 mdns_service_added (NULL,
220
=== modified file 'debian/patches/07_quicklists.patch'
--- debian/patches/07_quicklists.patch 2012-03-20 12:01:59 +0000
+++ debian/patches/07_quicklists.patch 2012-06-04 10:19:20 +0000
@@ -1,8 +1,8 @@
1=== modified file 'a/data/rhythmbox.desktop.in.in'1=== modified file 'a/data/rhythmbox.desktop.in.in'
2Index: rhythmbox-2.95.5/data/rhythmbox.desktop.in.in2Index: rhythmbox-2.97/data/rhythmbox.desktop.in.in
3===================================================================3===================================================================
4--- rhythmbox-2.95.5.orig/data/rhythmbox.desktop.in.in 2012-02-12 01:13:10.000000000 -05004--- rhythmbox-2.97.orig/data/rhythmbox.desktop.in.in 2012-06-04 10:24:44.407435390 +0100
5+++ rhythmbox-2.95.5/data/rhythmbox.desktop.in.in 2012-03-15 15:08:33.263349627 -04005+++ rhythmbox-2.97/data/rhythmbox.desktop.in.in 2012-06-04 10:24:56.031434879 +0100
6@@ -16,3 +16,20 @@6@@ -16,3 +16,20 @@
7 X-GNOME-Bugzilla-Component=general7 X-GNOME-Bugzilla-Component=general
8 X-GNOME-Bugzilla-OtherBinaries=rhythmbox-client;rhythmbox-metadata;8 X-GNOME-Bugzilla-OtherBinaries=rhythmbox-client;rhythmbox-metadata;
99
=== removed file 'debian/patches/git_ipod_no_private_source.patch'
--- debian/patches/git_ipod_no_private_source.patch 2012-03-16 11:11:59 +0000
+++ debian/patches/git_ipod_no_private_source.patch 1970-01-01 00:00:00 +0000
@@ -1,161 +0,0 @@
1From 63a5411ebd6058c8c6ffc618a8c3ce940c210ecc Mon Sep 17 00:00:00 2001
2From: Cole Robinson <crobinso@redhat.com>
3Date: Mon, 12 Mar 2012 22:43:01 +0000
4Subject: ipod: playlist handlers shouldn't need private source access
5
6Accomplist this by adding an ipod source method to lookup a track
7in the private entry_map.
8
9Signed-off-by: Cole Robinson <crobinso@redhat.com>
10---
11diff --git a/plugins/ipod/rb-ipod-source.c b/plugins/ipod/rb-ipod-source.c
12index aea499e..7a23d0c 100644
13--- a/plugins/ipod/rb-ipod-source.c
14+++ b/plugins/ipod/rb-ipod-source.c
15@@ -594,15 +594,15 @@ playlist_track_removed (RhythmDBQueryModel *m,
16 RBIpodStaticPlaylistSource *playlist = RB_IPOD_STATIC_PLAYLIST_SOURCE (data);
17 Itdb_Playlist *ipod_pl = rb_ipod_static_playlist_source_get_itdb_playlist (playlist);
18 RBiPodSource *ipod = rb_ipod_static_playlist_source_get_ipod_source (playlist);
19- RBiPodSourcePrivate *priv = IPOD_SOURCE_GET_PRIVATE (ipod);
20+ RbIpodDb *ipod_db = rb_ipod_static_playlist_source_get_ipod_db (playlist);
21 Itdb_Track *track;
22
23 g_return_if_fail (ipod != NULL);
24 g_return_if_fail (ipod_pl != NULL);
25
26- track = g_hash_table_lookup (priv->entry_map, entry);
27+ track = rb_ipod_source_lookup_track (ipod, entry);
28 g_return_if_fail (track != NULL);
29- rb_ipod_db_remove_from_playlist (priv->ipod_db, ipod_pl, track);
30+ rb_ipod_db_remove_from_playlist (ipod_db, ipod_pl, track);
31 }
32
33 static void
34@@ -612,7 +612,7 @@ playlist_track_added (GtkTreeModel *model, GtkTreePath *path,
35 RBIpodStaticPlaylistSource *playlist = RB_IPOD_STATIC_PLAYLIST_SOURCE (data);
36 Itdb_Playlist *ipod_pl = rb_ipod_static_playlist_source_get_itdb_playlist (playlist);
37 RBiPodSource *ipod = rb_ipod_static_playlist_source_get_ipod_source (playlist);
38- RBiPodSourcePrivate *priv = IPOD_SOURCE_GET_PRIVATE (ipod);
39+ RbIpodDb *ipod_db = rb_ipod_static_playlist_source_get_ipod_db (playlist);
40 Itdb_Track *track;
41 RhythmDBEntry *entry;
42
43@@ -620,10 +620,10 @@ playlist_track_added (GtkTreeModel *model, GtkTreePath *path,
44 g_return_if_fail (ipod_pl != NULL);
45
46 gtk_tree_model_get (model, iter, 0, &entry, -1);
47- track = g_hash_table_lookup (priv->entry_map, entry);
48+ track = rb_ipod_source_lookup_track (ipod, entry);
49 g_return_if_fail (track != NULL);
50
51- rb_ipod_db_add_to_playlist (priv->ipod_db, ipod_pl, track);
52+ rb_ipod_db_add_to_playlist (ipod_db, ipod_pl, track);
53 }
54
55 static void
56@@ -633,7 +633,6 @@ playlist_before_save (RbIpodDb *ipod_db, gpointer data)
57 GtkTreeModel *model = GTK_TREE_MODEL (rb_playlist_source_get_query_model (RB_PLAYLIST_SOURCE (playlist)));
58 Itdb_Playlist *ipod_pl = rb_ipod_static_playlist_source_get_itdb_playlist (playlist);
59 RBiPodSource *ipod = rb_ipod_static_playlist_source_get_ipod_source (playlist);
60- RBiPodSourcePrivate *priv = IPOD_SOURCE_GET_PRIVATE (ipod);
61 GtkTreeIter iter;
62
63 if (!rb_ipod_static_playlist_source_get_was_reordered (playlist)) {
64@@ -650,7 +649,7 @@ playlist_before_save (RbIpodDb *ipod_db, gpointer data)
65 Itdb_Track *track;
66
67 gtk_tree_model_get (model, &iter, 0, &entry, -1);
68- track = g_hash_table_lookup (priv->entry_map, entry);
69+ track = rb_ipod_source_lookup_track (ipod, entry);
70
71 g_return_if_fail (track != NULL);
72 } while (gtk_tree_model_iter_next (model, &iter));
73@@ -675,7 +674,7 @@ playlist_before_save (RbIpodDb *ipod_db, gpointer data)
74 Itdb_Track *track;
75
76 gtk_tree_model_get (model, &iter, 0, &entry, -1);
77- track = g_hash_table_lookup (priv->entry_map, entry);
78+ track = rb_ipod_source_lookup_track (ipod, entry);
79
80 rb_debug ("adding \"%s\" to \"%s\"", track->title, ipod_pl->name);
81
82@@ -692,13 +691,12 @@ playlist_rows_reordered (GtkTreeModel *model,
83 gint *order, gpointer data)
84 {
85 RBIpodStaticPlaylistSource *playlist = RB_IPOD_STATIC_PLAYLIST_SOURCE (data);
86- RBiPodSource *ipod = rb_ipod_static_playlist_source_get_ipod_source (playlist);
87- RBiPodSourcePrivate *priv = IPOD_SOURCE_GET_PRIVATE (ipod);
88+ RbIpodDb *ipod_db = rb_ipod_static_playlist_source_get_ipod_db (playlist);
89
90 /* Mark as reordered; will check before save */
91 rb_ipod_static_playlist_source_set_was_reordered (playlist, TRUE);
92
93- rb_ipod_db_save_async (priv->ipod_db);
94+ rb_ipod_db_save_async (ipod_db);
95 }
96
97 static void
98@@ -2064,6 +2062,16 @@ rb_ipod_source_remove_playlist (RBiPodSource *ipod_source,
99 rb_ipod_db_remove_playlist (priv->ipod_db, rb_ipod_static_playlist_source_get_itdb_playlist (playlist_source));
100 }
101
102+
103+Itdb_Track *
104+rb_ipod_source_lookup_track (RBiPodSource *source,
105+ RhythmDBEntry *entry)
106+{
107+ RBiPodSourcePrivate *priv = IPOD_SOURCE_GET_PRIVATE (source);
108+
109+ return g_hash_table_lookup (priv->entry_map, entry);
110+}
111+
112 static gboolean
113 ipod_name_changed_cb (GtkWidget *widget,
114 GdkEventFocus *event,
115diff --git a/plugins/ipod/rb-ipod-source.h b/plugins/ipod/rb-ipod-source.h
116index f95d735..9af5fa3 100644
117--- a/plugins/ipod/rb-ipod-source.h
118+++ b/plugins/ipod/rb-ipod-source.h
119@@ -71,6 +71,9 @@ void rb_ipod_source_show_properties (RBiPodSource *source);
120 void rb_ipod_source_delete_entries (RBiPodSource *source,
121 GList *entries);
122
123+Itdb_Track * rb_ipod_source_lookup_track (RBiPodSource *source,
124+ RhythmDBEntry *entry);
125+
126 G_END_DECLS
127
128 #endif /* __RB_IPOD_SOURCE_H */
129diff --git a/plugins/ipod/rb-ipod-static-playlist-source.c b/plugins/ipod/rb-ipod-static-playlist-source.c
130index a2f0248..0a95dc8 100644
131--- a/plugins/ipod/rb-ipod-static-playlist-source.c
132+++ b/plugins/ipod/rb-ipod-static-playlist-source.c
133@@ -262,6 +262,14 @@ rb_ipod_static_playlist_source_get_ipod_source (RBIpodStaticPlaylistSource *play
134 return priv->ipod_source;
135 }
136
137+RbIpodDb*
138+rb_ipod_static_playlist_source_get_ipod_db (RBIpodStaticPlaylistSource *playlist)
139+{
140+ RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (playlist);
141+
142+ return priv->ipod_db;
143+}
144+
145 gboolean
146 rb_ipod_static_playlist_source_get_was_reordered (RBIpodStaticPlaylistSource *playlist)
147 {
148diff --git a/plugins/ipod/rb-ipod-static-playlist-source.h b/plugins/ipod/rb-ipod-static-playlist-source.h
149index 38afff0..49c833f 100644
150--- a/plugins/ipod/rb-ipod-static-playlist-source.h
151+++ b/plugins/ipod/rb-ipod-static-playlist-source.h
152@@ -56,6 +56,7 @@ RBIpodStaticPlaylistSource * rb_ipod_static_playlist_source_new (RBShell *shell,
153
154 Itdb_Playlist* rb_ipod_static_playlist_source_get_itdb_playlist (RBIpodStaticPlaylistSource *playlist);
155 RBiPodSource* rb_ipod_static_playlist_source_get_ipod_source (RBIpodStaticPlaylistSource *playlist);
156+RbIpodDb* rb_ipod_static_playlist_source_get_ipod_db (RBIpodStaticPlaylistSource *playlist);
157 gboolean rb_ipod_static_playlist_source_get_was_reordered (RBIpodStaticPlaylistSource *playlist);
158 void rb_ipod_static_playlist_source_set_was_reordered (RBIpodStaticPlaylistSource *playlist, gboolean was_reordered);
159
160--
161cgit v0.9.0.2
1620
=== removed file 'debian/patches/git_ipod_playlist_handler.patch'
--- debian/patches/git_ipod_playlist_handler.patch 2012-03-16 11:11:59 +0000
+++ debian/patches/git_ipod_playlist_handler.patch 1970-01-01 00:00:00 +0000
@@ -1,632 +0,0 @@
1From d99a239c500516c792d50712834a2be76c10feb2 Mon Sep 17 00:00:00 2001
2From: Jonathan Matthew <jonathan@d14n.org>
3Date: Wed, 14 Mar 2012 13:16:50 +0000
4Subject: ipod: Move all playlist handlers to private playlist code
5
6Various other cleanups, removal of the notify::base-query-model
7signal handler that would never have worked, and stuff moved
8from impl_delete_thyself to the dispose method where it belongs.
9
10based on a patch by Cole Robinson <crobinso@redhat.com>
11---
12diff --git a/plugins/ipod/rb-ipod-plugin.c b/plugins/ipod/rb-ipod-plugin.c
13index 089c1b4..e0907bc 100644
14--- a/plugins/ipod/rb-ipod-plugin.c
15+++ b/plugins/ipod/rb-ipod-plugin.c
16@@ -277,14 +277,13 @@ rb_ipod_plugin_cmd_playlist_rename (GtkAction *action, RBSource *source)
17 static void
18 rb_ipod_plugin_cmd_playlist_delete (GtkAction *action, RBSource *source)
19 {
20- RBIpodStaticPlaylistSource *psource;
21 RBiPodSource *ipod_source;
22
23 g_return_if_fail (RB_IS_IPOD_STATIC_PLAYLIST_SOURCE (source));
24- psource = RB_IPOD_STATIC_PLAYLIST_SOURCE (source);
25
26- ipod_source = rb_ipod_static_playlist_source_get_ipod_source (psource);
27+ g_object_get (source, "ipod-source", &ipod_source, NULL);
28 rb_ipod_source_remove_playlist (ipod_source, source);
29+ g_object_unref (ipod_source);
30 }
31
32 static void
33diff --git a/plugins/ipod/rb-ipod-source.c b/plugins/ipod/rb-ipod-source.c
34index 7a23d0c..194807c 100644
35--- a/plugins/ipod/rb-ipod-source.c
36+++ b/plugins/ipod/rb-ipod-source.c
37@@ -587,170 +587,6 @@ ipod_path_to_uri (const char *mount_point, const char *ipod_path)
38 }
39
40 static void
41-playlist_track_removed (RhythmDBQueryModel *m,
42- RhythmDBEntry *entry,
43- gpointer data)
44-{
45- RBIpodStaticPlaylistSource *playlist = RB_IPOD_STATIC_PLAYLIST_SOURCE (data);
46- Itdb_Playlist *ipod_pl = rb_ipod_static_playlist_source_get_itdb_playlist (playlist);
47- RBiPodSource *ipod = rb_ipod_static_playlist_source_get_ipod_source (playlist);
48- RbIpodDb *ipod_db = rb_ipod_static_playlist_source_get_ipod_db (playlist);
49- Itdb_Track *track;
50-
51- g_return_if_fail (ipod != NULL);
52- g_return_if_fail (ipod_pl != NULL);
53-
54- track = rb_ipod_source_lookup_track (ipod, entry);
55- g_return_if_fail (track != NULL);
56- rb_ipod_db_remove_from_playlist (ipod_db, ipod_pl, track);
57-}
58-
59-static void
60-playlist_track_added (GtkTreeModel *model, GtkTreePath *path,
61- GtkTreeIter *iter, gpointer data)
62-{
63- RBIpodStaticPlaylistSource *playlist = RB_IPOD_STATIC_PLAYLIST_SOURCE (data);
64- Itdb_Playlist *ipod_pl = rb_ipod_static_playlist_source_get_itdb_playlist (playlist);
65- RBiPodSource *ipod = rb_ipod_static_playlist_source_get_ipod_source (playlist);
66- RbIpodDb *ipod_db = rb_ipod_static_playlist_source_get_ipod_db (playlist);
67- Itdb_Track *track;
68- RhythmDBEntry *entry;
69-
70- g_return_if_fail (ipod != NULL);
71- g_return_if_fail (ipod_pl != NULL);
72-
73- gtk_tree_model_get (model, iter, 0, &entry, -1);
74- track = rb_ipod_source_lookup_track (ipod, entry);
75- g_return_if_fail (track != NULL);
76-
77- rb_ipod_db_add_to_playlist (ipod_db, ipod_pl, track);
78-}
79-
80-static void
81-playlist_before_save (RbIpodDb *ipod_db, gpointer data)
82-{
83- RBIpodStaticPlaylistSource *playlist = RB_IPOD_STATIC_PLAYLIST_SOURCE (data);
84- GtkTreeModel *model = GTK_TREE_MODEL (rb_playlist_source_get_query_model (RB_PLAYLIST_SOURCE (playlist)));
85- Itdb_Playlist *ipod_pl = rb_ipod_static_playlist_source_get_itdb_playlist (playlist);
86- RBiPodSource *ipod = rb_ipod_static_playlist_source_get_ipod_source (playlist);
87- GtkTreeIter iter;
88-
89- if (!rb_ipod_static_playlist_source_get_was_reordered (playlist)) {
90- return;
91- }
92-
93- rb_ipod_static_playlist_source_set_was_reordered (playlist, FALSE);
94-
95- /* Sanity check that all tracks are in entry_map */
96-
97- if (gtk_tree_model_get_iter_first (model, &iter)) {
98- do {
99- RhythmDBEntry *entry;
100- Itdb_Track *track;
101-
102- gtk_tree_model_get (model, &iter, 0, &entry, -1);
103- track = rb_ipod_source_lookup_track (ipod, entry);
104-
105- g_return_if_fail (track != NULL);
106- } while (gtk_tree_model_iter_next (model, &iter));
107- }
108-
109- /* Remove all tracks then re-add in correct order */
110-
111- while (ipod_pl->members != NULL) {
112- Itdb_Track *track;
113-
114- track = (Itdb_Track *)ipod_pl->members->data;
115-
116- rb_debug ("removing \"%s\" from \"%s\"", track->title, ipod_pl->name);
117-
118- /* Call directly to itdb to avoid scheduling another save */
119- itdb_playlist_remove_track (ipod_pl, track);
120- }
121-
122- if (gtk_tree_model_get_iter_first (model, &iter)) {
123- do {
124- RhythmDBEntry *entry;
125- Itdb_Track *track;
126-
127- gtk_tree_model_get (model, &iter, 0, &entry, -1);
128- track = rb_ipod_source_lookup_track (ipod, entry);
129-
130- rb_debug ("adding \"%s\" to \"%s\"", track->title, ipod_pl->name);
131-
132- /* Call directly to itdb to avoid scheduling another save */
133- itdb_playlist_add_track (ipod_pl, track, -1);
134- } while (gtk_tree_model_iter_next (model, &iter));
135- }
136-}
137-
138-static void
139-playlist_rows_reordered (GtkTreeModel *model,
140- GtkTreePath *path,
141- GtkTreeIter *iter,
142- gint *order, gpointer data)
143-{
144- RBIpodStaticPlaylistSource *playlist = RB_IPOD_STATIC_PLAYLIST_SOURCE (data);
145- RbIpodDb *ipod_db = rb_ipod_static_playlist_source_get_ipod_db (playlist);
146-
147- /* Mark as reordered; will check before save */
148- rb_ipod_static_playlist_source_set_was_reordered (playlist, TRUE);
149-
150- rb_ipod_db_save_async (ipod_db);
151-}
152-
153-static void
154-playlist_source_model_disconnect_signals (GObject *model, RBIpodStaticPlaylistSource *playlist_source)
155-{
156- g_return_if_fail (RB_IS_IPOD_STATIC_PLAYLIST_SOURCE (playlist_source));
157-
158- g_signal_handlers_disconnect_by_func (model,
159- G_CALLBACK (playlist_track_added),
160- playlist_source);
161- g_signal_handlers_disconnect_by_func (model,
162- G_CALLBACK (playlist_track_removed),
163- playlist_source);
164- g_signal_handlers_disconnect_by_func (model,
165- G_CALLBACK (playlist_rows_reordered),
166- playlist_source);
167-}
168-
169-static void
170-playlist_source_model_connect_signals (RBIpodStaticPlaylistSource *playlist_source)
171-{
172- RhythmDBQueryModel *model;
173-
174- g_return_if_fail (RB_IS_IPOD_STATIC_PLAYLIST_SOURCE (playlist_source));
175-
176- g_object_get (G_OBJECT (playlist_source),
177- "base-query-model", &model, NULL);
178- g_signal_connect (model, "row-inserted",
179- G_CALLBACK (playlist_track_added),
180- playlist_source);
181- g_signal_connect (model, "entry-removed",
182- G_CALLBACK (playlist_track_removed),
183- playlist_source);
184- g_signal_connect (model, "rows-reordered",
185- G_CALLBACK (playlist_rows_reordered),
186- playlist_source);
187- g_object_unref (model);
188-}
189-
190-static void
191-playlist_source_model_changed (GObject *obj, GParamSpec *pspec, gpointer old_model)
192-{
193- RBIpodStaticPlaylistSource *playlist_source;
194-
195- rb_debug ("base model changed for iPod playlist");
196-
197- playlist_source = RB_IPOD_STATIC_PLAYLIST_SOURCE (obj);
198-
199- playlist_source_model_disconnect_signals (G_OBJECT (old_model), playlist_source);
200-
201- playlist_source_model_connect_signals (playlist_source);
202-}
203-
204-static void
205 set_podcast_icon (RBIpodStaticPlaylistSource *source)
206 {
207 GdkPixbuf *pixbuf;
208@@ -776,7 +612,6 @@ add_rb_playlist (RBiPodSource *source, Itdb_Playlist *playlist)
209 GList *it;
210 RBiPodSourcePrivate *priv = IPOD_SOURCE_GET_PRIVATE (source);
211 RhythmDBEntryType *entry_type;
212- RhythmDBQueryModel *model;
213
214 g_object_get (source,
215 "shell", &shell,
216@@ -812,17 +647,6 @@ add_rb_playlist (RBiPodSource *source, Itdb_Playlist *playlist)
217 playlist->userdata_destroy = g_object_unref;
218 playlist->userdata_duplicate = g_object_ref;
219
220- g_object_get (G_OBJECT (playlist_source),
221- "base-query-model", &model, NULL);
222- g_signal_connect (playlist_source, "notify::base-query-model",
223- G_CALLBACK (playlist_source_model_changed),
224- playlist_source);
225- g_signal_connect (priv->ipod_db, "before-save",
226- G_CALLBACK (playlist_before_save),
227- playlist_source);
228- g_object_unref (model);
229- playlist_source_model_connect_signals (playlist_source);
230-
231 if (itdb_playlist_is_podcasts(playlist)) {
232 priv->podcast_pl = playlist_source;
233 set_podcast_icon (playlist_source);
234@@ -2013,17 +1837,8 @@ impl_delete_thyself (RBDisplayPage *page)
235 Itdb_Playlist *playlist = (Itdb_Playlist *)p->data;
236 if (!itdb_playlist_is_mpl (playlist) && !playlist->is_spl) {
237 RBSource *rb_playlist;
238- RhythmDBQueryModel *model;
239
240 rb_playlist = RB_SOURCE (playlist->userdata);
241- g_object_get (G_OBJECT (rb_playlist),
242- "base-query-model", &model, NULL);
243-
244- /* remove these to ensure they aren't called during source deletion */
245- playlist_source_model_disconnect_signals (G_OBJECT (model),
246- RB_IPOD_STATIC_PLAYLIST_SOURCE (rb_playlist));
247-
248- g_object_unref (model);
249 rb_display_page_delete_thyself (RB_DISPLAY_PAGE (rb_playlist));
250 }
251 }
252@@ -2057,9 +1872,12 @@ rb_ipod_source_remove_playlist (RBiPodSource *ipod_source,
253 {
254 RBiPodSourcePrivate *priv = IPOD_SOURCE_GET_PRIVATE (ipod_source);
255 RBIpodStaticPlaylistSource *playlist_source = RB_IPOD_STATIC_PLAYLIST_SOURCE (source);
256+ Itdb_Playlist *playlist;
257
258 rb_display_page_delete_thyself (RB_DISPLAY_PAGE (source));
259- rb_ipod_db_remove_playlist (priv->ipod_db, rb_ipod_static_playlist_source_get_itdb_playlist (playlist_source));
260+
261+ g_object_get (playlist_source, "itdb-playlist", &playlist, NULL);
262+ rb_ipod_db_remove_playlist (priv->ipod_db, playlist);
263 }
264
265
266diff --git a/plugins/ipod/rb-ipod-static-playlist-source.c b/plugins/ipod/rb-ipod-static-playlist-source.c
267index 0a95dc8..261c4c4 100644
268--- a/plugins/ipod/rb-ipod-static-playlist-source.c
269+++ b/plugins/ipod/rb-ipod-static-playlist-source.c
270@@ -45,11 +45,6 @@ static void rb_ipod_static_playlist_source_get_property (GObject *object,
271 GParamSpec *pspec);
272
273 static gboolean impl_show_popup (RBDisplayPage *page);
274-static void impl_delete_thyself (RBDisplayPage *page);
275-
276-static void source_name_changed_cb (RBIpodStaticPlaylistSource *source,
277- GParamSpec *spec,
278- gpointer data);
279
280 typedef struct
281 {
282@@ -67,10 +62,168 @@ enum {
283 PROP_0,
284 PROP_IPOD_SOURCE,
285 PROP_IPOD_DB,
286- PROP_ITDB_PLAYLIST,
287- PROP_WAS_REORDERED
288+ PROP_ITDB_PLAYLIST
289 };
290
291+static void
292+playlist_track_removed (RhythmDBQueryModel *m,
293+ RhythmDBEntry *entry,
294+ gpointer data)
295+{
296+ RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (data);
297+ Itdb_Track *track;
298+
299+ track = rb_ipod_source_lookup_track (priv->ipod_source, entry);
300+ g_return_if_fail (track != NULL);
301+ rb_ipod_db_remove_from_playlist (priv->ipod_db, priv->itdb_playlist, track);
302+}
303+
304+static void
305+playlist_track_added (GtkTreeModel *model,
306+ GtkTreePath *path,
307+ GtkTreeIter *iter,
308+ gpointer data)
309+{
310+ RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (data);
311+ Itdb_Track *track;
312+ RhythmDBEntry *entry;
313+
314+ gtk_tree_model_get (model, iter, 0, &entry, -1);
315+ track = rb_ipod_source_lookup_track (priv->ipod_source, entry);
316+ g_return_if_fail (track != NULL);
317+
318+ rb_ipod_db_add_to_playlist (priv->ipod_db, priv->itdb_playlist, track);
319+}
320+
321+static void
322+playlist_before_save (RbIpodDb *ipod_db, gpointer data)
323+{
324+ RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (data);
325+ RhythmDBQueryModel *model;
326+ GtkTreeIter iter;
327+
328+ if (priv->was_reordered == FALSE)
329+ return;
330+ priv->was_reordered = FALSE;
331+
332+ /* Sanity check that all tracks are in entry_map */
333+
334+ g_object_get (G_OBJECT (data), "base-query-model", &model, NULL);
335+ if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &iter)) {
336+ do {
337+ RhythmDBEntry *entry;
338+ Itdb_Track *track;
339+
340+ gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, 0, &entry, -1);
341+ track = rb_ipod_source_lookup_track (priv->ipod_source, entry);
342+
343+ g_return_if_fail (track != NULL);
344+ } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter));
345+ }
346+
347+ /* Remove all tracks then re-add in correct order */
348+
349+ while (priv->itdb_playlist->members != NULL) {
350+ Itdb_Track *track;
351+
352+ track = (Itdb_Track *)priv->itdb_playlist->members->data;
353+
354+ rb_debug ("removing \"%s\" from \"%s\"", track->title, priv->itdb_playlist->name);
355+
356+ /* Call directly to itdb to avoid scheduling another save */
357+ itdb_playlist_remove_track (priv->itdb_playlist, track);
358+ }
359+
360+ if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &iter)) {
361+ do {
362+ RhythmDBEntry *entry;
363+ Itdb_Track *track;
364+
365+ gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, 0, &entry, -1);
366+ track = rb_ipod_source_lookup_track (priv->ipod_source, entry);
367+
368+ rb_debug ("adding \"%s\" to \"%s\"", track->title, priv->itdb_playlist->name);
369+
370+ /* Call directly to itdb to avoid scheduling another save */
371+ itdb_playlist_add_track (priv->itdb_playlist, track, -1);
372+ } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter));
373+ }
374+
375+ g_object_unref (model);
376+}
377+
378+static void
379+playlist_rows_reordered (GtkTreeModel *model,
380+ GtkTreePath *path,
381+ GtkTreeIter *iter,
382+ gint *order,
383+ gpointer data)
384+{
385+ RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (data);
386+ priv->was_reordered = TRUE;
387+
388+ rb_ipod_db_save_async (priv->ipod_db);
389+}
390+
391+static void
392+playlist_source_model_disconnect_signals (RBIpodStaticPlaylistSource *source)
393+{
394+ RhythmDBQueryModel *model;
395+
396+ g_return_if_fail (RB_IS_IPOD_STATIC_PLAYLIST_SOURCE (source));
397+
398+ g_object_get (source, "base-query-model", &model, NULL);
399+
400+ g_signal_handlers_disconnect_by_func (model,
401+ G_CALLBACK (playlist_track_added),
402+ source);
403+ g_signal_handlers_disconnect_by_func (model,
404+ G_CALLBACK (playlist_track_removed),
405+ source);
406+ g_signal_handlers_disconnect_by_func (model,
407+ G_CALLBACK (playlist_rows_reordered),
408+ source);
409+
410+ g_object_unref (model);
411+}
412+
413+static void
414+playlist_source_model_connect_signals (RBIpodStaticPlaylistSource *playlist_source)
415+{
416+ RhythmDBQueryModel *model;
417+
418+ g_return_if_fail (RB_IS_IPOD_STATIC_PLAYLIST_SOURCE (playlist_source));
419+
420+ g_object_get (playlist_source, "base-query-model", &model, NULL);
421+ g_signal_connect (model, "row-inserted",
422+ G_CALLBACK (playlist_track_added),
423+ playlist_source);
424+ g_signal_connect (model, "entry-removed",
425+ G_CALLBACK (playlist_track_removed),
426+ playlist_source);
427+ g_signal_connect (model, "rows-reordered",
428+ G_CALLBACK (playlist_rows_reordered),
429+ playlist_source);
430+ g_object_unref (model);
431+}
432+
433+static void
434+source_name_changed_cb (RBIpodStaticPlaylistSource *source,
435+ GParamSpec *spec,
436+ gpointer data)
437+{
438+ RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (source);
439+ char *name;
440+
441+ g_object_get (source, "name", &name, NULL);
442+
443+ if ((priv->itdb_playlist != NULL) && (strcmp (name, priv->itdb_playlist->name) != 0)) {
444+ rb_debug ("changing playlist name to %s", name);
445+ rb_ipod_db_rename_playlist (priv->ipod_db, priv->itdb_playlist, name);
446+ }
447+ g_free (name);
448+}
449+
450
451 static void
452 rb_ipod_static_playlist_source_class_init (RBIpodStaticPlaylistSourceClass *klass)
453@@ -85,7 +238,6 @@ rb_ipod_static_playlist_source_class_init (RBIpodStaticPlaylistSourceClass *klas
454 object_class->set_property = rb_ipod_static_playlist_source_set_property;
455
456 page_class->show_popup = impl_show_popup;
457- page_class->delete_thyself = impl_delete_thyself;
458
459 source_class->impl_can_move_to_trash = (RBSourceFeatureFunc) rb_false_function;
460 source_class->impl_can_delete = (RBSourceFeatureFunc) rb_true_function;
461@@ -115,13 +267,6 @@ rb_ipod_static_playlist_source_class_init (RBIpodStaticPlaylistSourceClass *klas
462 "itdb-playlist",
463 G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
464
465- g_object_class_install_property (object_class,
466- PROP_WAS_REORDERED,
467- g_param_spec_pointer ("was-reordered",
468- "was-reordered",
469- "was-reordered",
470- G_PARAM_READWRITE));
471-
472 g_type_class_add_private (klass, sizeof (RBIpodStaticPlaylistSourcePrivate));
473 }
474
475@@ -139,20 +284,27 @@ rb_ipod_static_playlist_source_init (RBIpodStaticPlaylistSource *source)
476 static void
477 rb_ipod_static_playlist_source_constructed (GObject *object)
478 {
479+ RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (object);
480+ RhythmDBQueryModel *model;
481+
482 RB_CHAIN_GOBJECT_METHOD (rb_ipod_static_playlist_source_parent_class, constructed, object);
483+
484 g_signal_connect (object, "notify::name", (GCallback)source_name_changed_cb, NULL);
485-}
486
487-static void
488-rb_ipod_static_playlist_source_dispose (GObject *object)
489-{
490- G_OBJECT_CLASS (rb_ipod_static_playlist_source_parent_class)->dispose (object);
491+ g_object_get (object, "base-query-model", &model, NULL);
492+ g_signal_connect (priv->ipod_db, "before-save",
493+ G_CALLBACK (playlist_before_save),
494+ object);
495+ g_object_unref (model);
496+ playlist_source_model_connect_signals (RB_IPOD_STATIC_PLAYLIST_SOURCE (object));
497+
498 }
499
500 static void
501-impl_delete_thyself (RBDisplayPage *page)
502+rb_ipod_static_playlist_source_dispose (GObject *object)
503 {
504- RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (page);
505+ RBIpodStaticPlaylistSource *source = RB_IPOD_STATIC_PLAYLIST_SOURCE (object);
506+ RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (object);
507
508 if (priv->ipod_source) {
509 g_object_unref (priv->ipod_source);
510@@ -162,8 +314,10 @@ impl_delete_thyself (RBDisplayPage *page)
511 g_object_unref (priv->ipod_db);
512 priv->ipod_db = NULL;
513 }
514-
515- RB_DISPLAY_PAGE_CLASS (rb_ipod_static_playlist_source_parent_class)->delete_thyself (page);
516+
517+ playlist_source_model_disconnect_signals (source);
518+
519+ G_OBJECT_CLASS (rb_ipod_static_playlist_source_parent_class)->dispose (object);
520 }
521
522 RBIpodStaticPlaylistSource *
523@@ -209,9 +363,6 @@ rb_ipod_static_playlist_source_set_property (GObject *object,
524 case PROP_ITDB_PLAYLIST:
525 priv->itdb_playlist = g_value_get_pointer (value);
526 break;
527- case PROP_WAS_REORDERED:
528- priv->was_reordered = g_value_get_boolean (value);
529- break;
530 default:
531 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
532 break;
533@@ -236,56 +387,12 @@ rb_ipod_static_playlist_source_get_property (GObject *object,
534 case PROP_ITDB_PLAYLIST:
535 g_value_set_pointer (value, priv->itdb_playlist);
536 break;
537- case PROP_WAS_REORDERED:
538- g_value_set_boolean (value, priv->was_reordered);
539- break;
540 default:
541 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
542 break;
543 }
544 }
545
546-
547-Itdb_Playlist*
548-rb_ipod_static_playlist_source_get_itdb_playlist (RBIpodStaticPlaylistSource *playlist)
549-{
550- RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (playlist);
551-
552- return priv->itdb_playlist;
553-}
554-
555-RBiPodSource*
556-rb_ipod_static_playlist_source_get_ipod_source (RBIpodStaticPlaylistSource *playlist)
557-{
558- RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (playlist);
559-
560- return priv->ipod_source;
561-}
562-
563-RbIpodDb*
564-rb_ipod_static_playlist_source_get_ipod_db (RBIpodStaticPlaylistSource *playlist)
565-{
566- RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (playlist);
567-
568- return priv->ipod_db;
569-}
570-
571-gboolean
572-rb_ipod_static_playlist_source_get_was_reordered (RBIpodStaticPlaylistSource *playlist)
573-{
574- RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (playlist);
575-
576- return priv->was_reordered;
577-}
578-
579-void
580-rb_ipod_static_playlist_source_set_was_reordered (RBIpodStaticPlaylistSource *playlist, gboolean was_reordered)
581-{
582- RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (playlist);
583-
584- priv->was_reordered = was_reordered;
585-}
586-
587 static gboolean
588 impl_show_popup (RBDisplayPage *page)
589 {
590@@ -293,23 +400,6 @@ impl_show_popup (RBDisplayPage *page)
591 return TRUE;
592 }
593
594-static void
595-source_name_changed_cb (RBIpodStaticPlaylistSource *source,
596- GParamSpec *spec,
597- gpointer data)
598-{
599- RBIpodStaticPlaylistSourcePrivate *priv = IPOD_STATIC_PLAYLIST_SOURCE_GET_PRIVATE (source);
600- char *name;
601-
602- g_object_get (source, "name", &name, NULL);
603-
604- if ((priv->itdb_playlist != NULL) && (strcmp (name, priv->itdb_playlist->name) != 0)) {
605- rb_debug ("changing playlist name to %s", name);
606- rb_ipod_db_rename_playlist (priv->ipod_db, priv->itdb_playlist, name);
607- }
608- g_free (name);
609-}
610-
611 void
612 _rb_ipod_static_playlist_source_register_type (GTypeModule *module)
613 {
614diff --git a/plugins/ipod/rb-ipod-static-playlist-source.h b/plugins/ipod/rb-ipod-static-playlist-source.h
615index 49c833f..383b447 100644
616--- a/plugins/ipod/rb-ipod-static-playlist-source.h
617+++ b/plugins/ipod/rb-ipod-static-playlist-source.h
618@@ -54,12 +54,6 @@ RBIpodStaticPlaylistSource * rb_ipod_static_playlist_source_new (RBShell *shell,
619 Itdb_Playlist *playlist,
620 RhythmDBEntryType *entry_type);
621
622-Itdb_Playlist* rb_ipod_static_playlist_source_get_itdb_playlist (RBIpodStaticPlaylistSource *playlist);
623-RBiPodSource* rb_ipod_static_playlist_source_get_ipod_source (RBIpodStaticPlaylistSource *playlist);
624-RbIpodDb* rb_ipod_static_playlist_source_get_ipod_db (RBIpodStaticPlaylistSource *playlist);
625-gboolean rb_ipod_static_playlist_source_get_was_reordered (RBIpodStaticPlaylistSource *playlist);
626-void rb_ipod_static_playlist_source_set_was_reordered (RBIpodStaticPlaylistSource *playlist, gboolean was_reordered);
627-
628 G_END_DECLS
629
630 #endif /* __RB_IPOD_STATIC_PLAYLIST_SOURCE_H */
631--
632cgit v0.9.0.2
6330
=== removed file 'debian/patches/git_local_art_search_typo.patch'
--- debian/patches/git_local_art_search_typo.patch 2012-03-16 11:11:59 +0000
+++ debian/patches/git_local_art_search_typo.patch 1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
1From b1887b43d6543021dd8e6266e6acdbcfb030feda Mon Sep 17 00:00:00 2001
2From: Jonathan Matthew <jonathan@d14n.org>
3Date: Mon, 12 Mar 2012 22:42:42 +0000
4Subject: artsearch: fix typo in local search (bug #671950)
5
6spotted by Patrice Duroux <duroux.patrice@orange.fr>
7---
8diff --git a/plugins/artsearch/local.py b/plugins/artsearch/local.py
9index a914b1d..819fbaa 100644
10--- a/plugins/artsearch/local.py
11+++ b/plugins/artsearch/local.py
12@@ -73,7 +73,7 @@ class LocalSearch:
13 nkey.add_field("artist", artist)
14 uri = parent.resolve_relative_path(f_name).get_uri()
15 print "found album+artist match " + uri
16- self.store.store_uri(nkey. RB.ExtDBSourceType.USER, uri)
17+ self.store.store_uri(nkey, RB.ExtDBSourceType.USER, uri)
18
19 # if that didn't work, look for the longest shared prefix
20 # only accept matches longer than 2 to avoid weird false positives
21--
22cgit v0.9.0.2
23
240
=== removed file 'debian/patches/git_magnatune_dialog_segfault.patch'
--- debian/patches/git_magnatune_dialog_segfault.patch 2012-03-16 11:11:59 +0000
+++ debian/patches/git_magnatune_dialog_segfault.patch 1970-01-01 00:00:00 +0000
@@ -1,24 +0,0 @@
1From 7b344c68e25ec6ac61b4eef15659316d7859ed91 Mon Sep 17 00:00:00 2001
2From: Ole Laursen <olau@hardworking.dk>
3Date: Wed, 14 Mar 2012 21:35:48 +0000
4Subject: magnatune: fix crash opening preferences dialog (bug #672084)
5
6---
7diff --git a/plugins/magnatune/magnatune.py b/plugins/magnatune/magnatune.py
8index ce2aeb3..e88f0e2 100644
9--- a/plugins/magnatune/magnatune.py
10+++ b/plugins/magnatune/magnatune.py
11@@ -214,8 +214,8 @@ class MagnatuneConfig(GObject.GObject, PeasGtk.Configurable):
12 builder.get_object("stream_account_radio").set_active(account_type == "stream")
13 builder.get_object("download_account_radio").set_active(account_type == "download")
14
15- builder.get_object("username_entry").set_text(username)
16- builder.get_object("password_entry").set_text(password)
17+ builder.get_object("username_entry").set_text(username or "")
18+ builder.get_object("password_entry").set_text(password or "")
19
20 update_sensitivity(account_type)
21
22--
23cgit v0.9.0.2
24
250
=== removed file 'debian/patches/git_mpris_playlists.patch'
--- debian/patches/git_mpris_playlists.patch 2012-04-05 19:23:42 +0000
+++ debian/patches/git_mpris_playlists.patch 1970-01-01 00:00:00 +0000
@@ -1,118 +0,0 @@
1Index: rhythmbox-2.96/sources/rb-display-page-model.c
2===================================================================
3--- rhythmbox-2.96.orig/sources/rb-display-page-model.c 2012-03-10 11:22:26.000000000 +0100
4+++ rhythmbox-2.96/sources/rb-display-page-model.c 2012-04-05 21:22:35.725425083 +0200
5@@ -70,6 +70,7 @@
6 enum
7 {
8 DROP_RECEIVED,
9+ PAGE_INSERTED,
10 LAST_SIGNAL
11 };
12
13@@ -670,6 +671,7 @@
14 RB_DISPLAY_PAGE_MODEL_COLUMN_PLAYING, FALSE,
15 RB_DISPLAY_PAGE_MODEL_COLUMN_PAGE, page,
16 -1);
17+ g_signal_emit (G_OBJECT (page_model), rb_display_page_model_signals[PAGE_INSERTED], 0, page, &iter);
18
19 g_signal_connect_object (page, "notify::name", G_CALLBACK (page_notify_cb), page_model, 0);
20 g_signal_connect_object (page, "notify::visibility", G_CALLBACK (page_notify_cb), page_model, 0);
21@@ -872,6 +874,27 @@
22 3,
23 RB_TYPE_DISPLAY_PAGE, G_TYPE_INT, G_TYPE_POINTER);
24
25+ /**
26+ * RBDisplayPageModel::page-inserted:
27+ * @model: the #RBDisplayPageModel
28+ * @page: the #RBDisplayPage that was inserted
29+ * @iter: a #GtkTreeIter indicating the page position
30+ *
31+ * Emitted when a new page is inserted into the model.
32+ * Use this instead of GtkTreeModel::row-inserted as this
33+ * doesn't get complicated by visibility filtering.
34+ */
35+ rb_display_page_model_signals[PAGE_INSERTED] =
36+ g_signal_new ("page-inserted",
37+ G_OBJECT_CLASS_TYPE (object_class),
38+ G_SIGNAL_RUN_LAST,
39+ G_STRUCT_OFFSET (RBDisplayPageModelClass, page_inserted),
40+ NULL, NULL,
41+ NULL,
42+ G_TYPE_NONE,
43+ 2,
44+ RB_TYPE_DISPLAY_PAGE, GTK_TYPE_TREE_ITER);
45+
46 if (!drag_target_list) {
47 drag_target_list = gtk_target_list_new (dnd_targets, G_N_ELEMENTS (dnd_targets));
48 }
49Index: rhythmbox-2.96/sources/rb-display-page-model.h
50===================================================================
51--- rhythmbox-2.96.orig/sources/rb-display-page-model.h 2012-02-27 11:08:45.000000000 +0100
52+++ rhythmbox-2.96/sources/rb-display-page-model.h 2012-04-05 21:22:35.725425083 +0200
53@@ -67,6 +67,9 @@
54 RBDisplayPage *target,
55 GtkTreeViewDropPosition pos,
56 GtkSelectionData *data);
57+ void (*page_inserted) (RBDisplayPageModel *model,
58+ RBDisplayPage *page,
59+ GtkTreeIter *iter);
60 };
61
62 GType rb_display_page_model_get_type (void);
63Index: rhythmbox-2.96/plugins/mpris/rb-mpris-plugin.c
64===================================================================
65--- rhythmbox-2.96.orig/plugins/mpris/rb-mpris-plugin.c 2012-03-10 11:22:26.000000000 +0100
66+++ rhythmbox-2.96/plugins/mpris/rb-mpris-plugin.c 2012-04-05 21:22:35.729425083 +0200
67@@ -1346,14 +1346,9 @@
68 add_playlist_property_change (plugin, "PlaylistCount", g_variant_new_uint32 (plugin->playlist_count));
69 }
70
71-static gboolean
72-display_page_inserted_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, RBMprisPlugin *plugin)
73+static void
74+display_page_inserted_cb (RBDisplayPageModel *model, RBDisplayPage *page, GtkTreeIter *iter, RBMprisPlugin *plugin)
75 {
76- RBDisplayPage *page;
77-
78- gtk_tree_model_get (model, iter,
79- RB_DISPLAY_PAGE_MODEL_COLUMN_PAGE, &page,
80- -1);
81 if (RB_IS_PLAYLIST_SOURCE (page)) {
82 gboolean is_local;
83
84@@ -1371,11 +1366,19 @@
85 g_signal_connect_object (page, "deleted", G_CALLBACK (source_deleted_cb), plugin, 0);
86 }
87 }
88+}
89+
90+static gboolean
91+display_page_foreach_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, RBMprisPlugin *plugin)
92+{
93+ RBDisplayPage *page;
94+
95+ gtk_tree_model_get (model, iter, RB_DISPLAY_PAGE_MODEL_COLUMN_PAGE, &page, -1);
96+ display_page_inserted_cb (RB_DISPLAY_PAGE_MODEL (model), page, iter, plugin);
97
98 return FALSE;
99 }
100
101-
102 static void
103 name_acquired_cb (GDBusConnection *connection, const char *name, RBMprisPlugin *plugin)
104 {
105@@ -1499,11 +1502,11 @@
106 G_CALLBACK (elapsed_nano_changed_cb),
107 plugin, 0);
108 g_signal_connect_object (plugin->page_model,
109- "row-inserted",
110+ "page-inserted",
111 G_CALLBACK (display_page_inserted_cb),
112 plugin, 0);
113 gtk_tree_model_foreach (GTK_TREE_MODEL (plugin->page_model),
114- (GtkTreeModelForeachFunc) display_page_inserted_cb,
115+ (GtkTreeModelForeachFunc) display_page_foreach_cb,
116 plugin);
117
118 plugin->art_store = rb_ext_db_new ("album-art");
1190
=== removed file 'debian/patches/git_playlists_sync_segfault.patch'
--- debian/patches/git_playlists_sync_segfault.patch 2012-03-16 11:11:59 +0000
+++ debian/patches/git_playlists_sync_segfault.patch 1970-01-01 00:00:00 +0000
@@ -1,25 +0,0 @@
1From d6127eba18bf088f3a43a3a693cad8691b061d39 Mon Sep 17 00:00:00 2001
2From: Cole Robinson <crobinso@redhat.com>
3Date: Mon, 12 Mar 2012 23:10:31 +0000
4Subject: ipod: Fix segfault when syncing playlists (bz 661217)
5
6Signed-off-by: Cole Robinson <crobinso@redhat.com>
7---
8diff --git a/plugins/ipod/rb-ipod-static-playlist-source.c b/plugins/ipod/rb-ipod-static-playlist-source.c
9index 261c4c4..d389baa 100644
10--- a/plugins/ipod/rb-ipod-static-playlist-source.c
11+++ b/plugins/ipod/rb-ipod-static-playlist-source.c
12@@ -311,6 +311,10 @@ rb_ipod_static_playlist_source_dispose (GObject *object)
13 priv->ipod_source = NULL;
14 }
15 if (priv->ipod_db) {
16+ g_signal_handlers_disconnect_by_func (priv->ipod_db,
17+ G_CALLBACK (playlist_before_save),
18+ source);
19+
20 g_object_unref (priv->ipod_db);
21 priv->ipod_db = NULL;
22 }
23--
24cgit v0.9.0.2
25
260
=== modified file 'debian/patches/series'
--- debian/patches/series 2012-05-14 04:30:50 +0000
+++ debian/patches/series 2012-06-04 10:19:20 +0000
@@ -3,9 +3,3 @@
304_pause_button.patch304_pause_button.patch
405_hide_on_quit.patch405_hide_on_quit.patch
507_quicklists.patch507_quicklists.patch
6git_local_art_search_typo.patch
7git_magnatune_dialog_segfault.patch
8git_ipod_no_private_source.patch
9git_ipod_playlist_handler.patch
10git_playlists_sync_segfault.patch
11git_mpris_playlists.patch
126
=== modified file 'debian/rhythmbox-plugins.install'
--- debian/rhythmbox-plugins.install 2012-03-14 09:14:08 +0000
+++ debian/rhythmbox-plugins.install 2012-06-04 10:19:20 +0000
@@ -1,5 +1,3 @@
1usr/lib/rhythmbox/plugins/artdisplay
2usr/share/rhythmbox/plugins/artdisplay
3usr/lib/rhythmbox/plugins/artsearch1usr/lib/rhythmbox/plugins/artsearch
4usr/lib/rhythmbox/plugins/audioscrobbler2usr/lib/rhythmbox/plugins/audioscrobbler
5usr/share/rhythmbox/plugins/audioscrobbler3usr/share/rhythmbox/plugins/audioscrobbler
64
=== modified file 'debian/rhythmbox.gsettings-override'
--- debian/rhythmbox.gsettings-override 2011-12-16 12:45:30 +0000
+++ debian/rhythmbox.gsettings-override 2012-06-04 10:19:20 +0000
@@ -2,4 +2,4 @@
2monitor-library=true2monitor-library=true
33
4[org.gnome.rhythmbox.plugins]4[org.gnome.rhythmbox.plugins]
5active-plugins=['artdisplay','audiocd','audioscrobbler','cd-recorder','daap','dbus-media-server','generic-player','ipod','iradio','mmkeys','mpris','mtpdevice','notification','power-manager']5active-plugins=['audiocd','audioscrobbler','cd-recorder','daap','dbus-media-server','generic-player','ipod','iradio','mmkeys','mpris','mtpdevice','notification','power-manager']

Subscribers

People subscribed via source and target branches

to all changes: