Added Menu button into tollbar and Hide/Show options into config
This commit is contained in:
parent
0c58139974
commit
0770fa5eec
|
@ -10,6 +10,7 @@
|
||||||
- Added procedure arguments into tree
|
- Added procedure arguments into tree
|
||||||
- Change read config procedure (error fixed)
|
- Change read config procedure (error fixed)
|
||||||
- Fixed error when project running
|
- Fixed error when project running
|
||||||
|
- Added new Menu button into tollbar and Hide/Show options into config
|
||||||
|
|
||||||
05.03.2018
|
05.03.2018
|
||||||
- Fixed "Add new file" toolbar button press
|
- Fixed "Add new file" toolbar button press
|
||||||
|
@ -418,3 +419,11 @@ characters to the right of the insertion cursor.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
1
COPYING
1
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
|
library. If this is what you want to do, use the GNU Library General
|
||||||
Public License instead of this License.
|
Public License instead of this License.
|
||||||
|
|
||||||
|
|
||||||
|
|
1
INSTALL
1
INSTALL
|
@ -9,3 +9,4 @@
|
||||||
3. Type from the command line 'projman' and enjoy
|
3. Type from the command line 'projman' and enjoy
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
1
KNOWBUG
1
KNOWBUG
|
@ -9,3 +9,4 @@
|
||||||
-background
|
-background
|
||||||
In Debian - it's all right
|
In Debian - it's all right
|
||||||
|
|
||||||
|
|
||||||
|
|
1
THANKS
1
THANKS
|
@ -8,3 +8,4 @@ Serg Oskin, http://oskin.msk.ru/
|
||||||
DataX/FLORIN Inc. http://www.florin.ru (documentation)
|
DataX/FLORIN Inc. http://www.florin.ru (documentation)
|
||||||
Peter Campbell, http://fastbase.co.nz/edit (ML-editor)
|
Peter Campbell, http://fastbase.co.nz/edit (ML-editor)
|
||||||
Alexey Kakunin, http://kakunin.chat.ru/ (TCL Developer Studio)
|
Alexey Kakunin, http://kakunin.chat.ru/ (TCL Developer Studio)
|
||||||
|
|
||||||
|
|
64
TODO
64
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 (автоформаттер)
|
|
||||||
нумерация строк
|
|
||||||
|
|
||||||
|
|
||||||
|
|
BIN
img/menu.png
Normal file
BIN
img/menu.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 245 B |
|
@ -144,7 +144,7 @@ proc FileDialog {nbNode operation} {
|
||||||
} elseif {[$tree exists $node] == 0 && $tree eq ".frmBody.frmCat.noteBook.ffiles.frmTreeFiles.treeFiles" } {
|
} elseif {[$tree exists $node] == 0 && $tree eq ".frmBody.frmCat.noteBook.ffiles.frmTreeFiles.treeFiles" } {
|
||||||
set tree .frmBody.frmCat.noteBook.fprojects.frmTree.tree
|
set tree .frmBody.frmCat.noteBook.fprojects.frmTree.tree
|
||||||
} else {
|
} else {
|
||||||
return
|
#return
|
||||||
}
|
}
|
||||||
########## end ########
|
########## end ########
|
||||||
|
|
||||||
|
|
71
lib/main.tcl
71
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 .frmTool -border 1 -relief raised -background $editor(bg)
|
||||||
frame .frmBody -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)
|
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 .frmTool -side top -padx 1 -fill x
|
||||||
pack .frmBody -side top -padx 1 -fill both -expand true
|
pack .frmBody -side top -padx 1 -fill both -expand true
|
||||||
pack .frmStatus -side top -padx 1 -fill x
|
pack .frmStatus -side top -padx 1 -fill x
|
||||||
|
@ -127,39 +129,7 @@ pack .frmStatus -side top -padx 1 -fill x
|
||||||
########## CREATE MENU LINE ##########
|
########## CREATE MENU LINE ##########
|
||||||
menubutton .frmMenu.mnuFile -text [::msgcat::mc "File"] -menu .frmMenu.mnuFile.m -font $fontNormal -bg $editor(bg) -fg $editor(fg)
|
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)]
|
set m [menu .frmMenu.mnuFile.m -bg $editor(bg) -fg $editor(fg)]
|
||||||
$m add cascade -label [::msgcat::mc "New"] -menu $m.new -font $fontNormal
|
GetFileMenu $m
|
||||||
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"
|
|
||||||
|
|
||||||
##.frmMenu 'Project' ##
|
##.frmMenu 'Project' ##
|
||||||
|
|
||||||
|
|
||||||
|
@ -176,40 +146,17 @@ GetMenu [menu .popMnuEdit -bg $editor(bg) -fg $editor(fg)] ;# pop-up edit menu
|
||||||
## VIEW MENU ##
|
## VIEW MENU ##
|
||||||
menubutton .frmMenu.mnuView -text [::msgcat::mc "View"] -menu .frmMenu.mnuView.m -font $fontNormal -bg $editor(bg) -fg $editor(fg)
|
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)]
|
set m [menu .frmMenu.mnuView.m -bg $editor(bg) -fg $editor(fg)]
|
||||||
$m add checkbutton -label [::msgcat::mc "Toolbar"] -font $fontNormal -state normal\
|
GetViewMenu $m
|
||||||
-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
|
|
||||||
|
|
||||||
##.frmMenu Settings ##
|
##.frmMenu Settings ##
|
||||||
menubutton .frmMenu.mnuCVS -text [::msgcat::mc "Modules"] -menu .frmMenu.mnuCVS.m \
|
menubutton .frmMenu.mnuCVS -text [::msgcat::mc "Modules"] -menu .frmMenu.mnuCVS.m \
|
||||||
-font $fontNormal -state normal -bg $editor(bg) -fg $editor(fg)
|
-font $fontNormal -state normal -bg $editor(bg) -fg $editor(fg)
|
||||||
set m [menu .frmMenu.mnuCVS.m -bg $editor(bg) -fg $editor(fg)]
|
set m [menu .frmMenu.mnuCVS.m -bg $editor(bg) -fg $editor(fg)]
|
||||||
if {[info exists module(tkcvs)]} {
|
GetModulesMenu $m
|
||||||
$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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
menubutton .frmMenu.mnuHelp -text [::msgcat::mc "Help"] -menu .frmMenu.mnuHelp.m \
|
menubutton .frmMenu.mnuHelp -text [::msgcat::mc "Help"] -menu .frmMenu.mnuHelp.m \
|
||||||
-underline 0 -font $fontNormal -bg $editor(bg) -fg $editor(fg)
|
-underline 0 -font $fontNormal -bg $editor(bg) -fg $editor(fg)
|
||||||
set m [menu .frmMenu.mnuHelp.m -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 \
|
GetHelpMenu $m
|
||||||
-accelerator F1 -font $fontNormal
|
|
||||||
$m add command -label [::msgcat::mc "About ..."] -command AboutDialog \
|
|
||||||
-font $fontNormal
|
|
||||||
|
|
||||||
pack .frmMenu.mnuFile .frmMenu.mnuProj .frmMenu.mnuEdit .frmMenu.mnuView .frmMenu.mnuCVS -side left
|
pack .frmMenu.mnuFile .frmMenu.mnuProj .frmMenu.mnuEdit .frmMenu.mnuView .frmMenu.mnuCVS -side left
|
||||||
pack .frmMenu.mnuHelp -side right
|
pack .frmMenu.mnuHelp -side right
|
||||||
|
@ -420,3 +367,5 @@ if {[info exists workingProject]} {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
77
lib/menu.tcl
77
lib/menu.tcl
|
@ -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 "CP1251"] -command {TextEncode cp1251} -font $fontNormal
|
||||||
$me add command -label [::msgcat::mc "CP866"] -command {TextEncode cp866} -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"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ proc ConfigureEnt {col} {
|
||||||
proc LoadSettings {} {
|
proc LoadSettings {} {
|
||||||
global fontNormal imgDir workDir msgDir
|
global fontNormal imgDir workDir msgDir
|
||||||
global editor color nb
|
global editor color nb
|
||||||
global main editFrm network
|
global main editFrm network menuShow
|
||||||
global toolBar autoFormat backUpDel backUpCreate backUpShow showDotFiles localeSet localeList wrapSet wrapList
|
global toolBar autoFormat backUpDel backUpCreate backUpShow showDotFiles localeSet localeList wrapSet wrapList
|
||||||
|
|
||||||
## load .conf file ##
|
## load .conf file ##
|
||||||
|
@ -68,7 +68,20 @@ proc LoadSettings {} {
|
||||||
puts "$var.msg file not found into $msgDir"
|
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 {
|
backUpFileShow {
|
||||||
if {$var == "Yes"} {
|
if {$var == "Yes"} {
|
||||||
set backUpShow "true"
|
set backUpShow "true"
|
||||||
|
@ -175,6 +188,12 @@ proc SaveSettings {} {
|
||||||
} else {
|
} else {
|
||||||
puts $file "set toolBar \"Yes\"\n"
|
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"} {
|
if {$backUpShow == "false"} {
|
||||||
puts $file "set backUpFileShow \"No\""
|
puts $file "set backUpFileShow \"No\""
|
||||||
} else {
|
} else {
|
||||||
|
@ -258,7 +277,7 @@ proc SaveSettings {} {
|
||||||
proc Settings {nBook} {
|
proc Settings {nBook} {
|
||||||
global fontNormal fontBold imgDir workDir
|
global fontNormal fontBold imgDir workDir
|
||||||
global editor color nb topLevelGeometry
|
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
|
global toolBar autoFormat backUpDel backUpCreate backUpShow showDotFiles localeSet localeList wrapSet wrapList
|
||||||
set topLevelGeometry [winfo geometry .]
|
set topLevelGeometry [winfo geometry .]
|
||||||
if {[$nBook index settings] != -1} {
|
if {[$nBook index settings] != -1} {
|
||||||
|
@ -302,6 +321,12 @@ proc Settings {nBook} {
|
||||||
} else {
|
} else {
|
||||||
puts $file "set toolBar \"Yes\"\n"
|
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"} {
|
if {$backUpShow == "false"} {
|
||||||
puts $file "set backUpFileShow \"No\""
|
puts $file "set backUpFileShow \"No\""
|
||||||
} else {
|
} else {
|
||||||
|
@ -477,6 +502,7 @@ proc Settings {nBook} {
|
||||||
|
|
||||||
### BEGIN CheckBox widgets build ####
|
### BEGIN CheckBox widgets build ####
|
||||||
set cbWidgets {
|
set cbWidgets {
|
||||||
|
MenuShow menuShow {Show the Menu}
|
||||||
ToolBar toolBar {Toolbar}
|
ToolBar toolBar {Toolbar}
|
||||||
BackUpShow backUpShow {Show backup files}
|
BackUpShow backUpShow {Show backup files}
|
||||||
BackUpCreate backUpCreate {Create backup files}
|
BackUpCreate backUpCreate {Create backup files}
|
||||||
|
@ -643,6 +669,3 @@ proc Settings {nBook} {
|
||||||
# Read a config file #
|
# Read a config file #
|
||||||
LoadSettings
|
LoadSettings
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ proc Separator {} {
|
||||||
}
|
}
|
||||||
|
|
||||||
proc CreateToolBar {} {
|
proc CreateToolBar {} {
|
||||||
global toolBar fontBold noteBook tree imgDir editor
|
global toolBar fontNormal fontBold noteBook tree imgDir editor
|
||||||
if {$toolBar == "Yes"} {
|
if {$toolBar == "Yes"} {
|
||||||
set bboxFile [ButtonBox .frmTool.bboxFile -spacing 0 -padx 1 -pady 1 -bg $editor(bg)]
|
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"]
|
add_toolbar_button $bboxFile new.png {AddToProjDialog file [$noteBookFiles raise]} [::msgcat::mc "Create new file"]
|
||||||
|
@ -51,6 +51,30 @@ proc CreateToolBar {} {
|
||||||
GoToLineButton $frm
|
GoToLineButton $frm
|
||||||
pack $bboxFile [Separator] $bboxEdit [Separator] $bboxProj [Separator] $bboxHelp [Separator] $frm -side left -anchor w
|
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 ##
|
## TOOLBAR ##
|
||||||
|
@ -73,3 +97,5 @@ proc GoToLineButton {w} {
|
||||||
balloon $w.entGoTo set [::msgcat::mc "Goto line"]
|
balloon $w.entGoTo set [::msgcat::mc "Goto line"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -83,3 +83,4 @@ proc Translit {line} {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,8 @@ set fontNormal "helvetica 10 normal roman"
|
||||||
set fontBold "helvetica 10 bold roman"
|
set fontBold "helvetica 10 bold roman"
|
||||||
# ToolBar on/off (Yes/No)
|
# ToolBar on/off (Yes/No)
|
||||||
set toolBar "Yes"
|
set toolBar "Yes"
|
||||||
|
# Menu on/off (Yes/No)
|
||||||
|
set menuShow "Yes"
|
||||||
|
|
||||||
set backUpFileShow "No"
|
set backUpFileShow "No"
|
||||||
set backUpFileCreate "No"
|
set backUpFileCreate "No"
|
||||||
|
@ -76,3 +78,4 @@ set color(sql) "#ffff828f0000"
|
||||||
set workingProject ""
|
set workingProject ""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user