Skip to content

Commit c4c56f3

Browse files
committed
Clean theme dead code and fix debug console colors for DM
1 parent 57c204d commit c4c56f3

File tree

12 files changed

+212
-1475
lines changed

12 files changed

+212
-1475
lines changed

Sources/WCApplicationController.m

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -792,11 +792,7 @@ - (BOOL)application:(NSApplication *)application openFile:(NSString *)filename {
792792

793793
extension = [filename pathExtension];
794794

795-
if([extension isEqualToString:@"WiredTheme"])
796-
return [[WCPreferences preferences] importThemeFromFile:filename];
797-
else if([extension isEqualToString:@"WiredTemplate"])
798-
return [[WCPreferences preferences] importTemplateFromFile:filename];
799-
else if([extension isEqualToString:@"WiredBookmarks"])
795+
if([extension isEqualToString:@"WiredBookmarks"])
800796
return [[WCPreferences preferences] importBookmarksFromFile:filename];
801797
else if([extension isEqualToString:@"WiredTrackerBookmarks"])
802798
return [[WCPreferences preferences] importTrackerBookmarksFromFile:filename];

Sources/WCChatController.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,8 @@ - (void)_printChat:(NSString *)chat by:(WCUser *)user {
321321
nick, @"nick",
322322
mutableOutput, @"message", nil];
323323

324-
NSLog(@"jsonProxy : %@", jsonProxy);
324+
325+
//NSLog(@"jsonProxy : %@", jsonProxy);
325326

326327
[_chatOutputWebView stringByEvaluatingJavaScriptFromString:
327328
[NSSWF:@"printMessage(%@);", [_jsonWriter stringWithObject:jsonProxy]]];

Sources/WCConsole.m

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#import "WCConsole.h"
3131
#import "WCServerConnection.h"
3232

33-
#define WCConsoleMaxLength 1048576
33+
#define WCConsoleMaxLength 1048576
3434

3535
@interface WCConsole(Private)
3636

@@ -91,12 +91,13 @@ - (void)_log:(NSString *)string color:(NSColor *)color {
9191
CGFloat position;
9292

9393
if(!font)
94-
font = [[NSFont fontWithName:@"Monaco" size:9.0] retain];
94+
font = [[NSFont fontWithName:@"Menlo" size:11.0] retain]; //
9595

9696
attributes = [NSDictionary dictionaryWithObjectsAndKeys:
9797
color, NSForegroundColorAttributeName,
9898
font, NSFontAttributeName,
9999
NULL];
100+
100101
attributedString = [NSAttributedString attributedStringWithString:string attributes:attributes];
101102

102103
position = [[_consoleScrollView verticalScroller] floatValue];
@@ -138,38 +139,38 @@ - (void)windowDidLoad {
138139
#pragma mark -
139140

140141
- (void)linkConnectionReceivedMessage:(NSNotification *)notification {
141-
[self _log:[[notification object] description] color:[NSColor blueColor]];
142+
[self _log:[[notification object] description] color:[NSColor systemBlueColor]]; //
142143
}
143144

144145

145146

146147
- (void)linkConnectionReceivedErrorMessage:(NSNotification *)notification {
147-
[self _log:[[notification object] description] color:[NSColor redColor]];
148+
[self _log:[[notification object] description] color:[NSColor systemRedColor]]; //
148149
}
149150

150151

151152

152153
- (void)linkConnectionReceivedInvalidMessage:(NSNotification *)notification {
153-
[self _log:[[notification object] description] color:[NSColor redColor]];
154-
[self _log:[[[notification userInfo] objectForKey:@"WCError"] localizedDescription] color:[NSColor redColor]];
154+
[self _log:[[notification object] description] color:[NSColor systemRedColor]]; //
155+
[self _log:[[[notification userInfo] objectForKey:@"WCError"] localizedDescription] color:[NSColor systemRedColor]]; //
155156
}
156157

157158

158159

159160
- (void)linkConnectionSentMessage:(NSNotification *)notification {
160-
[self _log:[[notification object] description] color:[NSColor blackColor]];
161+
[self _log:[[notification object] description] color:[NSColor controlTextColor]]; //
161162
}
162163

163164

164165

165166
- (void)exceptionHandlerReceivedBacktrace:(NSNotification *)notification {
166-
[self _log:[notification object] color:[NSColor redColor]];
167+
[self _log:[notification object] color:[NSColor systemRedColor]]; //
167168
}
168169

169170

170171

171172
- (void)exceptionHandlerReceivedException:(NSNotification *)notification {
172-
[self _log:[[notification object] description] color:[NSColor redColor]];
173+
[self _log:[[notification object] description] color:[NSColor systemRedColor]]; //
173174
}
174175

175176

@@ -181,7 +182,7 @@ - (void)log:(NSString *)format, ... {
181182

182183
va_start(ap, format);
183184

184-
[self _log:[NSString stringWithFormat:format arguments:ap] color:[NSColor redColor]];
185+
[self _log:[NSString stringWithFormat:format arguments:ap] color:[NSColor systemRedColor]]; //
185186

186187
va_end(ap);
187188
}

Sources/WCPreferences.h

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -66,21 +66,6 @@ extern NSString * const WCIconDidChangeNotification;
6666

6767
IBOutlet NSMatrix *_threadsSplitViewMatrix;
6868

69-
IBOutlet NSWindow *_themesWindow;
70-
IBOutlet NSWindow *_addThemeWindow;
71-
IBOutlet NSWindow *_manageThemesWindow;
72-
IBOutlet NSTextField *_addThemeNameTextField;
73-
IBOutlet NSPopUpButton *_themesPopUpButton;
74-
IBOutlet NSButton *_addThemeButton;
75-
IBOutlet NSButton *_deleteThemeButton;
76-
IBOutlet NSButton *_selectThemeButton;
77-
IBOutlet NSButton *_customizeThemesButton;
78-
79-
IBOutlet NSPopUpButton *_themesTemplatesPopUpButton;
80-
IBOutlet NSWindow *_themesTemplatesWindow;
81-
IBOutlet NSTableView *_themesTemplatesTableView;
82-
IBOutlet NSTableView *_themesTableView;
83-
8469
IBOutlet NSTextField *_themesChatFontTextField;
8570
IBOutlet NSButton *_themesChatFontButton;
8671
IBOutlet NSColorWell *_themesChatTextColorWell;
@@ -152,13 +137,10 @@ extern NSString * const WCIconDidChangeNotification;
152137

153138
IBOutlet NSTextField *_networkConnectionTimeoutTextField;
154139
IBOutlet NSTextField *_networkReadTimeoutTextField;
155-
IBOutlet NSPopUpButton *_networkCipherPopUpButton;
156140
IBOutlet NSButton *_networkCompressionButton;
157141

158142
IBOutlet NSView *_bookmarksExportView;
159-
160-
IBOutlet WCThemesPreferences *_themesPreferences;
161-
143+
162144
WITemplateBundleManager *_privateTemplateManager;
163145
WITemplateBundleManager *_publicTemplateManager;
164146

@@ -168,25 +150,13 @@ extern NSString * const WCIconDidChangeNotification;
168150

169151
+ (WCPreferences *)preferences;
170152

171-
- (BOOL)importThemeFromFile:(NSString *)path;
172153
- (BOOL)importTemplateFromFile:(NSString *)path;
173154
- (BOOL)importBookmarksFromFile:(NSString *)path;
174155
- (BOOL)importTrackerBookmarksFromFile:(NSString *)path;
175156
- (NSImage *)imageForTheme:(NSDictionary *)theme size:(NSSize)size;
176157

177158
- (IBAction)changePreferences:(id)sender;
178159

179-
- (IBAction)customizeTheme:(id)sender;
180-
- (IBAction)closeTheme:(id)sender;
181-
- (IBAction)addTheme:(id)sender;
182-
- (IBAction)cancelAddTheme:(id)sender;
183-
- (IBAction)okAddTheme:(id)sender;
184-
- (IBAction)editTheme:(id)sender;
185-
- (IBAction)deleteTheme:(id)sender;
186-
- (IBAction)duplicateTheme:(id)sender;
187-
- (IBAction)exportTheme:(id)sender;
188-
- (IBAction)importTheme:(id)sender;
189-
- (IBAction)selectTheme:(id)sender;
190160
- (IBAction)changeTheme:(id)sender;
191161
- (IBAction)changeThemeFont:(id)sender;
192162

0 commit comments

Comments
 (0)