From 531ad373b2c22e00a341a6635023cf8949571bd5 Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Thu, 22 Aug 2013 23:53:37 +0000 Subject: Moving most of the OS X preferences to auto layout, and all to 10.7. Changing some lists of independent checkbox buttons to matrices. Fix a discrepancy between SDL versions 1.2 and 2.0 APIs in OS X's input preferences. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@86849 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- .../DFCdrom/English.lproj/DFCdromPluginConfig.xib | 1023 ++++++++++++++++---- .../DFCdrom/macsrc/PluginConfigController.m | 33 +- 2 files changed, 850 insertions(+), 206 deletions(-) (limited to 'macosx/plugins/DFCdrom') diff --git a/macosx/plugins/DFCdrom/English.lproj/DFCdromPluginConfig.xib b/macosx/plugins/DFCdrom/English.lproj/DFCdromPluginConfig.xib index 43710512..ca6a67f7 100644 --- a/macosx/plugins/DFCdrom/English.lproj/DFCdromPluginConfig.xib +++ b/macosx/plugins/DFCdrom/English.lproj/DFCdromPluginConfig.xib @@ -1,30 +1,31 @@ - 1060 - 11C74 - 1938 - 1138.23 - 567.00 + 1070 + 12E55 + 3084 + 1187.39 + 626.00 com.apple.InterfaceBuilder.CocoaPlugin - 1938 + 3084 - NSPopUpButton + IBNSLayoutConstraint + NSBox NSButton - NSMenu - NSTextFieldCell NSButtonCell + NSCustomObject + NSMenu NSMenuItem - NSBox + NSPopUpButton + NSPopUpButtonCell NSSlider NSSliderCell - NSCustomObject + NSTextField + NSTextFieldCell NSView NSWindowTemplate - NSTextField - NSPopUpButtonCell com.apple.InterfaceBuilder.CocoaPlugin @@ -54,59 +55,11 @@ View - {283.34100000000001, 107} + {377, 238} 256 - - - 256 - {{119, 9}, {122, 32}} - - - YES - - 67239424 - 134217728 - Cancel - - LucidaGrande - 13 - 1044 - - - -2038284033 - 1 - - - Gw - 200 - 25 - - - - - 256 - {{241, 9}, {122, 32}} - - - YES - - 67239424 - 134217728 - OK - - - -2038284033 - 1 - - - DQ - 200 - 25 - - 256 @@ -115,53 +68,25 @@ 274 - - - 256 - {{13, 43}, {114, 17}} - - - YES - - 67239424 - 272629760 - Q0QtUk9NIFNwZWVkOgo - - - - 6 - System - controlColor - - 3 - MC42NjY2NjY2NjY3AA - - - - 6 - System - controlTextColor - - 3 - MAA - - - - 256 - {{26, 13}, {151, 18}} + {{15, 21}, {151, 18}} + YES - 67239424 + 67108864 0 Use Cached Reading - + + LucidaGrande + 13 + 1044 + - 1211912703 + 1211912448 2 NSImage @@ -175,20 +100,22 @@ 200 25 + NO 256 - {{129, 38}, {197, 26}} + {{128, 40}, {197, 26}} + YES - -2076049856 + -2076180416 2048 - 109199615 + 109199360 1 LucidaGrande @@ -306,19 +233,59 @@ YES 1 + NO + + + + 268 + {{14, 46}, {106, 17}} + + + + _NS:1535 + YES + + 68157504 + 272630784 + CD-ROM Speed: + + _NS:1535 + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + NO {{2, 2}, {339, 73}} + {{17, 128}, {343, 90}} + {0, 0} - 67239424 + 67108864 0 General Settings @@ -357,12 +324,14 @@ 256 - {{13, 19}, {114, 17}} + {{14, 21}, {114, 17}} + + {250, 750} YES - 67239424 + 67108864 272629760 Q2FjaGUgU2l6ZToKA @@ -370,16 +339,18 @@ + NO 256 - {{130, 15}, {195, 25}} + {{129, 15}, {195, 25}} + YES - 67239424 + 67108864 0 @@ -399,19 +370,22 @@ YES NO + NO {{2, 2}, {339, 51}} + - {{17, 49}, {343, 68}} + {{17, 56}, {343, 68}} + {0, 0} - 67239424 + 67108864 0 Misc @@ -427,35 +401,70 @@ 2 NO + + + 268 + {{304, 13}, {59, 32}} + + + + _NS:9 + YES + + 67108864 + 134217728 + OK + + _NS:9 + + -2038284288 + 129 + + DQ + 200 + 25 + + NO + + + + 268 + {{222, 13}, {82, 32}} + + + + _NS:9 + YES + + 67108864 + 134217728 + Cancel + + _NS:9 + + -2038284288 + 129 + + Gw + 200 + 25 + + NO + {377, 238} + - {{0, 0}, {1024, 746}} - {283.34100000000001, 129} + {{0, 0}, {1920, 1058}} + {377, 260} {10000000000000, 10000000000000} YES - - - ok: - - - - 133 - - - - cancel: - - - - 134 - window @@ -488,6 +497,22 @@ 184 + + + ok: + + + + 246 + + + + cancel: + + + + 254 + delegate @@ -496,14 +521,6 @@ 158 - - - nextKeyView - - - - 9 - @@ -538,36 +555,308 @@ 6 - - - + + + 5 + 0 + + 6 + 1 + + 12 + + 1000 + + 6 + 24 + 3 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 4 + 0 + + 4 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 4 + 0 + + 4 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 4 + 0 + + 4 + 1 + + 60 + + 1000 + + 3 + 9 + 3 + + + + 3 + 0 + + 3 + 1 + + 114 + + 1000 + + 3 + 9 + 3 + + + + 3 + 0 + + 4 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 3 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + - - 7 - - - - - - - - 8 - - - - - - 162 - + + + 11 + 0 + + 11 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 6 + 0 + + 6 + 1 + + 16 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 3 + 1 + + 24 + + 1000 + + 3 + 9 + 3 + + + + 4 + 0 + + 4 + 1 + + 21 + + 1000 + + 3 + 9 + 3 + + + + 5 + 0 + + 5 + 1 + + 16 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 16 + + 1000 + + 8 + 29 + 3 + + @@ -575,40 +864,81 @@ 164 + + + 6 + 0 + + 6 + 1 + + 16 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 3 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 3 + 0 + + 3 + 1 + + 28 + + 1000 + + 3 + 9 + 3 + + + + 5 + 0 + + 5 + 1 + + 16 + + 1000 + + 8 + 29 + 3 + - - 186 - - - - - 187 - - - -3 Application - - 168 - - - - - - - - 188 - - - 169 @@ -627,6 +957,22 @@ + + + 7 + 0 + + 0 + 1 + + 192 + + 1000 + + 3 + 9 + 1 + @@ -692,6 +1038,38 @@ + + + 8 + 0 + + 0 + 1 + + 17 + + 1000 + + 3 + 9 + 1 + + + + 7 + 0 + + 0 + 1 + + 108 + + 1000 + + 3 + 9 + 1 + @@ -705,6 +1083,22 @@ + + + 7 + 0 + + 0 + 1 + + 191 + + 1000 + + 3 + 9 + 1 + @@ -713,18 +1107,216 @@ + + 212 + + + + + 213 + + + + + 215 + + + + + 216 + + + + + 217 + + + + + 220 + + + + + 221 + + + + + 222 + + + + + 224 + + + + + 236 + + + + + 238 + + + + + 239 + + + + + 240 + + + + + 241 + + + + + 242 + + + + + + + + 243 + + + + + 245 + + + + + 247 + + + + + 249 + + + + + 250 + + + + + + + + 251 + + + + + 252 + + + + + 253 + + + + + 232 + + + + + 234 + + + + + 225 + + + + + 266 + + + + + + + + 267 + + + + + 270 + + + + + 271 + + + + + 272 + + + + + 273 + + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + + + com.apple.InterfaceBuilder.CocoaPlugin + + + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -734,32 +1326,76 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + + + + + + + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - 192 + 273 - DFCdromPluginConfigController - NSWindowController + NSLayoutConstraint + NSObject IBProjectSource - ./Classes/DFCdromPluginConfigController.h + ./Classes/NSLayoutConstraint.h @@ -768,18 +1404,15 @@ IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.macosx - + YES 3 - {9, 8} - {7, 2} + {11, 11} + {10, 3} {15, 15} + YES diff --git a/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m b/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m index ed80b490..c519a666 100755 --- a/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m +++ b/macosx/plugins/DFCdrom/macsrc/PluginConfigController.m @@ -26,6 +26,15 @@ #define APP_ID @"net.pcsxr.DFCdrom" #define PrefsKey APP_ID @" Settings" +static inline void RunOnMainThreadSync(dispatch_block_t block) +{ + if ([NSThread isMainThread]) { + block(); + } else { + dispatch_sync(dispatch_get_main_queue(), block); + } +} + static PluginConfigController *windowController = nil; void AboutDlgProc() @@ -68,17 +77,19 @@ void AboutDlgProc() void ConfDlgProc() { - NSWindow *window; - - if (windowController == nil) { - windowController = [[PluginConfigController alloc] initWithWindowNibName:@"DFCdromPluginConfig"]; - } - window = [windowController window]; - - [windowController loadValues]; - - [window center]; - [window makeKeyAndOrderFront:nil]; + RunOnMainThreadSync(^{ + NSWindow *window; + + if (windowController == nil) { + windowController = [[PluginConfigController alloc] initWithWindowNibName:@"DFCdromPluginConfig"]; + } + window = [windowController window]; + + [windowController loadValues]; + + [window center]; + [window makeKeyAndOrderFront:nil]; + }); } void ReadConfig() -- cgit v1.2.3