Commit 7dd43543 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: added a URI column to the playlist table

parent 9b8190ed
...@@ -117,6 +117,7 @@ ...@@ -117,6 +117,7 @@
IBOutlet NSMenuItem * o_mi_ptc_description; IBOutlet NSMenuItem * o_mi_ptc_description;
IBOutlet NSMenuItem * o_mi_ptc_date; IBOutlet NSMenuItem * o_mi_ptc_date;
IBOutlet NSMenuItem * o_mi_ptc_language; IBOutlet NSMenuItem * o_mi_ptc_language;
IBOutlet NSMenuItem * o_mi_ptc_uri;
IBOutlet NSMenu * o_mu_audio; IBOutlet NSMenu * o_mu_audio;
IBOutlet NSMenuItem * o_mi_vol_up; IBOutlet NSMenuItem * o_mi_vol_up;
......
...@@ -301,6 +301,7 @@ static VLCMainMenu *_o_sharedInstance = nil; ...@@ -301,6 +301,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
[o_mi_ptc_description setTitle: _NS("Description")]; [o_mi_ptc_description setTitle: _NS("Description")];
[o_mi_ptc_date setTitle: _NS("Date")]; [o_mi_ptc_date setTitle: _NS("Date")];
[o_mi_ptc_language setTitle: _NS("Language")]; [o_mi_ptc_language setTitle: _NS("Language")];
[o_mi_ptc_uri setTitle: _NS("URI")];
[o_mi_program setTitle: _NS("Program")]; [o_mi_program setTitle: _NS("Program")];
[o_mu_program setTitle: _NS("Program")]; [o_mu_program setTitle: _NS("Program")];
...@@ -669,6 +670,8 @@ static VLCMainMenu *_o_sharedInstance = nil; ...@@ -669,6 +670,8 @@ static VLCMainMenu *_o_sharedInstance = nil;
o_column = DATE_COLUMN; o_column = DATE_COLUMN;
else if (sender == o_mi_ptc_language) else if (sender == o_mi_ptc_language)
o_column = LANGUAGE_COLUMN; o_column = LANGUAGE_COLUMN;
else if (sender == o_mi_ptc_uri)
o_column = URI_COLUMN;
[[[VLCMain sharedInstance] playlist] setColumn: o_column state: [sender state]]; [[[VLCMain sharedInstance] playlist] setColumn: o_column state: [sender state]];
} }
...@@ -693,6 +696,8 @@ static VLCMainMenu *_o_sharedInstance = nil; ...@@ -693,6 +696,8 @@ static VLCMainMenu *_o_sharedInstance = nil;
[o_mi_ptc_date setState: i_state]; [o_mi_ptc_date setState: i_state];
else if ([o_column isEqualToString: LANGUAGE_COLUMN]) else if ([o_column isEqualToString: LANGUAGE_COLUMN])
[o_mi_ptc_language setState: i_state]; [o_mi_ptc_language setState: i_state];
else if ([o_column isEqualToString: URI_COLUMN])
[o_mi_ptc_uri setState: i_state];
} }
#pragma mark - #pragma mark -
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#define DESCRIPTION_COLUMN @"description" #define DESCRIPTION_COLUMN @"description"
#define DATE_COLUMN @"date" #define DATE_COLUMN @"date"
#define LANGUAGE_COLUMN @"language" #define LANGUAGE_COLUMN @"language"
#define URI_COLUMN @"uri"
/***************************************************************************** /*****************************************************************************
* VLCPlaylistView interface * VLCPlaylistView interface
......
...@@ -390,6 +390,14 @@ ...@@ -390,6 +390,14 @@
free( psz_value ); \ free( psz_value ); \
} }
} }
else if( [o_identifier isEqualToString:URI_COLUMN] )
{
psz_value = decode_URI(input_item_GetURI( p_item->p_input )); \
if (psz_value) { \
o_value = [NSString stringWithUTF8String: psz_value]; \
free( psz_value ); \
}
}
else if( [o_identifier isEqualToString:@"status"] ) else if( [o_identifier isEqualToString:@"status"] )
{ {
if( input_item_HasErrorWhenReading( p_item->p_input ) ) if( input_item_HasErrorWhenReading( p_item->p_input ) )
...@@ -1394,6 +1402,8 @@ ...@@ -1394,6 +1402,8 @@
i_mode = SORT_ALBUM; i_mode = SORT_ALBUM;
else if( [o_identifier isEqualToString:DESCRIPTION_COLUMN] ) else if( [o_identifier isEqualToString:DESCRIPTION_COLUMN] )
i_mode = SORT_DESCRIPTION; i_mode = SORT_DESCRIPTION;
else if( [o_identifier isEqualToString:URI_COLUMN] )
i_mode = SORT_URI;
else else
return; return;
...@@ -1507,6 +1517,8 @@ ...@@ -1507,6 +1517,8 @@
[[o_work_tc headerCell] setStringValue: _NS("Date")]; [[o_work_tc headerCell] setStringValue: _NS("Date")];
else if ([o_column isEqualToString: LANGUAGE_COLUMN]) else if ([o_column isEqualToString: LANGUAGE_COLUMN])
[[o_work_tc headerCell] setStringValue: _NS("Language")]; [[o_work_tc headerCell] setStringValue: _NS("Language")];
else if ([o_column isEqualToString: URI_COLUMN])
[[o_work_tc headerCell] setStringValue: _NS("URI")];
[o_outline_view addTableColumn: o_work_tc]; [o_outline_view addTableColumn: o_work_tc];
[o_work_tc release]; [o_work_tc release];
......
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