initialization stuf moved from pwscf.tcl to init.tcl

git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2234 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
kokalj 2005-09-26 11:58:36 +00:00
parent c7343f7ad8
commit dd79cc4bc8
2 changed files with 40 additions and 28 deletions

32
GUI/PWgui/init.tcl Normal file
View File

@ -0,0 +1,32 @@
#
# Initialization stuff for PWgui
#
package require Guib 0.3.0
namespace eval ::pwscf {
variable pwscf
variable settings
set pwscf(PWD) [pwd]
}
# define here all pwscf's namespaces ...
namespace eval ::pwscf::edit {
variable edit
}
namespace eval ::pwscf::menustate {}
namespace eval ::pwscf::view {}
namespace eval ::pwscf::run {
variable run
set run(mode) nonblocking ; # possibilities: nonblocking || background
}
# load settings file ...
source $env(PWGUI)/pwgui.settings
if { [file exists $env(HOME)/.pwgui/pwgui.settings] } {
# overwritte default settings by user-settings
source $env(HOME)/.pwgui/pwgui.settings
}
lappend auto_path [file join $env(PWGUI) src]

View File

@ -43,34 +43,14 @@ if { [info exists env(PWGUI)] } {
exit
}
package require Guib 0.3.0
#
# all initialization stuff should go into init.tcl
#
source [file join $env(PWGUI) init.tcl]
#
# now go-ahead: launch the application
#
wm withdraw .
bind . <Destroy> ::guib::exitApp
namespace eval ::pwscf {
variable pwscf
variable settings
set pwscf(PWD) [pwd]
}
# define here all pwscf's namespaces ...
namespace eval ::pwscf::edit {
variable edit
}
namespace eval ::pwscf::menustate {}
namespace eval ::pwscf::view {}
namespace eval ::pwscf::run {
variable run
set run(mode) nonblocking ; # possibilities: nonblocking || background
}
# load settings file ...
source $env(PWGUI)/pwgui.settings
if { [file exists $env(HOME)/.pwgui/pwgui.settings] } {
# overwritte default settings by user-settings
source $env(HOME)/.pwgui/pwgui.settings
}
lappend auto_path [file join $env(PWGUI) src]
source [file join $env(PWGUI) src pwscf.itcl]