Skip to content

Commit 16cad41

Browse files
author
Geoff Nixon
committed
Merge latest changes from upstream.
1 parent 6df856b commit 16cad41

File tree

12 files changed

+80
-20
lines changed

12 files changed

+80
-20
lines changed

Classes/Controllers/TXMasterController.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,11 @@ - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sende
358358
}
359359
}
360360

361+
- (NSMenu *)applicationDockMenu:(NSApplication *)sender
362+
{
363+
return self.dockMenu;
364+
}
365+
361366
- (void)applicationWillTerminate:(NSNotification *)note
362367
{
363368
[RZWorkspaceNotificationCenter() removeObserver:self];

Classes/Controllers/TXMenuController.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2234,31 +2234,37 @@ - (void)exportPreferences:(id)sender
22342234
- (void)toggleMuteOnNotificationSounds:(id)sender
22352235
{
22362236
NSMenu *fileMenu = [[[NSApp mainMenu] itemWithTag:2] submenu];
2237+
NSMenu *dockMenu = [[NSApp delegate] applicationDockMenu:NSApp];
22372238

22382239
if ([self.worldController isSoundMuted]) {
22392240
self.worldController.isSoundMuted = NO;
22402241

22412242
[[fileMenu itemWithTag:6666] setState:NSOffState];
2243+
[[dockMenu itemWithTag:6666] setState:NSOffState];
22422244
} else {
22432245
self.worldController.isSoundMuted = YES;
22442246

22452247
[[fileMenu itemWithTag:6666] setState:NSOnState];
2248+
[[dockMenu itemWithTag:6666] setState:NSOnState];
22462249
}
22472250
}
22482251

22492252
- (void)toggleMuteOnAllNotifcations:(id)sender
22502253
{
22512254
/* Dig for the menu. */
22522255
NSMenu *fileMenu = [[[NSApp mainMenu] itemWithTag:2] submenu];
2256+
NSMenu *dockMenu = [[NSApp delegate] applicationDockMenu:NSApp];
22532257

22542258
if ([self.worldController areNotificationsDisabled]) {
22552259
self.worldController.areNotificationsDisabled = NO;
22562260

22572261
[[fileMenu itemWithTag:6667] setState:NSOffState];
2262+
[[dockMenu itemWithTag:6667] setState:NSOffState];
22582263
} else {
22592264
self.worldController.areNotificationsDisabled = YES;
22602265

22612266
[[fileMenu itemWithTag:6667] setState:NSOnState];
2267+
[[dockMenu itemWithTag:6667] setState:NSOnState];
22622268
}
22632269
}
22642270

Classes/Headers/TPCPreferences.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ typedef enum TXMainTextBoxFontSize : NSInteger {
129129

130130
+ (BOOL)automaticallyDetectHighlightSpam;
131131

132+
+ (BOOL)rememberServerListQueryStates;
133+
132134
+ (TXMainTextBoxFontSize)mainTextBoxFontSize;
133135

134136
+ (BOOL)logTranscript;

Classes/Headers/TXMasterController.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
@property (nonatomic, assign) BOOL applicationIsChangingActiveState;
4646
@property (nonatomic, assign) BOOL applicationIsRunningInHighResMode;
4747
@property (nonatomic, nweak) NSBox *channelViewBox;
48+
@property (nonatomic, nweak) NSMenu *dockMenu;
4849
@property (nonatomic, nweak) NSMenu *addServerMenu;
4950
@property (nonatomic, nweak) NSMenu *channelViewMenu;
5051
@property (nonatomic, nweak) NSMenu *tcopyURLMenu;

Classes/IRC/IRCChannelConfig.m

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -225,18 +225,23 @@ - (NSMutableDictionary *)dictionaryValue
225225
NSMutableDictionary *dic = [NSMutableDictionary dictionary];
226226

227227
[dic setInteger:self.type forKey:@"channelType"];
228-
229-
[dic setBool:self.autoJoin forKey:@"joinOnConnect"];
230-
[dic setBool:self.pushNotifications forKey:@"enableNotifications"];
231-
[dic setBool:self.ignoreHighlights forKey:@"ignoreHighlights"];
232-
[dic setBool:self.ignoreInlineImages forKey:@"disableInlineMedia"];
233-
[dic setBool:self.ignoreJPQActivity forKey:@"ignoreJPQActivity"];
234-
[dic setBool:self.showTreeBadgeCount forKey:@"enableTreeBadgeCountDrawing"];
228+
229+
if (self.type == IRCChannelNormalType) {
230+
[dic setBool:self.autoJoin forKey:@"joinOnConnect"];
231+
[dic setBool:self.pushNotifications forKey:@"enableNotifications"];
232+
[dic setBool:self.ignoreHighlights forKey:@"ignoreHighlights"];
233+
[dic setBool:self.ignoreInlineImages forKey:@"disableInlineMedia"];
234+
[dic setBool:self.ignoreJPQActivity forKey:@"ignoreJPQActivity"];
235+
[dic setBool:self.showTreeBadgeCount forKey:@"enableTreeBadgeCountDrawing"];
236+
}
235237

236238
[dic safeSetObject:self.itemUUID forKey:@"uniqueIdentifier"];
237239
[dic safeSetObject:self.channelName forKey:@"channelName"];
238-
[dic safeSetObject:self.defaultModes forKey:@"defaultMode"];
239-
[dic safeSetObject:self.defaultTopic forKey:@"defaultTopic"];
240+
241+
if (self.type == IRCChannelNormalType) {
242+
[dic safeSetObject:self.defaultModes forKey:@"defaultMode"];
243+
[dic safeSetObject:self.defaultTopic forKey:@"defaultTopic"];
244+
}
240245

241246
return [dic sortedDictionary];
242247
}

Classes/IRC/IRCClient.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ - (NSMutableDictionary *)dictionaryValue
276276
NSMutableArray *ary = [NSMutableArray array];
277277

278278
for (IRCChannel *c in self.channels) {
279-
if (c.isChannel) {
279+
if (c.isChannel || [TPCPreferences rememberServerListQueryStates]) {
280280
[ary safeAddObject:[c dictionaryValue]];
281281
}
282282
}

Classes/Preferences/TPCPreferences.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,11 @@ + (BOOL)confirmQuit
706706
return [RZUserDefaults() boolForKey:@"ConfirmApplicationQuit"];
707707
}
708708

709+
+ (BOOL)rememberServerListQueryStates
710+
{
711+
return [RZUserDefaults() boolForKey:@"ServerListRetainsQueriesBetweenRestarts"];
712+
}
713+
709714
+ (BOOL)rejoinOnKick
710715
{
711716
return [RZUserDefaults() boolForKey:@"RejoinChannelOnLocalKick"];
@@ -1388,6 +1393,7 @@ + (void)initPreferences
13881393
d[@"LogHighlights"] = @(YES);
13891394
d[@"AutomaticallyDetectHighlightSpam"] = @(YES);
13901395
d[@"LogTranscriptInBatches"] = @(YES);
1396+
d[@"ReloadScrollbackOnLaunch"] = @(YES);
13911397
d[@"ReplyUnignoredExternalCTCPRequests"] = @(YES);
13921398
d[@"TrackNicknameHighlightsOfLocalUser"] = @(YES);
13931399
d[@"WebKitDeveloperExtras"] = @(YES);

Classes/Views/Channel View/TVCLogController.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ - (void)openHistoricLog
154154

155155
[self.historicLogFile reset];
156156
} else {
157-
if (self.historyLoaded == NO && (self.channel && self.channel.isPrivateMessage == NO)) {
157+
if (self.historyLoaded == NO && (self.channel && (self.channel.isPrivateMessage == NO || [TPCPreferences rememberServerListQueryStates]))) {
158158
[self reloadHistory];
159159
}
160160
}
@@ -173,7 +173,7 @@ - (void)closeHistoricLog
173173
then we call a save before terminating. Or, we just erase the file from the
174174
path that it is written to entirely. */
175175

176-
if ([TPCPreferences reloadScrollbackOnLaunch] && (self.channel.isChannel && self.channel)) {
176+
if ([TPCPreferences reloadScrollbackOnLaunch] && ((self.channel.isChannel || [TPCPreferences rememberServerListQueryStates]) && self.channel)) {
177177
[self.historicLogFile updateCache];
178178
} else {
179179
[self.historicLogFile reset];

Resources/Info.plist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>3.2.2</string>
18+
<string>3.2.3</string>
1919
<key>CFBundleURLTypes</key>
2020
<array>
2121
<dict>
@@ -34,7 +34,7 @@
3434
</dict>
3535
</array>
3636
<key>CFBundleVersion</key>
37-
<string>3.2.2</string>
37+
<string>3.2.3</string>
3838
<key>LSApplicationCategoryType</key>
3939
<string>public.app-category.social-networking</string>
4040
<key>LSMinimumSystemVersion</key>
@@ -46,6 +46,6 @@
4646
<key>NSPrincipalClass</key>
4747
<string>NSApplication</string>
4848
<key>TXBundleBuildCodeName</key>
49-
<string>Turtle Truffles</string>
49+
<string>Purple Plums</string>
5050
</dict>
5151
</plist>

Resources/Localization/English.lproj/TDCPreferences.xib

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2885,7 +2885,7 @@
28852885
</connections>
28862886
</button>
28872887
<button id="7255">
2888-
<rect key="frame" x="10" y="174" width="201" height="18"/>
2888+
<rect key="frame" x="10" y="142" width="201" height="18"/>
28892889
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
28902890
<buttonCell key="cell" type="check" title="Darken main window colors." bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="7256">
28912891
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
@@ -2917,7 +2917,7 @@
29172917
<font key="titleFont" metaFont="system"/>
29182918
</box>
29192919
<button id="7503">
2920-
<rect key="frame" x="10" y="202" width="284" height="18"/>
2920+
<rect key="frame" x="10" y="172" width="284" height="18"/>
29212921
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
29222922
<buttonCell key="cell" type="check" title="Use large font for the server list and user list." bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="7504">
29232923
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
@@ -2941,7 +2941,7 @@
29412941
</connections>
29422942
</button>
29432943
<textField verticalHuggingPriority="750" id="kL4-Js-8e7">
2944-
<rect key="frame" x="46" y="123" width="134" height="16"/>
2944+
<rect key="frame" x="46" y="91" width="134" height="16"/>
29452945
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
29462946
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Window Transparency:" id="bNd-e3-dZf">
29472947
<font key="font" metaFont="cellTitle"/>
@@ -2950,7 +2950,7 @@
29502950
</textFieldCell>
29512951
</textField>
29522952
<slider verticalHuggingPriority="750" id="D0f-oB-97t">
2953-
<rect key="frame" x="213" y="122" width="197" height="15"/>
2953+
<rect key="frame" x="185" y="96" width="25" height="11"/>
29542954
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
29552955
<sliderCell key="cell" controlSize="small" continuous="YES" state="on" alignment="left" minValue="0.20000000000000001" maxValue="1" doubleValue="1" tickMarkPosition="above" sliderType="linear" id="f75-2j-XO9"/>
29562956
<connections>
@@ -2978,12 +2978,24 @@
29782978
</textFieldCell>
29792979
</textField>
29802980
<box autoresizesSubviews="NO" verticalHuggingPriority="750" alphaValue="0.5" title="Box" boxType="separator" titlePosition="noTitle" id="SKs-oC-6WA">
2981-
<rect key="frame" x="29" y="155" width="442" height="5"/>
2981+
<rect key="frame" x="29" y="123" width="442" height="5"/>
29822982
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
29832983
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
29842984
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
29852985
<font key="titleFont" metaFont="system"/>
29862986
</box>
2987+
<button id="891-QM-5Ov">
2988+
<rect key="frame" x="10" y="202" width="357" height="18"/>
2989+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
2990+
<buttonCell key="cell" type="check" title="Save the state of queries between restarts." bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="8az-P4-nKq">
2991+
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
2992+
<font key="font" metaFont="titleBar" size="12"/>
2993+
</buttonCell>
2994+
<connections>
2995+
<action selector="onChangedUserListModeSortOrder:" target="-2" id="abL-CQ-nFE"/>
2996+
<binding destination="1247" name="value" keyPath="values.ServerListRetainsQueriesBetweenRestarts" id="p2W-nH-beb"/>
2997+
</connections>
2998+
</button>
29872999
</subviews>
29883000
</view>
29893001
</tabViewItem>

0 commit comments

Comments
 (0)