summaryrefslogtreecommitdiff
path: root/macosx/plugins/DFNet/macsrc
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-07-05 21:59:24 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-07-05 21:59:24 +0000
commitd50bdc6fb2378fc3219e14c47a7b1adc60ee2203 (patch)
tree924bce4490768605b7c0041db20a40e074a597b1 /macosx/plugins/DFNet/macsrc
parent3296522bfedc2c72cb7d3f4476a64db8bbf38e8f (diff)
Change some +stringWithCString and -initWithCString:encoding: to modern Objective-C syntax.
Change the encoding of a couple of info.plists to UTF-8, otherwise Xcode was complaining. Removing some extra line breaks on OS X code. Other minor changes. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@85867 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/DFNet/macsrc')
-rwxr-xr-xmacosx/plugins/DFNet/macsrc/PluginConfigController.m7
-rwxr-xr-xmacosx/plugins/DFNet/macsrc/SockDialog.m2
2 files changed, 5 insertions, 4 deletions
diff --git a/macosx/plugins/DFNet/macsrc/PluginConfigController.m b/macosx/plugins/DFNet/macsrc/PluginConfigController.m
index 5f98e4a9..53f1567a 100755
--- a/macosx/plugins/DFNet/macsrc/PluginConfigController.m
+++ b/macosx/plugins/DFNet/macsrc/PluginConfigController.m
@@ -54,7 +54,7 @@ void AboutDlgProc()
[icon setSize:NSMakeSize(64, 64)];
NSDictionary *infoPaneDict =
- [NSDictionary dictionaryWithObjectsAndKeys:
+ [[NSDictionary alloc] initWithObjectsAndKeys:
[bundle objectForInfoDictionaryKey:@"CFBundleName"], @"ApplicationName",
icon, @"ApplicationIcon",
[bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"], @"ApplicationVersion",
@@ -65,6 +65,7 @@ void AboutDlgProc()
dispatch_async(dispatch_get_main_queue(), ^{
[app orderFrontStandardAboutPanelWithOptions:infoPaneDict];
});
+ RELEASEOBJ(infoPaneDict);
}
void ConfDlgProc()
@@ -144,8 +145,8 @@ char* PLUGLOC(char *toloc)
{
NSBundle *mainBundle = [NSBundle bundleForClass:[PluginConfigController class]];
NSString *origString = nil, *transString = nil;
- origString = [NSString stringWithCString:toloc encoding:NSUTF8StringEncoding];
+ origString = @(toloc);
transString = [mainBundle localizedStringForKey:origString value:nil table:nil];
- return (char*)[transString cStringUsingEncoding:NSUTF8StringEncoding];
+ return (char*)[transString UTF8String];
}
diff --git a/macosx/plugins/DFNet/macsrc/SockDialog.m b/macosx/plugins/DFNet/macsrc/SockDialog.m
index f175e7fa..065afc26 100755
--- a/macosx/plugins/DFNet/macsrc/SockDialog.m
+++ b/macosx/plugins/DFNet/macsrc/SockDialog.m
@@ -23,7 +23,7 @@ void SysMessage(const char *fmt, ...)
va_end(list);
//sprintf(cmd, "message %s\n", msg);
- NSString *errString = [NSString stringWithUTF8String:msg];
+ NSString *errString = @(msg);
fprintf(stderr, "%s", msg);
NSAlert *alert = [NSAlert alertWithMessageText:@"Error" defaultButton:@"Exit" alternateButton:nil otherButton:nil informativeTextWithFormat:@"%@", errString];
[alert setAlertStyle:NSCriticalAlertStyle];