Update Ring Notepad - applications/rnote/rnotefilestabs.ring - Context Menu - Enable/Disable items based on opened files count.
@@ -71,18 +71,27 @@ class RNoteFilesTabs
oAction = new qAction(this.win1) {
settext("Close Other Files")
SetCLickevent(Method(:TabsCMCloseOtherFiles))
+ if this.filestabs.count() = 1
+ setenabled(False)
+ ok
}
addaction(oAction)
addseparator()
oAction = new qAction(this.win1) {
settext("Close Active File")
SetCLickevent(Method(:TabsCMCloseActiveFile))
+ if len(this.aFilesLines) = 0
+ setenabled(False)
+ ok
}
addaction(oAction)
addseparator()
oAction = new qAction(this.win1) {
settext("Close All")
SetCLickevent(Method(:TabsCMCloseAll))
+ if len(this.aFilesLines) <= 1
+ setenabled(False)
+ ok
}
addaction(oAction)
oCursor = new qCursor()
