Merge lp:~dobey/ubuntu/natty/banshee/u1ms-links into lp:ubuntu/natty/banshee

Proposed by dobey
Status: Merged
Merged at revision: 110
Proposed branch: lp:~dobey/ubuntu/natty/banshee/u1ms-links
Merge into: lp:ubuntu/natty/banshee
Diff against target: 203 lines (+119/-14)
6 files modified
data/desktop-files/banshee-1.desktop.mime (+1/-0)
debian/changelog (+7/-0)
debian/patches/0001-Add-support-for-u1ms-links.patch (+83/-0)
debian/patches/07_enable-u1ms-by-default.patch (+0/-13)
debian/patches/series (+1/-1)
src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore/UbuntuOneMusicStoreSource.cs (+27/-0)
To merge this branch: bzr merge lp:~dobey/ubuntu/natty/banshee/u1ms-links
Reviewer Review Type Date Requested Status
Ken VanDine Pending
Ubuntu branches Pending
Review via email: mp+51982@code.launchpad.net

Description of the change

* 0001-Add-support-for-u1ms-links.patch:
  - Handle u1ms:// links in the U1 Music Store (LP: #723960)

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 'data/desktop-files/banshee-1.desktop.mime'
2--- data/desktop-files/banshee-1.desktop.mime 2011-02-26 22:05:24 +0000
3+++ data/desktop-files/banshee-1.desktop.mime 2011-03-02 23:22:54 +0000
4@@ -135,3 +135,4 @@
5 video/x-theora
6 video/x-theora+ogg
7 x-scheme-handler/lastfm
8+x-scheme-handler/u1ms
9
10=== modified file 'debian/changelog'
11--- debian/changelog 2011-02-26 22:05:24 +0000
12+++ debian/changelog 2011-03-02 23:22:54 +0000
13@@ -1,3 +1,10 @@
14+banshee (1.9.4-1ubuntu2) natty; urgency=low
15+
16+ * 0001-Add-support-for-u1ms-links.patch:
17+ - Handle u1ms:// links in the U1 Music Store (LP: #723960)
18+
19+ -- Rodney Dawes <rodney.dawes@ubuntu.com> Mon, 28 Feb 2011 14:06:16 -0500
20+
21 banshee (1.9.4-1ubuntu1) natty; urgency=low
22
23 * Merge from Debian Experimental, remaining changes:
24
25=== added file 'debian/patches/0001-Add-support-for-u1ms-links.patch'
26--- debian/patches/0001-Add-support-for-u1ms-links.patch 1970-01-01 00:00:00 +0000
27+++ debian/patches/0001-Add-support-for-u1ms-links.patch 2011-03-02 23:22:54 +0000
28@@ -0,0 +1,83 @@
29+diff --git a/data/desktop-files/banshee-1.desktop.mime b/data/desktop-files/banshee-1.desktop.mime
30+index 0f26d00..653c099 100644
31+--- a/data/desktop-files/banshee-1.desktop.mime
32++++ b/data/desktop-files/banshee-1.desktop.mime
33+@@ -135,3 +135,4 @@ video/x-ogm+ogg
34+ video/x-theora
35+ video/x-theora+ogg
36+ x-scheme-handler/lastfm
37++x-scheme-handler/u1ms
38+diff --git a/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore.addin.xml b/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore.addin.xml
39+index 89bd3f5..8d4c911 100644
40+--- a/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore.addin.xml
41++++ b/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore.addin.xml
42+@@ -9,7 +9,7 @@
43+ description="This extension grants access to the Ubuntu One Music Store, powered by 7digital."
44+ author="Jo Shields"
45+ url="http://one.ubuntu.com/"
46+- defaultEnabled="false">
47++ defaultEnabled="true">
48+
49+ <Dependencies>
50+ <Addin id="Banshee.Services" version="1.0"/>
51+diff --git a/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore/UbuntuOneMusicStoreSource.cs b/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore/UbuntuOneMusicStoreSource.cs
52+index 260c384..4a9a4c6 100644
53+--- a/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore/UbuntuOneMusicStoreSource.cs
54++++ b/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore/UbuntuOneMusicStoreSource.cs
55+@@ -3,8 +3,10 @@
56+ //
57+ // Authors:
58+ // Jo Shields <directhex@apebox.org>
59++// Rodney Dawes <rodney.dawes@canonical.com>
60+ //
61+ // Copyright (C) 2010 Jo Shields
62++// Copyright (C) 2011 Canonical, Ltd.
63+ //
64+ // Permission is hereby granted, free of charge, to any person obtaining
65+ // a copy of this software and associated documentation files (the
66+@@ -28,6 +30,7 @@
67+
68+ using Mono.Unix;
69+ using Gdk;
70++using System;
71+
72+ using Hyena;
73+
74+@@ -51,6 +54,29 @@ namespace Banshee.UbuntuOneMusicStore
75+ sort_order, "ubuntu-one-music-store")
76+ {
77+ Properties.SetString ("Icon.Name", "ubuntuone");
78++
79++ // So we can handle u1ms:// URIs
80++ ServiceManager.Get<DBusCommandService> ().ArgumentPushed += OnCommandLineArgument;
81++ }
82++
83++ ~UbuntuOneMusicStoreSource ()
84++ {
85++ ServiceManager.Get<DBusCommandService> ().ArgumentPushed -= OnCommandLineArgument;
86++ }
87++
88++ private void OnCommandLineArgument (string uri, object value, bool isFile)
89++ {
90++ if (!isFile || String.IsNullOrEmpty (uri)) {
91++ return;
92++ }
93++
94++ Log.Debug ("U1MS: URI requested: ", uri);
95++ // Handle u1ms:// URIs
96++ if (uri.StartsWith ("u1ms://")) {
97++ string http_url = uri.Replace ("u1ms://", "http://");
98++ custom_view.Store.LoadStoreLink (http_url);
99++ ServiceManager.SourceManager.SetActiveSource (this);
100++ }
101+ }
102+
103+ // A count of 0 will be hidden in the source TreeView
104+@@ -127,6 +152,7 @@ namespace Banshee.UbuntuOneMusicStore
105+ public void ResetSource () { }
106+ public Gtk.Widget Widget { get { return store; } }
107+ public ISource Source { get { return null; } }
108++ public UbuntuOne.U1MusicStore Store { get { return store; } }
109+ }
110+ }
111+ }
112
113=== removed file 'debian/patches/07_enable-u1ms-by-default.patch'
114--- debian/patches/07_enable-u1ms-by-default.patch 2011-01-24 22:17:31 +0000
115+++ debian/patches/07_enable-u1ms-by-default.patch 1970-01-01 00:00:00 +0000
116@@ -1,13 +0,0 @@
117-Index: banshee/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore.addin.xml
118-===================================================================
119---- banshee.orig/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore.addin.xml 2011-01-13 18:05:17.677167517 +0800
120-+++ banshee/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore.addin.xml 2011-01-13 18:05:25.210458516 +0800
121-@@ -9,7 +9,7 @@
122- description="This extension grants access to the Ubuntu One Music Store, powered by 7digital."
123- author="Jo Shields"
124- url="http://one.ubuntu.com/"
125-- defaultEnabled="false">
126-+ defaultEnabled="true">
127-
128- <Dependencies>
129- <Addin id="Banshee.Services" version="1.0"/>
130
131=== modified file 'debian/patches/series'
132--- debian/patches/series 2011-02-26 22:05:24 +0000
133+++ debian/patches/series 2011-03-02 23:22:54 +0000
134@@ -8,7 +8,7 @@
135 07_enable-mpris-by-default.patch
136 07_disable-notification-area-by-default.patch
137 07_enable-soundmenu-by-default.patch
138-07_enable-u1ms-by-default.patch
139 08_remove_unrelevant_media.patch
140 0001-Revert-ArtworkManager-Cache-null-artwork-for-fast-lo.patch
141+0001-Add-support-for-u1ms-links.patch
142 99_ltmain_as-needed.patch
143
144=== modified file 'src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore/UbuntuOneMusicStoreSource.cs'
145--- src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore/UbuntuOneMusicStoreSource.cs 2011-02-20 14:48:54 +0000
146+++ src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore/UbuntuOneMusicStoreSource.cs 2011-03-02 23:22:54 +0000
147@@ -3,8 +3,10 @@
148 //
149 // Authors:
150 // Jo Shields <directhex@apebox.org>
151+// Rodney Dawes <rodney.dawes@canonical.com>
152 //
153 // Copyright (C) 2010 Jo Shields
154+// Copyright (C) 2011 Canonical, Ltd.
155 //
156 // Permission is hereby granted, free of charge, to any person obtaining
157 // a copy of this software and associated documentation files (the
158@@ -28,6 +30,7 @@
159
160 using Mono.Unix;
161 using Gdk;
162+using System;
163
164 using Hyena;
165
166@@ -51,6 +54,29 @@
167 sort_order, "ubuntu-one-music-store")
168 {
169 Properties.SetString ("Icon.Name", "ubuntuone");
170+
171+ // So we can handle u1ms:// URIs
172+ ServiceManager.Get<DBusCommandService> ().ArgumentPushed += OnCommandLineArgument;
173+ }
174+
175+ ~UbuntuOneMusicStoreSource ()
176+ {
177+ ServiceManager.Get<DBusCommandService> ().ArgumentPushed -= OnCommandLineArgument;
178+ }
179+
180+ private void OnCommandLineArgument (string uri, object value, bool isFile)
181+ {
182+ if (!isFile || String.IsNullOrEmpty (uri)) {
183+ return;
184+ }
185+
186+ Log.Debug ("U1MS: URI requested: ", uri);
187+ // Handle u1ms:// URIs
188+ if (uri.StartsWith ("u1ms://")) {
189+ string http_url = uri.Replace ("u1ms://", "http://");
190+ custom_view.Store.LoadStoreLink (http_url);
191+ ServiceManager.SourceManager.SetActiveSource (this);
192+ }
193 }
194
195 // A count of 0 will be hidden in the source TreeView
196@@ -127,6 +153,7 @@
197 public void ResetSource () { }
198 public Gtk.Widget Widget { get { return store; } }
199 public ISource Source { get { return null; } }
200+ public UbuntuOne.U1MusicStore Store { get { return store; } }
201 }
202 }
203 }

Subscribers

People subscribed via source and target branches

to all changes: