Compare commits
2 Commits
82b94e5b4e
...
6b21f83d03
| Author | SHA1 | Date | |
|---|---|---|---|
| 6b21f83d03 | |||
| 4a967c6b6c |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -8,3 +8,4 @@ debian/*.tmp
|
||||
debian/errors
|
||||
*.tmp
|
||||
errors
|
||||
test.tcl
|
||||
|
||||
14
debian/changelog
vendored
14
debian/changelog
vendored
@@ -1,3 +1,15 @@
|
||||
projman (2.0.0-beta6) stable; urgency=medium
|
||||
|
||||
* Добавил обновление информации в просмотрщике MD при сохранении открытого в редакторе файла.
|
||||
|
||||
-- Sergey Kalinin <svk@nuk-svk.ru> Wed, 8 Apr 2026 18:17:24 +0300
|
||||
|
||||
projman (2.0.0-beta6) stable; urgency=medium
|
||||
|
||||
* Новая сборка
|
||||
|
||||
-- Sergey Kalinin <svk@nuk-svk.ru> Wed, 8 Apr 2026 16:50:52 +0300
|
||||
|
||||
projman (2.0.0-beta6) stable; urgency=medium
|
||||
|
||||
* Добавлены настройки для просмотрщика MD в части касаемой ссылок и выделения текста.
|
||||
@@ -546,3 +558,5 @@ projman (2.0.0-alfa0) stable; urgency=medium
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -97,6 +97,7 @@ codeBlockFont=Monospace 10 italic
|
||||
textBG=#333333
|
||||
linkFont={Droid Sans Mono} 10 bold
|
||||
linkFG=#54bcff
|
||||
runViewer=true
|
||||
"
|
||||
proc Config::create {dir} {
|
||||
set cfgFile [open [file join $dir projman.ini] "w+"]
|
||||
|
||||
@@ -1511,6 +1511,15 @@ namespace eval Editor {
|
||||
}
|
||||
# puts [$w.panelTxt panes]
|
||||
DebugPuts "$w $fileType $nb $fileFullPath"
|
||||
|
||||
# set fileType [string toupper [string trimleft [file extension $filePath] "."]]
|
||||
|
||||
# Execute the MD-file viewer
|
||||
if {$fileType eq "MD" && $cfgVariables(runViewer) eq "true"} {
|
||||
ShowMD $fileFullPath
|
||||
return
|
||||
}
|
||||
|
||||
if [winfo exists $w.frmText2] {
|
||||
$w.panelTxt forget $w.frmText2
|
||||
destroy $w.frmText2
|
||||
|
||||
@@ -395,6 +395,14 @@ namespace eval FileOper {
|
||||
# puts "$f was saved"
|
||||
close $f
|
||||
ResetModifiedFlag $nbEditorItem $nbEditorWindow
|
||||
|
||||
# Проверяем если в редакторе открыт MD-файл и запущен его просмотрщик
|
||||
if {[string toupper [string trimleft [file extension $filePath] "."]] eq "MD" && [winfo exists .viewer]} {
|
||||
if {[wm title .viewer] eq $filePath} {
|
||||
ShowMD $filePath true
|
||||
}
|
||||
}
|
||||
|
||||
if {[file tail $filePath] eq "projman.ini"} {
|
||||
Config::read $dir(cfg)
|
||||
}
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
#
|
||||
######################################################
|
||||
|
||||
proc ShowMD {fileFullPath} {
|
||||
proc ShowMD {fileFullPath {reload "false"}} {
|
||||
global cfgVariables
|
||||
|
||||
set win .viewer
|
||||
|
||||
if {$reload eq "false"} {
|
||||
set parentGeometry [wm geometry .]
|
||||
set parentWidth [winfo width .]
|
||||
set parentHeight [winfo height .]
|
||||
@@ -32,7 +32,8 @@ proc ShowMD {fileFullPath} {
|
||||
|
||||
if { [winfo exists $win] } { destroy $win; return false }
|
||||
toplevel $win
|
||||
wm title $win "[::msgcat::mc "Help"]"
|
||||
# wm title $win "[::msgcat::mc "Help"]"
|
||||
wm title $win $fileFullPath
|
||||
wm geometry $win ${newWidth}x${newHeight}+${x}+${y}
|
||||
wm overrideredirect $win 0
|
||||
|
||||
@@ -63,7 +64,11 @@ proc ShowMD {fileFullPath} {
|
||||
$txt tag configure bold -font $cfgVariables(boldFont)
|
||||
$txt tag configure italicBold -font $cfgVariables(italicBoldFont)
|
||||
$txt tag configure link -foreground $cfgVariables(linkFG) -font $cfgVariables(linkFont)
|
||||
|
||||
$txt tag configure quote -background $cfgVariables(codeBlockBG)
|
||||
} else {
|
||||
set txt .viewer.frmHelp.txt
|
||||
$txt delete 0.0 end
|
||||
}
|
||||
set codeBlockBegin false
|
||||
|
||||
set f [open "$fileFullPath" r]
|
||||
@@ -102,6 +107,13 @@ proc ShowMD {fileFullPath} {
|
||||
ProcessLineWithURL $line $txt $result
|
||||
} elseif {$textTag eq "markable"} {
|
||||
ProcessLineWithMark $line $txt $result
|
||||
} elseif {$textTag eq "quote"} {
|
||||
set symList [split [lindex $result 2] ">"]
|
||||
for {set i 1} { $i < [llength $symList]} {incr i} {
|
||||
$txt insert end " " quote
|
||||
$txt insert end " "
|
||||
}
|
||||
$txt insert end [lindex $result 1]\n
|
||||
} else {
|
||||
$txt insert end "[lindex $result 1]\n" $textTag
|
||||
}
|
||||
@@ -299,6 +311,11 @@ proc MarkDownParser {line} {
|
||||
set result [ExtractURL $line {\[([^\]]+)\]\(([^)]+)\)}]
|
||||
return [list link $result]
|
||||
}
|
||||
# Quoted text
|
||||
if [regexp -nocase -line -- {(^>(?:>|\s)*)(.*)$} $line match v1 v2] {
|
||||
puts "Quoted text $match"
|
||||
return [list quote $v2 $v1]
|
||||
}
|
||||
|
||||
return [list {} $line]
|
||||
|
||||
@@ -381,6 +398,3 @@ proc ExtractBlocks {line pattern} {
|
||||
}
|
||||
return $result
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ exec wish8.6 "$0" -- "$@"
|
||||
######################################################
|
||||
# Version: 2.0.0
|
||||
# Release: beta6
|
||||
# Build: 08042026164832
|
||||
# Build: 08042026181732
|
||||
######################################################
|
||||
|
||||
# определим текущую версию, релиз и т.д.
|
||||
|
||||
Reference in New Issue
Block a user