Revision: 16424
http://sourceforge.net/p/skim-app/code/16424
Author: hofman
Date: 2026-09-05 22:01:50 +0000 (Sat, 05 Sep 2026)
Log Message:
-----------
add preference to only open the notes pane when the document has notes
Modified Paths:
--------------
trunk/Base.lproj/GeneralPreferences.xib
trunk/InitialUserDefaults.plist
trunk/SKMainWindowController.m
trunk/SKStringConstants.h
trunk/SKStringConstants.m
trunk/de.lproj/GeneralPreferences.strings
trunk/en.lproj/GeneralPreferences.strings
trunk/es.lproj/GeneralPreferences.strings
trunk/fr.lproj/GeneralPreferences.strings
trunk/it.lproj/GeneralPreferences.strings
trunk/ja.lproj/GeneralPreferences.strings
trunk/nl.lproj/GeneralPreferences.strings
trunk/pl.lproj/GeneralPreferences.strings
trunk/ru.lproj/GeneralPreferences.strings
trunk/zh_CN.lproj/GeneralPreferences.strings
trunk/zh_TW.lproj/GeneralPreferences.strings
Modified: trunk/Base.lproj/GeneralPreferences.xib
===================================================================
--- trunk/Base.lproj/GeneralPreferences.xib 2026-09-05 18:10:58 UTC (rev
16423)
+++ trunk/Base.lproj/GeneralPreferences.xib 2026-09-05 22:01:50 UTC (rev
16424)
@@ -15,10 +15,10 @@
<customObject id="-1" userLabel="First Responder"
customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="1">
- <rect key="frame" x="0.0" y="0.0" width="368" height="427"/>
+ <rect key="frame" x="0.0" y="0.0" width="368" height="449"/>
<subviews>
<button toolTip="Open the contents pane only when the file has
a table of contents" horizontalHuggingPriority="252"
verticalHuggingPriority="750" imageHugsTitle="YES"
translatesAutoresizingMaskIntoConstraints="NO" id="3">
- <rect key="frame" x="18" y="317" width="252" height="18"/>
+ <rect key="frame" x="18" y="339" width="252" height="18"/>
<buttonCell key="cell" type="check" title="Open pane only
for Table of Contents" bezelStyle="regularSquare" imagePosition="left"
alignment="left" inset="2" id="49">
<behavior key="behavior" changeContents="YES"
doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
@@ -38,7 +38,7 @@
</connections>
</button>
<box verticalHuggingPriority="750" boxType="separator"
translatesAutoresizingMaskIntoConstraints="NO" id="5">
- <rect key="frame" x="12" y="372" width="344" height="5"/>
+ <rect key="frame" x="12" y="394" width="344" height="5"/>
</box>
<box verticalHuggingPriority="750" boxType="separator"
translatesAutoresizingMaskIntoConstraints="NO" id="6">
<rect key="frame" x="12" y="91" width="344" height="5"/>
@@ -127,7 +127,7 @@
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="252"
verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO"
id="16" userLabel="Open files:">
- <rect key="frame" x="18" y="345" width="70" height="16"/>
+ <rect key="frame" x="18" y="367" width="70" height="16"/>
<textFieldCell key="cell" scrollable="YES"
lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right"
title="Open files:" id="34">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor"
catalog="System" colorSpace="catalog"/>
@@ -184,7 +184,7 @@
</connections>
</popUpButton>
<popUpButton toolTip="Window size for newly opened files"
horizontalHuggingPriority="252" verticalHuggingPriority="750"
imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO"
id="ClK-rQ-vsN">
- <rect key="frame" x="91" y="338" width="104" height="25"/>
+ <rect key="frame" x="91" y="360" width="104" height="25"/>
<popUpButtonCell key="cell" type="push" title="Default"
bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on"
borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter"
preferredEdge="maxY" selectedItem="rQq-RM-Yog" id="WWI-W3-GZi">
<behavior key="behavior" lightByBackground="YES"
lightByGray="YES"/>
<font key="font" metaFont="menu"/>
@@ -210,7 +210,7 @@
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="252"
verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO"
id="hos-Of-u1Q" userLabel="Open files:">
- <rect key="frame" x="18" y="390" width="204" height="16"/>
+ <rect key="frame" x="18" y="412" width="204" height="16"/>
<textFieldCell key="cell" scrollable="YES"
lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right"
title="Reopen last open files at startup:" id="bXV-8Q-oZQ">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor"
catalog="System" colorSpace="catalog"/>
@@ -278,7 +278,7 @@
</connections>
</imageView>
<popUpButton toolTip="Remember and reopen files from a
previous run" verticalHuggingPriority="750"
translatesAutoresizingMaskIntoConstraints="NO" id="lVN-xI-ijg">
- <rect key="frame" x="225" y="383" width="127" height="25"/>
+ <rect key="frame" x="225" y="405" width="127" height="25"/>
<popUpButtonCell key="cell" type="push" title="Never"
bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on"
borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2"
selectedItem="gtz-vr-anS" id="D0s-vg-Wzx">
<behavior key="behavior" lightByBackground="YES"
lightByGray="YES"/>
<font key="font" metaFont="menu"/>
@@ -294,10 +294,19 @@
<binding destination="58" name="selectedTag"
keyPath="values.SKReopenLastOpenFiles" id="tk5-Kv-QW6"/>
</connections>
</popUpButton>
+ <button toolTip="Open the notes pane only when the file has
notes" horizontalHuggingPriority="252" verticalHuggingPriority="750"
imageHugsTitle="YES" translatesAutoresizingMaskIntoConstraints="NO"
id="I5T-QF-Xgz">
+ <rect key="frame" x="18" y="317" width="181" height="18"/>
+ <buttonCell key="cell" type="check" title="Open pane only
for Notes" bezelStyle="regularSquare" imagePosition="left" alignment="left"
inset="2" id="CyO-Qv-McM">
+ <behavior key="behavior" changeContents="YES"
doesNotDimImage="YES" lightByContents="YES"/>
+ <font key="font" metaFont="system"/>
+ </buttonCell>
+ <connections>
+ <binding destination="58" name="value"
keyPath="values.SKOpenNotesPaneOnlyForNotes" id="cSz-g6-gXG"/>
+ </connections>
+ </button>
</subviews>
<constraints>
<constraint firstItem="11" firstAttribute="top"
secondItem="13" secondAttribute="bottom" constant="12" id="0FC-yH-TEU"/>
- <constraint firstItem="10" firstAttribute="top" secondItem="3"
secondAttribute="bottom" constant="6" symbolic="YES" id="0kE-Qf-IKS"/>
<constraint firstAttribute="trailing"
relation="greaterThanOrEqual" secondItem="18" secondAttribute="trailing"
constant="20" symbolic="YES" id="1dC-9R-56p"/>
<constraint firstItem="YMN-MA-BZc" firstAttribute="leading"
secondItem="hos-Of-u1Q" secondAttribute="leading" id="20r-lI-K3p"/>
<constraint firstItem="f9u-Df-2s9" firstAttribute="leading"
relation="greaterThanOrEqual" secondItem="1" secondAttribute="leading"
constant="20" symbolic="YES" id="32P-dV-Eex"/>
@@ -305,6 +314,7 @@
<constraint firstItem="lVN-xI-ijg" firstAttribute="top"
secondItem="1" secondAttribute="top" constant="20" id="3qZ-MY-mHn"/>
<constraint firstItem="14" firstAttribute="leading"
secondItem="krj-lQ-Yls" secondAttribute="trailing" constant="8" symbolic="YES"
id="4l7-ly-FGP"/>
<constraint firstAttribute="trailing"
relation="greaterThanOrEqual" secondItem="hos-Of-u1Q"
secondAttribute="trailing" constant="20" symbolic="YES" id="6l3-zE-gSM"/>
+ <constraint firstAttribute="trailing"
relation="greaterThanOrEqual" secondItem="I5T-QF-Xgz"
secondAttribute="trailing" constant="20" symbolic="YES" id="72x-2L-fBL"/>
<constraint firstItem="3" firstAttribute="leading"
secondItem="hos-Of-u1Q" secondAttribute="leading" id="7ep-6b-PdA"/>
<constraint firstItem="14" firstAttribute="leading"
secondItem="13" secondAttribute="leading" id="8iP-uW-VDS"/>
<constraint firstAttribute="trailing"
relation="greaterThanOrEqual" secondItem="9" secondAttribute="trailing"
constant="20" symbolic="YES" id="9zb-Rk-CmA"/>
@@ -338,6 +348,8 @@
<constraint firstItem="19" firstAttribute="trailing"
secondItem="5" secondAttribute="trailing" id="TSo-3c-YFG"/>
<constraint firstAttribute="trailing"
relation="greaterThanOrEqual" secondItem="4" secondAttribute="trailing"
constant="20" symbolic="YES" id="U8O-JV-nun"/>
<constraint firstItem="9" firstAttribute="leading"
secondItem="7" secondAttribute="trailing" constant="8" symbolic="YES"
id="UHb-CR-xG0"/>
+ <constraint firstItem="10" firstAttribute="top"
secondItem="I5T-QF-Xgz" secondAttribute="bottom" constant="6" symbolic="YES"
id="UaC-LZ-wDQ"/>
+ <constraint firstItem="I5T-QF-Xgz" firstAttribute="top"
secondItem="3" secondAttribute="bottom" constant="6" symbolic="YES"
id="VaS-ks-HaM"/>
<constraint firstAttribute="trailing"
relation="greaterThanOrEqual" secondItem="YMN-MA-BZc"
secondAttribute="trailing" constant="20" symbolic="YES" id="VuG-1Z-TbY"/>
<constraint firstAttribute="trailing"
relation="greaterThanOrEqual" secondItem="10" secondAttribute="trailing"
constant="20" symbolic="YES" id="WRj-j0-8hB"/>
<constraint firstItem="7" firstAttribute="leading"
secondItem="hos-Of-u1Q" secondAttribute="leading" id="WeX-oG-9fM"/>
@@ -357,6 +369,7 @@
<constraint firstItem="8" firstAttribute="trailing"
secondItem="5" secondAttribute="trailing" id="jne-As-Stw"/>
<constraint firstItem="14" firstAttribute="top"
secondItem="18" secondAttribute="bottom" constant="8" id="kFa-WK-niq"/>
<constraint firstItem="6" firstAttribute="trailing"
secondItem="5" secondAttribute="trailing" id="klH-cN-ajl"/>
+ <constraint firstItem="I5T-QF-Xgz" firstAttribute="leading"
secondItem="hos-Of-u1Q" secondAttribute="leading" id="klO-fG-4YP"/>
<constraint firstItem="duc-5M-yv6" firstAttribute="leading"
secondItem="20" secondAttribute="trailing" constant="8" symbolic="YES"
id="kpP-fK-RP0"/>
<constraint firstItem="4" firstAttribute="leading"
secondItem="hos-Of-u1Q" secondAttribute="leading" id="lGd-Fh-0GF"/>
<constraint firstAttribute="trailing"
relation="greaterThanOrEqual" secondItem="duc-5M-yv6"
secondAttribute="trailing" constant="20" symbolic="YES" id="ldM-OS-AyE"/>
Modified: trunk/InitialUserDefaults.plist
===================================================================
--- trunk/InitialUserDefaults.plist 2026-09-05 18:10:58 UTC (rev 16423)
+++ trunk/InitialUserDefaults.plist 2026-09-05 22:01:50 UTC (rev 16424)
@@ -16,6 +16,8 @@
<array/>
<key>SKOpenContentsPaneOnlyForTOC</key>
<false/>
+ <key>SKOpenNotesPaneOnlyForNotes</key>
+ <false/>
<key>SKInitialWindowSizeOption</key>
<integer>0</integer>
<key>SKReopenLastOpenFiles</key>
@@ -252,6 +254,7 @@
<string>SKReopenLastOpenFiles</string>
<string>SKInitialWindowSizeOption</string>
<string>SKOpenContentsPaneOnlyForTOC</string>
+ <string>SKOpenNotesPaneOnlyForNotes</string>
<string>SKRememberLastPageViewed</string>
<string>SKRememberSnapshots</string>
<string>SKDefaultPDFDisplaySettings</string>
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2026-09-05 18:10:58 UTC (rev 16423)
+++ trunk/SKMainWindowController.m 2026-09-05 22:01:50 UTC (rev 16424)
@@ -459,6 +459,10 @@
else
[leftSideController.button setEnabled:NO
forSegment:SKSidePaneStateOutline];
+ // Show/hide right side pane if necessary
+ if ([sud boolForKey:SKOpenNotesPaneOnlyForNotesKey])
+ [[[splitViewController splitViewItems] lastObject] setCollapsed:[notes
count] == 0];
+
// Due to a bug in Leopard we should only resize and swap in the PDFView
after loading the PDFDocument
pdfSplitViewController = [[NSSplitViewController alloc] init];
Modified: trunk/SKStringConstants.h
===================================================================
--- trunk/SKStringConstants.h 2026-09-05 18:10:58 UTC (rev 16423)
+++ trunk/SKStringConstants.h 2026-09-05 22:01:50 UTC (rev 16424)
@@ -49,6 +49,7 @@
extern NSString * const SKDarkFullScreenBackgroundColorKey;
extern NSString * const SKLastOpenFileNamesKey;
extern NSString * const SKOpenContentsPaneOnlyForTOCKey;
+extern NSString * const SKOpenNotesPaneOnlyForNotesKey;
extern NSString * const SKInitialWindowSizeOptionKey;
extern NSString * const SKReopenLastOpenFilesKey;
extern NSString * const SKRememberLastPageViewedKey;
Modified: trunk/SKStringConstants.m
===================================================================
--- trunk/SKStringConstants.m 2026-09-05 18:10:58 UTC (rev 16423)
+++ trunk/SKStringConstants.m 2026-09-05 22:01:50 UTC (rev 16424)
@@ -49,6 +49,7 @@
NSString * const SKDarkFullScreenBackgroundColorKey =
@"SKDarkFullScreenBackgroundColor";
NSString * const SKLastOpenFileNamesKey = @"SKLastOpenFileNames";
NSString * const SKOpenContentsPaneOnlyForTOCKey =
@"SKOpenContentsPaneOnlyForTOC";
+NSString * const SKOpenNotesPaneOnlyForNotesKey =
@"SKOpenNotesPaneOnlyForNotes";
NSString * const SKInitialWindowSizeOptionKey = @"SKInitialWindowSizeOption";
NSString * const SKReopenLastOpenFilesKey = @"SKReopenLastOpenFiles";
NSString * const SKRememberLastPageViewedKey = @"SKRememberLastPageViewed";
Modified: trunk/de.lproj/GeneralPreferences.strings
===================================================================
(Binary files differ)
Modified: trunk/en.lproj/GeneralPreferences.strings
===================================================================
(Binary files differ)
Modified: trunk/es.lproj/GeneralPreferences.strings
===================================================================
(Binary files differ)
Modified: trunk/fr.lproj/GeneralPreferences.strings
===================================================================
(Binary files differ)
Modified: trunk/it.lproj/GeneralPreferences.strings
===================================================================
(Binary files differ)
Modified: trunk/ja.lproj/GeneralPreferences.strings
===================================================================
(Binary files differ)
Modified: trunk/nl.lproj/GeneralPreferences.strings
===================================================================
(Binary files differ)
Modified: trunk/pl.lproj/GeneralPreferences.strings
===================================================================
(Binary files differ)
Modified: trunk/ru.lproj/GeneralPreferences.strings
===================================================================
(Binary files differ)
Modified: trunk/zh_CN.lproj/GeneralPreferences.strings
===================================================================
(Binary files differ)
Modified: trunk/zh_TW.lproj/GeneralPreferences.strings
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit