From db3e4eb297b3b49938ffc43e43789d71a2580871 Mon Sep 17 00:00:00 2001 From: dcp1990 Date: Tue, 28 Jun 2005 06:07:41 +0000 Subject: [PATCH] Calls dialogue --- xfone/maindlg.tcl | 13 +++++++------ xfone/phoned.tcl | 7 ++++++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/xfone/maindlg.tcl b/xfone/maindlg.tcl index 1368beb..b36c56d 100644 --- a/xfone/maindlg.tcl +++ b/xfone/maindlg.tcl @@ -27,7 +27,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $Amigan: phoned/xfone/maindlg.tcl,v 1.4 2005/06/27 20:47:09 dcp1990 Exp $ +# $Amigan: phoned/xfone/maindlg.tcl,v 1.5 2005/06/28 06:07:41 dcp1990 Exp $ package require Tk # important package require tablelist @@ -56,28 +56,29 @@ proc addtocallslist {dta} { set tlb .calls.m.lb set flds [split $dta :] set date [join [list [lindex $flds 0] [lindex $flds 1]] /] - set time [join [list [lindex $flds 2] : [lindex $flds 3]] + set time [join [list [lindex $flds 2] [lindex $flds 3]] :] set name [lindex $flds 4] set numb [lindex $flds 5] - $tlb insert [list $date $time $name $numb] end + $tlb insert end [list $date $time $name $numb] } proc calls {} { global loggedin if {!$loggedin} return toplevel .calls set f .calls.m - frame $f + frame $f -width 20c grid $f -row 0 set g .calls.acts - frame $g + frame $g -width 20c grid $g -row 1 #altre set tlb [set f].lb - tablelist::tablelist $tlb -columns {0 "Time" 1 "Date" 2 "Name" 3 "Number"} -stretch all + tablelist::tablelist $tlb -columns {0 "Date" 1 "Time" 2 "Name" 3 "Number"} -stretch all -width 60 grid $tlb -row 0 -column 0 #btns button $g.inf -text "Info" grid $g.inf -row 0 -column 0 + wantcalls } set prj .mbar.project set phdm .mbar.phoned diff --git a/xfone/phoned.tcl b/xfone/phoned.tcl index 1f4c15b..b8aca7c 100644 --- a/xfone/phoned.tcl +++ b/xfone/phoned.tcl @@ -27,7 +27,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $Amigan: phoned/xfone/phoned.tcl,v 1.7 2005/06/27 21:08:04 dcp1990 Exp $ +# $Amigan: phoned/xfone/phoned.tcl,v 1.8 2005/06/28 06:07:41 dcp1990 Exp $ set loggedin false set callscb addtocallslist proc openSock {sfile} { @@ -36,6 +36,11 @@ proc openSock {sfile} { fileevent $os readable [list handleme $os] return $os } +proc wantcalls {} { + global sh + puts $sh "DUMPCALLS" + flush $sh +} proc handleme {fh} { parseres [gets $fh] }