[vlc-commits] macosx: implement double click for hotkey prefs

David Fuhrmann git at videolan.org
Tue Mar 13 14:18:45 CET 2012


vlc/vlc-2.0 | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Tue Mar 13 13:22:07 2012 +0100| [1b2a1c83325633b1e78e27f739ffaff9f6959640] | committer: David Fuhrmann

macosx: implement double click for hotkey prefs
(cherry picked from commit d6d758229aa634c95373de579e182e357b7c78af)

Signed-off-by: David Fuhrmann <david.fuhrmann at googlemail.com>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=1b2a1c83325633b1e78e27f739ffaff9f6959640
---

 .../macosx/Resources/English.lproj/Preferences.xib |   12 ++++++------
 modules/gui/macosx/simple_prefs.m                  |   10 ++++++++++
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/extras/package/macosx/Resources/English.lproj/Preferences.xib b/extras/package/macosx/Resources/English.lproj/Preferences.xib
index e4cb695..0e82d81 100644
--- a/extras/package/macosx/Resources/English.lproj/Preferences.xib
+++ b/extras/package/macosx/Resources/English.lproj/Preferences.xib
@@ -12,10 +12,11 @@
     </object>
     <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
       <bool key="EncodedWithXMLCoder">YES</bool>
-      <integer value="2311"/>
+      <integer value="2265"/>
+      <integer value="2668"/>
       <integer value="2440"/>
+      <integer value="2311"/>
       <integer value="2562"/>
-      <integer value="2265"/>
     </object>
     <object class="NSArray" key="IBDocument.PluginDependencies">
       <bool key="EncodedWithXMLCoder">YES</bool>
@@ -3707,7 +3708,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
         <string key="NSExtension">NSResponder</string>
       </object>
       <object class="NSCustomView" id="48286561">
-        <nil key="NSNextResponder"/>
+        <reference key="NSNextResponder"/>
         <int key="NSvFlags">256</int>
         <object class="NSMutableArray" key="NSSubviews">
           <bool key="EncodedWithXMLCoder">YES</bool>
@@ -3827,7 +3828,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                         </object>
                         <int key="NSResizingMask">3</int>
                         <bool key="NSIsResizeable">YES</bool>
-                        <bool key="NSIsEditable">YES</bool>
                         <reference key="NSTableView" ref="807091610"/>
                       </object>
                       <object class="NSTableColumn" id="804468624">
@@ -3853,7 +3853,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                         </object>
                         <int key="NSResizingMask">3</int>
                         <bool key="NSIsResizeable">YES</bool>
-                        <bool key="NSIsEditable">YES</bool>
                         <reference key="NSTableView" ref="807091610"/>
                       </object>
                     </object>
@@ -3935,6 +3934,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
           </object>
         </object>
         <string key="NSFrameSize">{570, 415}</string>
+        <reference key="NSSuperview"/>
         <object class="NSMutableString" key="NSClassName">
           <characters key="NS.bytes">NSView</characters>
         </object>
@@ -9181,7 +9181,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
           <boolean value="YES"/>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
           <boolean value="YES"/>
-          <string>{{340, 947}, {570, 415}}</string>
+          <string>{{340, 591}, {570, 415}}</string>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
           <boolean value="YES"/>
           <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
diff --git a/modules/gui/macosx/simple_prefs.m b/modules/gui/macosx/simple_prefs.m
index 0bf32b9..6d40238 100644
--- a/modules/gui/macosx/simple_prefs.m
+++ b/modules/gui/macosx/simple_prefs.m
@@ -140,6 +140,9 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
     [o_intf_nativefullscreen_ckb setEnabled:NO];
 #endif
 
+    [o_hotkeys_listbox setTarget:self];
+    [o_hotkeys_listbox setDoubleAction:@selector(hotkeyTableDoubleClick:)];
+
     /* setup useful stuff */
     o_hotkeysNonUseableKeys = [[NSArray arrayWithObjects: @"Command-c", @"Command-x", @"Command-v", @"Command-a", @"Command-," , @"Command-h", @"Command-Alt-h", @"Command-Shift-o", @"Command-o", @"Command-d", @"Command-n", @"Command-s", @"Command-z", @"Command-l", @"Command-r", @"Command-3", @"Command-m", @"Command-w", @"Command-Shift-w", @"Command-Shift-c", @"Command-Shift-p", @"Command-i", @"Command-e", @"Command-Shift-e", @"Command-b", @"Command-Shift-m", @"Command-Ctrl-m", @"Command-?", @"Command-Alt-?", nil] retain];
 }
@@ -1228,6 +1231,13 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
     [self showSettingsForCategory: o_input_view];
 }
 
+- (void)hotkeyTableDoubleClick:(id)object
+{
+    // -1 is header
+    if( [o_hotkeys_listbox clickedRow] >= 0 )
+        [self hotkeySettingChanged:o_hotkeys_listbox];
+}
+
 - (IBAction)hotkeySettingChanged:(id)sender
 {
     if( sender == o_hotkeys_change_btn || sender == o_hotkeys_listbox )



More information about the vlc-commits mailing list