[vlc-devel] commit: macosx: Add a link to the playlistitem menu to retrieve Cover Art. (Derk-Jan Hartman )
git version control
git at videolan.org
Tue Sep 30 21:33:39 CEST 2008
vlc | branch: master | Derk-Jan Hartman <hartman at videolan.org> | Tue Sep 30 21:36:01 2008 +0200| [2103c81222cfe20811fc4b8af51256b9f9c9f77a] | committer: Derk-Jan Hartman
macosx: Add a link to the playlistitem menu to retrieve Cover Art.
Forward port: [1a5a6b89692f2e6761b6ecd9ae9ee6e50b6e4138]
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2103c81222cfe20811fc4b8af51256b9f9c9f77a
---
.../English.lproj/MainMenu.nib/classes.nib | 12 +++++--
.../Resources/English.lproj/MainMenu.nib/info.nib | 4 +-
.../English.lproj/MainMenu.nib/keyedobjects.nib | Bin 120176 -> 120407 bytes
modules/gui/macosx/playlist.h | 2 +
modules/gui/macosx/playlist.m | 34 +++++++++++++++++++-
modules/gui/macosx/playlistinfo.h | 1 +
modules/gui/macosx/playlistinfo.m | 7 ++++
7 files changed, 53 insertions(+), 7 deletions(-)
diff --git a/extras/package/macosx/Resources/English.lproj/MainMenu.nib/classes.nib b/extras/package/macosx/Resources/English.lproj/MainMenu.nib/classes.nib
index 996ca7a..efa1e78 100644
--- a/extras/package/macosx/Resources/English.lproj/MainMenu.nib/classes.nib
+++ b/extras/package/macosx/Resources/English.lproj/MainMenu.nib/classes.nib
@@ -490,17 +490,17 @@
</dict>
<dict>
<key>CLASS</key>
- <string>ITSlider</string>
+ <string>NSObject</string>
<key>LANGUAGE</key>
<string>ObjC</string>
- <key>SUPERCLASS</key>
- <string>NSSlider</string>
</dict>
<dict>
<key>CLASS</key>
- <string>NSObject</string>
+ <string>ITSlider</string>
<key>LANGUAGE</key>
<string>ObjC</string>
+ <key>SUPERCLASS</key>
+ <string>NSSlider</string>
</dict>
<dict>
<key>ACTIONS</key>
@@ -727,6 +727,8 @@
<string>id</string>
<key>deleteItem</key>
<string>id</string>
+ <key>downloadCoverArt</key>
+ <string>id</string>
<key>playItem</key>
<string>id</string>
<key>preparseItem</key>
@@ -766,6 +768,8 @@
<string>id</string>
<key>o_mi_delete</key>
<string>id</string>
+ <key>o_mi_dl_cover_art</key>
+ <string>id</string>
<key>o_mi_info</key>
<string>id</string>
<key>o_mi_play</key>
diff --git a/extras/package/macosx/Resources/English.lproj/MainMenu.nib/info.nib b/extras/package/macosx/Resources/English.lproj/MainMenu.nib/info.nib
index 710f791..28ddd4c 100644
--- a/extras/package/macosx/Resources/English.lproj/MainMenu.nib/info.nib
+++ b/extras/package/macosx/Resources/English.lproj/MainMenu.nib/info.nib
@@ -10,11 +10,11 @@
<integer>4</integer>
<key>IBOpenObjects</key>
<array>
- <integer>3706</integer>
<integer>29</integer>
+ <integer>21</integer>
+ <integer>3706</integer>
<integer>3568</integer>
<integer>915</integer>
- <integer>21</integer>
</array>
<key>IBSystem Version</key>
<string>9F33</string>
diff --git a/extras/package/macosx/Resources/English.lproj/MainMenu.nib/keyedobjects.nib b/extras/package/macosx/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
index 7b4970f..dbb1efc 100644
Binary files a/extras/package/macosx/Resources/English.lproj/MainMenu.nib/keyedobjects.nib and b/extras/package/macosx/Resources/English.lproj/MainMenu.nib/keyedobjects.nib differ
diff --git a/modules/gui/macosx/playlist.h b/modules/gui/macosx/playlist.h
index acf040b..8bd96f0 100644
--- a/modules/gui/macosx/playlist.h
+++ b/modules/gui/macosx/playlist.h
@@ -82,6 +82,7 @@
IBOutlet id o_mi_preparse;
IBOutlet id o_mi_revealInFinder;
IBOutlet id o_mm_mi_revealInFinder;
+ IBOutlet id o_mi_dl_cover_art;
IBOutlet id o_mi_selectall;
IBOutlet id o_mi_sort_name;
IBOutlet id o_mi_sort_author;
@@ -131,6 +132,7 @@
- (IBAction)playItem:(id)sender;
- (IBAction)revealItemInFinder:(id)sender;
- (IBAction)preparseItem:(id)sender;
+- (IBAction)downloadCoverArt:(id)sender;
- (IBAction)savePlaylist:(id)sender;
- (IBAction)deleteItem:(id)sender;
- (IBAction)selectAll:(id)sender;
diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m
index f9823ea..71ace0e 100644
--- a/modules/gui/macosx/playlist.m
+++ b/modules/gui/macosx/playlist.m
@@ -443,7 +443,8 @@
[o_mi_delete setTitle: _NS("Delete")];
[o_mi_recursive_expand setTitle: _NS("Expand Node")];
[o_mi_selectall setTitle: _NS("Select All")];
- [o_mi_info setTitle: _NS("Information...")];
+ [o_mi_info setTitle: _NS("Media Information...")];
+ [o_mi_dl_cover_art setTitle: _NS("Download Cover Art")];
[o_mi_preparse setTitle: _NS("Fetch Meta Data")];
[o_mi_revealInFinder setTitle: _NS("Reveal in Finder")];
[o_mm_mi_revealInFinder setTitle: _NS("Reveal in Finder")];
@@ -850,6 +851,37 @@
[self playlistUpdated];
}
+- (IBAction)downloadCoverArt:(id)sender
+{
+ int i_count;
+ NSMutableArray *o_to_preparse;
+ intf_thread_t * p_intf = VLCIntf;
+ playlist_t * p_playlist = pl_Hold( p_intf );
+
+ o_to_preparse = [NSMutableArray arrayWithArray:[[o_outline_view selectedRowEnumerator] allObjects]];
+ i_count = [o_to_preparse count];
+
+ int i, i_row;
+ NSNumber *o_number;
+ playlist_item_t *p_item = NULL;
+
+ for( i = 0; i < i_count; i++ )
+ {
+ o_number = [o_to_preparse lastObject];
+ i_row = [o_number intValue];
+ p_item = [[o_outline_view itemAtRow:i_row] pointerValue];
+ [o_to_preparse removeObject: o_number];
+ [o_outline_view deselectRow: i_row];
+
+ if( p_item && p_item->i_children == -1 )
+ {
+ playlist_AskForArtEnqueue( p_playlist, p_item->p_input );
+ }
+ }
+ vlc_object_release( p_playlist );
+ [self playlistUpdated];
+}
+
- (IBAction)servicesChange:(id)sender
{
NSMenuItem *o_mi = (NSMenuItem *)sender;
diff --git a/modules/gui/macosx/playlistinfo.h b/modules/gui/macosx/playlistinfo.h
index 7138107..cea5c0c 100644
--- a/modules/gui/macosx/playlistinfo.h
+++ b/modules/gui/macosx/playlistinfo.h
@@ -106,6 +106,7 @@
- (IBAction)metaFieldChanged:(id)sender;
- (IBAction)saveMetaData:(id)sender;
+- (IBAction)downloadCoverArt:(id)sender;
- (void)initMediaPanelStats;
- (void)updatePanelWithItem:(input_item_t *)_p_item;
- (input_item_t *)item;
diff --git a/modules/gui/macosx/playlistinfo.m b/modules/gui/macosx/playlistinfo.m
index 7fe67c2..1c61ab8 100644
--- a/modules/gui/macosx/playlistinfo.m
+++ b/modules/gui/macosx/playlistinfo.m
@@ -425,6 +425,13 @@ error:
_NS("OK"), nil, nil);
}
+- (IBAction)downloadCoverArt:(id)sender
+{
+ playlist_t * p_playlist = pl_Hold( VLCIntf );
+ if( p_item) playlist_AskForArtEnqueue( p_playlist, p_item );
+ pl_Release( VLCIntf );
+}
+
- (input_item_t *)item
{
if( p_item ) vlc_gc_incref( p_item );
More information about the vlc-devel
mailing list