diff --git a/BUGS b/BUGS index b358e70..b95ac04 100644 --- a/BUGS +++ b/BUGS @@ -30,3 +30,4 @@ balloon окне показать формат этой команды (такж + diff --git a/CHANGELOG b/CHANGELOG index 97fa024..6207988 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -10,6 +10,7 @@ - Added procedure arguments into tree - Change read config procedure (error fixed) - Fixed error when project running +- Added new Menu button into tollbar and Hide/Show options into config 05.03.2018 - Fixed "Add new file" toolbar button press @@ -418,3 +419,11 @@ characters to the right of the insertion cursor. + + + + + + + + diff --git a/COPYING b/COPYING index 6df934e..8ecb6c5 100644 --- a/COPYING +++ b/COPYING @@ -338,3 +338,4 @@ consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. + diff --git a/INSTALL b/INSTALL index e022708..bc2c2b1 100644 --- a/INSTALL +++ b/INSTALL @@ -9,3 +9,4 @@ 3. Type from the command line 'projman' and enjoy + diff --git a/KNOWBUG b/KNOWBUG index c30c034..f248ff1 100644 --- a/KNOWBUG +++ b/KNOWBUG @@ -9,3 +9,4 @@ -background In Debian - it's all right + diff --git a/README b/README index 5dc18cd..8b51100 100644 --- a/README +++ b/README @@ -46,3 +46,5 @@ dederer-a@mail.ru + + diff --git a/THANKS b/THANKS index 9bd4095..5bbea96 100644 --- a/THANKS +++ b/THANKS @@ -8,3 +8,4 @@ Serg Oskin, http://oskin.msk.ru/ DataX/FLORIN Inc. http://www.florin.ru (documentation) Peter Campbell, http://fastbase.co.nz/edit (ML-editor) Alexey Kakunin, http://kakunin.chat.ru/ (TCL Developer Studio) + diff --git a/TODO b/TODO index 6804739..e69de29 100644 --- a/TODO +++ b/TODO @@ -1,64 +0,0 @@ -########################################################## -# Tcl/Tk project Manager -# Distributed under GNU Public License -# Copyright (c) "Sergey Kalinin", 2002, http://nuk-svk.ru -# Author: Sergey Kalinin banzaj28@yandex.ru -########################################################## - -1. GUI -- Поиск процедуры по файлам проекта -- added tcl-console -- added readline widget -- into settings dialog --- on/off highligttning --- on/off -- Add color scheme -- перед первой фукнцией возможность перейти в начало документа, а после последней на конец -документа -- В статусбаре самый последнее поле (правое) где тест file saved уж -больно большое для таких кратких сообщений. -- Edit Window split - -2. An package managers system independed files -- rpm spec file -- deb - -5. Working with files -- search and replacement text into all projects files (ala grep) - -6. Working with projects -- - making project procedure --- compile error out -- generate installiation script for projects (install.tcl) -- synchronize version number into all projects file (if needed) -- added template file with headers -- documentation projects (LaTeX) -- added Select license procedure (settings dialog) -- change project dir (put into .proj file) - - -8. Internal editor -- files export --- ps --- html -- alphabetics ordered procedure list -- code/encode text files -- Add Insert curent date procedure -- search procedure with reguliar expretions -- On/Off wrap function - - -10. Help system -- patching html_lib -- searchin in help -- lock mouse and keyboard when help file opened - -11. Multiplatform featuring -- Windows printing - -фолдинг -поддержка frink (автоформаттер) -нумерация строк - - - diff --git a/img/menu.png b/img/menu.png new file mode 100644 index 0000000..aeae7f6 Binary files /dev/null and b/img/menu.png differ diff --git a/lib/filedialog.tcl b/lib/filedialog.tcl index d2ef209..cc5deb0 100644 --- a/lib/filedialog.tcl +++ b/lib/filedialog.tcl @@ -144,7 +144,7 @@ proc FileDialog {nbNode operation} { } elseif {[$tree exists $node] == 0 && $tree eq ".frmBody.frmCat.noteBook.ffiles.frmTreeFiles.treeFiles" } { set tree .frmBody.frmCat.noteBook.fprojects.frmTree.tree } else { - return + #return } ########## end ######## diff --git a/lib/main.tcl b/lib/main.tcl index c03990a..6587cb5 100644 --- a/lib/main.tcl +++ b/lib/main.tcl @@ -119,7 +119,9 @@ frame .frmMenu -border 1 -relief raised -background $editor(bg) frame .frmTool -border 1 -relief raised -background $editor(bg) frame .frmBody -border 1 -relief raised -background $editor(bg) frame .frmStatus -border 1 -relief sunken -bg $editor(bg) -pack .frmMenu -side top -padx 1 -fill x +if {[info exists menuShow]==1 && $menuShow eq "Yes"} { + pack .frmMenu -side top -padx 1 -fill x +} pack .frmTool -side top -padx 1 -fill x pack .frmBody -side top -padx 1 -fill both -expand true pack .frmStatus -side top -padx 1 -fill x @@ -127,39 +129,7 @@ pack .frmStatus -side top -padx 1 -fill x ########## CREATE MENU LINE ########## menubutton .frmMenu.mnuFile -text [::msgcat::mc "File"] -menu .frmMenu.mnuFile.m -font $fontNormal -bg $editor(bg) -fg $editor(fg) set m [menu .frmMenu.mnuFile.m -bg $editor(bg) -fg $editor(fg)] -$m add cascade -label [::msgcat::mc "New"] -menu $m.new -font $fontNormal -set mn [menu $m.new -bg $editor(bg) -fg $editor(fg)] -$mn add command -label [::msgcat::mc "New file"] -command {AddToProjDialog file [$noteBookFiles raise]}\ --font $fontNormal -accelerator "Ctrl+N" -$mn add command -label [::msgcat::mc "New directory"] -command {AddToProjDialog directory [$noteBookFiles raise]}\ --font $fontNormal -accelerator "Ctrl+N" -$mn add command -label [::msgcat::mc "New project"] -command {NewProjDialog "new"}\ --font $fontNormal -#$m add command -label [::msgcat::mc "Open"] -command {FileDialog $tree open}\ -#-font $fontNormal -accelerator "Ctrl+O" -state disable -$m add command -label [::msgcat::mc "Save"] -command {FileDialog [$noteBookFiles raise] save}\ --font $fontNormal -accelerator "Ctrl+S" -$m add command -label [::msgcat::mc "Save as"] -command {FileDialog [$noteBookFiles raise] save_as}\ --font $fontNormal -$m add command -label [::msgcat::mc "Save all"] -command {FileDialog [$noteBookFiles raise] save_all}\ --font $fontNormal -$m add command -label [::msgcat::mc "Close"] -command {FileDialog [$noteBookFiles raise] close}\ --font $fontNormal -accelerator "Ctrl+W" -$m add command -label [::msgcat::mc "Close all"] -command {FileDialog [$noteBookFiles raise] close_all}\ --font $fontNormal -$m add command -label [::msgcat::mc "Delete"] -command {FileDialog [$noteBookFiles raise] delete}\ --font $fontNormal -accelerator "Ctrl+D" -$m add separator -$m add command -label [::msgcat::mc "Compile file"] -command {MakeProj compile file} -font $fontNormal -accelerator "Ctrl+F8" -$m add command -label [::msgcat::mc "Run file"] -command {MakeProj run file} -font $fontNormal -accelerator "Ctrl+F9" -$m add separator -$m add command -label [::msgcat::mc "Print"] -command PrintDialog\ --font $fontNormal -accelerator "Ctrl+P" -$m add separator -$m add command -label [::msgcat::mc "Settings"] -command {Settings $noteBook} -font $fontNormal -$m add separator -$m add command -label [::msgcat::mc "Exit"] -command Quit -font $fontNormal -accelerator "Ctrl+Q" - +GetFileMenu $m ##.frmMenu 'Project' ## @@ -176,40 +146,17 @@ GetMenu [menu .popMnuEdit -bg $editor(bg) -fg $editor(fg)] ;# pop-up edit menu ## VIEW MENU ## menubutton .frmMenu.mnuView -text [::msgcat::mc "View"] -menu .frmMenu.mnuView.m -font $fontNormal -bg $editor(bg) -fg $editor(fg) set m [menu .frmMenu.mnuView.m -bg $editor(bg) -fg $editor(fg)] -$m add checkbutton -label [::msgcat::mc "Toolbar"] -font $fontNormal -state normal\ --offvalue "No" -onvalue "Yes" -variable toolBar -command {ToolBar} -$m add command -label [::msgcat::mc "Split edit window"] -font $fontNormal -accelerator "F4" -state disable\ --command SplitWindow -$m add separator -$m add command -label [::msgcat::mc "Refresh"] -font $fontNormal -accelerator "F5" -state normal\ --command UpdateTree - +GetViewMenu $m ##.frmMenu Settings ## menubutton .frmMenu.mnuCVS -text [::msgcat::mc "Modules"] -menu .frmMenu.mnuCVS.m \ -font $fontNormal -state normal -bg $editor(bg) -fg $editor(fg) set m [menu .frmMenu.mnuCVS.m -bg $editor(bg) -fg $editor(fg)] -if {[info exists module(tkcvs)]} { - $m add command -label "TkCVS" -command {DoModule tkcvs} -font $fontNormal -} -if {[info exists module(tkdiff)]} { - $m add command -label "TkDIFF+" -command {DoModule tkdiff} -font $fontNormal -} -if {[info exists module(tkregexp)]} { - $m add command -label "TkREGEXP" -command {DoModule tkregexp} -font $fontNormal -} -if {[info exists module(gitk)]} { - $m add command -label "Gitk" -font $fontNormal -command { - DoModule gitk - GetTagList [file join $workDir $activeProject.tags] ;# geting tag list - } -} +GetModulesMenu $m + menubutton .frmMenu.mnuHelp -text [::msgcat::mc "Help"] -menu .frmMenu.mnuHelp.m \ -underline 0 -font $fontNormal -bg $editor(bg) -fg $editor(fg) set m [menu .frmMenu.mnuHelp.m -bg $editor(bg) -fg $editor(fg)] -$m add command -label [::msgcat::mc "Help"] -command ShowHelp \ --accelerator F1 -font $fontNormal -$m add command -label [::msgcat::mc "About ..."] -command AboutDialog \ --font $fontNormal +GetHelpMenu $m pack .frmMenu.mnuFile .frmMenu.mnuProj .frmMenu.mnuEdit .frmMenu.mnuView .frmMenu.mnuCVS -side left pack .frmMenu.mnuHelp -side right @@ -420,3 +367,5 @@ if {[info exists workingProject]} { } } + + diff --git a/lib/menu.tcl b/lib/menu.tcl index 7f026fe..3893b6a 100644 --- a/lib/menu.tcl +++ b/lib/menu.tcl @@ -74,8 +74,8 @@ proc GetMenu {m} { unset nb } $m add command -label [::msgcat::mc "Comment selected"] -font $fontNormal -accelerator "Ctrl+,"\ - -command {TextOperation comment} - $m add command -label [::msgcat::mc "Uncomment selected"] -font $fontNormal -accelerator "Ctrl+." \ + -command {TextOperation comment} + $m add command -label [::msgcat::mc "Uncomment selected"] -font $fontNormal -accelerator "Ctrl+." \ -command {TextOperation uncomment} $m add separator @@ -91,3 +91,80 @@ proc GetMenu {m} { $me add command -label [::msgcat::mc "CP1251"] -command {TextEncode cp1251} -font $fontNormal $me add command -label [::msgcat::mc "CP866"] -command {TextEncode cp866} -font $fontNormal } + +proc GetViewMenu {m} { + global fontNormal fontBold imgDir editor + $m add checkbutton -label [::msgcat::mc "Show the Menu"] -font $fontNormal -state normal\ + -offvalue "No" -onvalue "Yes" -variable showMenu -command {ToolBar} + $m add checkbutton -label [::msgcat::mc "Toolbar"] -font $fontNormal -state normal\ + -offvalue "No" -onvalue "Yes" -variable toolBar -command {ToolBar} + $m add command -label [::msgcat::mc "Split edit window"] -font $fontNormal -accelerator "F4" -state disable\ + -command SplitWindow + $m add separator + $m add command -label [::msgcat::mc "Refresh"] -font $fontNormal -accelerator "F5" -state normal\ + -command UpdateTree +} + +proc GetModulesMenu {m} { + global fontNormal fontBold imgDir editor module activeProject + if {[info exists module(tkcvs)]} { + $m add command -label "TkCVS" -command {DoModule tkcvs} -font $fontNormal + } + if {[info exists module(tkdiff)]} { + $m add command -label "TkDIFF+" -command {DoModule tkdiff} -font $fontNormal + } + if {[info exists module(tkregexp)]} { + $m add command -label "TkREGEXP" -command {DoModule tkregexp} -font $fontNormal + } + if {[info exists module(gitk)]} { + $m add command -label "Gitk" -font $fontNormal -command { + DoModule gitk + GetTagList [file join $workDir $activeProject.tags] ;# geting tag list + } + } +} + +proc GetHelpMenu {m} { + global fontNormal fontBold imgDir editor + $m add command -label [::msgcat::mc "Help"] -command ShowHelp \ + -accelerator F1 -font $fontNormal + $m add command -label [::msgcat::mc "About ..."] -command AboutDialog \ + -font $fontNormal +} +proc GetFileMenu {m} { + global fontNormal fontBold imgDir editor noteBookFiles noteBook + $m add cascade -label [::msgcat::mc "New"] -menu $m.new -font $fontNormal + set mn [menu $m.new -bg $editor(bg) -fg $editor(fg)] + $mn add command -label [::msgcat::mc "New file"] -command {AddToProjDialog file [$noteBookFiles raise]}\ + -font $fontNormal -accelerator "Ctrl+N" + $mn add command -label [::msgcat::mc "New directory"] -command {AddToProjDialog directory [$noteBookFiles raise]}\ + -font $fontNormal -accelerator "Ctrl+N" + $mn add command -label [::msgcat::mc "New project"] -command {NewProjDialog "new"}\ + -font $fontNormal + #$m add command -label [::msgcat::mc "Open"] -command {FileDialog $tree open}\ + #-font $fontNormal -accelerator "Ctrl+O" -state disable + $m add command -label [::msgcat::mc "Save"] -command {FileDialog [$noteBookFiles raise] save}\ + -font $fontNormal -accelerator "Ctrl+S" + $m add command -label [::msgcat::mc "Save as"] -command {FileDialog [$noteBookFiles raise] save_as}\ + -font $fontNormal + $m add command -label [::msgcat::mc "Save all"] -command {FileDialog [$noteBookFiles raise] save_all}\ + -font $fontNormal + $m add command -label [::msgcat::mc "Close"] -command {FileDialog [$noteBookFiles raise] close}\ + -font $fontNormal -accelerator "Ctrl+W" + $m add command -label [::msgcat::mc "Close all"] -command {FileDialog [$noteBookFiles raise] close_all}\ + -font $fontNormal + $m add command -label [::msgcat::mc "Delete"] -command {FileDialog [$noteBookFiles raise] delete}\ + -font $fontNormal -accelerator "Ctrl+D" + $m add separator + $m add command -label [::msgcat::mc "Compile file"] -command {MakeProj compile file} -font $fontNormal -accelerator "Ctrl+F8" + $m add command -label [::msgcat::mc "Run file"] -command {MakeProj run file} -font $fontNormal -accelerator "Ctrl+F9" + $m add separator + $m add command -label [::msgcat::mc "Print"] -command PrintDialog\ + -font $fontNormal -accelerator "Ctrl+P" + $m add separator + $m add command -label [::msgcat::mc "Settings"] -command {Settings $noteBook} -font $fontNormal + $m add separator + $m add command -label [::msgcat::mc "Exit"] -command Quit -font $fontNormal -accelerator "Ctrl+Q" +} + + diff --git a/lib/settings.tcl b/lib/settings.tcl index c79a3a2..b5116b7 100644 --- a/lib/settings.tcl +++ b/lib/settings.tcl @@ -42,7 +42,7 @@ proc ConfigureEnt {col} { proc LoadSettings {} { global fontNormal imgDir workDir msgDir global editor color nb - global main editFrm network + global main editFrm network menuShow global toolBar autoFormat backUpDel backUpCreate backUpShow showDotFiles localeSet localeList wrapSet wrapList ## load .conf file ## @@ -68,7 +68,20 @@ proc LoadSettings {} { puts "$var.msg file not found into $msgDir" } } - toolBar {if {$var == "Yes"} {set toolBar "true" } else {set toolBar "false"} } + menuShow { + if {$var == "Yes"} { + set menuShow "true" + } else { + set menuShow "false" + } + } + toolBar { + if {$var == "Yes"} { + set toolBar "true" + } else { + set toolBar "false" + } + } backUpFileShow { if {$var == "Yes"} { set backUpShow "true" @@ -175,6 +188,12 @@ proc SaveSettings {} { } else { puts $file "set toolBar \"Yes\"\n" } + puts $file "# Menu on/off \(Yes/No\)" + if {$menuShow == "false"} { + puts $file "set menuShow \"No\"\n" + } else { + puts $file "set menuShow \"Yes\"\n" + } if {$backUpShow == "false"} { puts $file "set backUpFileShow \"No\"" } else { @@ -258,7 +277,7 @@ proc SaveSettings {} { proc Settings {nBook} { global fontNormal fontBold imgDir workDir global editor color nb topLevelGeometry - global main editFrm network + global main editFrm network menuShow global toolBar autoFormat backUpDel backUpCreate backUpShow showDotFiles localeSet localeList wrapSet wrapList set topLevelGeometry [winfo geometry .] if {[$nBook index settings] != -1} { @@ -302,6 +321,12 @@ proc Settings {nBook} { } else { puts $file "set toolBar \"Yes\"\n" } + puts $file "# Menu on/off \(Yes/No\)" + if {$menuShow == "false"} { + puts $file "set menuShow \"No\"\n" + } else { + puts $file "set menuShow \"Yes\"\n" + } if {$backUpShow == "false"} { puts $file "set backUpFileShow \"No\"" } else { @@ -477,6 +502,7 @@ proc Settings {nBook} { ### BEGIN CheckBox widgets build #### set cbWidgets { + MenuShow menuShow {Show the Menu} ToolBar toolBar {Toolbar} BackUpShow backUpShow {Show backup files} BackUpCreate backUpCreate {Create backup files} @@ -643,6 +669,3 @@ proc Settings {nBook} { # Read a config file # LoadSettings } - - - diff --git a/lib/toolbar.tcl b/lib/toolbar.tcl index d7765dc..6bc38d1 100644 --- a/lib/toolbar.tcl +++ b/lib/toolbar.tcl @@ -20,7 +20,7 @@ proc Separator {} { } proc CreateToolBar {} { - global toolBar fontBold noteBook tree imgDir editor + global toolBar fontNormal fontBold noteBook tree imgDir editor if {$toolBar == "Yes"} { set bboxFile [ButtonBox .frmTool.bboxFile -spacing 0 -padx 1 -pady 1 -bg $editor(bg)] add_toolbar_button $bboxFile new.png {AddToProjDialog file [$noteBookFiles raise]} [::msgcat::mc "Create new file"] @@ -51,6 +51,30 @@ proc CreateToolBar {} { GoToLineButton $frm pack $bboxFile [Separator] $bboxEdit [Separator] $bboxProj [Separator] $bboxHelp [Separator] $frm -side left -anchor w + # Create menubutton and menu + image create photo menu.png -format png -file [file join $imgDir menu.png] + menubutton .frmTool.menu -menu .frmTool.menu.m -font $fontNormal -bg $editor(bg) -fg $editor(fg) \ + -image menu.png + set m [menu .frmTool.menu.m -bg $editor(bg) -fg $editor(fg)] + GetFileMenu $m + $m add separator + $m add cascade -label [::msgcat::mc "Project"] -menu $m.project -font $fontNormal + GetProjMenu [menu $m.project -bg $editor(bg) -fg $editor(fg)] + + $m add cascade -label [::msgcat::mc "Edit"] -menu $m.edit -font $fontNormal + GetMenu [menu $m.edit -bg $editor(bg) -fg $editor(fg)] + + #$m add cascade -label [::msgcat::mc "View"] -menu $m.view -font $fontNormal + #GetViewMenu [menu $m.view -bg $editor(bg) -fg $editor(fg)] + + $m add cascade -label [::msgcat::mc "Modules"] -menu $m.modules -font $fontNormal + GetModulesMenu [menu $m.modules -bg $editor(bg) -fg $editor(fg)] + + $m add cascade -label [::msgcat::mc "Help"] -menu $m.help -font $fontNormal + GetHelpMenu [menu $m.help -bg $editor(bg) -fg $editor(fg)] + + pack .frmTool.menu -side right + } } ## TOOLBAR ## @@ -73,3 +97,5 @@ proc GoToLineButton {w} { balloon $w.entGoTo set [::msgcat::mc "Goto line"] } + + diff --git a/lib/translit.tcl b/lib/translit.tcl index 7ac55e1..3b06c65 100644 --- a/lib/translit.tcl +++ b/lib/translit.tcl @@ -83,3 +83,4 @@ proc Translit {line} { } + diff --git a/projman.conf b/projman.conf index 2babdaa..a4cb82c 100644 --- a/projman.conf +++ b/projman.conf @@ -16,6 +16,8 @@ set fontNormal "helvetica 10 normal roman" set fontBold "helvetica 10 bold roman" # ToolBar on/off (Yes/No) set toolBar "Yes" +# Menu on/off (Yes/No) +set menuShow "Yes" set backUpFileShow "No" set backUpFileCreate "No" @@ -76,3 +78,4 @@ set color(sql) "#ffff828f0000" set workingProject "" +