Revision: 15292 http://sourceforge.net/p/skim-app/code/15292 Author: hofman Date: 2025-05-26 09:35:45 +0000 (Mon, 26 May 2025) Log Message: ----------- Implement interactionMode accesors in document category, no need for scriptingInteractionMode as separate property
Modified Paths: -------------- trunk/NSDocument_SKExtensions.h trunk/NSDocument_SKExtensions.m trunk/SKMainDocument.m trunk/SKNotesDocument.m trunk/Skim.sdef Modified: trunk/NSDocument_SKExtensions.h =================================================================== --- trunk/NSDocument_SKExtensions.h 2025-05-26 09:12:47 UTC (rev 15291) +++ trunk/NSDocument_SKExtensions.h 2025-05-26 09:35:45 UTC (rev 15292) @@ -60,7 +60,7 @@ @property (nonatomic, nullable, readonly) NSMenu *notesMenu; -@property (nonatomic, readonly) SKInteractionMode interactionMode; +@property (nonatomic) SKInteractionMode interactionMode; #pragma mark Document Setup @@ -125,7 +125,6 @@ @property (nonatomic, nullable, readonly) NSDictionary<NSString *, id> *documentAttributes; @property (nonatomic, readonly, getter=isPDFDocument) BOOL PDFDocument; @property (nonatomic, readonly) NSInteger toolMode; -@property (nonatomic) NSInteger scriptingInteractionMode; @property (nonatomic, nullable, readonly) NSDocument *presentationNotesDocument; @property (nonatomic, readonly) NSInteger presentationNotesOffset; @property (nonatomic, nullable, readonly) id readingBar; Modified: trunk/NSDocument_SKExtensions.m =================================================================== --- trunk/NSDocument_SKExtensions.m 2025-05-26 09:12:47 UTC (rev 15291) +++ trunk/NSDocument_SKExtensions.m 2025-05-26 09:35:45 UTC (rev 15292) @@ -95,6 +95,11 @@ return ([[self mainWindow] styleMask] & NSWindowStyleMaskFullScreen) == 0 ? SKNormalMode : SKFullScreenMode; } +- (void)setInteractionMode:(SKInteractionMode)mode { + if (mode != [self interactionMode] && (mode == SKFullScreenMode || mode == SKNormalMode)) + [[self mainWindow] toggleFullScreen:nil]; +} + #pragma mark Document Setup - (void)saveRecentDocumentInfo { @@ -362,10 +367,6 @@ - (NSInteger)toolMode { return 0; } -- (NSInteger)scriptingInteractionMode { return [self interactionMode]; } - -- (void)setScriptingInteractionMode:(NSInteger)mode {} - - (NSDocument *)presentationNotesDocument { return nil; } - (NSInteger)presentationNotesOffset { return 0; } Modified: trunk/SKMainDocument.m =================================================================== --- trunk/SKMainDocument.m 2025-05-26 09:12:47 UTC (rev 15291) +++ trunk/SKMainDocument.m 2025-05-26 09:35:45 UTC (rev 15292) @@ -1840,7 +1840,7 @@ [[self pdfView] setToolMode:newToolMode]; } -- (void)setScriptingInteractionMode:(NSInteger)mode { +- (void)setInteractionMode:(SKInteractionMode)mode { if (mode == SKNormalMode) { if ([[self mainWindowController] canExitFullscreen]) [[self mainWindowController] exitFullscreen]; Modified: trunk/SKNotesDocument.m =================================================================== --- trunk/SKNotesDocument.m 2025-05-26 09:12:47 UTC (rev 15291) +++ trunk/SKNotesDocument.m 2025-05-26 09:35:45 UTC (rev 15292) @@ -1014,9 +1014,4 @@ [outlineView selectRowIndexes:rowIndexes byExtendingSelection:NO]; } -- (void)setScriptingInteractionMode:(NSInteger)mode { - if (mode != [self interactionMode] && (mode == SKFullScreenMode || mode == SKNormalMode)) - [self toggleFullscreen:nil]; -} - @end Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2025-05-26 09:12:47 UTC (rev 15291) +++ trunk/Skim.sdef 2025-05-26 09:35:45 UTC (rev 15292) @@ -723,7 +723,7 @@ </property> <property name="interaction mode" type="interaction mode type" code="IMod" description="The interaction mode for the document."> - <cocoa key="scriptingInteractionMode"/> + <cocoa key="interactionMode"/> </property> <property name="containing PDF" type="boolean" code="iPDF" access="r" description="Is this a PDF document?"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit