|
From: <bu...@us...> - 2006-03-24 16:08:45
|
Revision: 580 Author: bugant Date: 2006-03-24 08:08:26 -0800 (Fri, 24 Mar 2006) ViewCVS: http://svn.sourceforge.net/yaacs/?rev=580&view=rev Log Message: ----------- move operators' type managment from preference dialog to yacco main window... hey it's an application issue not a preference, isn't it? :) ; added a new smaller icon for the new button; Modified Paths: -------------- trunk/tkyaacs/themes/yaacs/theme.xml trunk/tkyaacs/yatk_icons.tcl trunk/yacco.tcl Added Paths: ----------- trunk/tkyaacs/themes/yaacs/icons/22x22/edu_languages.png Added: trunk/tkyaacs/themes/yaacs/icons/22x22/edu_languages.png =================================================================== (Binary files differ) Property changes on: trunk/tkyaacs/themes/yaacs/icons/22x22/edu_languages.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/tkyaacs/themes/yaacs/theme.xml =================================================================== --- trunk/tkyaacs/themes/yaacs/theme.xml 2006-03-24 16:04:39 UTC (rev 579) +++ trunk/tkyaacs/themes/yaacs/theme.xml 2006-03-24 16:08:26 UTC (rev 580) @@ -49,7 +49,7 @@ <icon name="big_db" img="64x64/server.png"/> <icon name="big_template" img="64x64/kontact.png"/> <icon name="big_themes" img="64x64/khangman.png"/> - <icon name="big_optypes" img="64x64/edu_languages.png"/> + <icon name="optypes" img="22x22/edu_languages.png"/> <icon name="big_remote" img="64x64/kgpg.png"/> <icon name="big_fax" img="64x64/printmgr.png"/> <icon name="big_email" img="64x64/email.png"/> Modified: trunk/tkyaacs/yatk_icons.tcl =================================================================== --- trunk/tkyaacs/yatk_icons.tcl 2006-03-24 16:04:39 UTC (rev 579) +++ trunk/tkyaacs/yatk_icons.tcl 2006-03-24 16:08:26 UTC (rev 580) @@ -73,6 +73,7 @@ variable ::yatk_icons::enable "i_enable" variable ::yatk_icons::rpwd "i_rpwd" variable ::yatk_icons::control "i_control" + variable ::yatk_icons::optypes "i_optypes" # dialog icons Modified: trunk/yacco.tcl =================================================================== --- trunk/yacco.tcl 2006-03-24 16:04:39 UTC (rev 579) +++ trunk/yacco.tcl 2006-03-24 16:08:26 UTC (rev 580) @@ -349,6 +349,10 @@ set bts [frame .bts] button $bts.find -text [mc "Find"] -image $::yatk_icons::find -compound left \ -command {::yacco::onPressFind $db_int} +button $bts.new -text [mc "New"] -image $::yatk_icons::new22 -compound left \ + -command yacco::onPressNew +button $bts.opst -image $::yatk_icons::optypes -text [mc "Operator Types"] \ + -compound left -command {::yacco::configOpst} button $bts.usync -text [mc "Sync user"] -image $::yatk_icons::usync -compound left\ -command {if {[info exists ::yacco::config(REMOTE_USER)]} { ::yacco::onPressUsync $db_int $::yacco::config(REMOTE_HOST) $::yacco::config(REMOTE_USER) @@ -356,8 +360,6 @@ ::yacco::onPressUsync $db_int $::yacco::config(REMOTE_HOST) } } -button $bts.new -text [mc "New"] -image $::yatk_icons::new22 -compound left \ - -command yacco::onPressNew button $bts.settings -text [mc "Settings"] -image $::yatk_icons::control -compound left \ -command {::yacco::onPressSettings} @@ -365,8 +367,9 @@ -command yacco::onPressQuit grid $bts.find -pady [list 12 3] -sticky news -grid $bts.usync -pady 3 -sticky news grid $bts.new -pady 3 -sticky news +grid $bts.opst -pady 3 -sticky news +grid $bts.usync -pady 3 -sticky news grid $bts.settings -pady 3 -sticky news #$bts.quit -padx [list 6 0] @@ -1204,55 +1207,8 @@ set ::yacco::db_int $dbi } -proc ::yacco::configRemote {} { - set w .preferences.confRemote - set title [mc "Remote Secure Shell configuration"] - toplevel $w -bd 1 -relief raised -class TkSDialog - wm title $w $title - wm iconname $w $title - wm transient $w [winfo toplevel [winfo parent $w]] - - labelframe $w.fr - message $w.fr.txt -text [mc "Configure parameters to be able to remotely connect \ - to a machine and execute command via shell"] -width 300 - label $w.fr.lblHost -text [mc "Remote host"] - entry $w.fr.host -bg white - label $w.fr.lblUser -text [mc "Remote user name"] - entry $w.fr.user -bg white - - grid $w.fr.txt - -sticky we -padx 5 -pady 5 - grid $w.fr.lblHost $w.fr.host -sticky w -padx 5 -pady 5 - grid $w.fr.lblUser $w.fr.user -sticky w -padx 5 -pady 5 - - frame $w.bts - button $w.bts.ok -image $::yatk_icons::ok -text [mc "Ok"] -compound left \ - -command { - set ::yacco::config(REMOTE_HOST) [.preferences.confRemote.fr.host get] - set ::yacco::config(REMOTE_USER) [.preferences.confRemote.fr.user get] - - set pathConf [::yaconf::checkLocalConf] - set pathConf "$pathConf/yacco" - - set myconfig(REMOTE_HOST) $::yacco::config(REMOTE_HOST) - set myconfig(REMOTE_USER) $::yacco::config(REMOTE_USER) - ::yaconf::writeConfig $pathConf [array get myconfig] - - destroy .preferences.confRemote - } - button $w.bts.cancel -image $::yatk_icons::cancel -text [mc "Close"] -compound left \ - -command {destroy .preferences.confRemote} - - grid $w.bts.cancel $w.bts.ok -padx [list 6 0] -sticky se - - grid $w.fr -padx 12 -pady [list 12 24] -sticky news - grid $w.bts -padx 12 -pady 12 -sticky se - - $w.fr.host insert 0 $::yacco::config(REMOTE_HOST) - $w.fr.user insert 0 $::yacco::config(REMOTE_USER) -} - proc ::yacco::configOpst {} { - set w .preferences.confOpT + set w .confOpT set title [mc "Manage operator types"] toplevel $w -bd 1 -relief raised -class TkSDialog wm title $w $title @@ -1265,9 +1221,9 @@ } labelframe $w.op -text [mc "Operator types"] - scrollbar $w.op.sbOp -orient vertical -command {.preferences.confOpT.op.lstOp yview} -borderwidth 0 + scrollbar $w.op.sbOp -orient vertical -command {.confOpT.op.lstOp yview} -borderwidth 0 listbox $w.op.lstOp -bg white -listvariable ::yacco::availableOpTypes \ - -yscrollcommand {.preferences.confOpT.op.sbOp set} + -yscrollcommand {.confOpT.op.sbOp set} grid $w.op.lstOp $w.op.sbOp -sticky ns -pady 5 frame $w.cmd @@ -1275,7 +1231,7 @@ -command {::yacco::addOpTy} button $w.cmd.edi -image $::yatk_icons::edit -text [mc "Edit"] -compound left \ -command { - set pos [.preferences.confOpT.op.lstOp curselection] + set pos [.confOpT.op.lstOp curselection] if {[llength $pos] == 0} { ::yatk_dlg::error [mc "Choose a type first"] return @@ -1285,7 +1241,7 @@ } button $w.cmd.del -image $::yatk_icons::trash -text [mc "Delete"] -compound left \ -command { - set pos [.preferences.confOpT.op.lstOp curselection] + set pos [.confOpT.op.lstOp curselection] if {[llength $pos] == 0} { ::yatk_dlg::error [mc "Choose a type first"] return @@ -1312,14 +1268,14 @@ grid $w.cmd.del -pady 5 -sticky news button $w.cancel -image $::yatk_icons::cancel -text [mc "Close"] -compound left \ - -command {destroy .preferences.confOpT} + -command {destroy .confOpT} grid $w.op $w.cmd -padx 12 -pady 12 -sticky n grid x $w.cancel -sticky se -padx 12 -pady 12 } proc ::yacco::addOpTy {{mode "add"}} { - set w .preferences.confOpT.add + set w .confOpT.add if {$mode == "add"} { set title [mc "Add a new operator type"] } else { @@ -1340,12 +1296,12 @@ frame $w.bts button $w.bts.add -image $::yatk_icons::ok -compound left button $w.bts.cancel -image $::yatk_icons::cancel -text [mc "Close"] -compound left \ - -command {destroy .preferences.confOpT.add} + -command {destroy .confOpT.add} if {$mode == "add"} { $w.bts.add configure -text [mc "Add"] $w.bts.add configure -command { - if {[::op::addIntType $::yacco::db_int [.preferences.confOpT.add.fr.type get]] == -1} { + if {[::op::addIntType $::yacco::db_int [.confOpT.add.fr.type get]] == -1} { ::yacco::dbError return } @@ -1355,12 +1311,12 @@ lappend ::yacco::availableOpTypes $::yacco::intTypes($id) } ::yatk_dlg::info [mc "Operator type added."] - .preferences.confOpT.add.fr.type delete 0 end + .confOpT.add.fr.type delete 0 end } } else { $w.bts.add configure -text [mc "Update"] $w.bts.add configure -command { - set pos [.preferences.confOpT.op.lstOp curselection] + set pos [.confOpT.op.lstOp curselection] set type [lindex $::yacco::availableOpTypes $pos] foreach id [array names ::yacco::intTypes] { if {$::yacco::intTypes($id) == $type} { @@ -1369,7 +1325,7 @@ } } - set type [.preferences.confOpT.add.fr.type get] + set type [.confOpT.add.fr.type get] if {[::op::updateIntType $::yacco::db_int $idPos $type] == -1} { ::yacco::dbError @@ -1386,17 +1342,12 @@ grid $w.bts -sticky se -padx 12 -pady 12 if {$mode != "add"} { - set pos [.preferences.confOpT.op.lstOp curselection] + set pos [.confOpT.op.lstOp curselection] set type [lindex $::yacco::availableOpTypes $pos] $w.fr.type insert 0 $type } } -proc ::yacco::configTemp {} { - ::yatk_dlg::info [mc "Coming soon..."] - return -} - # trigged when the user press button Quit proc ::yacco::onPressQuit {} { exit This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |