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 --- macosx/plugins/DFNet/English.lproj/DFNet.xib | 707 +++++++++++++++++---- macosx/plugins/DFNet/English.lproj/SockDialog.xib | 272 +++++++- .../plugins/DFNet/macsrc/PluginConfigController.m | 33 +- macosx/plugins/DFNet/macsrc/SockDialog.h | 5 +- 4 files changed, 861 insertions(+), 156 deletions(-) (limited to 'macosx/plugins/DFNet') diff --git a/macosx/plugins/DFNet/English.lproj/DFNet.xib b/macosx/plugins/DFNet/English.lproj/DFNet.xib index bb2868f0..d39e4d92 100644 --- a/macosx/plugins/DFNet/English.lproj/DFNet.xib +++ b/macosx/plugins/DFNet/English.lproj/DFNet.xib @@ -1,7 +1,7 @@ - 1060 + 1070 12E55 3084 1187.39 @@ -11,6 +11,7 @@ 3084 + IBNSLayoutConstraint NSButton NSButtonCell NSCustomObject @@ -40,7 +41,7 @@ 15 2 - {{196, 240}, {340, 151}} + {{196, 240}, {340, 160}} 544735232 Settings NSWindow @@ -51,36 +52,10 @@ 256 - - - 268 - {{230, 13}, {96, 32}} - - - YES - - 67108864 - 134217728 - Okay - - LucidaGrande - 13 - 1044 - - - -2038284288 - 129 - - - 200 - 25 - - NO - 268 - {{126, 109}, {194, 22}} + {{126, 118}, {194, 22}} @@ -89,7 +64,11 @@ -1804599231 272630784 127.0.0.1 - + + LucidaGrande + 13 + 1044 + YES @@ -113,33 +92,10 @@ NO - - - 268 - {{134, 13}, {96, 32}} - - - - YES - - 67108864 - 134217728 - Cancel - - - -2038284288 - 129 - - Gw - 200 - 25 - - NO - 268 - {{126, 79}, {194, 22}} + {{126, 86}, {194, 22}} @@ -198,7 +154,7 @@ 268 - {{17, 111}, {75, 17}} + {{17, 120}, {75, 17}} @@ -230,7 +186,7 @@ 268 - {{17, 81}, {38, 17}} + {{17, 88}, {38, 17}} @@ -249,7 +205,7 @@ 268 - {{17, 51}, {101, 17}} + {{17, 56}, {101, 17}} @@ -268,10 +224,10 @@ 268 - {{126, 49}, {194, 22}} + {{126, 54}, {194, 22}} - + YES -1804599231 @@ -322,8 +278,58 @@ NO + + + 268 + {{267, 13}, {59, 32}} + + + + _NS:9 + YES + + 67108864 + 134217728 + OK + + _NS:9 + + -2038284288 + 129 + + DQ + 200 + 25 + + NO + + + + 268 + {{185, 13}, {82, 32}} + + + + _NS:9 + YES + + 67108864 + 134217728 + Cancel + + _NS:9 + + -2038284288 + 129 + + Gw + 200 + 25 + + NO + - {340, 151} + {340, 160} @@ -344,22 +350,6 @@ 3 - - - ok: - - - - 8 - - - - cancel: - - - - 15 - ipAddress @@ -423,35 +413,326 @@ 2 - - - + + + 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 + + + + 3 + 0 + + 4 + 1 + + 10 + + 1000 + + 6 + 24 + 3 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 3 + 0 + + 4 + 1 + + 10 + + 1000 + + 6 + 24 + 3 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 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 + + + + 11 + 0 + + 11 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 11 + 0 + + 11 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 11 + 0 + + 11 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + + - - + - - 6 - - - - - - - - 7 - - - 9 + + + 7 + 0 + + 0 + 1 + + 194 + + 1000 + + 3 + 9 + 1 + @@ -460,19 +741,6 @@ - - 13 - - - - - - - - 14 - - - 17 @@ -507,6 +775,22 @@ + + + 7 + 0 + + 0 + 1 + + 32 + + 1000 + + 3 + 9 + 1 + @@ -554,6 +838,132 @@ + + 32 + + + + + 35 + + + + + 46 + + + + + 47 + + + + + 48 + + + + + 49 + + + + + 52 + + + + + 54 + + + + + + + + 55 + + + + + 57 + + + + + 58 + + + + + 59 + + + + + + + + 60 + + + + + 61 + + + + + 63 + + + + + 45 + + + + + 31 + + + + + 72 + + + + + 74 + + + + + 78 + + + + + 79 + + + + + 82 + + + + + 83 + + + + + 84 + + + @@ -564,24 +974,44 @@ {{577, 640}, {372, 270}} 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 - - - - 126 - 0 - + + + + + + + + + + + + + + + + + + + + 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 @@ -590,15 +1020,43 @@ 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 - 30 + 84 @@ -610,15 +1068,24 @@ ./Classes/DFNetPlayPluginConfigController.h + + NSLayoutConstraint + NSObject + + IBProjectSource + ./Classes/NSLayoutConstraint.h + + 0 IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx - + YES 3 + YES diff --git a/macosx/plugins/DFNet/English.lproj/SockDialog.xib b/macosx/plugins/DFNet/English.lproj/SockDialog.xib index 6c2808d2..8225e87f 100644 --- a/macosx/plugins/DFNet/English.lproj/SockDialog.xib +++ b/macosx/plugins/DFNet/English.lproj/SockDialog.xib @@ -1,7 +1,7 @@ - 1060 + 1070 12E55 3084 1187.39 @@ -11,6 +11,7 @@ 3084 + IBNSLayoutConstraint NSButton NSButtonCell NSCustomObject @@ -40,7 +41,7 @@ 15 2 - {{196, 371}, {380, 140}} + {{196, 371}, {380, 124}} 544735232 Window NSWindow @@ -55,7 +56,7 @@ 268 - {{78, 103}, {225, 17}} + {{78, 87}, {225, 17}} @@ -97,24 +98,26 @@ {{103, 60}, {174, 20}} - + 24586 100 - + 268 - {{142, 13}, {96, 32}} + {{149, 13}, {82, 32}} + _NS:9 YES - + 67108864 134217728 Cancel - + _NS:9 + -2038284288 129 @@ -125,7 +128,7 @@ NO - {380, 140} + {380, 124} @@ -150,9 +153,17 @@ cancel: - + - 10 + 31 + + + + spinningBar + + + + 32 @@ -193,9 +204,105 @@ 2 - - + + + 9 + 0 + + 9 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 4 + 0 + + 4 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 9 + 0 + + 9 + 1 + + 0.0 + + 1000 + + 5 + 22 + 2 + + + + 3 + 0 + + 4 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 9 + 0 + + 9 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 3 + 0 + + 3 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + @@ -204,6 +311,22 @@ + + + 7 + 0 + + 0 + 1 + + 219 + + 1000 + + 3 + 9 + 1 + @@ -215,20 +338,78 @@ 6 + + + + 7 + 0 + + 0 + 1 + + 174 + + 1000 + + 3 + 9 + 1 + + - 7 - + 11 + + + + + 14 + + + + + 17 + + + + + 19 + + + + + 21 + + + + + 26 + - + - 8 - - + 27 + + + + + 28 + + + + + 29 + + + + + 30 + + @@ -239,21 +420,54 @@ com.apple.InterfaceBuilder.CocoaPlugin {{322, 765}, {382, 139}} + 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 - 10 + 32 + + NSLayoutConstraint + NSObject + + IBProjectSource + ./Classes/NSLayoutConstraint.h + + SockDialog NSWindowController @@ -268,6 +482,17 @@ id + + spinningBar + NSProgressIndicator + + + spinningBar + + spinningBar + NSProgressIndicator + + IBProjectSource ./Classes/SockDialog.h @@ -279,9 +504,10 @@ IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx - + YES 3 + YES diff --git a/macosx/plugins/DFNet/macsrc/PluginConfigController.m b/macosx/plugins/DFNet/macsrc/PluginConfigController.m index c25bd8bf..bb3b1061 100755 --- a/macosx/plugins/DFNet/macsrc/PluginConfigController.m +++ b/macosx/plugins/DFNet/macsrc/PluginConfigController.m @@ -32,6 +32,15 @@ static PluginConfigController *windowController = nil; +static inline void RunOnMainThreadSync(dispatch_block_t block) +{ + if ([NSThread isMainThread]) { + block(); + } else { + dispatch_sync(dispatch_get_main_queue(), block); + } +} + void AboutDlgProc() { // Get parent application instance @@ -70,17 +79,19 @@ void AboutDlgProc() void ConfDlgProc() { - NSWindow *window; - - if (windowController == nil) { - windowController = [[PluginConfigController alloc] initWithWindowNibName:@"DFNet"]; - } - window = [windowController window]; - - [windowController loadValues]; - - [window center]; - [window makeKeyAndOrderFront:nil]; + RunOnMainThreadSync(^{ + NSWindow *window; + + if (windowController == nil) { + windowController = [[PluginConfigController alloc] initWithWindowNibName:@"DFNet"]; + } + window = [windowController window]; + + [windowController loadValues]; + + [window center]; + [window makeKeyAndOrderFront:nil]; + }); } void ReadConfig() diff --git a/macosx/plugins/DFNet/macsrc/SockDialog.h b/macosx/plugins/DFNet/macsrc/SockDialog.h index 2898ceec..18f10bfd 100755 --- a/macosx/plugins/DFNet/macsrc/SockDialog.h +++ b/macosx/plugins/DFNet/macsrc/SockDialog.h @@ -9,8 +9,9 @@ #import -@interface SockDialog : NSWindowController { - +@interface SockDialog : NSWindowController +{ + IBOutlet NSProgressIndicator *spinningBar; } - (IBAction)cancel:(id)sender; @end -- cgit v1.2.3