Merge lp:~victored/noise/fixes into lp:~elementary-apps/noise/trunk
- fixes
- Merge into trunk
Proposed by
Victor Martinez
Status: | Merged | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Merged at revision: | 947 | ||||||||||||||||||||
Proposed branch: | lp:~victored/noise/fixes | ||||||||||||||||||||
Merge into: | lp:~elementary-apps/noise/trunk | ||||||||||||||||||||
Diff against target: |
16277 lines (+3358/-10410) 81 files modified
CMakeLists.txt (+16/-18) core/Player.vala (+1/-1) plugins/LastFM/AlbumInfo.vala (+5/-5) plugins/LastFM/ArtistInfo.vala (+8/-9) plugins/LastFM/CMakeLists.txt (+5/-3) plugins/LastFM/Core.vala (+7/-4) plugins/LastFM/Icons.vala (+2/-2) plugins/LastFM/LastFM.vala (+1/-1) plugins/LastFM/SimilarMediaWidget.vala (+2/-2) plugins/LastFM/SimilarViewWrapper.vala (+9/-8) plugins/LastFM/TrackInfo.vala (+1/-2) plugins/LastFM/schemas/CMakeLists.txt (+0/-1) plugins/MPRIS/MPRIS.vala (+5/-5) plugins/internet-radio/RadioListView.vala (+0/-538) plugins/internet-radio/StationEditor.vala (+0/-234) plugins/internet-radio/internet-radio.svg (+0/-531) plugins/podcasts/CMakeLists.txt (+0/-30) plugins/podcasts/icons/library-podcast.svg (+0/-725) plugins/podcasts/icons/podcast-new.svg (+0/-148) plugins/podcasts/podcasts.plugin (+0/-10) plugins/podcasts/src/AddPodcastWindow.vala (+0/-209) plugins/podcasts/src/PodcastEditor.vala (+0/-273) plugins/podcasts/src/PodcastManager.vala (+0/-452) plugins/podcasts/src/Podcasts.vala (+0/-17) plugins/podcasts/src/View/PodcastListView.vala (+0/-841) plugins/store/Artist.vala (+0/-196) plugins/store/Basket.vala (+0/-36) plugins/store/BasketItem.vala (+0/-37) plugins/store/FormatTag.vala (+0/-35) plugins/store/Label.vala (+0/-47) plugins/store/Price.vala (+0/-39) plugins/store/Release.vala (+0/-156) plugins/store/SearchResult.vala (+0/-28) plugins/store/Store.vala (+0/-556) plugins/store/Track.vala (+0/-78) plugins/store/Widgets/AlbumView.vala (+0/-366) plugins/store/Widgets/ArtistView.vala (+0/-211) plugins/store/Widgets/HomeView.vala (+0/-235) plugins/store/Widgets/IconView.vala (+0/-131) plugins/store/Widgets/ObjectList.vala (+0/-121) plugins/store/Widgets/ReleaseRotator.vala (+0/-134) plugins/store/Widgets/SearchList.vala (+0/-252) plugins/store/Widgets/SearchResultsPage.vala (+0/-113) plugins/store/Widgets/StoreView.vala (+0/-169) plugins/store/Widgets/TagGroup.vala (+0/-115) plugins/store/Widgets/TagLabel.vala (+0/-112) plugins/store/Widgets/TrackList.vala (+0/-135) plugins/store/XMLParser.vala (+0/-270) po/CMakeLists.txt (+2/-2) po/noise.pot (+209/-202) src/CMakeLists.txt (+10/-7) src/Dialogs/FileNotFoundDialog.vala (+2/-1) src/Dialogs/MediaEditor.vala (+1/-1) src/Dialogs/PlaylistNameWindow.vala (+15/-8) src/Dialogs/SmartPlaylistEditor.vala (+5/-0) src/Icons.vala (+79/-79) src/LibraryManager.vala (+914/-916) src/LibraryWindow.vala (+82/-114) src/Objects/MediaArtCache.vala (+18/-7) src/PlaybackManager.vala (+588/-599) src/Utils/Search.vala (+134/-79) src/Views/ListView/ListView.vala (+9/-6) src/Views/ListView/Lists/CellDataFunctionHelper.vala (+181/-158) src/Views/ListView/Lists/GenericList.vala (+200/-157) src/Views/ListView/Lists/MusicListView.vala (+1/-1) src/Views/ListView/Lists/TreeViewColumnSizer.vala (+259/-0) src/Views/ListView/Lists/TreeViewSetup.vala (+2/-2) src/Views/Wrappers/DeviceViewWrapper.vala (+7/-4) src/Views/Wrappers/HistoryViewWrapper.vala (+6/-2) src/Views/Wrappers/MusicViewWrapper.vala (+9/-2) src/Views/Wrappers/NetworkDeviceViewWrapper.vala (+2/-0) src/Views/Wrappers/PlaylistViewWrapper.vala (+35/-25) src/Views/Wrappers/QueueViewWrapper.vala (+19/-20) src/Views/Wrappers/ViewWrapper.vala (+97/-99) src/Widgets/RatingWidget.vala (+4/-4) src/Widgets/SideTreeView.vala (+15/-116) src/Widgets/SidebarPaned.vala (+42/-12) src/Widgets/SimpleOptionChooser.vala (+19/-22) src/Widgets/StatusBar.vala (+210/-122) src/Widgets/ViewSelector.vala (+120/-0) vapi/CMakeLists.txt (+0/-2) |
||||||||||||||||||||
To merge this branch: | bzr merge lp:~victored/noise/fixes | ||||||||||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Victor Martinez (community) | Approve | ||
Review via email: mp+120327@code.launchpad.net |
Commit message
Description of the change
Fixes lots of small bugs. Most notably, it introduces the following:
1) Smart column autosizer
2) Column-spacing fixes
3) Improved search
4) Small fixes on Last.fm plugin
5) Statusbar re-write
To post a comment you must log in.
Revision history for this message
Victor Martinez (victored) : | # |
review:
Approve
lp:~victored/noise/fixes
updated
- 947. By Victor Martinez
-
Merge fixes branch
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'CMakeLists.txt' |
2 | --- CMakeLists.txt 2012-08-12 18:38:20 +0000 |
3 | +++ CMakeLists.txt 2012-08-20 04:39:20 +0000 |
4 | @@ -1,9 +1,9 @@ |
5 | # check http://elementaryos.org/docs/developer-guide/cmake/simple-project |
6 | |
7 | -cmake_minimum_required (VERSION 2.6) |
8 | +cmake_minimum_required(VERSION 2.6) |
9 | cmake_policy(VERSION 2.6) |
10 | project(noise) |
11 | -list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ) |
12 | +list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) |
13 | |
14 | find_package(PkgConfig) |
15 | pkg_check_modules(DEPS |
16 | @@ -19,7 +19,7 @@ |
17 | taglib_c #TODO: remove |
18 | gio-2.0 |
19 | libxml-2.0 |
20 | - libnotify |
21 | + libnotify # TODO: should be a soft dependency |
22 | libsoup-2.4 |
23 | json-glib-1.0 |
24 | gio-unix-2.0 |
25 | @@ -32,19 +32,19 @@ |
26 | if(${SQLHEAVY2_FOUND}) |
27 | set(ADD_PKG ${ADD_PKG} sqlheavy-0.2) |
28 | message("-- Will use sqlheavy-0.2") |
29 | - set (SQLHEAVY_CFLAGS ${SQLHEAVY2_CFLAGS}) |
30 | - set (SQLHEAVY_LIBRARY_DIRS ${SQLHEAVY2_LIBRARY_DIRS}) |
31 | - set (SQLHEAVY_LIBRARIES ${SQLHEAVY2_LIBRARIES}) |
32 | + set(SQLHEAVY_CFLAGS ${SQLHEAVY2_CFLAGS}) |
33 | + set(SQLHEAVY_LIBRARY_DIRS ${SQLHEAVY2_LIBRARY_DIRS}) |
34 | + set(SQLHEAVY_LIBRARIES ${SQLHEAVY2_LIBRARIES}) |
35 | else() |
36 | - pkg_check_modules (SQLHEAVY REQUIRED sqlheavy-0.1) |
37 | + pkg_check_modules(SQLHEAVY REQUIRED sqlheavy-0.1) |
38 | set(ADD_PKG ${ADD_PKG} sqlheavy-0.1) |
39 | message("-- Will use sqlheavy-0.1") |
40 | endif() |
41 | |
42 | |
43 | -set (NORMAL_CFLAGS ${DEPS_CFLAGS} ${SQLHEAVY_CFLAGS}) |
44 | -set (NORMAL_LIBRARIES ${DEPS_LIBRARIES} ${SQLHEAVY_LIBRARIES}) |
45 | -set (NORMAL_LINK_DIRS ${DEPS_LIBRARY_DIRS} ${SQLHEAVY_LIBRARY_DIRS}) |
46 | +set(NORMAL_CFLAGS ${DEPS_CFLAGS} ${SQLHEAVY_CFLAGS}) |
47 | +set(NORMAL_LIBRARIES ${DEPS_LIBRARIES} ${SQLHEAVY_LIBRARIES}) |
48 | +set(NORMAL_LINK_DIRS ${DEPS_LIBRARY_DIRS} ${SQLHEAVY_LIBRARY_DIRS}) |
49 | |
50 | |
51 | find_package(Vala REQUIRED) |
52 | @@ -55,7 +55,7 @@ |
53 | set(DATADIR "${CMAKE_INSTALL_PREFIX}/share") |
54 | set(PKG_DATADIR "${CMAKE_INSTALL_PREFIX}/share/noise") |
55 | set(GETTEXT_PACKAGE "noise") |
56 | -set(RELEASE_NAME "Luna") |
57 | +set(RELEASE_NAME "Luna-Beta-1") |
58 | set(VERSION "1.0") |
59 | set(VERSION_INFO "Pre-Release") |
60 | set(PLUGIN_DIR "${CMAKE_INSTALL_PREFIX}/lib/noise/plugins") |
61 | @@ -63,19 +63,17 @@ |
62 | configure_file(${CMAKE_SOURCE_DIR}/src/config.vala.cmake ${CMAKE_SOURCE_DIR}/src/config.vala) |
63 | add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\") |
64 | |
65 | -add_subdirectory(vapi) |
66 | add_subdirectory(core) |
67 | add_subdirectory(src) |
68 | add_subdirectory(data) |
69 | add_subdirectory(schemas) |
70 | +add_subdirectory(po) |
71 | +add_subdirectory(images) |
72 | |
73 | -option (BUILD_PLUGINS "Whether to build plugins or not." ON) |
74 | -if (BUILD_PLUGINS) |
75 | +option(BUILD_PLUGINS "Whether to build plugins or not." ON) |
76 | +if(BUILD_PLUGINS) |
77 | message("-- Plugins will be built") |
78 | add_subdirectory(plugins) |
79 | else() |
80 | message("-- Plugins will NOT be built") |
81 | -endif () |
82 | - |
83 | -add_subdirectory(po) |
84 | -add_subdirectory(images) |
85 | +endif() |
86 | |
87 | === modified file 'core/Player.vala' |
88 | --- core/Player.vala 2012-08-12 00:28:56 +0000 |
89 | +++ core/Player.vala 2012-08-20 04:39:20 +0000 |
90 | @@ -28,7 +28,7 @@ |
91 | * Authored by: Victor Eduardo <victoreduardm@gmail.com> |
92 | */ |
93 | |
94 | -public interface Noise.Player { |
95 | +public interface Noise.Player : Object { |
96 | |
97 | public enum Shuffle { |
98 | OFF, |
99 | |
100 | === modified file 'plugins/LastFM/AlbumInfo.vala' |
101 | --- plugins/LastFM/AlbumInfo.vala 2012-07-26 17:29:26 +0000 |
102 | +++ plugins/LastFM/AlbumInfo.vala 2012-08-20 04:39:20 +0000 |
103 | @@ -29,17 +29,15 @@ |
104 | |
105 | private string url { get; set; default=""; } |
106 | |
107 | - private Gee.ArrayList<LastFM.Tag> _tags; |
108 | + private Gee.ArrayList<LastFM.Tag> _tags = new Gee.ArrayList<LastFM.Tag>(); |
109 | |
110 | private LastFM.Tag tagToAdd; |
111 | |
112 | - public LastFM.Image url_image; |
113 | + public LastFM.Image url_image = new LastFM.Image(); |
114 | |
115 | //public signal void album_info_retrieved(LastFM.AlbumInfo info); |
116 | |
117 | public AlbumInfo() { |
118 | - _tags = new Gee.ArrayList<LastFM.Tag>(); |
119 | - url_image = new LastFM.Image(); |
120 | } |
121 | |
122 | public AlbumInfo.with_info(string artist, string album) { |
123 | @@ -131,7 +129,9 @@ |
124 | if(iter->get_prop("size") == "large") { |
125 | url_image = new LastFM.Image.with_url(node_content, true); |
126 | url_image.set_size(500, 500); |
127 | - image_uri = this.get_image_uri_from_pixbuf(url_image.image); |
128 | + |
129 | + if (url_image.image != null) |
130 | + image_uri = this.get_image_uri_from_pixbuf(url_image.image); |
131 | } |
132 | } |
133 | } |
134 | |
135 | === modified file 'plugins/LastFM/ArtistInfo.vala' |
136 | --- plugins/LastFM/ArtistInfo.vala 2012-07-26 17:29:26 +0000 |
137 | +++ plugins/LastFM/ArtistInfo.vala 2012-08-20 04:39:20 +0000 |
138 | @@ -30,10 +30,10 @@ |
139 | public string url;// last fm url |
140 | public int streamable; // 1 = true |
141 | |
142 | - public LastFM.Image url_image; |
143 | + public LastFM.Image url_image = new LastFM.Image(); |
144 | |
145 | - public Gee.ArrayList<LastFM.Tag> tags; |
146 | - public Gee.ArrayList<LastFM.ArtistInfo> similarArtists; |
147 | + public Gee.ArrayList<LastFM.Tag> tags = new Gee.ArrayList<LastFM.Tag>(); |
148 | + public Gee.ArrayList<LastFM.ArtistInfo> similarArtists = new Gee.ArrayList<LastFM.ArtistInfo>(); |
149 | |
150 | //public signal void artist_info_retrieved(LastFM.ArtistInfo info); |
151 | |
152 | @@ -41,12 +41,10 @@ |
153 | ArtistInfo similarToAdd; |
154 | Tag tagToAdd; |
155 | |
156 | - public ArtistInfo() { |
157 | - tags = new Gee.ArrayList<LastFM.Tag>(); |
158 | - similarArtists = new Gee.ArrayList<LastFM.ArtistInfo>(); |
159 | - url_image = new LastFM.Image(); |
160 | + public ArtistInfo () { |
161 | + // nothing to do |
162 | } |
163 | - |
164 | + |
165 | public ArtistInfo.with_artist(string artist) { |
166 | var artist_fixed = LastFM.Core.fix_for_url(artist); |
167 | |
168 | @@ -125,7 +123,8 @@ |
169 | if(iter->get_prop("size") == "extralarge") { |
170 | url_image = new LastFM.Image.with_url(node_content, true); |
171 | url_image.set_size(200, 300); |
172 | - image_uri = this.get_image_uri_from_pixbuf(url_image.image); |
173 | + if (url_image.image != null) |
174 | + image_uri = this.get_image_uri_from_pixbuf(url_image.image); |
175 | } |
176 | } |
177 | } |
178 | |
179 | === modified file 'plugins/LastFM/CMakeLists.txt' |
180 | --- plugins/LastFM/CMakeLists.txt 2012-08-12 18:38:20 +0000 |
181 | +++ plugins/LastFM/CMakeLists.txt 2012-08-20 04:39:20 +0000 |
182 | @@ -1,6 +1,3 @@ |
183 | -add_definitions(${NORMAL_CFLAGS}) |
184 | -include_directories(${CMAKE_BINARY_DIR}/core ${CMAKE_BINARY_DIR}/src) |
185 | -link_directories(${NORMAL_LINK_DIRS}) |
186 | vala_precompile(VALA_C |
187 | LastFM.vala |
188 | Core.vala |
189 | @@ -41,8 +38,13 @@ |
190 | --vapidir=${CMAKE_BINARY_DIR}/core/ |
191 | --vapidir=${CMAKE_BINARY_DIR}/src/ |
192 | ) |
193 | + |
194 | add_library(lastfm MODULE ${VALA_C}) |
195 | |
196 | +add_definitions(${NORMAL_CFLAGS}) |
197 | +include_directories(${CMAKE_BINARY_DIR}/core ${CMAKE_BINARY_DIR}/src) |
198 | +link_directories(${NORMAL_LINK_DIRS}) |
199 | + |
200 | target_link_libraries (lastfm ${NORMAL_LIBRARIES}) |
201 | install(TARGETS lastfm DESTINATION ${PLUGIN_DIR}/LastFM/) |
202 | install(FILES lastfm.plugin DESTINATION ${PLUGIN_DIR}/LastFM/) |
203 | |
204 | === modified file 'plugins/LastFM/Core.vala' |
205 | --- plugins/LastFM/Core.vala 2012-08-12 14:25:41 +0000 |
206 | +++ plugins/LastFM/Core.vala 2012-08-20 04:39:20 +0000 |
207 | @@ -333,7 +333,8 @@ |
208 | |
209 | void* track_thread_function () { |
210 | var current_media = Noise.App.player.media_info.media; |
211 | - return_val_if_fail (current_media != null, null); |
212 | + if (current_media == null) |
213 | + return null; |
214 | |
215 | string album_artist_s = current_media.album_artist; |
216 | string track_s = current_media.title; |
217 | @@ -370,7 +371,8 @@ |
218 | void* album_thread_function () { |
219 | |
220 | var current_media = Noise.App.player.media_info.media; |
221 | - return_val_if_fail (current_media != null, null); |
222 | + if (current_media == null) |
223 | + return null; |
224 | |
225 | string album_artist_s = current_media.album_artist; |
226 | string album_s = current_media.album; |
227 | @@ -403,7 +405,7 @@ |
228 | if (coverart_cache.has_image (current_media)) |
229 | return null; |
230 | |
231 | - if (album.url_image.url != null) { |
232 | + if (album.url_image != null && album.url_image.url != null) { |
233 | message ("Caching last.fm image from URL: %s", album.url_image.url); |
234 | |
235 | fetch_info_guard.lock (); |
236 | @@ -431,7 +433,8 @@ |
237 | |
238 | void* artist_thread_function () { |
239 | var current_media = Noise.App.player.media_info.media; |
240 | - return_val_if_fail (current_media != null, null); |
241 | + if (current_media == null) |
242 | + return null; |
243 | |
244 | string album_artist_s = current_media.album_artist; |
245 | if (album_artist_s == "") |
246 | |
247 | === modified file 'plugins/LastFM/Icons.vala' |
248 | --- plugins/LastFM/Icons.vala 2012-08-12 18:38:20 +0000 |
249 | +++ plugins/LastFM/Icons.vala 2012-08-20 04:39:20 +0000 |
250 | @@ -29,7 +29,7 @@ |
251 | * A place to store icon information and pixbufs. |
252 | */ |
253 | |
254 | -namespace Icons { |
255 | +namespace LastFM.Icons { |
256 | |
257 | public Noise.Icon LASTFM_LOVE; |
258 | public Noise.Icon LASTFM_BAN; |
259 | @@ -37,7 +37,7 @@ |
260 | /** |
261 | * Loads icon information and renders [preloaded] pixbufs |
262 | **/ |
263 | - public void init_lastfm () { |
264 | + public void init () { |
265 | LASTFM_LOVE = new Noise.Icon ("lastfm-love", 16, Noise.Icon.Category.ACTION, null, true); |
266 | LASTFM_BAN = new Noise.Icon ("lastfm-ban", 16, Noise.Icon.Category.ACTION, null, true); |
267 | } |
268 | |
269 | === modified file 'plugins/LastFM/LastFM.vala' |
270 | --- plugins/LastFM/LastFM.vala 2012-08-12 21:18:02 +0000 |
271 | +++ plugins/LastFM/LastFM.vala 2012-08-20 04:39:20 +0000 |
272 | @@ -54,7 +54,7 @@ |
273 | |
274 | plugins.register_function(Interface.Hook.WINDOW, () => { |
275 | lm = ((Noise.App)plugins.noise_app).library_manager; |
276 | - Icons.init_lastfm (); |
277 | + LastFM.Icons.init (); |
278 | |
279 | // Add Similar playlist. |
280 | core = new LastFM.Core (lm); |
281 | |
282 | === modified file 'plugins/LastFM/SimilarMediaWidget.vala' |
283 | --- plugins/LastFM/SimilarMediaWidget.vala 2012-08-12 14:25:41 +0000 |
284 | +++ plugins/LastFM/SimilarMediaWidget.vala 2012-08-20 04:39:20 +0000 |
285 | @@ -60,10 +60,10 @@ |
286 | }); |
287 | |
288 | love_button = new Gtk.Button (); |
289 | - love_button.set_image (Icons.LASTFM_LOVE.render_image (Gtk.IconSize.MENU)); |
290 | + love_button.set_image (LastFM.Icons.LASTFM_LOVE.render_image (Gtk.IconSize.MENU)); |
291 | love_button.halign = Gtk.Align.CENTER; |
292 | ban_button = new Gtk.Button (); |
293 | - ban_button.set_image (Icons.LASTFM_BAN.render_image (Gtk.IconSize.MENU)); |
294 | + ban_button.set_image (LastFM.Icons.LASTFM_BAN.render_image (Gtk.IconSize.MENU)); |
295 | ban_button.halign = Gtk.Align.CENTER; |
296 | |
297 | var buttons = new Gtk.ButtonBox (Gtk.Orientation.HORIZONTAL); |
298 | |
299 | === modified file 'plugins/LastFM/SimilarViewWrapper.vala' |
300 | --- plugins/LastFM/SimilarViewWrapper.vala 2012-08-12 14:25:41 +0000 |
301 | +++ plugins/LastFM/SimilarViewWrapper.vala 2012-08-20 04:39:20 +0000 |
302 | @@ -43,10 +43,11 @@ |
303 | |
304 | list_view = new ListView (this, lw.library_manager.similar_setup); |
305 | embedded_alert = new Granite.Widgets.EmbeddedAlert(); |
306 | - set_default_alert (); |
307 | |
308 | // Refresh view layout |
309 | pack_views (); |
310 | + |
311 | + set_default_alert (); |
312 | } |
313 | |
314 | /** |
315 | @@ -124,8 +125,7 @@ |
316 | |
317 | if (base_media != null) { |
318 | /* say we could not find similar media */ |
319 | - embedded_alert.set_alert (_("No similar songs found"), _("%s could not find songs similar to %s by %s in your library. Make sure all song info is correct and you are connected to the Internet. Some songs may not have matches.").printf (String.escape (App.instance.get_name ()), "<b>" + String.escape (base_media.title) + "</b>", "<b>" + String.escape (base_media.artist) + "</b>"), null, true, Gtk.MessageType.INFO); |
320 | - embedded_alert.working = false; |
321 | + set_no_media_alert (); |
322 | } |
323 | |
324 | /* Show the alert box */ |
325 | @@ -134,12 +134,13 @@ |
326 | return false; |
327 | } |
328 | |
329 | - private inline void set_default_alert () { |
330 | - if (!has_embedded_alert) |
331 | - return; |
332 | + protected override void set_no_media_alert () { |
333 | + embedded_alert.set_alert (_("No similar songs found"), _("%s could not find songs similar to %s by %s in your library. Make sure all song info is correct and you are connected to the Internet. Some songs may not have matches.").printf (String.escape (App.instance.get_name ()), "<b>" + String.escape (base_media.title) + "</b>", "<b>" + String.escape (base_media.artist) + "</b>"), null, true, Gtk.MessageType.INFO); |
334 | + embedded_alert.working = false; |
335 | + } |
336 | |
337 | - embedded_alert.set_alert (_("Similar Song View"), _("In this view, %s will automatically find songs similar to the one you're playing. You can then start playing those songs, or save them as a playlist for later.").printf (String.escape (App.instance.get_name ())), null, true, Gtk.MessageType.INFO); |
338 | + private void set_default_alert () { |
339 | +embedded_alert.set_alert (_("Similar Song View"), _("In this view, %s will automatically find songs similar to the one you're playing. You can then start playing those songs, or save them as a playlist for later.").printf (String.escape (App.instance.get_name ())), null, true, Gtk.MessageType.INFO); |
340 | embedded_alert.working = false; |
341 | } |
342 | } |
343 | - |
344 | |
345 | === modified file 'plugins/LastFM/TrackInfo.vala' |
346 | --- plugins/LastFM/TrackInfo.vala 2012-07-26 17:29:26 +0000 |
347 | +++ plugins/LastFM/TrackInfo.vala 2012-08-20 04:39:20 +0000 |
348 | @@ -31,13 +31,12 @@ |
349 | public string url { get; set; default = ""; } |
350 | public int streamable { get; set; default = 0; } |
351 | |
352 | - private Gee.ArrayList<LastFM.Tag> _tags; |
353 | + private Gee.ArrayList<LastFM.Tag> _tags = new Gee.ArrayList<LastFM.Tag>(); |
354 | private LastFM.Tag tagToAdd; |
355 | |
356 | //public signal void track_info_retrieved(LastFM.TrackInfo info); |
357 | |
358 | public TrackInfo.basic() { |
359 | - _tags = new Gee.ArrayList<LastFM.Tag>(); |
360 | } |
361 | |
362 | public TrackInfo.with_info(string artist, string track) { |
363 | |
364 | === modified file 'plugins/LastFM/schemas/CMakeLists.txt' |
365 | --- plugins/LastFM/schemas/CMakeLists.txt 2012-06-29 18:15:08 +0000 |
366 | +++ plugins/LastFM/schemas/CMakeLists.txt 2012-08-20 04:39:20 +0000 |
367 | @@ -1,2 +1,1 @@ |
368 | -include(GSettings) |
369 | add_schema("org.pantheon.noise.LastFM.gschema.xml") |
370 | |
371 | === modified file 'plugins/MPRIS/MPRIS.vala' |
372 | --- plugins/MPRIS/MPRIS.vala 2012-08-12 18:37:45 +0000 |
373 | +++ plugins/MPRIS/MPRIS.vala 2012-08-20 04:39:20 +0000 |
374 | @@ -309,20 +309,20 @@ |
375 | |
376 | public bool Shuffle { |
377 | get { |
378 | - if(App.player.shuffle == Noise.Player.Shuffle.ALL) |
379 | + if (App.player.shuffle == Noise.Player.Shuffle.ALL) |
380 | return true; |
381 | return false; |
382 | } |
383 | set { |
384 | - if(value) { |
385 | - App.player.shuffle = Noise.Player.Shuffle.ALL; |
386 | + if (value) { |
387 | + App.player.setShuffleMode (Noise.Player.Shuffle.ALL, true); |
388 | } |
389 | else { |
390 | - App.player.shuffle = Noise.Player.Shuffle.OFF; |
391 | + App.player.setShuffleMode (Noise.Player.Shuffle.OFF, true); |
392 | } |
393 | |
394 | Variant variant = value; |
395 | - queue_property_for_notification("Shuffle", variant); |
396 | + queue_property_for_notification ("Shuffle", variant); |
397 | } |
398 | } |
399 | |
400 | |
401 | === removed directory 'plugins/internet-radio' |
402 | === removed file 'plugins/internet-radio/RadioListView.vala' |
403 | --- plugins/internet-radio/RadioListView.vala 2012-08-12 00:01:08 +0000 |
404 | +++ plugins/internet-radio/RadioListView.vala 1970-01-01 00:00:00 +0000 |
405 | @@ -1,538 +0,0 @@ |
406 | -/*- |
407 | - * Copyright (c) 2011-2012 Scott Ringwelski <sgringwe@mtu.edu> |
408 | - * |
409 | - * Originally Written by Scott Ringwelski for BeatBox Music Player |
410 | - * BeatBox Music Player: http://www.launchpad.net/beat-box |
411 | - * |
412 | - * This library is free software; you can redistribute it and/or |
413 | - * modify it under the terms of the GNU Library General Public |
414 | - * License as published by the Free Software Foundation; either |
415 | - * version 2 of the License, or (at your option) any later version. |
416 | - * |
417 | - * This library is distributed in the hope that it will be useful, |
418 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
419 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
420 | - * Library General Public License for more details. |
421 | - * |
422 | - * You should have received a copy of the GNU Library General Public |
423 | - * License along with this library; if not, write to the |
424 | - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
425 | - * Boston, MA 02111-1307, USA. |
426 | - */ |
427 | - |
428 | -using Gee; |
429 | -using Gtk; |
430 | - |
431 | -public class Noise.RadioListView : GenericView { |
432 | - |
433 | - //for header column chooser |
434 | - Gtk.Menu columnChooserMenu; |
435 | - CheckMenuItem columnRating; |
436 | - CheckMenuItem columnStation; |
437 | - CheckMenuItem columnGenre; |
438 | - |
439 | - //for media list right click |
440 | - Gtk.Menu mediaMenuActionMenu; |
441 | - Gtk.MenuItem mediaEditMedia; |
442 | - Gtk.MenuItem mediaRemove; |
443 | - RatingWidgetMenu mediaRateMedia; |
444 | - |
445 | - // for editing cells in-treeview |
446 | - CellRendererPixbuf cellRating; |
447 | - |
448 | - public enum RadioColumn { |
449 | - ROWID = 0, |
450 | - ICON = 1, |
451 | - STATION = 2, |
452 | - GENRE = 3, |
453 | - RATING = 4, |
454 | - PULSER = 5 |
455 | - } |
456 | - |
457 | - /** |
458 | - * for sort_id use 0+ for normal, -1 for auto, -2 for none |
459 | - */ |
460 | - // FIXME: Wrapper.Hint the_hint is no longer necessary |
461 | - public RadioListView(LibraryManager lm, TreeViewSetup tvs, int rel_id) { |
462 | - var types = new GLib.List<Type>(); |
463 | - types.append(typeof(int)); // id |
464 | - types.append(typeof(GLib.Icon)); // icon |
465 | - types.append(typeof(string)); // station |
466 | - types.append(typeof(string)); // genre |
467 | - types.append(typeof(int)); // rating |
468 | - types.append(typeof(int)); // pulser |
469 | - base(lm, types, tvs, rel_id); |
470 | - |
471 | - //last_search = ""; |
472 | - //timeout_search = new LinkedList<string>(); |
473 | - //showing_all = true; |
474 | - //removing_medias = false; |
475 | - |
476 | - buildUI(); |
477 | - } |
478 | - |
479 | - public override void update_sensitivities() { |
480 | - mediaRemove.set_sensitive(true); |
481 | - mediaRemove.set_label(_("Remove Station")); |
482 | - } |
483 | - |
484 | - public void buildUI() { |
485 | - cellRating = new CellRendererPixbuf(); |
486 | - |
487 | - cellRating.xalign = 0.0f; |
488 | - |
489 | - /* id is always first and is stored as an int. Then the rest are (1) |
490 | - * strings (for simplicity), and include: |
491 | - * #, track, title, artist, album, genre, comment, year, rating, (9) |
492 | - * bitrate, play count, last played, date added, file name, (5) |
493 | - * bpm, length, file size, (3) */ |
494 | - var to_use = new GLib.List<TreeViewColumn>(); |
495 | - var originalOrder = new GLib.List<TreeViewColumn>(); |
496 | - var correctStringOrder = new GLib.List<string>(); |
497 | - to_use = tvs.get_columns(); |
498 | - |
499 | - /* put them in the order for treemodel */ |
500 | - foreach(var tvc in to_use) { |
501 | - originalOrder.append(tvc); |
502 | - correctStringOrder.append(tvc.title); |
503 | - } |
504 | - |
505 | - int index = 0; |
506 | - foreach(TreeViewColumn tvc in originalOrder) { |
507 | - if(!(tvc.title == " " || tvc.title == "id")) { |
508 | - if(tvc.title == "Rating") |
509 | - insert_column_with_data_func(-1, tvc.title, cellRating, cellHelper.ratingTreeViewFiller); |
510 | - else if(tvc.title == "Station") |
511 | - insert_column_with_data_func(-1, tvc.title, new CellRendererText(), cellHelper.stringTreeViewFiller); |
512 | - else if(tvc.title == "Genre") |
513 | - insert_column_with_data_func(-1, tvc.title, new CellRendererText(), cellHelper.stringTreeViewFiller); |
514 | - else { |
515 | - insert_column(tvc, index); |
516 | - } |
517 | - |
518 | - |
519 | - get_column(index).resizable = true; |
520 | - get_column(index).reorderable = false; |
521 | - get_column(index).clickable = true; |
522 | - get_column(index).sort_column_id = index; |
523 | - get_column(index).set_sort_indicator(false); |
524 | - get_column(index).visible = tvc.visible; |
525 | - get_column(index).sizing = Gtk.TreeViewColumnSizing.FIXED; |
526 | - get_column(index).fixed_width = tvc.fixed_width; |
527 | - } |
528 | - else if(tvc.title == " ") { |
529 | - insert_column(tvc, index); |
530 | - |
531 | - tvc.fixed_width = 24; |
532 | - tvc.clickable = false; |
533 | - tvc.sort_column_id = -1; |
534 | - tvc.resizable = false; |
535 | - tvc.reorderable = false; |
536 | - |
537 | - tvc.clear_attributes (tvc.get_cells().nth_data(0)); |
538 | - tvc.clear_attributes (tvc.get_cells().nth_data(1)); |
539 | - |
540 | - tvc.set_cell_data_func(tvc.get_cells().nth_data(0), iconDataFunc); |
541 | - tvc.set_cell_data_func(tvc.get_cells().nth_data(1), iconDataFunc); |
542 | - } |
543 | - else if(tvc.title == "id") { |
544 | - insert_column(tvc, index); |
545 | - } |
546 | - else { |
547 | - insert_column(tvc, index); |
548 | - } |
549 | - |
550 | - get_column(index).get_button().button_press_event.connect(viewHeaderClick); |
551 | - get_column(index).notify["width"].connect(viewHeadersResized); |
552 | - |
553 | - ++index; |
554 | - } |
555 | - |
556 | - set_compare_func(view_compare_func); |
557 | - set_search_func(view_search_func); |
558 | - set_value_func(view_value_func); |
559 | - |
560 | - //rearrangeColumns(correctStringOrder); |
561 | - //viewColumnsChanged(); |
562 | - |
563 | - button_press_event.connect(viewClick); |
564 | - |
565 | - //cursor_changed.connect_after(() => { update_rating_menu(); }); |
566 | - button_release_event.connect(viewClickRelease); |
567 | - //columns_changed.connect(viewColumnsChanged); |
568 | - |
569 | - // column chooser menu |
570 | - columnChooserMenu = new Gtk.Menu(); |
571 | - columnStation = new CheckMenuItem.with_label("Station"); |
572 | - columnGenre = new CheckMenuItem.with_label("Genre"); |
573 | - columnRating = new CheckMenuItem.with_label("Rating"); |
574 | - updateColumnVisibilities(); |
575 | - columnChooserMenu.append(columnStation); |
576 | - columnChooserMenu.append(columnGenre); |
577 | - columnChooserMenu.append(columnRating); |
578 | - columnStation.toggled.connect(columnMenuToggled); |
579 | - columnGenre.toggled.connect(columnMenuToggled); |
580 | - columnRating.toggled.connect(columnMenuToggled); |
581 | - columnChooserMenu.show_all(); |
582 | - |
583 | - |
584 | - //media list right click menu |
585 | - mediaMenuActionMenu = new Gtk.Menu(); |
586 | - mediaEditMedia = new Gtk.MenuItem.with_label("Edit Station"); |
587 | - mediaRemove = new Gtk.MenuItem.with_label("Remove Station"); |
588 | - mediaRateMedia = new RatingWidgetMenu(); |
589 | - mediaMenuActionMenu.append(mediaEditMedia); |
590 | - mediaMenuActionMenu.append(mediaRateMedia); |
591 | - mediaMenuActionMenu.append(new SeparatorMenuItem()); |
592 | - mediaMenuActionMenu.append(mediaRemove); |
593 | - mediaEditMedia.activate.connect(mediaMenuEditClicked); |
594 | - mediaRemove.activate.connect(mediaRemoveClicked); |
595 | - mediaRateMedia.activate.connect(mediaRateMediaClicked); |
596 | - |
597 | - update_sensitivities(); |
598 | - |
599 | - // TODO: FIXME |
600 | - //this.list_model.rows_reordered.connect(modelRowsReordered); |
601 | - //this.list_model.sort_column_changed.connect(sortColumnChanged); |
602 | - } |
603 | - |
604 | - public void rearrangeColumns(LinkedList<string> correctOrder) { |
605 | - move_column_after(get_column(6), get_column(7)); |
606 | - //debug("correctOrder.length = %d, get_columns.length() = %d\n", correctOrder.size, (int)get_columns().length()); |
607 | - /* iterate through get_columns and if a column is not in the |
608 | - * same location as correctOrder, move it there. |
609 | - */ |
610 | - for(int index = 0; index < get_columns().length(); ++index) { |
611 | - //debug("on index %d column %s originally moving to %d\n", index, get_column(index).title, correctOrder.index_of(get_column(index).title)); |
612 | - if(get_column(index).title != correctOrder.get(index)) { |
613 | - move_column_after(get_column(index), get_column(correctOrder.index_of(get_column(index).title))); |
614 | - } |
615 | - } |
616 | - } |
617 | - |
618 | - public void cellTitleEdited(string path, string new_text) { |
619 | - /*int rowid; |
620 | - debug("done!\n"); |
621 | - if((rowid = list_model.getRowidFromPath(path)) != 0) { |
622 | - lm.media_from_id(rowid).title = new_text; |
623 | - |
624 | - lm.update_media(lm.media_from_id(rowid), true); |
625 | - } |
626 | - cellTitle.editable = false; */ |
627 | - } |
628 | - |
629 | - public virtual void sortColumnChanged() { |
630 | - updateTreeViewSetup(); |
631 | - } |
632 | - |
633 | - public virtual void modelRowsReordered(TreePath path, TreeIter? iter, void* new_order) { |
634 | - /*if(ViewWrapper.Hint == "queue") { |
635 | - lm.clear_queue(); |
636 | - |
637 | - TreeIter item; |
638 | - for(int i = 0; list_model.get_iter_from_string(out item, i.to_string()); ++i) { |
639 | - int id; |
640 | - list_model.get(item, 0, out id); |
641 | - |
642 | - App.player.queue_media_by_id(id); |
643 | - } |
644 | - }*/ |
645 | - |
646 | - // TODO: FIXME |
647 | - //if(is_current_view) { |
648 | - // set_as_current_list(0, false); |
649 | - //} |
650 | - |
651 | - if(!scrolled_recently) { |
652 | - scroll_to_current_media(); |
653 | - } |
654 | - } |
655 | - |
656 | - public virtual void viewColumnsChanged() { |
657 | - updateTreeViewSetup(); |
658 | - } |
659 | - |
660 | - public void updateColumnVisibilities() { |
661 | - int index = 0; |
662 | - foreach(TreeViewColumn tvc in get_columns()) { |
663 | - if(tvc.title == "Station") |
664 | - columnStation.active = get_column(index).visible; |
665 | - else if(tvc.title == "Genre") |
666 | - columnGenre.active = get_column(index).visible; |
667 | - else if(tvc.title == "Rating") |
668 | - columnRating.active = get_column(index).visible; |
669 | - |
670 | - ++index; |
671 | - } |
672 | - } |
673 | - |
674 | - /* button_press_event */ |
675 | - bool viewClick(Gdk.EventButton event) { |
676 | - if(event.type == Gdk.EventType.BUTTON_PRESS && event.button == 3) { //right click |
677 | - mediaMenuActionMenu.show_all(); |
678 | - |
679 | - int set_rating = -1; |
680 | - TreeModel temp; |
681 | - foreach(TreePath path in get_selection().get_selected_rows(out temp)) { |
682 | - TreeIter item; |
683 | - temp.get_iter(out item, path); |
684 | - |
685 | - int id; |
686 | - temp.get(item, 0, out id); |
687 | - |
688 | - if(set_rating == -1) |
689 | - set_rating = (int)lm.media_from_id(id).rating; |
690 | - else if(set_rating != lm.media_from_id(id).rating) { |
691 | - set_rating = 0; |
692 | - break; |
693 | - } |
694 | - } |
695 | - |
696 | - mediaRateMedia.rating_value = set_rating; |
697 | - mediaMenuActionMenu.popup (null, null, null, 3, get_current_event_time()); |
698 | - |
699 | - TreeSelection selected = get_selection(); |
700 | - selected.set_mode(SelectionMode.MULTIPLE); |
701 | - if(selected.count_selected_rows() > 1) |
702 | - return true; |
703 | - else |
704 | - return false; |
705 | - } |
706 | - else if(event.type == Gdk.EventType.BUTTON_PRESS && event.button == 1) { |
707 | - //TreeIter iter; |
708 | - TreePath path; |
709 | - TreeViewColumn column; |
710 | - int cell_x; |
711 | - int cell_y; |
712 | - |
713 | - get_path_at_pos((int)event.x, (int)event.y, out path, out column, out cell_x, out cell_y); |
714 | - |
715 | - //if(!list_model.get_iter(out iter, path)) |
716 | - // return false; |
717 | - |
718 | - /* don't unselect everything if multiple selected until button release |
719 | - * for drag and drop reasons */ |
720 | - if(get_selection().count_selected_rows() > 1) { |
721 | - if(get_selection().path_is_selected(path)) { |
722 | - if(((event.state & Gdk.ModifierType.SHIFT_MASK) == Gdk.ModifierType.SHIFT_MASK)| |
723 | - ((event.state & Gdk.ModifierType.CONTROL_MASK) == Gdk.ModifierType.CONTROL_MASK)) { |
724 | - get_selection().unselect_path(path); |
725 | - } |
726 | - return true; |
727 | - } |
728 | - else if(!(((event.state & Gdk.ModifierType.SHIFT_MASK) == Gdk.ModifierType.SHIFT_MASK)| |
729 | - ((event.state & Gdk.ModifierType.CONTROL_MASK) == Gdk.ModifierType.CONTROL_MASK))) { |
730 | - return true; |
731 | - } |
732 | - |
733 | - return false; |
734 | - } |
735 | - } |
736 | - |
737 | - return false; |
738 | - } |
739 | - |
740 | - /* button_release_event */ |
741 | - private bool viewClickRelease(Gtk.Widget sender, Gdk.EventButton event) { |
742 | - /* if we were dragging, then set dragging to false */ |
743 | - if(dragging && event.button == 1) { |
744 | - dragging = false; |
745 | - return true; |
746 | - } |
747 | - else if(((event.state & Gdk.ModifierType.SHIFT_MASK) == Gdk.ModifierType.SHIFT_MASK) | ((event.state & Gdk.ModifierType.CONTROL_MASK) == Gdk.ModifierType.CONTROL_MASK)) { |
748 | - return true; |
749 | - } |
750 | - else { |
751 | - TreePath path; |
752 | - TreeViewColumn tvc; |
753 | - int cell_x; |
754 | - int cell_y; |
755 | - int x = (int)event.x; |
756 | - int y = (int)event.y; |
757 | - |
758 | - if(!(get_path_at_pos(x, y, out path, out tvc, out cell_x, out cell_y))) return false; |
759 | - get_selection().unselect_all(); |
760 | - get_selection().select_path(path); |
761 | - return false; |
762 | - } |
763 | - } |
764 | - |
765 | - private bool viewHeaderClick(Gtk.Widget w, Gdk.EventButton e) { |
766 | - if(e.button == 3) { |
767 | - columnChooserMenu.popup (null, null, null, 3, get_current_event_time()); |
768 | - return true; |
769 | - } |
770 | - else if(e.button == 1) { |
771 | - updateTreeViewSetup(); |
772 | - |
773 | - return false; |
774 | - } |
775 | - |
776 | - return false; |
777 | - } |
778 | - |
779 | - void viewHeadersResized() { |
780 | - updateTreeViewSetup(); |
781 | - } |
782 | - |
783 | - void updateTreeViewSetup() { |
784 | - if(tvs == null || !visible || get_columns().length() != TreeViewSetup.RADIO_COLUMN_COUNT) |
785 | - return; |
786 | - |
787 | - int sort_id = RadioColumn.STATION; |
788 | - SortType sort_dir = Gtk.SortType.ASCENDING; |
789 | - get_sort_column_id(out sort_id, out sort_dir); |
790 | - |
791 | - if(sort_id <= 0) |
792 | - sort_id = RadioColumn.STATION; |
793 | - |
794 | - tvs.set_columns(get_columns()); |
795 | - tvs.sort_column_id = sort_id; |
796 | - tvs.sort_direction = sort_dir; |
797 | - } |
798 | - |
799 | - /** When the column chooser popup menu has a change/toggle **/ |
800 | - public virtual void columnMenuToggled() { |
801 | - int index = 0; |
802 | - foreach(TreeViewColumn tvc in get_columns()) { |
803 | - if(tvc.title == "Station") |
804 | - get_column(index).visible = columnStation.active; |
805 | - else if(tvc.title == "Genre") |
806 | - get_column(index).visible = columnGenre.active; |
807 | - else if(tvc.title == "Rating") |
808 | - get_column(index).visible = columnRating.active; |
809 | - |
810 | - ++index; |
811 | - } |
812 | - |
813 | - lm.station_setup.set_columns(get_columns()); |
814 | - } |
815 | - |
816 | - /** media menu popup clicks **/ |
817 | - public virtual void mediaMenuEditClicked() { |
818 | - var to_edit = new LinkedList<int>(); |
819 | - |
820 | - foreach(Media m in get_selected_medias()) { |
821 | - to_edit.add(m.rowid); |
822 | - } |
823 | - |
824 | - /*if(!GLib.File.new_for_path(media_from_id(id).file).query_exists() && media_from_id(id).file.contains(settings.getMusicFolder())) { |
825 | - media_from_id(id).unique_status_image = Icons.process_error_icon; |
826 | - lw.media_not_found(id); |
827 | - } |
828 | - else {*/ |
829 | - var list = new LinkedList<int>(); |
830 | - for(int i = 0; i < get_visible_table().size(); ++i) { |
831 | - list.add(get_media_from_index(i).rowid); |
832 | - } |
833 | - StationEditor se = new StationEditor(lm, list, to_edit); |
834 | - se.stations_saved.connect(stationEditorSaved); |
835 | - //} |
836 | - } |
837 | - |
838 | - void mediaRateMediaClicked() { |
839 | - var los = new LinkedList<Media>(); |
840 | - int new_rating = mediaRateMedia.rating_value; |
841 | - |
842 | - foreach(Media m in get_selected_medias()) { |
843 | - m.rating = new_rating; |
844 | - los.add(m); |
845 | - } |
846 | - |
847 | - lm.update_medias(los, false, true); |
848 | - } |
849 | - |
850 | - public virtual void stationEditorSaved(LinkedList<int> medias) { |
851 | - LinkedList<Media> toUpdate = new LinkedList<Media>(); |
852 | - foreach(int i in medias) |
853 | - toUpdate.add(lm.media_from_id(i)); |
854 | - |
855 | - // user could have edited rating, so record time |
856 | - lm.update_medias(toUpdate, true, true); |
857 | - } |
858 | - |
859 | - public virtual void mediaRemoveClicked() { |
860 | - LinkedList<Media> toRemove = new LinkedList<Media>(); |
861 | - LinkedList<int> toRemoveIDs = new LinkedList<int>(); |
862 | - |
863 | - foreach(Media m in get_selected_medias()) { |
864 | - toRemoveIDs.add(m.rowid); |
865 | - |
866 | - if(get_hint() == ViewWrapper.Hint.STATION) { |
867 | - toRemove.add(m); |
868 | - } |
869 | - } |
870 | - |
871 | - if(get_hint() == ViewWrapper.Hint.STATION) { |
872 | - var dialog = new RemoveFilesDialog (lm.lw, toRemove, get_hint()); |
873 | - dialog.remove_media.connect ( (delete_files) => { |
874 | - lm.remove_medias (toRemove, delete_files); |
875 | - }); |
876 | - } |
877 | - } |
878 | - |
879 | - int view_compare_func (int col, Gtk.SortType dir, Media a_media, Media b_media) { |
880 | - int rv = 0; |
881 | - |
882 | - if(sort_column_id == RadioColumn.STATION) { // station |
883 | - if(a_media.album_artist.down() == b_media.album_artist.down()) { |
884 | - rv = advanced_string_compare(b_media.uri, a_media.uri); |
885 | - } |
886 | - else |
887 | - rv = advanced_string_compare(a_media.album_artist.down(), b_media.album_artist.down()); |
888 | - } |
889 | - else if(sort_column_id == RadioColumn.GENRE) { // genre |
890 | - if(a_media.genre.down() == b_media.genre.down()) { |
891 | - if(a_media.album_artist.down() == b_media.album_artist.down()) { |
892 | - rv = advanced_string_compare(b_media.uri, a_media.uri); |
893 | - } |
894 | - else { |
895 | - rv = advanced_string_compare(a_media.album_artist.down(), b_media.album_artist.down()); |
896 | - } |
897 | - } |
898 | - else |
899 | - rv = advanced_string_compare(a_media.genre.down(), b_media.genre.down()); |
900 | - } |
901 | - |
902 | - else if(sort_column_id == RadioColumn.RATING) { // rating |
903 | - rv = (int)(a_media.rating - b_media.rating); |
904 | - } |
905 | - else { |
906 | - rv = 0; |
907 | - } |
908 | - |
909 | - if(rv == 0 && col != RadioColumn.STATION && col != RadioColumn.GENRE) |
910 | - rv = advanced_string_compare(a_media.uri, b_media.uri); |
911 | - |
912 | - if(sort_direction == SortType.DESCENDING) |
913 | - rv = (rv > 0) ? -1 : 1; |
914 | - |
915 | - return rv; |
916 | - } |
917 | - |
918 | - Value view_value_func (int row, int column, Media s) { |
919 | - Value val; |
920 | - |
921 | - if(column == 0) |
922 | - val = (int)s.rowid; |
923 | - else if(column == 1) { |
924 | - if(App.player.media_info.media != null && App.player.media_info.media.rowid == s.rowid) |
925 | - val = playing_icon; |
926 | - else if(s.unique_status_image != null) |
927 | - val = s.unique_status_image; |
928 | - else |
929 | - val = Value(typeof(GLib.Icon)); |
930 | - } |
931 | - else if(column == 2) |
932 | - val = s.album_artist; |
933 | - else if(column == 3) |
934 | - val = s.genre; |
935 | - else if(column == 4) |
936 | - val = (int)s.rating; |
937 | - else// if(column == 5) |
938 | - val = (int)s.pulseProgress; |
939 | - |
940 | - return val; |
941 | - } |
942 | -} |
943 | - |
944 | |
945 | === removed file 'plugins/internet-radio/StationEditor.vala' |
946 | --- plugins/internet-radio/StationEditor.vala 2012-07-26 17:29:26 +0000 |
947 | +++ plugins/internet-radio/StationEditor.vala 1970-01-01 00:00:00 +0000 |
948 | @@ -1,234 +0,0 @@ |
949 | -/*- |
950 | - * Copyright (c) 2011-2012 Scott Ringwelski <sgringwe@mtu.edu> |
951 | - * |
952 | - * Originaly Written by Scott Ringwelski for BeatBox Music Player |
953 | - * BeatBox Music Player: http://www.launchpad.net/beat-box |
954 | - * |
955 | - * This library is free software; you can redistribute it and/or |
956 | - * modify it under the terms of the GNU Library General Public |
957 | - * License as published by the Free Software Foundation; either |
958 | - * version 2 of the License, or (at your option) any later version. |
959 | - * |
960 | - * This library is distributed in the hope that it will be useful, |
961 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
962 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
963 | - * Library General Public License for more details. |
964 | - * |
965 | - * You should have received a copy of the GNU Library General Public |
966 | - * License along with this library; if not, write to the |
967 | - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
968 | - * Boston, MA 02111-1307, USA. |
969 | - */ |
970 | - |
971 | -using Gtk; |
972 | -using Gee; |
973 | -using Granite; |
974 | - |
975 | -public class Noise.StationEditor : Window { |
976 | - LibraryManager _lm; |
977 | - |
978 | - LinkedList<int> _allstations; |
979 | - LinkedList<int> _stations; |
980 | - |
981 | - //for padding around notebook mostly |
982 | - private VBox content; |
983 | - private HBox padding; |
984 | - |
985 | - private VBox vert; // separates editors with buttons and other stuff |
986 | - private HBox horiz; // separates text with numerical editors |
987 | - private VBox textVert; // separates text editors |
988 | - private VBox numerVert; // separates numerical editors |
989 | - |
990 | - private HashMap<string, FieldEditor> fields;// a hashmap with each property and corresponding editor |
991 | - |
992 | - private Button _previous; |
993 | - private Button _next; |
994 | - private Button _save; |
995 | - |
996 | - public signal void stations_saved(LinkedList<int> stations); |
997 | - |
998 | - public StationEditor(LibraryManager lm, LinkedList<int> allstations, LinkedList<int> stations) { |
999 | - this.window_position = WindowPosition.CENTER; |
1000 | - this.type_hint = Gdk.WindowTypeHint.DIALOG; |
1001 | - this.set_modal(true); |
1002 | - this.set_transient_for(lm.lw); |
1003 | - this.destroy_with_parent = true; |
1004 | - content = new VBox(false, 10); |
1005 | - |
1006 | - set_size_request (520, -1); |
1007 | - resizable = false; |
1008 | - |
1009 | - _lm = lm; |
1010 | - |
1011 | - _allstations = allstations; |
1012 | - _stations = stations; |
1013 | - |
1014 | - HButtonBox buttonSep = new HButtonBox(); |
1015 | - buttonSep.set_layout(ButtonBoxStyle.END); |
1016 | - _previous = new Button.with_label(_("Previous")); |
1017 | - _next = new Button.with_label(_("Next")); |
1018 | - _save = new Button.with_label(_("Done")); |
1019 | - |
1020 | - buttonSep.pack_start(_previous, false, false, 0); |
1021 | - buttonSep.pack_start(_next, false, false, 0); |
1022 | - buttonSep.pack_end(_save, false, false, 0); |
1023 | - |
1024 | - content.pack_start(wrap_alignment(createBasicViewport(), 10, 0, 0, 0), true, true, 0); |
1025 | - content.pack_start(wrap_alignment(buttonSep, 0, 0, 10, 0), false, true, 0); |
1026 | - |
1027 | - (buttonSep as Gtk.ButtonBox).set_child_secondary(_next, true); |
1028 | - (buttonSep as Gtk.ButtonBox).set_child_secondary(_previous, true); |
1029 | - |
1030 | - padding.pack_start(content, true, true, 10); |
1031 | - add(padding); |
1032 | - |
1033 | - show_all(); |
1034 | - |
1035 | - _next.sensitive = allstations.size > 1; |
1036 | - _previous.sensitive = allstations.size > 1; |
1037 | - |
1038 | - if(_stations.size == 1) { |
1039 | - foreach(FieldEditor fe in fields.values) |
1040 | - fe.set_check_visible(false); |
1041 | - } |
1042 | - |
1043 | - _previous.clicked.connect(previousClicked); |
1044 | - _next.clicked.connect(nextClicked); |
1045 | - _save.clicked.connect(saveClicked); |
1046 | - } |
1047 | - |
1048 | - public Viewport createBasicViewport() { |
1049 | - Viewport rv = new Viewport(null, null); |
1050 | - fields = new HashMap<string, FieldEditor>(); |
1051 | - Media sum = _lm.media_from_id(_stations.get(0)).copy(); |
1052 | - |
1053 | - /** find what these stations have what common, and keep those values **/ |
1054 | - foreach(int i in _stations) { |
1055 | - Media s = _lm.media_from_id(i); |
1056 | - |
1057 | - if(s.album_artist != sum.album_artist) // station name |
1058 | - sum.album_artist = ""; |
1059 | - if(s.genre != sum.genre) // category |
1060 | - sum.genre = ""; |
1061 | - if(s.rating != sum.rating) |
1062 | - sum.rating = 0; |
1063 | - } |
1064 | - |
1065 | - if(_stations.size == 1) { |
1066 | - title = "Editing " + sum.title; |
1067 | - } |
1068 | - else { |
1069 | - title = "Editing " + _stations.size.to_string() + " stations"; |
1070 | - } |
1071 | - |
1072 | - if(sum.year == -1) |
1073 | - sum.year = Time().year; |
1074 | - |
1075 | - fields.set("Station", new FieldEditor("Station", sum.album_artist, new Entry())); |
1076 | - fields.set("Genre", new FieldEditor("Genre", sum.genre, new Entry())); |
1077 | - fields.set("Rating", new FieldEditor("Rating", sum.rating.to_string(), new RatingWidget(null, false, IconSize.MENU))); |
1078 | - |
1079 | - padding = new HBox(false, 10); |
1080 | - vert = new VBox(false, 0); |
1081 | - horiz = new HBox(false, 0); |
1082 | - textVert = new VBox(false, 0); |
1083 | - numerVert = new VBox(false, 0); |
1084 | - |
1085 | - textVert.pack_start(fields.get("Station"), false, true, 0); |
1086 | - textVert.pack_start(fields.get("Genre"), false, true, 5); |
1087 | - numerVert.pack_start(fields.get("Rating"), false, true, 5); |
1088 | - |
1089 | - horiz.pack_start(wrap_alignment(textVert, 0, 30, 0, 0), false, true, 0); |
1090 | - horiz.pack_end(numerVert, false, true, 0); |
1091 | - vert.pack_start(horiz, true, true, 0); |
1092 | - |
1093 | - rv.add(vert); |
1094 | - |
1095 | - return rv; |
1096 | - } |
1097 | - |
1098 | - public static Gtk.Alignment wrap_alignment (Gtk.Widget widget, int top, int right, int bottom, int left) { |
1099 | - var alignment = new Gtk.Alignment(0.0f, 0.0f, 1.0f, 1.0f); |
1100 | - alignment.top_padding = top; |
1101 | - alignment.right_padding = right; |
1102 | - alignment.bottom_padding = bottom; |
1103 | - alignment.left_padding = left; |
1104 | - |
1105 | - alignment.add(widget); |
1106 | - return alignment; |
1107 | - } |
1108 | - |
1109 | - public void previousClicked() { |
1110 | - save_stations(); |
1111 | - |
1112 | - // now fetch the next media on current_view |
1113 | - int i = 0; // will hold next media to edit |
1114 | - int indexOfCurrentFirst = _allstations.index_of(_stations.get(0)); |
1115 | - |
1116 | - if(indexOfCurrentFirst == 0) |
1117 | - i = _allstations.get(_allstations.size - 1); |
1118 | - else |
1119 | - i = _allstations.get(indexOfCurrentFirst - 1); |
1120 | - |
1121 | - // now fetch the previous media on current_view |
1122 | - var newstations = new LinkedList<int>(); |
1123 | - newstations.add(i); |
1124 | - |
1125 | - change_media(newstations); |
1126 | - } |
1127 | - |
1128 | - public void nextClicked() { |
1129 | - save_stations(); |
1130 | - |
1131 | - // now fetch the next media on current_view |
1132 | - int i = 0; // will hold next media to edit |
1133 | - int indexOfCurrentLast = _allstations.index_of(_stations.get(_stations.size - 1)); |
1134 | - |
1135 | - if(indexOfCurrentLast == _allstations.size - 1) |
1136 | - i = _allstations.get(0); |
1137 | - else |
1138 | - i = _allstations.get(indexOfCurrentLast + 1); |
1139 | - |
1140 | - var newstations = new LinkedList<int>(); |
1141 | - newstations.add(i); |
1142 | - |
1143 | - change_media(newstations); |
1144 | - } |
1145 | - |
1146 | - public void change_media(LinkedList<int> newstations) { |
1147 | - _stations = newstations; |
1148 | - |
1149 | - Media sum = _lm.media_from_id(newstations.get(0)); |
1150 | - |
1151 | - title = "Editing " + sum.title; |
1152 | - |
1153 | - /* do not show check boxes for 1 media */ |
1154 | - foreach(FieldEditor fe in fields.values) |
1155 | - fe.set_check_visible(false); |
1156 | - |
1157 | - fields.get("Station").set_value(sum.album_artist); |
1158 | - fields.get("Genre").set_value(sum.genre); |
1159 | - fields.get("Rating").set_value(sum.rating.to_string()); |
1160 | - } |
1161 | - |
1162 | - public void save_stations() { |
1163 | - foreach(int i in _stations) { |
1164 | - Media s = _lm.media_from_id(i); |
1165 | - |
1166 | - if(fields.get("Station").checked()) |
1167 | - s.album_artist = fields.get("Station").get_value(); |
1168 | - if(fields.get("Genre").checked()) |
1169 | - s.genre = fields.get("Genre").get_value(); |
1170 | - if(fields.get("Rating").checked()) |
1171 | - s.rating = int.parse(fields.get("Rating").get_value()); |
1172 | - } |
1173 | - |
1174 | - stations_saved(_stations); |
1175 | - } |
1176 | - |
1177 | - public virtual void saveClicked() { |
1178 | - save_stations(); |
1179 | - |
1180 | - this.destroy(); |
1181 | - } |
1182 | -} |
1183 | |
1184 | === removed file 'plugins/internet-radio/internet-radio.svg' |
1185 | --- plugins/internet-radio/internet-radio.svg 2012-04-29 17:43:40 +0000 |
1186 | +++ plugins/internet-radio/internet-radio.svg 1970-01-01 00:00:00 +0000 |
1187 | @@ -1,531 +0,0 @@ |
1188 | -<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
1189 | -<!-- Created with Inkscape (http://www.inkscape.org/) --> |
1190 | - |
1191 | -<svg |
1192 | - xmlns:dc="http://purl.org/dc/elements/1.1/" |
1193 | - xmlns:cc="http://creativecommons.org/ns#" |
1194 | - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
1195 | - xmlns:svg="http://www.w3.org/2000/svg" |
1196 | - xmlns="http://www.w3.org/2000/svg" |
1197 | - xmlns:xlink="http://www.w3.org/1999/xlink" |
1198 | - version="1.1" |
1199 | - width="16" |
1200 | - height="16" |
1201 | - id="svg3809"> |
1202 | - <metadata |
1203 | - id="metadata23"> |
1204 | - <rdf:RDF> |
1205 | - <cc:Work |
1206 | - rdf:about=""> |
1207 | - <dc:format>image/svg+xml</dc:format> |
1208 | - <dc:type |
1209 | - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
1210 | - <dc:title></dc:title> |
1211 | - </cc:Work> |
1212 | - </rdf:RDF> |
1213 | - </metadata> |
1214 | - <defs |
1215 | - id="defs3811"> |
1216 | - <linearGradient |
1217 | - id="linearGradient4231"> |
1218 | - <stop |
1219 | - id="stop4233" |
1220 | - style="stop-color:#ffffff;stop-opacity:1" |
1221 | - offset="0" /> |
1222 | - <stop |
1223 | - id="stop4235" |
1224 | - style="stop-color:#ffffff;stop-opacity:0.23529412" |
1225 | - offset="0.8466807" /> |
1226 | - <stop |
1227 | - id="stop4237" |
1228 | - style="stop-color:#ffffff;stop-opacity:0.15686275" |
1229 | - offset="0.95056331" /> |
1230 | - <stop |
1231 | - id="stop4239" |
1232 | - style="stop-color:#ffffff;stop-opacity:0.39215687" |
1233 | - offset="1" /> |
1234 | - </linearGradient> |
1235 | - <linearGradient |
1236 | - id="linearGradient4162"> |
1237 | - <stop |
1238 | - id="stop4164" |
1239 | - style="stop-color:#ffffff;stop-opacity:1" |
1240 | - offset="0" /> |
1241 | - <stop |
1242 | - id="stop4166" |
1243 | - style="stop-color:#ffffff;stop-opacity:0.23529412" |
1244 | - offset="0.35269147" /> |
1245 | - <stop |
1246 | - id="stop4168" |
1247 | - style="stop-color:#ffffff;stop-opacity:0.15686275" |
1248 | - offset="0.70588225" /> |
1249 | - <stop |
1250 | - id="stop4170" |
1251 | - style="stop-color:#ffffff;stop-opacity:0.39215687" |
1252 | - offset="1" /> |
1253 | - </linearGradient> |
1254 | - <linearGradient |
1255 | - id="linearGradient3707-319-631-407-324-3"> |
1256 | - <stop |
1257 | - id="stop3760-4" |
1258 | - style="stop-color:#185f9a;stop-opacity:0" |
1259 | - offset="0" /> |
1260 | - <stop |
1261 | - id="stop3762-0" |
1262 | - style="stop-color:#599ec9;stop-opacity:1" |
1263 | - offset="1" /> |
1264 | - </linearGradient> |
1265 | - <linearGradient |
1266 | - id="linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-8"> |
1267 | - <stop |
1268 | - id="stop3750-1" |
1269 | - style="stop-color:#90dbec;stop-opacity:1" |
1270 | - offset="0" /> |
1271 | - <stop |
1272 | - id="stop3752-3" |
1273 | - style="stop-color:#55c1ec;stop-opacity:0.80869567" |
1274 | - offset="0.26238" /> |
1275 | - <stop |
1276 | - id="stop3754-1" |
1277 | - style="stop-color:#3689e6;stop-opacity:0" |
1278 | - offset="0.704952" /> |
1279 | - <stop |
1280 | - id="stop3756-1" |
1281 | - style="stop-color:#2b63a0;stop-opacity:0" |
1282 | - offset="1" /> |
1283 | - </linearGradient> |
1284 | - <linearGradient |
1285 | - x1="23.999994" |
1286 | - y1="-40.750011" |
1287 | - x2="23.999994" |
1288 | - y2="-3.7500136" |
1289 | - id="linearGradient3089-3" |
1290 | - xlink:href="#linearGradient4162" |
1291 | - gradientUnits="userSpaceOnUse" |
1292 | - gradientTransform="matrix(0.02027027,0,0,0.03603604,7.5135135,5.8018037)" /> |
1293 | - <radialGradient |
1294 | - cx="9.7701225" |
1295 | - cy="-17.190559" |
1296 | - r="19.99999" |
1297 | - fx="9.7701225" |
1298 | - fy="-17.190559" |
1299 | - id="radialGradient4193" |
1300 | - xlink:href="#linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-8" |
1301 | - gradientUnits="userSpaceOnUse" |
1302 | - gradientTransform="matrix(0,-1.123739,-0.89158642,0,-6.7805729,27.838353)" /> |
1303 | - <linearGradient |
1304 | - x1="84.111214" |
1305 | - y1="22.033323" |
1306 | - x2="84.111214" |
1307 | - y2="13.740201" |
1308 | - id="linearGradient4195" |
1309 | - xlink:href="#linearGradient3707-319-631-407-324-3" |
1310 | - gradientUnits="userSpaceOnUse" |
1311 | - gradientTransform="matrix(1.2500003,0,0,-1.666667,-98.525429,36.805091)" /> |
1312 | - <linearGradient |
1313 | - id="linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-8-9"> |
1314 | - <stop |
1315 | - id="stop3750-1-5" |
1316 | - style="stop-color:#90dbec;stop-opacity:1" |
1317 | - offset="0" /> |
1318 | - <stop |
1319 | - id="stop3752-3-3" |
1320 | - style="stop-color:#55c1ec;stop-opacity:0.80869567" |
1321 | - offset="0.26238" /> |
1322 | - <stop |
1323 | - id="stop3754-1-5" |
1324 | - style="stop-color:#3689e6;stop-opacity:0" |
1325 | - offset="0.704952" /> |
1326 | - <stop |
1327 | - id="stop3756-1-1" |
1328 | - style="stop-color:#2b63a0;stop-opacity:0" |
1329 | - offset="1" /> |
1330 | - </linearGradient> |
1331 | - <linearGradient |
1332 | - id="linearGradient3707-319-631-407-324-3-0"> |
1333 | - <stop |
1334 | - id="stop3760-4-0" |
1335 | - style="stop-color:#185f9a;stop-opacity:0" |
1336 | - offset="0" /> |
1337 | - <stop |
1338 | - id="stop3762-0-7" |
1339 | - style="stop-color:#599ec9;stop-opacity:1" |
1340 | - offset="1" /> |
1341 | - </linearGradient> |
1342 | - <radialGradient |
1343 | - cx="9.7701225" |
1344 | - cy="-17.190559" |
1345 | - r="19.99999" |
1346 | - fx="9.7701225" |
1347 | - fy="-17.190559" |
1348 | - id="radialGradient4249" |
1349 | - xlink:href="#linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-8-9" |
1350 | - gradientUnits="userSpaceOnUse" |
1351 | - gradientTransform="matrix(0,-0.82407529,-0.65383004,0,-2.8390868,22.014793)" /> |
1352 | - <linearGradient |
1353 | - x1="84.111214" |
1354 | - y1="22.033323" |
1355 | - x2="84.111214" |
1356 | - y2="13.740201" |
1357 | - id="linearGradient4251" |
1358 | - xlink:href="#linearGradient3707-319-631-407-324-3-0" |
1359 | - gradientUnits="userSpaceOnUse" |
1360 | - gradientTransform="matrix(0.91666688,0,0,-1.2222225,-70.118648,28.590401)" /> |
1361 | - <linearGradient |
1362 | - id="linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-8-9-5"> |
1363 | - <stop |
1364 | - id="stop3750-1-5-0" |
1365 | - style="stop-color:#90dbec;stop-opacity:1" |
1366 | - offset="0" /> |
1367 | - <stop |
1368 | - id="stop3752-3-3-5" |
1369 | - style="stop-color:#55c1ec;stop-opacity:0.80869567" |
1370 | - offset="0.26238" /> |
1371 | - <stop |
1372 | - id="stop3754-1-5-6" |
1373 | - style="stop-color:#3689e6;stop-opacity:0" |
1374 | - offset="0.704952" /> |
1375 | - <stop |
1376 | - id="stop3756-1-1-6" |
1377 | - style="stop-color:#2b63a0;stop-opacity:0" |
1378 | - offset="1" /> |
1379 | - </linearGradient> |
1380 | - <linearGradient |
1381 | - id="linearGradient3707-319-631-407-324-3-0-3"> |
1382 | - <stop |
1383 | - id="stop3760-4-0-4" |
1384 | - style="stop-color:#185f9a;stop-opacity:0" |
1385 | - offset="0" /> |
1386 | - <stop |
1387 | - id="stop3762-0-7-0" |
1388 | - style="stop-color:#599ec9;stop-opacity:1" |
1389 | - offset="1" /> |
1390 | - </linearGradient> |
1391 | - <radialGradient |
1392 | - cx="9.7701225" |
1393 | - cy="-17.190559" |
1394 | - r="19.99999" |
1395 | - fx="9.7701225" |
1396 | - fy="-17.190559" |
1397 | - id="radialGradient4305" |
1398 | - xlink:href="#linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-8-9-5" |
1399 | - gradientUnits="userSpaceOnUse" |
1400 | - gradientTransform="matrix(0,-0.52441155,-0.41607367,0,1.1023993,16.191232)" /> |
1401 | - <linearGradient |
1402 | - x1="84.111214" |
1403 | - y1="22.033323" |
1404 | - x2="84.111214" |
1405 | - y2="13.740201" |
1406 | - id="linearGradient4307" |
1407 | - xlink:href="#linearGradient3707-319-631-407-324-3-0-3" |
1408 | - gradientUnits="userSpaceOnUse" |
1409 | - gradientTransform="matrix(0.58333347,0,0,-0.77777795,-41.711867,20.37571)" /> |
1410 | - <linearGradient |
1411 | - id="linearGradient3931-6-3-15-683-629-8"> |
1412 | - <stop |
1413 | - id="stop2888-1" |
1414 | - style="stop-color:#919191;stop-opacity:1" |
1415 | - offset="0" /> |
1416 | - <stop |
1417 | - id="stop2890-0" |
1418 | - style="stop-color:#888888;stop-opacity:1" |
1419 | - offset="1" /> |
1420 | - </linearGradient> |
1421 | - <linearGradient |
1422 | - x1="-51.786404" |
1423 | - y1="50.786446" |
1424 | - x2="-51.786404" |
1425 | - y2="2.9062471" |
1426 | - id="linearGradient3081-4" |
1427 | - xlink:href="#linearGradient3931-6-3-15-683-629-8" |
1428 | - gradientUnits="userSpaceOnUse" |
1429 | - gradientTransform="matrix(0.23082236,0,0,0.27045521,19.621987,-0.2579439)" /> |
1430 | - <linearGradient |
1431 | - id="linearGradient3600-4-1-803-305-215-5"> |
1432 | - <stop |
1433 | - id="stop2882-9" |
1434 | - style="stop-color:#c8c8c8;stop-opacity:1" |
1435 | - offset="0" /> |
1436 | - <stop |
1437 | - id="stop2884-8" |
1438 | - style="stop-color:#b1b1b1;stop-opacity:1" |
1439 | - offset="1" /> |
1440 | - </linearGradient> |
1441 | - <linearGradient |
1442 | - x1="25.132275" |
1443 | - y1="6.7287393" |
1444 | - x2="25.132275" |
1445 | - y2="47.013336" |
1446 | - id="linearGradient3079-1" |
1447 | - xlink:href="#linearGradient3600-4-1-803-305-215-5" |
1448 | - gradientUnits="userSpaceOnUse" |
1449 | - gradientTransform="matrix(0.28584924,0,0,0.28899394,2.6396177,0.0641343)" /> |
1450 | - <linearGradient |
1451 | - id="linearGradient3977-3"> |
1452 | - <stop |
1453 | - id="stop3979-0" |
1454 | - style="stop-color:#ffffff;stop-opacity:1" |
1455 | - offset="0" /> |
1456 | - <stop |
1457 | - id="stop3981-7" |
1458 | - style="stop-color:#ffffff;stop-opacity:0.23529412" |
1459 | - offset="0.03626217" /> |
1460 | - <stop |
1461 | - id="stop3983-8" |
1462 | - style="stop-color:#ffffff;stop-opacity:0.15686275" |
1463 | - offset="0.95056331" /> |
1464 | - <stop |
1465 | - id="stop3985-6" |
1466 | - style="stop-color:#ffffff;stop-opacity:0.39215687" |
1467 | - offset="1" /> |
1468 | - </linearGradient> |
1469 | - <linearGradient |
1470 | - x1="23.99999" |
1471 | - y1="5.5641499" |
1472 | - x2="23.99999" |
1473 | - y2="43" |
1474 | - id="linearGradient3988-4" |
1475 | - xlink:href="#linearGradient3977-3" |
1476 | - gradientUnits="userSpaceOnUse" |
1477 | - gradientTransform="matrix(0.21621621,0,0,0.29729728,4.3108109,-0.1351315)" /> |
1478 | - <linearGradient |
1479 | - x1="-51.786404" |
1480 | - y1="50.786446" |
1481 | - x2="-51.786404" |
1482 | - y2="2.9062471" |
1483 | - id="linearGradient3808" |
1484 | - xlink:href="#linearGradient3104-6" |
1485 | - gradientUnits="userSpaceOnUse" |
1486 | - gradientTransform="matrix(0.23071463,0,0,0.26435017,16.617263,1.4725544)" /> |
1487 | - <linearGradient |
1488 | - x1="25.132275" |
1489 | - y1="0.98520643" |
1490 | - x2="25.132275" |
1491 | - y2="47.013336" |
1492 | - id="linearGradient3806" |
1493 | - xlink:href="#linearGradient3600-1" |
1494 | - gradientUnits="userSpaceOnUse" |
1495 | - gradientTransform="matrix(0.28571584,0,0,0.28247035,-0.35718085,1.7873623)" /> |
1496 | - <linearGradient |
1497 | - id="linearGradient3104-6"> |
1498 | - <stop |
1499 | - id="stop3106-5" |
1500 | - style="stop-color:#8c8c8c;stop-opacity:1" |
1501 | - offset="0" /> |
1502 | - <stop |
1503 | - id="stop3108-4" |
1504 | - style="stop-color:#aaaaaa;stop-opacity:1" |
1505 | - offset="1" /> |
1506 | - </linearGradient> |
1507 | - <linearGradient |
1508 | - id="linearGradient3600-1"> |
1509 | - <stop |
1510 | - id="stop3602-7" |
1511 | - style="stop-color:#f4f4f4;stop-opacity:1" |
1512 | - offset="0" /> |
1513 | - <stop |
1514 | - id="stop3604-5" |
1515 | - style="stop-color:#dbdbdb;stop-opacity:1" |
1516 | - offset="1" /> |
1517 | - </linearGradient> |
1518 | - <linearGradient |
1519 | - id="linearGradient3977-1"> |
1520 | - <stop |
1521 | - id="stop3979-3" |
1522 | - style="stop-color:#ffffff;stop-opacity:1" |
1523 | - offset="0" /> |
1524 | - <stop |
1525 | - id="stop3981-0" |
1526 | - style="stop-color:#ffffff;stop-opacity:0.23529412" |
1527 | - offset="0.03626217" /> |
1528 | - <stop |
1529 | - id="stop3983-3" |
1530 | - style="stop-color:#ffffff;stop-opacity:0.15686275" |
1531 | - offset="0.95056331" /> |
1532 | - <stop |
1533 | - id="stop3985-2" |
1534 | - style="stop-color:#ffffff;stop-opacity:0.39215687" |
1535 | - offset="1" /> |
1536 | - </linearGradient> |
1537 | - <linearGradient |
1538 | - x1="23.99999" |
1539 | - y1="5.5641499" |
1540 | - x2="23.99999" |
1541 | - y2="43" |
1542 | - id="linearGradient3988" |
1543 | - xlink:href="#linearGradient3977-1" |
1544 | - gradientUnits="userSpaceOnUse" |
1545 | - gradientTransform="matrix(0.21621621,0,0,0.29729728,1.3108109,1.8648685)" /> |
1546 | - <linearGradient |
1547 | - x1="23.99999" |
1548 | - y1="5.5641499" |
1549 | - x2="23.99999" |
1550 | - y2="43" |
1551 | - id="linearGradient4023" |
1552 | - xlink:href="#linearGradient3977-1" |
1553 | - gradientUnits="userSpaceOnUse" |
1554 | - gradientTransform="matrix(0.21621621,0,0,0.20516506,2.1393985,5.830804)" /> |
1555 | - <linearGradient |
1556 | - x1="25.132275" |
1557 | - y1="0.98520643" |
1558 | - x2="25.132275" |
1559 | - y2="47.013336" |
1560 | - id="linearGradient4026" |
1561 | - xlink:href="#linearGradient3600-1" |
1562 | - gradientUnits="userSpaceOnUse" |
1563 | - gradientTransform="matrix(0.28571584,0,0,0.21755835,1.8414731,5.0379325)" /> |
1564 | - <linearGradient |
1565 | - x1="-51.786404" |
1566 | - y1="50.786446" |
1567 | - x2="-51.786404" |
1568 | - y2="2.9062471" |
1569 | - id="linearGradient4028" |
1570 | - xlink:href="#linearGradient3104-6" |
1571 | - gradientUnits="userSpaceOnUse" |
1572 | - gradientTransform="matrix(0.23071463,0,0,0.2036022,18.815917,4.7954678)" /> |
1573 | - <linearGradient |
1574 | - x1="23.99999" |
1575 | - y1="5.5641499" |
1576 | - x2="23.99999" |
1577 | - y2="43" |
1578 | - id="linearGradient4031" |
1579 | - xlink:href="#linearGradient3977-3" |
1580 | - gradientUnits="userSpaceOnUse" |
1581 | - gradientTransform="matrix(0.21621621,0,0,0.29729728,-14.345113,1.7452225)" /> |
1582 | - <linearGradient |
1583 | - x1="25.132275" |
1584 | - y1="6.7287393" |
1585 | - x2="25.132275" |
1586 | - y2="47.013336" |
1587 | - id="linearGradient4034" |
1588 | - xlink:href="#linearGradient3600-4-1-803-305-215-5" |
1589 | - gradientUnits="userSpaceOnUse" |
1590 | - gradientTransform="matrix(0.28584924,0,0,0.28899394,-16.016306,1.9444883)" /> |
1591 | - <linearGradient |
1592 | - x1="-51.786404" |
1593 | - y1="50.786446" |
1594 | - x2="-51.786404" |
1595 | - y2="2.9062471" |
1596 | - id="linearGradient4036" |
1597 | - xlink:href="#linearGradient3931-6-3-15-683-629-8" |
1598 | - gradientUnits="userSpaceOnUse" |
1599 | - gradientTransform="matrix(0.23082236,0,0,0.27045521,0.966063,1.6224101)" /> |
1600 | - <linearGradient |
1601 | - x1="25.132275" |
1602 | - y1="0.98520643" |
1603 | - x2="25.132275" |
1604 | - y2="48.333687" |
1605 | - id="linearGradient4026-7" |
1606 | - xlink:href="#linearGradient3600-1-3" |
1607 | - gradientUnits="userSpaceOnUse" |
1608 | - gradientTransform="matrix(0.28571584,0,0,0.21755835,1.8414731,5.0379325)" /> |
1609 | - <linearGradient |
1610 | - id="linearGradient3600-1-3"> |
1611 | - <stop |
1612 | - id="stop3602-7-6" |
1613 | - style="stop-color:#f4f4f4;stop-opacity:1" |
1614 | - offset="0" /> |
1615 | - <stop |
1616 | - id="stop3604-5-4" |
1617 | - style="stop-color:#dbdbdb;stop-opacity:1" |
1618 | - offset="1" /> |
1619 | - </linearGradient> |
1620 | - <linearGradient |
1621 | - x1="-51.786404" |
1622 | - y1="53.043812" |
1623 | - x2="-51.786404" |
1624 | - y2="2.9062471" |
1625 | - id="linearGradient4028-7" |
1626 | - xlink:href="#linearGradient3104-6-9" |
1627 | - gradientUnits="userSpaceOnUse" |
1628 | - gradientTransform="matrix(0.23071463,0,0,0.2036022,18.815917,4.7954678)" /> |
1629 | - <linearGradient |
1630 | - id="linearGradient3104-6-9"> |
1631 | - <stop |
1632 | - id="stop3106-5-7" |
1633 | - style="stop-color:#8c8c8c;stop-opacity:1" |
1634 | - offset="0" /> |
1635 | - <stop |
1636 | - id="stop3108-4-2" |
1637 | - style="stop-color:#aaaaaa;stop-opacity:1" |
1638 | - offset="1" /> |
1639 | - </linearGradient> |
1640 | - <linearGradient |
1641 | - id="linearGradient3600-1-3-5"> |
1642 | - <stop |
1643 | - id="stop3602-7-6-6" |
1644 | - style="stop-color:#f4f4f4;stop-opacity:1" |
1645 | - offset="0" /> |
1646 | - <stop |
1647 | - id="stop3604-5-4-8" |
1648 | - style="stop-color:#dbdbdb;stop-opacity:1" |
1649 | - offset="1" /> |
1650 | - </linearGradient> |
1651 | - <linearGradient |
1652 | - id="linearGradient3104-6-9-8"> |
1653 | - <stop |
1654 | - id="stop3106-5-7-8" |
1655 | - style="stop-color:#8c8c8c;stop-opacity:1" |
1656 | - offset="0" /> |
1657 | - <stop |
1658 | - id="stop3108-4-2-3" |
1659 | - style="stop-color:#aaaaaa;stop-opacity:1" |
1660 | - offset="1" /> |
1661 | - </linearGradient> |
1662 | - <linearGradient |
1663 | - x1="25.132275" |
1664 | - y1="0.98520643" |
1665 | - x2="25.132275" |
1666 | - y2="48.333687" |
1667 | - id="linearGradient4155" |
1668 | - xlink:href="#linearGradient3600-1-3-5" |
1669 | - gradientUnits="userSpaceOnUse" |
1670 | - gradientTransform="matrix(0.28571584,0,0,0.21755835,1.8414731,5.0379324)" /> |
1671 | - <linearGradient |
1672 | - x1="-51.786404" |
1673 | - y1="53.043812" |
1674 | - x2="-51.786404" |
1675 | - y2="2.9062471" |
1676 | - id="linearGradient4157" |
1677 | - xlink:href="#linearGradient3104-6-9-8" |
1678 | - gradientUnits="userSpaceOnUse" |
1679 | - gradientTransform="matrix(0.23071463,0,0,0.2036022,18.815917,4.7954677)" /> |
1680 | - <linearGradient |
1681 | - x1="23.99999" |
1682 | - y1="5.5641499" |
1683 | - x2="23.99999" |
1684 | - y2="45.273682" |
1685 | - id="linearGradient4023-1" |
1686 | - xlink:href="#linearGradient4231" |
1687 | - gradientUnits="userSpaceOnUse" |
1688 | - gradientTransform="matrix(0.21621621,0,0,0.20516506,2.1393985,5.830804)" /> |
1689 | - </defs> |
1690 | - <path |
1691 | - d="m 15.5,6.0000003 a 7.5,7.4999998 0 1 0 -15,0 7.5,7.4999998 0 0 0 15,0 z" |
1692 | - id="path3211-9" |
1693 | - style="opacity:0.8;color:#000000;fill:url(#radialGradient4193);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient4195);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
1694 | - <path |
1695 | - d="m 13.5,6.0000008 a 5.5,5.4999999 0 1 0 -11,0 5.5,5.4999999 0 0 0 11,0 z" |
1696 | - id="path3211-9-0" |
1697 | - style="opacity:0.9;color:#000000;fill:url(#radialGradient4249);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient4251);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
1698 | - <path |
1699 | - d="m 7,6 -5,9.5 2.5,0 L 5.3276481,13.975707 11,14.625 c 0,0 0.423761,0.712993 0.5,0.875 L 14,15.5 9,6 z m 1,2 0.5236759,1.0524013 -1.428355,0.4798025 z m 1.40625,2.96875 0.617426,1.299877 -3.7266607,-0.426448 z" |
1700 | - id="path3141" |
1701 | - style="color:#000000;fill:url(#linearGradient4026-7);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient4028-7);stroke-width:0.99992186;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
1702 | - <path |
1703 | - d="m 11.5,6.0000007 a 3.5,3.5 0 1 0 -7,0 3.5,3.5 0 0 0 7,0 z" |
1704 | - id="path3211-9-0-8" |
1705 | - style="color:#000000;fill:url(#radialGradient4305);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient4307);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
1706 | - <path |
1707 | - d="M 7.53125,6.875 6.5625,8.75 7.25,7.5625 A 0.87055858,0.87055858 0 0 1 8.78125,7.625 L 9.3125,8.6875 a 0.87055858,0.87055858 0 0 1 -0.5,1.1875 L 7.375,10.34375 a 0.87055858,0.87055858 0 0 1 -1.125,-1 l -2.78125,5.28125 0.5,0 0.5625,-1.0625 a 0.87055858,0.87055858 0 0 1 0.875,-0.46875 L 11.09375,13.75 A 0.87055858,0.87055858 0 0 1 11.75,14.1875 c 0,0 0.100808,0.172252 0.21875,0.375 0.0128,0.022 0.01881,0.04131 0.03125,0.0625 l 0.53125,0 -4.0625,-7.75 -0.9375,0 z m 1.8125,3.21875 a 0.87055858,0.87055858 0 0 1 0.84375,0.5 l 0.625,1.3125 a 0.87055858,0.87055858 0 0 1 -0.875,1.25 L 6.21875,12.71875 A 0.87055858,0.87055858 0 0 1 6.0625,11 l 3.09375,-0.875 a 0.87055858,0.87055858 0 0 1 0.1875,-0.03125 z" |
1708 | - id="path4186" |
1709 | - style="opacity:0.5;color:#000000;fill:none;stroke:url(#linearGradient4023-1);stroke-width:0.99999982;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
1710 | - <path |
1711 | - d="m 9.5,5.0000008 a 1.5,1.5 0 0 1 -3,0 1.5,1.5 0 1 1 3,0 z" |
1712 | - id="path3211" |
1713 | - style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#808080;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.98431373;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
1714 | - <path |
1715 | - d="m 8.5,5.0000014 a 0.50000002,0.50000009 0 0 1 -1,0 0.50000002,0.50000009 0 1 1 1,0 z" |
1716 | - id="path3211-1" |
1717 | - style="opacity:0.1;color:#000000;fill:none;stroke:url(#linearGradient3089-3);stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
1718 | -</svg> |
1719 | |
1720 | === removed directory 'plugins/podcasts' |
1721 | === removed file 'plugins/podcasts/CMakeLists.txt' |
1722 | --- plugins/podcasts/CMakeLists.txt 2012-04-30 18:07:40 +0000 |
1723 | +++ plugins/podcasts/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
1724 | @@ -1,30 +0,0 @@ |
1725 | -add_definitions(${NORMAL_CFLAGS}) |
1726 | -include_directories(${CMAKE_BINARY_DIR}/core ${CMAKE_BINARY_DIR}/src) |
1727 | -link_directories(${NORMAL_LINK_DIRS}) |
1728 | -vala_precompile(VALA_C |
1729 | - Podcasts.vala |
1730 | - PACKAGES |
1731 | - granite |
1732 | - noise |
1733 | - noise-core |
1734 | - libxml-2.0 |
1735 | - gee-1.0 |
1736 | - gstreamer-0.10 |
1737 | - libnotify |
1738 | - libgpod-1.0 |
1739 | - gstreamer-interfaces-0.10 |
1740 | - gstreamer-pbutils-0.10 |
1741 | - gstreamer-cdda-0.10 |
1742 | - libpeas-1.0 |
1743 | - libsoup-2.4 |
1744 | - OPTIONS |
1745 | - --vapidir=${CMAKE_SOURCE_DIR}/vapi |
1746 | - --vapidir=${CMAKE_BINARY_DIR}/core/ |
1747 | - --vapidir=${CMAKE_BINARY_DIR}/src/ |
1748 | - ) |
1749 | -add_library(noise-podcasts MODULE ${VALA_C}) |
1750 | - |
1751 | -target_link_libraries (noise-podcasts ${NORMAL_LIBRARIES}) |
1752 | -install(TARGETS noise-podcasts DESTINATION ${PLUGIN_DIR}/podcasts/) |
1753 | -install(FILES podcasts.plugin DESTINATION ${PLUGIN_DIR}/podcasts/) |
1754 | -add_dependencies(noise-podcasts noise) |
1755 | |
1756 | === removed directory 'plugins/podcasts/icons' |
1757 | === removed file 'plugins/podcasts/icons/library-podcast.svg' |
1758 | --- plugins/podcasts/icons/library-podcast.svg 2012-04-29 17:43:40 +0000 |
1759 | +++ plugins/podcasts/icons/library-podcast.svg 1970-01-01 00:00:00 +0000 |
1760 | @@ -1,725 +0,0 @@ |
1761 | -<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
1762 | -<!-- Created with Inkscape (http://www.inkscape.org/) --> |
1763 | - |
1764 | -<svg |
1765 | - xmlns:dc="http://purl.org/dc/elements/1.1/" |
1766 | - xmlns:cc="http://creativecommons.org/ns#" |
1767 | - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
1768 | - xmlns:svg="http://www.w3.org/2000/svg" |
1769 | - xmlns="http://www.w3.org/2000/svg" |
1770 | - xmlns:xlink="http://www.w3.org/1999/xlink" |
1771 | - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
1772 | - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
1773 | - version="1.1" |
1774 | - width="16" |
1775 | - height="16" |
1776 | - id="svg3809" |
1777 | - inkscape:version="0.48.2 r9819" |
1778 | - sodipodi:docname="library-podcast.svg"> |
1779 | - <metadata |
1780 | - id="metadata23"> |
1781 | - <rdf:RDF> |
1782 | - <cc:Work |
1783 | - rdf:about=""> |
1784 | - <dc:format>image/svg+xml</dc:format> |
1785 | - <dc:type |
1786 | - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
1787 | - <dc:title></dc:title> |
1788 | - <dc:title /> |
1789 | - </cc:Work> |
1790 | - </rdf:RDF> |
1791 | - </metadata> |
1792 | - <sodipodi:namedview |
1793 | - pagecolor="#ffffff" |
1794 | - bordercolor="#666666" |
1795 | - borderopacity="1" |
1796 | - objecttolerance="10" |
1797 | - gridtolerance="10" |
1798 | - guidetolerance="10" |
1799 | - inkscape:pageopacity="0" |
1800 | - inkscape:pageshadow="2" |
1801 | - inkscape:window-width="1280" |
1802 | - inkscape:window-height="753" |
1803 | - id="namedview21" |
1804 | - showgrid="false" |
1805 | - inkscape:zoom="26.125" |
1806 | - inkscape:cx="8.1722488" |
1807 | - inkscape:cy="8" |
1808 | - inkscape:window-x="0" |
1809 | - inkscape:window-y="24" |
1810 | - inkscape:window-maximized="1" |
1811 | - inkscape:current-layer="svg3809"> |
1812 | - <inkscape:grid |
1813 | - type="xygrid" |
1814 | - id="grid3209" /> |
1815 | - </sodipodi:namedview> |
1816 | - <defs |
1817 | - id="defs3811"> |
1818 | - <linearGradient |
1819 | - id="linearGradient4162"> |
1820 | - <stop |
1821 | - id="stop4164" |
1822 | - style="stop-color:#ffffff;stop-opacity:1;" |
1823 | - offset="0" /> |
1824 | - <stop |
1825 | - offset="0.35269147" |
1826 | - style="stop-color:#ffffff;stop-opacity:0.23529412;" |
1827 | - id="stop4166" /> |
1828 | - <stop |
1829 | - id="stop4168" |
1830 | - style="stop-color:#ffffff;stop-opacity:0.15686275;" |
1831 | - offset="0.70588225" /> |
1832 | - <stop |
1833 | - id="stop4170" |
1834 | - style="stop-color:#ffffff;stop-opacity:0.39215687;" |
1835 | - offset="1" /> |
1836 | - </linearGradient> |
1837 | - <linearGradient |
1838 | - id="linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-641-289-620-227-114-444-680-744"> |
1839 | - <stop |
1840 | - offset="0" |
1841 | - style="stop-color:#5f5f5f;stop-opacity:1;" |
1842 | - id="stop5430" /> |
1843 | - <stop |
1844 | - offset="0.26238" |
1845 | - style="stop-color:#4f4f4f;stop-opacity:1;" |
1846 | - id="stop5432" /> |
1847 | - <stop |
1848 | - offset="0.704952" |
1849 | - style="stop-color:#3b3b3b;stop-opacity:1;" |
1850 | - id="stop5434" /> |
1851 | - <stop |
1852 | - offset="1" |
1853 | - style="stop-color:#2b2b2b;stop-opacity:1;" |
1854 | - id="stop5436" /> |
1855 | - </linearGradient> |
1856 | - <linearGradient |
1857 | - id="linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400"> |
1858 | - <stop |
1859 | - offset="0" |
1860 | - style="stop-color:#272727;stop-opacity:1;" |
1861 | - id="stop5440" /> |
1862 | - <stop |
1863 | - offset="1" |
1864 | - style="stop-color:#454545;stop-opacity:1;" |
1865 | - id="stop5442" /> |
1866 | - </linearGradient> |
1867 | - <linearGradient |
1868 | - id="linearGradient3924-4-8"> |
1869 | - <stop |
1870 | - offset="0" |
1871 | - style="stop-color:#ffffff;stop-opacity:1;" |
1872 | - id="stop3926-0-4" /> |
1873 | - <stop |
1874 | - id="stop3928-6-8" |
1875 | - style="stop-color:#ffffff;stop-opacity:0.23529412;" |
1876 | - offset="0.06316455" /> |
1877 | - <stop |
1878 | - offset="0.95056331" |
1879 | - style="stop-color:#ffffff;stop-opacity:0.15686275;" |
1880 | - id="stop3930-2-1" /> |
1881 | - <stop |
1882 | - offset="1" |
1883 | - style="stop-color:#ffffff;stop-opacity:0.39215687;" |
1884 | - id="stop3932-9-0" /> |
1885 | - </linearGradient> |
1886 | - <linearGradient |
1887 | - inkscape:collect="always" |
1888 | - xlink:href="#linearGradient3924-4-8" |
1889 | - id="linearGradient3089" |
1890 | - gradientUnits="userSpaceOnUse" |
1891 | - gradientTransform="matrix(0.02702703,0,0,0.1081081,7.3513515,8.9054083)" |
1892 | - x1="23.999994" |
1893 | - y1="10.124992" |
1894 | - x2="23.999994" |
1895 | - y2="37.874996" /> |
1896 | - <radialGradient |
1897 | - inkscape:collect="always" |
1898 | - xlink:href="#linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-641-289-620-227-114-444-680-744" |
1899 | - id="radialGradient3101" |
1900 | - gradientUnits="userSpaceOnUse" |
1901 | - gradientTransform="matrix(0,0.35953691,-0.19017361,0,9.606931,5.8946478)" |
1902 | - cx="7.4956832" |
1903 | - cy="8.4497671" |
1904 | - fx="7.4956832" |
1905 | - fy="8.4497671" |
1906 | - r="19.99999" /> |
1907 | - <linearGradient |
1908 | - inkscape:collect="always" |
1909 | - xlink:href="#linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400" |
1910 | - id="linearGradient3103" |
1911 | - gradientUnits="userSpaceOnUse" |
1912 | - gradientTransform="matrix(0.07692308,0,0,0.15384616,6.1538462,7.8076942)" |
1913 | - x1="24" |
1914 | - y1="44" |
1915 | - x2="24" |
1916 | - y2="3.8990016" /> |
1917 | - <linearGradient |
1918 | - id="linearGradient3707-319-631-407-324-3"> |
1919 | - <stop |
1920 | - id="stop3760-4" |
1921 | - style="stop-color:#185f9a;stop-opacity:0;" |
1922 | - offset="0" /> |
1923 | - <stop |
1924 | - id="stop3762-0" |
1925 | - style="stop-color:#599ec9;stop-opacity:1;" |
1926 | - offset="1" /> |
1927 | - </linearGradient> |
1928 | - <linearGradient |
1929 | - id="linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-8"> |
1930 | - <stop |
1931 | - id="stop3750-1" |
1932 | - style="stop-color:#90dbec;stop-opacity:1;" |
1933 | - offset="0" /> |
1934 | - <stop |
1935 | - id="stop3752-3" |
1936 | - style="stop-color:#55c1ec;stop-opacity:0.80869567;" |
1937 | - offset="0.26238" /> |
1938 | - <stop |
1939 | - id="stop3754-1" |
1940 | - style="stop-color:#3689e6;stop-opacity:0;" |
1941 | - offset="0.704952" /> |
1942 | - <stop |
1943 | - id="stop3756-1" |
1944 | - style="stop-color:#2b63a0;stop-opacity:0;" |
1945 | - offset="1" /> |
1946 | - </linearGradient> |
1947 | - <linearGradient |
1948 | - id="linearGradient3977-6"> |
1949 | - <stop |
1950 | - id="stop3979-9" |
1951 | - style="stop-color:#ffffff;stop-opacity:1;" |
1952 | - offset="0" /> |
1953 | - <stop |
1954 | - offset="0.03626217" |
1955 | - style="stop-color:#ffffff;stop-opacity:0.23529412;" |
1956 | - id="stop3981-3" /> |
1957 | - <stop |
1958 | - id="stop3983-7" |
1959 | - style="stop-color:#ffffff;stop-opacity:0.15686275;" |
1960 | - offset="0.95056331" /> |
1961 | - <stop |
1962 | - id="stop3985-4" |
1963 | - style="stop-color:#ffffff;stop-opacity:0.39215687;" |
1964 | - offset="1" /> |
1965 | - </linearGradient> |
1966 | - <linearGradient |
1967 | - id="linearGradient3104"> |
1968 | - <stop |
1969 | - offset="0" |
1970 | - style="stop-color:#a0a0a0;stop-opacity:1" |
1971 | - id="stop3106" /> |
1972 | - <stop |
1973 | - offset="1" |
1974 | - style="stop-color:#bebebe;stop-opacity:1" |
1975 | - id="stop3108" /> |
1976 | - </linearGradient> |
1977 | - <linearGradient |
1978 | - id="linearGradient3600"> |
1979 | - <stop |
1980 | - offset="0" |
1981 | - style="stop-color:#f4f4f4;stop-opacity:1" |
1982 | - id="stop3602" /> |
1983 | - <stop |
1984 | - offset="1" |
1985 | - style="stop-color:#dbdbdb;stop-opacity:1" |
1986 | - id="stop3604" /> |
1987 | - </linearGradient> |
1988 | - <linearGradient |
1989 | - id="linearGradient3977"> |
1990 | - <stop |
1991 | - offset="0" |
1992 | - style="stop-color:#ffffff;stop-opacity:1" |
1993 | - id="stop3979" /> |
1994 | - <stop |
1995 | - offset="0.03626217" |
1996 | - style="stop-color:#ffffff;stop-opacity:0.23529412" |
1997 | - id="stop3981" /> |
1998 | - <stop |
1999 | - offset="0.95056331" |
2000 | - style="stop-color:#ffffff;stop-opacity:0.15686275" |
2001 | - id="stop3983" /> |
2002 | - <stop |
2003 | - offset="1" |
2004 | - style="stop-color:#ffffff;stop-opacity:0.39215687" |
2005 | - id="stop3985" /> |
2006 | - </linearGradient> |
2007 | - <linearGradient |
2008 | - id="linearGradient3104-5"> |
2009 | - <stop |
2010 | - offset="0" |
2011 | - style="stop-color:#aaaaaa;stop-opacity:1" |
2012 | - id="stop3106-2" /> |
2013 | - <stop |
2014 | - offset="1" |
2015 | - style="stop-color:#c8c8c8;stop-opacity:1" |
2016 | - id="stop3108-5" /> |
2017 | - </linearGradient> |
2018 | - <linearGradient |
2019 | - inkscape:collect="always" |
2020 | - xlink:href="#linearGradient3977-6" |
2021 | - id="linearGradient3191" |
2022 | - gradientUnits="userSpaceOnUse" |
2023 | - gradientTransform="matrix(0.22297294,0,0,0.35135133,-33.455162,-2.9409035)" |
2024 | - x1="23.99999" |
2025 | - y1="5.5641499" |
2026 | - x2="23.99999" |
2027 | - y2="43" /> |
2028 | - <radialGradient |
2029 | - inkscape:collect="always" |
2030 | - xlink:href="#linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-8" |
2031 | - id="radialGradient3194" |
2032 | - gradientUnits="userSpaceOnUse" |
2033 | - gradientTransform="matrix(-7.3617649e-8,2.251132,-3.6847783,-6.7572924e-8,11.422427,-22.664549)" |
2034 | - cx="7.8060555" |
2035 | - cy="9.9571075" |
2036 | - fx="7.2758255" |
2037 | - fy="9.9571075" |
2038 | - r="12.671875" /> |
2039 | - <linearGradient |
2040 | - inkscape:collect="always" |
2041 | - xlink:href="#linearGradient3707-319-631-407-324-3" |
2042 | - id="linearGradient3196" |
2043 | - gradientUnits="userSpaceOnUse" |
2044 | - gradientTransform="matrix(0.45534875,0,0,0.34098425,-36.19079,-2.180778)" |
2045 | - x1="25" |
2046 | - y1="47.935162" |
2047 | - x2="25" |
2048 | - y2="0.91790956" /> |
2049 | - <linearGradient |
2050 | - inkscape:collect="always" |
2051 | - xlink:href="#linearGradient3104-5" |
2052 | - id="linearGradient3199" |
2053 | - gradientUnits="userSpaceOnUse" |
2054 | - gradientTransform="matrix(0.32160807,0,0,0.3333374,-33.90396,-2.8575516)" |
2055 | - x1="22.004084" |
2056 | - y1="47.813133" |
2057 | - x2="22.004084" |
2058 | - y2="3.3638515" /> |
2059 | - <linearGradient |
2060 | - inkscape:collect="always" |
2061 | - xlink:href="#linearGradient3977" |
2062 | - id="linearGradient3202" |
2063 | - gradientUnits="userSpaceOnUse" |
2064 | - gradientTransform="matrix(0.24324324,0,0,0.35135133,-33.566649,-2.9409025)" |
2065 | - x1="23.99999" |
2066 | - y1="5.5641499" |
2067 | - x2="23.99999" |
2068 | - y2="43" /> |
2069 | - <linearGradient |
2070 | - inkscape:collect="always" |
2071 | - xlink:href="#linearGradient3600" |
2072 | - id="linearGradient3205" |
2073 | - gradientUnits="userSpaceOnUse" |
2074 | - gradientTransform="matrix(0.31428714,0,0,0.3259265,-35.271705,-2.8307125)" |
2075 | - x1="25.132275" |
2076 | - y1="0.98520643" |
2077 | - x2="25.132275" |
2078 | - y2="47.013336" /> |
2079 | - <linearGradient |
2080 | - inkscape:collect="always" |
2081 | - xlink:href="#linearGradient3104" |
2082 | - id="linearGradient3207" |
2083 | - gradientUnits="userSpaceOnUse" |
2084 | - gradientTransform="matrix(0.25378586,0,0,0.30501865,-16.599834,-3.1939515)" |
2085 | - x1="-51.786404" |
2086 | - y1="50.786446" |
2087 | - x2="-51.786404" |
2088 | - y2="2.9062471" /> |
2089 | - <radialGradient |
2090 | - inkscape:collect="always" |
2091 | - xlink:href="#linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-641-289-620-227-114-444-680-744-1" |
2092 | - id="radialGradient3101-8" |
2093 | - gradientUnits="userSpaceOnUse" |
2094 | - gradientTransform="matrix(0,0.22474781,-0.23775638,0,4.0585139,2.1323295)" |
2095 | - cx="10.714105" |
2096 | - cy="-16.205778" |
2097 | - fx="10.714105" |
2098 | - fy="-16.205778" |
2099 | - r="19.99999" /> |
2100 | - <linearGradient |
2101 | - id="linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-641-289-620-227-114-444-680-744-1"> |
2102 | - <stop |
2103 | - offset="0" |
2104 | - style="stop-color:#5f5f5f;stop-opacity:1;" |
2105 | - id="stop5430-3" /> |
2106 | - <stop |
2107 | - offset="0.26238" |
2108 | - style="stop-color:#4f4f4f;stop-opacity:1;" |
2109 | - id="stop5432-1" /> |
2110 | - <stop |
2111 | - offset="0.704952" |
2112 | - style="stop-color:#3b3b3b;stop-opacity:1;" |
2113 | - id="stop5434-1" /> |
2114 | - <stop |
2115 | - offset="1" |
2116 | - style="stop-color:#2b2b2b;stop-opacity:1;" |
2117 | - id="stop5436-0" /> |
2118 | - </linearGradient> |
2119 | - <linearGradient |
2120 | - inkscape:collect="always" |
2121 | - xlink:href="#linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-4" |
2122 | - id="linearGradient3103-3" |
2123 | - gradientUnits="userSpaceOnUse" |
2124 | - gradientTransform="matrix(0.33333341,0,0,0.33333341,-20.406781,0.33898172)" |
2125 | - x1="80.880737" |
2126 | - y1="24.726936" |
2127 | - x2="80.880737" |
2128 | - y2="12.713165" /> |
2129 | - <linearGradient |
2130 | - id="linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-4"> |
2131 | - <stop |
2132 | - offset="0" |
2133 | - style="stop-color:#272727;stop-opacity:1;" |
2134 | - id="stop5440-0" /> |
2135 | - <stop |
2136 | - offset="1" |
2137 | - style="stop-color:#454545;stop-opacity:1;" |
2138 | - id="stop5442-3" /> |
2139 | - </linearGradient> |
2140 | - <linearGradient |
2141 | - inkscape:collect="always" |
2142 | - xlink:href="#linearGradient4162" |
2143 | - id="linearGradient3089-3" |
2144 | - gradientUnits="userSpaceOnUse" |
2145 | - gradientTransform="matrix(0.08108109,0,0,0.1081081,6.0540543,8.9054063)" |
2146 | - x1="23.999994" |
2147 | - y1="-40.750011" |
2148 | - x2="23.999994" |
2149 | - y2="-3.7500136" /> |
2150 | - <radialGradient |
2151 | - r="19.99999" |
2152 | - fy="-17.190559" |
2153 | - fx="9.7701225" |
2154 | - cy="-17.190559" |
2155 | - cx="9.7701225" |
2156 | - gradientTransform="matrix(0,0.22474781,-0.23775638,0,4.0585139,2.1323295)" |
2157 | - gradientUnits="userSpaceOnUse" |
2158 | - id="radialGradient4193" |
2159 | - xlink:href="#linearGradient3671-580" |
2160 | - inkscape:collect="always" /> |
2161 | - <linearGradient |
2162 | - y2="13.740201" |
2163 | - x2="84.111214" |
2164 | - y1="22.033323" |
2165 | - x1="84.111214" |
2166 | - gradientTransform="matrix(0.33333341,0,0,0.33333341,-20.406781,0.33898172)" |
2167 | - gradientUnits="userSpaceOnUse" |
2168 | - id="linearGradient4195" |
2169 | - xlink:href="#linearGradient3707-662" |
2170 | - inkscape:collect="always" /> |
2171 | - <radialGradient |
2172 | - r="19.99999" |
2173 | - fy="-17.190559" |
2174 | - fx="9.7701225" |
2175 | - cy="-17.190559" |
2176 | - cx="9.7701225" |
2177 | - gradientTransform="matrix(0,0.22474781,-0.23775638,0,4.0585139,2.1323295)" |
2178 | - gradientUnits="userSpaceOnUse" |
2179 | - id="radialGradient4249" |
2180 | - xlink:href="#linearGradient3671-580" |
2181 | - inkscape:collect="always" /> |
2182 | - <linearGradient |
2183 | - y2="13.740201" |
2184 | - x2="84.111214" |
2185 | - y1="22.033323" |
2186 | - x1="84.111214" |
2187 | - gradientTransform="matrix(0.33333341,0,0,0.33333341,-20.406781,0.33898172)" |
2188 | - gradientUnits="userSpaceOnUse" |
2189 | - id="linearGradient4251" |
2190 | - xlink:href="#linearGradient3707-662" |
2191 | - inkscape:collect="always" /> |
2192 | - <radialGradient |
2193 | - r="19.99999" |
2194 | - fy="-17.190559" |
2195 | - fx="9.7701225" |
2196 | - cy="-17.190559" |
2197 | - cx="9.7701225" |
2198 | - gradientTransform="matrix(0,0.22474781,-0.23775638,0,4.0585139,2.1323295)" |
2199 | - gradientUnits="userSpaceOnUse" |
2200 | - id="radialGradient4305" |
2201 | - xlink:href="#linearGradient3671-580" |
2202 | - inkscape:collect="always" /> |
2203 | - <linearGradient |
2204 | - y2="13.740201" |
2205 | - x2="84.111214" |
2206 | - y1="22.033323" |
2207 | - x1="84.111214" |
2208 | - gradientTransform="matrix(0.33333341,0,0,0.33333341,-20.406781,0.33898172)" |
2209 | - gradientUnits="userSpaceOnUse" |
2210 | - id="linearGradient4307" |
2211 | - xlink:href="#linearGradient3707-662" |
2212 | - inkscape:collect="always" /> |
2213 | - <linearGradient |
2214 | - id="linearGradient3671-580"> |
2215 | - <stop |
2216 | - offset="0" |
2217 | - style="stop-color:#fc93dc;stop-opacity:1" |
2218 | - id="stop4088" /> |
2219 | - <stop |
2220 | - offset="0.26238" |
2221 | - style="stop-color:#da72d3;stop-opacity:0.80784315;" |
2222 | - id="stop4090" /> |
2223 | - <stop |
2224 | - offset="0.704952" |
2225 | - style="stop-color:#a33fab;stop-opacity:0;" |
2226 | - id="stop4092" /> |
2227 | - <stop |
2228 | - offset="1" |
2229 | - style="stop-color:#502b58;stop-opacity:0;" |
2230 | - id="stop4094" /> |
2231 | - </linearGradient> |
2232 | - <linearGradient |
2233 | - id="linearGradient3707-662"> |
2234 | - <stop |
2235 | - offset="0" |
2236 | - style="stop-color:#542f57;stop-opacity:0;" |
2237 | - id="stop4098" /> |
2238 | - <stop |
2239 | - offset="1" |
2240 | - style="stop-color:#bb5ca4;stop-opacity:1" |
2241 | - id="stop4100" /> |
2242 | - </linearGradient> |
2243 | - <linearGradient |
2244 | - x1="23.999994" |
2245 | - y1="10.124992" |
2246 | - x2="23.999994" |
2247 | - y2="37.874996" |
2248 | - id="linearGradient3089-4" |
2249 | - xlink:href="#linearGradient3924-4-8-7" |
2250 | - gradientUnits="userSpaceOnUse" |
2251 | - gradientTransform="matrix(0.08108109,0,0,0.1081081,6.0540543,9.9054075)" /> |
2252 | - <linearGradient |
2253 | - id="linearGradient3924-4-8-7"> |
2254 | - <stop |
2255 | - id="stop3926-0-4-6" |
2256 | - style="stop-color:#ffffff;stop-opacity:1" |
2257 | - offset="0" /> |
2258 | - <stop |
2259 | - id="stop3928-6-8-5" |
2260 | - style="stop-color:#ffffff;stop-opacity:0.23529412" |
2261 | - offset="0.06316455" /> |
2262 | - <stop |
2263 | - id="stop3930-2-1-6" |
2264 | - style="stop-color:#ffffff;stop-opacity:0.15686275" |
2265 | - offset="0.95056331" /> |
2266 | - <stop |
2267 | - id="stop3932-9-0-9" |
2268 | - style="stop-color:#ffffff;stop-opacity:0.39215687" |
2269 | - offset="1" /> |
2270 | - </linearGradient> |
2271 | - <linearGradient |
2272 | - id="linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-641-289-620-227-114-444-680-744-7"> |
2273 | - <stop |
2274 | - id="stop5430-4" |
2275 | - style="stop-color:#5f5f5f;stop-opacity:1" |
2276 | - offset="0" /> |
2277 | - <stop |
2278 | - id="stop5432-5" |
2279 | - style="stop-color:#4f4f4f;stop-opacity:1" |
2280 | - offset="0.26238" /> |
2281 | - <stop |
2282 | - id="stop5434-2" |
2283 | - style="stop-color:#3b3b3b;stop-opacity:1" |
2284 | - offset="0.704952" /> |
2285 | - <stop |
2286 | - id="stop5436-5" |
2287 | - style="stop-color:#2b2b2b;stop-opacity:1" |
2288 | - offset="1" /> |
2289 | - </linearGradient> |
2290 | - <linearGradient |
2291 | - id="linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-7"> |
2292 | - <stop |
2293 | - id="stop5440-4" |
2294 | - style="stop-color:#272727;stop-opacity:1" |
2295 | - offset="0" /> |
2296 | - <stop |
2297 | - id="stop5442-4" |
2298 | - style="stop-color:#454545;stop-opacity:1" |
2299 | - offset="1" /> |
2300 | - </linearGradient> |
2301 | - <radialGradient |
2302 | - cx="10.714105" |
2303 | - cy="-16.205778" |
2304 | - r="19.99999" |
2305 | - fx="10.714105" |
2306 | - fy="-16.205778" |
2307 | - id="radialGradient3101-8-3" |
2308 | - xlink:href="#linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-641-289-620-227-114-444-680-744-1-0" |
2309 | - gradientUnits="userSpaceOnUse" |
2310 | - gradientTransform="matrix(0,0.37457969,-0.29719548,0,3.0731424,-1.2794498)" /> |
2311 | - <linearGradient |
2312 | - id="linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-641-289-620-227-114-444-680-744-1-0"> |
2313 | - <stop |
2314 | - id="stop5430-3-7" |
2315 | - style="stop-color:#5f5f5f;stop-opacity:1" |
2316 | - offset="0" /> |
2317 | - <stop |
2318 | - id="stop5432-1-8" |
2319 | - style="stop-color:#4f4f4f;stop-opacity:1" |
2320 | - offset="0.26238" /> |
2321 | - <stop |
2322 | - id="stop5434-1-6" |
2323 | - style="stop-color:#3b3b3b;stop-opacity:1" |
2324 | - offset="0.704952" /> |
2325 | - <stop |
2326 | - id="stop5436-0-8" |
2327 | - style="stop-color:#2b2b2b;stop-opacity:1" |
2328 | - offset="1" /> |
2329 | - </linearGradient> |
2330 | - <linearGradient |
2331 | - x1="80.880737" |
2332 | - y1="24.726936" |
2333 | - x2="80.880737" |
2334 | - y2="12.713165" |
2335 | - id="linearGradient3103-3-8" |
2336 | - xlink:href="#linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-4-4" |
2337 | - gradientUnits="userSpaceOnUse" |
2338 | - gradientTransform="matrix(0.41666676,0,0,0.55555569,-27.508476,-4.2683629)" /> |
2339 | - <linearGradient |
2340 | - id="linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-4-4"> |
2341 | - <stop |
2342 | - id="stop5440-0-3" |
2343 | - style="stop-color:#272727;stop-opacity:1" |
2344 | - offset="0" /> |
2345 | - <stop |
2346 | - id="stop5442-3-1" |
2347 | - style="stop-color:#454545;stop-opacity:1" |
2348 | - offset="1" /> |
2349 | - </linearGradient> |
2350 | - <linearGradient |
2351 | - x1="23.999994" |
2352 | - y1="-40.750011" |
2353 | - x2="23.999994" |
2354 | - y2="-3.7500136" |
2355 | - id="linearGradient3089-3-4" |
2356 | - xlink:href="#linearGradient4162-9" |
2357 | - gradientUnits="userSpaceOnUse" |
2358 | - gradientTransform="matrix(0.06081082,0,0,0.10810811,6.5405407,8.405408)" /> |
2359 | - <linearGradient |
2360 | - id="linearGradient4162-9"> |
2361 | - <stop |
2362 | - id="stop4164-2" |
2363 | - style="stop-color:#ffffff;stop-opacity:1" |
2364 | - offset="0" /> |
2365 | - <stop |
2366 | - id="stop4166-0" |
2367 | - style="stop-color:#ffffff;stop-opacity:0.23529412" |
2368 | - offset="0.35269147" /> |
2369 | - <stop |
2370 | - id="stop4168-6" |
2371 | - style="stop-color:#ffffff;stop-opacity:0.15686275" |
2372 | - offset="0.70588225" /> |
2373 | - <stop |
2374 | - id="stop4170-8" |
2375 | - style="stop-color:#ffffff;stop-opacity:0.39215687" |
2376 | - offset="1" /> |
2377 | - </linearGradient> |
2378 | - <radialGradient |
2379 | - r="19.99999" |
2380 | - fy="8.4497671" |
2381 | - fx="7.4956832" |
2382 | - cy="8.4497671" |
2383 | - cx="7.4956832" |
2384 | - gradientTransform="matrix(0,0.35953692,-0.31695601,0,10.678218,6.8946472)" |
2385 | - gradientUnits="userSpaceOnUse" |
2386 | - id="radialGradient3174" |
2387 | - xlink:href="#linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-641-289-620-227-114-444-680-744-7" |
2388 | - inkscape:collect="always" /> |
2389 | - <linearGradient |
2390 | - y2="3.8990016" |
2391 | - x2="24" |
2392 | - y1="44" |
2393 | - x1="24" |
2394 | - gradientTransform="matrix(0.12820514,0,0,0.15384617,4.923077,8.8076928)" |
2395 | - gradientUnits="userSpaceOnUse" |
2396 | - id="linearGradient3176" |
2397 | - xlink:href="#linearGradient3707-319-631-407-324-616-674-812-821-107-178-392-400-7" |
2398 | - inkscape:collect="always" /> |
2399 | - </defs> |
2400 | - <path |
2401 | - sodipodi:type="arc" |
2402 | - style="color:#000000;fill:url(#radialGradient4193);fill-opacity:1.0;fill-rule:nonzero;stroke:url(#linearGradient4195);stroke-width:0.23094012000000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
2403 | - id="path3211-9" |
2404 | - sodipodi:cx="8" |
2405 | - sodipodi:cy="6.5" |
2406 | - sodipodi:rx="2" |
2407 | - sodipodi:ry="1.5" |
2408 | - d="m 10,6.5 a 2,1.5 0 1 1 -4,0 2,1.5 0 1 1 4,0 z" |
2409 | - transform="matrix(3.75,0,0,4.9999999,-22,-24.499999)" /> |
2410 | - <path |
2411 | - sodipodi:type="arc" |
2412 | - style="color:#000000;fill:url(#radialGradient4249);fill-opacity:1.0;fill-rule:nonzero;stroke:url(#linearGradient4251);stroke-width:0.31491834000000002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
2413 | - id="path3211-9-0" |
2414 | - sodipodi:cx="8" |
2415 | - sodipodi:cy="6.5" |
2416 | - sodipodi:rx="2" |
2417 | - sodipodi:ry="1.5" |
2418 | - d="m 10,6.5 a 2,1.5 0 1 1 -4,0 2,1.5 0 1 1 4,0 z" |
2419 | - transform="matrix(2.75,0,0,3.6666666,-14,-15.833333)" /> |
2420 | - <path |
2421 | - sodipodi:type="arc" |
2422 | - style="color:#000000;fill:url(#radialGradient4305);fill-opacity:1.0;fill-rule:nonzero;stroke:url(#linearGradient4307);stroke-width:0.49487167999999998;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
2423 | - id="path3211-9-0-8" |
2424 | - sodipodi:cx="8" |
2425 | - sodipodi:cy="6.5" |
2426 | - sodipodi:rx="2" |
2427 | - sodipodi:ry="1.5" |
2428 | - d="m 10,6.5 a 2,1.5 0 1 1 -4,0 2,1.5 0 1 1 4,0 z" |
2429 | - transform="matrix(1.75,0,0,2.3333333,-6,-7.1666665)" /> |
2430 | - <path |
2431 | - inkscape:connector-curvature="0" |
2432 | - style="fill:url(#linearGradient3205);fill-opacity:1;stroke:url(#linearGradient3207);stroke-width:0.99992192;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" |
2433 | - id="path4160" |
2434 | - d="m -33.228851,-2.0085005 c 2.520676,0 11.000063,9.54e-4 11.000063,9.54e-4 l 1.3e-5,14.9990985 c 0,0 -7.333384,0 -11.000076,0 0,-5.0000175 0,-10.0000355 0,-15.0000525 z" /> |
2435 | - <path |
2436 | - inkscape:connector-curvature="0" |
2437 | - style="fill:none;stroke:url(#linearGradient3202);stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" |
2438 | - id="rect6741-1" |
2439 | - d="m -23.228813,11.991526 -9,0 0,-13.0000005 9,0 z" /> |
2440 | - <path |
2441 | - inkscape:connector-curvature="0" |
2442 | - style="fill:none;stroke:url(#linearGradient3199);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" |
2443 | - id="path3475" |
2444 | - d="m -29.728813,0.9915205 0.753769,0 z m 0.864322,0 0.703517,0 z m 0.81407,0 0.623115,0 z m 0.723618,0 0.271357,0 z m 0.38191,0 0.603015,0 z m 0.723618,0 1.58794,0 z m -3.507538,0.994817 0.994975,0 z m 1.095477,0 1.628141,0 z m 1.728644,0 0.79397,0 z m 0.894472,0 0.743719,0 z m 0.844222,0 0.633165,0 z m -4.562815,1.005188 0.512563,0 z m 0.673367,0 1.899498,0 z m -0.673367,1.9947954 0.994975,0 z m 1.095477,0 1.628141,0 z m 1.728644,0 0.79397,0 z m 0.894472,0 0.743719,0 z m 0.844222,0 0.633165,0 z m -4.562815,1.0052046 0.753769,0 z m 0.864322,0 0.693467,0 z m 0.81407,0 0.623115,0 z m 0.723618,0 0.271357,0 z m 0.38191,0 0.603015,0 z m 0.723618,0 1.577889,0 z m -3.507538,1 1.17588,0 z m 1.306533,0 0.562814,0 z m 0.663316,0 0.281407,0 z m 0.39196,0 0.512563,0 z m 0.623116,0 0.522613,0 z m 0.623115,0 0.834172,0 z m 0.944725,0 1.085426,0 z m -4.552765,1.994804 0.994975,0 z m 1.095477,0 1.628141,0 z m 1.728644,0 0.79397,0 z m 0.894472,0 0.743719,0 z m 0.844222,0 0.633165,0 z m -4.562815,1.005196 1.246231,0 z m 1.356784,0 0.39196,0 z m 0.492462,0 0.894472,0 z m 0.994976,0 1.316583,0 z m 1.427135,0 0.894473,0 z m 0.984925,0 0.190955,0 z m -5.256282,1.0000005 1.246231,0 z m 1.356784,0 0.562814,0 z m 0.663317,0 0.884421,0 z m 0.984924,0 0.954774,0 z m 1.065327,0 0.38191,0 z m 0.482413,0 0.211055,0 z m 0.321607,0 0.592966,0 z" |
2445 | - sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccczczccccccccccccccccccccc" /> |
2446 | - <path |
2447 | - inkscape:connector-curvature="0" |
2448 | - style="color:#000000;fill:url(#radialGradient3194);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3196);stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
2449 | - id="path4530" |
2450 | - d="m -30.728813,12.991526 c -0.798846,0 -1.597694,0 -2.396544,0 -0.194166,-0.177608 -0.04652,-0.530232 -0.09265,-0.78167 0,-4.7107145 0,-9.4214282 0,-14.132141 l 0.02708,-0.061001 0.06557,-0.025189 0,0 c 0.831438,0 1.53252,0 2.363954,0" /> |
2451 | - <path |
2452 | - style="opacity:0.5;fill:none;stroke:url(#linearGradient3191);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" |
2453 | - d="m -31.228813,11.991526 -1,0 0,-13.0000005 1,0" |
2454 | - id="rect6741-1-5" |
2455 | - inkscape:connector-curvature="0" |
2456 | - sodipodi:nodetypes="cccc" /> |
2457 | - <rect |
2458 | - width="5" |
2459 | - height="6" |
2460 | - rx="1.4158726" |
2461 | - ry="1.4158726" |
2462 | - x="5.5" |
2463 | - y="9.5" |
2464 | - id="rect5505-21" |
2465 | - style="color:#000000;fill:url(#radialGradient3174);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3176);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
2466 | - <rect |
2467 | - width="3" |
2468 | - height="4" |
2469 | - rx="0.43099841" |
2470 | - ry="0.43099841" |
2471 | - x="6.5" |
2472 | - y="10.500001" |
2473 | - id="rect6741-0-3" |
2474 | - style="opacity:0.1;fill:none;stroke:url(#linearGradient3089-4);stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> |
2475 | - <path |
2476 | - inkscape:connector-curvature="0" |
2477 | - d="m 10.5,6.0000011 a 2.5,2.5000001 0 0 1 -5,0 2.5,2.5000001 0 1 1 5,0 z" |
2478 | - id="path3211" |
2479 | - style="color:#000000;fill:url(#radialGradient3101-8-3);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3103-3-8);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
2480 | - <path |
2481 | - inkscape:connector-curvature="0" |
2482 | - d="m 9.5000001,6.0000015 a 1.5000001,1.5000005 0 0 1 -3.0000001,0 1.5000001,1.5000005 0 1 1 3.0000001,0 z" |
2483 | - id="path3211-1" |
2484 | - style="opacity:0.3;color:#000000;fill:none;stroke:url(#linearGradient3089-3-4);stroke-width:0.99999994000000003;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> |
2485 | -</svg> |
2486 | |
2487 | === removed file 'plugins/podcasts/icons/podcast-new.svg' |
2488 | --- plugins/podcasts/icons/podcast-new.svg 2012-04-29 17:43:40 +0000 |
2489 | +++ plugins/podcasts/icons/podcast-new.svg 1970-01-01 00:00:00 +0000 |
2490 | @@ -1,148 +0,0 @@ |
2491 | -<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
2492 | -<!-- Created with Inkscape (http://www.inkscape.org/) --> |
2493 | - |
2494 | -<svg |
2495 | - xmlns:dc="http://purl.org/dc/elements/1.1/" |
2496 | - xmlns:cc="http://creativecommons.org/ns#" |
2497 | - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
2498 | - xmlns:svg="http://www.w3.org/2000/svg" |
2499 | - xmlns="http://www.w3.org/2000/svg" |
2500 | - xmlns:xlink="http://www.w3.org/1999/xlink" |
2501 | - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
2502 | - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
2503 | - width="16px" |
2504 | - height="16px" |
2505 | - id="svg3035" |
2506 | - version="1.1" |
2507 | - inkscape:version="0.48.0 r9654" |
2508 | - sodipodi:docname="mail-unread.svg"> |
2509 | - <defs |
2510 | - id="defs3037"> |
2511 | - <linearGradient |
2512 | - inkscape:collect="always" |
2513 | - xlink:href="#linearGradient4011" |
2514 | - id="linearGradient3071" |
2515 | - gradientUnits="userSpaceOnUse" |
2516 | - gradientTransform="matrix(0.24324325,0,0,0.24324325,-9.448695,1.8320232)" |
2517 | - x1="71.204407" |
2518 | - y1="6.2375584" |
2519 | - x2="71.204407" |
2520 | - y2="44.340794" /> |
2521 | - <linearGradient |
2522 | - id="linearGradient4011"> |
2523 | - <stop |
2524 | - id="stop4013" |
2525 | - style="stop-color:#ffffff;stop-opacity:1;" |
2526 | - offset="0" /> |
2527 | - <stop |
2528 | - offset="0.507761" |
2529 | - style="stop-color:#ffffff;stop-opacity:0.23529412;" |
2530 | - id="stop4015" /> |
2531 | - <stop |
2532 | - id="stop4017" |
2533 | - style="stop-color:#ffffff;stop-opacity:0.15686275;" |
2534 | - offset="0.83456558" /> |
2535 | - <stop |
2536 | - id="stop4019" |
2537 | - style="stop-color:#ffffff;stop-opacity:0.39215687;" |
2538 | - offset="1" /> |
2539 | - </linearGradient> |
2540 | - <linearGradient |
2541 | - id="linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-3-8"> |
2542 | - <stop |
2543 | - id="stop3750-8-9" |
2544 | - style="stop-color:#90dbec;stop-opacity:1;" |
2545 | - offset="0" /> |
2546 | - <stop |
2547 | - id="stop3752-3-2" |
2548 | - style="stop-color:#55c1ec;stop-opacity:1;" |
2549 | - offset="0.26238" /> |
2550 | - <stop |
2551 | - id="stop3754-7-2" |
2552 | - style="stop-color:#3689e6;stop-opacity:1;" |
2553 | - offset="0.704952" /> |
2554 | - <stop |
2555 | - id="stop3756-9-3" |
2556 | - style="stop-color:#2b63a0;stop-opacity:1;" |
2557 | - offset="1" /> |
2558 | - </linearGradient> |
2559 | - <linearGradient |
2560 | - id="linearGradient3707-319-631-407-324-3-8"> |
2561 | - <stop |
2562 | - id="stop3760-7-3" |
2563 | - style="stop-color:#185f9a;stop-opacity:1;" |
2564 | - offset="0" /> |
2565 | - <stop |
2566 | - id="stop3762-8-4" |
2567 | - style="stop-color:#599ec9;stop-opacity:1;" |
2568 | - offset="1" /> |
2569 | - </linearGradient> |
2570 | - <radialGradient |
2571 | - r="19.99999" |
2572 | - fy="8.4497671" |
2573 | - fx="5.7800279" |
2574 | - cy="8.4497671" |
2575 | - cx="5.7800279" |
2576 | - gradientTransform="matrix(0,0.65921222,-0.6973679,-1.2145204e-8,13.892627,-2.2774353)" |
2577 | - gradientUnits="userSpaceOnUse" |
2578 | - id="radialGradient3031" |
2579 | - xlink:href="#linearGradient2867-449-88-871-390-598-476-591-434-148-57-177-3-8" |
2580 | - inkscape:collect="always" /> |
2581 | - <linearGradient |
2582 | - y2="3.8990016" |
2583 | - x2="24" |
2584 | - y1="44" |
2585 | - x1="24" |
2586 | - gradientTransform="matrix(0.28207745,0,0,0.28207745,1.2301417,1.2301412)" |
2587 | - gradientUnits="userSpaceOnUse" |
2588 | - id="linearGradient3033" |
2589 | - xlink:href="#linearGradient3707-319-631-407-324-3-8" |
2590 | - inkscape:collect="always" /> |
2591 | - </defs> |
2592 | - <sodipodi:namedview |
2593 | - id="base" |
2594 | - pagecolor="#ffffff" |
2595 | - bordercolor="#666666" |
2596 | - borderopacity="1.0" |
2597 | - inkscape:pageopacity="0.0" |
2598 | - inkscape:pageshadow="2" |
2599 | - inkscape:zoom="22.197802" |
2600 | - inkscape:cx="8" |
2601 | - inkscape:cy="8" |
2602 | - inkscape:current-layer="layer1" |
2603 | - showgrid="true" |
2604 | - inkscape:grid-bbox="true" |
2605 | - inkscape:document-units="px" |
2606 | - inkscape:window-width="447" |
2607 | - inkscape:window-height="446" |
2608 | - inkscape:window-x="0" |
2609 | - inkscape:window-y="259" |
2610 | - inkscape:window-maximized="0" /> |
2611 | - <metadata |
2612 | - id="metadata3040"> |
2613 | - <rdf:RDF> |
2614 | - <cc:Work |
2615 | - rdf:about=""> |
2616 | - <dc:format>image/svg+xml</dc:format> |
2617 | - <dc:type |
2618 | - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
2619 | - <dc:title></dc:title> |
2620 | - </cc:Work> |
2621 | - </rdf:RDF> |
2622 | - </metadata> |
2623 | - <g |
2624 | - id="layer1" |
2625 | - inkscape:label="Layer 1" |
2626 | - inkscape:groupmode="layer"> |
2627 | - <path |
2628 | - inkscape:connector-curvature="0" |
2629 | - style="color:#000000;fill:url(#radialGradient3031);fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3033);stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
2630 | - id="path2555-7" |
2631 | - d="M 8.0000008,2.5 C 4.9652907,2.5 2.5,4.9652897 2.5,8 c 0,3.034711 2.4652907,5.500001 5.5000008,5.5 C 11.034709,13.5 13.500003,11.034711 13.5,8 13.5,4.9652897 11.034709,2.5 8.0000008,2.5 z" /> |
2632 | - <path |
2633 | - inkscape:connector-curvature="0" |
2634 | - style="opacity:0.5;color:#000000;fill:none;stroke:url(#linearGradient3071);stroke-width:0.99999988;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
2635 | - id="path8655-6" |
2636 | - d="M 12.5,7.9998401 C 12.5,10.485202 10.485133,12.5 8.0000569,12.5 c -2.4853037,0 -4.500057,-2.014821 -4.500057,-4.5001599 0,-2.4852456 2.0147533,-4.4998398 4.500057,-4.4998398 2.4850761,0 4.4999431,2.0145942 4.4999431,4.4998398 l 0,0 z" /> |
2637 | - </g> |
2638 | -</svg> |
2639 | |
2640 | === removed file 'plugins/podcasts/podcasts.plugin' |
2641 | --- plugins/podcasts/podcasts.plugin 2012-04-06 19:09:26 +0000 |
2642 | +++ plugins/podcasts/podcasts.plugin 1970-01-01 00:00:00 +0000 |
2643 | @@ -1,10 +0,0 @@ |
2644 | -[Plugin] |
2645 | -Module=noise-podcasts |
2646 | -Loader=C |
2647 | -IAge=2 |
2648 | -Name=Podcasts |
2649 | -BuiltIn=true |
2650 | -Description=Download Podcasts. |
2651 | -Authors=BeatBox Developers |
2652 | -Copyright=Copyright © 2012 BeatBox Developers |
2653 | -Website=http://launchpad.net/beat-box |
2654 | |
2655 | === removed directory 'plugins/podcasts/src' |
2656 | === removed file 'plugins/podcasts/src/AddPodcastWindow.vala' |
2657 | --- plugins/podcasts/src/AddPodcastWindow.vala 2012-07-26 17:29:26 +0000 |
2658 | +++ plugins/podcasts/src/AddPodcastWindow.vala 1970-01-01 00:00:00 +0000 |
2659 | @@ -1,209 +0,0 @@ |
2660 | -/*- |
2661 | - * Copyright (c) 2011-2012 Scott Ringwelski <sgringwe@mtu.edu> |
2662 | - * |
2663 | - * Originaly Written by Scott Ringwelski for BeatBox Music Player |
2664 | - * BeatBox Music Player: http://www.launchpad.net/beat-box |
2665 | - * |
2666 | - * This library is free software; you can redistribute it and/or |
2667 | - * modify it under the terms of the GNU Library General Public |
2668 | - * License as published by the Free Software Foundation; either |
2669 | - * version 2 of the License, or (at your option) any later version. |
2670 | - * |
2671 | - * This library is distributed in the hope that it will be useful, |
2672 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2673 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2674 | - * Library General Public License for more details. |
2675 | - * |
2676 | - * You should have received a copy of the GNU Library General Public |
2677 | - * License along with this library; if not, write to the |
2678 | - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
2679 | - * Boston, MA 02111-1307, USA. |
2680 | - */ |
2681 | - |
2682 | -using Gtk; |
2683 | - |
2684 | -public class Noise.AddPodcastWindow : Window { |
2685 | - public LibraryWindow lw; |
2686 | - |
2687 | - VBox content; |
2688 | - HBox padding; |
2689 | - |
2690 | - Granite.Widgets.HintedEntry _source; |
2691 | - Gtk.Image _is_valid; |
2692 | - Gtk.Spinner _is_working; |
2693 | - Button _save; |
2694 | - Button _cancel; |
2695 | - |
2696 | - Gdk.Pixbuf not_valid; |
2697 | - Gdk.Pixbuf valid; |
2698 | - |
2699 | - Gee.HashSet<string> existing_rss; |
2700 | - bool already_validating; |
2701 | - string next; |
2702 | - |
2703 | - public signal void playlist_saved(Playlist p); |
2704 | - |
2705 | - public AddPodcastWindow(LibraryWindow lw) { |
2706 | - this.lw = lw; |
2707 | - already_validating = false; |
2708 | - next = ""; |
2709 | - |
2710 | - title = (_("Add Podcast")); |
2711 | - |
2712 | - set_size_request(400, -1); |
2713 | - |
2714 | - this.resizable = false; |
2715 | - |
2716 | - this.window_position = WindowPosition.CENTER; |
2717 | - this.type_hint = Gdk.WindowTypeHint.DIALOG; |
2718 | - this.set_modal(true); |
2719 | - this.set_transient_for(lw); |
2720 | - this.destroy_with_parent = true; |
2721 | - |
2722 | - content = new VBox(false, 12); |
2723 | - padding = new HBox(false, 12); |
2724 | - |
2725 | - /* get pixbufs */ |
2726 | - valid = Icons.PROCESS_COMPLETED.render (IconSize.MENU); |
2727 | - not_valid = Icons.PROCESS_ERROR.render (IconSize.MENU); |
2728 | - |
2729 | - if(valid == null) |
2730 | - valid = Icons.render_icon(Gtk.Stock.YES, IconSize.MENU); |
2731 | - if(not_valid == null) |
2732 | - not_valid = Icons.render_icon(Gtk.Stock.NO, IconSize.MENU); |
2733 | - |
2734 | - /* start out by creating all category labels */ |
2735 | - Label sourceLabel = new Label(_("Podcast RSS Source")); |
2736 | - _source = new Granite.Widgets.HintedEntry(_("Podcast Source...")); |
2737 | - _is_valid = new Gtk.Image.from_pixbuf(not_valid); |
2738 | - _is_working = new Gtk.Spinner(); |
2739 | - _save = new Button.with_label(_("Add")); |
2740 | - _cancel = new Button.with_label(_("Cancel")); |
2741 | - /* set up controls */ |
2742 | - sourceLabel.xalign = 0.0f; |
2743 | - sourceLabel.set_markup("<b>%s</b>".printf(_("Podcast RSS Source"))); |
2744 | - |
2745 | - _is_working.start(); |
2746 | - |
2747 | - /* add controls to form */ |
2748 | - HButtonBox bottomButtons = new HButtonBox(); |
2749 | - bottomButtons.set_layout(ButtonBoxStyle.END); |
2750 | - bottomButtons.set_spacing (6); |
2751 | - bottomButtons.pack_start(_cancel, false, false, 0); |
2752 | - bottomButtons.pack_end(_save, false, false, 0); |
2753 | - |
2754 | - /* source vbox */ |
2755 | - HBox sourceBox = new HBox(false, 6); |
2756 | - sourceBox.pack_start(_source, true, true, 0); |
2757 | - sourceBox.pack_end(_is_valid, false, false, 0); |
2758 | - sourceBox.pack_end(_is_working, false, false, 0); |
2759 | - |
2760 | - content.pack_start(wrap_alignment(sourceLabel, 12, 0, 0, 0), false, true, 0); |
2761 | - content.pack_start(wrap_alignment(sourceBox, 0, 12, 0, 0), false, true, 0); |
2762 | - content.pack_start(bottomButtons, false, false, 12); |
2763 | - |
2764 | - padding.pack_start(content, true, true, 12); |
2765 | - |
2766 | - add(padding); |
2767 | - |
2768 | - existing_rss = new Gee.HashSet<string>(); |
2769 | - foreach(int i in lw.library_manager.podcast_ids()) { |
2770 | - var pod = lw.library_manager.media_from_id(i); |
2771 | - existing_rss.add(pod.podcast_rss); |
2772 | - } |
2773 | - |
2774 | - show_all(); |
2775 | - sourceChanged(); |
2776 | - |
2777 | - _save.clicked.connect(saveClicked); |
2778 | - _cancel.clicked.connect(cancel_clicked); |
2779 | - _source.activate.connect(sourceActivate); |
2780 | - _source.changed.connect(sourceChanged); |
2781 | - } |
2782 | - |
2783 | - public static Gtk.Alignment wrap_alignment (Gtk.Widget widget, int top, int right, int bottom, int left) { |
2784 | - var alignment = new Gtk.Alignment(0.0f, 0.0f, 1.0f, 1.0f); |
2785 | - alignment.top_padding = top; |
2786 | - alignment.right_padding = right; |
2787 | - alignment.bottom_padding = bottom; |
2788 | - alignment.left_padding = left; |
2789 | - |
2790 | - alignment.add(widget); |
2791 | - return alignment; |
2792 | - } |
2793 | - |
2794 | - void cancel_clicked () { |
2795 | - destroy (); |
2796 | - } |
2797 | - |
2798 | - void saveClicked() { |
2799 | - var success = lw.library_manager.pm.parse_new_rss(_source.get_text()); |
2800 | - |
2801 | - if(success) |
2802 | - this.destroy(); |
2803 | - else { |
2804 | - lw.doAlert(_("No Podcasts Found"), _("The provided source is invalid. Make sure you are entering an RSS feed in XML format.")); |
2805 | - } |
2806 | - } |
2807 | - |
2808 | - void sourceActivate() { |
2809 | - saveClicked(); |
2810 | - } |
2811 | - |
2812 | - void sourceChanged() { |
2813 | - string url = _source.get_text(); |
2814 | - |
2815 | - // simple quick validation |
2816 | - if(!url.has_prefix("http://") || url.contains(" ") || existing_rss.contains(url)) { |
2817 | - _is_valid.set_from_pixbuf(not_valid); |
2818 | - _is_valid.show(); |
2819 | - _is_working.hide(); |
2820 | - _save.set_sensitive(false); |
2821 | - next = ""; |
2822 | - } |
2823 | - else { |
2824 | - _is_working.show(); |
2825 | - _is_valid.hide(); |
2826 | - |
2827 | - if(already_validating) { |
2828 | - next = url; |
2829 | - } |
2830 | - else { |
2831 | - already_validating = true; |
2832 | - next = url; |
2833 | - |
2834 | - try { |
2835 | - Thread.create<void*>(test_url_validity, false); |
2836 | - } |
2837 | - catch(GLib.ThreadError err) { |
2838 | - stdout.printf("ERROR: Could not create thread to fetch new podcasts: %s \n", err.message); |
2839 | - } |
2840 | - } |
2841 | - } |
2842 | - } |
2843 | - |
2844 | - public void* test_url_validity () { |
2845 | - bool is_valid = false; |
2846 | - while(next != "") { |
2847 | - var previous_url = next; |
2848 | - next = ""; |
2849 | - is_valid = lw.library_manager.pm.is_valid_rss(previous_url) && !existing_rss.contains(previous_url); |
2850 | - } |
2851 | - |
2852 | - Idle.add( () => { |
2853 | - _is_working.hide(); |
2854 | - _is_valid.show(); |
2855 | - if(is_valid) |
2856 | - _is_valid.set_from_pixbuf(valid); |
2857 | - else |
2858 | - _is_valid.set_from_pixbuf(not_valid); |
2859 | - |
2860 | - _save.set_sensitive(is_valid); |
2861 | - |
2862 | - already_validating = false; |
2863 | - return false; |
2864 | - }); |
2865 | - |
2866 | - return null; |
2867 | - } |
2868 | -} |
2869 | |
2870 | === removed file 'plugins/podcasts/src/PodcastEditor.vala' |
2871 | --- plugins/podcasts/src/PodcastEditor.vala 2012-07-26 17:29:26 +0000 |
2872 | +++ plugins/podcasts/src/PodcastEditor.vala 1970-01-01 00:00:00 +0000 |
2873 | @@ -1,273 +0,0 @@ |
2874 | -/*- |
2875 | - * Copyright (c) 2011-2012 Scott Ringwelski <sgringwe@mtu.edu> |
2876 | - * |
2877 | - * Originaly Written by Scott Ringwelski for BeatBox Music Player |
2878 | - * BeatBox Music Player: http://www.launchpad.net/beat-box |
2879 | - * |
2880 | - * This library is free software; you can redistribute it and/or |
2881 | - * modify it under the terms of the GNU Library General Public |
2882 | - * License as published by the Free Software Foundation; either |
2883 | - * version 2 of the License, or (at your option) any later version. |
2884 | - * |
2885 | - * This library is distributed in the hope that it will be useful, |
2886 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2887 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2888 | - * Library General Public License for more details. |
2889 | - * |
2890 | - * You should have received a copy of the GNU Library General Public |
2891 | - * License along with this library; if not, write to the |
2892 | - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
2893 | - * Boston, MA 02111-1307, USA. |
2894 | - */ |
2895 | - |
2896 | -using Gtk; |
2897 | -using Gee; |
2898 | -using Granite; |
2899 | - |
2900 | -public class Noise.PodcastEditor : Window { |
2901 | - LibraryManager _lm; |
2902 | - |
2903 | - LinkedList<int> _allPodcasts; |
2904 | - LinkedList<int> _podcasts; |
2905 | - |
2906 | - //for padding around notebook mostly |
2907 | - private VBox content; |
2908 | - private HBox padding; |
2909 | - |
2910 | - private VBox vert; // separates editors with buttons and other stuff |
2911 | - private HBox horiz; // separates text with numerical editors |
2912 | - private VBox textVert; // separates text editors |
2913 | - private VBox numerVert; // separates numerical editors |
2914 | - |
2915 | - private HashMap<string, FieldEditor> fields;// a hashmap with each property and corresponding editor |
2916 | - |
2917 | - private Button _previous; |
2918 | - private Button _next; |
2919 | - private Button _save; |
2920 | - |
2921 | - public signal void podcasts_saved(LinkedList<int> podcasts); |
2922 | - |
2923 | - public PodcastEditor(LibraryManager lm, LinkedList<int> allPodcasts, LinkedList<int> podcasts) { |
2924 | - this.window_position = WindowPosition.CENTER; |
2925 | - this.type_hint = Gdk.WindowTypeHint.DIALOG; |
2926 | - this.set_modal(true); |
2927 | - this.set_transient_for(lm.lw); |
2928 | - this.destroy_with_parent = true; |
2929 | - content = new VBox(false, 10); |
2930 | - |
2931 | - set_size_request (520, -1); |
2932 | - resizable = false; |
2933 | - |
2934 | - _lm = lm; |
2935 | - |
2936 | - _allPodcasts = allPodcasts; |
2937 | - _podcasts = podcasts; |
2938 | - |
2939 | - HButtonBox buttonSep = new HButtonBox(); |
2940 | - buttonSep.set_layout(ButtonBoxStyle.END); |
2941 | - _previous = new Button.with_label("Previous"); |
2942 | - _next = new Button.with_label("Next"); |
2943 | - _save = new Button.with_label("Done"); |
2944 | - |
2945 | - buttonSep.pack_start(_previous, false, false, 0); |
2946 | - buttonSep.pack_start(_next, false, false, 0); |
2947 | - buttonSep.pack_end(_save, false, false, 0); |
2948 | - |
2949 | - content.pack_start(wrap_alignment(createBasicViewport(), 10, 0, 0, 0), true, true, 0); |
2950 | - content.pack_start(wrap_alignment(buttonSep, 0, 0, 10, 0), false, true, 0); |
2951 | - |
2952 | - (buttonSep as Gtk.ButtonBox).set_child_secondary(_next, true); |
2953 | - (buttonSep as Gtk.ButtonBox).set_child_secondary(_previous, true); |
2954 | - |
2955 | - padding.pack_start(content, true, true, 10); |
2956 | - add(padding); |
2957 | - |
2958 | - show_all(); |
2959 | - |
2960 | - _next.sensitive = allPodcasts.size > 1; |
2961 | - _previous.sensitive = allPodcasts.size > 1; |
2962 | - |
2963 | - if(_podcasts.size == 1) { |
2964 | - foreach(FieldEditor fe in fields.values) |
2965 | - fe.set_check_visible(false); |
2966 | - } |
2967 | - |
2968 | - _previous.clicked.connect(previousClicked); |
2969 | - _next.clicked.connect(nextClicked); |
2970 | - _save.clicked.connect(saveClicked); |
2971 | - } |
2972 | - |
2973 | - public Viewport createBasicViewport() { |
2974 | - Viewport rv = new Viewport(null, null); |
2975 | - fields = new HashMap<string, FieldEditor>(); |
2976 | - Media sum = _lm.media_from_id(_podcasts.get(0)).copy(); |
2977 | - |
2978 | - /** find what these podcasts have what common, and keep those values **/ |
2979 | - foreach(int i in _podcasts) { |
2980 | - Media s = _lm.media_from_id(i); |
2981 | - |
2982 | - if(s.track != sum.track) // episode |
2983 | - sum.track = 0; |
2984 | - if(s.title != sum.title) // podcast title |
2985 | - sum.title = ""; |
2986 | - if(s.artist != sum.artist) // podcast author. if this changes, so should album_artist for sorting. |
2987 | - sum.artist = ""; |
2988 | - if(s.album != sum.album) // podcast name |
2989 | - sum.album = ""; |
2990 | - if(s.genre != sum.genre) // category |
2991 | - sum.genre = ""; |
2992 | - if(s.comment != sum.comment) |
2993 | - sum.comment = ""; |
2994 | - if(s.rating != sum.rating) |
2995 | - sum.rating = 0; |
2996 | - if(s.mediatype != sum.mediatype) |
2997 | - sum.mediatype = 0; |
2998 | - } |
2999 | - |
3000 | - if(_podcasts.size == 1) { |
3001 | - title = "Editing " + sum.title; |
3002 | - } |
3003 | - else { |
3004 | - title = "Editing " + _podcasts.size.to_string() + " podcasts"; |
3005 | - } |
3006 | - |
3007 | - if(sum.year == -1) |
3008 | - sum.year = Time().year; |
3009 | - |
3010 | - fields.set("Title", new FieldEditor("Title", sum.title, new Entry())); |
3011 | - fields.set("Author", new FieldEditor("Author", sum.artist, new Entry())); |
3012 | - fields.set("Podcast", new FieldEditor("Podcast", sum.album, new Entry())); |
3013 | - fields.set("Genre", new FieldEditor("Genre", sum.genre, new Entry())); |
3014 | - fields.set("Comment", new FieldEditor("Comment", sum.comment, new TextView())); |
3015 | - fields.set("Episode", new FieldEditor("Track", sum.track.to_string(), new SpinButton.with_range(0, 500, 1))); |
3016 | - fields.set("Rating", new FieldEditor("Rating", sum.rating.to_string(), new RatingWidget(null, false, IconSize.MENU))); |
3017 | - fields.set("Media Type", new FieldEditor("Media Type", sum.mediatype.to_string(), new ComboBoxText())); |
3018 | - |
3019 | - padding = new HBox(false, 10); |
3020 | - vert = new VBox(false, 0); |
3021 | - horiz = new HBox(false, 0); |
3022 | - textVert = new VBox(false, 0); |
3023 | - numerVert = new VBox(false, 0); |
3024 | - |
3025 | - textVert.pack_start(fields.get("Title"), false, true, 0); |
3026 | - textVert.pack_start(fields.get("Author"), false, true, 5); |
3027 | - textVert.pack_start(fields.get("Podcast"), false, true, 5); |
3028 | - textVert.pack_start(fields.get("Comment"), false, true, 5); |
3029 | - |
3030 | - numerVert.pack_start(fields.get("Episode"), false, true, 0); |
3031 | - numerVert.pack_start(fields.get("Genre"), false, true, 5); |
3032 | - numerVert.pack_start(fields.get("Rating"), false, true, 5); |
3033 | - numerVert.pack_end(fields.get("Media Type"), false, true, 5); |
3034 | - |
3035 | - horiz.pack_start(wrap_alignment(textVert, 0, 30, 0, 0), false, true, 0); |
3036 | - horiz.pack_end(numerVert, false, true, 0); |
3037 | - vert.pack_start(horiz, true, true, 0); |
3038 | - |
3039 | - rv.add(vert); |
3040 | - |
3041 | - return rv; |
3042 | - } |
3043 | - |
3044 | - public static Gtk.Alignment wrap_alignment (Gtk.Widget widget, int top, int right, int bottom, int left) { |
3045 | - var alignment = new Gtk.Alignment(0.0f, 0.0f, 1.0f, 1.0f); |
3046 | - alignment.top_padding = top; |
3047 | - alignment.right_padding = right; |
3048 | - alignment.bottom_padding = bottom; |
3049 | - alignment.left_padding = left; |
3050 | - |
3051 | - alignment.add(widget); |
3052 | - return alignment; |
3053 | - } |
3054 | - |
3055 | - public void previousClicked() { |
3056 | - save_podcasts(); |
3057 | - |
3058 | - // now fetch the next media on current_view |
3059 | - int i = 0; // will hold next media to edit |
3060 | - int indexOfCurrentFirst = _allPodcasts.index_of(_podcasts.get(0)); |
3061 | - |
3062 | - if(indexOfCurrentFirst == 0) |
3063 | - i = _allPodcasts.get(_allPodcasts.size - 1); |
3064 | - else |
3065 | - i = _allPodcasts.get(indexOfCurrentFirst - 1); |
3066 | - |
3067 | - // now fetch the previous media on current_view |
3068 | - var newpodcasts = new LinkedList<int>(); |
3069 | - newpodcasts.add(i); |
3070 | - |
3071 | - change_media(newpodcasts); |
3072 | - } |
3073 | - |
3074 | - public void nextClicked() { |
3075 | - save_podcasts(); |
3076 | - |
3077 | - // now fetch the next media on current_view |
3078 | - int i = 0; // will hold next media to edit |
3079 | - int indexOfCurrentLast = _allPodcasts.index_of(_podcasts.get(_podcasts.size - 1)); |
3080 | - |
3081 | - if(indexOfCurrentLast == _allPodcasts.size - 1) |
3082 | - i = _allPodcasts.get(0); |
3083 | - else |
3084 | - i = _allPodcasts.get(indexOfCurrentLast + 1); |
3085 | - |
3086 | - var newpodcasts = new LinkedList<int>(); |
3087 | - newpodcasts.add(i); |
3088 | - |
3089 | - change_media(newpodcasts); |
3090 | - } |
3091 | - |
3092 | - public void change_media(LinkedList<int> newpodcasts) { |
3093 | - _podcasts = newpodcasts; |
3094 | - |
3095 | - Media sum = _lm.media_from_id(newpodcasts.get(0)); |
3096 | - |
3097 | - title = "Editing " + sum.title; |
3098 | - |
3099 | - /* do not show check boxes for 1 media */ |
3100 | - foreach(FieldEditor fe in fields.values) |
3101 | - fe.set_check_visible(false); |
3102 | - |
3103 | - fields.get("Title").set_value(sum.title); |
3104 | - fields.get("Author").set_value(sum.artist); |
3105 | - fields.get("Podcast").set_value(sum.album); |
3106 | - fields.get("Genre").set_value(sum.genre); |
3107 | - fields.get("Comment").set_value(sum.comment); |
3108 | - fields.get("Episode").set_value(sum.track.to_string()); |
3109 | - fields.get("Rating").set_value(sum.rating.to_string()); |
3110 | - fields.get("Media Type").set_value(sum.mediatype.to_string()); |
3111 | - } |
3112 | - |
3113 | - public void save_podcasts() { |
3114 | - foreach(int i in _podcasts) { |
3115 | - Media s = _lm.media_from_id(i); |
3116 | - |
3117 | - if(fields.get("Title").checked()) |
3118 | - s.title = fields.get("Title").get_value(); |
3119 | - if(fields.get("Author").checked()) { |
3120 | - s.artist = fields.get("Author").get_value(); |
3121 | - s.album_artist = s.artist; |
3122 | - } |
3123 | - if(fields.get("Podcast").checked()) |
3124 | - s.album = fields.get("Podcast").get_value(); |
3125 | - if(fields.get("Genre").checked()) |
3126 | - s.genre = fields.get("Genre").get_value(); |
3127 | - if(fields.get("Comment").checked()) |
3128 | - s.comment = fields.get("Comment").get_value(); |
3129 | - |
3130 | - if(fields.get("Episode").checked()) |
3131 | - s.track = int.parse(fields.get("Episode").get_value()); |
3132 | - if(fields.get("Rating").checked()) |
3133 | - s.rating = int.parse(fields.get("Rating").get_value()); |
3134 | - if(fields.get("Media Type").checked()) |
3135 | - s.mediatype = int.parse(fields.get("Media Type").get_value()); |
3136 | - } |
3137 | - |
3138 | - podcasts_saved(_podcasts); |
3139 | - } |
3140 | - |
3141 | - public virtual void saveClicked() { |
3142 | - save_podcasts(); |
3143 | - |
3144 | - this.destroy(); |
3145 | - } |
3146 | -} |
3147 | |
3148 | === removed file 'plugins/podcasts/src/PodcastManager.vala' |
3149 | --- plugins/podcasts/src/PodcastManager.vala 2012-07-26 17:29:26 +0000 |
3150 | +++ plugins/podcasts/src/PodcastManager.vala 1970-01-01 00:00:00 +0000 |
3151 | @@ -1,452 +0,0 @@ |
3152 | -/*- |
3153 | - * Copyright (c) 2011-2012 Scott Ringwelski <sgringwe@mtu.edu> |
3154 | - * |
3155 | - * Originally Written by Scott Ringwelski for BeatBox Music Player |
3156 | - * BeatBox Music Player: http://www.launchpad.net/beat-box |
3157 | - * |
3158 | - * This library is free software; you can redistribute it and/or |
3159 | - * modify it under the terms of the GNU Library General Public |
3160 | - * License as published by the Free Software Foundation; either |
3161 | - * version 2 of the License, or (at your option) any later version. |
3162 | - * |
3163 | - * This library is distributed in the hope that it will be useful, |
3164 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
3165 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3166 | - * Library General Public License for more details. |
3167 | - * |
3168 | - * You should have received a copy of the GNU Library General Public |
3169 | - * License along with this library; if not, write to the |
3170 | - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
3171 | - * Boston, MA 02111-1307, USA. |
3172 | - */ |
3173 | - |
3174 | -using Gee; |
3175 | - |
3176 | -public class Noise.PodcastManager : GLib.Object { |
3177 | - LibraryManager lm; |
3178 | - LibraryWindowInterface lw; |
3179 | - bool fetching; |
3180 | - bool user_cancelled; |
3181 | - bool saving_locally; |
3182 | - |
3183 | - int index; |
3184 | - int total; |
3185 | - GLib.File new_dest; |
3186 | - int64 online_size; |
3187 | - string current_operation; |
3188 | - |
3189 | - Collection<int> save_locally_ids; |
3190 | - |
3191 | - public PodcastManager(LibraryManager lm, LibraryWindowInterface lw) { |
3192 | - this.lm = lm; |
3193 | - this.lw = lw; |
3194 | - fetching = saving_locally = false; |
3195 | - user_cancelled = false; |
3196 | - index = total = 0; |
3197 | - |
3198 | - lm.progress_cancel_clicked.connect( () => { |
3199 | - user_cancelled = true; |
3200 | - current_operation = "<b>Cancelling</b> remaining downloads..."; |
3201 | - } ); |
3202 | - } |
3203 | - |
3204 | - public void find_new_podcasts() { |
3205 | - if(fetching || lm.doing_file_operations()) { |
3206 | - stdout.printf("Not going to find new podcasts, already fetching\n"); |
3207 | - return; |
3208 | - } |
3209 | - |
3210 | - lm.start_file_operations("Fetching new Podcast Episodes"); |
3211 | - try { |
3212 | - Thread.create<void*>(find_new_podcasts_thread, false); |
3213 | - } |
3214 | - catch(GLib.ThreadError err) { |
3215 | - stdout.printf("ERROR: Could not create thread to fetch new podcasts: %s \n", err.message); |
3216 | - } |
3217 | - |
3218 | - lm.have_fetched_new_podcasts = true; |
3219 | - } |
3220 | - |
3221 | - public void* find_new_podcasts_thread () { |
3222 | - HashSet<string> rss_urls = new HashSet<string>(); |
3223 | - HashSet<string> mp3_urls = new HashSet<string>(); |
3224 | - HashMap<string, string> rss_names = new HashMap<string, string>(); |
3225 | - |
3226 | - foreach(int i in lm.podcast_ids()) { |
3227 | - var pod = lm.media_from_id(i); |
3228 | - |
3229 | - if(!pod.isTemporary) { |
3230 | - if(pod.podcast_rss != null) rss_urls.add(pod.podcast_rss); |
3231 | - if(pod.podcast_url != null) mp3_urls.add(pod.podcast_url); |
3232 | - if(pod.podcast_rss != null) rss_names.set(pod.podcast_rss, pod.artist); |
3233 | - } |
3234 | - } |
3235 | - |
3236 | - index = 0; |
3237 | - total = 10 * rss_urls.size; |
3238 | - current_operation = "Looking for new episodes"; |
3239 | - fetching = true; |
3240 | - user_cancelled = false; |
3241 | - Timeout.add(500, doProgressNotificationWithTimeout); |
3242 | - |
3243 | - LinkedList<Media> new_podcasts = new LinkedList<Media>(); |
3244 | - var rss_index = 0; |
3245 | - foreach(string rss in rss_urls) { |
3246 | - if(user_cancelled) |
3247 | - break; |
3248 | - |
3249 | - if(rss == null || rss == "") |
3250 | - continue; |
3251 | - |
3252 | - current_operation = "Searching for new <b>" + rss_names.get(rss).replace("&", "&") + "</b> podcast episodes..."; |
3253 | - |
3254 | - // create an HTTP session to twitter |
3255 | - var session = new Soup.SessionSync(); |
3256 | - var message = new Soup.Message ("GET", rss); |
3257 | - session.timeout = 30; |
3258 | - |
3259 | - // send the HTTP request |
3260 | - session.send_message(message); |
3261 | - |
3262 | - Xml.Node* node = getRootNode(message); |
3263 | - if(node != null) { |
3264 | - findNewItems(rss, node, mp3_urls, ref new_podcasts); |
3265 | - } |
3266 | - |
3267 | - ++rss_index; |
3268 | - index = rss_index * 10; |
3269 | - } |
3270 | - |
3271 | - index = total + 1; |
3272 | - fetching = false; |
3273 | - |
3274 | - Idle.add( () => { |
3275 | - lm.add_medias(new_podcasts, true); |
3276 | - lw.update_sensitivities(); |
3277 | - lw.updateInfoLabel(); |
3278 | - lm.finish_file_operations(); |
3279 | - |
3280 | - if(lm.settings.getDownloadNewPodcasts()) { |
3281 | - var new_podcast_ids = new LinkedList<int>(); |
3282 | - foreach(var s in new_podcasts) |
3283 | - new_podcast_ids.add(s.rowid); |
3284 | - |
3285 | - save_episodes_locally(new_podcast_ids); |
3286 | - } |
3287 | - |
3288 | - return false; |
3289 | - }); |
3290 | - |
3291 | - return null; |
3292 | - } |
3293 | - |
3294 | - public bool is_valid_rss(string url) { |
3295 | - // create an HTTP session to twitter |
3296 | - var session = new Soup.SessionSync(); |
3297 | - var message = new Soup.Message ("GET", url); |
3298 | - |
3299 | - // send the HTTP request |
3300 | - session.send_message(message); |
3301 | - |
3302 | - Xml.Node* node = getRootNode(message); |
3303 | - stdout.printf("got root node\n"); |
3304 | - if(node == null) |
3305 | - return false; |
3306 | - |
3307 | - return node->name == "rss"; |
3308 | - } |
3309 | - |
3310 | - public bool parse_new_rss(string rss) { |
3311 | - if(!lm.start_file_operations("Fetching podcast from <b>" + rss + "</b>")) |
3312 | - return false; |
3313 | - |
3314 | - fetching = true; |
3315 | - index = 0; |
3316 | - total = 10; |
3317 | - current_operation = "Fetching podcast from <b>" + rss + "</b>"; |
3318 | - Timeout.add(500, doProgressNotificationWithTimeout); |
3319 | - |
3320 | - stdout.printf("podcast_rss: %s\n", rss); |
3321 | - |
3322 | - // create an HTTP session to twitter |
3323 | - var session = new Soup.SessionSync(); |
3324 | - var message = new Soup.Message ("GET", rss); |
3325 | - session.timeout = 30; |
3326 | - |
3327 | - // send the HTTP request |
3328 | - session.send_message(message); |
3329 | - |
3330 | - Xml.Node* node = getRootNode(message); |
3331 | - stdout.printf("got root node\n"); |
3332 | - if(node == null) { |
3333 | - fetching = false; |
3334 | - return false; |
3335 | - } |
3336 | - |
3337 | - HashSet<string> mp3_urls = new HashSet<string>(); |
3338 | - LinkedList<Media> new_podcasts = new LinkedList<Media>(); |
3339 | - foreach(int i in lm.podcast_ids()) { |
3340 | - var pod = lm.media_from_id(i); |
3341 | - |
3342 | - mp3_urls.add(pod.podcast_url); |
3343 | - } |
3344 | - |
3345 | - findNewItems(rss, node, mp3_urls, ref new_podcasts); |
3346 | - |
3347 | - index = 11; |
3348 | - fetching = false; |
3349 | - |
3350 | - lm.add_medias(new_podcasts, true); |
3351 | - lm.finish_file_operations(); |
3352 | - |
3353 | - return new_podcasts.size > 0; |
3354 | - } |
3355 | - |
3356 | - public Xml.Node* getRootNode(Soup.Message message) { |
3357 | - Xml.Parser.init(); |
3358 | - Xml.Doc* doc = Xml.Parser.parse_memory((string)message.response_body.data, (int)message.response_body.length); |
3359 | - if(doc == null) |
3360 | - return null; |
3361 | - //stdout.printf("%s\n", (string)message.response_body.data); |
3362 | - Xml.Node* root = doc->get_root_element (); |
3363 | - if (root == null) { |
3364 | - delete doc; |
3365 | - return null; |
3366 | - } |
3367 | - |
3368 | - // we actually want one level down from root. top level is <response status="ok" ... > |
3369 | - return root; |
3370 | - } |
3371 | - |
3372 | - // parses a xml root node for new podcasts |
3373 | - public void findNewItems(string rss, Xml.Node* node, HashSet<string> existing, ref LinkedList<Media> found) { |
3374 | - string pod_title = ""; string pod_author = ""; string category = ""; string summary = ""; string image_url = ""; |
3375 | - int image_width, image_height; |
3376 | - int visited_items = 0; |
3377 | - |
3378 | - node = node->children->next; |
3379 | - |
3380 | - for (Xml.Node* iter = node->children; iter != null; iter = iter->next) { |
3381 | - if (iter->type != Xml.ElementType.ELEMENT_NODE) { |
3382 | - continue; // should this be break? |
3383 | - } |
3384 | - |
3385 | - string name = iter->name; |
3386 | - string content = iter->get_content(); |
3387 | - |
3388 | - if(name == "title") |
3389 | - pod_title = content.replace("\n","").replace("\t","").replace("\r",""); |
3390 | - else if(name == "author") |
3391 | - pod_author = content.replace("\n","").replace("\t","").replace("\r",""); |
3392 | - else if(name == "category") { |
3393 | - if(content != "") |
3394 | - category = content.replace("\n","").replace("\t","").replace("\r",""); |
3395 | - |
3396 | - for (Xml.Attr* prop = iter->properties; prop != null; prop = prop->next) { |
3397 | - string attr_name = prop->name; |
3398 | - string attr_content = prop->children->content; |
3399 | - |
3400 | - if(attr_name == "text" && attr_content != "") { |
3401 | - category = attr_content; |
3402 | - } |
3403 | - } |
3404 | - } |
3405 | - else if(name == "image") { |
3406 | - for (Xml.Node* image_iter = iter->children; image_iter != null; image_iter = image_iter->next) { |
3407 | - if(image_iter->name == "url") |
3408 | - image_url = image_iter->get_content(); |
3409 | - else if(image_iter->name == "width") |
3410 | - image_width = int.parse(image_iter->get_content()); |
3411 | - else if(image_iter->name == "height") |
3412 | - image_height = int.parse(image_iter->get_content()); |
3413 | - } |
3414 | - } |
3415 | - else if(name == "summary" || name == "description") { |
3416 | - summary = iter->get_content().replace("\n","").replace("\t","").replace("\r",""); |
3417 | - } |
3418 | - else if(name == "item") { |
3419 | - Media new_p = new Media(""); |
3420 | - |
3421 | - for (Xml.Node* item_iter = iter->children; item_iter != null; item_iter = item_iter->next) { |
3422 | - //stdout.printf("name is %s\n", item_iter->name); |
3423 | - if(item_iter->name == "title") |
3424 | - new_p.title = item_iter->get_content(); |
3425 | - else if(name == "author") { |
3426 | - pod_author = item_iter->get_content().replace("\n","").replace("\t","").replace("\r",""); |
3427 | - new_p.artist = pod_author; |
3428 | - new_p.album_artist = pod_author; |
3429 | - } |
3430 | - else if(item_iter->name == "enclosure") { |
3431 | - for (Xml.Attr* prop = item_iter->properties; prop != null; prop = prop->next) { |
3432 | - string attr_name = prop->name; |
3433 | - string attr_content = prop->children->content; |
3434 | - |
3435 | - if(attr_name == "url") { |
3436 | - new_p.podcast_url = attr_content; |
3437 | - new_p.uri = attr_content; |
3438 | - } |
3439 | - } |
3440 | - } |
3441 | - else if(item_iter->name == "pubDate") { |
3442 | - GLib.Time tm = GLib.Time (); |
3443 | - tm.strptime (item_iter->get_content(), |
3444 | - "%a, %d %b %Y %H:%M:%S %Z"); |
3445 | - new_p.podcast_date = int.parse(tm.format("%s")); |
3446 | - } |
3447 | - else if(item_iter->name == "duration") { |
3448 | - string[] dur_pieces = item_iter->get_content().split(":", 0); |
3449 | - |
3450 | - int seconds = 0; int minutes = 0; int hours = 0; |
3451 | - seconds = int.parse(dur_pieces[dur_pieces.length - 1]); |
3452 | - if(dur_pieces.length > 1) |
3453 | - minutes = int.parse(dur_pieces[dur_pieces.length - 2]); |
3454 | - if(dur_pieces.length > 2) |
3455 | - hours = int.parse(dur_pieces[dur_pieces.length - 3]); |
3456 | - |
3457 | - new_p.length = seconds + (minutes * 60) + (hours * 3600); |
3458 | - } |
3459 | - else if(item_iter->name == "subtitle" || item_iter->name == "description") { |
3460 | - new_p.comment = item_iter->get_content().replace("\n","").replace("\t","").replace("\r",""); |
3461 | - } |
3462 | - } |
3463 | - |
3464 | - if(new_p.podcast_url != null && !existing.contains(new_p.podcast_url) && new_p.podcast_url != "") { |
3465 | - if(pod_author == null || pod_author == "") |
3466 | - pod_author = pod_title; |
3467 | - if(category == null || category == "") |
3468 | - category = "Podcast"; |
3469 | - |
3470 | - new_p.mediatype = 1; |
3471 | - new_p.podcast_rss = rss; |
3472 | - new_p.genre = category; |
3473 | - new_p.artist = pod_author; |
3474 | - new_p.album_artist = pod_author; |
3475 | - new_p.album = pod_title; |
3476 | - //new_p.album = ?? |
3477 | - if(new_p.comment == "") new_p.comment = summary; |
3478 | - |
3479 | - found.add(new_p); |
3480 | - } |
3481 | - |
3482 | - ++visited_items; |
3483 | - ++index; |
3484 | - |
3485 | - //if(visited_items >= max_items - 1) |
3486 | - // return; |
3487 | - } |
3488 | - } |
3489 | - } |
3490 | - |
3491 | - public void save_episodes_locally(Collection<int> ids) { |
3492 | - if(fetching) { |
3493 | - stdout.printf("Not going to download episodes. Must wait to finish fetching.\n"); |
3494 | - return; |
3495 | - } |
3496 | - else if(lm.doing_file_operations()) { |
3497 | - stdout.printf("Can't download episodes. Already doing file operations.\n"); |
3498 | - return; |
3499 | - } |
3500 | - else if(!File.new_for_path(lm.settings.getMusicFolder()).query_exists()) { |
3501 | - //lw.doAlert("Could not save locally", "The music folder could not be found. It may need to be mounted"); |
3502 | - return; |
3503 | - } |
3504 | - |
3505 | - save_locally_ids = ids; |
3506 | - |
3507 | - try { |
3508 | - Thread.create<void*>(save_episodes_locally_thread, false); |
3509 | - } |
3510 | - catch(GLib.ThreadError err) { |
3511 | - stdout.printf("ERROR: Could not create thread to save episodes locally: %s \n", err.message); |
3512 | - } |
3513 | - } |
3514 | - |
3515 | - public void* save_episodes_locally_thread () { |
3516 | - if(save_locally_ids == null || save_locally_ids.size == 0) |
3517 | - return null; |
3518 | - |
3519 | - lm.start_file_operations(null); |
3520 | - saving_locally = true; |
3521 | - user_cancelled = false; |
3522 | - index = 0; |
3523 | - total = save_locally_ids.size; |
3524 | - Timeout.add(500, doProgressNotificationWithTimeoutSaveLocally); |
3525 | - |
3526 | - foreach(var i in save_locally_ids) { |
3527 | - if(user_cancelled) |
3528 | - break; |
3529 | - |
3530 | - Media s = lm.media_from_id(i); |
3531 | - var online_file = File.new_for_uri(s.podcast_url); |
3532 | - if(online_file.query_exists() && s.uri == s.uri) { |
3533 | - current_operation = "Downloading <b>" + s.title + "</b> (" + (index + 1).to_string() + " of " + save_locally_ids.size.to_string() + ")"; |
3534 | - |
3535 | - try { |
3536 | - online_size = online_file.query_info("*", FileQueryInfoFlags.NONE).get_size(); |
3537 | - } |
3538 | - catch(Error err) { |
3539 | - stdout.printf("Could not read online podcast file's size for progress notification: %s\n", err.message); |
3540 | - } |
3541 | - |
3542 | - new_dest = lm.fo.get_new_destination(s); |
3543 | - lm.fo.update_file_hierarchy(s, false, true); |
3544 | - |
3545 | - int file_size = 5; // 5 is sane backup |
3546 | - try { |
3547 | - file_size = (int)(new_dest.query_info("*", FileQueryInfoFlags.NONE).get_size() / 1000000); |
3548 | - } |
3549 | - catch(Error err) { |
3550 | - stdout.printf("Could not calculate downloaded podcast's file size: %s\n", err.message); |
3551 | - } |
3552 | - |
3553 | - s.file_size = file_size; |
3554 | - } |
3555 | - else { |
3556 | - stdout.printf("Skipped downloading podcast %s. Either not connected to internet, or is already saved locally.\n", s.title); |
3557 | - } |
3558 | - ++index; |
3559 | - } |
3560 | - |
3561 | - index = total + 1; |
3562 | - |
3563 | - Idle.add( () => { |
3564 | - lm.finish_file_operations(); |
3565 | - saving_locally = false; |
3566 | - |
3567 | - return false; |
3568 | - }); |
3569 | - |
3570 | - return null; |
3571 | - } |
3572 | - |
3573 | - public bool doProgressNotificationWithTimeout() { |
3574 | - if(fetching) |
3575 | - lw.progressNotification(current_operation.replace("&", "&"), (double)((double)index/(double)total)); |
3576 | - |
3577 | - if(index < total && fetching) { |
3578 | - return true; |
3579 | - } |
3580 | - |
3581 | - return false; |
3582 | - } |
3583 | - |
3584 | - public bool doProgressNotificationWithTimeoutSaveLocally() { |
3585 | - int64 current_local_size = 0; |
3586 | - if(new_dest != null && new_dest.query_exists()) { |
3587 | - try { |
3588 | - current_local_size = new_dest.query_info("*", FileQueryInfoFlags.NONE).get_size(); |
3589 | - } |
3590 | - catch(Error err) { |
3591 | - stdout.printf("Error reading current size of downloaded podcast: %s\n", err.message); |
3592 | - } |
3593 | - } |
3594 | - |
3595 | - lw.progressNotification(current_operation.replace("&", "&"), (double)(((double)index + (double)((double)current_local_size/(double)online_size))/((double)total))); |
3596 | - |
3597 | - if(index < total && lm.doing_file_operations()) { |
3598 | - return true; |
3599 | - } |
3600 | - |
3601 | - return false; |
3602 | - } |
3603 | -} |
3604 | |
3605 | === removed file 'plugins/podcasts/src/Podcasts.vala' |
3606 | --- plugins/podcasts/src/Podcasts.vala 2012-07-26 17:29:26 +0000 |
3607 | +++ plugins/podcasts/src/Podcasts.vala 1970-01-01 00:00:00 +0000 |
3608 | @@ -1,17 +0,0 @@ |
3609 | -public class Noise.Plugins.Podcasts : Noise.Plugins.Activatable, Object |
3610 | -{ |
3611 | - public Iface object { set; owned get; } |
3612 | - public void activate () { |
3613 | - print ("Hello World!\n"); |
3614 | - } |
3615 | - public void deactivate () { |
3616 | - print ("Bye World!\n"); |
3617 | - } |
3618 | -} |
3619 | - |
3620 | -[ModuleInit] |
3621 | -public void peas_register_types (GLib.TypeModule module) { |
3622 | - var objmodule = module as Peas.ObjectModule; |
3623 | - objmodule.register_extension_type (typeof (Noise.Plugins.Activatable), |
3624 | - typeof (Noise.Plugins.Podcasts)); |
3625 | -} |
3626 | |
3627 | === removed directory 'plugins/podcasts/src/View' |
3628 | === removed file 'plugins/podcasts/src/View/PodcastListView.vala' |
3629 | --- plugins/podcasts/src/View/PodcastListView.vala 2012-08-12 00:01:08 +0000 |
3630 | +++ plugins/podcasts/src/View/PodcastListView.vala 1970-01-01 00:00:00 +0000 |
3631 | @@ -1,841 +0,0 @@ |
3632 | -/*- |
3633 | - * Copyright (c) 2011-2012 Scott Ringwelski <sgringwe@mtu.edu> |
3634 | - * |
3635 | - * Originally Written by Scott Ringwelski for BeatBox Music Player |
3636 | - * BeatBox Music Player: http://www.launchpad.net/beat-box |
3637 | - * |
3638 | - * This library is free software; you can redistribute it and/or |
3639 | - * modify it under the terms of the GNU Library General Public |
3640 | - * License as published by the Free Software Foundation; either |
3641 | - * version 2 of the License, or (at your option) any later version. |
3642 | - * |
3643 | - * This library is distributed in the hope that it will be useful, |
3644 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
3645 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3646 | - * Library General Public License for more details. |
3647 | - * |
3648 | - * You should have received a copy of the GNU Library General Public |
3649 | - * License along with this library; if not, write to the |
3650 | - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
3651 | - * Boston, MA 02111-1307, USA. |
3652 | - */ |
3653 | - |
3654 | -using Gee; |
3655 | -using Gtk; |
3656 | - |
3657 | -public class Noise.PodcastListView : GenericView { |
3658 | - |
3659 | - |
3660 | - public TreeViewSetup podcast_setup { set; get; } |
3661 | - |
3662 | - //for header column chooser |
3663 | - Gtk.Menu columnChooserMenu; |
3664 | - CheckMenuItem columnEpisode; // episode |
3665 | - CheckMenuItem columnName; // name |
3666 | - CheckMenuItem columnLength; |
3667 | - CheckMenuItem columnArtist; |
3668 | - CheckMenuItem columnPodcast; |
3669 | - CheckMenuItem columnDate; |
3670 | - CheckMenuItem columnRating; |
3671 | - CheckMenuItem columnComments; |
3672 | - CheckMenuItem columnCategory; |
3673 | - |
3674 | - //for media list right click |
3675 | - Gtk.Menu mediaMenuActionMenu; |
3676 | - Gtk.MenuItem mediaEditMedia; |
3677 | - Gtk.MenuItem mediaFileBrowse; |
3678 | - Gtk.MenuItem mediaMenuQueue; |
3679 | - Gtk.MenuItem mediaMenuNewPlaylist; |
3680 | - Gtk.MenuItem mediaMenuAddToPlaylist; // make menu on fly |
3681 | - RatingWidgetMenu mediaRateMedia; |
3682 | - Gtk.MenuItem mediaRemove; |
3683 | - Gtk.MenuItem mediaSaveLocally; |
3684 | - Gtk.MenuItem importToLibrary; |
3685 | - |
3686 | - // for editing cells in-treeview |
3687 | - CellRendererText cellTrack; |
3688 | - CellRendererText cellTitle; |
3689 | - CellRendererText cellLength; |
3690 | - CellRendererText cellArtist; |
3691 | - SmartAlbumRenderer cellAlbum; |
3692 | - CellRendererText cellGenre; |
3693 | - CellRendererText cellYear; |
3694 | - CellRendererPixbuf cellRating; |
3695 | - CellRendererText cellSkips; |
3696 | - CellRendererText cellPlays; |
3697 | - |
3698 | - public enum PodcastColumn { |
3699 | - ROWID, |
3700 | - ICON, |
3701 | - EPISODE, |
3702 | - NAME, |
3703 | - LENGTH, |
3704 | - ARTIST, |
3705 | - PODCAST, |
3706 | - DATE, |
3707 | - CATEGORY, |
3708 | - COMMENT, |
3709 | - RATING, |
3710 | - PULSER |
3711 | - } |
3712 | - |
3713 | - |
3714 | - public PodcastListView(LibraryManager lm, TreeViewSetup tvs, int rel_id) { |
3715 | - var types = new GLib.List<Type>(); |
3716 | - types.append(typeof(int)); // id |
3717 | - types.append(typeof(GLib.Icon)); // icon |
3718 | - types.append(typeof(int)); // episode (track) |
3719 | - types.append(typeof(string)); // name (title) |
3720 | - types.append(typeof(int)); // length |
3721 | - types.append(typeof(string)); // artist |
3722 | - types.append(typeof(string)); // album |
3723 | - types.append(typeof(int)); // date |
3724 | - types.append(typeof(string)); // category (genre) |
3725 | - types.append(typeof(string)); // comment |
3726 | - types.append(typeof(int)); // rating |
3727 | - types.append(typeof(int)); // pulser |
3728 | - base(lm, types, tvs, rel_id); |
3729 | - |
3730 | - //last_search = ""; |
3731 | - //timeout_search = new LinkedList<string>(); |
3732 | - //showing_all = true; |
3733 | - //removing_medias = false; |
3734 | - |
3735 | - buildUI(); |
3736 | - } |
3737 | - |
3738 | - public override void update_sensitivities() { |
3739 | - mediaMenuActionMenu.show_all(); |
3740 | - |
3741 | - if(get_hint() == ViewWrapper.Hint.PODCAST) { |
3742 | - mediaRemove.set_sensitive(true); |
3743 | - mediaRemove.set_label("Remove from Library"); |
3744 | - importToLibrary.set_visible(false); |
3745 | - } |
3746 | - else if(get_hint() == ViewWrapper.Hint.DEVICE_PODCAST) { |
3747 | - mediaRemove.set_visible(false); |
3748 | - mediaRemove.set_label("TODO: Remove from device"); |
3749 | - importToLibrary.set_visible(true); |
3750 | - mediaSaveLocally.set_visible(false); |
3751 | - mediaMenuAddToPlaylist.set_visible(false); |
3752 | - mediaMenuNewPlaylist.set_visible(false); |
3753 | - } |
3754 | - else { |
3755 | - mediaRemove.set_sensitive(false); |
3756 | - } |
3757 | - } |
3758 | - |
3759 | - public void buildUI() { |
3760 | - cellTrack = new CellRendererText(); |
3761 | - cellTitle = new CellRendererText(); |
3762 | - cellLength = new CellRendererText(); |
3763 | - cellArtist = new CellRendererText(); |
3764 | - cellAlbum = new SmartAlbumRenderer(); |
3765 | - cellGenre = new CellRendererText(); |
3766 | - cellYear = new CellRendererText(); |
3767 | - cellRating = new CellRendererPixbuf(); |
3768 | - cellSkips = new CellRendererText(); |
3769 | - cellPlays = new CellRendererText(); |
3770 | - |
3771 | - cellRating.xalign = 0.0f; |
3772 | - |
3773 | - //cellTitle.editable = false; |
3774 | - //cellTitle.edited.connect(cellTitleEdited); |
3775 | - |
3776 | - /* id is always first and is stored as an int. Then the rest are (1) |
3777 | - * strings (for simplicity), and include: |
3778 | - * #, track, title, artist, album, genre, comment, year, rating, (9) |
3779 | - * bitrate, play count, last played, date added, file name, (5) |
3780 | - * bpm, length, file size, (3) */ |
3781 | - var to_use = new GLib.List<TreeViewColumn>(); |
3782 | - var originalOrder = new GLib.List<TreeViewColumn>(); |
3783 | - var correctStringOrder = new GLib.List<string>(); |
3784 | - to_use = tvs.get_columns(); |
3785 | - |
3786 | - /* put them in the order for treemodel */ |
3787 | - foreach(var tvc in to_use) { |
3788 | - originalOrder.append(tvc); |
3789 | - correctStringOrder.append(tvc.title); |
3790 | - } |
3791 | - |
3792 | - int index = 0; |
3793 | - foreach(TreeViewColumn tvc in originalOrder) { |
3794 | - if(!(tvc.title == " " || tvc.title == "id")) { |
3795 | - if(tvc.title == "Length") |
3796 | - insert_column_with_data_func(-1, tvc.title, cellLength, cellHelper.lengthTreeViewFiller); |
3797 | - else if(tvc.title == "Rating") |
3798 | - insert_column_with_data_func(-1, tvc.title, cellRating, cellHelper.ratingTreeViewFiller); |
3799 | - else if(tvc.title == "Date") |
3800 | - insert_column_with_data_func(-1, tvc.title, cellYear, cellHelper.dateTreeViewFiller); |
3801 | - else if(tvc.title == "Episode") |
3802 | - insert_column_with_data_func(-1, tvc.title, cellTrack, cellHelper.intelligentTreeViewFiller); |
3803 | - else if(tvc.title == "Name") |
3804 | - insert_column_with_data_func(-1, tvc.title, cellTitle, cellHelper.stringTreeViewFiller); |
3805 | - else if(tvc.title == "Artist") |
3806 | - insert_column_with_data_func(-1, tvc.title, cellArtist, cellHelper.stringTreeViewFiller); |
3807 | - else if(tvc.title == "Comment") |
3808 | - insert_column_with_data_func(-1, tvc.title, new CellRendererText(), cellHelper.stringTreeViewFiller); |
3809 | - else if(tvc.title == "Category") |
3810 | - insert_column_with_data_func(-1, tvc.title, new CellRendererText(), cellHelper.stringTreeViewFiller); |
3811 | - else if(tvc.title == "Podcast") |
3812 | - insert_column_with_data_func(-1, tvc.title, cellAlbum, cellHelper.smartAlbumFiller); |
3813 | - else { |
3814 | - insert_column(tvc, index); |
3815 | - } |
3816 | - |
3817 | - |
3818 | - get_column(index).resizable = true; |
3819 | - get_column(index).reorderable = false; |
3820 | - get_column(index).clickable = true; |
3821 | - get_column(index).sort_column_id = index; |
3822 | - get_column(index).set_sort_indicator(false); |
3823 | - get_column(index).visible = tvc.visible; |
3824 | - get_column(index).sizing = Gtk.TreeViewColumnSizing.FIXED; |
3825 | - get_column(index).fixed_width = tvc.fixed_width; |
3826 | - } |
3827 | - else if(tvc.title == " ") { |
3828 | - insert_column(tvc, index); |
3829 | - |
3830 | - tvc.fixed_width = 24; |
3831 | - tvc.clickable = false; |
3832 | - tvc.sort_column_id = -1; |
3833 | - tvc.resizable = false; |
3834 | - tvc.reorderable = false; |
3835 | - |
3836 | - tvc.clear_attributes (tvc.get_cells().nth_data(0)); |
3837 | - tvc.clear_attributes (tvc.get_cells().nth_data(1)); |
3838 | - |
3839 | - tvc.set_cell_data_func(tvc.get_cells().nth_data(0), iconDataFunc); |
3840 | - tvc.set_cell_data_func(tvc.get_cells().nth_data(1), iconDataFunc); |
3841 | - } |
3842 | - else if(tvc.title == "id") { |
3843 | - insert_column(tvc, index); |
3844 | - } |
3845 | - else { |
3846 | - insert_column(tvc, index); |
3847 | - } |
3848 | - |
3849 | - get_column(index).get_button().button_press_event.connect(viewHeaderClick); |
3850 | - get_column(index).notify["width"].connect(viewHeadersResized); |
3851 | - |
3852 | - ++index; |
3853 | - } |
3854 | - |
3855 | - set_compare_func(view_compare_func); |
3856 | - set_search_func(view_search_func); |
3857 | - set_value_func(view_value_func); |
3858 | - |
3859 | - //rearrangeColumns(correctStringOrder); |
3860 | - //viewColumnsChanged(); |
3861 | - |
3862 | - button_press_event.connect(viewClick); |
3863 | - |
3864 | - //cursor_changed.connect_after(() => { update_rating_menu(); }); |
3865 | - button_release_event.connect(viewClickRelease); |
3866 | - //columns_changed.connect(viewColumnsChanged); |
3867 | - |
3868 | - // column chooser menu |
3869 | - columnChooserMenu = new Gtk.Menu(); |
3870 | - columnEpisode = new CheckMenuItem.with_label("Episode"); |
3871 | - columnName = new CheckMenuItem.with_label("Name"); |
3872 | - columnLength = new CheckMenuItem.with_label("Length"); |
3873 | - columnArtist = new CheckMenuItem.with_label("Artist"); |
3874 | - columnPodcast = new CheckMenuItem.with_label("Podcast"); |
3875 | - columnDate = new CheckMenuItem.with_label("Date"); |
3876 | - columnRating = new CheckMenuItem.with_label("Rating"); |
3877 | - columnComments = new CheckMenuItem.with_label("Comment"); |
3878 | - columnCategory = new CheckMenuItem.with_label("Category"); |
3879 | - updateColumnVisibilities(); |
3880 | - columnChooserMenu.append(columnEpisode); |
3881 | - columnChooserMenu.append(columnName); |
3882 | - columnChooserMenu.append(columnLength); |
3883 | - columnChooserMenu.append(columnArtist); |
3884 | - columnChooserMenu.append(columnPodcast); |
3885 | - columnChooserMenu.append(columnDate); |
3886 | - columnChooserMenu.append(columnCategory); |
3887 | - columnChooserMenu.append(columnComments); |
3888 | - columnChooserMenu.append(columnRating); |
3889 | - columnEpisode.toggled.connect(columnMenuToggled); |
3890 | - columnName.toggled.connect(columnMenuToggled); |
3891 | - columnLength.toggled.connect(columnMenuToggled); |
3892 | - columnArtist.toggled.connect(columnMenuToggled); |
3893 | - columnPodcast.toggled.connect(columnMenuToggled); |
3894 | - columnDate.toggled.connect(columnMenuToggled); |
3895 | - columnComments.toggled.connect(columnMenuToggled); |
3896 | - columnCategory.toggled.connect(columnMenuToggled); |
3897 | - columnRating.toggled.connect(columnMenuToggled); |
3898 | - columnChooserMenu.show_all(); |
3899 | - |
3900 | - |
3901 | - //media list right click menu |
3902 | - mediaMenuActionMenu = new Gtk.Menu(); |
3903 | - mediaEditMedia = new Gtk.MenuItem.with_label("Edit Podcast"); |
3904 | - mediaFileBrowse = new Gtk.MenuItem.with_label("Show in File Browser"); |
3905 | - mediaMenuQueue = new Gtk.MenuItem.with_label("Queue"); |
3906 | - mediaMenuNewPlaylist = new Gtk.MenuItem.with_label("New Playlist"); |
3907 | - mediaMenuAddToPlaylist = new Gtk.MenuItem.with_label("Add to Playlist"); |
3908 | - mediaRemove = new Gtk.MenuItem.with_label("Remove Episode"); |
3909 | - mediaSaveLocally = new Gtk.MenuItem.with_label("Download"); |
3910 | - importToLibrary = new Gtk.MenuItem.with_label("Import to Library"); |
3911 | - mediaRateMedia = new RatingWidgetMenu(); |
3912 | - mediaMenuActionMenu.append(mediaEditMedia); |
3913 | - mediaMenuActionMenu.append(mediaFileBrowse); |
3914 | - mediaMenuActionMenu.append(mediaSaveLocally); |
3915 | - |
3916 | - mediaMenuActionMenu.append(mediaRateMedia); |
3917 | - |
3918 | - mediaMenuActionMenu.append(new SeparatorMenuItem()); |
3919 | - mediaMenuActionMenu.append(mediaMenuQueue); |
3920 | - mediaMenuActionMenu.append(mediaMenuNewPlaylist); |
3921 | - mediaMenuActionMenu.append(mediaMenuAddToPlaylist); |
3922 | - mediaMenuActionMenu.append(new SeparatorMenuItem()); |
3923 | - mediaMenuActionMenu.append(mediaRemove); |
3924 | - mediaMenuActionMenu.append(importToLibrary); |
3925 | - mediaEditMedia.activate.connect(mediaMenuEditClicked); |
3926 | - mediaFileBrowse.activate.connect(mediaFileBrowseClicked); |
3927 | - mediaSaveLocally.activate.connect(mediaSaveLocallyClicked); |
3928 | - mediaMenuQueue.activate.connect(mediaMenuQueueClicked); |
3929 | - mediaMenuNewPlaylist.activate.connect(mediaMenuNewPlaylistClicked); |
3930 | - mediaRemove.activate.connect(mediaRemoveClicked); |
3931 | - importToLibrary.activate.connect(importToLibraryClicked); |
3932 | - mediaRateMedia.activate.connect(mediaRateMediaClicked); |
3933 | - //mediaMenuActionMenu.show_all(); |
3934 | - |
3935 | - update_sensitivities(); |
3936 | - |
3937 | - //this.list_model.rows_reordered.connect(modelRowsReordered); |
3938 | - //this.list_model.sort_column_changed.connect(sortColumnChanged); |
3939 | - } |
3940 | - |
3941 | - public void rearrangeColumns(LinkedList<string> correctOrder) { |
3942 | - move_column_after(get_column(6), get_column(7)); |
3943 | - //debug("correctOrder.length = %d, get_columns.length() = %d\n", correctOrder.size, (int)get_columns().length()); |
3944 | - /* iterate through get_columns and if a column is not in the |
3945 | - * same location as correctOrder, move it there. |
3946 | - */ |
3947 | - for(int index = 0; index < get_columns().length(); ++index) { |
3948 | - //debug("on index %d column %s originally moving to %d\n", index, get_column(index).title, correctOrder.index_of(get_column(index).title)); |
3949 | - if(get_column(index).title != correctOrder.get(index)) { |
3950 | - move_column_after(get_column(index), get_column(correctOrder.index_of(get_column(index).title))); |
3951 | - } |
3952 | - } |
3953 | - } |
3954 | - |
3955 | - public void cellTitleEdited(string path, string new_text) { |
3956 | - /*int rowid; |
3957 | - debug("done!\n"); |
3958 | - if((rowid = list_model.getRowidFromPath(path)) != 0) { |
3959 | - lm.media_from_id(rowid).title = new_text; |
3960 | - |
3961 | - lm.update_media(lm.media_from_id(rowid), true); |
3962 | - } |
3963 | - cellTitle.editable = false; */ |
3964 | - } |
3965 | - |
3966 | - public virtual void sortColumnChanged() { |
3967 | - updateTreeViewSetup(); |
3968 | - } |
3969 | - |
3970 | - public virtual void modelRowsReordered(TreePath path, TreeIter? iter, void* new_order) { |
3971 | - /*if(ViewWrapper.Hint == "queue") { |
3972 | - lm.clear_queue(); |
3973 | - |
3974 | - TreeIter item; |
3975 | - for(int i = 0; list_model.get_iter_from_string(out item, i.to_string()); ++i) { |
3976 | - int id; |
3977 | - list_model.get(item, 0, out id); |
3978 | - |
3979 | - App.player.queue_media_by_id(id); |
3980 | - } |
3981 | - }*/ |
3982 | - |
3983 | - //if(is_current_view) { |
3984 | - // set_as_current_list(0, false); |
3985 | - //} |
3986 | - |
3987 | - if(!scrolled_recently) { |
3988 | - scroll_to_current_media(); |
3989 | - } |
3990 | - } |
3991 | - |
3992 | - public virtual void viewColumnsChanged() { |
3993 | - updateTreeViewSetup(); |
3994 | - } |
3995 | - |
3996 | - public void updateColumnVisibilities() { |
3997 | - int index = 0; |
3998 | - foreach(TreeViewColumn tvc in get_columns()) { |
3999 | - if(tvc.title == "Episode") |
4000 | - columnEpisode.active = get_column(index).visible; |
4001 | - else if(tvc.title == "Name") |
4002 | - columnName.active = get_column(index).visible; |
4003 | - else if(tvc.title == "Length") |
4004 | - columnLength.active = get_column(index).visible; |
4005 | - else if(tvc.title == "Artist") |
4006 | - columnArtist.active = get_column(index).visible; |
4007 | - else if(tvc.title == "Podcast") |
4008 | - columnPodcast.active = get_column(index).visible; |
4009 | - else if(tvc.title == "Date") |
4010 | - columnDate.active = get_column(index).visible; |
4011 | - else if(tvc.title == "Rating") |
4012 | - columnRating.active = get_column(index).visible; |
4013 | - else if(tvc.title == "Comment") |
4014 | - columnComments.active = get_column(index).visible; |
4015 | - else if(tvc.title == "Category") |
4016 | - columnCategory.active = get_column(index).visible; |
4017 | - |
4018 | - ++index; |
4019 | - } |
4020 | - } |
4021 | - |
4022 | - /* button_press_event */ |
4023 | - bool viewClick(Gdk.EventButton event) { |
4024 | - if(event.type == Gdk.EventType.BUTTON_PRESS && event.button == 3) { //right click |
4025 | - /* create add to playlist menu */ |
4026 | - Gtk.Menu addToPlaylistMenu = new Gtk.Menu(); |
4027 | - foreach(Playlist p in lm.playlists()) { |
4028 | - Gtk.MenuItem playlist = new Gtk.MenuItem.with_label(p.name); |
4029 | - addToPlaylistMenu.append(playlist); |
4030 | - |
4031 | - playlist.activate.connect( () => { |
4032 | - var to_add = new LinkedList<int>(); |
4033 | - |
4034 | - foreach(Media m in get_selected_medias()) { |
4035 | - to_add.add(m.rowid); |
4036 | - } |
4037 | - p.addMedias(to_add); |
4038 | - }); |
4039 | - } |
4040 | - |
4041 | - addToPlaylistMenu.show_all(); |
4042 | - mediaMenuAddToPlaylist.submenu = addToPlaylistMenu; |
4043 | - |
4044 | - if(lm.playlists().size == 0) |
4045 | - mediaMenuAddToPlaylist.set_sensitive(false); |
4046 | - else |
4047 | - mediaMenuAddToPlaylist.set_sensitive(true); |
4048 | - |
4049 | - // if all medias are downloaded already, desensitize. |
4050 | - // if half and half, change text to 'Download %external of %total' |
4051 | - int external_count = 0; |
4052 | - int temporary_count = 0; |
4053 | - int total_count = 0; |
4054 | - string music_folder = lm.settings.getMusicFolder(); |
4055 | - |
4056 | - foreach(Media m in get_selected_medias()) { |
4057 | - if(!File.new_for_uri(m.uri).get_path().has_prefix(music_folder)) |
4058 | - ++external_count; |
4059 | - if(m.isTemporary) |
4060 | - ++temporary_count; |
4061 | - |
4062 | - ++total_count; |
4063 | - } |
4064 | - |
4065 | - if(external_count == 0) |
4066 | - mediaSaveLocally.set_sensitive(false); |
4067 | - else { |
4068 | - mediaSaveLocally.set_sensitive(true); |
4069 | - if(external_count != total_count) |
4070 | - mediaSaveLocally.label = "Download " + external_count.to_string() + " of " + total_count.to_string() + " selected episodes"; |
4071 | - else |
4072 | - mediaSaveLocally.label = "Download" + ((external_count > 1) ? (" " + external_count.to_string() + " episodes") : ""); |
4073 | - } |
4074 | - |
4075 | - if(temporary_count == 0) |
4076 | - importToLibrary.set_sensitive(false); |
4077 | - else { |
4078 | - importToLibrary.set_sensitive(true); |
4079 | - if(temporary_count != total_count) |
4080 | - importToLibrary.label = "Import " + temporary_count.to_string() + " of " + total_count.to_string() + " selected episodes"; |
4081 | - else |
4082 | - importToLibrary.label = "Import" + ((temporary_count > 1) ? (" " + temporary_count.to_string() + " episodes") : ""); |
4083 | - } |
4084 | - |
4085 | - //mediaMenuActionMenu.show_all(); |
4086 | - |
4087 | - int set_rating = -1; |
4088 | - foreach(Media m in get_selected_medias()) { |
4089 | - if(set_rating == -1) |
4090 | - set_rating = (int)m.rating; |
4091 | - else if(set_rating != m.rating) { |
4092 | - set_rating = 0; |
4093 | - break; |
4094 | - } |
4095 | - } |
4096 | - |
4097 | - mediaRateMedia.rating_value = set_rating; |
4098 | - mediaMenuActionMenu.popup (null, null, null, 3, get_current_event_time()); |
4099 | - |
4100 | - TreeSelection selected = get_selection(); |
4101 | - selected.set_mode(SelectionMode.MULTIPLE); |
4102 | - if(selected.count_selected_rows() > 1) |
4103 | - return true; |
4104 | - else |
4105 | - return false; |
4106 | - } |
4107 | - else if(event.type == Gdk.EventType.BUTTON_PRESS && event.button == 1) { |
4108 | - //TreeIter iter; |
4109 | - TreePath path; |
4110 | - TreeViewColumn column; |
4111 | - int cell_x; |
4112 | - int cell_y; |
4113 | - |
4114 | - get_path_at_pos((int)event.x, (int)event.y, out path, out column, out cell_x, out cell_y); |
4115 | - |
4116 | - //if(!list_model.get_iter(out iter, path)) |
4117 | - // return false; |
4118 | - |
4119 | - /* don't unselect everything if multiple selected until button release |
4120 | - * for drag and drop reasons */ |
4121 | - if(get_selection().count_selected_rows() > 1) { |
4122 | - if(get_selection().path_is_selected(path)) { |
4123 | - if(((event.state & Gdk.ModifierType.SHIFT_MASK) == Gdk.ModifierType.SHIFT_MASK)| |
4124 | - ((event.state & Gdk.ModifierType.CONTROL_MASK) == Gdk.ModifierType.CONTROL_MASK)) { |
4125 | - get_selection().unselect_path(path); |
4126 | - } |
4127 | - return true; |
4128 | - } |
4129 | - else if(!(((event.state & Gdk.ModifierType.SHIFT_MASK) == Gdk.ModifierType.SHIFT_MASK)| |
4130 | - ((event.state & Gdk.ModifierType.CONTROL_MASK) == Gdk.ModifierType.CONTROL_MASK))) { |
4131 | - return true; |
4132 | - } |
4133 | - |
4134 | - return false; |
4135 | - } |
4136 | - } |
4137 | - |
4138 | - return false; |
4139 | - } |
4140 | - |
4141 | - /* button_release_event */ |
4142 | - private bool viewClickRelease(Gtk.Widget sender, Gdk.EventButton event) { |
4143 | - /* if we were dragging, then set dragging to false */ |
4144 | - if(dragging && event.button == 1) { |
4145 | - dragging = false; |
4146 | - return true; |
4147 | - } |
4148 | - else if(((event.state & Gdk.ModifierType.SHIFT_MASK) == Gdk.ModifierType.SHIFT_MASK) | ((event.state & Gdk.ModifierType.CONTROL_MASK) == Gdk.ModifierType.CONTROL_MASK)) { |
4149 | - return true; |
4150 | - } |
4151 | - else { |
4152 | - TreePath path; |
4153 | - TreeViewColumn tvc; |
4154 | - int cell_x; |
4155 | - int cell_y; |
4156 | - int x = (int)event.x; |
4157 | - int y = (int)event.y; |
4158 | - |
4159 | - if(!(get_path_at_pos(x, y, out path, out tvc, out cell_x, out cell_y))) return false; |
4160 | - get_selection().unselect_all(); |
4161 | - get_selection().select_path(path); |
4162 | - return false; |
4163 | - } |
4164 | - } |
4165 | - |
4166 | - private bool viewHeaderClick(Gtk.Widget w, Gdk.EventButton e) { |
4167 | - if(e.button == 3) { |
4168 | - columnChooserMenu.popup (null, null, null, 3, get_current_event_time()); |
4169 | - return true; |
4170 | - } |
4171 | - else if(e.button == 1) { |
4172 | - updateTreeViewSetup(); |
4173 | - |
4174 | - return false; |
4175 | - } |
4176 | - |
4177 | - return false; |
4178 | - } |
4179 | - |
4180 | - void viewHeadersResized() { |
4181 | - updateTreeViewSetup(); |
4182 | - } |
4183 | - |
4184 | - void updateTreeViewSetup() { |
4185 | - if(tvs == null || !visible || get_columns().length() != TreeViewSetup.PODCAST_COLUMN_COUNT) |
4186 | - return; |
4187 | - |
4188 | - int sort_id = PodcastColumn.ARTIST; |
4189 | - SortType sort_dir = Gtk.SortType.ASCENDING; |
4190 | - get_sort_column_id(out sort_id, out sort_dir); |
4191 | - |
4192 | - if(sort_id <= 0) |
4193 | - sort_id = PodcastColumn.ARTIST; |
4194 | - |
4195 | - tvs.set_columns(get_columns()); |
4196 | - tvs.sort_column_id = sort_id; |
4197 | - tvs.sort_direction = sort_dir; |
4198 | - } |
4199 | - |
4200 | - /** When the column chooser popup menu has a change/toggle **/ |
4201 | - public virtual void columnMenuToggled() { |
4202 | - int index = 0; |
4203 | - foreach(TreeViewColumn tvc in get_columns()) { |
4204 | - if(tvc.title == "Episode") |
4205 | - get_column(index).visible = columnEpisode.active; |
4206 | - else if(tvc.title == "Name") |
4207 | - get_column(index).visible = columnName.active; |
4208 | - else if(tvc.title == "Length") |
4209 | - get_column(index).visible = columnLength.active; |
4210 | - else if(tvc.title == "Artist") |
4211 | - get_column(index).visible = columnArtist.active; |
4212 | - else if(tvc.title == "Podcast") |
4213 | - get_column(index).visible = columnPodcast.active; |
4214 | - else if(tvc.title == "Date") |
4215 | - get_column(index).visible = columnDate.active; |
4216 | - else if(tvc.title == "Rating") |
4217 | - get_column(index).visible = columnRating.active; |
4218 | - else if(tvc.title == "Comment") |
4219 | - get_column(index).visible = columnComments.active; |
4220 | - else if(tvc.title == "Category") |
4221 | - get_column(index).visible = columnCategory.active; |
4222 | - |
4223 | - ++index; |
4224 | - } |
4225 | - |
4226 | - tvs.set_columns(get_columns()); |
4227 | - } |
4228 | - |
4229 | - /** media menu popup clicks **/ |
4230 | - public virtual void mediaMenuEditClicked() { |
4231 | - var to_edit = new LinkedList<int>(); |
4232 | - |
4233 | - foreach(Media m in get_selected_medias()) { |
4234 | - to_edit.add(m.rowid); |
4235 | - } |
4236 | - |
4237 | - /*if(!GLib.File.new_for_path(media_from_id(id).file).query_exists() && media_from_id(id).file.contains(settings.getMusicFolder())) { |
4238 | - media_from_id(id).unique_status_image = Icons.process_error_icon; |
4239 | - lw.media_not_found(id); |
4240 | - } |
4241 | - else {*/ |
4242 | - var list = new LinkedList<int>(); |
4243 | - for(int i = 0; i < get_visible_table().size(); ++i) { |
4244 | - list.add(get_media_from_index(i).rowid); |
4245 | - } |
4246 | - PodcastEditor pe = new PodcastEditor(lm, list, to_edit); |
4247 | - pe.podcasts_saved.connect(podcastEditorSaved); |
4248 | - //} |
4249 | - } |
4250 | - |
4251 | - public virtual void podcastEditorSaved(LinkedList<int> medias) { |
4252 | - LinkedList<Media> toUpdate = new LinkedList<Media>(); |
4253 | - foreach(int i in medias) |
4254 | - toUpdate.add(lm.media_from_id(i)); |
4255 | - |
4256 | - // user could have edited rating, so record time |
4257 | - lm.update_medias(toUpdate, true, true); |
4258 | - } |
4259 | - |
4260 | - public virtual void mediaFileBrowseClicked() { |
4261 | - int count = 0; |
4262 | - foreach(Media m in get_selected_medias()) { |
4263 | - try { |
4264 | - var file = File.new_for_uri(m.uri); |
4265 | - Gtk.show_uri(null, file.get_parent().get_uri(), 0); |
4266 | - } |
4267 | - catch(GLib.Error err) { |
4268 | - debug("Could not browse media %s: %s\n", m.uri, err.message); |
4269 | - } |
4270 | - |
4271 | - if(count > 10) { |
4272 | - lw.doAlert("Stopping File Browse", "Too many medias have already been opened in File Browser. Stopping any more openings."); |
4273 | - return; |
4274 | - } |
4275 | - } |
4276 | - } |
4277 | - |
4278 | - void mediaSaveLocallyClicked() { |
4279 | - var toSave = new LinkedList<int>(); |
4280 | - |
4281 | - foreach(Media m in get_selected_medias()) { |
4282 | - toSave.add(m.rowid); |
4283 | - } |
4284 | - |
4285 | - lm.pm.save_episodes_locally(toSave); |
4286 | - } |
4287 | - |
4288 | - public virtual void mediaMenuQueueClicked() { |
4289 | - foreach(Media m in get_selected_medias()) { |
4290 | - App.player.queue_media_by_id(m.rowid); |
4291 | - } |
4292 | - } |
4293 | - |
4294 | - void mediaRateMediaClicked() { |
4295 | - var los = new LinkedList<Media>(); |
4296 | - int new_rating = mediaRateMedia.rating_value; |
4297 | - |
4298 | - foreach(Media m in get_selected_medias()) { |
4299 | - m.rating = new_rating; |
4300 | - los.add(m); |
4301 | - } |
4302 | - |
4303 | - lm.update_medias(los, false, true); |
4304 | - } |
4305 | - |
4306 | - public virtual void mediaMenuNewPlaylistClicked() { |
4307 | - Playlist p = new Playlist(); |
4308 | - |
4309 | - var to_add = new LinkedList<int>(); |
4310 | - foreach(Media m in get_selected_medias()) { |
4311 | - to_add.add(m.rowid); |
4312 | - } |
4313 | - p.addMedias(to_add); |
4314 | - |
4315 | - PlaylistNameWindow pnw = new PlaylistNameWindow(lw, p); |
4316 | - pnw.playlist_saved.connect( (newP) => { |
4317 | - lm.add_playlist(p); |
4318 | - lw.addSideListItem(p); |
4319 | - }); |
4320 | - } |
4321 | - |
4322 | - public virtual void mediaRemoveClicked() { |
4323 | - LinkedList<Media> toRemove = new LinkedList<Media>(); |
4324 | - LinkedList<int> toRemoveIDs = new LinkedList<int>(); |
4325 | - |
4326 | - foreach(Media m in get_selected_medias()) { |
4327 | - toRemoveIDs.add(m.rowid); |
4328 | - |
4329 | - if(get_hint() == ViewWrapper.Hint.PODCAST) { |
4330 | - toRemove.add(m); |
4331 | - } |
4332 | - } |
4333 | - |
4334 | - if(get_hint() == ViewWrapper.Hint.PODCAST) { |
4335 | - var dialog = new RemoveFilesDialog (lm.lw, toRemove, get_hint()); |
4336 | - |
4337 | - dialog.remove_media.connect ( (delete_files) => { |
4338 | - lm.remove_medias (toRemove, delete_files); |
4339 | - }); |
4340 | - } |
4341 | - } |
4342 | - |
4343 | - void importToLibraryClicked() { |
4344 | - var to_import = new LinkedList<int>(); |
4345 | - |
4346 | - foreach(Media m in get_selected_medias()) { |
4347 | - to_import.add(m.rowid); |
4348 | - } |
4349 | - |
4350 | - import_requested(to_import); |
4351 | - } |
4352 | - |
4353 | - public virtual void onDragDataGet(Gdk.DragContext context, Gtk.SelectionData selection_data, uint info, uint time_) { |
4354 | - string[] uris = null; |
4355 | - |
4356 | - foreach(Media m in get_selected_medias()) { |
4357 | - debug("adding %s\n", m.uri); |
4358 | - uris += (m.uri); |
4359 | - } |
4360 | - |
4361 | - if (uris != null) |
4362 | - selection_data.set_uris(uris); |
4363 | - } |
4364 | - |
4365 | - int view_compare_func (int col, Gtk.SortType dir, Media a_media, Media b_media) { |
4366 | - int rv = 0; |
4367 | - |
4368 | - if(col == PodcastColumn.EPISODE) { |
4369 | - rv = (int)(a_media.track - b_media.track); |
4370 | - } |
4371 | - else if(col == PodcastColumn.NAME) { |
4372 | - rv = advanced_string_compare(a_media.title.down(), b_media.title.down()); |
4373 | - } |
4374 | - else if(col == PodcastColumn.LENGTH) { |
4375 | - rv = (int)(a_media.length - b_media.length); |
4376 | - } |
4377 | - else if(col == PodcastColumn.ARTIST) { |
4378 | - if(a_media.artist.down() == b_media.artist.down()) { |
4379 | - //if(a_media.album.down() == b_media.album.down()) { |
4380 | - if(a_media.podcast_date == b_media.podcast_date) { |
4381 | - rv = advanced_string_compare(a_media.album.down(), b_media.album.down()); |
4382 | - } |
4383 | - else { |
4384 | - rv = (int)(b_media.podcast_date - a_media.podcast_date); |
4385 | - } |
4386 | - //} |
4387 | - //else |
4388 | - // rv = advanced_string_compare(a_media.album.down(), b_media.album.down()); |
4389 | - } |
4390 | - else |
4391 | - rv = advanced_string_compare(a_media.artist.down(), b_media.artist.down()); |
4392 | - } |
4393 | - else if(col == PodcastColumn.PODCAST) { |
4394 | - if(a_media.album.down() == b_media.album.down()) { |
4395 | - if(a_media.artist.down() == b_media.artist.down()) { |
4396 | - if(a_media.podcast_date == b_media.podcast_date) { |
4397 | - rv = advanced_string_compare(a_media.uri, b_media.uri); |
4398 | - } |
4399 | - else { |
4400 | - rv = (int)(b_media.podcast_date - a_media.podcast_date); |
4401 | - } |
4402 | - } |
4403 | - else |
4404 | - rv = advanced_string_compare(a_media.artist.down(), b_media.artist.down()); |
4405 | - } |
4406 | - else |
4407 | - rv = advanced_string_compare(a_media.album.down(), b_media.album.down()); |
4408 | - } |
4409 | - else if(col == PodcastColumn.DATE) { |
4410 | - rv = (int)(a_media.podcast_date - b_media.podcast_date); |
4411 | - } |
4412 | - else if(col == PodcastColumn.CATEGORY) { |
4413 | - rv = advanced_string_compare(a_media.genre.down(), b_media.genre.down()); |
4414 | - } |
4415 | - else if(col == PodcastColumn.RATING) { |
4416 | - rv = (int)(a_media.rating - b_media.rating); |
4417 | - } |
4418 | - else { |
4419 | - rv = 0; |
4420 | - } |
4421 | - |
4422 | - if(rv == 0 && col != PodcastColumn.ARTIST && col != PodcastColumn.PODCAST) |
4423 | - rv = advanced_string_compare(a_media.uri, b_media.uri); |
4424 | - |
4425 | - if(sort_direction == SortType.DESCENDING) |
4426 | - rv = (rv > 0) ? -1 : 1; |
4427 | - |
4428 | - return rv; |
4429 | - } |
4430 | - |
4431 | - Value view_value_func (int row, int column, Media s) { |
4432 | - Value val; |
4433 | - |
4434 | - if(column == PodcastColumn.ROWID) |
4435 | - val = (int)s.rowid; |
4436 | - else if(column == PodcastColumn.ICON) { |
4437 | - if(App.player.media_info.media != null && App.player.media_info.media.rowid == s.rowid) |
4438 | - val = playing_icon; |
4439 | - else if(s.unique_status_image != null) |
4440 | - val = s.unique_status_image; |
4441 | - else if(s.last_played == 0) |
4442 | - val = new_podcast_icon; |
4443 | - else if(!s.uri.has_prefix("http://")) |
4444 | - val = saved_locally_icon; |
4445 | - else |
4446 | - val = Value(typeof(GLib.Icon)); |
4447 | - } |
4448 | - else if(column == PodcastColumn.EPISODE) |
4449 | - val = (int)s.track; |
4450 | - else if(column == PodcastColumn.NAME) |
4451 | - val = s.title; |
4452 | - else if(column == PodcastColumn.LENGTH) |
4453 | - val = (int)s.length; |
4454 | - else if(column == PodcastColumn.ARTIST) |
4455 | - val = s.artist; |
4456 | - else if(column == PodcastColumn.PODCAST) |
4457 | - val = s.album; |
4458 | - else if(column == PodcastColumn.DATE) |
4459 | - val = (int)s.podcast_date; |
4460 | - else if(column == PodcastColumn.CATEGORY) |
4461 | - val = s.genre; // category |
4462 | - else if(column == PodcastColumn.COMMENT) |
4463 | - val = s.comment; |
4464 | - else if(column == PodcastColumn.RATING) |
4465 | - val = (int)s.rating; |
4466 | - else |
4467 | - val = (int)s.pulseProgress; |
4468 | - |
4469 | - return val; |
4470 | - } |
4471 | -} |
4472 | - |
4473 | |
4474 | === removed directory 'plugins/store' |
4475 | === removed file 'plugins/store/Artist.vala' |
4476 | --- plugins/store/Artist.vala 2012-04-26 06:03:25 +0000 |
4477 | +++ plugins/store/Artist.vala 1970-01-01 00:00:00 +0000 |
4478 | @@ -1,196 +0,0 @@ |
4479 | -/*- |
4480 | - * Copyright (c) 2011-2012 Scott Ringwelski <sgringwe@mtu.edu> |
4481 | - * |
4482 | - * Originally Written by Scott Ringwelski for BeatBox Music Player |
4483 | - * BeatBox Music Player: http://www.launchpad.net/beat-box |
4484 | - * |
4485 | - * This library is free software; you can redistribute it and/or |
4486 | - * modify it under the terms of the GNU Library General Public |
4487 | - * License as published by the Free Software Foundation; either |
4488 | - * version 2 of the License, or (at your option) any later version. |
4489 | - * |
4490 | - * This library is distributed in the hope that it will be useful, |
4491 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
4492 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4493 | - * Library General Public License for more details. |
4494 | - * |
4495 | - * You should have received a copy of the GNU Library General Public |
4496 | - * License along with this library; if not, write to the |
4497 | - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
4498 | - * Boston, MA 02111-1307, USA. |
4499 | - */ |
4500 | - |
4501 | -using Gee; |
4502 | -using Xml; |
4503 | - |
4504 | -public class Store.Artist : Store.SearchResult { |
4505 | - public int artistID; |
4506 | - public string name; |
4507 | - public string sortName; |
4508 | - public string appearsAs; |
4509 | - public string imagePath; |
4510 | - public string url; |
4511 | - public double popularity; |
4512 | - public Gdk.Pixbuf image; |
4513 | - |
4514 | - public signal void artist_fetched(); |
4515 | - |
4516 | - /* Gets all the details of the artist */ |
4517 | - public Artist(int id) { |
4518 | - artistID = id; |
4519 | - } |
4520 | - |
4521 | - public LinkedList<Store.Release>? getReleases(string? type, int page) { |
4522 | - var rv = new LinkedList<Store.Release>(); |
4523 | - |
4524 | - string url = Store.store.api + "artist/releases" + "?artistid=" + artistID.to_string() + |
4525 | - "&oauth_consumer_key=" + Store.store.key + |
4526 | - "&country=" + Store.store.country + |
4527 | - "&page=" + page.to_string() + |
4528 | - ((type != null) ? ("&type=" + type) : "") + |
4529 | - "&imagesize=100"; |
4530 | - |
4531 | - stdout.printf("parsing %s\n", url); |
4532 | - |
4533 | - var session = new Soup.SessionSync(); |
4534 | - var message = new Soup.Message ("GET", url); |
4535 | - session.send_message(message); |
4536 | - |
4537 | - Xml.Node* node = Store.XMLParser.getRootNode(message); |
4538 | - if(node == null) |
4539 | - return rv; |
4540 | - |
4541 | - for (Xml.Node* iter = node->children; iter != null; iter = iter->next) { |
4542 | - if (iter->type != ElementType.ELEMENT_NODE) { |
4543 | - continue; |
4544 | - } |
4545 | - |
4546 | - if(iter->name == "release") { |
4547 | - Store.Release toAdd = Store.XMLParser.parseRelease(iter); |
4548 | - |
4549 | - if(toAdd != null) { |
4550 | - stdout.printf("release result: %s %s %s\n", toAdd.title, toAdd.artist.name, toAdd.url); |
4551 | - rv.add(toAdd); |
4552 | - } |
4553 | - } |
4554 | - } |
4555 | - |
4556 | - return rv; |
4557 | - } |
4558 | - |
4559 | - public LinkedList<Store.Artist>? getSimilar(int page) { |
4560 | - var rv = new LinkedList<Store.Artist>(); |
4561 | - |
4562 | - string url = Store.store.api + "artist/similar" + "?artistid=" + artistID.to_string() + |
4563 | - "&oauth_consumer_key=" + Store.store.key + |
4564 | - "&country=" + Store.store.country + |
4565 | - "&page=" + page.to_string(); |
4566 | - |
4567 | - stdout.printf("parsing %s\n", url); |
4568 | - |
4569 | - var session = new Soup.SessionSync(); |
4570 | - var message = new Soup.Message ("GET", url); |
4571 | - session.send_message(message); |
4572 | - |
4573 | - Xml.Node* node = Store.XMLParser.getRootNode(message); |
4574 | - if(node == null) |
4575 | - return rv; |
4576 | - |
4577 | - for (Xml.Node* iter = node->children; iter != null; iter = iter->next) { |
4578 | - if (iter->type != ElementType.ELEMENT_NODE) { |
4579 | - continue; |
4580 | - } |
4581 | - |
4582 | - if(iter->name == "artist") { |
4583 | - Store.Artist toAdd = Store.XMLParser.parseArtist(iter); |
4584 | - |
4585 | - if(toAdd != null) |
4586 | - rv.add(toAdd); |
4587 | - } |
4588 | - } |
4589 | - |
4590 | - return rv; |
4591 | - } |
4592 | - |
4593 | - public LinkedList<Store.Track> getTopTracks(int page, int max) { |
4594 | - var rv = new LinkedList<Store.Track>(); |
4595 | - |
4596 | - string url = Store.store.api + "track/search" + "?q=" + name + |
4597 | - "&oauth_consumer_key=" + Store.store.key + |
4598 | - "&country=" + Store.store.country + |
4599 | - "&page=" + page.to_string() + |
4600 | - "&pagesize=100"; |
4601 | - |
4602 | - stdout.printf("parsing %s\n", url); |
4603 | - |
4604 | - var session = new Soup.SessionSync(); |
4605 | - var message = new Soup.Message ("GET", url); |
4606 | - session.send_message(message); |
4607 | - |
4608 | - Xml.Node* node = Store.XMLParser.getRootNode(message); |
4609 | - if(node == null) |
4610 | - return rv; |
4611 | - |
4612 | - for (Xml.Node* iter = node->children; iter != null; iter = iter->next) { |
4613 | - if (iter->type != ElementType.ELEMENT_NODE) { |
4614 | - continue; |
4615 | - } |
4616 | - |
4617 | - if(iter->name == "searchResult") { |
4618 | - Store.Track toAdd = new Store.Track(0); |
4619 | - |
4620 | - for(Xml.Node* subIter = iter->children; subIter != null; subIter = subIter->next) { |
4621 | - if(subIter->name == "track") |
4622 | - toAdd = Store.XMLParser.parseTrack(subIter); |
4623 | - } |
4624 | - |
4625 | - if(toAdd != null && toAdd.artist.name == name) { |
4626 | - stdout.printf("track result: %s %s %s\n", toAdd.title, toAdd.artist.name, toAdd.url); |
4627 | - toAdd.searchType = "track"; |
4628 | - rv.add(toAdd); |
4629 | - |
4630 | - if(rv.size >= max) |
4631 | - return rv; |
4632 | - } |
4633 | - } |
4634 | - } |
4635 | - |
4636 | - return rv; |
4637 | - } |
4638 | - |
4639 | - public LinkedList<Store.Tag> getTags(int page) { |
4640 | - var rv = new LinkedList<Store.Tag>(); |
4641 | - |
4642 | - string url = Store.store.api + "artist/tags" + "?artistid=" + artistID.to_string() + |
4643 | - "&oauth_consumer_key=" + Store.store.key + |
4644 | - "&country=" + Store.store.country + |
4645 | - "&page=" + page.to_string(); |
4646 | - |
4647 | - stdout.printf("parsing %s\n", url); |
4648 | - |
4649 | - var session = new Soup.SessionSync(); |
4650 | - var message = new Soup.Message ("GET", url); |
4651 | - session.send_message(message); |
4652 | - |
4653 | - Xml.Node* node = Store.XMLParser.getRootNode(message); |
4654 | - if(node == null) |
4655 | - return rv; |
4656 | - |
4657 | - for (Xml.Node* iter = node->children; iter != null; iter = iter->next) { |
4658 | - if (iter->type != ElementType.ELEMENT_NODE) { |
4659 | - continue; |
4660 | - } |
4661 | - |
4662 | - if(iter->name == "tag") { |
4663 | - Store.Tag toAdd = Store.XMLParser.parseTag(iter); |
4664 | - |
4665 | - if(toAdd != null) |
4666 | - rv.add(toAdd); |
4667 | - } |
4668 | - } |
4669 | - |
4670 | - return rv; |
4671 | - } |
4672 | - |
4673 | - |
4674 | -} |
4675 | |
4676 | === removed file 'plugins/store/Basket.vala' |
4677 | --- plugins/store/Basket.vala 2012-04-26 06:03:25 +0000 |
4678 | +++ plugins/store/Basket.vala 1970-01-01 00:00:00 +0000 |
4679 | @@ -1,36 +0,0 @@ |
4680 | -/*- |
4681 | - * Copyright (c) 2011-2012 Scott Ringwelski <sgringwe@mtu.edu> |
4682 | - * |
4683 | - * Originally Written by Scott Ringwelski for BeatBox Music Player |
4684 | - * BeatBox Music Player: http://www.launchpad.net/beat-box |
4685 | - * |
4686 | - * This library is free software; you can redistribute it and/or |
4687 | - * modify it under the terms of the GNU Library General Public |
4688 | - * License as published by the Free Software Foundation; either |
4689 | - * version 2 of the License, or (at your option) any later version. |
4690 | - * |
4691 | - * This library is distributed in the hope that it will be useful, |
4692 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
4693 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4694 | - * Library General Public License for more details. |
4695 | - * |
4696 | - * You should have received a copy of the GNU Library General Public |
4697 | - * License along with this library; if not, write to the |
4698 | - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
4699 | - * Boston, MA 02111-1307, USA. |
4700 | - */ |
4701 | - |
4702 | -using Gee; |
4703 | - |
4704 | -public class Store.Basket : GLib.Object { |
4705 | - public string basketID; |
4706 | - public int itemCount; |
4707 | - public Store.Price price; |
4708 | - public Store.Price amountDue; |
4709 | - public LinkedList<Store.BasketItem> basketItems; |
4710 | - |
4711 | - public Basket(string id) { |
4712 | - basketID = id; |
4713 | - basketItems = new LinkedList<Store.BasketItem>(); |
4714 | - } |
4715 | -} |
4716 | |
4717 | === removed file 'plugins/store/BasketItem.vala' |
4718 | --- plugins/store/BasketItem.vala 2012-04-26 06:03:25 +0000 |
4719 | +++ plugins/store/BasketItem.vala 1970-01-01 00:00:00 +0000 |
4720 | @@ -1,37 +0,0 @@ |
4721 | -/*- |
4722 | - * Copyright (c) 2011-2012 Scott Ringwelski <sgringwe@mtu.edu> |
4723 | - * |
4724 | - * Originally Written by Scott Ringwelski for BeatBox Music Player |
4725 | - * BeatBox Music Player: http://www.launchpad.net/beat-box |
4726 | - * |
4727 | - * This library is free software; you can redistribute it and/or |
4728 | - * modify it under the terms of the GNU Library General Public |
4729 | - * License as published by the Free Software Foundation; either |
4730 | - * version 2 of the License, or (at your option) any later version. |
4731 | - * |
4732 | - * This library is distributed in the hope that it will be useful, |
4733 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
4734 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4735 | - * Library General Public License for more details. |
4736 | - * |
4737 | - * You should have received a copy of the GNU Library General Public |
4738 | - * License along with this library; if not, write to the |
4739 | - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
4740 | - * Boston, MA 02111-1307, USA. |
4741 | - */ |
4742 | - |
4743 | -public class Store.BasketItem : GLib.Object { |
4744 | - public int basketItemID; |
4745 | - public string type; |
4746 | - public string itemName; |
4747 | - public string artistName; |
4748 | - public int trackID; |
4749 | - public int releaseID; |
4750 | - public Store.Price price; |
4751 | - public Store.Price amountDue; |
4752 | - public string discount; |
4753 | - |
4754 | - public BasketItem(int id) { |
4755 | - basketItemID = id; |
4756 | - } |
4757 | -} |
4758 | |
4759 | === removed file 'plugins/store/FormatTag.vala' |
4760 | --- plugins/store/FormatTag.vala 2012-04-26 06:03:25 +0000 |
4761 | +++ plugins/store/FormatTag.vala 1970-01-01 00:00:00 +0000 |
4762 | @@ -1,35 +0,0 @@ |
4763 | -/*- |
4764 | - * Copyright (c) 2011-2012 Scott Ringwelski <sgringwe@mtu.edu> |
4765 | - * |
4766 | - * Originally Written by Scott Ringwelski for BeatBox Music Player |
4767 | - * BeatBox Music Player: http://www.launchpad.net/beat-box |
4768 | - * |
4769 | - * This library is free software; you can redistribute it and/or |
4770 | - * modify it under the terms of the GNU Library General Public |
4771 | - * License as published by the Free Software Foundation; either |
4772 | - * version 2 of the License, or (at your option) any later version. |
4773 | - * |
4774 | - * This library is distributed in the hope that it will be useful, |
4775 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
4776 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4777 | - * Library General Public License for more details. |
4778 | - * |
4779 | - * You should have received a copy of the GNU Library General Public |
4780 | - * License along with this library; if not, write to the |
4781 | - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
4782 | - * Boston, MA 02111-1307, USA. |
4783 | - */ |
4784 | - |
4785 | -public class Store.Format : GLib.Object { |
4786 | - public int formatID; |
4787 | - public string fileFormat; |
4788 | - public int bitrate; |
4789 | - public bool drmFree; |
4790 | - |
4791 | - public Format(int id) { |
4792 | - formatID = id; |
4793 | - fileFormat = ""; |
4794 | - bitrate = 0; |
4795 | - drmFree = false; |
4796 | - } |
4797 | -} |
4798 | |
4799 | === removed file 'plugins/store/Label.vala' |
4800 | --- plugins/store/Label.vala 2012-04-26 06:03:25 +0000 |
4801 | +++ plugins/store/Label.vala 1970-01-01 00:00:00 +0000 |
4802 | @@ -1,47 +0,0 @@ |
4803 | -/*- |
4804 | - * Copyright (c) 2011-2012 Scott Ringwelski <sgringwe@mtu.edu> |
4805 | - * |
4806 | - * Originally Written by Scott Ringwelski for BeatBox Music Player |
4807 | - * BeatBox Music Player: http://www.launchpad.net/beat-box |
4808 | - * |
4809 | - * This library is free software; you can redistribute it and/or |
4810 | - * modify it under the terms of the GNU Library General Public |
4811 | - * License as published by the Free Software Foundation; either |
4812 | - * version 2 of the License, or (at your option) any later version. |
4813 | - * |
4814 | - * This library is distributed in the hope that it will be useful, |
4815 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
4816 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4817 | - * Library General Public License for more details. |
4818 | - * |
4819 | - * You should have received a copy of the GNU Library General Public |
4820 | - * License along with this library; if not, write to the |
4821 | - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
4822 | - * Boston, MA 02111-1307, USA. |
4823 | - */ |
4824 | - |
4825 | -public class Store.Label : GLib.Object { |
4826 | - public int labelID; |
4827 | - public string name; |
4828 | - |
4829 | - public Label(int id) { |
4830 | - labelID = id; |
4831 | - name = ""; |
4832 | - } |
4833 | -} |
4834 | - |
4835 | -public class Store.Tag : GLib.Object { |
4836 | - public string tagID; |
4837 | - public string text; |
4838 | - public string url; |
4839 | - |
4840 | - public Tag(string id) { |
4841 | - tagID = id; |
4842 | - } |
4843 | - |
4844 | - public Tag.with_values(string id, string text, string url) { |
4845 | - this.tagID = id; |
4846 | - this.text = text; |
4847 | - this.url = url; |
4848 | - } |
4849 | -} |
4850 | |
4851 | === removed file 'plugins/store/Price.vala' |
4852 | --- plugins/store/Price.vala 2012-04-26 06:03:25 +0000 |
4853 | +++ plugins/store/Price.vala 1970-01-01 00:00:00 +0000 |
4854 | @@ -1,39 +0,0 @@ |
4855 | -/*- |
4856 | - * Copyright (c) 2011-2012 Scott Ringwelski <sgringwe@mtu.edu> |
4857 | - * |
4858 | - * Originally Written by Scott Ringwelski for BeatBox Music Player |
4859 | - * BeatBox Music Player: http://www.launchpad.net/beat-box |
4860 | - * |
4861 | - * This library is free software; you can redistribute it and/or |
4862 | - * modify it under the terms of the GNU Library General Public |
4863 | - * License as published by the Free Software Foundation; either |
4864 | - * version 2 of the License, or (at your option) any later version. |
4865 | - * |
4866 | - * This library is distributed in the hope that it will be useful, |
4867 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
4868 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4869 | - * Library General Public License for more details. |
4870 | - * |
4871 | - * You should have received a copy of the GNU Library General Public |
4872 | - * License along with this library; if not, write to the |
4873 | - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
4874 | - * Boston, MA 02111-1307, USA. |
4875 | - */ |
4876 | - |
4877 | -public class Store.Price : GLib.Object { |
4878 | - public string currencyCode; |
4879 | - public double val; |
4880 | - public string formattedPrice; |
4881 | - public double rrp; |
4882 | - public string formattedRrp; |
4883 | - public bool onSale; |
4884 | - |
4885 | - public Price() { |
4886 | - currencyCode = "$"; |
4887 | - val = 0; |
4888 | - formattedPrice = "$0.00"; |
4889 | - rrp = 0f; |
4890 | - formattedRrp = "$0.00"; |
4891 | - onSale = false; |
4892 | - } |
4893 | -} |
4894 | |
4895 | === removed file 'plugins/store/Release.vala' |
4896 | --- plugins/store/Release.vala 2012-04-26 06:03:25 +0000 |
4897 | +++ plugins/store/Release.vala 1970-01-01 00:00:00 +0000 |
4898 | @@ -1,156 +0,0 @@ |
4899 | -/*- |
4900 | - * Copyright (c) 2011-2012 Scott Ringwelski <sgringwe@mtu.edu> |
4901 | - * |
4902 | - * Originally Written by Scott Ringwelski for BeatBox Music Player |
4903 | - * BeatBox Music Player: http://www.launchpad.net/beat-box |
4904 | - * |
4905 | - * This library is free software; you can redistribute it and/or |
4906 | - * modify it under the terms of the GNU Library General Public |
4907 | - * License as published by the Free Software Foundation; either |
4908 | - * version 2 of the License, or (at your option) any later version. |
4909 | - * |
4910 | - * This library is distributed in the hope that it will be useful, |
4911 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
4912 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
4913 | - * Library General Public License for more details. |
4914 | - * |
4915 | - * You should have received a copy of the GNU Library General Public |
4916 | - * License along with this library; if not, write to the |
4917 | - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
4918 | - * Boston, MA 02111-1307, USA. |
4919 | - */ |
4920 | - |
4921 | -using Gee; |
4922 | -using Xml; |
4923 | - |
4924 | -public class Store.Release : Store.SearchResult { |
4925 | - public int releaseID; |
4926 | - public string title; |
4927 | - public string version; |
4928 | - public string type; |
4929 | - public int barcode; |
4930 | - public int year; |
4931 | - public bool explicitContent; |
4932 | - public Store.Artist artist; |
4933 | - public string imagePath; |
4934 | - public string url; |
4935 | - public string releaseDate; |
4936 | - public string addedDate; |
4937 | - public Store.Price price; |
4938 | - public bool availableDrmFree; |
4939 | - public LinkedList<Store.Format> formats; |
4940 | - public Store.Label label; |
4941 | - public Gdk.Pixbuf image; |
4942 | - |
4943 | - public Release(int id) { |
4944 | - releaseID = id; |
4945 | - |
4946 | - formats = new LinkedList<Store.Format>(); |
4947 | - price = new Store.Price(); |
4948 | - } |
4949 | - |
4950 | - public LinkedList<Store.Release> getSimilar(int page) { |
4951 | - var rv = new LinkedList<Store.Release>(); |
4952 | - |
4953 | - string url = Store.store.api + "release/recommend" + "?releaseid=" + releaseID.to_string() + |
4954 | - "&oauth_consumer_key=" + Store.store.key + |
4955 | - "&country=" + Store.store.country + |
4956 | - "&page=" + page.to_string() + |
4957 | - "&imagesize=100"; |
4958 | - |
4959 | - stdout.printf("parsing %s\n", url); |
4960 | - |
4961 | - var session = new Soup.SessionSync(); |
4962 | - var message = new Soup.Message ("GET", url); |
4963 | - session.send_message(message); |
4964 | - |
4965 | - Xml.Node* node = Store.XMLParser.getRootNode(message); |
4966 | - if(node == null) |
4967 | - return rv; |
4968 | - |
4969 | - for (Xml.Node* iter = node->children; iter != null; iter = iter->next) { |
4970 | - if (iter->type != ElementType.ELEMENT_NODE) { |
4971 | - continue; |
4972 | - } |
4973 | - |
4974 | - if(iter->name == "recommendedItem") { |
4975 | - Store.Release toAdd = Store.XMLParser.parseRelease(iter->children); |
4976 | - |
4977 | - stdout.printf("recommended: %s %s %s\n", toAdd.title, toAdd.artist.name, toAdd.url); |
4978 | - if(toAdd != null) |
4979 | - rv.add(toAdd); |
4980 | - } |
4981 | - } |
4982 | - |
4983 | - return rv; |
4984 | - } |
4985 | - |
4986 | - public LinkedList<Store.Track> getTracks() { |
4987 | - var rv = new LinkedList<Store.Track>(); |
4988 | - |
4989 | - string url = Store.store.api + "release/tracks" + "?releaseid=" + releaseID.to_string() + |
4990 | - "&oauth_consumer_key=" + Store.store.key + |
4991 | - "&country=" + Store.store.country + |
4992 | - "&pageSize=50"; |
4993 | - |
4994 | - stdout.printf("parsing %s\n", url); |
4995 | - |
4996 | - var session = new Soup.SessionSync(); |
4997 | - var message = new Soup.Message ("GET", url); |
4998 | - session.send_message(message); |
4999 | - |
5000 | - Xml.Node* node = Store.XMLParser.getRootNode(message); |
The diff has been truncated for viewing.