adium 2906:c759d36f6f23: Add a checkbox to the login window to e...

commits at adium.im commits at adium.im
Thu Nov 12 03:31:16 UTC 2009


details:	http://hg.adium.im/adium/rev/c759d36f6f23
revision:	2906:c759d36f6f23
author:		Zachary West <zacw at adium.im>
date:		Wed Nov 11 22:27:35 2009 -0500

Add a checkbox to the login window to enable on-the-fly debug logging.

Totally unlocalized window, nothing in which is even hinted at being non-English, so no string freeze breakage. This will eliminate our need to have a secondary debug build. This finish ups CFM's additions to enable debug logging dynamic rather than static from a few months ago.
(transplanted from 7d6a4178617d8cb1dd1668a96f6749699a942465)

diffs (47 lines):

diff -r a432d0b79552 -r c759d36f6f23 Resources/LoginSelect.nib/keyedobjects.nib
Binary file Resources/LoginSelect.nib/keyedobjects.nib has changed
diff -r a432d0b79552 -r c759d36f6f23 Source/AILoginWindowController.h
--- a/Source/AILoginWindowController.h	Tue Nov 10 10:56:52 2009 -0500
+++ b/Source/AILoginWindowController.h	Wed Nov 11 22:27:35 2009 -0500
@@ -24,6 +24,8 @@
     IBOutlet		NSTableView	*tableView_editableUserList;
     IBOutlet		NSPanel		*panel_userListEditor;
     IBOutlet		NSButton	*checkbox_displayOnStartup;
+	
+	IBOutlet		NSButton	*checkBox_debugMode;
 
     AILoginController	 		*owner;
     NSMutableArray				*userArray;
diff -r a432d0b79552 -r c759d36f6f23 Source/AILoginWindowController.m
--- a/Source/AILoginWindowController.m	Tue Nov 10 10:56:52 2009 -0500
+++ b/Source/AILoginWindowController.m	Wed Nov 11 22:27:35 2009 -0500
@@ -121,6 +121,13 @@
     [loginDict setObject:selectedUserName forKey:LOGIN_LAST_USER];
 #endif
 
+#ifndef DEBUG_BUILD
+	// If we're not in a debug build, activate debug logging if checked.
+	if (checkBox_debugMode.state == NSOnState) {
+		AIEnableDebugLogging();
+	}
+#endif
+	
     //Save the login preferences
     [loginDict asyncWriteToPath:[adium applicationSupportDirectory]
 					   withName:LOGIN_PREFERENCES_FILE_NAME];
@@ -235,6 +242,15 @@
 
     //Setup the 'display on launch' checkbox
     [checkbox_displayOnStartup setState:[[loginDict objectForKey:LOGIN_SHOW_WINDOW] boolValue]];
+	
+	//Setup the 'start in debug mode' checkbox
+#ifdef DEBUG_BUILD
+	//Disabled, checked for debug builds
+	checkBox_debugMode.state = NSOnState;
+	[checkBox_debugMode setEnabled:NO];	
+#else
+	checkBox_debugMode.state = NSOffState;
+#endif
 
     //Select the login they used last
 #if DEBUG_BUILD




More information about the commits mailing list