From 92cca1915d344e37554838c09a213967019144a8 Mon Sep 17 00:00:00 2001 From: ceafdc Date: Thu, 1 Jan 2015 19:45:55 -0200 Subject: [PATCH] Trim the host name. --- PreferencesWindowController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PreferencesWindowController.m b/PreferencesWindowController.m index cfa40c8..e2285ef 100644 --- a/PreferencesWindowController.m +++ b/PreferencesWindowController.m @@ -40,7 +40,7 @@ - (IBAction)cancelButtonPressed:(id)sender { - (IBAction)saveButtonPressed:(id)sender { PingMenuAppDelegate *AppDelegate = (PingMenuAppDelegate *)[[NSApplication sharedApplication] delegate]; - AppDelegate.pingHost = self.domain.stringValue; + AppDelegate.pingHost = [self.domain.stringValue stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; [self close]; }