Made application URLs configurable through the info.plist file.
[pithos-macos] / pithos-macos / PithosPreferencesController.m
index b3807a9..43f6d2b 100644 (file)
 - (IBAction)authenticationLogin:(id)sender {
     // XXX hardcoded for now
     NSProcessInfo *processInfo = [NSProcessInfo processInfo];
-    NSString *loginURL = [NSString stringWithFormat:@"https://pithos.dev.grnet.gr/login?next=pithos://%@_%d",
-                          [processInfo processName], [processInfo processIdentifier]];
+    NSString *loginURL = [NSString stringWithFormat:@"%@?next=pithos://%@_%d",
+                          ((pithos_macosAppDelegate *)[[NSApplication sharedApplication] delegate]).loginURLPrefix, 
+                          [processInfo processName], 
+                          [processInfo processIdentifier]];
     if ([authenticationRenewCheckBox state] == NSOnState)
         loginURL = [loginURL stringByAppendingString:@"&renew="];
     NSLog(@"loginURL: %@", loginURL);