Commit 4d8b3700 authored by Felix Paul Kühne's avatar Felix Paul Kühne

Implemented the hotkey section of the Simple Preferences

plus a bit of code factorisation

Note that saving multi-key combinations will fail right now.
parent 0274be87
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>391 94 505 518 0 0 1280 778 </string>
<key>IBEditorPositions</key>
<dict>
<key>2311</key>
<string>345 406 590 264 0 0 1280 778 </string>
<key>2330</key>
<string>345 266 590 502 0 0 1280 778 </string>
<key>2440</key>
<string>345 343 590 389 0 0 1280 778 </string>
<key>2523</key>
<string>345 351 590 373 0 0 1280 778 </string>
<key>2562</key>
<string>345 310 590 455 0 0 1280 778 </string>
</dict>
<key>IBFramework Version</key>
<string>446.1</string>
<key>IBGroupedObjects</key>
<dict>
<key>1</key>
<array>
<string>2352</string>
<string>2353</string>
</array>
</dict>
<key>IBLastGroupID</key>
<string>3</string>
<key>IBLockedObjects</key>
<array>
<integer>2203</integer>
<integer>2208</integer>
<integer>2206</integer>
<integer>2199</integer>
</array>
<string>644</string>
<key>IBLastKnownRelativeProjectPath</key>
<string>../../vlc.xcodeproj</string>
<key>IBOldestOS</key>
<integer>5</integer>
<key>IBOpenObjects</key>
<array>
<integer>2265</integer>
<integer>2523</integer>
<integer>2562</integer>
<integer>2410</integer>
<integer>2440</integer>
<integer>2523</integer>
<integer>2678</integer>
<integer>2668</integer>
<integer>2311</integer>
</array>
<key>IBSystem Version</key>
<string>8S2167</string>
<string>9C31</string>
<key>targetFramework</key>
<string>IBCocoaFramework</string>
</dict>
</plist>
......@@ -189,7 +189,7 @@
#define SET( foo, bar ) \
char *psz_##foo = input_item_Get##bar ( p_item->p_input ); \
[self setMeta: psz_##foo forLabel: o_##foo##_txt]; \
free( psz_##foo );
FREENULL( psz_##foo );
/* fill the other fields */
SET( title, Title );
......
......@@ -51,6 +51,18 @@
IBOutlet id o_audio_vol_sld;
IBOutlet id o_audio_vol_txt;
IBOutlet id o_hotkeys_change_btn;
IBOutlet id o_hotkeys_change_lbl;
IBOutlet id o_hotkeys_change_keys_lbl;
IBOutlet id o_hotkeys_change_taken_lbl;
IBOutlet id o_hotkeys_change_win;
IBOutlet id o_hotkeys_change_cancel_btn;
IBOutlet id o_hotkeys_change_ok_btn;
IBOutlet id o_hotkeys_clear_btn;
IBOutlet id o_hotkeys_lbl;
IBOutlet id o_hotkeys_listbox;
IBOutlet id o_hotkeys_view;
IBOutlet id o_input_access_box;
IBOutlet id o_input_avi_pop;
IBOutlet id o_input_avi_txt;
......@@ -135,14 +147,18 @@
BOOL b_videoSettingChanged;
BOOL b_osdSettingChanged;
BOOL b_inputSettingChanged;
BOOL b_hotkeyChanged;
id o_currentlyShownCategoryView;
NSToolbar *o_sprefs_toolbar;
NSOpenPanel *o_selectFolderPanel;
NSArray *o_hotkeyDescriptions;
NSMutableArray *o_hotkeySettings;
intf_thread_t *p_intf;
}
+ (VLCSimplePrefs *)sharedInstance;
- (NSString *)OSXKeyToString:(int)val;
/* toolbar */
- (NSToolbarItem *) toolbar: (NSToolbar *)o_toolbar
......@@ -183,5 +199,16 @@
- (void)showInputSettings;
/* hotkeys */
- (IBAction)hotkeySettingChanged:(id)sender;
- (void)showHotkeySettings;
- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView;
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex;
- (void)changeHotkeyTo: (NSString *)o_theNewKey;
@end
@interface VLCHotkeyChangeWindow : NSWindow
- (void)keyDown:(NSEvent *)theEvent;
@end
This diff is collapsed.
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