diff -c exmh-2.0.2/lib/addr.tcl exmh-2.0.2-url-faces/lib/addr.tcl *** exmh-2.0.2/lib/addr.tcl Sun Feb 15 21:49:04 1998 --- exmh-2.0.2-url-faces/lib/addr.tcl Thu Jul 2 11:00:47 1998 *************** *** 773,778 **** --- 773,781 ---- { Addr_Browse_LoadListbox "Sorting database..." normal } if { $Addr_debug == 1 } { Widget_AddBut $f ldsrc "LdSrc" { Addr_Load_Source } } + # Create the New button + Widget_AddBut $f new "New" { Addr_Browse_New } + # Finally, create the Help button Widget_AddBut $f help "Help" { Help AddrEdit } $f.help configure -takefocus {} *************** *** 1107,1112 **** --- 1110,1168 ---- } } + proc Addr_Browse_New {} { + global addr_db addr_list + + set t .addr_ed + set id 0 + for {set id 1} {$id < 21} {incr id} { + AddrDebug "winfo exists $t$id is [winfo exists $t$id]" + if [winfo exists $t$id] continue + append t $id + break + } + if [winfo exists $t] { + Exmh_Status "Too many editors open, close one or more and try again" + return + } + if [Exwin_Toplevel $t "New DB address" Addr_Ed] { + + set f $t.but + + $t.but.quit configure -text Cancel -command "Addr_Edit_Dismiss $t" + $t configure -width 500 + + Widget_AddBut $f save "Save" "Addr_New_Save $t" + + Addr_LabelledTextField $t.name "Full Name" 12 "Addr_New_Save $t" + Addr_LabelledTextField $t.address "Address" 12 "Addr_New_Save $t" + + pack $t.name $t.address + } + } + + proc Addr_New_Save {winname} { + global addr_db addr_list + + set name [$winname.name.entry get] + set addr [$winname.address.entry get] + set last "" + set date "" + + set index [MsgParseFrom $addr] + # NEED TO STUFF new NAME into entry! + set addr [format "%s <%s>" $name $index] + Exmh_Status "Updating address \"$index\"." + set addr_db(changed) 1 + set addr_list($index) [list $last $date \ + [Addr_ParseFrom $addr] $addr] + + # update browser window... + $addr_db(win) insert end [Addr_Entry_FormatForListbox $index] + + # make it all go away so we can redo it next time. + Addr_Edit_Dismiss $winname + } proc Addr_Load_Source {} { diff -c exmh-2.0.2/lib/html/AddrEdit.html exmh-2.0.2-url-faces/lib/html/AddrEdit.html *** exmh-2.0.2/lib/html/AddrEdit.html Wed Feb 25 13:05:31 1998 --- exmh-2.0.2-url-faces/lib/html/AddrEdit.html Thu Jul 2 02:14:38 1998 *************** *** 49,54 **** --- 49,73 ----

+
New
Pops up a window that allows you to manually introduce a new + address in the addresses database. + +

The following fields exist in this window: +

+

+
Full Name +
The "text name" of the person associated with this + email address and it may be blank. + +
+
+
Address +
This is the email address of the person. Don't add the angle brackets + to it ("<>") as they will be added when needed. +
+ +
+
Database...
Pops up the Database... menu,