diff options
author | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2008-08-20 09:21:44 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2008-08-20 10:00:37 -0700 |
commit | 6c5612c2e1df1e89388ffff97251f5328558f8e8 (patch) | |
tree | b9771cc8d46479729f34d24593680ff216052110 /hw/xquartz/X11Application.m | |
parent | bdc277c9b3dc6b3b95f74b20a49ce163c5fae980 (diff) |
XQuartz: Added window_item_modifiers defaults item (and option to localization) to change the modifier keys used for the windows menu.
(cherry picked from commit e4110861d307a55d9032cb83cf024ec1f294e8d7)
(cherry picked from commit fcfc05482a88696cb713c7a2ddfcf935ae8378a6)
Diffstat (limited to 'hw/xquartz/X11Application.m')
-rw-r--r-- | hw/xquartz/X11Application.m | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m index a5d412259..eeffd8c18 100644 --- a/hw/xquartz/X11Application.m +++ b/hw/xquartz/X11Application.m @@ -608,6 +608,7 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) { - (void) read_defaults { + NSString *nsstr; const char *tem; quartzUseSysBeep = [self prefs_get_boolean:@PREFS_SYSBEEP @@ -631,13 +632,26 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) { fake2 = [self prefs_get_string:@PREFS_FAKE_BUTTON2 default:NULL]; fake3 = [self prefs_get_string:@PREFS_FAKE_BUTTON3 default:NULL]; - if (fake2 != NULL) darwinFakeMouse2Mask = DarwinParseModifierList(fake2); - if (fake3 != NULL) darwinFakeMouse3Mask = DarwinParseModifierList(fake3); + if (fake2 != NULL) darwinFakeMouse2Mask = DarwinParseModifierList(fake2, TRUE); + if (fake3 != NULL) darwinFakeMouse3Mask = DarwinParseModifierList(fake3, TRUE); } tem = [self prefs_get_string:@PREFS_APPKIT_MODIFIERS default:NULL]; - if (tem != NULL) darwinAppKitModMask = DarwinParseModifierList(tem); + if (tem != NULL) darwinAppKitModMask = DarwinParseModifierList(tem, TRUE); + tem = [self prefs_get_string:@PREFS_WINDOW_ITEM_MODIFIERS default:NULL]; + if (tem != NULL) { + windowItemModMask = DarwinParseModifierList(tem, FALSE); + } else { + nsstr = NSLocalizedString (@"window item modifiers", @"window item modifiers"); + if(nsstr != NULL) { + tem = [nsstr UTF8String]; + if((tem != NULL) && strcmp(tem, "window item modifiers")) { + windowItemModMask = DarwinParseModifierList(tem, FALSE); + } + } + } + X11EnableKeyEquivalents = [self prefs_get_boolean:@PREFS_KEYEQUIVS default:X11EnableKeyEquivalents]; |