From: Mitchell Livingston Date: Sat, 19 Jul 2008 13:40:23 +0000 (+0000) Subject: add a button to the prefs window to launch the web interface X-Git-Tag: 1.31~78 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a061b0191e29af39516c8cdd73e58bd548607ee;p=transmission add a button to the prefs window to launch the web interface --- diff --git a/macosx/PrefsController.h b/macosx/PrefsController.h index 9c71db409..8736df444 100644 --- a/macosx/PrefsController.h +++ b/macosx/PrefsController.h @@ -132,6 +132,7 @@ - (void) updateProxyPassword; - (void) setRPCEnabled: (id) sender; +- (void) linkWebUI: (id) sender; - (void) setRPCAuthorize: (id) sender; - (void) setRPCUsername: (id) sender; - (void) setRPCPassword: (id) sender; diff --git a/macosx/PrefsController.m b/macosx/PrefsController.m index ae0470106..62a02d775 100644 --- a/macosx/PrefsController.m +++ b/macosx/PrefsController.m @@ -56,6 +56,8 @@ #define RPC_KEYCHAIN_SERVICE "Transmission:Remote" #define RPC_KEYCHAIN_NAME "Remote" +#define WEBUI_URL @"http://localhost:%d/transmission/clutch/" + @interface PrefsController (Private) - (void) setPrefView: (id) sender; @@ -807,6 +809,12 @@ tr_sessionSetRPCEnabled(fHandle, [fDefaults boolForKey: @"RPC"]); } +- (void) linkWebUI: (id) sender +{ + NSString * urlString = [NSString stringWithFormat: WEBUI_URL, [fDefaults integerForKey: @"RPCPort"]]; + [[NSWorkspace sharedWorkspace] openURL: [NSURL URLWithString: urlString]]; +} + - (void) setRPCAuthorize: (id) sender { tr_sessionSetRPCPasswordEnabled(fHandle, [fDefaults boolForKey: @"RPCAuthorize"]); diff --git a/macosx/en.lproj/PrefsWindow.xib b/macosx/en.lproj/PrefsWindow.xib index 9d4841356..a1dcccad7 100644 --- a/macosx/en.lproj/PrefsWindow.xib +++ b/macosx/en.lproj/PrefsWindow.xib @@ -3230,7 +3230,7 @@ AAABAAAAAQ 256 - {{82, 367}, {158, 18}} + {{82, 410}, {158, 18}} YES @@ -3274,7 +3274,7 @@ AAABAAAAAQ 256 - {{100, 351}, {318, 14}} + {{100, 394}, {318, 14}} YES @@ -3619,13 +3619,38 @@ AAABAAAAAQ 25 + + + 256 + {{103, 350}, {149, 25}} + + YES + + -2080244224 + 134217728 + Launch Web Interface + + + -2038021889 + 163 + + + + 400 + 75 + + - {535, 403} + {535, 446} NSView NSResponder + + YES + RPC + YES @@ -6395,6 +6420,30 @@ AAABAAAAAQ 1714 + + + enabled: values.RPC + + + + + + enabled: values.RPC + enabled + values.RPC + 2 + + + 1719 + + + + linkWebUI: + + + + 1720 + @@ -8080,6 +8129,7 @@ AAABAAAAAQ + Remote @@ -8711,6 +8761,20 @@ AAABAAAAAQ + + 1717 + + + YES + + + + + + 1718 + + + @@ -8906,6 +8970,8 @@ AAABAAAAAQ 1706.CustomClassName 1706.IBPluginDependency 1706.ImportedFromIB2 + 1717.IBPluginDependency + 1718.IBPluginDependency 190.IBPluginDependency 190.ImportedFromIB2 192.IBPluginDependency @@ -9192,7 +9258,7 @@ AAABAAAAAQ com.apple.InterfaceBuilder.CocoaPlugin - {{414, 530}, {535, 403}} + {{414, 530}, {535, 446}} com.apple.InterfaceBuilder.CocoaPlugin {{281, 577}, {539, 315}} @@ -9299,6 +9365,8 @@ AAABAAAAAQ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -9527,7 +9595,7 @@ AAABAAAAAQ - 1716 + 1720 @@ -9630,6 +9698,7 @@ AAABAAAAAQ helpForRemote: importFolderSheetShow: incompleteFolderSheetShow: + linkWebUI: resetWarnings: setAutoImport: setAutoSize: @@ -9712,6 +9781,7 @@ AAABAAAAAQ id id id + id