Commit 52b2e5b2 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: finally implement a Reveal-in-Finder functionality

parent 64cd4196
Changes between 0.9.1 and 1.0.0-git: Changes between 0.9.2 and 1.0.0-git:
------------------------------------ ------------------------------------
Inputs: Inputs:
...@@ -15,12 +15,14 @@ Stream output: ...@@ -15,12 +15,14 @@ Stream output:
* Multiple bridge-in instances are now possible. * Multiple bridge-in instances are now possible.
* bridge-in can be used to configure a placeholder stream. * bridge-in can be used to configure a placeholder stream.
Changes between 0.9.1 and 0.9.2 Changes between 0.9.1 and 0.9.2
------------------------------- -------------------------------
* Restored the old behavior of --sout-keep. It is now de-activated by default. * Restored the old behavior of --sout-keep. It is now de-activated by default.
* Multiple bugfixes * Multiple bugfixes
Changes between 0.8.6i and 0.9.1: Changes between 0.8.6i and 0.9.1:
--------------------------------- ---------------------------------
......
...@@ -356,6 +356,7 @@ ...@@ -356,6 +356,7 @@
playItem = id; playItem = id;
preparseItem = id; preparseItem = id;
recursiveExpandNode = id; recursiveExpandNode = id;
revealItemInFinder = id;
savePlaylist = id; savePlaylist = id;
searchItem = id; searchItem = id;
selectAll = id; selectAll = id;
...@@ -376,11 +377,13 @@ ...@@ -376,11 +377,13 @@
"o_mi_play" = id; "o_mi_play" = id;
"o_mi_preparse" = id; "o_mi_preparse" = id;
"o_mi_recursive_expand" = id; "o_mi_recursive_expand" = id;
"o_mi_revealInFinder" = id;
"o_mi_save_playlist" = id; "o_mi_save_playlist" = id;
"o_mi_selectall" = id; "o_mi_selectall" = id;
"o_mi_services" = id; "o_mi_services" = id;
"o_mi_sort_author" = id; "o_mi_sort_author" = id;
"o_mi_sort_name" = id; "o_mi_sort_name" = id;
"o_mm_mi_revealInFinder" = id;
"o_mm_mi_services" = id; "o_mm_mi_services" = id;
"o_mm_mu_services" = id; "o_mm_mu_services" = id;
"o_mu_services" = id; "o_mu_services" = id;
......
...@@ -3,9 +3,11 @@ ...@@ -3,9 +3,11 @@
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>IBDocumentLocation</key> <key>IBDocumentLocation</key>
<string>69 71 356 240 0 0 1280 778 </string> <string>166 352 356 240 0 0 1280 778 </string>
<key>IBEditorPositions</key> <key>IBEditorPositions</key>
<dict> <dict>
<key>29</key>
<string>478 529 438 44 0 0 1280 778 </string>
<key>3568</key> <key>3568</key>
<string>476 535 328 85 0 0 1280 778 </string> <string>476 535 328 85 0 0 1280 778 </string>
<key>915</key> <key>915</key>
...@@ -19,10 +21,11 @@ ...@@ -19,10 +21,11 @@
<integer>4</integer> <integer>4</integer>
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array>
<integer>3706</integer> <integer>3568</integer>
<integer>21</integer> <integer>21</integer>
<integer>3706</integer>
<integer>29</integer>
<integer>915</integer> <integer>915</integer>
<integer>3568</integer>
</array> </array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>9E17</string> <string>9E17</string>
......
...@@ -80,6 +80,8 @@ ...@@ -80,6 +80,8 @@
IBOutlet id o_mi_delete; IBOutlet id o_mi_delete;
IBOutlet id o_mi_info; IBOutlet id o_mi_info;
IBOutlet id o_mi_preparse; IBOutlet id o_mi_preparse;
IBOutlet id o_mi_revealInFinder;
IBOutlet id o_mm_mi_revealInFinder;
IBOutlet id o_mi_selectall; IBOutlet id o_mi_selectall;
IBOutlet id o_mi_sort_name; IBOutlet id o_mi_sort_name;
IBOutlet id o_mi_sort_author; IBOutlet id o_mi_sort_author;
...@@ -127,6 +129,7 @@ ...@@ -127,6 +129,7 @@
- (IBAction)servicesChange:(id)sender; - (IBAction)servicesChange:(id)sender;
- (IBAction)playItem:(id)sender; - (IBAction)playItem:(id)sender;
- (IBAction)revealItemInFinder:(id)sender;
- (IBAction)preparseItem:(id)sender; - (IBAction)preparseItem:(id)sender;
- (IBAction)savePlaylist:(id)sender; - (IBAction)savePlaylist:(id)sender;
- (IBAction)deleteItem:(id)sender; - (IBAction)deleteItem:(id)sender;
......
...@@ -442,6 +442,9 @@ ...@@ -442,6 +442,9 @@
[o_mi_selectall setTitle: _NS("Select All")]; [o_mi_selectall setTitle: _NS("Select All")];
[o_mi_info setTitle: _NS("Information...")]; [o_mi_info setTitle: _NS("Information...")];
[o_mi_preparse setTitle: _NS("Fetch Meta Data")]; [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")];
[[o_mm_mi_revealInFinder menu] setAutoenablesItems: NO];
[o_mi_sort_name setTitle: _NS("Sort Node by Name")]; [o_mi_sort_name setTitle: _NS("Sort Node by Name")];
[o_mi_sort_author setTitle: _NS("Sort Node by Author")]; [o_mi_sort_author setTitle: _NS("Sort Node by Author")];
[o_mi_services setTitle: _NS("Services discovery")]; [o_mi_services setTitle: _NS("Services discovery")];
...@@ -520,6 +523,28 @@ ...@@ -520,6 +523,28 @@
{ {
/* update our info-panel to reflect the new item */ /* update our info-panel to reflect the new item */
[[[VLCMain sharedInstance] getInfo] updatePanelWithItem:p_item->p_input]; [[[VLCMain sharedInstance] getInfo] updatePanelWithItem:p_item->p_input];
/* update the state of our Reveal-in-Finder menu items */
NSMutableString *o_mrl;
char *psz_uri = input_item_GetURI( p_item->p_input );
if( psz_uri )
{
o_mrl = [NSMutableString stringWithUTF8String: psz_uri];
/* perform some checks whether it is a file and if it is local at all... */
NSRange prefix_range = [o_mrl rangeOfString: @"file:"];
if( prefix_range.location != NSNotFound )
[o_mrl deleteCharactersInRange: prefix_range];
if( [o_mrl characterAtIndex:0] == '/' )
{
[o_mi_revealInFinder setEnabled: YES];
[o_mm_mi_revealInFinder setEnabled: YES];
return;
}
}
[o_mi_revealInFinder setEnabled: NO];
[o_mm_mi_revealInFinder setEnabled: NO];
} }
} }
...@@ -763,6 +788,27 @@ ...@@ -763,6 +788,27 @@
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
- (IBAction)revealItemInFinder:(id)sender
{
playlist_item_t * p_item = [[o_outline_view itemAtRow:[o_outline_view selectedRow]] pointerValue];
NSMutableString * o_mrl = nil;
if(! p_item || !p_item->p_input )
return;
char *psz_uri = input_item_GetURI( p_item->p_input );
if( psz_uri )
o_mrl = [NSMutableString stringWithUTF8String: psz_uri];
/* perform some checks whether it is a file and if it is local at all... */
NSRange prefix_range = [o_mrl rangeOfString: @"file:"];
if( prefix_range.location != NSNotFound )
[o_mrl deleteCharactersInRange: prefix_range];
if( [o_mrl characterAtIndex:0] == '/' )
[[NSWorkspace sharedWorkspace] selectFile: o_mrl inFileViewerRootedAtPath: o_mrl];
}
/* When called retrieves the selected outlineview row and plays that node or item */ /* When called retrieves the selected outlineview row and plays that node or item */
- (IBAction)preparseItem:(id)sender - (IBAction)preparseItem:(id)sender
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment