Commit fc50cd59 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: added option to switch between bright and dark interface styles

(requires a restart)
parent eeb8eda7
......@@ -12,12 +12,12 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="283"/>
<integer value="235"/>
<integer value="915"/>
<integer value="283"/>
<integer value="2730"/>
<integer value="4596"/>
<integer value="2"/>
<integer value="21"/>
<integer value="915"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
......
......@@ -53,7 +53,7 @@
IBOutlet id o_playlist_table;
IBOutlet id o_video_view;
BOOL b_gray_interface;
BOOL b_dark_interface;
BOOL b_video_playback_enabled;
BOOL b_time_remaining;
int i_lastShownVolume;
......
......@@ -107,7 +107,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
- (void)awakeFromNib
{
b_gray_interface = YES; //TODO
b_dark_interface = config_GetInt( VLCIntf, "macosx-interfacestyle" );
i_lastShownVolume = -1;
[o_play_btn setToolTip: _NS("Play/Pause")];
......@@ -125,7 +125,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_volume_up_btn setToolTip: _NS("Full Volume")];
[o_time_sld setToolTip: _NS("Position")];
if (b_gray_interface) {
if (!b_dark_interface) {
[o_bottombar_view setImage: [NSImage imageNamed:@"bottom-background"]];
[o_bwd_btn setImage: [NSImage imageNamed:@"back"]];
[o_bwd_btn setAlternateImage: [NSImage imageNamed:@"back-pressed"]];
......
......@@ -142,7 +142,6 @@ struct intf_sys_t
IBOutlet NSTextField * o_crashrep_includeEmail_txt;
input_state_e cachedInputState;
mtime_t i_end_scroll;
/* the manage thread */
pthread_t manage_thread;
......
......@@ -100,6 +100,9 @@ void CloseVideoGL ( vlc_object_t * );
#define USE_MEDIAKEYS_LONGTEXT N_("By default, VLC can be controlled using the media keys on modern Apple " \
"keyboards.")
#define INTERFACE_STYLE_TEXT N_("Run VLC with dark or bright interface style")
#define INTERFACE_STYLE_LONGTEXT N_("By default, VLC will use the dark interface style.")
vlc_module_begin ()
set_description( N_("Mac OS X interface") )
set_capability( "interface", 200 )
......@@ -119,6 +122,8 @@ vlc_module_begin ()
false )
add_bool( "macosx-mediakeys", true, USE_MEDIAKEYS_TEXT, USE_MEDIAKEYS_LONGTEXT,
false )
add_bool( "macosx-interfacestyle", true, INTERFACE_STYLE_TEXT, INTERFACE_STYLE_LONGTEXT,
false )
add_submodule ()
set_description( "Mac OS X Video Output Provider" )
......
......@@ -81,6 +81,9 @@
IBOutlet id o_input_serverport_txt;
IBOutlet id o_input_view;
IBOutlet id o_intf_style_txt;
IBOutlet id o_intf_style_dark_bcell;
IBOutlet id o_intf_style_bright_bcell;
IBOutlet id o_intf_art_pop;
IBOutlet id o_intf_art_txt;
IBOutlet id o_intf_embedded_ckb;
......
......@@ -222,6 +222,9 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
[o_input_serverport_txt setStringValue: _NS("Default Server Port")];
/* interface */
[o_intf_style_txt setStringValue: _NS("Interface style")];
[o_intf_style_dark_bcell setTitle: _NS("Dark")];
[o_intf_style_bright_bcell setTitle: _NS("Bright")];
[o_intf_art_txt setStringValue: _NS("Album art download policy")];
[o_intf_embedded_ckb setTitle: _NS("Add controls to the video window")];
[o_intf_fspanel_ckb setTitle: _NS("Show Fullscreen Controller")];
......@@ -265,8 +268,8 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
[o_video_snap_seqnum_ckb setTitle: _NS("Sequential numbering")];
/* generic stuff */
[[o_sprefs_basicFull_matrix cellAtRow: 0 column: 0] setStringValue: _NS("Basic")];
[[o_sprefs_basicFull_matrix cellAtRow: 0 column: 1] setStringValue: _NS("All")];
[[o_sprefs_basicFull_matrix cellAtRow: 0 column: 0] setTitle: _NS("Basic")];
[[o_sprefs_basicFull_matrix cellAtRow: 0 column: 1] setTitle: _NS("All")];
[o_sprefs_cancel_btn setTitle: _NS("Cancel")];
[o_sprefs_reset_btn setTitle: _NS("Reset All")];
[o_sprefs_save_btn setTitle: _NS("Save")];
......@@ -433,6 +436,10 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na
}
else
[o_intf_enableGrowl_ckb setState: NSOffState];
if (config_GetInt( p_intf, "macosx-interfacestyle" ))
[o_intf_style_dark_bcell setState: YES];
else
[o_intf_style_dark_bcell setState: NO];
/******************
* audio settings *
......@@ -759,7 +766,8 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
config_PutInt( p_intf, "macosx-fspanel", [o_intf_fspanel_ckb state] );
config_PutInt( p_intf, "embedded-video", [o_intf_embedded_ckb state] );
config_PutInt( p_intf, "macosx-appleremote", [o_intf_appleremote_ckb state] );
config_PutInt( p_intf, "macosx-mediakeys", [o_intf_mediakeys_ckb state] );
config_PutInt( p_intf, "macosx-mediakeys", [o_intf_mediakeys_ckb state] );
config_PutInt( p_intf, "macosx-interfacestyle", [o_intf_style_dark_bcell state] );
if( [o_intf_enableGrowl_ckb state] == NSOnState )
{
tmpString = getString( "control" );
......@@ -913,6 +921,10 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
/* okay, let's save our changes to vlcrc */
config_SaveConfigFile( p_intf );
[[NSNotificationCenter defaultCenter] postNotificationName: @"VLCMediaKeySupportSettingChanged"
object: nil
userInfo: nil];
}
- (void)showSettingsForCategory: (id)o_new_category_view
......
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