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
=== modified file 'data/desktop-files/banshee-1.desktop.mime'
--- data/desktop-files/banshee-1.desktop.mime 2011-02-26 22:05:24 +0000
+++ data/desktop-files/banshee-1.desktop.mime 2011-03-02 23:22:54 +0000
@@ -135,3 +135,4 @@
135video/x-theora135video/x-theora
136video/x-theora+ogg136video/x-theora+ogg
137x-scheme-handler/lastfm137x-scheme-handler/lastfm
138x-scheme-handler/u1ms
138139
=== modified file 'debian/changelog'
--- debian/changelog 2011-02-26 22:05:24 +0000
+++ debian/changelog 2011-03-02 23:22:54 +0000
@@ -1,3 +1,10 @@
1banshee (1.9.4-1ubuntu2) natty; urgency=low
2
3 * 0001-Add-support-for-u1ms-links.patch:
4 - Handle u1ms:// links in the U1 Music Store (LP: #723960)
5
6 -- Rodney Dawes <rodney.dawes@ubuntu.com> Mon, 28 Feb 2011 14:06:16 -0500
7
1banshee (1.9.4-1ubuntu1) natty; urgency=low8banshee (1.9.4-1ubuntu1) natty; urgency=low
29
3 * Merge from Debian Experimental, remaining changes:10 * Merge from Debian Experimental, remaining changes:
411
=== added file 'debian/patches/0001-Add-support-for-u1ms-links.patch'
--- debian/patches/0001-Add-support-for-u1ms-links.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/0001-Add-support-for-u1ms-links.patch 2011-03-02 23:22:54 +0000
@@ -0,0 +1,83 @@
1diff --git a/data/desktop-files/banshee-1.desktop.mime b/data/desktop-files/banshee-1.desktop.mime
2index 0f26d00..653c099 100644
3--- a/data/desktop-files/banshee-1.desktop.mime
4+++ b/data/desktop-files/banshee-1.desktop.mime
5@@ -135,3 +135,4 @@ video/x-ogm+ogg
6 video/x-theora
7 video/x-theora+ogg
8 x-scheme-handler/lastfm
9+x-scheme-handler/u1ms
10diff --git a/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore.addin.xml b/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore.addin.xml
11index 89bd3f5..8d4c911 100644
12--- a/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore.addin.xml
13+++ b/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore.addin.xml
14@@ -9,7 +9,7 @@
15 description="This extension grants access to the Ubuntu One Music Store, powered by 7digital."
16 author="Jo Shields"
17 url="http://one.ubuntu.com/"
18- defaultEnabled="false">
19+ defaultEnabled="true">
20
21 <Dependencies>
22 <Addin id="Banshee.Services" version="1.0"/>
23diff --git a/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore/UbuntuOneMusicStoreSource.cs b/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore/UbuntuOneMusicStoreSource.cs
24index 260c384..4a9a4c6 100644
25--- a/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore/UbuntuOneMusicStoreSource.cs
26+++ b/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore/UbuntuOneMusicStoreSource.cs
27@@ -3,8 +3,10 @@
28 //
29 // Authors:
30 // Jo Shields <directhex@apebox.org>
31+// Rodney Dawes <rodney.dawes@canonical.com>
32 //
33 // Copyright (C) 2010 Jo Shields
34+// Copyright (C) 2011 Canonical, Ltd.
35 //
36 // Permission is hereby granted, free of charge, to any person obtaining
37 // a copy of this software and associated documentation files (the
38@@ -28,6 +30,7 @@
39
40 using Mono.Unix;
41 using Gdk;
42+using System;
43
44 using Hyena;
45
46@@ -51,6 +54,29 @@ namespace Banshee.UbuntuOneMusicStore
47 sort_order, "ubuntu-one-music-store")
48 {
49 Properties.SetString ("Icon.Name", "ubuntuone");
50+
51+ // So we can handle u1ms:// URIs
52+ ServiceManager.Get<DBusCommandService> ().ArgumentPushed += OnCommandLineArgument;
53+ }
54+
55+ ~UbuntuOneMusicStoreSource ()
56+ {
57+ ServiceManager.Get<DBusCommandService> ().ArgumentPushed -= OnCommandLineArgument;
58+ }
59+
60+ private void OnCommandLineArgument (string uri, object value, bool isFile)
61+ {
62+ if (!isFile || String.IsNullOrEmpty (uri)) {
63+ return;
64+ }
65+
66+ Log.Debug ("U1MS: URI requested: ", uri);
67+ // Handle u1ms:// URIs
68+ if (uri.StartsWith ("u1ms://")) {
69+ string http_url = uri.Replace ("u1ms://", "http://");
70+ custom_view.Store.LoadStoreLink (http_url);
71+ ServiceManager.SourceManager.SetActiveSource (this);
72+ }
73 }
74
75 // A count of 0 will be hidden in the source TreeView
76@@ -127,6 +152,7 @@ namespace Banshee.UbuntuOneMusicStore
77 public void ResetSource () { }
78 public Gtk.Widget Widget { get { return store; } }
79 public ISource Source { get { return null; } }
80+ public UbuntuOne.U1MusicStore Store { get { return store; } }
81 }
82 }
83 }
084
=== removed file 'debian/patches/07_enable-u1ms-by-default.patch'
--- debian/patches/07_enable-u1ms-by-default.patch 2011-01-24 22:17:31 +0000
+++ debian/patches/07_enable-u1ms-by-default.patch 1970-01-01 00:00:00 +0000
@@ -1,13 +0,0 @@
1Index: banshee/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore.addin.xml
2===================================================================
3--- banshee.orig/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore.addin.xml 2011-01-13 18:05:17.677167517 +0800
4+++ banshee/src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore.addin.xml 2011-01-13 18:05:25.210458516 +0800
5@@ -9,7 +9,7 @@
6 description="This extension grants access to the Ubuntu One Music Store, powered by 7digital."
7 author="Jo Shields"
8 url="http://one.ubuntu.com/"
9- defaultEnabled="false">
10+ defaultEnabled="true">
11
12 <Dependencies>
13 <Addin id="Banshee.Services" version="1.0"/>
140
=== modified file 'debian/patches/series'
--- debian/patches/series 2011-02-26 22:05:24 +0000
+++ debian/patches/series 2011-03-02 23:22:54 +0000
@@ -8,7 +8,7 @@
807_enable-mpris-by-default.patch807_enable-mpris-by-default.patch
907_disable-notification-area-by-default.patch907_disable-notification-area-by-default.patch
1007_enable-soundmenu-by-default.patch1007_enable-soundmenu-by-default.patch
1107_enable-u1ms-by-default.patch
1208_remove_unrelevant_media.patch1108_remove_unrelevant_media.patch
130001-Revert-ArtworkManager-Cache-null-artwork-for-fast-lo.patch120001-Revert-ArtworkManager-Cache-null-artwork-for-fast-lo.patch
130001-Add-support-for-u1ms-links.patch
1499_ltmain_as-needed.patch1499_ltmain_as-needed.patch
1515
=== modified file 'src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore/UbuntuOneMusicStoreSource.cs'
--- src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore/UbuntuOneMusicStoreSource.cs 2011-02-20 14:48:54 +0000
+++ src/Extensions/Banshee.UbuntuOneMusicStore/Banshee.UbuntuOneMusicStore/UbuntuOneMusicStoreSource.cs 2011-03-02 23:22:54 +0000
@@ -3,8 +3,10 @@
3//3//
4// Authors:4// Authors:
5// Jo Shields <directhex@apebox.org>5// Jo Shields <directhex@apebox.org>
6// Rodney Dawes <rodney.dawes@canonical.com>
6//7//
7// Copyright (C) 2010 Jo Shields8// Copyright (C) 2010 Jo Shields
9// Copyright (C) 2011 Canonical, Ltd.
8//10//
9// Permission is hereby granted, free of charge, to any person obtaining11// Permission is hereby granted, free of charge, to any person obtaining
10// a copy of this software and associated documentation files (the12// a copy of this software and associated documentation files (the
@@ -28,6 +30,7 @@
2830
29using Mono.Unix;31using Mono.Unix;
30using Gdk;32using Gdk;
33using System;
3134
32using Hyena;35using Hyena;
3336
@@ -51,6 +54,29 @@
51 sort_order, "ubuntu-one-music-store")54 sort_order, "ubuntu-one-music-store")
52 {55 {
53 Properties.SetString ("Icon.Name", "ubuntuone");56 Properties.SetString ("Icon.Name", "ubuntuone");
57
58 // So we can handle u1ms:// URIs
59 ServiceManager.Get<DBusCommandService> ().ArgumentPushed += OnCommandLineArgument;
60 }
61
62 ~UbuntuOneMusicStoreSource ()
63 {
64 ServiceManager.Get<DBusCommandService> ().ArgumentPushed -= OnCommandLineArgument;
65 }
66
67 private void OnCommandLineArgument (string uri, object value, bool isFile)
68 {
69 if (!isFile || String.IsNullOrEmpty (uri)) {
70 return;
71 }
72
73 Log.Debug ("U1MS: URI requested: ", uri);
74 // Handle u1ms:// URIs
75 if (uri.StartsWith ("u1ms://")) {
76 string http_url = uri.Replace ("u1ms://", "http://");
77 custom_view.Store.LoadStoreLink (http_url);
78 ServiceManager.SourceManager.SetActiveSource (this);
79 }
54 }80 }
5581
56 // A count of 0 will be hidden in the source TreeView82 // A count of 0 will be hidden in the source TreeView
@@ -127,6 +153,7 @@
127 public void ResetSource () { }153 public void ResetSource () { }
128 public Gtk.Widget Widget { get { return store; } }154 public Gtk.Widget Widget { get { return store; } }
129 public ISource Source { get { return null; } }155 public ISource Source { get { return null; } }
156 public UbuntuOne.U1MusicStore Store { get { return store; } }
130 }157 }
131 }158 }
132}159}

Subscribers

People subscribed via source and target branches

to all changes: