tcladdressbook-commits Mailing List for TclAddressBook (Page 2)
Status: Alpha
Brought to you by:
bdesgraupes
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(114) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(37) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(52) |
Aug
(70) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2005 |
Jan
|
Feb
|
Mar
(2) |
Apr
(9) |
May
|
Jun
(8) |
Jul
|
Aug
(8) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Bernard D. <bde...@us...> - 2005-04-04 08:25:38
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18417 Modified Files: Changes.Log TclAddressBook_version.h Log Message: Started "1.1.4" (1.1.4b1) Index: Changes.Log =================================================================== RCS file: /cvsroot/tcladdressbook/Source/Changes.Log,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- Changes.Log 4 Apr 2005 06:31:51 -0000 1.27 +++ Changes.Log 4 Apr 2005 08:25:26 -0000 1.28 @@ -32,117 +32,122 @@ ================================================================================ += 1.1.4b1 development last update: +================================================================================ +¥ + +================================================================================ = 1.1.3 released last update: 2005-04-04 06:57:17 ================================================================================ - Linking against the stub library to fix the problem of previous version not +¥ Linking against the stub library to fix the problem of previous version not working with newer versions of Tcl. - Internally, now using public function Tcl_ListObjIndex() instead of private +¥ Internally, now using public function Tcl_ListObjIndex() instead of private TclLindexList(). - Added a devel number to the version number string. +¥ Added a devel number to the version number string. ================================================================================ = 1.1.2 released last update: 2004-08-25 16:16:25 ================================================================================ - The [Import] command also copies the image when importing a VCard. - Fixed a bug where [parents] applied to a person's record reported only +¥ The [Import] command also copies the image when importing a VCard. +¥ Fixed a bug where [parents] applied to a person's record reported only the IDs of the parent groups even when the -ids option was not specified. ================================================================================ = 1.1.1 released last update: 2004-08-07 20:52:56 ================================================================================ - Fixed potential memory leak when getting Date values (Bug #1002508). - More error checking. +¥ Fixed potential memory leak when getting Date values (Bug #1002508). +¥ More error checking. ================================================================================ = 1.1 released last update: 2004-08-02 10:26:01 ================================================================================ - Tests passed. Release of 1.1 version. +¥ Tests passed. Release of 1.1 version. ================================================================================ = 1.1b5 last update: 2004-08-01 17:18:15 ================================================================================ - Command [addressbook identifier primary] can now set value. - New command [addressbook label] to get/set the label of an item in +¥ Command [addressbook identifier primary] can now set value. +¥ New command [addressbook label] to get/set the label of an item in a multi-value list property. ================================================================================ = 1.1b4 last update: 2004-08-01 07:58:05 ================================================================================ - Added a new [addressbook identifier index] command to return the +¥ Added a new [addressbook identifier index] command to return the index corresponding to a particular identifier in a multi-value list. - Extended the [addressbook identifier primary] command to set, and +¥ Extended the [addressbook identifier primary] command to set, and not only get, the primary identifier for a multi-value list. Note: it does not seem to work as expected, so it is temporarily disabled. - Extended the [add] and [remove] commands to accept any number of +¥ Extended the [add] and [remove] commands to accept any number of arguments in order to add or remove several items at a time. ================================================================================ = 1.1b3 last update: 2004-07-30 23:15:35 ================================================================================ - Extended the [addressbook identifier] command with subcommands to +¥ Extended the [addressbook identifier] command with subcommands to manage distribution lists. New subcommands are: count, get, primary, and set. ================================================================================ = 1.1b2 last update: 2004-07-29 22:07:10 ================================================================================ - Added a new [addressbook setme] command to set the record that +¥ Added a new [addressbook setme] command to set the record that represents the logged-in user. ================================================================================ = 1.1b1 last update: 2004-07-29 12:18:05 ================================================================================ - Added an [addressbook add] and an [addressbook remove] command to add +¥ Added an [addressbook add] and an [addressbook remove] command to add or remove an item (person or group) to or from a group. - Modified the [addressbook delete] command: it does not have the +¥ Modified the [addressbook delete] command: it does not have the -ingroup optional argument anymore (this functionality is replaced by [addressbook remove]). - Modified the [addressbook property remove] command: the third +¥ Modified the [addressbook property remove] command: the third argument can now also be a record ID so that the property is removed only for this record. If the third argument is -persons or -groups, the return value is now the number of properties successfully removed. - Added a new [addressbook identifier] command to get/set the distribution - identifier of a person¹s multi-value list property in a group. - The [addressbook getme] command now accepts an optional -id argument to return +¥ Added a new [addressbook identifier] command to get/set the distribution + identifier of a personÕs multi-value list property in a group. +¥ The [addressbook getme] command now accepts an optional -id argument to return the unique ID of the "Me" record. ================================================================================ = 1.0b1 released last update: 2004-01-27 21:50:42 ================================================================================ - Added a "Contribs" directory to the project on SourceForge for code +¥ Added a "Contribs" directory to the project on SourceForge for code contributions (Tcl scripts making use of the Tcladdressbook extension...). - Completed documentation and example files. Html and Pdf files. - Added Unix man page. - First public beta release. +¥ Completed documentation and example files. Html and Pdf files. +¥ Added Unix man page. +¥ First public beta release. ================================================================================ = 1.0d12 last update: 2003-12-28 07:54:58 ================================================================================ - The [search] command now handles labelled and keyed values. One can specify +¥ The [search] command now handles labelled and keyed values. One can specify an empty label or key to search over all possible labels or keys respectively. - New [property type] command returning the type of a particular property. +¥ New [property type] command returning the type of a particular property. ================================================================================ = 1.0d11 last update: 2003-12-20 18:16:31 ================================================================================ - Added a Home Page file for the project. - Fixed the encoding issues: it now correctly handles high bit chars and +¥ Added a Home Page file for the project. +¥ Fixed the encoding issues: it now correctly handles high bit chars and accented letters. Uses UTF8 internally. ================================================================================ = 1.0d10 last update: 2003-12-14 18:16:31 ================================================================================ - Fixes crashing bug when [set] is called with a multidictionary value. +¥ Fixes crashing bug when [set] is called with a multidictionary value. ================================================================================ = 1.0d9 last update: 2003-12-13 17:55:12 ================================================================================ - Command [remove] renamed to [delete]. - Commands return localized labels rather than their raw internal values +¥ Command [remove] renamed to [delete]. +¥ Commands return localized labels rather than their raw internal values (eliminating the ugly _$!<Home>!$_ etc.). - Labelled values are formatted as lists suitable for TclX keyed lists commands. - [getme] and [record] now return their result in a simple variable rather +¥ Labelled values are formatted as lists suitable for TclX keyed lists commands. +¥ [getme] and [record] now return their result in a simple variable rather than an array variable. The value of the variable is formatted as a keyed list which can easily be manipulated by the keylget and keylset commands defined in the TclX extension. @@ -150,71 +155,71 @@ ================================================================================ = 1.0d8 last update: 2003-12-11 07:42:21 ================================================================================ - New command [search]. Works only for simple values. - Command [count] now accepts an -ingroup option. - Command [value] renamed to [set]. +¥ New command [search]. Works only for simple values. +¥ Command [count] now accepts an -ingroup option. +¥ Command [value] renamed to [set]. ================================================================================ = 1.0d7 last update: 2003-12-09 17:31:04 ================================================================================ - New [import] and [export] commands to transmit data in vCard format. - New [image] command to get/set the image of a person's record. - Renamed commands: [add] is now [create]. [properties] is now [property names], +¥ New [import] and [export] commands to transmit data in vCard format. +¥ New [image] command to get/set the image of a person's record. +¥ Renamed commands: [add] is now [create]. [properties] is now [property names], while [property add] and [property remove] replace [add property] and [remove property], and [remove record] returned to [remove]. ================================================================================ = 1.0d6 last update: 2003-12-06 07:10:21 ================================================================================ - [add] command now has an -ingroup optional argument. - Added -ingroup optional argument to the [persons] and [groups] commands. - Removed [subgroups] command: use the [groups] command with option -ingroup instead. - Internal changes to avoid calling ABCopyRecordTypeFromUniqueId() +¥ [add] command now has an -ingroup optional argument. +¥ Added -ingroup optional argument to the [persons] and [groups] commands. +¥ Removed [subgroups] command: use the [groups] command with option -ingroup instead. +¥ Internal changes to avoid calling ABCopyRecordTypeFromUniqueId() undefined in Jaguar. The extension should work now on Jaguar. - Replaced TclAB_TypeFromUID() by TclAB_TypeFromRecord() to streamline the +¥ Replaced TclAB_TypeFromUID() by TclAB_TypeFromRecord() to streamline the code and eliminate redundancies. - New [add property] command to add user defined properties to person or +¥ New [add property] command to add user defined properties to person or group records. Changed [add -persons] to [add persons]. Ditto for groups. - New [remove property] command to remove user defined properties for person or +¥ New [remove property] command to remove user defined properties for person or group records. Changed [remove] to [remove record]. ================================================================================ = 1.0d5 last update: 2003-12-04 09:28:13 ================================================================================ - [parents] command now working with person records. - new [value] command used to get or set a particular property. - new [add] command used to create a new group or person. - returns correct date values (UTC) which can be passed to [clock format]. +¥ [parents] command now working with person records. +¥ new [value] command used to get or set a particular property. +¥ new [add] command used to create a new group or person. +¥ returns correct date values (UTC) which can be passed to [clock format]. ================================================================================ = 1.0d4 last update: 2003-11-30 14:53:23 ================================================================================ - Added [subgroups] command with -ids optional argument. - Added [parents] command with -ids optional argument. - Unused vars cleanup. +¥ Added [subgroups] command with -ids optional argument. +¥ Added [parents] command with -ids optional argument. +¥ Unused vars cleanup. ================================================================================ = 1.0d3 last update: 2003-11-29 18:54:24 ================================================================================ - Completed array of returned values for [getme] command. - Modified command [persons] to report list of two items sublists +¥ Completed array of returned values for [getme] command. +¥ Modified command [persons] to report list of two items sublists (ID+lastname). Reports IDs only with flag -ids. - Added command [record]. - Added command [type]. - Added -ids option to command [group]. - Added [remove] command with -fromgroup optional argument. +¥ Added command [record]. +¥ Added command [type]. +¥ Added -ids option to command [group]. +¥ Added [remove] command with -fromgroup optional argument. ================================================================================ = 1.0d2 last update: 2003-11-28 10:01:34 ================================================================================ - Added command [changed]. - Started documentation in aida file. Conversions to text and html. - Added command [properties] listing the property names for groups or +¥ Added command [changed]. +¥ Started documentation in aida file. Conversions to text and html. +¥ Added command [properties] listing the property names for groups or persons. ================================================================================ = 1.0d1 last update: 2003-11-26 12:46:45 ================================================================================ - Installed first definitions for commands [count], [getme], [groups], +¥ Installed first definitions for commands [count], [getme], [groups], [persons] and [save]. Index: TclAddressBook_version.h =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook_version.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- TclAddressBook_version.h 4 Apr 2005 06:32:34 -0000 1.14 +++ TclAddressBook_version.h 4 Apr 2005 08:25:26 -0000 1.15 @@ -1,14 +1,14 @@ // File: "TclAddressBook_version.h" // Created: 2003-09-24 07:28:22 -// Last modification: 2005-04-04 08:19:56 +// Last modification: 2005-04-04 10:19:44 // Author: Bernard Desgraupes // Description: version numbering for Tcladdressbook #define TCLADDRESSBOOK_MAJOR 1 #define TCLADDRESSBOOK_MINOR 1 -#define TCLADDRESSBOOK_SUBMINOR 3 -#define TCLADDRESSBOOK_STAGE 'f' -#define TCLADDRESSBOOK_DEVEL 0 +#define TCLADDRESSBOOK_SUBMINOR 4 +#define TCLADDRESSBOOK_STAGE 'b' +#define TCLADDRESSBOOK_DEVEL 1 // 'd' for developStage // 'a' for alphaStage // 'b' for betaStage |
|
From: Bernard D. <bde...@us...> - 2005-04-04 06:51:21
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28106/Help Modified Files: TclAB.html Log Message: Release of 1.1.3 Index: TclAB.html =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAB.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- TclAB.html 8 Aug 2004 20:44:53 -0000 1.5 +++ TclAB.html 4 Apr 2005 06:50:53 -0000 1.6 @@ -4,7 +4,7 @@ <META NAME=GENERATOR CONTENT="Aida Mode"> </HEAD> <BODY> -<P><P><IMG SRC="Images/TclAB_logo.gif " ALT="TclAB Logo" ALIGN=bottom></P><P><HR><BLOCKQUOTE><P><I> +<P><P><IMG SRC="../Images/TclAB_logo.gif " ALT="TclAB Logo" ALIGN=bottom></P><P><HR><BLOCKQUOTE><P><I> Welcome to the Home Page of the Tcladdressbook extension for Tcl. </I></P></BLOCKQUOTE><HR> <UL> @@ -36,7 +36,7 @@ Binary releases of Tcladdressbook are available on the SourceForge site in the <A HREF="http://sourceforge.net/project/showfiles.php?group_id=96169"> download area</A> of the project. -<P> The latest version is <B>1.1.1</B>.<P><H2><A NAME="M4"></A>Source code</H2> +<P> The latest version is <B>1.1.3</B>.<P><H2><A NAME="M4"></A>Source code</H2> Tcladdressbook is an open source project. Its code is publicly available and can be found on the <A HREF="http://sourceforge.net/projects/tcladdressbook"> SourceForge site</A>. @@ -57,7 +57,7 @@ You can also address <A HREF="http://sourceforge.net/tracker/?atid=613885&group_id=96169&func=browse"> feature requests</A> and propose <A HREF="http://sourceforge.net/tracker/?atid=613884&group_id=96169&func=browse"> patches</A>.<P><P> Please e-mail about any question you might encounter: -<A HREF="mailto:bde...@us...">bde...@us...</A><P><P> Last updated 2004-08-08 22:42:53 +<A HREF="mailto:bde...@us...">bde...@us...</A><P><P> Last updated 2005-04-04 08:02:43 <HR> <P> <I>Tcladdressbook is hosted by</I> <A HREF="http://sourceforge.net"> <P><IMG SRC="http://sourceforge.net/sflogo.php?group_id=96169&type=4 " ALT="SourceForge.net Logo" ALIGN=bottom></P></A><P> |
|
From: Bernard D. <bde...@us...> - 2005-04-04 06:51:21
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28018/Help Modified Files: ReadMe Log Message: Release of 1.1.3 Index: ReadMe =================================================================== RCS file: /cvsroot/tcladdressbook/Help/ReadMe,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ReadMe 8 Aug 2004 20:44:44 -0000 1.6 +++ ReadMe 4 Apr 2005 06:50:43 -0000 1.7 @@ -1,4 +1,4 @@ -TclAddressBook 1.1.1 +TclAddressBook 1.1.3 ==================== This is the Tcladdressbook extension implementing an [addressbook] command |
|
From: Bernard D. <bde...@us...> - 2005-04-04 06:50:13
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27763/Help Modified Files: TclAddressBookHelp.aida Log Message: Level of Images folder Index: TclAddressBookHelp.aida =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAddressBookHelp.aida,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- TclAddressBookHelp.aida 8 Aug 2004 20:45:32 -0000 1.22 +++ TclAddressBookHelp.aida 4 Apr 2005 06:49:47 -0000 1.23 @@ -15,7 +15,7 @@ if)) ((if $aida_params(target) eq "Html" !! logo -((im Images/TclAB_logo.gif +((im ../Images/TclAB_logo.gif TclAB Logo im)) ((nl ((lk TclAB.html )) Home Page lk)) | ((lk http://sourceforge.net/projects/tcladdressbook )) Project Page at SourceForge lk)) if)) |
|
From: Bernard D. <bde...@us...> - 2005-04-04 06:49:48
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27709/Help Modified Files: TclAB_QuickStart.aida Log Message: Level of Images folder Index: TclAB_QuickStart.aida =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAB_QuickStart.aida,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- TclAB_QuickStart.aida 2 Aug 2004 07:36:17 -0000 1.12 +++ TclAB_QuickStart.aida 4 Apr 2005 06:49:37 -0000 1.13 @@ -12,7 +12,7 @@ ((if $aida_params(target) eq "Html" !! logo -((im Images/TclAB_logo.gif +((im ../Images/TclAB_logo.gif TclAB Logo im)) ((nl ((lk TclAB.html ))Home Page lk)) | ((lk http://sourceforge.net/projects/tcladdressbook )) Project Page at SourceForge lk)) if)) |
|
From: Bernard D. <bde...@us...> - 2005-04-04 06:49:39
|
Update of /cvsroot/tcladdressbook/Help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27653/Help Modified Files: TclAB_Home.aida Log Message: Level of Images folder Index: TclAB_Home.aida =================================================================== RCS file: /cvsroot/tcladdressbook/Help/TclAB_Home.aida,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- TclAB_Home.aida 26 Jan 2004 23:06:48 -0000 1.4 +++ TclAB_Home.aida 4 Apr 2005 06:49:21 -0000 1.5 @@ -3,16 +3,16 @@ :Project: addressbook extension for Tcl :Version: $Revision$ :CVSDate: $Date$ -:Author: Bernard Desgraupes <bde...@ea...> -:Homepage: <http://webperso.easyconnect.fr/bdesgraupes/> +:Author: Bernard Desgraupes <bde...@ea...> +:Homepage: <http://webperso.easyconnect.fr/bdesgraupes/> :Created: 2003-12-14 18:26:47 -:Modified: 2003-12-16 11:47:56 +:Modified: 2004-07-30 23:57:07 :Keywords: Address book, data base -:TclCmd: set currentversion [package require addressbook] +:TclCmd: set currentversion [package require addressbook] !! !! logo ((if $aida_params(target) eq "Html" || $aida_params(target) eq "Pdf" -((im Images/TclAB_logo.gif +((im ../Images/TclAB_logo.gif TclAB Logo im)) if)) @@ -66,10 +66,10 @@ ((s1 Help Tcladdressbook is distributed with a ((lk TclAddressBookHelp.html )) help file lk)) -containing the exact reference of +(in html, pdf, text and man formats) containing the exact reference of all the commands and a ((lk TclAB_QuickStart.html )) Quick Start file lk)) -which is a tutorial giving examples of how to use this extension. +which is a tutorial giving examples showing how to use this extension. ((s1 Bug reports |
|
From: Bernard D. <bde...@us...> - 2005-04-04 06:32:47
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24236/Source Modified Files: TclAddressBook_version.h Log Message: Devel number Index: TclAddressBook_version.h =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook_version.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- TclAddressBook_version.h 9 Sep 2004 05:40:34 -0000 1.13 +++ TclAddressBook_version.h 4 Apr 2005 06:32:34 -0000 1.14 @@ -1,6 +1,6 @@ // File: "TclAddressBook_version.h" // Created: 2003-09-24 07:28:22 -// Last modification: 2004-08-25 16:19:31 +// Last modification: 2005-04-04 08:19:56 // Author: Bernard Desgraupes // Description: version numbering for Tcladdressbook @@ -8,9 +8,9 @@ #define TCLADDRESSBOOK_MINOR 1 #define TCLADDRESSBOOK_SUBMINOR 3 #define TCLADDRESSBOOK_STAGE 'f' +#define TCLADDRESSBOOK_DEVEL 0 // 'd' for developStage // 'a' for alphaStage // 'b' for betaStage // 'f' for finalStage - |
|
From: Bernard D. <bde...@us...> - 2005-04-04 06:32:28
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24159/Source Modified Files: TclAddressBook.c Log Message: Added a devel number to the version number string Index: TclAddressBook.c =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- TclAddressBook.c 30 Mar 2005 16:56:13 -0000 1.42 +++ TclAddressBook.c 4 Apr 2005 06:32:12 -0000 1.43 @@ -98,8 +98,13 @@ sprintf(vstr,"%d.%d\0", TCLADDRESSBOOK_MAJOR, TCLADDRESSBOOK_MINOR); } } else { - sprintf(vstr,"%d.%d%c%d\0", TCLADDRESSBOOK_MAJOR, TCLADDRESSBOOK_MINOR, - TCLADDRESSBOOK_STAGE, TCLADDRESSBOOK_SUBMINOR); + if (TCLADDRESSBOOK_DEVEL) { + sprintf(vstr,"%d.%d.%d%c%d\0", TCLADDRESSBOOK_MAJOR, TCLADDRESSBOOK_MINOR, + TCLADDRESSBOOK_SUBMINOR, TCLADDRESSBOOK_STAGE, TCLADDRESSBOOK_DEVEL); + } else { + sprintf(vstr,"%d.%d.%d%c\0", TCLADDRESSBOOK_MAJOR, TCLADDRESSBOOK_MINOR, + TCLADDRESSBOOK_SUBMINOR, TCLADDRESSBOOK_STAGE); + } } // Declare the addressbook package |
|
From: Bernard D. <bde...@us...> - 2005-04-04 06:32:02
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24060/Source Modified Files: Changes.Log Log Message: Release 1.1.3 Index: Changes.Log =================================================================== RCS file: /cvsroot/tcladdressbook/Source/Changes.Log,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- Changes.Log 9 Sep 2004 05:39:48 -0000 1.26 +++ Changes.Log 4 Apr 2005 06:31:51 -0000 1.27 @@ -32,9 +32,13 @@ ================================================================================ -= 1.1.3 released last update: += 1.1.3 released last update: 2005-04-04 06:57:17 ================================================================================ - + Linking against the stub library to fix the problem of previous version not + working with newer versions of Tcl. + Internally, now using public function Tcl_ListObjIndex() instead of private + TclLindexList(). + Added a devel number to the version number string. ================================================================================ = 1.1.2 released last update: 2004-08-25 16:16:25 |
|
From: Bernard D. <bde...@us...> - 2005-03-30 16:56:38
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5030/Source Modified Files: TclAddressBook.c Log Message: ABSearchComparison explicit cast Index: TclAddressBook.c =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- TclAddressBook.c 9 Sep 2004 05:40:17 -0000 1.41 +++ TclAddressBook.c 30 Mar 2005 16:56:13 -0000 1.42 @@ -1,7 +1,7 @@ /* * File : "TclAddressBook.c" * Created: 2003-11-26 12:54:15 - * Last modification: 2004-09-09 06:26:17 + * Last modification: 2004-08-08 22:27:19 * Author: Bernard Desgraupes * e-mail: <bde...@ea...> * @@ -159,7 +159,7 @@ TCLAB_SEARCH, TCLAB_SET, TCLAB_SETME, TCLAB_TYPE }; - resultPtr = Tcl_NewObj(); + resultPtr = Tcl_GetObjResult(interp); if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?arg ...?"); @@ -264,8 +264,6 @@ panic("Tcl_GetIndexFromObj returned unrecognized subcommand"); result = TCL_ERROR; /* Should never be reached. */ } - - Tcl_SetObjResult(interp, resultPtr); return result; } @@ -1777,14 +1775,14 @@ if (!isNumeric && noCase) { comparison = kABEqualCaseInsensitive; } else { - comparison = opIndex; + comparison = (ABSearchComparison) opIndex; } break; case TCLAB_SEARCHOP_GREATERTHAN: case TCLAB_SEARCHOP_GREATERTHANOREQUAL: if (isNumeric) { - comparison = opIndex; + comparison = (ABSearchComparison) opIndex; } else if (noCase) { comparison = kABContainsSubStringCaseInsensitive; } else { @@ -1805,7 +1803,7 @@ case TCLAB_SEARCHOP_NOTEQUAL: case TCLAB_SEARCHOP_LESSTHAN: case TCLAB_SEARCHOP_LESSTHANOREQUAL: - comparison = opIndex; + comparison = (ABSearchComparison) opIndex; break; } |
|
From: Bernard D. <bde...@us...> - 2005-03-30 16:56:21
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4522/Source Modified Files: TclAddressBookUtils.c Log Message: Replaced TclLindexList() by Tcl_ListObjIndex() Index: TclAddressBookUtils.c =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBookUtils.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- TclAddressBookUtils.c 25 Aug 2004 10:06:35 -0000 1.23 +++ TclAddressBookUtils.c 30 Mar 2005 16:55:38 -0000 1.24 @@ -1,13 +1,13 @@ /* * File : "TclAddressBookUtils.c" * Created: 2003-12-05 10:08:03 - * Last modification: 2004-08-11 08:28:25 + * Last modification: 2005-03-30 18:09:13 * Author: Bernard Desgraupes * e-mail: <bde...@ea...> * * Utility functions called by the TclABCmd command functions * - * (c) Copyright : Bernard Desgraupes, 2003-2004 + * (c) Copyright : Bernard Desgraupes, 2003-2004, 2005 * All rights reserved. * This software is free software with BSD licence. * Versions history: see the Changes.Log file. @@ -44,7 +44,7 @@ kABMultiIntegerProperty, kABMultiRealProperty, kABMultiStringProperty, - NULL + (ABPropertyType) NULL }; /* @@ -442,10 +442,9 @@ Tcl_ListObjLength(interp, objPtr, &listLen); // Loop over all the sublists for (j = 0; j < listLen; j++) { - // TclLindexList increments the RefCount - elemPtr = TclLindexList(interp, objPtr, Tcl_NewIntObj(j)); - labelPtr = TclLindexList(interp, elemPtr, Tcl_NewIntObj(0)); - valuePtr = TclLindexList(interp, elemPtr, Tcl_NewIntObj(1)); + Tcl_ListObjIndex(interp, objPtr, j, &elemPtr); + Tcl_ListObjIndex(interp, elemPtr, 0, &labelPtr); + Tcl_ListObjIndex(interp, elemPtr, 1, &valuePtr); // Make CFStrings out of the Tcl objects switch (inPropType) { @@ -498,9 +497,10 @@ // The dictionary itself is represented as a list of two-items // sublists, each one corresponding to a key/value pair. - elemPtr = TclLindexList(interp, objPtr, Tcl_NewIntObj(j)); - labelPtr = TclLindexList(interp, elemPtr, Tcl_NewIntObj(0)); - dictPtr = TclLindexList(interp, elemPtr, Tcl_NewIntObj(1)); + Tcl_ListObjIndex(interp, objPtr, j, &elemPtr); + Tcl_ListObjIndex(interp, elemPtr, 0, &labelPtr); + Tcl_ListObjIndex(interp, elemPtr, 1, &dictPtr); + Tcl_ListObjLength(interp, dictPtr, &subListLen); // Allocate memory to store the keys and values @@ -509,9 +509,10 @@ if ((theKeys != NULL) && (theVals != NULL)) { // Loop over all the elements of the flat dict list for (k = 0; k < subListLen; k++) { - subElemPtr = TclLindexList(interp, dictPtr, Tcl_NewIntObj(k)); - keyPtr = TclLindexList(interp, subElemPtr, Tcl_NewIntObj(0)); - valuePtr = TclLindexList(interp, subElemPtr, Tcl_NewIntObj(1)); + Tcl_ListObjIndex(interp, dictPtr, k, &subElemPtr); + Tcl_ListObjIndex(interp, subElemPtr, 0, &keyPtr); + Tcl_ListObjIndex(interp, subElemPtr, 1, &valuePtr); + // Make CFStrings out of the Tcl objects theKeys[k] = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(keyPtr, &length), kCFStringEncodingUTF8); theVals[k] = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(valuePtr, &length), kCFStringEncodingUTF8); @@ -1999,9 +2000,8 @@ Tcl_ListObjLength(interp, objPtr, &listLen); // Parse the label/value pair. if (listLen == 2) { - // TclLindexList increments the RefCount - labelPtr = TclLindexList(interp, objPtr, Tcl_NewIntObj(0)); - valuePtr = TclLindexList(interp, objPtr, Tcl_NewIntObj(1)); + Tcl_ListObjIndex(interp, objPtr, 0, &labelPtr); + Tcl_ListObjIndex(interp, objPtr, 1, &valuePtr); // Make CFStrings out of the Tcl objects switch (inPropType) { @@ -2047,12 +2047,14 @@ if (listLen == 2) { // The dictionary itself should be a two-elements Tcl list // representing a single key/value pair. - labelPtr = TclLindexList(interp, objPtr, Tcl_NewIntObj(0)); - dictPtr = TclLindexList(interp, objPtr, Tcl_NewIntObj(1)); + Tcl_ListObjIndex(interp, objPtr, 0, &labelPtr); + Tcl_ListObjIndex(interp, objPtr, 1, &dictPtr); + Tcl_ListObjLength(interp, dictPtr, &subListLen); if (subListLen == 2) { - keyPtr = TclLindexList(interp, dictPtr, Tcl_NewIntObj(0)); - valuePtr = TclLindexList(interp, dictPtr, Tcl_NewIntObj(1)); + Tcl_ListObjIndex(interp, dictPtr, 0, &keyPtr); + Tcl_ListObjIndex(interp, dictPtr, 1, &valuePtr); + // Make CFStrings out of the Tcl objects *outValue = CFStringCreateWithCString(NULL, Tcl_GetStringFromObj(valuePtr, &length), kCFStringEncodingUTF8); theStr = Tcl_GetStringFromObj(keyPtr, &length); |
|
From: Bernard D. <bde...@us...> - 2004-09-09 05:40:44
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1154/Source Modified Files: TclAddressBook_version.h Log Message: Bumped to 1.1.3 Index: TclAddressBook_version.h =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook_version.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- TclAddressBook_version.h 25 Aug 2004 10:06:54 -0000 1.12 +++ TclAddressBook_version.h 9 Sep 2004 05:40:34 -0000 1.13 @@ -1,12 +1,12 @@ // File: "TclAddressBook_version.h" // Created: 2003-09-24 07:28:22 -// Last modification: 2004-08-23 23:16:36 +// Last modification: 2004-08-25 16:19:31 // Author: Bernard Desgraupes // Description: version numbering for Tcladdressbook #define TCLADDRESSBOOK_MAJOR 1 #define TCLADDRESSBOOK_MINOR 1 -#define TCLADDRESSBOOK_SUBMINOR 2 +#define TCLADDRESSBOOK_SUBMINOR 3 #define TCLADDRESSBOOK_STAGE 'f' // 'd' for developStage // 'a' for alphaStage |
|
From: Bernard D. <bde...@us...> - 2004-09-09 05:40:26
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1094/Source Modified Files: TclAddressBook.c Log Message: Init resultPtr with TclNewObj Index: TclAddressBook.c =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- TclAddressBook.c 25 Aug 2004 10:05:47 -0000 1.40 +++ TclAddressBook.c 9 Sep 2004 05:40:17 -0000 1.41 @@ -1,7 +1,7 @@ /* * File : "TclAddressBook.c" * Created: 2003-11-26 12:54:15 - * Last modification: 2004-08-08 22:27:19 + * Last modification: 2004-09-09 06:26:17 * Author: Bernard Desgraupes * e-mail: <bde...@ea...> * @@ -159,7 +159,7 @@ TCLAB_SEARCH, TCLAB_SET, TCLAB_SETME, TCLAB_TYPE }; - resultPtr = Tcl_GetObjResult(interp); + resultPtr = Tcl_NewObj(); if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?arg ...?"); @@ -264,6 +264,8 @@ panic("Tcl_GetIndexFromObj returned unrecognized subcommand"); result = TCL_ERROR; /* Should never be reached. */ } + + Tcl_SetObjResult(interp, resultPtr); return result; } |
|
From: Bernard D. <bde...@us...> - 2004-09-09 05:39:58
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv941/Source Modified Files: Changes.Log Log Message: Starting 1.1.3 Index: Changes.Log =================================================================== RCS file: /cvsroot/tcladdressbook/Source/Changes.Log,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- Changes.Log 25 Aug 2004 10:04:48 -0000 1.25 +++ Changes.Log 9 Sep 2004 05:39:48 -0000 1.26 @@ -30,8 +30,14 @@ Last modification: $Date$ + ================================================================================ -= 1.1.2 released last update: += 1.1.3 released last update: +================================================================================ + + +================================================================================ += 1.1.2 released last update: 2004-08-25 16:16:25 ================================================================================ The [Import] command also copies the image when importing a VCard. Fixed a bug where [parents] applied to a person's record reported only @@ -40,7 +46,7 @@ ================================================================================ = 1.1.1 released last update: 2004-08-07 20:52:56 ================================================================================ - Fixed subtle memory leak when getting Date values (Bug #1002508). + Fixed potential memory leak when getting Date values (Bug #1002508). More error checking. ================================================================================ |
|
From: Joachim K. <jk...@us...> - 2004-08-28 01:08:57
|
Update of /cvsroot/tcladdressbook/Contribs/Alpha/CardBrowser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4864 Modified Files: cardBrowser.tcl Log Message: {No changes. Just to test the Alpha CVS interface.} Index: cardBrowser.tcl =================================================================== RCS file: /cvsroot/tcladdressbook/Contribs/Alpha/CardBrowser/cardBrowser.tcl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- cardBrowser.tcl 25 Aug 2004 02:08:14 -0000 1.2 +++ cardBrowser.tcl 28 Aug 2004 01:08:35 -0000 1.3 @@ -2,7 +2,7 @@ # ################################################################### # # FILE: "cardBrowser.tcl" -# last update: 24/08/2004 22:08:41 +# last update: 27/08/2004 21:06:49 # Author: Joachim Kock # E-mail: <ko...@ma...> # |
|
From: Bernard D. <bde...@us...> - 2004-08-25 10:07:03
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1447/Source Modified Files: TclAddressBook_version.h Log Message: 1.1.2 Index: TclAddressBook_version.h =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook_version.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- TclAddressBook_version.h 3 Aug 2004 09:51:14 -0000 1.11 +++ TclAddressBook_version.h 25 Aug 2004 10:06:54 -0000 1.12 @@ -1,12 +1,12 @@ // File: "TclAddressBook_version.h" // Created: 2003-09-24 07:28:22 -// Last modification: 2004-08-02 23:39:54 +// Last modification: 2004-08-23 23:16:36 // Author: Bernard Desgraupes // Description: version numbering for Tcladdressbook #define TCLADDRESSBOOK_MAJOR 1 #define TCLADDRESSBOOK_MINOR 1 -#define TCLADDRESSBOOK_SUBMINOR 1 +#define TCLADDRESSBOOK_SUBMINOR 2 #define TCLADDRESSBOOK_STAGE 'f' // 'd' for developStage // 'a' for alphaStage |
|
From: Bernard D. <bde...@us...> - 2004-08-25 10:06:46
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1373/Source Modified Files: TclAddressBookUtils.c Log Message: No need to work on a copy of the CF string, retains are ok. Index: TclAddressBookUtils.c =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBookUtils.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- TclAddressBookUtils.c 8 Aug 2004 20:32:44 -0000 1.22 +++ TclAddressBookUtils.c 25 Aug 2004 10:06:35 -0000 1.23 @@ -1,7 +1,7 @@ /* * File : "TclAddressBookUtils.c" * Created: 2003-12-05 10:08:03 - * Last modification: 2004-08-07 21:19:06 + * Last modification: 2004-08-11 08:28:25 * Author: Bernard Desgraupes * e-mail: <bde...@ea...> * @@ -123,7 +123,6 @@ Boolean allValues, int inRecordType) { CFStringRef subLabel, subValue, localizedStr; - CFTypeRef theValue; CFAbsoluteTime theAbsTime; ABPropertyType thePropType; ABMutableMultiValueRef multiValue; @@ -143,24 +142,20 @@ } else { thePropType = ABTypeOfProperty(ab, kABGroupRecordType, inProperty); } - // Work on a local "copy" of the CFStringRef. Not sure this is - // necessary since inValue already has a retain count equal to 1. - theValue = CFRetain(inValue); - - if (theValue) { + + if (inValue) { switch (thePropType) { case kABStringProperty: // Get the entry for the string property - if (CFStringGetCString(theValue, theStr, sizeof(theStr), NULL)) { + if (CFStringGetCString(inValue, theStr, sizeof(theStr), NULL)) { TclAB_PutValueInResult(interp, thePropName, theStr, allValues); } - CFRelease(theValue); break; case kABDateProperty: - theAbsTime = CFDateGetAbsoluteTime(theValue); + theAbsTime = CFDateGetAbsoluteTime(inValue); // Offset the value by 31 years: 1 jan 1970 is the reference date for // Unix, while it is 1 jan 2001 for the CFDate functions. This will // make the returned value suitable for use with [clock format]: @@ -169,21 +164,19 @@ theAbsTime += kCFAbsoluteTimeIntervalSince1970; sprintf(theStr, "%.0f", theAbsTime); TclAB_PutValueInResult(interp, thePropName, theStr, allValues); - CFRelease(theValue); break; case kABIntegerProperty: - if (CFNumberGetValue(theValue, kCFNumberSInt32Type, &theSInt32)) { + if (CFNumberGetValue(inValue, kCFNumberSInt32Type, &theSInt32)) { sprintf(theStr, "%d", theSInt32); TclAB_PutValueInResult(interp, thePropName, theStr, allValues); } - CFRelease(theValue); break; case kABMultiStringProperty: - multiValue = (ABMutableMultiValueRef) theValue; + multiValue = (ABMutableMultiValueRef) inValue; mvCount = ABMultiValueCount(multiValue); Tcl_DStringInit(&ds); @@ -206,12 +199,11 @@ } TclAB_PutValueInResult(interp, thePropName, ds.string, allValues); Tcl_DStringFree(&ds); - CFRelease(multiValue); break; case kABMultiDateProperty: - multiValue = (ABMutableMultiValueRef) theValue; + multiValue = (ABMutableMultiValueRef) inValue; mvCount = ABMultiValueCount(multiValue); Tcl_DStringInit(&ds); @@ -237,12 +229,11 @@ } TclAB_PutValueInResult(interp, thePropName, ds.string, allValues); Tcl_DStringFree(&ds); - CFRelease(multiValue); break; case kABMultiDictionaryProperty: - multiValue = (ABMutableMultiValueRef) theValue; + multiValue = (ABMutableMultiValueRef) inValue; mvCount = ABMultiValueCount(multiValue); Tcl_DStringInit(&ds); @@ -263,37 +254,39 @@ if (CFStringGetCString(localizedStr, theLabelStr, sizeof(theLabelStr), NULL)) { // Get the dict theDict = ABMultiValueCopyValueAtIndex(multiValue, j); - dictCount = CFDictionaryGetCount(theDict); - // Allocate memory to store the keys and values - theKeys = (CFStringRef*) NewPtrClear(sizeof(CFStringRef*) * dictCount); - theVals = (CFStringRef*) NewPtrClear(sizeof(CFStringRef*) * dictCount); - if ((theKeys != NULL) && (theVals != NULL)) { - Tcl_DStringStartSublist(&ds); - Tcl_DStringAppendElement(&ds, theLabelStr); - Tcl_DStringStartSublist(&ds); - // Fill the keys and values arrays from this dictionary - CFDictionaryGetKeysAndValues(theDict, theKeys, theVals); - // Loop over all the entries - for (k = 0; k < dictCount; k++) { - if (theKeys[k] && theVals[k] ) { - // Make a two items list for each key/value pair - if (CFStringGetCString(theKeys[k], theStr, sizeof(theStr), NULL) - && CFStringGetCString(theVals[k], theSubStr, sizeof(theSubStr), NULL)) { - Tcl_DStringStartSublist(&ds); - Tcl_DStringAppendElement(&ds, theStr); - Tcl_DStringAppendElement(&ds, theSubStr); - Tcl_DStringEndSublist(&ds); + if (theDict) { + dictCount = CFDictionaryGetCount(theDict); + // Allocate memory to store the keys and values + theKeys = (CFStringRef*) NewPtrClear(sizeof(CFStringRef) * dictCount); + theVals = (CFStringRef*) NewPtrClear(sizeof(CFStringRef) * dictCount); + if ((theKeys != NULL) && (theVals != NULL)) { + Tcl_DStringStartSublist(&ds); + Tcl_DStringAppendElement(&ds, theLabelStr); + Tcl_DStringStartSublist(&ds); + // Fill the keys and values arrays from this dictionary + CFDictionaryGetKeysAndValues(theDict, theKeys, theVals); + // Loop over all the entries + for (k = 0; k < dictCount; k++) { + if (theKeys[k] && theVals[k] ) { + // Make a two items list for each key/value pair + if (CFStringGetCString(theKeys[k], theStr, sizeof(theStr), NULL) + && CFStringGetCString(theVals[k], theSubStr, sizeof(theSubStr), NULL)) { + Tcl_DStringStartSublist(&ds); + Tcl_DStringAppendElement(&ds, theStr); + Tcl_DStringAppendElement(&ds, theSubStr); + Tcl_DStringEndSublist(&ds); + } } - } + } + Tcl_DStringEndSublist(&ds); + Tcl_DStringEndSublist(&ds); + } else { + // "Could not allocate memory for dictionary" } - Tcl_DStringEndSublist(&ds); - Tcl_DStringEndSublist(&ds); - } else { - // "Could not allocate memory for dictionary" - } - if (theKeys) DisposePtr(theKeys); - if (theVals) DisposePtr(theVals); - if (theDict) CFRelease(theDict); + if (theKeys) DisposePtr(theKeys); + if (theVals) DisposePtr(theVals); + CFRelease(theDict); + } } CFRelease(localizedStr); } @@ -301,14 +294,11 @@ TclAB_PutValueInResult(interp, thePropName, ds.string, allValues); Tcl_DStringFree(&ds); - // Don't CFRelease the multiValue: each dict is released one after the other - CFRelease(multiValue); break; case kABErrorInProperty: default: - CFRelease(theValue); break; } } @@ -514,8 +504,8 @@ Tcl_ListObjLength(interp, dictPtr, &subListLen); // Allocate memory to store the keys and values - theKeys = (CFStringRef*) NewPtrClear(sizeof(CFStringRef*) * subListLen); - theVals = (CFStringRef*) NewPtrClear(sizeof(CFStringRef*) * subListLen); + theKeys = (CFStringRef*) NewPtrClear(sizeof(CFStringRef) * subListLen); + theVals = (CFStringRef*) NewPtrClear(sizeof(CFStringRef) * subListLen); if ((theKeys != NULL) && (theVals != NULL)) { // Loop over all the elements of the flat dict list for (k = 0; k < subListLen; k++) { @@ -665,15 +655,15 @@ CONST84 char * option, ABRecordRef * outItemRef, int inRecordType) { - CFStringRef theCFStr; + CFStringRef uidRef; int kind; Boolean result = true; - theCFStr = CFStringCreateWithCString(NULL, inUID, NULL); + uidRef = CFStringCreateWithCString(NULL, inUID, NULL); // Find the record corresponding to the UID - *outItemRef = ABCopyRecordForUniqueId(ab, theCFStr); - CFRelease(theCFStr); + *outItemRef = ABCopyRecordForUniqueId(ab, uidRef); + CFRelease(uidRef); if (!*outItemRef) { Tcl_AppendStringsToObj(Tcl_GetObjResult(interp), "Unrecognized record ID in ", option, @@ -861,7 +851,7 @@ int inRecordType) { CFIndex theCount; - ABGroupRef theGroup; + ABRecordRef theRecord; CFStringRef text, uniqueId; char theName[256], theUID[256]; Tcl_Obj * objPtr; @@ -877,9 +867,9 @@ Tcl_Obj * listPtr; // Get the record at index i - theGroup = (ABGroupRef) CFArrayGetValueAtIndex(allElements,i); + theRecord = (ABRecordRef) CFArrayGetValueAtIndex(allElements,i); // Get the unique id for this record - uniqueId = ABRecordCopyUniqueId(theGroup); + uniqueId = ABRecordCopyUniqueId(theRecord); CFStringGetCString(uniqueId, theUID, sizeof(theUID), NULL); CFRelease(uniqueId); @@ -888,9 +878,9 @@ } // Try to get the entry for the kABGroupNameProperty. If that fails, just list the UID if (inRecordType == rec_group) { - text = ABRecordCopyValue((ABGroupRef) theGroup, kABGroupNameProperty); + text = ABRecordCopyValue(theRecord, kABGroupNameProperty); } else if (inRecordType == rec_person) { - text = ABRecordCopyValue((ABGroupRef) theGroup, kABLastNameProperty); + text = ABRecordCopyValue(theRecord, kABLastNameProperty); } if (text) { @@ -1182,27 +1172,32 @@ ab = ABGetSharedAddressBook(); // Get the CFArray of properties theItems = ABCopyArrayOfPropertiesForRecordType(ab, inRecordType ? kABPersonRecordType : kABGroupRecordType); - theCount = CFArrayGetCount(theItems); - - for (i = 0; i < theCount; i++) { - // Get the record at index i - theProperty = CFArrayGetValueAtIndex(theItems,i); + if (theItems) { + theCount = CFArrayGetCount(theItems); - if (theProperty && CFStringGetCString(theProperty, theName, sizeof(theName), NULL)) { - Tcl_DString ds; + for (i = 0; i < theCount; i++) { + // Get the record at index i + theProperty = CFArrayGetValueAtIndex(theItems,i); - Tcl_DStringInit(&ds); - Tcl_ExternalToUtfDString(gMacRomanEnc, theName, strlen(theName), &ds); - objPtr = Tcl_NewStringObj(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds)); - Tcl_DStringFree(&ds); - result = Tcl_ListObjAppendElement(interp, resultPtr, objPtr); - if (result != TCL_OK) { - Tcl_DecrRefCount(objPtr); - break; - } - } + if (theProperty && CFStringGetCString(theProperty, theName, sizeof(theName), NULL)) { + Tcl_DString ds; + + Tcl_DStringInit(&ds); + Tcl_ExternalToUtfDString(gMacRomanEnc, theName, strlen(theName), &ds); + objPtr = Tcl_NewStringObj(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds)); + Tcl_DStringFree(&ds); + result = Tcl_ListObjAppendElement(interp, resultPtr, objPtr); + if (result != TCL_OK) { + Tcl_DecrRefCount(objPtr); + break; + } + } + } + CFRelease(theItems); + } else { + Tcl_AppendStringsToObj(resultPtr, "Couldn't get array of properties for record type", (char *) NULL); + return TCL_ERROR; } - CFRelease(theItems); return TCL_OK; } @@ -1238,7 +1233,7 @@ int inRecordType) { ABAddressBookRef ab; - CFStringRef theProp; + CFStringRef propRef; CFMutableArrayRef theArray; int length, num, result = TCL_OK; char * propName; @@ -1252,43 +1247,58 @@ Tcl_IncrRefCount(objv[4]); propName = Tcl_GetStringFromObj(objv[4], &length); - theProp = CFStringCreateWithCString(NULL, propName, kCFStringEncodingUTF8); + propRef = CFStringCreateWithCString(NULL, propName, kCFStringEncodingUTF8); - if (theProp) { + if (propRef) { // Get the address book ab = ABGetSharedAddressBook(); if (inRecordType == rec_undefined) { // The third argument was a record ID CONST84 char * theUID; - CFStringRef theCFStr; + CFStringRef uidRef; ABRecordRef theRecord; theUID = Tcl_GetStringFromObj(objv[3], &length); - theCFStr = CFStringCreateWithCString(NULL, theUID, NULL); + uidRef = CFStringCreateWithCString(NULL, theUID, NULL); - // Find the record corresponding to the UID - theRecord = ABCopyRecordForUniqueId(ab, theCFStr); - CFRelease(theCFStr); - if (!ABRecordRemoveValue(theRecord, theProp)) { - Tcl_AppendStringsToObj(resultPtr, "Couldn't remove property '", propName, - "' from the record", (char *) NULL); + if (uidRef) { + // Find the record corresponding to the UID + theRecord = ABCopyRecordForUniqueId(ab, uidRef); + CFRelease(uidRef); + if (theRecord) { + if (!ABRecordRemoveValue(theRecord, propRef)) { + Tcl_AppendStringsToObj(resultPtr, "Couldn't remove property '", propName, + "' from the record", (char *) NULL); + result = TCL_ERROR; + } + CFRelease(theRecord); + } else { + Tcl_AppendStringsToObj(resultPtr, "Couldn't get record for ID", (char *) NULL); + result = TCL_ERROR; + } + } else { + Tcl_AppendStringsToObj(resultPtr, "Problem getting CFString for UID", (char *) NULL); result = TCL_ERROR; - } - CFRelease(theRecord); + } } else { // The third argument was -groups or -persons. // Create a CFArray to store the property. - theArray = CFArrayCreateMutable(NULL, 0, NULL); - CFArrayAppendValue(theArray, theProp); - CFRelease(theProp); - - // Remove the property from all the records of this type in the Address Book - num = ABRemoveProperties(ab, inRecordType ? kABPersonRecordType : kABGroupRecordType, theArray); - CFRelease(theArray); - Tcl_SetObjResult(interp, Tcl_NewIntObj(num)); - result = TCL_OK; + theArray = CFArrayCreateMutable(NULL, 0, &kCFTypeArrayCallBacks); + if (theArray) { + CFArrayAppendValue(theArray, propRef); + + // Remove the property from all the records of this type in the Address Book + num = ABRemoveProperties(ab, inRecordType ? kABPersonRecordType : kABGroupRecordType, theArray); + CFRelease(theArray); + Tcl_SetObjResult(interp, Tcl_NewIntObj(num)); + result = TCL_OK; + } else { + Tcl_AppendStringsToObj(resultPtr, "Problem with CFArrayCreateMutable", (char *) NULL); + result = TCL_ERROR; + } } + CFRelease(propRef); } else { Tcl_AppendStringsToObj(resultPtr, "Problem getting CFString for property", (char *) NULL); result = TCL_ERROR; |
|
From: Bernard D. <bde...@us...> - 2004-08-25 10:05:59
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1226/Source Modified Files: TclAddressBook.c Log Message: Pass rec_group instead of kind in [parents] Index: TclAddressBook.c =================================================================== RCS file: /cvsroot/tcladdressbook/Source/TclAddressBook.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- TclAddressBook.c 8 Aug 2004 20:31:58 -0000 1.39 +++ TclAddressBook.c 25 Aug 2004 10:05:47 -0000 1.40 @@ -1304,7 +1304,7 @@ } CFRelease(theRecord); - TclAB_ResultListFromCFArray(interp, resultPtr, allParents, onlyID, kind); + TclAB_ResultListFromCFArray(interp, resultPtr, allParents, onlyID, rec_group); CFRelease(allParents); return TCL_OK; |
|
From: Bernard D. <bde...@us...> - 2004-08-25 10:04:57
|
Update of /cvsroot/tcladdressbook/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1100/Source Modified Files: Changes.Log Log Message: 1.1.2 changes Index: Changes.Log =================================================================== RCS file: /cvsroot/tcladdressbook/Source/Changes.Log,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- Changes.Log 8 Aug 2004 20:31:45 -0000 1.24 +++ Changes.Log 25 Aug 2004 10:04:48 -0000 1.25 @@ -31,10 +31,16 @@ Last modification: $Date$ ================================================================================ += 1.1.2 released last update: +================================================================================ + The [Import] command also copies the image when importing a VCard. + Fixed a bug where [parents] applied to a person's record reported only + the IDs of the parent groups even when the -ids option was not specified. + +================================================================================ = 1.1.1 released last update: 2004-08-07 20:52:56 ================================================================================ Fixed subtle memory leak when getting Date values (Bug #1002508). - The [Import] command also copies the image if there is one when importing a VCard. More error checking. ================================================================================ |
|
From: Joachim K. <jk...@us...> - 2004-08-25 02:08:24
|
Update of /cvsroot/tcladdressbook/Contribs/Alpha/CardBrowser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21835 Modified Files: cardBrowser.tcl Log Message: Nothing changes except the data Index: cardBrowser.tcl =================================================================== RCS file: /cvsroot/tcladdressbook/Contribs/Alpha/CardBrowser/cardBrowser.tcl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- cardBrowser.tcl 24 Aug 2004 06:02:38 -0000 1.1 +++ cardBrowser.tcl 25 Aug 2004 02:08:14 -0000 1.2 @@ -2,7 +2,7 @@ # ################################################################### # # FILE: "cardBrowser.tcl" -# last update: 23/08/2004 10:41:37 +# last update: 24/08/2004 22:08:41 # Author: Joachim Kock # E-mail: <ko...@ma...> # |
|
From: Bernard D. <bde...@us...> - 2004-08-24 06:02:53
|
Update of /cvsroot/tcladdressbook/Contribs/Alpha/CardBrowser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3082/Contribs/Alpha/CardBrowser Added Files: cardBrowser.tcl Log Message: First checkin --- NEW FILE: cardBrowser.tcl --- # -*-Tcl-*- nowrap # ################################################################### # # FILE: "cardBrowser.tcl" # last update: 23/08/2004 10:41:37 # Author: Joachim Kock # E-mail: <ko...@ma...> # # Description: Card Browser is a generic interface to data structures # that can be reasonably interpreted as a collection of cards. Typical # examples are simple databases like an address book, and the main # application of Card Browser is to interface Apple's Addressbook. # # Other examples provided are: # # -- access to a tab-separated database, exemplified by the notorious # Whisky Distilleries and Country-codes files distributed with Alpha # -- interface to bibtex data files # -- interface to the arXiv preprint server on the internet [...1205 lines suppressed...] proc Card::displayHuge { str } { set str "\r [string trim $str] \r" set numCols [string length $str] set width [::winZoom::winWidth 48 $numCols] set height [winZoom::winHeight 48 3] set hoffset [expr (1024 - $width ) / 2] new -n Telephone -g $hoffset 440 $width $height \ -shell 1 -fontsize 48 -info $str } proc Card::run { client } { if { [namespace eval $client {info procs run}] == "run" } { ${client}::run } else { windowForFind $client } } |
|
From: Bernard D. <bde...@us...> - 2004-08-24 06:02:26
|
Update of /cvsroot/tcladdressbook/Contribs/Alpha/CardBrowser/AAB In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2902/Contribs/Alpha/CardBrowser/AAB Added Files: searchTemplate Log Message: First checkin --- NEW FILE: searchTemplate --- First: Last: Organization: Address: Phone: Email: Birthday: Note: |
|
From: Bernard D. <bde...@us...> - 2004-08-24 06:02:01
|
Update of /cvsroot/tcladdressbook/Contribs/Alpha/CardBrowser/AAB/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2745/Contribs/Alpha/CardBrowser/AAB/plugins Added Files: DTMF.tcl Log Message: First checkin --- NEW FILE: DTMF.tcl --- package require sound # (sub-package of snack) namespace eval DTMF {} # Set up the frequencies array set DTMF::low { 0 941 1 697 2 697 3 697 4 770 5 770 6 770 7 852 8 852 9 852 * 941 # 941 } array set DTMF::high { 0 1336 1 1209 2 1336 3 1477 4 1209 5 1336 6 1477 7 1209 8 1336 9 1477 * 1209 # 1477 } set DTMF::dutLength 3500 set DTMF::gap 1200 proc DTMF::dialNumber { number } { variable low variable high variable dutLength variable gap # In Europe and many other places: regsub {^\+} $number "00" number # In North America: # regsub {^+} $number "011" number # We only consider digits: regsub -all {\D} $number "" number set nList [split $number ""] snack::sound S S length [expr 5* $gap] ::snack::sound tempLow ::snack::sound temp foreach n $nList { temp flush tempLow flush tempLow filter [::snack::filter generator $low($n) 30000 0.0 sine $dutLength] temp filter [::snack::filter generator $high($n) 30000 0.0 sine $dutLength] temp mix tempLow S concatenate temp S length [expr [S length] + $gap] } # There is some strange extra beep coming up after the specified # tones. Dunno what that is, but it can be cleared by specifying # a ridculous length: S length [expr [S length] + 50*$gap] S play -command [list S destroy] temp destroy tempLow destroy } |
|
From: Bernard D. <bde...@us...> - 2004-08-24 06:01:37
|
Update of /cvsroot/tcladdressbook/Contribs/Alpha/CardBrowser/AAB In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2645/Contribs/Alpha/CardBrowser/AAB Added Files: aabMenu.tcl Log Message: First checkin --- NEW FILE: aabMenu.tcl --- alpha::menu aabMenu 0.1 Card "@" { # One-time initialization script AAB::buildMenu } { # Activation script aabMenu } { # Deactivation script } # addMenu aabMenu "@" # This proc is called every time we turn the @ menu on. # Its main effect is to ensure this code, including the # menu definition below, has been loaded. proc aabMenu {} {} menu::buildProc aabMenu AAB::buildMenu menu::buildProc Groups AAB::buildGroupsMenu # This is the definition of the @ menu, and what its items mean: set AAB::menuItems [list ] set AAB::menuItems [list \ "find" {Card::windowForFind} \ "findAnywhere" {Card::findAnywhere} \ "searchWithinResults" {Card::windowForFindWithin} \ "(-" "" \ "showAll" {AAB::showAll} \ "editCard" {Card::windowForEditRecord} \ "newCard" {Card::windowForNewRecord} \ "save" {Card::save} \ "deleteCard" {Card::delete} \ "/\\<OthisIsACompany" {AAB::thisIsACompany} \ "(-" "" \ "putAddressInClipboard" {Card::putAddressInClipboard} \ "sendEmailToThisPerson" {AAB::sendEmail} \ "separateWindowForCard" {Card::separateWindowForCard} \ "printLabelsForTheseCards" {AAB::printLabelsForTheseCards} \ "removeFromSelection" {Card::removeFromSelection} \ "(-" "" \ "addCollectionToGroup" {AAB::addCollectionToGroup} \ "addCardToGroup" {AAB::addToGroup} \ "removeCardFromGroup" {AAB::removeFromGroup} \ ] # Here we define what goes into the Groups submenu: set AAB::groups [addressbook groups] set AAB::groupNames [list ] foreach g $::AAB::groups { lappend AAB::groupNames [lindex $g 1] } # Now construct the menus: proc AAB::buildMenu {} { global aabMenu # Now we define the menu items. variable menuItems set itemList [list ] foreach {item proc} $menuItems { lappend itemList $item } lappend itemList [list Menu -n Groups -m {}] # Menu -n $aabMenu -p AAB::menuProc $itemList return [list build $itemList AAB::menuProc {Groups} $aabMenu] } proc AAB::buildGroupsMenu {} { variable groupNames set itemList [list ] foreach gName $groupNames { lappend itemList "$gName" } return [list build $itemList AAB::groupsMenuProc {}] } # Now for the procs handling menu item selection proc AAB::menuProc {menu item} { switch -- $item { thisIsACompany { thisIsACompany return } default { # Relax } } variable menuItems # dict seems to handle key-value lists alright: [dict get $menuItems $item] } proc AAB::groupsMenuProc { menu item } { variable groupNames variable groups set i [lsearch -regexp $groupNames "(?i)^$item\$"] set groupID [lindex $groups $i 0] showGroup $groupID } # menu::insert aabMenu submenu end "Groups" menu::buildSome aabMenu |
|
From: Bernard D. <bde...@us...> - 2004-08-24 06:01:00
|
Update of /cvsroot/tcladdressbook/Contribs/Alpha/CardBrowser/AAB In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2444/Contribs/Alpha/CardBrowser/AAB Added Files: AAB-Card.tcl Log Message: First checkin --- NEW FILE: AAB-Card.tcl --- package require AAB 0.2 # At this point it is assumed that the file AAB.tcl has been sourced, # creating the namespace ::AAB and defining the standard procs. unset -nocomplain AAB::staticCardParameters set AAB::staticCardParameters(keys) [list \ First Last Organization Address.home.Street Address.home.City Address.home.ZIP \ Address.home.province Address.home.state Address.home.country \ Phone.home Phone.mobile Phone.work Phone.fax Email.home Email.work \ HomePage Birthday Note \ ] set AAB::staticCardParameters(headKeys) [list First Last] set AAB::staticCardParameters(listWidth) 30 set AAB::staticCardParameters(cardWidth) 80 set AAB::staticCardParameters(cardHeight) 17 set AAB::staticCardParameters(phoneNames) \ [list "Phone (home)" "Phone (work)" "Phone (mobile)"] set AAB::staticCardParameters(searchTemplate) \ [file join $CardBrowserBetaPath CardBrowser AAB searchTemplate] source [file join $CardBrowserBetaPath CardBrowser AAB aabMenu.tcl] # # # # # Show all cards... # proc AAB::run {} { # variable _dynamicCardParameters # variable staticCardParameters # set _dynamicCardParameters(matchingUIDs) [addressbook persons -ids] # set _dynamicCardParameters(len) [llength $AAB::_dynamicCardParameters(matchingUIDs)] # set _dynamicCardParameters(matchIndex) 0 # set _dynamicCardParameters(currentCard) [addressbook getme] # set _dynamicCardParameters(entryList) [list ] # foreach uid $_dynamicCardParameters(matchingUIDs) { # set entry "" # catch { append entry "[addressbook set $uid First] " } # catch { append entry "[addressbook set $uid Last] " } # set entry [format "%-*.*s" $S(listWidth) $S(listWidth) $entry] # lappend _dynamicCardParameters(entryList) $entry # } # # # displayFirstCard AAB # } proc AAB::printCard { UID } { set M [getRecord $UID] set pKeys [keylkeys M] # set keyLength [expr {[longestEntry $::staticCardParameters(keys)] + 3}] set keyLength 20 set pad [string repeat { } $keyLength] set company 0 # Write the company flag if it exists if { ![catch { set ABPF [keylget M ABPersonFlags] }] } { if { $ABPF } { set company 1 append txt [format "%*s" 80 "COMPANY"] if { [lcontain $pKeys Organization] } { append txt \r append txt [format "%*s" $keyLength "Organization: "] append txt "[keylget M Organization]\r" } } } append txt "\r" # Write the name, if it exists if { [lsearch -regexp $pKeys (First|Last)] != -1 } { append txt [format "%*s" $keyLength "Name: "] catch { append txt "[keylget M First] " } catch { append txt "[keylget M Last]" } append txt \r\r } if { [lcontain $pKeys Address] } { set places [keylkeys M Address] # Write the addresses, if any foreach p {home work} { if { [lcontain $places $p] } { append txt [format "%*s" $keyLength "Address ($p): "] set A [keylget M Address.$p] if { [lcontain [keylkeys A] Street] } { set chunk [keylget A Street] append txt [regsub -all {[\r\n]} $chunk "\r$pad"] } append txt "\r$pad" foreach c {ZIP City Province State} { if { [lcontain [keylkeys A] $c] } { append txt [keylget A $c] " " } } if { [lcontain [keylkeys A] Country] } { append txt [keylget A Country] \r } } } } ; # end of "Address" append txt \r if { [lcontain $pKeys Phone] } { set places [keylkeys M Phone] # Write the phone numbers, if any foreach p {home mobile work fax} { if { [lcontain $places $p] } { append txt [format "%*s" $keyLength "Phone ($p): "] set ph [keylget M Phone.$p] append txt $ph append txt "\r$pad" } regsub -- "$pad$" $txt "" txt } } ; # end of "Phone" append txt \r if { [lcontain $pKeys Email] } { set places [keylkeys M Email] # Write the email addresses, if any foreach p {home work} { if { [lcontain $places $p] } { append txt [format "%*s" $keyLength "Email ($p): "] set email [keylget M Email.$p] append txt $email append txt "\r$pad" } regsub -- "$pad$" $txt "" txt } } ; # end of "Email" # Write the HomePage, if any if { [lcontain $pKeys HomePage] } { append txt [format "%*s" $keyLength "HomePage: "] set chunk [keylget M HomePage] append txt $chunk append txt "\r$pad" } ; # end of "HomePage" append txt \r # Write the birthday, if any if { [lcontain $pKeys Birthday] } { append txt [format "%*s" $keyLength "Birthday: "] append txt [keylget M Birthday] append txt "\r$pad" } ; # end of "Birthday" append txt \r # Write the groups that this person is member of, if any set groupIDs [addressbook parents $UID] if { [llength $groupIDs] } { append txt "Groups: " foreach G $groupIDs { set R [addressbook record $G] set groupName [keylget R GroupName] append txt $groupName " " } append txt "\r" } # Write the note, if any if { [lcontain $pKeys Note] } { # The following substitution is probably just a personal problem set chunk [regsub -all -- {\13} [keylget M Note] \r] append txt "Note: " append txt $chunk append txt "\r$pad" } ; # end of "Note" variable staticCardParameters set vspace [expr $staticCardParameters(cardHeight) - [regexp -all \r $txt] -1] append txt [string repeat \r $vspace] catch { append bottomline "Created: [keylget M Creation], " } catch { append bottomline "Modified: [keylget M Modification]" } catch { append txt [format "%*s" 80 $bottomline] } return $txt } proc AAB::init { args } { global aabMenu insertMenu $aabMenu } proc AAB::properClose { args } { global aabMenu removeMenu $aabMenu } Bind 'a' <P> { ::Card::run ::AAB } # source [file join $CardBrowserBetaPath AAB aabMenu.tcl] proc AAB::thisIsACompany {} { set client [Card::clientOfWindow] upvar #0 ::${client}::_dynamicCardParameters D set uid $D(currentCard) set rec [${client}::getRecord $uid] if { [lcontain [keylkeys rec] "ABPersonFlags"] && [keylget rec ABPersonFlags] } { keylset ABPFrec ABPersonFlags 0 } else { keylset ABPFrec ABPersonFlags 1 } if { [catch { ${client}::setRecord $uid $ABPFrec } err] } { error "Error saving record: $err" } Card::reloadCurrentCard ::AAB } proc Card::putAddressInClipboard {} { if { ![string equal [clientOfWindow] "::AAB"] } { return } putScrap [::AAB::formatAddress [currentCard ::AAB]] status::msg "Address put in the Clipboard" } proc AAB::printLabelsForTheseCards {} { set client [clientOfWindow] if { ![string equal $client "::AAB"] } { return } upvar #0 ::${client}::_dynamicCardParameters D foreach uid $D(matchingUIDs) { if { [catch {append txt [::AAB::formatAddress $uid]}] } { set name [string trim [Card::_headKeyIncludingSpacePadding ::AAB $uid]] alertnote "No address found for $name" } append txt "\r\r" } new -n Labels insertText $txt goto [minPos] } proc AAB::addCollectionToGroup {} { if { ![string equal [::Card::clientOfWindow] "::AAB"] } { return } set groups [addressbook groups] foreach G $groups { lappend groupNames [lindex $G 1] } if { [catch {set i [listpick -p "Add collection to which group?" \ -indices $groupNames]}] } { return } # Remove this when the -indices flag works: set i [lsearch -exact $groupNames $i] upvar #0 ::AAB::_dynamicCardParameters D foreach uid $D(matchingUIDs) { addressbook add [lindex $groups $i 0] $uid } addressbook save Card::displayCollection ::AAB $D(matchingUIDs) -sort } # When addressbook parents learns to return also the name, then # the following must be adjusted... proc AAB::removeFromGroup {} { if { ![string equal [::Card::clientOfWindow] "::AAB"] } { return } set UID [::Card::currentCard ::AAB] set groups [addressbook parents $UID] if { [llength $groups] == 0 } { status::msg "No member of any group" return } elseif { [llength $groups] == 1 } { addressbook remove [lindex $groups 0] $UID } else { set groupNames [list ] foreach G $groups { lappend groupNames [addressbook set $G GroupName] } if { [catch {set i [listpick -p "Remove card from which group?" \ -indices $groupNames]}] } { return } # Remove this when the -indices flag works: set i [lsearch -exact $groupNames $i] addressbook remove [lindex $groups $i] $UID } addressbook save Card::reloadCurrentCard ::AAB } proc AAB::showGroup { {groupID "" } } { # if { ![string equal [::Card::clientOfWindow] "::AAB"] } { # return # } if { ![string length $groupID] } { set groups [addressbook groups] foreach G $groups { lappend groupNames [lindex $G 1] } if { [catch {set i [listpick -p "Pick a group:" \ -indices $groupNames]}] } { return } # Remove this when the -indices flag works: set i [lsearch -exact $groupNames $i] set groupID [lindex $groups $i 0] } # Card::displayCollection ::AAB [addressbook persons -ingroup -ids $groupID] Card::displayCollection ::AAB [allPersonsInGroupRecursively $groupID] } proc AAB::allPersonsInGroupRecursively { groupID } { set res [addressbook persons -ingroup -ids $groupID] foreach childGroup [addressbook groups -ingroup -ids $groupID] { set res [concat $res [allPersonsInGroupRecursively $childGroup]] } return $res } proc AAB::showAll {} { ::Card::displayCollection ::AAB [listAllRecords] } proc AAB::newGroup {} { if { [catch { set str [prompt "Name for new group: " ""] } ] } { return } variable groups [addressbook groups] variable groupNames [list ] foreach G $groups { lappend groupNames [lindex $G 1] } if { [lcontain $groupNames $str] } { alertnote "Group name \'$str\' already taken. Please give a new name." newGroup return } if { [catch {set parent [listpick -p "Make group \'$str\' a subgroup of another group?:" \ -indices $groupNames]}] } { set cmd [list addressbook create group $str] } else { set i [lsearch -exact $groupNames $parent] set cmd [list addressbook create group $str -ingroup [lindex $groups $i 0]] } eval $cmd addressbook save set groups [addressbook groups] set groupNames [list ] foreach g $groups { lappend groupNames [lindex $g 1] } # Rebuild the Groups menu menu::buildSome Groups } proc AAB::sendEmail {} { set uid [Card::currentCard :AAB] set R [getRecord $uid] set emailList [keylget R Email] set places [keylkeys emailList] if { [llength $places] == 0 } { status::msg "No email address found" } elseif { [llength $places] == 1 } { set place [lindex $places 0] set email [keylget emailList $place] } else { if { [catch {set placeEmail [listpick -p "Which email address to use?:" \ $emailList]}] } { return } set email [lindex $placeEmail 1] } Card::sendEmail $email } |