adium-1.4 2767:7d6a4178617d: Add a checkbox to the login window ...
commits at adium.im
commits at adium.im
Thu Nov 12 03:27:40 UTC 2009
details: http://hg.adium.im/adium-1.4/rev/7d6a4178617d
revision: 2767:7d6a4178617d
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.
diffs (47 lines):
diff -r 67be3e959a78 -r 7d6a4178617d Resources/LoginSelect.nib/keyedobjects.nib
Binary file Resources/LoginSelect.nib/keyedobjects.nib has changed
diff -r 67be3e959a78 -r 7d6a4178617d 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 67be3e959a78 -r 7d6a4178617d 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
lastLogin = [loginDict objectForKey:LOGIN_LAST_USER];
More information about the commits
mailing list