From 9be552e4248a59d8d9219e707ac209d15489948f Mon Sep 17 00:00:00 2001 From: Sergey Kalinin Date: Thu, 11 Jan 2018 11:04:41 +0300 Subject: [PATCH] Changes color setting dialog into Setting. Actualizing information into About dialog --- CHANGELOG | 7 +++++++ editor.tcl | 3 ++- help.tcl | 3 ++- install.tcl | 3 ++- main.tcl | 32 +++++--------------------------- pane.tcl | 1 + procedure.tcl | 39 +++++++++++++++++++-------------------- projects.tcl | 2 ++ projman.conf | 1 + projman.tcl | 4 +++- settings.tcl | 44 +++++++++++++++++--------------------------- supertext.tcl | 1 + tkregexp.tcl | 0 13 files changed, 62 insertions(+), 78 deletions(-) mode change 100644 => 100755 projman.tcl mode change 100644 => 100755 tkregexp.tcl diff --git a/CHANGELOG b/CHANGELOG index 4920aa7..102e277 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,12 @@ # Author: Sergey Kalinin (aka BanZaj) banzaj@lrn.ru ######################################################### +0.4.5 + +11/01/2018 +- Changes color setting dialog into "Setting" +- Actualizing information into "About" dialog + 0.4.4 19/10/2015 @@ -350,5 +356,6 @@ Fixed bug with PageRise function + diff --git a/editor.tcl b/editor.tcl index 7d7124f..eff17a7 100644 --- a/editor.tcl +++ b/editor.tcl @@ -880,7 +880,7 @@ proc EditFile {node fileName} { text $w.text\ -relief sunken -wrap $editor(wrap) -highlightthickness 0 -undo 1 -font $editor(font)\ - -selectborderwidth 0 -selectbackground #55c4d1 -width 10 -background $editor(bg) -foreground $editor(fg) + -selectborderwidth 0 -selectbackground $editor(selectbg) -width 10 -background $editor(bg) -foreground $editor(fg) pack $w.text -side left -fill both -expand true $scrwin setwidget $w.text @@ -1157,5 +1157,6 @@ GetOp + diff --git a/help.tcl b/help.tcl index 3b6bdc9..e1bf16c 100644 --- a/help.tcl +++ b/help.tcl @@ -135,7 +135,7 @@ proc GetContent {file} { fconfigure $file -encoding binary while {[gets $file line]>=0} { # if {$line == ""} { -# set html "

$file

" +# set html "

æÁÊÌ $file ÎÅ ÓÏÄÅÒÖÉÔ ÄÁÎÎÙÈ

" # } set line [encoding convertfrom $sourceEncode $line] if {[regexp -nocase ".+\" $line a]} { @@ -358,5 +358,6 @@ proc TopLevelHelp {} { + diff --git a/install.tcl b/install.tcl index 6b19602..2ec1d20 100644 --- a/install.tcl +++ b/install.tcl @@ -8,7 +8,7 @@ ########################################################### ## SETTING VARIABLES AND DIRECTORYES ## -set ver "0.3.8" +set ver "0.4.5" set imgDir img set msgDir msgs set docDir hlp @@ -392,3 +392,4 @@ proc SetVarLang {lang} { + diff --git a/main.tcl b/main.tcl index 8c3021b..8800f5a 100644 --- a/main.tcl +++ b/main.tcl @@ -139,10 +139,10 @@ proc GetMenu {m} { $m add command -label [::msgcat::mc "Replace"] -command ReplaceDialog -font $fontNormal\ -accelerator "Ctrl+R" $m add cascade -label [::msgcat::mc "Encode"] -menu $m.encode -font $fontNormal - set me [menu $m.encode -bg $editor(bg) -fg $editor(fg)] - $me add command -label [::msgcat::mc "KOI8-R"] -command {TextEncode koi8-r} -font $fontNormal - $me add command -label [::msgcat::mc "CP1251"] -command {TextEncode cp1251} -font $fontNormal - $me add command -label [::msgcat::mc "CP866"] -command {TextEncode cp866} -font $fontNormal + set me [menu $m.encode -bg $editor(bg) -fg $editor(fg)] + $me add command -label [::msgcat::mc "KOI8-R"] -command {TextEncode koi8-r} -font $fontNormal + $me add command -label [::msgcat::mc "CP1251"] -command {TextEncode cp1251} -font $fontNormal + $me add command -label [::msgcat::mc "CP866"] -command {TextEncode cp866} -font $fontNormal } GetMenu [menu .frmMenu.mnuEdit.m -bg $editor(bg) -fg $editor(fg)];# main edit menu GetMenu [menu .popMnuEdit -bg $editor(bg) -fg $editor(fg)] ;# pop-up edit menu @@ -290,7 +290,7 @@ global tree noteBook set tree [Tree $frmTree.tree \ -relief sunken -borderwidth 1 -width 5 -height 5 -highlightthickness 1\ -redraw 0 -dropenabled 1 -dragenabled 1 -dragevent 3 \ --background $editor(bg) -selectbackground "#55c4d1" \ +-background $editor(bg) -selectbackground $editor(selectbg) -selectforeground white\ -droptypes { TREE_NODE {copy {} move {} link {}} LISTBOX_ITEM {copy {} move {} link {}} @@ -355,8 +355,6 @@ proc PopupMenuTab {menu x y} { tk_popup $menu $x $y } - - bind $frmTree.tree.c {catch [PopupMenuTree %X %Y]} ######### DEDERER: bind Wheel Scroll ################## @@ -389,23 +387,3 @@ focus -force $tree - - - - - - - - - - - - - - - - - - - - diff --git a/pane.tcl b/pane.tcl index 61f686d..98a9c26 100644 --- a/pane.tcl +++ b/pane.tcl @@ -97,3 +97,4 @@ namespace eval pane { + diff --git a/procedure.tcl b/procedure.tcl index ae0fce7..3e2ac08 100644 --- a/procedure.tcl +++ b/procedure.tcl @@ -440,11 +440,11 @@ proc AboutDialog {} { frame $w.frmlbl -borderwidth 2 -relief ridge label $w.frmlbl.lblVersion -text "[::msgcat::mc Version] $ver" - label $w.frmlbl.lblCompany -text "Copyright: Sergey Kalinin, 2001-2015" + label $w.frmlbl.lblCompany -text "License: GPL" label $w.frmlbl.lblAuthorName -text "[::msgcat::mc Author]: Sergey Kalinin" label $w.frmlbl.lblEmail -text "[::msgcat::mc E-mail]: banzaj28@gmail.com" label $w.frmlbl.lblWWW -fg black \ - -text "[::msgcat::mc "Home page"]:" + -text "[::msgcat::mc "Home page"]: https://bitbucket.org/svk28/projman/ , https://nuk-svk.ru" pack $w.frmlbl.lblVersion $w.frmlbl.lblCompany $w.frmlbl.lblAuthorName \ $w.frmlbl.lblEmail $w.frmlbl.lblWWW -side top -padx 5 @@ -471,15 +471,15 @@ proc AboutDialog {} { bind $w "$noteBook delete about" bind $w {$noteBook delete about} # - bind $w.frmlbl.lblWWW { - .frmBody.frmWork.noteBook.fabout.frmlbl.lblWWW configure -fg blue -cursor hand1 - LabelUpdate .frmStatus.frmHelp.lblHelp "Goto http://conero.lrn.ru" - } - bind $w.frmlbl.lblWWW { - .frmBody.frmWork.noteBook.fabout.frmlbl.lblWWW configure -fg black - LabelUpdate .frmStatus.frmHelp.lblHelp "" - } - bind $w.frmlbl.lblWWW {GoToURL "http://conero.lrn.ru"} + #bind $w.frmlbl.lblWWW { + # .frmBody.frmWork.noteBook.fabout.frmlbl.lblWWW configure -fg blue -cursor hand1 + # LabelUpdate .frmStatus.frmHelp.lblHelp "Goto http://conero.lrn.ru" + #} + #bind $w.frmlbl.lblWWW { + # .frmBody.frmWork.noteBook.fabout.frmlbl.lblWWW configure -fg black + # LabelUpdate .frmStatus.frmHelp.lblHelp "" + #} + #bind $w.frmlbl.lblWWW {GoToURL "http://conero.lrn.ru"} # bind $w.frmlbl.lblEmail { .frmBody.frmWork.noteBook.fabout.frmlbl.lblEmail configure -fg blue -cursor hand1 @@ -489,7 +489,7 @@ proc AboutDialog {} { .frmBody.frmWork.noteBook.fabout.frmlbl.lblEmail configure -fg black LabelUpdate .frmStatus.frmHelp.lblHelp "" } - bind $w.frmlbl.lblEmail {SendEmail "http://conero.lrn.ru"} + #bind $w.frmlbl.lblEmail {SendEmail "http://conero.lrn.ru"} $noteBook raise about @@ -822,6 +822,10 @@ proc Modules {} { # TkDIFF loading foreach m {tkcvs tkdiff ctags tkregexp} { if {$tcl_platform(platform) == "unix"} { + if {$m == "tkregexp"} { + set module($m) "[file join $binDir tkregexp.tcl]" + break + } set string [exec whereis $m] scan $string "%s%s" v module($m) if {[info exists module($m)] && [file isdirectory $module($m)] == 0} { @@ -829,14 +833,6 @@ proc Modules {} { } else { set module($m) "" } - } elseif {$tcl_platform(platform) == "mac"} { - set module($m) "" - } elseif {$tcl_platform(platform) == "windows"} { - if {$m == "tkregexp"} { - set module($m) "[file join $binDir tkregexp.tcl]" - } else { - set module($m) "" - } } } } @@ -1115,3 +1111,6 @@ proc TextOperation {oper} { + + + diff --git a/projects.tcl b/projects.tcl index 2869a46..b300c26 100644 --- a/projects.tcl +++ b/projects.tcl @@ -11,6 +11,7 @@ proc NewProjDialog {type} { set w .newProj # destroy the find window if it already exists if {[winfo exists $w]} { + destroy $w } @@ -903,3 +904,4 @@ proc InsertTitle {newFile type} { close $pipe } + diff --git a/projman.conf b/projman.conf index c898b88..df43f6b 100644 --- a/projman.conf +++ b/projman.conf @@ -73,3 +73,4 @@ set color(sql) "#620095" + diff --git a/projman.tcl b/projman.tcl old mode 100644 new mode 100755 index 18e54b5..ca0d3ea --- a/projman.tcl +++ b/projman.tcl @@ -8,7 +8,7 @@ ########################################################### ########## VERSION INFORMATION ########## -set ver "0.3.8" +set ver "0.4.5" package require BWidget package require msgcat @@ -24,6 +24,7 @@ if {[file exists $env(HOME)/projects/tcl/projman]==1} { set imgDir "[file join $env(HOME) projects tcl projman img]" set msgDir "[file join $env(HOME) projects tcl projman msgs]" set hlDir "[file join $env(HOME) projects tcl projman highlight]" + set binDir "[file join $env(HOME) projects tcl projman]" } else { set binDir [file join $rootDir bin] set dataDir [file join $rootDir share projman] @@ -98,5 +99,6 @@ foreach file [lsort [glob -nocomplain [file join $hlDir *.tcl]]] { set editor(selectBorder) "0" +#option add *tree.foreground red widgetDefault diff --git a/settings.tcl b/settings.tcl index 7f60890..fbac3cf 100644 --- a/settings.tcl +++ b/settings.tcl @@ -635,23 +635,23 @@ proc ConfigureEnt {col} { global editor color global main editFrm network $editFrm.frmColorEditFG.txtColorEditFG configure -background $col - $editFrm.frmColorProc.txtColorProc configure -background $col - $editFrm.frmColorKeyWord.txtColorKeyWord configure -background $col - $editFrm.frmColorParam.txtColorParam configure -background $col - $editFrm.frmColorSubParam.txtColorSubParam configure -background $col - $editFrm.frmColorComments.txtColorComments configure -background $col - $editFrm.frmColorVar.txtColorVar configure -background $col - $editFrm.frmColorString.txtColorString configure -background $col - $editFrm.frmColorBrace.txtColorBrace configure -background $col - $editFrm.frmColorBraceQuad.txtColorBraceQuad configure -background $col - $editFrm.frmColorBraceBG.txtColorBraceBG configure -background $col - $editFrm.frmColorBraceFG.txtColorBraceFG configure -background $col - $editFrm.frmColorPercent.txtColorPercent configure -background $col - $editFrm.frmColorBindKey.txtColorBindKey configure -background $col - $editFrm.frmColorLabel.txtColorLabel configure -background $col - $editFrm.frmColorSixFG.txtColorSixFG configure -background $col - $editFrm.frmColorSixBG.txtColorSixBG configure -background $col - $editFrm.frmColorSQL.txtColorSQL configure -background $col + $editFrm.frmColorProc.txtColorProc configure -background $col -fg $color(procName) + $editFrm.frmColorKeyWord.txtColorKeyWord configure -background $col -fg $color(keyWord) + $editFrm.frmColorParam.txtColorParam configure -background $col -fg $color(param) + $editFrm.frmColorSubParam.txtColorSubParam configure -background $col -fg $color(subParam) + $editFrm.frmColorComments.txtColorComments configure -background $col -fg $color(comments) + $editFrm.frmColorVar.txtColorVar configure -background $col -fg $color(var) + $editFrm.frmColorString.txtColorString configure -background $col -fg $color(string) + $editFrm.frmColorBrace.txtColorBrace configure -background $col -fg $color(brace) + $editFrm.frmColorBraceQuad.txtColorBraceQuad configure -background $col -fg $color(bracequad) + $editFrm.frmColorBraceBG.txtColorBraceBG configure -background $col -fg $color(braceBG) + $editFrm.frmColorBraceFG.txtColorBraceFG configure -background $col -fg $color(braceFG) + $editFrm.frmColorPercent.txtColorPercent configure -background $col -fg $color(percent) + $editFrm.frmColorBindKey.txtColorBindKey configure -background $col -fg $color(bindKey) + $editFrm.frmColorLabel.txtColorLabel configure -background $col -fg $color(label) + $editFrm.frmColorSixFG.txtColorSixFG configure -background $col -fg $color(sixFG) + $editFrm.frmColorSixBG.txtColorSixBG configure -background $col -fg $color(sixBG) + $editFrm.frmColorSQL.txtColorSQL configure -background $col -fg $color(sql) } ## READ CONFIG FILE ## @@ -858,13 +858,3 @@ proc SaveSettings {} { $noteBook raise [$noteBook page end] } - - - - - - - - - - diff --git a/supertext.tcl b/supertext.tcl index 65f9866..1f2c75e 100644 --- a/supertext.tcl +++ b/supertext.tcl @@ -384,3 +384,4 @@ proc supertext::text_index {w i} { + diff --git a/tkregexp.tcl b/tkregexp.tcl old mode 100644 new mode 100755