|
From: <bu...@us...> - 2006-03-06 17:47:13
|
Revision: 556 Author: bugant Date: 2006-03-06 09:46:52 -0800 (Mon, 06 Mar 2006) ViewCVS: http://svn.sourceforge.net/yaacs/?rev=556&view=rev Log Message: ----------- new yacco layout (added 2 new icons); some ui fix on various windows; Modified Paths: -------------- trunk/tkyaacs/themes/yaacs/theme.xml trunk/tkyaacs/yatk_icons.tcl trunk/yacco.tcl Added Paths: ----------- trunk/tkyaacs/themes/yaacs/icons/22x22/apply.png trunk/tkyaacs/themes/yaacs/icons/22x22/edit-delete.png Added: trunk/tkyaacs/themes/yaacs/icons/22x22/apply.png =================================================================== (Binary files differ) Property changes on: trunk/tkyaacs/themes/yaacs/icons/22x22/apply.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/tkyaacs/themes/yaacs/icons/22x22/edit-delete.png =================================================================== (Binary files differ) Property changes on: trunk/tkyaacs/themes/yaacs/icons/22x22/edit-delete.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/tkyaacs/themes/yaacs/theme.xml =================================================================== --- trunk/tkyaacs/themes/yaacs/theme.xml 2006-03-01 11:44:43 UTC (rev 555) +++ trunk/tkyaacs/themes/yaacs/theme.xml 2006-03-06 17:46:52 UTC (rev 556) @@ -54,6 +54,8 @@ <icon name="big_fax" img="64x64/printmgr.png"/> <icon name="big_email" img="64x64/email.png"/> <icon name="usync" img="22x22/system-users.png"/> + <icon name="disable" img="22x22/edit-delete.png"/> + <icon name="enable" img="22x22/apply.png"/> <icon name="rpwd" img="22x22/network-workgroup.png"/> <icon name="details" img="16x16/details.png"/> </icons> Modified: trunk/tkyaacs/yatk_icons.tcl =================================================================== --- trunk/tkyaacs/yatk_icons.tcl 2006-03-01 11:44:43 UTC (rev 555) +++ trunk/tkyaacs/yatk_icons.tcl 2006-03-06 17:46:52 UTC (rev 556) @@ -69,6 +69,8 @@ variable ::yatk_icons::invoice "i_invoice" variable ::yatk_icons::clear "i_clear" variable ::yatk_icons::usync "i_usync" + variable ::yatk_icons::disable "i_disable" + variable ::yatk_icons::enable "i_enable" variable ::yatk_icons::rpwd "i_rpwd" variable ::yatk_icons::control "i_control" Modified: trunk/yacco.tcl =================================================================== --- trunk/yacco.tcl 2006-03-01 11:44:43 UTC (rev 555) +++ trunk/yacco.tcl 2006-03-06 17:46:52 UTC (rev 556) @@ -60,86 +60,224 @@ } +set info [labelframe .info -text [mc "Operator information"]] + # Initialize notebook -tixNoteBook .notebook -.notebook subwidget nbframe config -font fixed +set notes [tixNoteBook $info.notebook] +$notes subwidget nbframe config -font fixed +$notes configure -ipadx 12 +$notes configure -ipady 12 + #Create tab1 "DATE" -set pg_date [.notebook add pg_date -label [mc "Date"]] +set pg_date [$notes add pg_date -label [mc "Date"]] -label $pg_date.lbsurname -text [mc "Surname"] -entry $pg_date.surname -validate key -validatecommand {::yacco::onValidateString %P %W } -label $pg_date.lbname -text [mc "Name"] -entry $pg_date.name -validate key -validatecommand {::yacco::onValidateString %P %W } -label $pg_date.lbsex -text [mc "Sex"] -iwidgets::combobox $pg_date.sex -label $pg_date.lbaddr -text [mc "Address"] -entry $pg_date.addr -validate key -validatecommand {::yacco::onValidateString %P %W } -label $pg_date.lbcity -text [mc "City"] -entry $pg_date.city -validate key -validatecommand {::yacco::onValidateString %P %W} -label $pg_date.lbcap -text [mc "c.a.p."] -entry $pg_date.cap -validate key -validatecommand {::yacco::onValidateInt %P} -label $pg_date.lbtel1 -text [mc "Phone 1"] -entry $pg_date.tel1 -validate focusout -validatecommand {::yacco::onValidatePhone %P} -invcmd { +set ifr [frame $pg_date.if] +label $ifr.lbsurname -text [mc "Surname"] +entry $ifr.surname -validate key -validatecommand {::yacco::onValidateString %P %W } +label $ifr.lbname -text [mc "Name"] +entry $ifr.name -validate key -validatecommand {::yacco::onValidateString %P %W } +label $ifr.lbsex -text [mc "Sex"] +iwidgets::combobox $ifr.sex + +label $ifr.lbbdate -text [mc "Birthday"] +entry $ifr.bdate -validate focusout -validatecommand {::yacco::onValidateDate %P} -invcmd { + ::yatk_dlg::error [mc "Bad birthday date!"] + focus -force %W + after idle {%W config -validate focusout} +} +bind $ifr.bdate <Leave> {$ifr.bdate validate} +label $ifr.lbbplace -text [mc "Bitrh place"] +entry $ifr.bplace -validate key -validatecommand {::yacco::onValidateString %P %W} +label $ifr.lbcf -text [mc "Cod. Fisc."] +button $ifr.btcf -text [mc "Cod. Fisc."] -command {::yacco::onPressCodFis $db_int} -takefocus 0 \ + -image $::yatk_icons::hours -compound left +entry $ifr.cf -takefocus {::yacco::onPressCodFis $db_int} + +label $ifr.lblogin -text [mc "Login"] +entry $ifr.login -validate key -validatecommand {::yacco::onValidateString %P %W} +label $ifr.lbemail -text [mc "Email"] +entry $ifr.email + +label $ifr.lblPhones -text [mc "Phones numbers"] +label $ifr.lbtel1 -text [mc "Phone 1"] +entry $ifr.tel1 -validate focusout -validatecommand {::yacco::onValidatePhone %P} -invcmd { ::yatk_dlg::error [mc "Bad phone number on Phone 1!"] focus -force %W after idle {%W config -validate focusout} } -bind $pg_date.tel1 <Leave> {$pg_date.tel1 validate} -label $pg_date.lbtel2 -text [mc "Phone 2"] -entry $pg_date.tel2 -validate focusout -validatecommand {::yacco::onValidatePhone %P} -invcmd { +bind $ifr.tel1 <Leave> {$ifr.tel1 validate} +label $ifr.lbtel2 -text [mc "Phone 2"] +entry $ifr.tel2 -validate focusout -validatecommand {::yacco::onValidatePhone %P} -invcmd { ::yatk_dlg::error [mc "Bad phone number on Phone 2!"] focus -force %W after idle {%W config -validate focusout} } -bind $pg_date.tel2 <Leave> {$pg_date.tel2 validate} -label $pg_date.lbcell -text [mc "Mobile"] -entry $pg_date.cell -validate focusout -validatecommand {::yacco::onValidatePhone %P} -invcmd { +bind $ifr.tel2 <Leave> {$ifr.tel2 validate} +label $ifr.lbcell -text [mc "Mobile"] +entry $ifr.cell -validate focusout -validatecommand {::yacco::onValidatePhone %P} -invcmd { ::yatk_dlg::error [mc "Bad phone number on Mobile!"] focus -force %W after idle {%W config -validate focusout} } -bind $pg_date.cell <Leave> {$pg_date.cell validate} -label $pg_date.lbbplace -text [mc "Bitrh place"] -entry $pg_date.bplace -validate key -validatecommand {::yacco::onValidateString %P %W} -label $pg_date.lbbdate -text [mc "Birthday"] -entry $pg_date.bdate -validate focusout -validatecommand {::yacco::onValidateDate %P} -invcmd { - ::yatk_dlg::error [mc "Bad birthday date!"] - focus -force %W - after idle {%W config -validate focusout} -} -bind $pg_date.bdate <Leave> {$pg_date.bdate validate} -button $pg_date.btcf -text [mc "Cod.Fisc."] -relief flat -command {::yacco::onPressCodFis $db_int} -takefocus 0 -entry $pg_date.cf -takefocus {::yacco::onPressCodFis $db_int} -label $pg_date.lblogin -text [mc "Login"] -entry $pg_date.login -validate key -validatecommand {::yacco::onValidateString %P %W} -label $pg_date.lbemail -text [mc "Email"] -entry $pg_date.email -label $pg_date.lbactive -text [mc "Disable interv."] -checkbutton $pg_date.active -variable yacco::CkActive -labelframe $pg_date.u -text [mc "Different address"] -label $pg_date.u.lbaddr -text [mc "Address"] -entry $pg_date.u.addr -validate key -validatecommand {::yacco::onValidateString %P %W} -label $pg_date.u.lbcity -text [mc "City"] -entry $pg_date.u.city -validate key -validatecommand {::yacco::onValidateString %P %W} -label $pg_date.u.lbcap -text [mc "c.a.p."] -entry $pg_date.u.cap -validate key -validatecommand {::yacco::onValidateInt %P} -labelframe $pg_date.l -text [mc "Action"] -button $pg_date.l.sms -text [mc "Sms"] -image $::yatk_icons::sms -compound left \ +bind $ifr.cell <Leave> {$ifr.cell validate} + + +grid $ifr.lbsurname $ifr.surname -sticky nsw -padx 3 -pady 3 +grid $ifr.lbname $ifr.name -sticky nsw -padx 3 -pady 3 +grid $ifr.lbsex $ifr.sex -sticky nsw -padx 3 -pady 3 +grid $ifr.lbbdate $ifr.bdate -sticky nsw -padx 3 -pady 3 +grid $ifr.lbbplace $ifr.bplace -sticky nsw -padx 3 -pady 3 +grid $ifr.lbcf $ifr.cf $ifr.btcf -sticky nsw -padx 3 -pady 3 +grid $ifr.lblogin $ifr.login -sticky nsw -padx 3 -pady 3 +grid $ifr.lbemail $ifr.email -sticky nsw -padx 3 -pady 3 +grid $ifr.lblPhones x -sticky nsw -padx 3 -pady 6 +grid $ifr.lbtel1 $ifr.tel1 -sticky nsw -padx 3 -pady 3 +grid $ifr.lbtel2 $ifr.tel2 -sticky nsw -padx 3 -pady 3 +grid $ifr.lbcell $ifr.cell -sticky nsw -padx 3 -pady 3 + +grid columnconfigure $pg_date 1 -weight 1 +grid $ifr - -sticky nw -padx 3 -pady 6 + +#Create tab2 "ADDRESSES" +set pg_addr [$notes add pg_addr -label [mc "Addresses"]] +set adf [frame $pg_addr.adf] +label $adf.lblMainAddr -text [mc "Main address"] +label $adf.lbaddr -text [mc "Address"] +entry $adf.addr -validate key -validatecommand {::yacco::onValidateString %P %W } -width 48 +label $adf.lbcap -text [mc "c.a.p."] +entry $adf.cap -validate key -validatecommand {::yacco::onValidateInt %P} +label $adf.lbcity -text [mc "City"] +entry $adf.city -validate key -validatecommand {::yacco::onValidateString %P %W} + +label $adf.lblAltAddr -text [mc "Alternative address"] +label $adf.lbalt_addr -text [mc "Address"] +entry $adf.alt_addr -validate key -validatecommand {::yacco::onValidateString %P %W} -width 48 +label $adf.lbalt_cap -text [mc "c.a.p."] +entry $adf.alt_cap -validate key -validatecommand {::yacco::onValidateInt %P} +label $adf.lbalt_city -text [mc "City"] +entry $adf.alt_city -validate key -validatecommand {::yacco::onValidateString %P %W} + +grid $adf.lblMainAddr x -sticky nsw -padx 3 -pady 6 +grid $adf.lbaddr $adf.addr -sticky nsw -padx 3 -pady 3 +grid $adf.lbcap $adf.cap -sticky nsw -padx 3 -pady 3 +grid $adf.lbcity $adf.city -sticky nsw -padx 3 -pady 3 +grid $adf.lblAltAddr x -sticky nsw -padx 3 -pady 6 +grid $adf.lbalt_addr $adf.alt_addr -sticky nsw -padx 3 -pady 3 +grid $adf.lbalt_cap $adf.alt_cap -sticky nsw -padx 3 -pady 3 +grid $adf.lbalt_city $adf.alt_city -sticky nsw -padx 3 -pady 3 + +grid $adf -sticky nw -padx 3 -pady 6 + +#Create tab 3 "NOTES" +set pg_note [$notes add pg_note -label [mc "Details"]] + +label $pg_note.lbtype -text [mc "Type of"] +iwidgets::combobox $pg_note.type + +label $pg_note.lbavail -text [mc "Availability"] +checkbutton $pg_note.morning -text [mc "morning (09.00 - 13.00)"] -variable ::yacco::CkMorning +checkbutton $pg_note.afternoon -text [mc "afternoon (14.00 - 18.00)"] -variable ::yacco::CkAfternoon +checkbutton $pg_note.evening -text [mc "evenings (19.00 - 21.30)"] -variable ::yacco::CkEvening +label $pg_note.lbaviablefrom -text [mc "Aviable from"] +iwidgets::dateentry $pg_note.aviablefrom +$pg_note.aviablefrom configure -weekdaybackground green -weekendbackground white + +label $pg_note.lbactive -text [mc "Activity status"] +label $pg_note.status +radiobutton $pg_note.active -variable ::yacco::CkActive -value 0 -text [mc "Enable"] \ + -command {$pg_note.status configure -image $::yatk_icons::enable} +radiobutton $pg_note.disable -variable ::yacco::CkActive -value 1 -text [mc "Disable"] \ + -command {$pg_note.status configure -image $::yatk_icons::disable} + +label $pg_note.lbpoints -text [mc "Points"] +entry $pg_note.points -width 5 + +label $pg_note.lbnote -text [mc "Note"] +entry $pg_note.note -width 50 + +grid columnconfigure $pg_note 1 -weight 1 + +grid $pg_note.lbtype $pg_note.type -sticky nsw -padx 3 -pady 3 + +grid $pg_note.lbavail x -sticky nws -padx 3 -pady [list 12 3] +grid $pg_note.morning - -sticky nsw -padx 3 -pady 3 +grid $pg_note.afternoon - -sticky nsw -padx 3 -pady 3 +grid $pg_note.evening - -sticky nsw -padx 3 -pady 3 +grid $pg_note.lbaviablefrom $pg_note.aviablefrom -sticky nsw -padx 3 -pady [list 3 12] + +grid $pg_note.lbactive $pg_note.status -sticky nws -padx 3 -pady [list 12 3] +grid $pg_note.active x -sticky nws -padx 3 -pady 3 +grid $pg_note.disable x -sticky nws -padx 3 -pady [list 3 12] + +grid $pg_note.lbpoints $pg_note.points -sticky nsw -padx 3 -pady 12 + +grid $pg_note.lbnote $pg_note.note -sticky nsw -padx 3 -pady 12 + +#Create tab 4 "BANK" +set pg_bank [$notes add pg_bank -label [mc "Bank"] -anchor n] + +label $pg_bank.lbbank -text [mc "Bank"] +entry $pg_bank.bank -validate key -validatecommand { yacco::onValidateString %P %W} +label $pg_bank.lbaddr -text [mc "Addr"] +entry $pg_bank.addr -validate key -validatecommand { yacco::onValidateString %P %W} +label $pg_bank.lbcity -text [mc "City"] +entry $pg_bank.city -validate key -validatecommand { yacco::onValidateString %P %W} +label $pg_bank.lbcc -text [mc "CC"] +entry $pg_bank.cc +label $pg_bank.lbabi -text [mc "ABI"] +entry $pg_bank.abi -validate key -validatecommand { yacco::onValidateInt %P} -width 5 +label $pg_bank.lbcab -text [mc "CAB"] +entry $pg_bank.cab -validate key -validatecommand { yacco::onValidateInt %P} -width 5 +label $pg_bank.lbowner -text [mc "Owner"] +entry $pg_bank.owner -validate key -validatecommand { yacco::onValidateString %P %W} +label $pg_bank.lbsalary -text [mc "Hourly salary"] +entry $pg_bank.salary + +grid columnconfigure $pg_bank 1 -weight 1 +#grid columnconfigure $pg_bank 3 -weight 1 + +grid $pg_bank.lbbank $pg_bank.bank -sticky nsw -padx 3 -pady 3 +grid $pg_bank.lbaddr $pg_bank.addr -sticky nsw -padx 3 -pady 3 +grid $pg_bank.lbcity $pg_bank.city -sticky nsw -padx 3 -pady [list 3 24] + +grid $pg_bank.lbcc $pg_bank.cc -sticky nsw -padx 3 -pady 3 +grid $pg_bank.lbabi $pg_bank.abi -sticky nsw -padx 3 -pady 3 +grid $pg_bank.lbcab $pg_bank.cab -sticky nsw -padx 3 -pady [list 3 24] + +grid $pg_bank.lbowner $pg_bank.owner -sticky nsw -padx 3 -pady [list 3 24] +grid $pg_bank.lbsalary $pg_bank.salary -sticky nsw -padx 3 -pady [list 3 24] + + + +# ACTION buttons +set ba [frame $info.l] +button $ba.sms -text [mc "Sms"] -image $::yatk_icons::sms -compound top \ -relief flat -command {::yacco::onPressSms $db_int} -button $pg_date.l.link -text [mc "Link"] -image $::yatk_icons::link -compound left \ +button $ba.link -text [mc "Link"] -image $::yatk_icons::link -compound top \ -relief flat -command {::yacco::onPressLink $db_sample $db_int} -button $pg_date.l.resetpwd -text [mc "Reset Pwd"] -image $::yatk_icons::rpwd -compound left \ +button $ba.resetpwd -text [mc "Reset Pwd"] -image $::yatk_icons::rpwd -compound top \ -relief flat -command { set userto [string trim [[::yacco::getWdj "login"] get]] + if {![info exists config(REMOTE_HOST)]} { + ::yalog::debug "No REMOTE_HOST found on the supplied configuration file" + ::yatk_dlg::error [mc "Configuration error. You don't specify a valid REMOTE_HOST \ + on your configuration file."] + return + } if {[info exists config(REMOTE_USER)]} { ::yacco::onPressResPwd $userto $config(REMOTE_HOST) $config(REMOTE_USER) } else { ::yacco::onPressResPwd $userto $config(REMOTE_HOST) } - } -labelframe $pg_date.r -text [mc "Print"] -button $pg_date.r.conv -text [mc "Contract"] -image $::yatk_icons::contract -compound left \ + } + +grid $ba.sms $ba.link $ba.resetpwd -padx 3 -pady 3 + +# PRINT buttons + +set bp [frame $info.r] +button $bp.conv -text [mc "Contract"] -image $::yatk_icons::contract -compound top \ -relief flat -command { if {[llength [array names ::yacco::config -exact "A2PS_CMD"]] == 0 || \ [llength [array names ::yacco::config -exact "INSTALL_DIR"]] == 0} { @@ -151,7 +289,7 @@ ::yacco::onPressContract $::yacco::config(A2PS_CMD) \ $::yacco::config(INSTALL_DIR) } -button $pg_date.r.rit -text [mc "Invoice"] -image $::yatk_icons::invoice -compound left \ +button $bp.rit -text [mc "Invoice"] -image $::yatk_icons::invoice -compound top \ -relief flat -command { if {[llength [array names ::yacco::config -exact "A2PS_CMD"]] == 0 || \ [llength [array names ::yacco::config -exact "INSTALL_DIR"]] == 0} { @@ -164,162 +302,113 @@ $::yacco::config(INSTALL_DIR) } -grid columnconfigure $pg_date.u 1 -weight 1 -grid columnconfigure $pg_date.u 3 -weight 1 -grid columnconfigure $pg_date.u 5 -weight 1 -grid $pg_date.u.lbaddr $pg_date.u.addr $pg_date.u.lbcity $pg_date.u.city $pg_date.u.lbcap $pg_date.u.cap -sticky news +grid $bp.conv $bp.rit -padx 3 -pady 3 -grid columnconfigure $pg_date.l 0 -weight 1 -grid columnconfigure $pg_date.l 1 -weight 1 -grid $pg_date.l.sms $pg_date.l.link $pg_date.l.resetpwd -sticky news +set bc [frame $info.bts] +button $bc.save -text [mc "Save"] -image $::yatk_icons::save -compound left \ + -command { yacco::onPressSave $db_int } +button $bc.delete -text [mc "Delete"] -image $::yatk_icons::delete -compound left \ + -command {::yacco::onPressDelete $db_int} +grid $bc.delete $bc.save -sticky se -padx 3 -pady 3 -grid columnconfigure $pg_date.r 0 -weight 1 -grid columnconfigure $pg_date.r 1 -weight 1 -grid $pg_date.r.conv $pg_date.r.rit -sticky news +grid $ba $bp -sticky nw -padx 6 -pady 6 +grid $notes - -sticky nws -padx 6 -pady 3 +grid $bc - -sticky se -padx 6 -pady 6 -grid columnconfigure $pg_date 1 -weight 1 -grid columnconfigure $pg_date 3 -weight 1 -grid columnconfigure $pg_date 5 -weight 1 -grid rowconfigure $pg_date 1 -weight 1 -grid rowconfigure $pg_date 2 -weight 1 - -grid $pg_date.lbsurname $pg_date.surname $pg_date.lbname $pg_date.name $pg_date.lbsex $pg_date.sex -sticky news -padx 3 -grid $pg_date.lbaddr $pg_date.addr $pg_date.lbcity $pg_date.city $pg_date.lbcap $pg_date.cap -sticky news -padx 3 -grid $pg_date.lbtel1 $pg_date.tel1 $pg_date.lbtel2 $pg_date.tel2 $pg_date.lbcell $pg_date.cell -sticky news -padx 3 -grid $pg_date.lbbplace $pg_date.bplace $pg_date.lbbdate $pg_date.bdate $pg_date.btcf $pg_date.cf -sticky news -padx 3 -grid $pg_date.lblogin $pg_date.login $pg_date.lbemail $pg_date.email $pg_date.lbactive $pg_date.active -sticky news -padx 3 -grid $pg_date.u - - - - - -sticky news -grid $pg_date.l - - x $pg_date.r - -sticky news -padx 3 - -#Create tab 2 "BANK" -set pg_bank [.notebook add pg_bank -label [mc "Bank"]] -label $pg_bank.lbbank -text [mc "Bank"] -entry $pg_bank.bank -validate key -validatecommand { yacco::onValidateString %P %W} -label $pg_bank.lbaddr -text [mc "Addr"] -entry $pg_bank.addr -validate key -validatecommand { yacco::onValidateString %P %W} -label $pg_bank.lbcity -text [mc "City"] -entry $pg_bank.city -validate key -validatecommand { yacco::onValidateString %P %W} -label $pg_bank.lbsalary -text [mc "Hourly salary"] -entry $pg_bank.salary -label $pg_bank.lbabi -text [mc "ABI"] -entry $pg_bank.abi -validate key -validatecommand { yacco::onValidateInt %P} -label $pg_bank.lbcab -text [mc "CAB"] -entry $pg_bank.cab -validate key -validatecommand { yacco::onValidateInt %P} -label $pg_bank.lbcc -text [mc "CC"] -entry $pg_bank.cc -label $pg_bank.lbowner -text [mc "Owner"] -entry $pg_bank.owner -validate key -validatecommand { yacco::onValidateString %P %W} - -grid columnconfigure $pg_bank 1 -weight 1 -grid columnconfigure $pg_bank 3 -weight 1 - -grid $pg_bank.lbbank $pg_bank.bank $pg_bank.lbaddr $pg_bank.addr -sticky news -grid $pg_bank.lbcity $pg_bank.city $pg_bank.lbsalary $pg_bank.salary -sticky news -grid $pg_bank.lbabi $pg_bank.abi $pg_bank.lbcab $pg_bank.cab -sticky news -grid $pg_bank.lbcc $pg_bank.cc $pg_bank.lbowner $pg_bank.owner -sticky news - - - -#Create tab 2 "NOTES" -set pg_note [.notebook add pg_note -label [mc "Notes"]] -entry $pg_note.note -#maybe we can use a table like the one in db_sample and a combobox? -checkbutton $pg_note.morning -text [mc "Aviable morning (09.00 - 13.00)"] -variable ::yacco::CkMorning -checkbutton $pg_note.afternoon -text [mc "Aviable afternoon (14.00 - 18.00)"] -variable ::yacco::CkAfternoon -checkbutton $pg_note.evening -text [mc "Aviable evenings (19.00 - 21.30)"] -variable ::yacco::CkEvening -label $pg_note.lbpoints -text [mc "Points"] -entry $pg_note.points -label $pg_note.lbtype -text [mc "Type of"] -iwidgets::combobox $pg_note.type -label $pg_note.lbaviablefrom -text [mc "Aviable from"] -iwidgets::dateentry $pg_note.aviablefrom -$pg_note.aviablefrom configure -weekdaybackground green -weekendbackground white - -grid columnconfigure $pg_note 1 -weight 1 - -grid $pg_note.note - - - - - -sticky news -grid $pg_note.morning - $pg_note.afternoon - $pg_note.evening - -sticky news -grid $pg_note.lbpoints $pg_note.points $pg_note.lbtype $pg_note.type $pg_note.lbaviablefrom $pg_note.aviablefrom -sticky news - - -#Create button at the bottom of the window -button .find -text [mc "Find"] -image $::yatk_icons::find -compound left \ +#Create "general action" buttons (right side of the window) +set bts [frame .bts] +button $bts.find -text [mc "Find"] -image $::yatk_icons::find -compound left \ -command {::yacco::onPressFind $db_int} -button .usync -text [mc "Sync user"] -image $::yatk_icons::usync -compound left\ +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) } else { ::yacco::onPressUsync $db_int $::yacco::config(REMOTE_HOST) } } -button .new -text [mc "New"] -image $::yatk_icons::new22 -compound left \ +button $bts.new -text [mc "New"] -image $::yatk_icons::new22 -compound left \ -command yacco::onPressNew -button .save -text [mc "Save"] -image $::yatk_icons::save -compound left \ - -command { yacco::onPressSave $db_int } -button .delete -text [mc "Delete"] -image $::yatk_icons::delete -compound left \ - -command {::yacco::onPressDelete $db_int} -button .settings -text [mc "Settings"] -image $::yatk_icons::control -compound left \ +button $bts.settings -text [mc "Settings"] -image $::yatk_icons::control -compound left \ -command {::yacco::onPressSettings} -button .quit -text [mc "Quit"] -image $::yatk_icons::exit22 -compound left \ + +button $bts.quit -text [mc "Quit"] -image $::yatk_icons::exit22 -compound left \ -command yacco::onPressQuit -grid columnconfigure .notebook 0 -weight 1 -grid .notebook - - - - - - -sticky news -#grid .find .new .modify .save .delete .quit -sticky news -grid .find .usync .new .save .delete .settings .quit -sticky news +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.settings -pady 3 -sticky news +#$bts.quit -padx [list 6 0] +button .quit -text [mc "Quit"] -image $::yatk_icons::exit22 -compound left \ + -command ::yacco::onPressQuit + +grid columnconfigure $notes 0 -weight 1 +grid $info $bts -sticky nw -padx 12 +grid .quit - -sticky se -padx 12 -pady 6 +#grid $bts -sticky se -padx 12 -pady 12 + #Poor configuration settings grid columnconfigure . 0 -weight 1 grid rowconfigure . 1 -weight 1 +wm withdraw . +update +wm title . "yacco" +set x [expr {[winfo screenwidth .]/2 - [winfo reqwidth .]/2 - [winfo vrootx .]}] +set y [expr {[winfo screenheight .]/2 - [winfo reqheight .]/2 - [winfo vrooty .]}] +wm geom . +$x+$y +wm deiconify . + # get a widjet defined on the interface # # @param name the name of the widget proc ::yacco::getWdj {name} { global pg_date switch $name { - "surname" {set obj ".notebook.nbframe.pg_date.surname"} - "name" {set obj ".notebook.nbframe.pg_date.name"} - "sex" {set obj ".notebook.nbframe.pg_date.sex"} - "addr" {set obj ".notebook.nbframe.pg_date.addr"} - "city" {set obj ".notebook.nbframe.pg_date.city"} - "cap" {set obj ".notebook.nbframe.pg_date.cap"} - "tel1" {set obj ".notebook.nbframe.pg_date.tel1"} - "tel2" {set obj ".notebook.nbframe.pg_date.tel2"} - "cell" {set obj ".notebook.nbframe.pg_date.cell"} - "bplace" {set obj ".notebook.nbframe.pg_date.bplace"} - "bdate" {set obj ".notebook.nbframe.pg_date.bdate"} - "codfis" {set obj ".notebook.nbframe.pg_date.cf"} - "login" {set obj ".notebook.nbframe.pg_date.login"} - "email" {set obj ".notebook.nbframe.pg_date.email"} - "alt_addr" {set obj ".notebook.nbframe.pg_date.u.addr"} - "alt_city" {set obj ".notebook.nbframe.pg_date.u.city"} - "alt_cap" {set obj ".notebook.nbframe.pg_date.u.cap"} - "btsms" {set obj ".notebook.nbframe.pg_date.l.sms"} - "btlink" {set obj ".notebook.nbframe.pg_date.l.link"} - "btreset" {set obj ".notebook.nbframe.pg_date.l.resetpwd"} - "btconv" {set obj ".notebook.nbframe.pg_date.r.conv"} - "btrit" {set obj ".notebook.nbframe.pg_date.r.rit"} - "bank" {set obj ".notebook.nbframe.pg_bank.bank"} - "bank_addr" {set obj ".notebook.nbframe.pg_bank.addr"} - "bank_city" {set obj ".notebook.nbframe.pg_bank.city"} - "bank_abi" {set obj ".notebook.nbframe.pg_bank.abi"} - "bank_cab" {set obj ".notebook.nbframe.pg_bank.cab"} - "bank_cc" {set obj ".notebook.nbframe.pg_bank.cc"} - "bank_owner" {set obj ".notebook.nbframe.pg_bank.owner"} - "salary" {set obj ".notebook.nbframe.pg_bank.salary"} - "note" {set obj ".notebook.nbframe.pg_note.note"} - "points" {set obj ".notebook.nbframe.pg_note.points"} - "type" {set obj ".notebook.nbframe.pg_note.type"} - "aviablefrom" {set obj ".notebook.nbframe.pg_note.aviablefrom"} - "morning" {set obj ".notebook.nbframe.pg_note.morning"} - "afternoon" {set obj ".notebook.nbframe.pg_note.afternoon"} - "evening" {set obj ".notebook.nbframe.pg_note.evening"} - "btfind" {set obj ".find"} - "btnew" {set obj ".new"} - "btsave" {set obj ".save"} - "btdelete" {set obj ".delete"} - "btquit" {set obj ".quit"} + "surname" {set obj ".info.notebook.nbframe.pg_date.if.surname"} + "name" {set obj ".info.notebook.nbframe.pg_date.if.name"} + "sex" {set obj ".info.notebook.nbframe.pg_date.if.sex"} + "addr" {set obj ".info.notebook.nbframe.pg_addr.adf.addr"} + "city" {set obj ".info.notebook.nbframe.pg_addr.adf.city"} + "cap" {set obj ".info.notebook.nbframe.pg_addr.adf.cap"} + "tel1" {set obj ".info.notebook.nbframe.pg_date.if.tel1"} + "tel2" {set obj ".info.notebook.nbframe.pg_date.if.tel2"} + "cell" {set obj ".info.notebook.nbframe.pg_date.if.cell"} + "bplace" {set obj ".info.notebook.nbframe.pg_date.if.bplace"} + "bdate" {set obj ".info.notebook.nbframe.pg_date.if.bdate"} + "codfis" {set obj ".info.notebook.nbframe.pg_date.if.cf"} + "btcodfis" {set obj ".info.notebook.nbframe.pg_date.if.btcf"} + "login" {set obj ".info.notebook.nbframe.pg_date.if.login"} + "email" {set obj ".info.notebook.nbframe.pg_date.if.email"} + "alt_addr" {set obj ".info.notebook.nbframe.pg_addr.adf.alt_addr"} + "alt_city" {set obj ".info.notebook.nbframe.pg_addr.adf.alt_city"} + "alt_cap" {set obj ".info.notebook.nbframe.pg_addr.adf.alt_cap"} + "btsms" {set obj ".info.l.sms"} + "btlink" {set obj ".info.l.link"} + "btreset" {set obj ".info.l.resetpwd"} + "btconv" {set obj ".info.r.conv"} + "btrit" {set obj ".info.r.rit"} + "bank" {set obj ".info.notebook.nbframe.pg_bank.bank"} + "bank_addr" {set obj ".info.notebook.nbframe.pg_bank.addr"} + "bank_city" {set obj ".info.notebook.nbframe.pg_bank.city"} + "bank_abi" {set obj ".info.notebook.nbframe.pg_bank.abi"} + "bank_cab" {set obj ".info.notebook.nbframe.pg_bank.cab"} + "bank_cc" {set obj ".info.notebook.nbframe.pg_bank.cc"} + "bank_owner" {set obj ".info.notebook.nbframe.pg_bank.owner"} + "salary" {set obj ".info.notebook.nbframe.pg_bank.salary"} + "note" {set obj ".info.notebook.nbframe.pg_note.note"} + "points" {set obj ".info.notebook.nbframe.pg_note.points"} + "type" {set obj ".info.notebook.nbframe.pg_note.type"} + "aviablefrom" {set obj ".info.notebook.nbframe.pg_note.aviablefrom"} + "morning" {set obj ".info.notebook.nbframe.pg_note.morning"} + "afternoon" {set obj ".info.notebook.nbframe.pg_note.afternoon"} + "evening" {set obj ".info.notebook.nbframe.pg_note.evening"} + "btfind" {set obj ".bts.find"} + "btnew" {set obj ".bts.new"} + "btsave" {set obj ".info.bts.save"} + "btdelete" {set obj ".info.bts.delete"} + "btquit" {set obj ".bts.quit"} default { puts "Widjet doesen't exist: $name"; exit } } return $obj @@ -487,7 +576,7 @@ -command { set codFisc [.fnd.fr.cod get] set yacco::is_new_contact 0 - ::yacco::update_status "edit" + ::yacco::update_status edit if {[::yacco::fillInData $db_int $codFisc] != -1} { set ::yacco::fButton 1 } @@ -522,12 +611,14 @@ proc ::yacco::onPressNew {} { set yacco::is_new_contact 1 - yacco::update_status new - yacco::setWdjValue points 5 + ::yacco::update_status new + ::yacco::setWdjValue points 5 [yacco::getWdj "aviablefrom"] show now - set yacco::CkMorning 1 - set yacco::CkAfternoon 1 - set yacco::CkEvening 1 + set ::yacco::CkMorning 1 + set ::yacco::CkAfternoon 1 + set ::yacco::CkEvening 1 + set ::yacco::CkActive 0 + .info.notebook.nbframe.pg_note.active invoke } # hadling for event 'press button Sms' @@ -614,7 +705,9 @@ # the usual 'ok-cancel' commands - button .sms.ok -text [mc "Send"] -command { + set fr [frame .sms.bts] + button $fr.ok -text [mc "Send"] -image $::yatk_icons::ok -compound left \ + -command { set smsText [.sms.txt.txt get 1.0 end] set ::yacco::oldSmsTxt $smsText if {[string length $smsText] == 0 || [string length $smsText] > $::yacco::maxSmsChars} { @@ -629,11 +722,14 @@ } else {set ::yacco::sButton 1} } } - button .sms.cancel -text [mc "Cancel"] -command {set ::yacco::sButton 0} + button $fr.cancel -text [mc "Cancel"] -image $::yatk_icons::cancel -compound left \ + -command {set ::yacco::sButton 0} - grid .sms.txt - -padx 5 -pady 5 - grid .sms.ok .sms.cancel + grid $fr.cancel $fr.ok -padx [list 6 0] + grid .sms.txt -padx 12 -pady 12 + grid $fr -padx 12 -pady 12 -sticky se + wm withdraw .sms update idletasks wm deiconify .sms @@ -947,7 +1043,8 @@ scrollbar $w.frLst.sc -orient vertical -command {.pays.frLst.lstPay yview} \ -borderwidth 0 listbox $w.frLst.lstPay -width 0 -bg white -listvariable ::yacco::pending \ - -selectmode multiple -yscrollcommand {.pays.frLst.sc set} + -selectmode multiple -yscrollcommand {.pays.frLst.sc set} -width 60 + grid $w.frLst.lstPay $w.frLst.sc -sticky news frame $w.bts @@ -958,7 +1055,7 @@ set ::yacco::iButton 1 } bind $w.bts.ok <Return> {%W invoke} - button $w.bts.clear -text [mc "Clear selection"] -image $::yatk_icons::ok -compound left \ + button $w.bts.clear -text [mc "Clear selection"] -image $::yatk_icons::clear -compound left \ -command {.pays.frLst.lstPay selection clear 0 end} button $w.bts.cancel -text [mc "Cancel"] -image $::yatk_icons::cancel -compound left \ -command {set ::yacco::iButton 0} @@ -966,11 +1063,10 @@ bind $b <Return> {%W invoke} } - grid $w.bts.ok - grid $w.bts.clear - grid $w.bts.cancel + grid $w.bts.cancel $w.bts.clear $w.bts.ok -padx [list 6 0] -sticky se - grid $w.frLst $w.bts + grid $w.frLst -padx 12 -pady 12 -sticky news + grid $w.bts -padx 12 -pady 12 -sticky se wm withdraw $w update idletasks @@ -1447,8 +1543,9 @@ # @return 1 if str is correct, 0 otherwise proc ::yacco::onValidateString { str wdj } { switch $wdj { - .notebook.nbframe.pg_bank.addr - - .notebook.nbframe.pg_date.addr {if { $str=="" || [regexp -nocase {^[a-z ()/\xE0\xE8\xEC\xF2\xF9\'\., 0-9]+$} $str] != 0 } {return 1}} + .info.notebook.nbframe.pg_bank.addr - + .info.notebook.nbframe.pg_addr.adf.addr - + .info.notebook.nbframe.pg_addr.adf.alt_addr {if { $str=="" || [regexp -nocase {^[a-z ()/\xE0\xE8\xEC\xF2\xF9\'\., 0-9]+$} $str] != 0 } {return 1}} default {if { $str=="" || [regexp -nocase {^[a-z ()\xE0\xE8\xEC\xF2\xF9\']+$} $str] != 0 } {return 1}} } return 0 @@ -1510,107 +1607,110 @@ # surname - .notebook.nbframe.pg_date.surname insert 0 $opData(cognome) + .info.notebook.nbframe.pg_date.if.surname insert 0 $opData(cognome) # name - .notebook.nbframe.pg_date.name insert 0 $opData(nome) + .info.notebook.nbframe.pg_date.if.name insert 0 $opData(nome) # sex if {$opData(sex) == "t"} { # male - .notebook.nbframe.pg_date.sex insert entry 0 [mc "Male"] + .info.notebook.nbframe.pg_date.if.sex insert entry 0 [mc "Male"] } else { # female - .notebook.nbframe.pg_date.sex insert entry 0 [mc "Female"] + .info.notebook.nbframe.pg_date.if.sex insert entry 0 [mc "Female"] } # is the operator active? if {$opData(inattivo) == "t"} { set ::yacco::::CkActive 1 + .info.notebook.nbframe.pg_note.disable invoke } else { set ::yacco::CkActive 0 + .info.notebook.nbframe.pg_note.active invoke } # addr - .notebook.nbframe.pg_date.addr insert 0 $opData(indirizzo) + .info.notebook.nbframe.pg_addr.adf.addr insert 0 $opData(indirizzo) # city - .notebook.nbframe.pg_date.city insert 0 $opData(citta) + .info.notebook.nbframe.pg_addr.adf.city insert 0 $opData(citta) # cap - .notebook.nbframe.pg_date.cap insert 0 $opData(cap) + .info.notebook.nbframe.pg_addr.adf.cap insert 0 $opData(cap) # tel1 - .notebook.nbframe.pg_date.tel1 insert 0 $opData(telefono1) + .info.notebook.nbframe.pg_date.if.tel1 insert 0 $opData(telefono1) # tel2 - .notebook.nbframe.pg_date.tel2 insert 0 $opData(telefono2) + .info.notebook.nbframe.pg_date.if.tel2 insert 0 $opData(telefono2) # cell - .notebook.nbframe.pg_date.cell insert 0 $opData(cellulare) + .info.notebook.nbframe.pg_date.if.cell insert 0 $opData(cellulare) # bplace - .notebook.nbframe.pg_date.bplace insert 0 $opData(nato_a) + .info.notebook.nbframe.pg_date.if.bplace insert 0 $opData(nato_a) # bdate - .notebook.nbframe.pg_date.bdate delete 0 end - .notebook.nbframe.pg_date.bdate insert 0 [clock format [clock scan "$opData(nato_il)"] -format "%d/%m/%Y"] + .info.notebook.nbframe.pg_date.if.bdate delete 0 end + .info.notebook.nbframe.pg_date.if.bdate insert 0 [clock format [clock scan "$opData(nato_il)"] -format "%d/%m/%Y"] # codfis - .notebook.nbframe.pg_date.cf insert 0 $opData(cod_fiscale) + .info.notebook.nbframe.pg_date.if.cf insert 0 $opData(cod_fiscale) # login - .notebook.nbframe.pg_date.login insert 0 $opData(login) + .info.notebook.nbframe.pg_date.if.login insert 0 $opData(login) # email - .notebook.nbframe.pg_date.email insert 0 $opData(email) + .info.notebook.nbframe.pg_date.if.email insert 0 $opData(email) # alt_addr - .notebook.nbframe.pg_date.u.addr insert 0 $opData(indres) + .info.notebook.nbframe.pg_addr.adf.alt_addr insert 0 $opData(indres) # alt_city - .notebook.nbframe.pg_date.u.city insert 0 $opData(cittares) + .info.notebook.nbframe.pg_addr.adf.alt_city insert 0 $opData(cittares) # alt_cap - .notebook.nbframe.pg_date.u.cap insert 0 $opData(capres) + .info.notebook.nbframe.pg_addr.adf.alt_cap insert 0 $opData(capres) # note - .notebook.nbframe.pg_note.note insert 0 $opData(note) + .info.notebook.nbframe.pg_note.note insert 0 $opData(note) # points - .notebook.nbframe.pg_note.points insert 0 $opData(punteggio) + .info.notebook.nbframe.pg_note.points insert 0 $opData(punteggio) # type - .notebook.nbframe.pg_note.type insert entry 0 $::yacco::intTypes($opData(tipo)) + .info.notebook.nbframe.pg_note.type insert entry 0 $::yacco::intTypes($opData(tipo)) + # salary - .notebook.nbframe.pg_bank.salary insert 0 $opData(pagah) + .info.notebook.nbframe.pg_bank.salary insert 0 $opData(pagah) array set opBank [::op::getOpBank $db_int $codFisc] @@ -1618,31 +1718,31 @@ #bank - .notebook.nbframe.pg_bank.bank insert 0 $opBank(banca) + .info.notebook.nbframe.pg_bank.bank insert 0 $opBank(banca) # bank_addr - .notebook.nbframe.pg_bank.addr insert 0 $opBank(indirizzo) + .info.notebook.nbframe.pg_bank.addr insert 0 $opBank(indirizzo) # bank_city - .notebook.nbframe.pg_bank.city insert 0 $opBank(citta) + .info.notebook.nbframe.pg_bank.city insert 0 $opBank(citta) # bank_abi - .notebook.nbframe.pg_bank.abi insert 0 $opBank(cod_abi) + .info.notebook.nbframe.pg_bank.abi insert 0 $opBank(cod_abi) # bank_cab - .notebook.nbframe.pg_bank.cab insert 0 $opBank(cod_cab) + .info.notebook.nbframe.pg_bank.cab insert 0 $opBank(cod_cab) # bank_cc - .notebook.nbframe.pg_bank.cc insert 0 $opBank(conto_corrente) + .info.notebook.nbframe.pg_bank.cc insert 0 $opBank(conto_corrente) # bank_owner - .notebook.nbframe.pg_bank.owner insert 0 $opBank(intestatario) + .info.notebook.nbframe.pg_bank.owner insert 0 $opBank(intestatario) } @@ -1669,10 +1769,10 @@ } # aviablefrom - .notebook.nbframe.pg_note.aviablefrom show [clock scan $opDisp(disp_dal)] + .info.notebook.nbframe.pg_note.aviablefrom show [clock scan $opDisp(disp_dal)] } - return 0 + return 0 } proc ::yacco::get_fields { {codfis 0} } { @@ -1884,27 +1984,7 @@ $w.calcFrm.extra insert 0 [lindex $pays 2] $w.calcFrm.taxRate delete 0 end $w.calcFrm.taxRate insert 0 [lindex $pays 3] - - grid $w.calcFrm.lblHrs $w.calcFrm.hrs -padx 5 -pady 5 - grid $w.calcFrm.lblPh $w.calcFrm.ph -padx 5 -pady 5 - grid $w.calcFrm.lblExtra $w.calcFrm.extra -padx 5 -pady 5 - grid $w.calcFrm.lblSubTot $w.calcFrm.subTot -padx 5 -pady 5 - grid $w.calcFrm.lblTaxRate $w.calcFrm.taxRate -padx 5 -pady 5 - grid $w.calcFrm.lblTaxTot $w.calcFrm.taxTot -padx 5 -pady 5 - grid $w.calcFrm.lblTot $w.calcFrm.tot -padx 5 -pady 5 - - labelframe $w.descFrm -text [mc "Invoice's data"] - label $w.descFrm.lblPer -text [mc "Period"] - entry $w.descFrm.per -width 40 -bg white - label $w.descFrm.lblDesc -text [mc "Description"] - text $w.descFrm.desc -bg white -height 10 -width 40 - - grid $w.descFrm.lblPer $w.descFrm.per -sticky w - grid $w.descFrm.lblDesc $w.descFrm.desc -sticky n - - frame $w.bts - button $w.bts.calc -text [mc "Calculate amount"] -image $::yatk_icons::hours -compound left \ - -relief groove \ + button $w.calcFrm.calc -text [mc "Calculate amount"] -image $::yatk_icons::hours -compound left \ -command { # read values from the form @@ -1965,9 +2045,27 @@ $::yacco::wPath.calcFrm.tot delete 0 end $::yacco::wPath.calcFrm.tot insert 0 $tot } - + + grid $w.calcFrm.lblHrs $w.calcFrm.hrs -padx 6 -pady 6 -sticky nw + grid $w.calcFrm.lblPh $w.calcFrm.ph -padx 6 -pady 6 -sticky nw + grid $w.calcFrm.lblExtra $w.calcFrm.extra -padx 6 -pady 6 -sticky nw + grid $w.calcFrm.lblSubTot $w.calcFrm.subTot -padx 6 -pady 6 -sticky nw + grid $w.calcFrm.lblTaxRate $w.calcFrm.taxRate -padx 6 -pady 6 -sticky nw + grid $w.calcFrm.lblTaxTot $w.calcFrm.taxTot -padx 6 -pady 6 -sticky nw + grid $w.calcFrm.lblTot $w.calcFrm.tot -padx 6 -pady 6 -sticky nw + grid $w.calcFrm.calc - -sticky se -padx 6 -pady 6 + + labelframe $w.descFrm -text [mc "Invoice's data"] + label $w.descFrm.lblPer -text [mc "Period"] + entry $w.descFrm.per -width 40 -bg white + label $w.descFrm.lblDesc -text [mc "Description"] + text $w.descFrm.desc -bg white -height 15 -width 40 + + grid $w.descFrm.lblPer $w.descFrm.per -sticky nw -pady 6 -padx 6 + grid $w.descFrm.lblDesc $w.descFrm.desc -sticky n -pady 6 -padx 6 + + frame $w.bts button $w.bts.clear -text [mc "Clear"] -image $::yatk_icons::clear -compound left \ - -relief groove \ -command { set objs [list $::yacco::wPath.calcFrm.hrs $::yacco::wPath.calcFrm.ph \ $::yacco::wPath.calcFrm.extra $::yacco::wPath.calcFrm.taxRate \ @@ -1978,7 +2076,6 @@ } } button $w.bts.print -text [mc "Print"] -image $::yatk_icons::fax -compound left \ - -relief groove \ -command { array set data [yacco::get_fields] if {[array size data] == 0} { @@ -2103,16 +2200,16 @@ file delete $psOut file delete $out } - button $w.bts.cancel -text [mc "Cancel"] -image $::yatk_icons::cancel -compound left -relief groove \ + button $w.bts.cancel -text [mc "Cancel"] -image $::yatk_icons::cancel -compound left \ -command {set ::yacco::foButton 0} foreach b [winfo child $w.bts] { bind $b <Return> {%W invoke} } - grid $w.bts.calc $w.bts.clear $w.bts.print $w.bts.cancel + grid $w.bts.cancel $w.bts.clear $w.bts.print -padx 6 - grid $w.calcFrm $w.descFrm -sticky ns - grid $w.bts - -sticky news + grid $w.calcFrm $w.descFrm -sticky ns -padx 12 -pady 12 + grid $w.bts - -sticky se -padx 6 -pady 12 wm withdraw $w update idletasks @@ -2260,6 +2357,7 @@ ::yacco::configureWdj btdelete state disabled ::yacco::configureWdj btnew state normal ::yacco::configureWdj btfind state normal + ::yacco::configureWdj btcodfis state disabled ::yacco::set_editfields_state disabled } @@ -2273,6 +2371,7 @@ ::yacco::configureWdj btnew state disabled ::yacco::configureWdj btfind state normal ::yacco::configureWdj btsave state normal + ::yacco::configureWdj btcodfis state normal ::yacco::set_editfields_state normal ::yacco::clear_fields @@ -2288,6 +2387,7 @@ yacco::configureWdj btdelete state normal yacco::configureWdj btnew state normal yacco::configureWdj btfind state normal + ::yacco::configureWdj btcodfis state normal ::yacco::set_editfields_state normal } @@ -2422,11 +2522,6 @@ set ::yacco::db_int $db_int -update -wm title . "yacco" -set x [expr {[winfo screenwidth .]/2 - [winfo reqwidth .]/2 - [winfo vrootx .]}] -set y [expr {[winfo screenheight .]/2 - [winfo reqheight .]/2 - [winfo vrooty .]}] -wm geom . +$x+$y ## # Setting up connection loss handler This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |