Calls dialogue

This commit is contained in:
dcp1990 2005-06-28 06:07:41 +00:00
parent 0a140d3810
commit db3e4eb297
2 changed files with 13 additions and 7 deletions

View File

@ -27,7 +27,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE. # 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 package require Tk
# important # important
package require tablelist package require tablelist
@ -56,28 +56,29 @@ proc addtocallslist {dta} {
set tlb .calls.m.lb set tlb .calls.m.lb
set flds [split $dta :] set flds [split $dta :]
set date [join [list [lindex $flds 0] [lindex $flds 1]] /] 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 name [lindex $flds 4]
set numb [lindex $flds 5] set numb [lindex $flds 5]
$tlb insert [list $date $time $name $numb] end $tlb insert end [list $date $time $name $numb]
} }
proc calls {} { proc calls {} {
global loggedin global loggedin
if {!$loggedin} return if {!$loggedin} return
toplevel .calls toplevel .calls
set f .calls.m set f .calls.m
frame $f frame $f -width 20c
grid $f -row 0 grid $f -row 0
set g .calls.acts set g .calls.acts
frame $g frame $g -width 20c
grid $g -row 1 grid $g -row 1
#altre #altre
set tlb [set f].lb 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 grid $tlb -row 0 -column 0
#btns #btns
button $g.inf -text "Info" button $g.inf -text "Info"
grid $g.inf -row 0 -column 0 grid $g.inf -row 0 -column 0
wantcalls
} }
set prj .mbar.project set prj .mbar.project
set phdm .mbar.phoned set phdm .mbar.phoned

View File

@ -27,7 +27,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE. # 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 loggedin false
set callscb addtocallslist set callscb addtocallslist
proc openSock {sfile} { proc openSock {sfile} {
@ -36,6 +36,11 @@ proc openSock {sfile} {
fileevent $os readable [list handleme $os] fileevent $os readable [list handleme $os]
return $os return $os
} }
proc wantcalls {} {
global sh
puts $sh "DUMPCALLS"
flush $sh
}
proc handleme {fh} { proc handleme {fh} {
parseres [gets $fh] parseres [gets $fh]
} }