sync with sylpheed 0.6.2cvs8
authorPaul Mangan <paul@claws-mail.org>
Sun, 30 Sep 2001 11:07:34 +0000 (11:07 +0000)
committerPaul Mangan <paul@claws-mail.org>
Sun, 30 Sep 2001 11:07:34 +0000 (11:07 +0000)
47 files changed:
ChangeLog
ChangeLog.claws
ChangeLog.jp
NEWS
README
README.jp
configure.in
src/addrbook.c
src/addrbook.h
src/addrcache.c
src/addrcache.h
src/addressadd.c
src/addressadd.h
src/addressbook.c
src/addressbook.h
src/addressitem.h
src/addrindex.c
src/editaddress.c
src/editaddress.h
src/editbook.c
src/editbook.h
src/editgroup.c
src/editgroup.h
src/editjpilot.c
src/editjpilot.h
src/editldap.c
src/editldap.h
src/editldap_basedn.c
src/editldap_basedn.h
src/editvcard.c
src/editvcard.h
src/imap.c
src/jpilot.c
src/jpilot.h
src/message_search.c
src/messageview.c
src/messageview.h
src/mgutils.c
src/mgutils.h
src/procmime.c
src/summary_search.c
src/syldap.c
src/syldap.h
src/textview.c
src/textview.h
src/vcard.c
src/vcard.h

index 6a285fa..8f0777d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,37 @@
+2001-09-30
+
+       * src/textview.[ch]: added textview_set_position().
+       * src/messageview.[ch]: added messageview_set_position().
+       * src/addrbook.c
+         src/addrcache.c
+         src/addressadd.c
+         src/addressbook.c
+         src/addrindex.c
+         src/addritem.c
+         src/editaddress.c
+         src/editbook.c
+         src/editgroup.c
+         src/editjpilot.c
+         src/editldap.c
+         src/editldap_basedn.c
+         src/editvcard.c
+         src/jpilot.c
+         src/mgutils.c
+         src/syldap.c
+         src/vcard.c: converted C++-style comments into C-style one.
+       * src/imap.c: QUOTE_IF_REQUIRED(): new macro. Copy string into
+         new buffer and quote with double quotes if required.
+         imap_status(), imap_cmd_login(), imap_cmd_list(),
+         imap_cmd_do_select(), imap_cmd_create(), imap_cmd_delete(),
+         imap_cmd_copy(): use QUOTE_IF_REQUIRED().
+
+2001-09-30
+
+       * src/textview.[ch]: textview_search_string_backward(): new.
+         Add the new member cur_pos to TextView.
+         Connect button_press_event with gtk_signal_connect_after() to
+         obtain the correct editable position.
+
 2001-09-27
 
        * src/folder.c: folder_write_list_recursive(): preserve unthreaded
index 35a17ac..ab683fc 100644 (file)
@@ -1,3 +1,21 @@
+2001-09-30 [paul]      0.6.2claws12
+
+       * po/de.po, po/es.po, po/fr.po, po/nl.po, po/pt_BR.po
+               updated translations
+
+       * po/POTFILES.in
+               add 'src/importldif.c'
+
+       * AUTHORS, tools/README, tools/eud2gc.py, tools/Makefile.am
+               added eudora-to-vCard conversion tool
+               submitted by Jeroen Versteeg <j.m.versteeg@student.utwente.nl>
+
+       * sync with sylpheed 0.6.2cvs8
+
+2001-09-30 [paul]
+
+       * sylpheed-0.6.2claws released
+
 2001-09-27 [melvin]    0.6.2claws11
 
        * src/gtkspell.c
index aa0b62c..ef43977 100644 (file)
@@ -1,3 +1,37 @@
+2001-09-30
+
+       * src/textview.[ch]: textview_set_position() ¤òÄɲá£
+       * src/messageview.[ch]: messageview_set_position() ¤òÄɲá£
+       * src/addrbook.c
+         src/addrcache.c
+         src/addressadd.c
+         src/addressbook.c
+         src/addrindex.c
+         src/addritem.c
+         src/editaddress.c
+         src/editbook.c
+         src/editgroup.c
+         src/editjpilot.c
+         src/editldap.c
+         src/editldap_basedn.c
+         src/editvcard.c
+         src/jpilot.c
+         src/mgutils.c
+         src/syldap.c
+         src/vcard.c: C++ ¥¹¥¿¥¤¥ë¤Î¥³¥á¥ó¥È¤ò C ¥¹¥¿¥¤¥ë¤ËÊÑ´¹¡£
+       * src/imap.c: QUOTE_IF_REQUIRED(): ¿·µ¬¥Þ¥¯¥í¡£Ê¸»úÎó¤ò¿·µ¬
+         ¥Ð¥Ã¥Õ¥¡¤Ë¥³¥Ô¡¼¤·¡¢É¬Íפʤé¥À¥Ö¥ë¥¯¥©¡¼¥È¤Ç³ç¤ë¡£
+         imap_status(), imap_cmd_login(), imap_cmd_list(),
+         imap_cmd_do_select(), imap_cmd_create(), imap_cmd_delete(),
+         imap_cmd_copy(): QUOTE_IF_REQUIRED() ¤ò»ÈÍÑ¡£
+
+2001-09-30
+
+       * src/textview.[ch]: textview_search_string_backward(): ¿·µ¬¡£
+         ¿·µ¬¥á¥ó¥Ð cur_pos ¤ò TextView ¤ËÄɲá£
+         Àµ¤·¤¤ editable ¤Î°ÌÃÖ¤òÆÀ¤ë¤¿¤á¤Ë button_press_event ¤ò
+         gtk_signal_connect_after() ¤ÇÀܳ¡£
+
 2001-09-27
 
        * src/folder.c: folder_write_list_recursive(): ¥¹¥ì¥Ã¥É²ò½ü¤Î¾õÂÖ
diff --git a/NEWS b/NEWS
index 2e3616f..00d88f9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,7 +3,7 @@ Changes of Sylpheed
 * 0.6.2
 
     * The new addressbook has been implemented (Match Grun).
-    * LDAP, VCard, and JPilot have been supported.
+    * LDAP, vCard, and JPilot have been supported.
     * The option to launch the external editor automatically has been added.
     * Sorting by mark, unread, attachment, and color label has been enabled.
     * Moving to the next or previous flagged messages has been enabled.
diff --git a/README b/README
index 93d946f..50bbb31 100644 (file)
--- a/README
+++ b/README
@@ -33,7 +33,8 @@ X Window System, and aiming for
 The appearance and interface are similar to some popular e-mail clients for
 Windows, such as Outlook Express, Becky!, and Datula. The interface is also
 designed to emulate the mailers on Emacsen, and almost all commands are
-accessible with the keyboard.
+accessible with the keyboard. You'll figure out the usage if you have ever
+used some e-mail clients for Windows, or Mew or Wanderlust.
 
 The messages are managed by MH format, and you'll be able to use it together
 with another mailer based on MH format (like Mew). You can also utilize
@@ -42,40 +43,40 @@ imget).
 
 Currently implemented features are:
 
-       o user-friendly and intuitive interface
-       o 3-paned view like many Windoze-based mail client
-       o ability of keyboard-only operation
-       o Mew/Wanderlust-like key bind (most of normally used keys have been
-         implemented)
+       o POP3 support
        o IMAP4rev1 support
-       o multipart MIME
+       o integrated NetNews client
+       o unlimited multiple account handling
+       o thread display
+       o filtering
+       o MIME (attachments)
        o built-in image view
        o X-Face support
+       o multiple MH folder support
+       o mbox importing / exporting
        o external editor support
-       o unlimited multiple account handling
        o message queueing
-       o filtering
+       o automatic mail checking
        o draft message function
        o line-wrapping
+       o clickable URI
        o XML-based address book
-       o APOP support
-       o unread message management
-       o multiple MH folder support
-       o integrated NetNews client
+       o LDAP, vCard, and JPilot support
+       o newly arrived and unread message management
+       o Mew/Wanderlust-like key bind
+       o printing
+       o APOP authentication support
+       o SMTP AUTH support
+       o SSL support (POP3, SMTP, IMAP4rev1)
        o IPv6 support
-       o GnuPG support (currently implementing)
-       o multithread support (experimental)
-       o mbox importing / exporting
        o drag & drop (partially implemented)
-       o fast thread display
-       o high-speed message processing
-       o lightweight resource usage
-       o easily customizable configuration
-       o supports automake + autoconf, and internationalization of message
-         by gettext
-
-You'll figure out the usage if you have used a mailer on Windows, or
-Mew or Wanderlust.
+       o GnuPG support (currently implementing)
+       o automake + autoconf support
+       o internationalization of messages by gettext
+       o support of many code sets, including UTF-8 (Unicode) (when using
+         libjconv)
+
+and more.
 
 Installation
 ============
index dcd9861..0eba7d7 100644 (file)
--- a/README.jp
+++ b/README.jp
@@ -40,7 +40,7 @@
 What's Sylpheed
 ===============
 
-Sylpheed¤ÏGTK+¤ò»ÈÍѤ·¤¿¡¢X Window System¾å¤ÇÆ°ºî¤¹¤ë
+Sylpheed ¤Ï GTK+ ¤ò»ÈÍѤ·¤¿¡¢ X Window System ¾å¤ÇÆ°ºî¤¹¤ë
 
   * ·Ú²÷¤ÊÆ°ºî
   * Èþ¤·¤¯¡¢ÀöÎý¤µ¤ì¤¿¥¤¥ó¥¿¥Õ¥§¡¼¥¹
@@ -49,49 +49,51 @@ Sylpheed
 
 ¤òÌܻؤ·¤¿ÅŻҥ᡼¥ë¥¯¥é¥¤¥¢¥ó¥È(& ¥Ë¥å¡¼¥¹¥ê¡¼¥À¡¼)¤Ç¤¹¡£
 
-³°´Ñ¤ä¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ÏOutlook Express¡¢Becky!¡¢Datula¤È¤¤¤Ã¤¿¡¢ Windows¤Ç
-¤ÏÄêÈ֤Υ᡼¥é¤ò»²¹Í¤Ë¤·¤Æ¤¤¤Þ¤¹¡£¤Þ¤¿¡¢Áàºî·Ï¤ÏMew¤äWanderlustÅù¤Î Emacs
-·Ï¥á¡¼¥é¤ò»²¹Í¤Ë¤·¤Æ¤¤¤Æ¡¢¥­¡¼¥Ü¡¼¥É¤Î¤ß¤Ë¤è¤ëÁàºî¤¬²Äǽ¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
+³°´Ñ¤ä¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Ï Outlook Express ¡¢ Becky! ¡¢ Datula ¤È¤¤¤Ã¤¿¡¢
+Windows ¤Ç¤ÏÄêÈ֤Υ᡼¥é¤ò»²¹Í¤Ë¤·¤Æ¤¤¤Þ¤¹¡£¤Þ¤¿¡¢Áàºî·Ï¤Ï Mew ¤ä
+Wanderlust Åù¤Î Emacs ·Ï¥á¡¼¥é¤ò»²¹Í¤Ë¤·¤Æ¤ª¤ê¡¢¥­¡¼¥Ü¡¼¥É¤Î¤ß¤Ë¤è¤ëÁàºî
+¤¬²Äǽ¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£ Windows ¾å¤Î¥á¡¼¥é¡¢¤¢¤ë¤¤¤Ï Mew ¤ä Wanderlust Åù
+¤Î»ÈÍѷи³¤¬¤¢¤ì¤Ð¤¹¤°¤Ë»È¤¤Êý¤Ïʬ¤«¤ë¤È»×¤¤¤Þ¤¹¡£
 
-¥á¥Ã¥»¡¼¥¸¤ÏMH·Á¼°¤Ç´ÉÍý¤·¤Æ¤ª¤ê¡¢Â¾¤ÎMH·Á¼°¤ò»ÈÍѤ·¤¿¥á¡¼¥é(MewÅù)¤ÈÊ»ÍÑ
¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡£¤Þ¤¿¡¢fetchmail¤äprocmail¤òÍøÍѤ·¤¿¤ê¡¢¼õ¿®¤Ë³°Éô
-¥×¥í¥°¥é¥à(inc, imgetÅù)¤ò»ÈÍѤ¹¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£
+¥á¥Ã¥»¡¼¥¸¤Ï MH ·Á¼°¤Ç´ÉÍý¤·¤Æ¤ª¤ê¡¢Â¾¤Î MH ·Á¼°¤ò»ÈÍѤ·¤¿¥á¡¼¥é(Mew Åù)
ÈÊ»ÍѤ¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡£¤Þ¤¿¡¢ fetchmail ¤ä procmail ¤òÍøÍѤ·¤¿¤ê¡¢¼õ¿®
+¤Ë³°Éô¥×¥í¥°¥é¥à(inc, imget Åù)¤ò»ÈÍѤ¹¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£
 
 ¸½ºß¼ÂÁõ¤µ¤ì¤Æ¤¤¤ëµ¡Ç½¤Ï
 
-       o ¥æ¡¼¥¶¥Õ¥ì¥ó¥É¥ê¤Çľ´ÑŪ¤Ê¥¤¥ó¥¿¥Õ¥§¡¼¥¹
-       o Windoze ¾å¤Î¥á¡¼¥ë¥¯¥é¥¤¥¢¥ó¥È¤Ë¤è¤¯¤¢¤ë3¤Ú¥¤¥óɽ¼¨
-       o ¥­¡¼¥Ü¡¼¥É¤Î¤ß¤Ë¤è¤ëÁàºî¤¬²Äǽ
-       o Mew/Wanderlust ¥é¥¤¥¯¤Ê¥­¡¼¥Ð¥¤¥ó¥É (Ä̾ï»È¤ï¤ì¤ë¥­¡¼¤ÎÂçÉôʬ¤Ï
-         ¼ÂÁõºÑ)
+       o POP3 Âбþ
        o IMAP4rev1 Âбþ
-       o ¥Þ¥ë¥Á¥Ñ¡¼¥È MIME
+       o Åý¹ç NetNews ¥¯¥é¥¤¥¢¥ó¥È
+       o ÌµÀ©¸Â¤ÎÊ£¿ô¥¢¥«¥¦¥ó¥È´ÉÍý
+       o ¥¹¥ì¥Ã¥Éɽ¼¨
+       o ¿¶¤êʬ¤±µ¡Ç½
+       o MIME (źÉÕ)
        o ²èÁüɽ¼¨µ¡Ç½¤òÆâ¢
        o X-Face Âбþ
+       o Ê£¿ô¤Î MH ¥Õ¥©¥ë¥À¤ËÂбþ
+       o mbox ¥Õ¥¡¥¤¥ë¤Î¥¤¥ó¥Ý¡¼¥È / ¥¨¥¯¥¹¥Ý¡¼¥È
        o ³°Éô¥¨¥Ç¥£¥¿Âбþ
-       o ÌµÀ©¸Â¤ÎÊ£¿ô¥¢¥«¥¦¥ó¥È´ÉÍý
-       o ¥á¥Ã¥»¡¼¥¸¤ÎÁ÷¿®ÂÔµ¡µ¡Ç½
-       o ¿¶¤êʬ¤±µ¡Ç½
+       o Á÷¿®ÂÔµ¡µ¡Ç½
+       o ¼«Æ°¥á¡¼¥ë¥Á¥§¥Ã¥¯µ¡Ç½
        o Áð¹Æµ¡Ç½
        o ¼«Æ°²þ¹Ôµ¡Ç½
+       o ¥¯¥ê¥Ã¥«¥Ö¥ë URI
        o XML ¥Ù¡¼¥¹¤Î¥¢¥É¥ì¥¹Ä¢
-       o APOP Âбþ
-       o Ì¤ÆÉ¥á¥Ã¥»¡¼¥¸´ÉÍý
-       o Ê£¿ô¤Î MH ¥Õ¥©¥ë¥À¤ËÂбþ
-       o Åý¹ç NetNews ¥¯¥é¥¤¥¢¥ó¥È
+       o LDAP, vCard, JPilot Âбþ
+       o ¿·Ã塦̤ÆÉ´ÉÍý
+       o Mew/Wanderlust ¥é¥¤¥¯¤Ê¥­¡¼¥Ð¥¤¥ó¥É
+       o °õºþµ¡Ç½
+       o APOP Ç§¾ÚÂбþ
+       o SMTP AUTH Âбþ
+       o SSL Âбþ (POP3, SMTP, IMAP4rev1)
        o IPv6 Âбþ
-       o GnuPG Âбþ (¸½ºß¼ÂÁõÃæ)
-       o ¥Þ¥ë¥Á¥¹¥ì¥Ã¥ÉÂбþ (¼Â¸³Åª)
-       o mbox ¥Õ¥¡¥¤¥ë¤Î¥¤¥ó¥Ý¡¼¥È / ¥¨¥¯¥¹¥Ý¡¼¥È
        o ¥É¥é¥Ã¥° & ¥É¥í¥Ã¥× (°ìÉô¼ÂÁõ)
-       o ¹â®¤Ê¥¹¥ì¥Ã¥Éɽ¼¨
-       o ¹â®¤Ê¥á¥Ã¥»¡¼¥¸½èÍý
-       o Äã¾ÃÈñ¥ê¥½¡¼¥¹
-       o Íưפ˥«¥¹¥¿¥Þ¥¤¥º¤Ç¤­¤ëÀßÄê
-       o automake + autoconf ¤È gettext ¤Ë¤è¤ë¥á¥Ã¥»¡¼¥¸¤Î¹ñºÝ²½¤ËÂбþ
-
-Windows ¾å¤Î¥á¡¼¥é¡¢¤¢¤ë¤¤¤Ï Mew ¤ä Wanderlust ¤ò»ÈÍѤ·¤¿¤³¤È¤Î¤¢¤ë¿Í¤Ê¤é
-¤¹¤°¤Ë»È¤¤Êý¤Ïʬ¤«¤ë¤È»×¤¤¤Þ¤¹¡£
+       o GnuPG Âбþ (¸½ºß¼ÂÁõÃæ)
+       o automake + autoconf Âбþ
+       o gettext ¤Ë¤è¤ë¥á¥Ã¥»¡¼¥¸¤Î¹ñºÝ²½Âбþ
+       o UTF-8 (Unicode) ¤ò´Þ¤à¿¿ô¤Î¥³¡¼¥É¥»¥Ã¥È¤ËÂбþ(libjconv »ÈÍÑ»þ)
+
+Åù¤Ç¤¹¡£
 
 ¥¤¥ó¥¹¥È¡¼¥ëÊýË¡
 ================
index b24e752..d582123 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=6
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws11
+EXTRA_VERSION=claws12
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
index 8f1e96d..09bb736 100644 (file)
@@ -342,7 +342,7 @@ ItemEMail *addrbook_person_remove_email( AddressBookFile *book, ItemPerson *pers
 #define AB_ELTAG_GROUP           "group"
 #define AB_ELTAG_FOLDER          "folder"
 
-// Attribute tag names
+/* Attribute tag names */
 #define AB_ATTAG_TYPE            "type"
 #define AB_ATTAG_UID             "uid"
 #define AB_ATTAG_NAME            "name"
@@ -2053,6 +2053,9 @@ static gboolean addrbook_chkread_tree( AddressBookFile *book, XMLFile *file ) {
                        longjmp( book->jumper, 1 );
                }
                /* Get next tag (person, group or folder) */
+               if( xml_parse_next_tag( file ) ) {
+                       longjmp( book->jumper, 1 );
+               }
                if( xml_compare_tag( file, AB_ELTAG_PERSON ) ) {
                        addrbook_chkparse_person( book, file );
                }
@@ -2062,6 +2065,10 @@ static gboolean addrbook_chkread_tree( AddressBookFile *book, XMLFile *file ) {
                else if( xml_compare_tag( file, AB_ELTAG_FOLDER ) ) {
                        addrbook_chkparse_folder( book, file );
                }
+               else {
+                       /* Item not recognized */
+                       retVal = FALSE;
+               }
        }
        return retVal;
 }
index 4882f57..1902be5 100644 (file)
@@ -31,8 +31,9 @@
 #include "addritem.h"
 #include "addrcache.h"
 
-// Address book file.
+/* Address book file */
 typedef struct _AddressBookFile AddressBookFile;
+
 struct _AddressBookFile {
        gchar *name;
        gchar *path;
@@ -49,7 +50,7 @@ struct _AddressBookFile {
        jmp_buf jumper;
 };
 
-// Function prototypes
+/* Function prototypes */
 
 AddressBookFile *addrbook_create_book  ( void );
 void addrbook_empty_book               ( AddressBookFile *book );
@@ -111,9 +112,3 @@ ItemPerson *addrbook_add_contact    ( AddressBookFile *book, ItemFolder *folder,
                                          const gchar *remarks );
 
 #endif /* __ADDRBOOK_H__ */
-
-/*
-* End of Source.
-*/
-
-
index 7b47b38..04b1670 100644 (file)
@@ -714,13 +714,13 @@ ItemPerson *addrcache_remove_person_id( AddressCache *cache, const gchar *uid )
        obj = ( AddrItemObject * ) g_hash_table_lookup( cache->itemHash, uid );
        if( obj ) {
                if( ADDRITEM_TYPE(obj) == ITEMTYPE_PERSON ) {
-                       /* Remove person's email addresses from all groups where
-                          referenced and from hash table. */
+                       /* Remove person's email addresses from all groups where */
+                       /* referenced and from hash table. */
                        ItemPerson *person = ( ItemPerson * ) obj;
                        ItemFolder *parent = ( ItemFolder * ) ADDRITEM_PARENT(person);
                        if( ! parent ) parent = cache->rootFolder;
-                       /* Remove emails from groups, remove from parent's list
-                          and hash table */
+                       /* Remove emails from groups, remove from parent's list */
+                       /* and hash table */
                        addrcache_foldergrp_rem_person( parent, person );
                        parent->listPerson = g_list_remove( parent->listPerson, person );
                        g_hash_table_remove( cache->itemHash, uid );
@@ -746,8 +746,8 @@ ItemPerson *addrcache_remove_person( AddressCache *cache, ItemPerson *person ) {
                obj = ( AddrItemObject * ) g_hash_table_lookup( cache->itemHash, uid );
                if( obj ) {
                        if( ADDRITEM_TYPE(obj) == ITEMTYPE_PERSON ) {
-                               /* Remove person's email addresses from all groups where
-                                  referenced and from hash table. */
+                               /* Remove person's email addresses from all groups where */
+                               /* referenced and from hash table. */
                                ItemFolder *parent = ( ItemFolder * ) ADDRITEM_PARENT(person);
                                if( ! parent ) parent = cache->rootFolder;
                                addrcache_foldergrp_rem_person( parent, person );
@@ -1020,7 +1020,7 @@ ItemFolder *addrcache_find_root_folder( ItemFolder *folder ) {
 }
 
 /*
-* Get all persons visitor function.
+* Get all person visitor function.
 */
 static void addrcache_get_all_persons_vis( gpointer key, gpointer value, gpointer data ) {
        AddrItemObject *obj = ( AddrItemObject * ) value;
index 7815667..46a0264 100644 (file)
@@ -29,8 +29,9 @@
 #include <glib.h>
 #include "addritem.h"
 
-/* Address book file. */
+/* Address cache */
 typedef struct _AddressCache AddressCache;
+
 struct _AddressCache {
        gint       nextID;
        gboolean   dataRead;
@@ -120,8 +121,3 @@ ItemPerson *addrcache_add_contact           ( AddressCache *cache, ItemFolder *folder,
                                                  const gchar *remarks ); 
 
 #endif /* __ADDRCACHE_H__ */
-
-/*
-* End of Source.
-*/
-
index 353f3f6..5eb7d07 100644 (file)
@@ -132,7 +132,7 @@ static void addressadd_folder_select( GtkCTree *ctree, gint row, gint column,
 static void addressadd_tree_button( GtkCTree *ctree, GdkEventButton *event, gpointer data ) {
        if( ! event ) return;
        if( event->button == 1 ) {
-               // Handle double click
+               /* Handle double click */
                if( event->type == GDK_2BUTTON_PRESS ) {
                        addressadd_cancelled = FALSE;
                        gtk_main_quit();
@@ -180,7 +180,7 @@ static void addressadd_create( void ) {
        gtk_table_set_row_spacings(GTK_TABLE(table), 8);
        gtk_table_set_col_spacings(GTK_TABLE(table), 8);
 
-       // First row
+       /* First row */
        top = 0;
        label = gtk_label_new(_("Name"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -190,7 +190,7 @@ static void addressadd_create( void ) {
        gtk_table_attach(GTK_TABLE(table), label_name, 1, 2, top, (top + 1), GTK_FILL, 0, 0, 0);
        gtk_misc_set_alignment(GTK_MISC(label_name), 0, 0.5);
 
-       // Second row
+       /* Second row */
        top = 1;
        label = gtk_label_new(_("Address"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -200,7 +200,7 @@ static void addressadd_create( void ) {
        gtk_table_attach(GTK_TABLE(table), label_addr, 1, 2, top, (top + 1), GTK_FILL, 0, 0, 0);
        gtk_misc_set_alignment(GTK_MISC(label_addr), 0, 0.5);
 
-       // Third row
+       /* Third row */
        top = 2;
        label = gtk_label_new(_("Remarks"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -210,7 +210,7 @@ static void addressadd_create( void ) {
        gtk_table_attach(GTK_TABLE(table), label_rems, 1, 2, top, (top + 1), GTK_FILL, 0, 0, 0);
        gtk_misc_set_alignment(GTK_MISC(label_rems), 0, 0.5);
 
-       // Address book/folder tree
+       /* Address book/folder tree */
        vlbox = gtk_vbox_new(FALSE, 8);
        gtk_box_pack_start(GTK_BOX(vbox), vlbox, TRUE, TRUE, 0);
        gtk_container_set_border_width( GTK_CONTAINER(vlbox), 8 );
@@ -231,13 +231,13 @@ static void addressadd_create( void ) {
        gtk_ctree_set_indent( GTK_CTREE(tree_folder), CTREE_INDENT );
        gtk_clist_set_auto_sort( GTK_CLIST(tree_folder), TRUE );
 
-       // Status line
+       /* Status line */
        hsbox = gtk_hbox_new(FALSE, 0);
        gtk_box_pack_end(GTK_BOX(vbox), hsbox, FALSE, FALSE, BORDER_WIDTH);
        statusbar = gtk_statusbar_new();
        gtk_box_pack_start(GTK_BOX(hsbox), statusbar, TRUE, TRUE, BORDER_WIDTH);
 
-       // Button panel
+       /* Button panel */
        gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
                                &cancel_btn, _("Cancel"), NULL, NULL);
        gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
@@ -323,12 +323,12 @@ static void addressadd_load_data( AddressIndex *addrIndex ) {
                                ds = nodeDS->data;
                                dsName = g_strdup( addrindex_ds_get_name( ds ) );
 
-                               // Read address book
+                               /* Read address book */
                                if( ! addrindex_ds_get_read_flag( ds ) ) {
                                        addrindex_ds_read_data( ds );
                                }
 
-                               // Add node for address book
+                               /* Add node for address book */
                                abf = ds->rawDataSource;
                                name = &dsName;
                                node = gtk_ctree_insert_node( tree, NULL, NULL,
index 20e90fc..9206bf9 100644 (file)
 
 #include "addrindex.h"
 
-// Function prototypes
 gboolean addressadd_selection( AddressIndex *addrIndex, const gchar *name, const gchar *address, const gchar *remarks );
 
 #endif /* __ADDRESS_ADD_H__ */
-
-/*
-* End of Source.
-*/
-
index 6f56f60..7e0a7d3 100644 (file)
@@ -286,10 +286,10 @@ static GtkCTreeNode *addressbook_node_add_folder
 static GtkCTreeNode *addressbook_node_add_group (GtkCTreeNode  *node,
                                                AddressDataSource *ds,
                                                ItemGroup       *itemGroup);
-/* static GtkCTreeNode *addressbook_node_add_category
-                                               (GtkCTreeNode   *node,
-                                                AddressDataSource *ds,
-                                                ItemFolder     *itemFolder );  */
+/* static GtkCTreeNode *addressbook_node_add_category */
+/*                                             (GtkCTreeNode   *node, */
+/*                                              AddressDataSource *ds, */
+/*                                              ItemFolder     *itemFolder); */
 static void addressbook_tree_remove_children   (GtkCTree       *ctree,
                                                GtkCTreeNode    *parent);
 static void addressbook_move_nodes_up          (GtkCTree       *ctree,
@@ -305,8 +305,8 @@ static void key_pressed                             (GtkWidget      *widget,
 static gint addressbook_list_compare_func      (GtkCList       *clist,
                                                 gconstpointer   ptr1,
                                                 gconstpointer   ptr2);
-/* static gint addressbook_obj_name_compare    (gconstpointer   a,
-                                                gconstpointer   b);  */
+/* static gint addressbook_obj_name_compare    (gconstpointer   a, */
+/*                                              gconstpointer   b); */
 
 static void addressbook_book_show_message      (AddressBookFile *book);
 static void addressbook_vcard_show_message     (VCardFile *vcf);
@@ -375,6 +375,12 @@ static GtkItemFactoryEntry addressbook_entries[] =
        {N_("/_Edit/C_ut"),             "<ctl>X",       NULL,                           0, NULL},
        {N_("/_Edit/_Copy"),            "<ctl>C",       NULL,                           0, NULL},
        {N_("/_Edit/_Paste"),           "<ctl>V",       NULL,                           0, NULL},
+       {N_("/_Tools"),                 NULL,           NULL, 0, "<Branch>"},
+       {N_("/_Tools/Import _Mozilla"), NULL,           NULL,                           0, NULL},
+       {N_("/_Tools/Import _V-Card"),  NULL,           NULL,                           0, NULL},
+       {N_("/_Tools/---"),             NULL,           NULL, 0, "<Separator>"},
+       {N_("/_Tools/Export _LDIF"),    NULL,           NULL,                           0, NULL},
+       {N_("/_Tools/Export V-_Card"),  NULL,           NULL,                           0, NULL},
 */
 
 static GtkItemFactoryEntry addressbook_tree_popup_entries[] =
@@ -858,7 +864,7 @@ static void addressbook_del_clicked(GtkButton *button, gpointer data)
                                        addritem_free_item_group( item );
                                        item = NULL;
                                }
-                               /* Remove group from parent node  */
+                               /* Remove group from parent node */
                                gtk_ctree_remove_node( ctree, nd );
                        }
                        else if( aio->type == ADDR_ITEM_PERSON ) {
@@ -1066,7 +1072,7 @@ static void addressbook_menuitem_set_sensitive( AddressObject *obj, GtkCTreeNode
 
        if( addrbook.listSelected == NULL ) canEdit = FALSE;
 
-       /* Enable add  */
+       /* Enable add */
        menu_set_sensitive( addrbook.menu_factory, "/Address/New Address", editAddress );
        menu_set_sensitive( addrbook.menu_factory, "/Address/New Group",   canAdd );
        menu_set_sensitive( addrbook.menu_factory, "/Address/New Folder",  canAdd );
@@ -1101,7 +1107,7 @@ static void addressbook_tree_selected(GtkCTree *ctree, GtkCTreeNode *node,
        addrbook.opened = node;
 
        if( obj->type == ADDR_DATASOURCE ) {
-               /*  Read from file */
+               /* Read from file */
                static gboolean tVal = TRUE;
 
                ads = ADAPTER_DSOURCE(obj);
@@ -1137,7 +1143,7 @@ static void addressbook_tree_selected(GtkCTree *ctree, GtkCTreeNode *node,
                }
        }
 
-       /* Update address list  */
+       /* Update address list */
        addressbook_set_clist( obj );
 
        /* Setup main menu selections */
@@ -1640,7 +1646,7 @@ static void addressbook_treenode_delete_cb(gpointer data, guint action,
                if( ds == NULL ) return;
        }
        else {
-               /* Must be folder or something else  */
+               /* Must be folder or something else */
                ds = addressbook_find_datasource( node );
                if( ds == NULL ) return;
 
@@ -1668,7 +1674,7 @@ static void addressbook_treenode_delete_cb(gpointer data, guint action,
 
        /* Proceed with deletion */
        if( obj->type == ADDR_DATASOURCE ) {
-               /* Remove data source */
+               /* Remove data source. */
                if( addrindex_index_remove_datasource( _addressIndex_, ds ) ) {
                        addressbook_free_child_adapters( node );
                        remFlag = TRUE;
@@ -1744,7 +1750,7 @@ static void addressbook_new_address_cb( gpointer data, guint action, GtkWidget *
                }
        }
        else if( pobj->type == ADDR_ITEM_FOLDER ) {
-               /* New address  */
+               /* New address */
                ItemFolder *folder = ADAPTER_FOLDER(pobj)->itemFolder;
                ItemPerson *person = addressbook_edit_person( abf, folder, NULL, FALSE );
                if( person ) {
@@ -1851,7 +1857,7 @@ static void addressbook_edit_address_cb( gpointer data, guint action, GtkWidget
                ItemPerson *person;
                if( email == NULL ) return;
                if( pobj && pobj->type == ADDR_ITEM_GROUP ) {
-                       /* Edit parent group  */
+                       /* Edit parent group */
                        AdapterGroup *adapter = ADAPTER_GROUP(pobj);
                        ItemGroup *itemGrp = adapter->itemGroup;
                        if( addressbook_edit_group( abf, NULL, itemGrp ) == NULL ) return;
@@ -1979,7 +1985,7 @@ static void addressbook_folder_load_person( GtkCTree *clist, ItemFolder *itemFol
        if( atci == NULL ) return;
        if( atciMail == NULL ) return;
 
-       /* Load email addresses  */
+       /* Load email addresses */
        items = addritem_folder_get_person_list( itemFolder );
        for( ; items != NULL; items = g_list_next( items ) ) {
                GtkCTreeNode *nodePerson = NULL;
@@ -2005,7 +2011,7 @@ static void addressbook_folder_load_person( GtkCTree *clist, ItemFolder *itemFol
                        eMailAddr = ADDRITEM_NAME(email);
                        if( *eMailAddr == '\0' ) eMailAddr = NULL;
                        if( flgFirst ) {
-                               /* First email belongs with person  */
+                               /* First email belongs with person */
                                gchar *str = addressbook_format_item_clist( person, email );
                                if( str ) {
                                        text[COL_NAME] = str;
@@ -2104,7 +2110,7 @@ static void addressbook_node_load_datasource( GtkCTree *clist, AddressObject *ob
        atci = adapter->atci;
        if( atci == NULL ) return;
 
-       /* Create nodes in list copying values for data sources in tree  */
+       /* Create nodes in list copying values for data sources in tree */
        row = GTK_CTREE_ROW( adapter->treeNode );
        if( row ) {
                node = row->children;
@@ -2138,10 +2144,10 @@ static AddressDataSource *addressbook_find_datasource( GtkCTreeNode *node ) {
                if( GTK_CTREE_ROW(node)->level < 2 ) return NULL;
                ao = gtk_ctree_node_get_row_data( GTK_CTREE(addrbook.ctree), node );
                if( ao ) {
-/*                     printf( "ao->type = %d\n", ao->type );   */
+/*                     printf( "ao->type = %d\n", ao->type ); */
                        if( ao->type == ADDR_DATASOURCE ) {
                                AdapterDSource *ads = ADAPTER_DSOURCE(ao);
-/*                             printf( "found it\n" );           */
+/*                             printf( "found it\n" ); */
                                ds = ads->dataSource;
                                break;
                        }
@@ -2167,8 +2173,8 @@ static void addressbook_set_clist( AddressObject *obj ) {
        }
 
        if( obj->type == ADDR_INTERFACE ) {
-               /* printf( "set_clist: loading datasource...\n" );
-                addressbook_node_load_datasource( clist, obj ); */
+               /* printf( "set_clist: loading datasource...\n" ); */
+               /* addressbook_node_load_datasource( clist, obj ); */
                return;
        }
 
@@ -2193,7 +2199,7 @@ static void addressbook_set_clist( AddressObject *obj ) {
                        addressbook_load_group( ctreelist, itemGroup );
                }
                else if( obj->type == ADDR_ITEM_FOLDER ) {
-                       /* Load folders  */
+                       /* Load folders */
                        ItemFolder *itemFolder = ADAPTER_FOLDER(obj)->itemFolder;
                        addressbook_folder_load_person( ctreelist, itemFolder );
                        addressbook_folder_load_group( ctreelist, itemFolder );
@@ -2294,7 +2300,7 @@ static void addressbook_load_tree( void ) {
                atci = adapter->atci;
                if( iface ) {
                        if( iface->useInterface ) {
-                               /* Load data sources below interface node  */
+                               /* Load data sources below interface node */
                                nodeDS = iface->listSource;
                                while( nodeDS ) {
                                        ds = nodeDS->data;
@@ -2346,7 +2352,7 @@ static gboolean addressbook_convert( AddressIndex *addrIndex ) {
        else {
                /* We have an old file */
                if( addrIndex->wasConverted ) {
-                       /* Converted successfully - save address index  */
+                       /* Converted successfully - save address index */
                        addrindex_set_file_name( addrIndex, ADDRESSBOOK_INDEX_FILE );
                        addrindex_save_data( addrIndex );
                        if( addrIndex->retVal == MGU_SUCCESS ) {
@@ -2446,7 +2452,7 @@ void addressbook_read_file_old( void ) {
        addrIndex = addrindex_create_index();
 
        /* Use use new address book. */
-       /* addrindex_set_file_path( addrIndex, "/home/match/tmp/empty-dir" );  */
+       /* addrindex_set_file_path( addrIndex, "/home/match/tmp/empty-dir" ); */
        addrindex_set_file_path( addrIndex, get_rc_dir() );
        addrindex_set_file_name( addrIndex, ADDRESSBOOK_INDEX_FILE );
 
@@ -2479,7 +2485,7 @@ void addressbook_read_file_old( void ) {
                else {
                        /* We have an old file */
                        if( addrIndex->wasConverted ) {
-                               /* Converted successfully - save address index  */
+                               /* Converted successfully - save address index */
                                addrindex_set_file_name( addrIndex, ADDRESSBOOK_INDEX_FILE );
                                addrindex_save_data( addrIndex );
                                if( addrIndex->retVal == MGU_SUCCESS ) {
@@ -2532,12 +2538,14 @@ void addressbook_read_file_old( void ) {
 
        if( errFlag ) {
                debug_print( "Error\n%s\n", msg );
-               alertpanel( _( "Sylpheed Addressbook Conversion Error" ), msg, _( "Close" ), NULL, NULL );
+               alertpanel( _( "Addressbook Conversion Error" ), msg,
+                           _( "Close" ), NULL, NULL );
        }
        else {
                if( msg ) {
                        debug_print( "Warning\n%s\n", msg );
-                       alertpanel( _( "Sylpheed Addressbook Conversion" ), msg, _( "Close" ), NULL, NULL );
+                       alertpanel( _( "Addressbook Conversion" ), msg,
+                                   _( "Close" ), NULL, NULL );
                }
        }
        if( msg ) g_free( msg );
@@ -2566,7 +2574,7 @@ static GtkCTreeNode *addressbook_add_object(GtkCTreeNode *node,
        pobj = gtk_ctree_node_get_row_data(ctree, node);
        g_return_val_if_fail(pobj != NULL, NULL);
 
-       /* Determine object type to be displayed  */
+       /* Determine object type to be displayed */
        if( obj->type == ADDR_DATASOURCE ) {
                otype = ADAPTER_DSOURCE(obj)->subType;
        }
@@ -2721,7 +2729,7 @@ void addressbook_export_to_file( void ) {
                        addrindex_print_index( _addressIndex_, stdout );
                }
 
-               /* Notify address completion of new data  */
+               /* Notify address completion of new data */
                invalidate_address_completion();
        }
 }
@@ -3006,7 +3014,7 @@ static void addressbook_lup_clicked( GtkButton *button, gpointer data ) {
 void addrbookctl_build_map( GtkWidget *window ) {
        AddressTypeControlItem *atci;
 
-       // Build icons
+       /* Build icons */
        PIXMAP_CREATE(window, folderxpm, folderxpmmask, dir_close_xpm);
        PIXMAP_CREATE(window, folderopenxpm, folderopenxpmmask, dir_open_xpm);
        PIXMAP_CREATE(window, groupxpm, groupxpmmask, group_xpm);
@@ -3036,7 +3044,7 @@ void addrbookctl_build_map( GtkWidget *window ) {
        g_hash_table_insert( _addressBookTypeHash_, &atci->objectType, atci );
        _addressBookTypeList_ = g_list_append( _addressBookTypeList_, atci );
 
-       /* Address book  */
+       /* Address book */
        atci = g_new0( AddressTypeControlItem, 1 );
        atci->objectType = ADDR_BOOK;
        atci->interfaceType = ADDR_IF_BOOK;
index 371bf93..59512d5 100644 (file)
@@ -32,8 +32,8 @@ void addressbook_read_file            (void);
 void addressbook_export_to_file                (void);
 gint addressbook_obj_name_compare      (gconstpointer   a,
                                         gconstpointer   b);
-// static gint addressbook_obj_name_compare(gconstpointer       a,
-//                                      gconstpointer   b);
+/* static gint addressbook_obj_name_compare(gconstpointer       a,
+                                        gconstpointer   b); */
 
 /* provisional API for accessing the address book */
 
index 80ceb92..919bf40 100644 (file)
@@ -48,11 +48,11 @@ typedef enum {
        ADDR_ITEM_GROUP,
        ADDR_INTERFACE,
        ADDR_DATASOURCE,
-       ADDR_BOOK,              // Sub-type
-       ADDR_VCARD,             // Sub-type
-       ADDR_JPILOT,            // Sub-type
-       ADDR_CATEGORY,          // Sub-type
-       ADDR_LDAP               // Sub-type
+       ADDR_BOOK,              /* Sub-type */
+       ADDR_VCARD,             /* Sub-type */
+       ADDR_JPILOT,            /* Sub-type */
+       ADDR_CATEGORY,          /* Sub-type */
+       ADDR_LDAP               /* Sub-type */
 } AddressObjectType;
 
 typedef struct _AddressBook_win        AddressBook_win;
index 1fa4586..6eccfc4 100644 (file)
@@ -64,7 +64,7 @@
 #define TAG_DS_JPILOT        "jpilot"
 #define TAG_DS_LDAP          "server"
 
-// XML Attribute names
+/* XML Attribute names */
 #define ATTAG_BOOK_NAME       "name"
 #define ATTAG_BOOK_FILE       "file"
 
 #define ATTAG_LDAP_MAX_ENTRY  "max-entry"
 #define ATTAG_LDAP_TIMEOUT    "timeout"
 
-#define DISP_NEW_COMMON       "Common Address"
-#define DISP_NEW_PERSONAL     "Personal Address"
+#if 0
+N_("Common address")
+N_("Personal address")
+#endif
+
+#define DISP_NEW_COMMON       _("Common address")
+#define DISP_NEW_PERSONAL     _("Personal address")
 
-// Old address book
+/* Old address book */
 #define TAG_IF_OLD_COMMON     "common_address"
 #define TAG_IF_OLD_PERSONAL   "personal_address"
 
-#define DISP_OLD_COMMON       "Common Address"
-#define DISP_OLD_PERSONAL     "Personal Address"
+#define DISP_OLD_COMMON       _("Common address")
+#define DISP_OLD_PERSONAL     _("Personal address")
 
 typedef struct _AddressIfAttr AddressIfAttrib;
 struct _AddressIfAttr {
@@ -202,8 +207,8 @@ static void addrindex_build_if_list( AddressIndex *addrIndex ) {
        iface->haveLibrary = syldap_test_ldap_lib();
        iface->useInterface = iface->haveLibrary;
        iface->getAccessFlag = ( void * ) syldap_get_accessed;
-       // iface->getModifyFlag = ( void * ) syldap_get_modified;
-       // iface->getReadFlag   = ( void * ) syldap_get_read_flag;
+       /* iface->getModifyFlag = ( void * ) syldap_get_modified; */
+       /* iface->getReadFlag   = ( void * ) syldap_get_read_flag; */
        iface->getStatusCode = ( void * ) syldap_get_status;
        iface->getReadData   = ( void * ) syldap_read_data;
        iface->getRootFolder = ( void * ) syldap_get_root_folder;
@@ -218,7 +223,7 @@ static void addrindex_build_if_list( AddressIndex *addrIndex ) {
        addrIndex->interfaceList = g_list_append( addrIndex->interfaceList, iface );
        ADDRITEM_PARENT(iface) = ADDRITEM_OBJECT(addrIndex);
 
-       // Two old legacy data sources
+       /* Two old legacy data sources */
        iface = addrindex_create_interface( ADDR_IF_COMMON, "Old Address - common", TAG_IF_OLD_COMMON, NULL );
        iface->legacyFlag = TRUE;
        addrIndex->interfaceList = g_list_append( addrIndex->interfaceList, iface );
@@ -821,7 +826,7 @@ static void addrindex_write_jpilot( FILE *fp,AddressDataSource *ds, gint lvl ) {
        }
 }
 #else
-// Just read/write name-value pairs
+/* Just read/write name-value pairs */
 static AddressDataSource *addrindex_parse_jpilot( XMLFile *file ) {
        AddressDataSource *ds = g_new0( AddressDataSource, 1 );
        GList *list = addrindex_read_attributes( file );
@@ -909,7 +914,7 @@ static void addrindex_write_ldap( FILE *fp, AddressDataSource *ds, gint lvl ) {
        }
 }
 #else
-// Just read/write name-value pairs
+/* Just read/write name-value pairs */
 static AddressDataSource *addrindex_parse_ldap( XMLFile *file ) {
        AddressDataSource *ds = g_new0( AddressDataSource, 1 );
        GList *list = addrindex_read_attributes( file );
@@ -931,8 +936,8 @@ static void addrindex_write_ldap( FILE *fp, AddressDataSource *ds, gint lvl ) {
 */
 static void addrindex_read_index( AddressIndex *addrIndex, XMLFile *file ) {
        guint prev_level;
-       //gchar *element;
-       //GList *attr;
+       /* gchar *element; */
+       /* GList *attr; */
        XMLTag *xtag;
        AddressInterface *iface = NULL, *dsIFace = NULL;
        AddressDataSource *ds;
@@ -943,32 +948,32 @@ static void addrindex_read_index( AddressIndex *addrIndex, XMLFile *file ) {
                if( file->level < prev_level ) return;
 
                xtag = xml_get_current_tag( file );
-               // printf( "tag : %s\n", xtag->tag );
+               /* printf( "tag : %s\n", xtag->tag ); */
 
                iface = addrindex_tag_get_interface( addrIndex, xtag->tag, ADDR_IF_NONE );
                if( iface ) {
                        addrIndex->lastType = iface->type;
                        if( iface->legacyFlag ) addrIndex->needsConversion = TRUE;
-                       // printf( "found : %s\n", iface->name );
+                       /* printf( "found : %s\n", iface->name ); */
                }
                else {
                        dsIFace = addrindex_tag_get_datasource( addrIndex, addrIndex->lastType, xtag->tag );
                        if( dsIFace ) {
-                               // Add data source to list
-                               // printf( "\tdata source: %s\n", dsIFace->name );
+                               /* Add data source to list */
+                               /* printf( "\tdata source: %s\n", dsIFace->name ); */
                                ds = NULL;
                                if( addrIndex->lastType == ADDR_IF_BOOK ) {
                                        ds = addrindex_parse_book( file );
                                        if( ds->rawDataSource ) {
                                                addrbook_set_path( ds->rawDataSource, addrIndex->filePath );
-                                               // addrbook_print_book( ds->rawDataSource, stdout );
+                                               /* addrbook_print_book( ds->rawDataSource, stdout ); */
                                        }
                                }
                                else if( addrIndex->lastType == ADDR_IF_VCARD ) {
                                        ds = addrindex_parse_vcard( file );
-                                       // if( ds->rawDataSource ) {
-                                       //      vcard_print_file( ds->rawDataSource, stdout );
-                                       // }
+                                       /* if( ds->rawDataSource ) { */
+                                       /*      vcard_print_file( ds->rawDataSource, stdout ); */
+                                       /* } */
                                }
                                else if( addrIndex->lastType == ADDR_IF_JPILOT ) {
                                        ds = addrindex_parse_jpilot( file );
@@ -993,7 +998,7 @@ static void addrindex_read_index( AddressIndex *addrIndex, XMLFile *file ) {
                                        ds->interface = dsIFace;
                                        dsIFace->listSource = g_list_append( dsIFace->listSource, ds );
                                }
-                               // printf( "=============================\n\n" );
+                               /* printf( "=============================\n\n" ); */
                        }
                }
                /*
@@ -1020,7 +1025,7 @@ static gint addrindex_read_file( AddressIndex *addrIndex ) {
        g_free( fileSpec );
 
        if( file == NULL ) {
-               // fprintf( stdout, " file '%s' does not exist.\n", addrIndex->fileName );
+               /* fprintf( stdout, " file '%s' does not exist.\n", addrIndex->fileName ); */
                return addrIndex->retVal;
        }
 
@@ -1294,7 +1299,7 @@ static void addrindex_add_obj( XMLFile *file, AddressCvtNode *node ) {
                        node->list = g_list_append( node->list, newNode );
                }
                else {
-                       // printf( "invalid: !!! \n" );
+                       /* printf( "invalid: !!! \n" ); */
                        attr = xml_get_current_tag_attr( file );
                }
        }
@@ -1315,11 +1320,11 @@ static void addrindex_consume_tree( XMLFile *file ) {
                if (file->level < prev_level) return;
 
                xtag = xml_get_current_tag( file );
-               // printf( "tag : %s\n", xtag->tag );
+               /* printf( "tag : %s\n", xtag->tag ); */
                element = xml_get_element( file );
                attr = xml_get_current_tag_attr( file );
-               // show_attribs( attr );
-               // printf( "\ttag  value : %s :\n", element );
+               /* show_attribs( attr ); */
+               /* printf( "\ttag  value : %s :\n", element ); */
                addrindex_consume_tree( file );
        }
 }
@@ -1392,7 +1397,7 @@ static void addrindex_process_node(
                ItemGroup *itemGroup;
                gchar *fName;
 
-               // Create a folder for group
+               /* Create a folder for group */
                fName = g_strdup_printf( "Cvt - %s", node->name );
                itemGFolder = addritem_create_item_folder();
                addritem_folder_set_name( itemGFolder, fName );
@@ -1400,7 +1405,7 @@ static void addrindex_process_node(
                addrcache_folder_add_folder( cache, parent, itemGFolder );
                g_free( fName );
 
-               // Add group into folder
+               /* Add group into folder */
                itemGroup = addritem_create_item_group();
                addritem_group_set_name( itemGroup, node->name );
                addrcache_id_group( cache, itemGroup );
@@ -1411,7 +1416,7 @@ static void addrindex_process_node(
                ItemPerson *itemPerson;
                ItemEMail *itemEMail;
 
-               // Create person and email objects
+               /* Create person and email objects */
                itemPerson = addritem_create_item_person();
                addritem_person_set_common_name( itemPerson, node->name );
                addrcache_id_person( cache, itemPerson );
@@ -1421,7 +1426,7 @@ static void addrindex_process_node(
                addrcache_id_email( cache, itemEMail );
                addrcache_person_add_email( cache, itemPerson, itemEMail );
 
-               // Add person into appropriate folder
+               /* Add person into appropriate folder */
                if( itemGFolder ) {
                        addrcache_folder_add_person( cache, itemGFolder, itemPerson );
                }
@@ -1429,7 +1434,7 @@ static void addrindex_process_node(
                        addrcache_folder_add_person( cache, parent, itemPerson );
                }
 
-               // Add email address only into group
+               /* Add email address only into group */
                if( parentGrp ) {
                        addrcache_group_add_email( cache, parentGrp, itemEMail );
                }
@@ -1454,20 +1459,20 @@ static gboolean addrindex_process_book( AddressIndex *addrIndex, XMLFile *file,
        GList *fileList = NULL;
        gint fileNum  = 0;
 
-       // Setup root node
+       /* Setup root node */
        rootNode = g_new0( AddressCvtNode, 1 );
        rootNode->type = TEMPNODE_ROOT;
        rootNode->name = g_strdup( "root" );
        rootNode->list = NULL;
        addrindex_add_obj( file, rootNode );
-       // addrindex_print_node( rootNode, stdout );
+       /* addrindex_print_node( rootNode, stdout ); */
 
-       // Create new address book
+       /* Create new address book */
        abf = addrbook_create_book();
        addrbook_set_name( abf, displayName );
        addrbook_set_path( abf, addrIndex->filePath );
 
-       // Determine next available file number
+       /* Determine next available file number */
        fileList = addrbook_get_bookfile_list( abf );
        if( fileList ) {
                fileNum = 1 + abf->maxValue;
@@ -1482,7 +1487,7 @@ static gboolean addrindex_process_book( AddressIndex *addrIndex, XMLFile *file,
 
        addrindex_process_node( abf, rootNode, abf->addressCache->rootFolder, NULL, NULL );
 
-       // addrbook_dump_book( abf, stdout );
+       /* addrbook_dump_book( abf, stdout ); */
        addrbook_save_data( abf );
        addrIndex->retVal = abf->retVal;
        if( abf->retVal == MGU_SUCCESS ) retVal = TRUE;
@@ -1492,7 +1497,7 @@ static gboolean addrindex_process_book( AddressIndex *addrIndex, XMLFile *file,
        addrindex_free_node( rootNode );
        rootNode = NULL;
 
-       // Create entries in address index
+       /* Create entries in address index */
        if( retVal ) {
                abf = addrbook_create_book();
                addrbook_set_name( abf, displayName );
@@ -1513,14 +1518,14 @@ static void addrindex_convert_tree( AddressIndex *addrIndex, XMLFile *file ) {
        GList *attr;
        XMLTag *xtag;
 
-       // Process file
+       /* Process file */
        for (;;) {
                prev_level = file->level;
                xml_parse_next_tag( file );
                if (file->level < prev_level) return;
 
                xtag = xml_get_current_tag( file );
-               // printf( "tag : %d : %s\n", prev_level, xtag->tag );
+               /* printf( "tag : %d : %s\n", prev_level, xtag->tag ); */
                if( strcmp( xtag->tag, TAG_IF_OLD_COMMON ) == 0 ) {
                        if( addrindex_process_book( addrIndex, file, DISP_OLD_COMMON ) ) {
                                addrIndex->needsConversion = FALSE;
@@ -1539,8 +1544,8 @@ static void addrindex_convert_tree( AddressIndex *addrIndex, XMLFile *file ) {
                }
                element = xml_get_element( file );
                attr = xml_get_current_tag_attr( file );
-               // show_attribs( attr );
-               // printf( "\ttag  value : %s :\n", element );
+               /* show_attribs( attr ); */
+               /* printf( "\ttag  value : %s :\n", element ); */
                addrindex_consume_tree( file );
        }
 }
@@ -1555,7 +1560,7 @@ static gint addrindex_convert_data( AddressIndex *addrIndex ) {
        g_free( fileSpec );
 
        if( file == NULL ) {
-               // fprintf( stdout, " file '%s' does not exist.\n", addrIndex->fileName );
+               /* fprintf( stdout, " file '%s' does not exist.\n", addrIndex->fileName ); */
                return addrIndex->retVal;
        }
 
@@ -1581,12 +1586,12 @@ static gboolean addrindex_create_new_book( AddressIndex *addrIndex, gchar *displ
        GList *fileList = NULL;
        gint fileNum = 0;
 
-       // Create new address book
+       /* Create new address book */
        abf = addrbook_create_book();
        addrbook_set_name( abf, displayName );
        addrbook_set_path( abf, addrIndex->filePath );
 
-       // Determine next available file number
+       /* Determine next available file number */
        fileList = addrbook_get_bookfile_list( abf );
        if( fileList ) {
                fileNum = 1 + abf->maxValue;
@@ -1605,7 +1610,7 @@ static gboolean addrindex_create_new_book( AddressIndex *addrIndex, gchar *displ
        addrbook_free_book( abf );
        abf = NULL;
 
-       // Create entries in address index
+       /* Create entries in address index */
        if( retVal ) {
                abf = addrbook_create_book();
                addrbook_set_name( abf, displayName );
index 64bbf88..c282fae 100644 (file)
@@ -63,19 +63,19 @@ static struct _PersonEdit_dlg {
        GtkWidget *statusbar;
        gint status_cid;
 
-       // Basic data tab
+       /* Basic data tab */
        GtkWidget *entry_name;
        GtkWidget *entry_first;
        GtkWidget *entry_last;
        GtkWidget *entry_nick;
 
-       // EMail data tab
+       /* EMail data tab */
        GtkWidget *entry_email;
        GtkWidget *entry_alias;
        GtkWidget *entry_remarks;
        GtkWidget *clist_email;
 
-       // Attribute data tab
+       /* Attribute data tab */
        GtkWidget *entry_atname;
        GtkWidget *entry_atvalue;
        GtkWidget *clist_attrib;
@@ -112,7 +112,7 @@ typedef enum {
 #define PAGE_EMAIL             1
 #define PAGE_ATTRIBUTES        2
 
-/*
+#if 0
 #define SET_LABEL_AND_ENTRY(str, entry, top) \
 { \
        label = gtk_label_new(str); \
@@ -172,7 +172,7 @@ static void addressbook_edit_address_create(gboolean *cancelled)
 
        window = gtk_window_new(GTK_WINDOW_DIALOG);
        gtk_widget_set_usize(window, 400, -1);
-       //gtk_container_set_border_width(GTK_CONTAINER(window), 8);
+       /* gtk_container_set_border_width(GTK_CONTAINER(window), 8); */
        gtk_window_set_title(GTK_WINDOW(window), _("Edit address"));
        gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
        gtk_window_set_modal(GTK_WINDOW(window), TRUE); 
@@ -274,7 +274,7 @@ AddressItem *addressbook_edit_address(AddressItem *item)
 
        return item;
 }
-*/
+#endif /* 0 */
 
 static void edit_person_status_show( gchar *msg ) {
        if( personeditdlg.statusbar != NULL ) {
@@ -419,13 +419,13 @@ static void edit_person_email_delete( gpointer data ) {
        ItemEMail *email = gtk_clist_get_row_data( clist, row );
        edit_person_email_clear( NULL );
        if( email ) {
-               // Remove list entry
+               /* Remove list entry */
                gtk_clist_remove( clist, row );
                addritem_free_item_email( email );
                email = NULL;
        }
 
-       // Position hilite bar
+       /* Position hilite bar */
        email = gtk_clist_get_row_data( clist, row );
        if( ! email ) {
                personeditdlg.rowIndEMail = -1 + row;
@@ -530,13 +530,13 @@ static void edit_person_attrib_delete( gpointer data ) {
        UserAttribute *attrib = gtk_clist_get_row_data( clist, row );
        edit_person_attrib_clear( NULL );
        if( attrib ) {
-               // Remove list entry
+               /* Remove list entry */
                gtk_clist_remove( clist, row );
                addritem_free_attribute( attrib );
                attrib = NULL;
        }
 
-       // Position hilite bar
+       /* Position hilite bar */
        attrib = gtk_clist_get_row_data( clist, row );
        if( ! attrib ) {
                personeditdlg.rowIndAttrib = -1 + row;
@@ -615,7 +615,7 @@ static void addressbook_edit_person_dialog_create( gboolean *cancelled ) {
 
        window = gtk_window_new(GTK_WINDOW_DIALOG);
        gtk_widget_set_usize(window, EDITPERSON_WIDTH, EDITPERSON_HEIGHT );
-       //gtk_container_set_border_width(GTK_CONTAINER(window), 0);
+       /* gtk_container_set_border_width(GTK_CONTAINER(window), 0); */
        gtk_window_set_title(GTK_WINDOW(window), _("Edit Person Data"));
        gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
        gtk_window_set_modal(GTK_WINDOW(window), TRUE); 
@@ -627,7 +627,7 @@ static void addressbook_edit_person_dialog_create( gboolean *cancelled ) {
                           cancelled);
 
        vbox = gtk_vbox_new(FALSE, 4);
-       //gtk_container_set_border_width(GTK_CONTAINER(vbox), BORDER_WIDTH);
+       /* gtk_container_set_border_width(GTK_CONTAINER(vbox), BORDER_WIDTH); */
        gtk_widget_show(vbox);
        gtk_container_add(GTK_CONTAINER(window), vbox);
 
@@ -636,19 +636,19 @@ static void addressbook_edit_person_dialog_create( gboolean *cancelled ) {
        gtk_widget_show(vnbox);
        gtk_box_pack_start(GTK_BOX(vbox), vnbox, TRUE, TRUE, 0);
 
-       // Notebook
+       /* Notebook */
        notebook = gtk_notebook_new();
        gtk_widget_show(notebook);
        gtk_box_pack_start(GTK_BOX(vnbox), notebook, TRUE, TRUE, 0);
        gtk_container_set_border_width(GTK_CONTAINER(notebook), 6);
 
-       // Status line
+       /* Status line */
        hsbox = gtk_hbox_new(FALSE, 0);
        gtk_box_pack_end(GTK_BOX(vbox), hsbox, FALSE, FALSE, BORDER_WIDTH);
        statusbar = gtk_statusbar_new();
        gtk_box_pack_start(GTK_BOX(hsbox), statusbar, TRUE, TRUE, BORDER_WIDTH);
 
-       // Button panel
+       /* Button panel */
        gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
                                &cancel_btn, _("Cancel"), NULL, NULL);
        gtk_box_pack_end(GTK_BOX(vnbox), hbbox, FALSE, FALSE, 0);
@@ -773,16 +773,16 @@ void addressbook_edit_person_page_email( gint pageNum, gchar *pageLbl ) {
                GTK_NOTEBOOK( personeditdlg.notebook ),
                gtk_notebook_get_nth_page( GTK_NOTEBOOK( personeditdlg.notebook ), pageNum ), label );
 
-       // Split into two areas
+       /* Split into two areas */
        hbox = gtk_hbox_new( FALSE, 0 );
        gtk_container_add( GTK_CONTAINER( vbox ), hbox );
 
-       // EMail list
+       /* EMail list */
        vboxl = gtk_vbox_new( FALSE, 4 );
        gtk_container_add( GTK_CONTAINER( hbox ), vboxl );
        gtk_container_set_border_width( GTK_CONTAINER(vboxl), 4 );
 
-       // Address list
+       /* Address list */
        clist_swin = gtk_scrolled_window_new( NULL, NULL );
        gtk_container_add( GTK_CONTAINER(vboxl), clist_swin );
        gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(clist_swin),
@@ -798,14 +798,14 @@ void addressbook_edit_person_page_email( gint pageNum, gchar *pageLbl ) {
        for( i = 0; i < EMAIL_N_COLS; i++ )
                GTK_WIDGET_UNSET_FLAGS(GTK_CLIST(clist)->column[i].button, GTK_CAN_FOCUS);
 
-       // Data entry area
+       /* Data entry area */
        table = gtk_table_new( 4, 2, FALSE);
        gtk_box_pack_start(GTK_BOX(vboxl), table, FALSE, FALSE, 0);
        gtk_container_set_border_width( GTK_CONTAINER(table), 4 );
        gtk_table_set_row_spacings(GTK_TABLE(table), 4);
        gtk_table_set_col_spacings(GTK_TABLE(table), 4);
 
-       // First row
+       /* First row */
        top = 0;
        label = gtk_label_new(_("E-Mail Address"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -814,7 +814,7 @@ void addressbook_edit_person_page_email( gint pageNum, gchar *pageLbl ) {
        entry_email = gtk_entry_new();
        gtk_table_attach(GTK_TABLE(table), entry_email, 1, 2, top, (top + 1), GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       // Next row
+       /* Next row */
        ++top;
        label = gtk_label_new(_("Alias"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -823,7 +823,7 @@ void addressbook_edit_person_page_email( gint pageNum, gchar *pageLbl ) {
        entry_alias = gtk_entry_new();
        gtk_table_attach(GTK_TABLE(table), entry_alias, 1, 2, top, (top + 1), GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       // Next row
+       /* Next row */
        ++top;
        label = gtk_label_new(_("Remarks"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -832,7 +832,7 @@ void addressbook_edit_person_page_email( gint pageNum, gchar *pageLbl ) {
        entry_remarks = gtk_entry_new();
        gtk_table_attach(GTK_TABLE(table), entry_remarks, 1, 2, top, (top + 1), GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       // Button box
+       /* Button box */
        vboxb = gtk_vbox_new( FALSE, 4 );
        gtk_box_pack_start(GTK_BOX(hbox), vboxb, FALSE, FALSE, 2);
 
@@ -842,7 +842,7 @@ void addressbook_edit_person_page_email( gint pageNum, gchar *pageLbl ) {
        gtk_container_set_border_width( GTK_CONTAINER(vbuttonbox), 4 );
        gtk_container_add( GTK_CONTAINER(vboxb), vbuttonbox );
 
-       // Buttons
+       /* Buttons */
        buttonUp = gtk_button_new_with_label( _( "Move Up" ) );
        gtk_container_add( GTK_CONTAINER(vbuttonbox), buttonUp );
 
@@ -863,7 +863,7 @@ void addressbook_edit_person_page_email( gint pageNum, gchar *pageLbl ) {
 
        gtk_widget_show_all(vbox);
 
-       // Event handlers
+       /* Event handlers */
        gtk_signal_connect( GTK_OBJECT(clist), "select_row",
                        GTK_SIGNAL_FUNC( edit_person_email_list_selected), NULL );
        gtk_signal_connect( GTK_OBJECT(buttonUp), "clicked",
@@ -918,16 +918,16 @@ void addressbook_edit_person_page_attrib( gint pageNum, gchar *pageLbl ) {
                GTK_NOTEBOOK( personeditdlg.notebook ),
                gtk_notebook_get_nth_page( GTK_NOTEBOOK( personeditdlg.notebook ), pageNum ), label );
 
-       // Split into two areas
+       /* Split into two areas */
        hbox = gtk_hbox_new( FALSE, 0 );
        gtk_container_add( GTK_CONTAINER( vbox ), hbox );
 
-       // Attribute list
+       /* Attribute list */
        vboxl = gtk_vbox_new( FALSE, 4 );
        gtk_container_add( GTK_CONTAINER( hbox ), vboxl );
        gtk_container_set_border_width( GTK_CONTAINER(vboxl), 4 );
 
-       // Address list
+       /* Address list */
        clist_swin = gtk_scrolled_window_new( NULL, NULL );
        gtk_container_add( GTK_CONTAINER(vboxl), clist_swin );
        gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(clist_swin),
@@ -943,14 +943,14 @@ void addressbook_edit_person_page_attrib( gint pageNum, gchar *pageLbl ) {
        for( i = 0; i < ATTRIB_N_COLS; i++ )
                GTK_WIDGET_UNSET_FLAGS(GTK_CLIST(clist)->column[i].button, GTK_CAN_FOCUS);
 
-       // Data entry area
+       /* Data entry area */
        table = gtk_table_new( 4, 2, FALSE);
        gtk_box_pack_start(GTK_BOX(vboxl), table, FALSE, FALSE, 0);
        gtk_container_set_border_width( GTK_CONTAINER(table), 4 );
        gtk_table_set_row_spacings(GTK_TABLE(table), 4);
        gtk_table_set_col_spacings(GTK_TABLE(table), 4);
 
-       // First row
+       /* First row */
        top = 0;
        label = gtk_label_new(_("Name"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -959,7 +959,7 @@ void addressbook_edit_person_page_attrib( gint pageNum, gchar *pageLbl ) {
        entry_name = gtk_entry_new();
        gtk_table_attach(GTK_TABLE(table), entry_name, 1, 2, top, (top + 1), GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       // Next row
+       /* Next row */
        ++top;
        label = gtk_label_new(_("Value"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -968,7 +968,7 @@ void addressbook_edit_person_page_attrib( gint pageNum, gchar *pageLbl ) {
        entry_value = gtk_entry_new();
        gtk_table_attach(GTK_TABLE(table), entry_value, 1, 2, top, (top + 1), GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       // Button box
+       /* Button box */
        vboxb = gtk_vbox_new( FALSE, 4 );
        gtk_box_pack_start(GTK_BOX(hbox), vboxb, FALSE, FALSE, 2);
 
@@ -978,7 +978,7 @@ void addressbook_edit_person_page_attrib( gint pageNum, gchar *pageLbl ) {
        gtk_container_set_border_width( GTK_CONTAINER(vbuttonbox), 4 );
        gtk_container_add( GTK_CONTAINER(vboxb), vbuttonbox );
 
-       // Buttons
+       /* Buttons */
        buttonDel = gtk_button_new_with_label( _( "Delete" ) );
        gtk_container_add( GTK_CONTAINER(vbuttonbox), buttonDel );
 
@@ -993,7 +993,7 @@ void addressbook_edit_person_page_attrib( gint pageNum, gchar *pageLbl ) {
 
        gtk_widget_show_all(vbox);
 
-       // Event handlers
+       /* Event handlers */
        gtk_signal_connect( GTK_OBJECT(clist), "select_row",
                        GTK_SIGNAL_FUNC( edit_person_attrib_list_selected), NULL );
        gtk_signal_connect( GTK_OBJECT(buttonDel), "clicked",
@@ -1070,7 +1070,7 @@ ItemPerson *addressbook_edit_person( AddressBookFile *abf, ItemFolder *parent, I
        gtk_widget_show(personeditdlg.window);
        manage_window_set_transient(GTK_WINDOW(personeditdlg.window));
 
-       // Clear all fields
+       /* Clear all fields */
        personeditdlg.rowIndEMail = -1;
        personeditdlg.rowIndAttrib = -1;
        edit_person_status_show( "" );
@@ -1098,7 +1098,7 @@ ItemPerson *addressbook_edit_person( AddressBookFile *abf, ItemFolder *parent, I
                personeditdlg.editNew = TRUE;
        }
 
-       // Select appropriate start page
+       /* Select appropriate start page */
        if( pgMail ) {
                gtk_notebook_set_page( GTK_NOTEBOOK(personeditdlg.notebook), PAGE_EMAIL );
        }
@@ -1125,14 +1125,14 @@ ItemPerson *addressbook_edit_person( AddressBookFile *abf, ItemFolder *parent, I
 
        cn = g_strdup( gtk_editable_get_chars( GTK_EDITABLE(personeditdlg.entry_name), 0, -1 ) );
        if( person ) {
-               // Update email/attribute list
+               /* Update email/attribute list */
                addrbook_update_address_list( abf, person, listEMail );
                addrbook_update_attrib_list( abf, person, listAttrib );
        }
        else {
-               // Create new person and email/attribute list
+               /* Create new person and email/attribute list */
                if( cn == NULL || *cn == '\0' ) {
-                       // Wasting our time
+                       /* Wasting our time */
                        if( listEMail == NULL && listAttrib == NULL ) cancelled = TRUE;
                }
                if( ! cancelled ) {
@@ -1142,7 +1142,7 @@ ItemPerson *addressbook_edit_person( AddressBookFile *abf, ItemFolder *parent, I
        }
 
        if( ! cancelled ) {
-               // Set person stuff
+               /* Set person stuff */
                addritem_person_set_common_name( person, cn );
                addritem_person_set_first_name( person,
                        gtk_editable_get_chars( GTK_EDITABLE(personeditdlg.entry_first), 0, -1 ) );
index d5e9068..0d8d38d 100644 (file)
 #ifndef __EDITADDRESS_H__
 #define __EDITADDRESS_H__
 
-// Function prototypes
 ItemPerson *addressbook_edit_person( AddressBookFile *abf, ItemFolder *parent, ItemPerson *person, gboolean pgMail );
 
 #endif /* __EDITADDRESS_H__ */
-
-/*
-* End of Source.
-*/
index 201d401..87f5cd1 100644 (file)
@@ -62,7 +62,7 @@ static struct _AddrBookEdit_Dlg {
        AddressBookFile *bookFile;
 } addrbookedit_dlg;
 
-/* static struct _AddressFileSelection vcard_file_selector;  */
+/* static struct _AddressFileSelection vcard_file_selector; */
 
 /*
 * Edit functions.
@@ -124,7 +124,7 @@ static void edit_book_file_check( void ) {
 
 static void edit_book_enable_buttons( gboolean enable ) {
        gtk_widget_set_sensitive( addrbookedit_dlg.check_btn, enable );
-       // gtk_widget_set_sensitive( addrbookedit_dlg.file_btn, enable );
+       /* gtk_widget_set_sensitive( addrbookedit_dlg.file_btn, enable ); */
 }
 
 static void edit_book_name_focus( GtkWidget *widget, GdkEventFocus *event, gpointer data) {
@@ -157,7 +157,7 @@ static void addressbook_edit_book_create( gboolean *cancelled ) {
        GtkWidget *ok_btn;
        GtkWidget *cancel_btn;
        GtkWidget *check_btn;
-       // GtkWidget *file_btn;
+       /* GtkWidget *file_btn; */
        GtkWidget *statusbar;
        GtkWidget *hsbox;
        gint top;
@@ -185,7 +185,7 @@ static void addressbook_edit_book_create( gboolean *cancelled ) {
        gtk_table_set_row_spacings(GTK_TABLE(table), 8);
        gtk_table_set_col_spacings(GTK_TABLE(table), 8 );
 
-       // First row
+       /* First row */
        top = 0;
        label = gtk_label_new(_("Name"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -197,7 +197,7 @@ static void addressbook_edit_book_create( gboolean *cancelled ) {
        check_btn = gtk_button_new_with_label( _(" Check File "));
        gtk_table_attach(GTK_TABLE(table), check_btn, 2, 3, top, (top + 1), GTK_FILL, 0, 3, 0);
 
-       // Second row
+       /* Second row */
        top = 1;
        label = gtk_label_new(_("File"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -207,16 +207,16 @@ static void addressbook_edit_book_create( gboolean *cancelled ) {
        gtk_misc_set_alignment(GTK_MISC(file_label), 0, 0.5);
        gtk_table_attach(GTK_TABLE(table), file_label, 1, 2, top, (top + 1), GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       // file_btn = gtk_button_new_with_label( _(" ... "));
-       // gtk_table_attach(GTK_TABLE(table), file_btn, 2, 3, top, (top + 1), GTK_FILL, 0, 3, 0);
+       /* file_btn = gtk_button_new_with_label( _(" ... ")); */
+       /* gtk_table_attach(GTK_TABLE(table), file_btn, 2, 3, top, (top + 1), GTK_FILL, 0, 3, 0); */
 
-       // Status line
+       /* Status line */
        hsbox = gtk_hbox_new(FALSE, 0);
        gtk_box_pack_end(GTK_BOX(vbox), hsbox, FALSE, FALSE, BORDER_WIDTH);
        statusbar = gtk_statusbar_new();
        gtk_box_pack_start(GTK_BOX(hsbox), statusbar, TRUE, TRUE, BORDER_WIDTH);
 
-       // Button panel
+       /* Button panel */
        gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
                                &cancel_btn, _("Cancel"), NULL, NULL);
        gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
@@ -232,8 +232,8 @@ static void addressbook_edit_book_create( gboolean *cancelled ) {
                           GTK_SIGNAL_FUNC(edit_book_ok), cancelled);
        gtk_signal_connect(GTK_OBJECT(cancel_btn), "clicked",
                           GTK_SIGNAL_FUNC(edit_book_cancel), cancelled);
-//     gtk_signal_connect(GTK_OBJECT(file_btn), "clicked",
-//                        GTK_SIGNAL_FUNC(edit_book_file_select), NULL);
+/*     gtk_signal_connect(GTK_OBJECT(file_btn), "clicked", */
+/*                        GTK_SIGNAL_FUNC(edit_book_file_select), NULL); */
        gtk_signal_connect(GTK_OBJECT(check_btn), "clicked",
                           GTK_SIGNAL_FUNC(edit_book_file_check), NULL);
 
@@ -245,7 +245,7 @@ static void addressbook_edit_book_create( gboolean *cancelled ) {
        addrbookedit_dlg.ok_btn     = ok_btn;
        addrbookedit_dlg.cancel_btn = cancel_btn;
        addrbookedit_dlg.check_btn  = check_btn;
-       // addrbookedit_dlg.file_btn   = file_btn;
+       /* addrbookedit_dlg.file_btn   = file_btn; */
        addrbookedit_dlg.statusbar  = statusbar;
        addrbookedit_dlg.status_cid = gtk_statusbar_get_context_id( GTK_STATUSBAR(statusbar), "Edit Addressbook Dialog" );
 }
@@ -284,7 +284,7 @@ AdapterDSource *addressbook_edit_book( AddressIndex *addrIndex, AdapterDSource *
                abf = addrbook_create_book();
                addrbook_set_path( abf, addrIndex->filePath );
 
-               // Take initial guess at file name
+               /* Take initial guess at file name */
                newFile = edit_book_guess_file( abf );
                if( newFile ) {
                        tmp = g_strdup_printf( "<%s>", newFile );
@@ -323,7 +323,7 @@ AdapterDSource *addressbook_edit_book( AddressIndex *addrIndex, AdapterDSource *
        }
        else {
                if( newBook ) {
-                       // Get final file name in case it changed
+                       /* Get final file name in case it changed */
                        newFile = edit_book_guess_file( abf );
                        addrbook_set_file( abf, newFile );
                        g_free( newFile );
@@ -336,7 +336,7 @@ AdapterDSource *addressbook_edit_book( AddressIndex *addrIndex, AdapterDSource *
        }
        g_free( sName );
 
-       // Save data
+       /* Save data */
        if( abf ) addrbook_save_data( abf );
 
        return ads;
index 9968dc4..13e4965 100644 (file)
 #ifndef __EDITBOOK_H__
 #define __EDITBOOK_H__
 
-// Function prototypes
 AdapterDSource *addressbook_edit_book( AddressIndex *addrIndex, AdapterDSource *ads );
 
 #endif /* __EDITBOOK_H__ */
-
-/*
-* End of Source.
-*/
-
index bdedadc..c4f65e6 100644 (file)
@@ -64,7 +64,7 @@ static struct _GroupEdit_dlg {
        GtkWidget *statusbar;
        gint status_cid;
 
-       // Basic data tab
+       /* Basic data tab */
        GtkWidget *entry_name;
        GtkCList *clist_group;
        GtkCList *clist_avail;
@@ -267,18 +267,18 @@ static void addressbook_edit_group_create( gboolean *cancelled ) {
        gtk_widget_show( vbox );
        gtk_container_add( GTK_CONTAINER( window ), vbox );
 
-       // Group area
+       /* Group area */
        hboxg = gtk_hbox_new( FALSE, 0 );
        gtk_box_pack_start(GTK_BOX(vbox), hboxg, FALSE, FALSE, 0);
 
-       // Data entry area
+       /* Data entry area */
        table = gtk_table_new( 1, 3, FALSE);
        gtk_box_pack_start(GTK_BOX(hboxg), table, TRUE, TRUE, 0);
        gtk_container_set_border_width( GTK_CONTAINER(table), 4 );
        gtk_table_set_row_spacings(GTK_TABLE(table), 0);
        gtk_table_set_col_spacings(GTK_TABLE(table), 4);
 
-       // First row
+       /* First row */
        top = 0;
        label = gtk_label_new(_("Group Name"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -287,12 +287,12 @@ static void addressbook_edit_group_create( gboolean *cancelled ) {
        entry_name = gtk_entry_new();
        gtk_table_attach(GTK_TABLE(table), entry_name, 1, 2, top, (top + 1), GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       // List area
+       /* List area */
        hboxl = gtk_hbox_new( FALSE, 6 );
        gtk_container_set_border_width( GTK_CONTAINER(hboxl), 8 );
        gtk_box_pack_start(GTK_BOX(vbox), hboxl, TRUE, TRUE, 0);
 
-       // Group list
+       /* Group list */
        vboxl = gtk_vbox_new( FALSE, 0 );
        gtk_box_pack_start(GTK_BOX(hboxl), vboxl, TRUE, TRUE, 0);
 
@@ -321,7 +321,7 @@ static void addressbook_edit_group_create( gboolean *cancelled ) {
        for( i = 0; i < GROUP_N_COLS; i++ )
                GTK_WIDGET_UNSET_FLAGS(GTK_CLIST(clist_group)->column[i].button, GTK_CAN_FOCUS);
 
-       // Available list
+       /* Available list */
        vboxl = gtk_vbox_new( FALSE, 0 );
        gtk_box_pack_start(GTK_BOX(hboxl), vboxl, TRUE, TRUE, 0);
 
@@ -350,13 +350,13 @@ static void addressbook_edit_group_create( gboolean *cancelled ) {
        for( i = 0; i < GROUP_N_COLS; i++ )
                GTK_WIDGET_UNSET_FLAGS(GTK_CLIST(clist_avail)->column[i].button, GTK_CAN_FOCUS);
 
-       // Status line
+       /* Status line */
        hsbox = gtk_hbox_new(FALSE, 0);
        gtk_box_pack_end(GTK_BOX(vbox), hsbox, FALSE, FALSE, BORDER_WIDTH);
        statusbar = gtk_statusbar_new();
        gtk_box_pack_start(GTK_BOX(hsbox), statusbar, TRUE, TRUE, BORDER_WIDTH);
 
-       // Button panel
+       /* Button panel */
        gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
                                &cancel_btn, _("Cancel"), NULL, NULL);
        gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
@@ -369,7 +369,7 @@ static void addressbook_edit_group_create( gboolean *cancelled ) {
 
        gtk_widget_show_all(vbox);
 
-       // Event handlers
+       /* Event handlers */
        gtk_signal_connect( GTK_OBJECT(clist_group), "select_row",
                        GTK_SIGNAL_FUNC( edit_group_group_selected), NULL );
        gtk_signal_connect( GTK_OBJECT(clist_avail), "select_row",
@@ -432,7 +432,7 @@ ItemGroup *addressbook_edit_group( AddressBookFile *abf, ItemFolder *parent, Ite
        gtk_widget_show(groupeditdlg.window);
        manage_window_set_transient(GTK_WINDOW(groupeditdlg.window));
 
-       // Clear all fields
+       /* Clear all fields */
        groupeditdlg.rowIndGroup = -1;
        groupeditdlg.rowIndAvail = -1;
        edit_group_status_show( "" );
@@ -468,11 +468,11 @@ ItemGroup *addressbook_edit_group( AddressBookFile *abf, ItemFolder *parent, Ite
 
        listEMail = edit_group_build_email_list();
        if( group ) {
-               // Update email list
+               /* Update email list */
                addrbook_update_group_list( abf, group, listEMail );
        }
        else {
-               // Create new person and email list
+               /* Create new person and email list */
                group = addrbook_add_group_list( abf, parent, listEMail );
        }
        addritem_group_set_name( group, gtk_editable_get_chars( GTK_EDITABLE(groupeditdlg.entry_name), 0, -1 ) );
index 2d7ee02..6a3571d 100644 (file)
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-/*
- * Edit VCard address book data.
- */
-
 #ifndef __EDITGROUP_H__
 #define __EDITGROUP_H__
 
-// Function prototypes
 ItemGroup *addressbook_edit_group( AddressBookFile *abf, ItemFolder *folder, ItemGroup *group );
 ItemFolder *addressbook_edit_folder( AddressBookFile *abf, ItemFolder *parent, ItemFolder *folder );
 
 #endif /* __EDITGROUP_H__ */
-
-/*
-* End of Source.
-*/
-
index cb72b0f..ae629d7 100644 (file)
@@ -163,11 +163,11 @@ static void edit_jpilot_file_check( void ) {
        if( sFile ) {
                g_strchomp( sFile ); g_strchug( sFile );
                if( *sFile != '\0' ) {
-                       // Attempt to read file
+                       /* Attempt to read file */
                        JPilotFile *jpf = jpilot_create_path( sFile );
                        t = jpilot_read_data( jpf );
                        if( t == MGU_SUCCESS ) {
-                               // Set check boxes
+                               /* Set check boxes */
                                edit_jpilot_fill_check_box( jpf );
                                flg = TRUE;
                        }
@@ -176,12 +176,12 @@ static void edit_jpilot_file_check( void ) {
                }
        }
        if( ! flg ) {
-               // Clear all check boxes
+               /* Clear all check boxes */
                edit_jpilot_fill_check_box_new();
        }
        g_free( sFile );
 
-       // Display appropriate message
+       /* Display appropriate message */
        if( t == MGU_SUCCESS ) {
                sMsg = "";
        }
@@ -290,7 +290,7 @@ static void addressbook_edit_jpilot_create( gboolean *cancelled ) {
        gtk_table_set_row_spacings(GTK_TABLE(table), 8);
        gtk_table_set_col_spacings(GTK_TABLE(table), 8);
 
-       // First row
+       /* First row */
        top = 0;
        label = gtk_label_new(_("Name"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -302,7 +302,7 @@ static void addressbook_edit_jpilot_create( gboolean *cancelled ) {
        check_btn = gtk_button_new_with_label( _(" Check File "));
        gtk_table_attach(GTK_TABLE(table), check_btn, 2, 3, top, (top + 1), GTK_FILL, 0, 3, 0);
 
-       // Second row
+       /* Second row */
        top = 1;
        label = gtk_label_new(_("File"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -314,12 +314,12 @@ static void addressbook_edit_jpilot_create( gboolean *cancelled ) {
        file_btn = gtk_button_new_with_label( _(" ... "));
        gtk_table_attach(GTK_TABLE(table), file_btn, 2, 3, top, (top + 1), GTK_FILL, 0, 3, 0);
 
-       // Third row
+       /* Third row */
        top = 2;
        frame_custom = gtk_frame_new(_("Additional e-Mail address item(s)"));
        gtk_table_attach(GTK_TABLE(table), frame_custom, 1, 2, top, (top + JPILOT_NUM_CUSTOM_LABEL), GTK_FILL, 0, 0, 0);
 
-       // Now do custom labels.
+       /* Now do custom labels. */
        vbox_custom = gtk_vbox_new (FALSE, 8);
        for( i = 0; i < JPILOT_NUM_CUSTOM_LABEL; i++ ) {
                hlbox = gtk_hbox_new( FALSE, 0 );
@@ -334,13 +334,13 @@ static void addressbook_edit_jpilot_create( gboolean *cancelled ) {
        gtk_container_add (GTK_CONTAINER (frame_custom), vbox_custom);
        gtk_container_set_border_width( GTK_CONTAINER(vbox_custom), 8 );
 
-       // Status line
+       /* Status line */
        hsbox = gtk_hbox_new(FALSE, 0);
        gtk_box_pack_end(GTK_BOX(vbox), hsbox, FALSE, FALSE, BORDER_WIDTH);
        statusbar = gtk_statusbar_new();
        gtk_box_pack_start(GTK_BOX(hsbox), statusbar, TRUE, TRUE, BORDER_WIDTH);
 
-       // Button panel
+       /* Button panel */
        gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
                                &cancel_btn, _("Cancel"), NULL, NULL);
        gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
index 6931c97..e866255 100644 (file)
 
 #ifdef USE_JPILOT
 
-// Function prototypes
 AdapterDSource *addressbook_edit_jpilot( AddressIndex *addrIndex, AdapterDSource *ads );
 
 #endif /* USE_JPILOT */
 
 #endif /* __EDITJPILOT_H__ */
-
-/*
-* End of Source.
-*/
-
index 6fe9c10..ff32635 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 /*
- * Edit VCard address book data.
+ * Edit LDAP address book data.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -130,9 +130,9 @@ static void edit_ldap_server_check( void ) {
        g_strchomp( sBind ); g_strchug( sBind );
        g_strchomp( sPass ); g_strchug( sPass );
        if( *sHost != '\0' ) {
-               // Test connection to server
+               /* Test connection to server */
                if( syldap_test_connect_s( sHost, iPort ) ) {
-                       // Attempt to read base DN
+                       /* Attempt to read base DN */
                        GList *baseDN = syldap_read_basedn_s( sHost, iPort, sBind, sPass, iTime );
                        if( baseDN ) {
                                GList *node = baseDN;
@@ -154,12 +154,12 @@ static void edit_ldap_server_check( void ) {
        g_free( sPass );
 
        if( sBaseDN ) {
-               // Load search DN
+               /* Load search DN */
                gtk_entry_set_text(GTK_ENTRY(ldapedit.entry_baseDN), sBaseDN);
                g_free( sBaseDN );
        }
 
-       // Display appropriate message
+       /* Display appropriate message */
        if( flg ) {
                sMsg = _( "Connected successfully to server" );
        }
@@ -223,23 +223,23 @@ static void addressbook_edit_ldap_dialog_create( gboolean *cancelled ) {
                           cancelled);
 
        vbox = gtk_vbox_new( FALSE, 6 );
-       //gtk_container_set_border_width(GTK_CONTAINER(vbox), BORDER_WIDTH);
+       /* gtk_container_set_border_width(GTK_CONTAINER(vbox), BORDER_WIDTH); */
        gtk_widget_show( vbox );
        gtk_container_add( GTK_CONTAINER( window ), vbox );
 
-       // Notebook
+       /* Notebook */
        notebook = gtk_notebook_new();
        gtk_widget_show( notebook );
        gtk_box_pack_start( GTK_BOX( vbox ), notebook, TRUE, TRUE, 0 );
        gtk_container_set_border_width( GTK_CONTAINER( notebook ), 6 );
 
-       // Status line
+       /* Status line */
        hsbox = gtk_hbox_new(FALSE, 0);
        gtk_box_pack_end(GTK_BOX(vbox), hsbox, FALSE, FALSE, BORDER_WIDTH);
        statusbar = gtk_statusbar_new();
        gtk_box_pack_start(GTK_BOX(hsbox), statusbar, TRUE, TRUE, BORDER_WIDTH);
 
-       // Button panel
+       /* Button panel */
        gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
                                &cancel_btn, _("Cancel"), NULL, NULL);
        gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
@@ -279,7 +279,7 @@ void addressbook_edit_ldap_page_basic( gint pageNum, gchar *pageLbl ) {
        vbox = gtk_vbox_new( FALSE, 8 );
        gtk_widget_show( vbox );
        gtk_container_add( GTK_CONTAINER( ldapedit.notebook ), vbox );
-       //gtk_container_set_border_width( GTK_CONTAINER (vbox), BORDER_WIDTH );
+       /* gtk_container_set_border_width( GTK_CONTAINER (vbox), BORDER_WIDTH ); */
 
        label = gtk_label_new( pageLbl );
        gtk_widget_show( label );
@@ -293,7 +293,7 @@ void addressbook_edit_ldap_page_basic( gint pageNum, gchar *pageLbl ) {
        gtk_table_set_row_spacings(GTK_TABLE(table), 8);
        gtk_table_set_col_spacings(GTK_TABLE(table), 8);
 
-       // First row
+       /* First row */
        top = 0;
        label = gtk_label_new(_("Name"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -302,7 +302,7 @@ void addressbook_edit_ldap_page_basic( gint pageNum, gchar *pageLbl ) {
        entry_name = gtk_entry_new();
        gtk_table_attach(GTK_TABLE(table), entry_name, 1, 2, top, (top + 1), GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       // Next row
+       /* Next row */
        ++top;
        label = gtk_label_new(_("Hostname"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -311,7 +311,7 @@ void addressbook_edit_ldap_page_basic( gint pageNum, gchar *pageLbl ) {
        entry_server = gtk_entry_new();
        gtk_table_attach(GTK_TABLE(table), entry_server, 1, 2, top, (top + 1), GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       // Next row
+       /* Next row */
        ++top;
        label = gtk_label_new(_("Port"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -328,7 +328,7 @@ void addressbook_edit_ldap_page_basic( gint pageNum, gchar *pageLbl ) {
        check_btn = gtk_button_new_with_label( _(" Check Server "));
        gtk_table_attach(GTK_TABLE(table), check_btn, 2, 3, top, (top + 1), GTK_FILL, 0, 3, 0);
 
-       // Next row
+       /* Next row */
        ++top;
        label = gtk_label_new(_("Search Base"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -371,7 +371,7 @@ void addressbook_edit_ldap_page_extended( gint pageNum, gchar *pageLbl ) {
        vbox = gtk_vbox_new( FALSE, 8 );
        gtk_widget_show( vbox );
        gtk_container_add( GTK_CONTAINER( ldapedit.notebook ), vbox );
-       //gtk_container_set_border_width( GTK_CONTAINER (vbox), BORDER_WIDTH );
+       /* gtk_container_set_border_width( GTK_CONTAINER (vbox), BORDER_WIDTH ); */
 
        label = gtk_label_new( pageLbl );
        gtk_widget_show( label );
@@ -385,7 +385,7 @@ void addressbook_edit_ldap_page_extended( gint pageNum, gchar *pageLbl ) {
        gtk_table_set_row_spacings(GTK_TABLE(table), 8);
        gtk_table_set_col_spacings(GTK_TABLE(table), 8);
 
-       // First row
+       /* First row */
        top = 0;
        label = gtk_label_new(_("Search Criteria"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -397,7 +397,7 @@ void addressbook_edit_ldap_page_extended( gint pageNum, gchar *pageLbl ) {
        reset_btn = gtk_button_new_with_label( _(" Reset "));
        gtk_table_attach(GTK_TABLE(table), reset_btn, 2, 3, top, (top + 1), GTK_FILL, 0, 3, 0);
 
-       // Next row
+       /* Next row */
        ++top;
        label = gtk_label_new(_("Bind DN"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -406,7 +406,7 @@ void addressbook_edit_ldap_page_extended( gint pageNum, gchar *pageLbl ) {
        entry_bindDN = gtk_entry_new();
        gtk_table_attach(GTK_TABLE(table), entry_bindDN, 1, 2, top, (top + 1), GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       // Next row
+       /* Next row */
        ++top;
        label = gtk_label_new(_("Bind Password"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -415,7 +415,7 @@ void addressbook_edit_ldap_page_extended( gint pageNum, gchar *pageLbl ) {
        entry_bindPW = gtk_entry_new();
        gtk_table_attach(GTK_TABLE(table), entry_bindPW, 1, 2, top, (top + 1), GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       // Next row
+       /* Next row */
        ++top;
        label = gtk_label_new(_("Timeout (secs)"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -429,7 +429,7 @@ void addressbook_edit_ldap_page_extended( gint pageNum, gchar *pageLbl ) {
        gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_timeout), TRUE);
        gtk_table_attach(GTK_TABLE(table), hbox_spin, 1, 2, top, (top + 1), GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       // Next row
+       /* Next row */
        ++top;
        label = gtk_label_new(_("Maximum Entries"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
index a644e5d..d1bab62 100644 (file)
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-/*
- * Edit VCard address book data.
- */
-
 #ifndef __EDITLDAP_H__
 #define __EDITLDAP_H__
 
 #ifdef USE_LDAP
 
-// Function prototypes
 AdapterDSource *addressbook_edit_ldap( AddressIndex *addrIndex, AdapterDSource *ads );
 
 #endif /* USE_LDAP */
 
 #endif /* __EDITLDAP_H__ */
-
-/*
-* End of Source.
-*/
-
index 9c8b2f3..2758d7d 100644 (file)
@@ -122,18 +122,18 @@ static void edit_ldap_bdn_create(void) {
        GtkWidget *label;
        GtkWidget *host_label;
        GtkWidget *port_label;
-       //GtkWidget *basedn_label;
+       /* GtkWidget *basedn_label; */
        GtkWidget *basedn_list;
        GtkWidget *vlbox;
        GtkWidget *lwindow;
        GtkWidget *basedn_entry;
-       //GtkWidget *hlbox;
+       /* GtkWidget *hlbox; */
        GtkWidget *hbbox;
        GtkWidget *hsep;
        GtkWidget *ok_btn;
        GtkWidget *cancel_btn;
-       //GtkWidget *check_btn;
-       //GtkWidget *file_btn;
+       /* GtkWidget *check_btn; */
+       /* GtkWidget *file_btn; */
        GtkWidget *hsbox;
        GtkWidget *statusbar;
        gint top;
@@ -159,7 +159,7 @@ static void edit_ldap_bdn_create(void) {
        gtk_table_set_row_spacings(GTK_TABLE(table), 8);
        gtk_table_set_col_spacings(GTK_TABLE(table), 8);
 
-       // First row
+       /* First row */
        top = 0;
        label = gtk_label_new(_("Hostname"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -169,7 +169,7 @@ static void edit_ldap_bdn_create(void) {
        gtk_table_attach(GTK_TABLE(table), host_label, 1, 2, top, (top + 1), GTK_FILL, 0, 0, 0);
        gtk_misc_set_alignment(GTK_MISC(host_label), 0, 0.5);
 
-       // Second row
+       /* Second row */
        top = 1;
        label = gtk_label_new(_("Port"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -179,7 +179,7 @@ static void edit_ldap_bdn_create(void) {
        gtk_table_attach(GTK_TABLE(table), port_label, 1, 2, top, (top + 1), GTK_FILL, 0, 0, 0);
        gtk_misc_set_alignment(GTK_MISC(port_label), 0, 0.5);
 
-       // Third row
+       /* Third row */
        top = 2;
        label = gtk_label_new(_("Search Base"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -188,7 +188,7 @@ static void edit_ldap_bdn_create(void) {
        basedn_entry = gtk_entry_new();
        gtk_table_attach(GTK_TABLE(table), basedn_entry, 1, 2, top, (top + 1), GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 
-       // Basedn list
+       /* Basedn list */
        vlbox = gtk_vbox_new(FALSE, 8);
        gtk_box_pack_start(GTK_BOX(vbox), vlbox, TRUE, TRUE, 0);
        gtk_container_set_border_width( GTK_CONTAINER(vlbox), 8 );
@@ -205,13 +205,13 @@ static void edit_ldap_bdn_create(void) {
        gtk_clist_set_column_title( GTK_CLIST(basedn_list), 0, _( "Available Search Base(s)" ) );
        gtk_clist_set_selection_mode(GTK_CLIST(basedn_list), GTK_SELECTION_BROWSE);
 
-       // Status line
+       /* Status line */
        hsbox = gtk_hbox_new(FALSE, 0);
        gtk_box_pack_end(GTK_BOX(vbox), hsbox, FALSE, FALSE, BORDER_WIDTH);
        statusbar = gtk_statusbar_new();
        gtk_box_pack_start(GTK_BOX(hsbox), statusbar, TRUE, TRUE, BORDER_WIDTH);
 
-       // Button panel
+       /* Button panel */
        gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
                                &cancel_btn, _("Cancel"), NULL, NULL);
        gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
@@ -260,9 +260,9 @@ void edit_ldap_bdn_load_data( const gchar *hostName, const gint iPort, const gin
        gtk_label_set_text(GTK_LABEL(ldapedit_basedn.host_label), hostName);
        gtk_label_set_text(GTK_LABEL(ldapedit_basedn.port_label), sPort);
        if( *sHost != '\0' ) {
-               // Test connection to server
+               /* Test connection to server */
                if( syldap_test_connect_s( sHost, iPort ) ) {
-                       // Attempt to read base DN
+                       /* Attempt to read base DN */
                        GList *baseDN = syldap_read_basedn_s( sHost, iPort, bindDN, bindPW, tov );
                        if( baseDN ) {
                                GList *node = baseDN;
@@ -284,7 +284,7 @@ void edit_ldap_bdn_load_data( const gchar *hostName, const gint iPort, const gin
        }
        g_free( sHost );
 
-       // Display appropriate message
+       /* Display appropriate message */
        if( flgConn ) {
                if( ! flgDN ) {
                        sMsg = _( "Could not read Search Base(s) from server - please set manually" );
@@ -310,15 +310,15 @@ gchar *edit_ldap_basedn_selection( const gchar *hostName, const gint port, gchar
        edit_ldap_bdn_load_data( hostName, port, tov, bindDN, bindPW );
        gtk_widget_show(ldapedit_basedn.window);
 
-//     sprintf( sPort, "%d", port );
-//     gtk_label_set_text(GTK_LABEL(ldapedit_basedn.host_label), hostName);
-//     gtk_label_set_text(GTK_LABEL(ldapedit_basedn.port_label), sPort);
+/*     sprintf( sPort, "%d", port ); */
+/*     gtk_label_set_text(GTK_LABEL(ldapedit_basedn.host_label), hostName); */
+/*     gtk_label_set_text(GTK_LABEL(ldapedit_basedn.port_label), sPort); */
        gtk_entry_set_text(GTK_ENTRY(ldapedit_basedn.basedn_entry), baseDN);
 
        gtk_main();
        gtk_widget_hide(ldapedit_basedn.window);
        if( ldapedit_basedn_cancelled ) return NULL;
-//     if( cancelled == TRUE ) return NULL;
+/*     if( cancelled == TRUE ) return NULL; */
        if( ldapedit_basedn_bad_server ) return NULL;
 
        retVal = g_strdup( gtk_editable_get_chars( GTK_EDITABLE(ldapedit_basedn.basedn_entry), 0, -1 ) );
index d53620f..a4affd0 100644 (file)
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-/*
- * Edit VCard address book data.
- */
-
 #ifndef __EDITLDAP_BASEDN_H__
 #define __EDITLDAP_BASEDN_H__
 
 #ifdef USE_LDAP
 
-// Function prototypes
 gchar *edit_ldap_basedn_selection( const gchar *hostName, const gint port, gchar *baseDN, const gint tov,
               const gchar* bindDN, const gchar *bindPW );
 
 #endif /* USE_LDAP */
 
 #endif /* __EDITLDAP_BASEDN_H__ */
-
-/*
-* End of Source.
-*/
-
index 562dc74..63fe121 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 /*
- * Edit VCard address book data.
+ * Edit vCard address book data.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -93,7 +93,7 @@ static void edit_vcard_file_check( void ) {
                sMsg = "";
        }
        else if( t == MGU_BAD_FORMAT ) {
-               sMsg = _("File does not appear to be VCard format.");
+               sMsg = _("File does not appear to be vCard format.");
        }
        else {
                sMsg = _("Could not read file.");
@@ -129,7 +129,7 @@ static void edit_vcard_file_cancel( GtkWidget *widget, gpointer data ) {
 static void edit_vcard_file_select_create( AddressFileSelection *afs ) {
        GtkWidget *fileSelector;
 
-       fileSelector = gtk_file_selection_new( _("Select VCard File") );
+       fileSelector = gtk_file_selection_new( _("Select vCard File") );
        gtk_file_selection_hide_fileop_buttons( GTK_FILE_SELECTION(fileSelector) );
        gtk_signal_connect( GTK_OBJECT (GTK_FILE_SELECTION(fileSelector)->ok_button),
                              "clicked", GTK_SIGNAL_FUNC (edit_vcard_file_ok), ( gpointer ) afs );
@@ -185,7 +185,7 @@ static void addressbook_edit_vcard_create( gboolean *cancelled ) {
        window = gtk_window_new(GTK_WINDOW_DIALOG);
        gtk_widget_set_usize(window, 450, -1);
        gtk_container_set_border_width( GTK_CONTAINER(window), 0 );
-       gtk_window_set_title(GTK_WINDOW(window), _("Edit VCard Entry"));
+       gtk_window_set_title(GTK_WINDOW(window), _("Edit vCard Entry"));
        gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
        gtk_window_set_modal(GTK_WINDOW(window), TRUE); 
        gtk_signal_connect(GTK_OBJECT(window), "delete_event",
@@ -205,7 +205,7 @@ static void addressbook_edit_vcard_create( gboolean *cancelled ) {
        gtk_table_set_row_spacings(GTK_TABLE(table), 8);
        gtk_table_set_col_spacings(GTK_TABLE(table), 8 );
 
-       // First row
+       /* First row */
        top = 0;
        label = gtk_label_new(_("Name"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -217,7 +217,7 @@ static void addressbook_edit_vcard_create( gboolean *cancelled ) {
        check_btn = gtk_button_new_with_label( _(" Check File "));
        gtk_table_attach(GTK_TABLE(table), check_btn, 2, 3, top, (top + 1), GTK_FILL, 0, 3, 0);
 
-       // Second row
+       /* Second row */
        top = 1;
        label = gtk_label_new(_("File"));
        gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
@@ -229,13 +229,13 @@ static void addressbook_edit_vcard_create( gboolean *cancelled ) {
        file_btn = gtk_button_new_with_label( _(" ... "));
        gtk_table_attach(GTK_TABLE(table), file_btn, 2, 3, top, (top + 1), GTK_FILL, 0, 3, 0);
 
-       // Status line
+       /* Status line */
        hsbox = gtk_hbox_new(FALSE, 0);
        gtk_box_pack_end(GTK_BOX(vbox), hsbox, FALSE, FALSE, BORDER_WIDTH);
        statusbar = gtk_statusbar_new();
        gtk_box_pack_start(GTK_BOX(hsbox), statusbar, TRUE, TRUE, BORDER_WIDTH);
 
-       // Button panel
+       /* Button panel */
        gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
                                &cancel_btn, _("Cancel"), NULL, NULL);
        gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
@@ -262,7 +262,7 @@ static void addressbook_edit_vcard_create( gboolean *cancelled ) {
        vcardedit.ok_btn     = ok_btn;
        vcardedit.cancel_btn = cancel_btn;
        vcardedit.statusbar  = statusbar;
-       vcardedit.status_cid = gtk_statusbar_get_context_id( GTK_STATUSBAR(statusbar), "Edit VCard Dialog" );
+       vcardedit.status_cid = gtk_statusbar_get_context_id( GTK_STATUSBAR(statusbar), "Edit vCard Dialog" );
 }
 
 AdapterDSource *addressbook_edit_vcard( AddressIndex *addrIndex, AdapterDSource *ads ) {
@@ -288,12 +288,12 @@ AdapterDSource *addressbook_edit_vcard( AddressIndex *addrIndex, AdapterDSource
                        gtk_entry_set_text(GTK_ENTRY(vcardedit.name_entry), vcf->name);
                if (vcf->path)
                        gtk_entry_set_text(GTK_ENTRY(vcardedit.file_entry), vcf->path);
-               gtk_window_set_title( GTK_WINDOW(vcardedit.window), _("Edit VCard Entry"));
+               gtk_window_set_title( GTK_WINDOW(vcardedit.window), _("Edit vCard Entry"));
        }
        else {
                gtk_entry_set_text(GTK_ENTRY(vcardedit.name_entry), ADDRESSBOOK_GUESS_VCARD );
                gtk_entry_set_text(GTK_ENTRY(vcardedit.file_entry), vcard_find_gnomecard() );
-               gtk_window_set_title( GTK_WINDOW(vcardedit.window), _("Add New VCard Entry"));
+               gtk_window_set_title( GTK_WINDOW(vcardedit.window), _("Add New vCard Entry"));
        }
 
        gtk_main();
index 8be859a..1dd0979 100644 (file)
  */
 
 /*
- * Edit VCard address book data.
+ * Edit vCard address book data.
  */
 
 #ifndef __EDITVCARD_H__
 #define __EDITVCARD_H__
 
-// Function prototypes
 AdapterDSource *addressbook_edit_vcard( AddressIndex *addrIndex, AdapterDSource *ads );
 
 #endif /* __EDITVCARD_H__ */
-
-/*
-* End of Source.
-*/
-
index e6e52a3..b285c3e 100644 (file)
@@ -1805,12 +1805,25 @@ catch:
        return ok;
 }
 
+#define QUOTE_IF_REQUIRED(out, str) \
+{ \
+       if (*str != '"' && strchr(str, ' ')) { \
+               gint len; \
+               len = strlen(str) + 3; \
+               Xalloca(out, len, return IMAP_ERROR); \
+               g_snprintf(out, len, "\"%s\"", str); \
+       } else { \
+               Xstrdup_a(out, str, return IMAP_ERROR); \
+       } \
+}
+
 static gint imap_status(IMAPSession *session, IMAPFolder *folder,
                        const gchar *path,
                        gint *messages, gint *recent, gint *unseen,
                        guint32 *uid_validity)
 {
        gchar *real_path;
+       gchar *real_path_;
        gint ok;
        GPtrArray *argbuf;
        gchar *str;
@@ -1820,14 +1833,9 @@ static gint imap_status(IMAPSession *session, IMAPFolder *folder,
        argbuf = g_ptr_array_new();
 
        real_path = imap_get_real_path(folder, path);
-       if (strchr(real_path, ' ') != NULL)
-               imap_cmd_gen_send(SESSION(session)->sock, "STATUS \"%s\" "
-                                       "(MESSAGES RECENT UNSEEN UIDVALIDITY)",
-                                 real_path);
-       else
-               imap_cmd_gen_send(SESSION(session)->sock, "STATUS %s "
-                                       "(MESSAGES RECENT UNSEEN UIDVALIDITY)",
-                                 real_path);
+       QUOTE_IF_REQUIRED(real_path_, real_path);
+       imap_cmd_gen_send(SESSION(session)->sock, "STATUS %s "
+                         "(MESSAGES RECENT UNSEEN UIDVALIDITY)", real_path_);
 
        ok = imap_cmd_ok(SESSION(session)->sock, argbuf);
        if (ok != IMAP_SUCCESS) THROW(ok);
@@ -1875,12 +1883,12 @@ catch:
 static gint imap_cmd_login(SockInfo *sock,
                           const gchar *user, const gchar *pass)
 {
+       gchar *user_, *pass_;
        gint ok;
 
-       if (strchr(user, ' ') != NULL)
-               imap_cmd_gen_send(sock, "LOGIN \"%s\" %s", user, pass);
-       else
-               imap_cmd_gen_send(sock, "LOGIN %s %s", user, pass);
+       QUOTE_IF_REQUIRED(user_, user);
+       QUOTE_IF_REQUIRED(pass_, pass);
+       imap_cmd_gen_send(sock, "LOGIN %s %s", user_, pass_);
 
        ok = imap_cmd_ok(sock, NULL);
        if (ok != IMAP_SUCCESS)
@@ -1931,25 +1939,14 @@ catch:
 static gint imap_cmd_list(SockInfo *sock, const gchar *ref,
                          const gchar *mailbox, GPtrArray *argbuf)
 {
-       gchar *new_ref;
-       gchar *new_mailbox;
+       gchar *ref_, *mailbox_;
 
        if (!ref) ref = "\"\"";
        if (!mailbox) mailbox = "\"\"";
 
-       if (*ref != '"' && strchr(ref, ' ') != NULL)
-               new_ref = g_strdup_printf("\"%s\"", ref);
-       else
-               new_ref = g_strdup(ref);
-       if (*mailbox != '"' && strchr(mailbox, ' ') != NULL)
-               new_mailbox = g_strdup_printf("\"%s\"", mailbox);
-       else
-               new_mailbox = g_strdup(mailbox);
-
-       imap_cmd_gen_send(sock, "LIST %s %s", new_ref, new_mailbox);
-
-       g_free(new_ref);
-       g_free(new_mailbox);
+       QUOTE_IF_REQUIRED(ref_, ref);
+       QUOTE_IF_REQUIRED(mailbox_, mailbox);
+       imap_cmd_gen_send(sock, "LIST %s %s", ref_, mailbox_);
 
        return imap_cmd_ok(sock, argbuf);
 }
@@ -1965,6 +1962,7 @@ static gint imap_cmd_do_select(SockInfo *sock, const gchar *folder,
        gchar *resp_str;
        GPtrArray *argbuf;
        gchar *select_cmd;
+       gchar *folder_;
 
        *exists = *recent = *unseen = *uid_validity = 0;
        argbuf = g_ptr_array_new();
@@ -1974,10 +1972,8 @@ static gint imap_cmd_do_select(SockInfo *sock, const gchar *folder,
        else
                select_cmd = "SELECT";
 
-       if (strchr(folder, ' ') != NULL)
-               imap_cmd_gen_send(sock, "%s \"%s\"", select_cmd, folder);
-       else
-               imap_cmd_gen_send(sock, "%s %s", select_cmd, folder);
+       QUOTE_IF_REQUIRED(folder_, folder);
+       imap_cmd_gen_send(sock, "%s %s", select_cmd, folder_);
 
        if ((ok = imap_cmd_ok(sock, argbuf)) != IMAP_SUCCESS) THROW;
 
@@ -2041,20 +2037,20 @@ static gint imap_cmd_examine(SockInfo *sock, const gchar *folder,
 
 static gint imap_cmd_create(SockInfo *sock, const gchar *folder)
 {
-       if (strchr(folder, ' ') != NULL)
-               imap_cmd_gen_send(sock, "CREATE \"%s\"", folder);
-       else
-               imap_cmd_gen_send(sock, "CREATE %s", folder);
+       gchar *folder_;
+
+       QUOTE_IF_REQUIRED(folder_, folder);
+       imap_cmd_gen_send(sock, "CREATE %s", folder_);
 
        return imap_cmd_ok(sock, NULL);
 }
 
 static gint imap_cmd_delete(SockInfo *sock, const gchar *folder)
 {
-       if (strchr(folder, ' ') != NULL)
-               imap_cmd_gen_send(sock, "DELETE \"%s\"", folder);
-       else
-               imap_cmd_gen_send(sock, "DELETE %s", folder);
+       gchar *folder_;
+
+       QUOTE_IF_REQUIRED(folder_, folder);
+       imap_cmd_gen_send(sock, "DELETE %s", folder_);
 
        return imap_cmd_ok(sock, NULL);
 }
@@ -2122,17 +2118,16 @@ static gint imap_cmd_append(SockInfo *sock, const gchar *destfolder,
 static gint imap_cmd_copy(SockInfo *sock, guint32 uid, const gchar *destfolder)
 {
        gint ok;
+       gchar *destfolder_;
 
        g_return_val_if_fail(destfolder != NULL, IMAP_ERROR);
 
-       if (strchr(destfolder, ' ') != NULL)
-               imap_cmd_gen_send(sock, "UID COPY %d \"%s\"", uid, destfolder);
-       else
-               imap_cmd_gen_send(sock, "UID COPY %d %s", uid, destfolder);
+       QUOTE_IF_REQUIRED(destfolder_, destfolder);
+       imap_cmd_gen_send(sock, "UID COPY %d %s", uid, destfolder_);
 
        ok = imap_cmd_ok(sock, NULL);
        if (ok != IMAP_SUCCESS) {
-               log_warning(_("can't copy %d to %s\n"), uid, destfolder);
+               log_warning(_("can't copy %d to %s\n"), uid, destfolder_);
                return -1;
        }
 
index fe8c45e..0cc8e43 100644 (file)
@@ -375,9 +375,9 @@ unsigned int i, n;
        return n;
 }
 
-/* Shamelessly copied from JPilot (utils.c)
-   These next 2 functions were copied from pi-file.c in the pilot-link app
-   Exact value of "Jan 1, 1970 0:00:00 GMT" - "Jan 1, 1904 0:00:00 GMT" */
+/* Shamelessly copied from JPilot (utils.c) */
+/*These next 2 functions were copied from pi-file.c in the pilot-link app */
+/* Exact value of "Jan 1, 1970 0:00:00 GMT" - "Jan 1, 1904 0:00:00 GMT" */
 #define PILOT_TIME_DELTA (unsigned)(2082844800)
 
 time_t pilot_time_to_unix_time ( unsigned long raw_time ) {
@@ -474,8 +474,8 @@ static int jpilot_free_db_list( GList **br_list ) {
        return 0;
 }
 
-/* Shamelessly copied from JPilot (libplugin.c)
-   Read file size. */
+/* Shamelessly copied from JPilot (libplugin.c) */
+/* Read file size. */
 static int jpilot_get_info_size( FILE *in, int *size ) {
        RawDBHeader rdbh;
        DBHeader dbh;
@@ -511,8 +511,8 @@ static int jpilot_get_info_size( FILE *in, int *size ) {
        return MGU_SUCCESS;
 }
 
-/* Read address file into address list. Based on JPilot's
-   libplugin.c (jp_get_app_info) */
+/* Read address file into address list. Based on JPilot's */
+/* libplugin.c (jp_get_app_info) */
 static gint jpilot_get_file_info( JPilotFile *pilotFile, unsigned char **buf, int *buf_size ) {
        FILE *in;
        int num;
@@ -586,8 +586,8 @@ static gint jpilot_get_file_info( JPilotFile *pilotFile, unsigned char **buf, in
 
 #define        FULLNAME_BUFSIZE   256
 #define        EMAIL_BUFSIZE      256
-/* Read address file into address cache. Based on JPilot's
-   jp_read_DB_files (from libplugin.c) */
+/* Read address file into address cache. Based on JPilot's */
+/* jp_read_DB_files (from libplugin.c) */
 static gint jpilot_read_file( JPilotFile *pilotFile ) {
        FILE *in;
        gchar *buf;
@@ -726,7 +726,7 @@ static gint jpilot_read_file( JPilotFile *pilotFile ) {
                        i++;
                }
 
-               /* Now go load all records */           
+               /* Now go load all records               */
                while(!feof(in)) {
                        /* struct CategoryAppInfo *cat = &ai->category; */
 
@@ -1117,12 +1117,12 @@ static void jpilot_remove_empty( JPilotFile *pilotFile ) {
        g_list_free( remList );
 }
 
-/* ============================================================================================
-
+/* ============================================================================================ */
+/*
 * Read file into list. Main entry point
 * Return: TRUE if file read successfully.
-
-  ============================================================================================ */
+*/
+/* ============================================================================================ */
 gint jpilot_read_data( JPilotFile *pilotFile ) {
        g_return_val_if_fail( pilotFile != NULL, -1 );
 
index 6d8edf1..17e4a79 100644 (file)
@@ -56,17 +56,18 @@ struct _JPilotFile {
        GList                 *customLabels;
        GList                 *labelInd;
        gint                  retVal;
-       // ItemFolder            *rootFolder;
+       /* ItemFolder            *rootFolder; */
        gboolean              accessFlag;
 };
 
-// Limits
-#define JPILOT_NUM_LABELS      22      // Number of labels
-#define JPILOT_NUM_PHONELABELS  8      // Number of phone number labels
-#define JPILOT_NUM_CATEG       16      // Number of categories
-#define JPILOT_LEN_LABEL       15      // Max length of label
-#define JPILOT_LEN_CATEG       15      // Max length of category
-#define JPILOT_NUM_ADDR_PHONE   5      // Number of phone entries a person can have
+/* Limits */
+#define JPILOT_NUM_LABELS      22      /* Number of labels */
+#define JPILOT_NUM_PHONELABELS  8      /* Number of phone number labels */
+#define JPILOT_NUM_CATEG       16      /* Number of categories */
+#define JPILOT_LEN_LABEL       15      /* Max length of label */
+#define JPILOT_LEN_CATEG       15      /* Max length of category */
+#define JPILOT_NUM_ADDR_PHONE   5      /* Number of phone entries a person
+                                          can have */
 
 /* Function prototypes */
 JPilotFile *jpilot_create              ( void );
index 7d48750..d3b80cd 100644 (file)
@@ -109,8 +109,6 @@ static void message_search_create(MessageView *messageview)
        body_label = gtk_label_new (_("Find text:"));
        gtk_widget_show (body_label);
        gtk_box_pack_start (GTK_BOX (hbox1), body_label, FALSE, FALSE, 0);
-       //gtk_label_set_justify (GTK_LABEL (body_label), GTK_JUSTIFY_RIGHT);
-       //gtk_misc_set_alignment (GTK_MISC (body_label), 1, 0.5);
 
        body_entry = gtk_entry_new ();
        gtk_widget_show (body_entry);
@@ -173,9 +171,15 @@ static void message_search_execute(GtkButton *button, gpointer data)
                gchar *str;
                AlertValue val;
 
-               if (messageview_search_string(messageview, body_str, case_sens)
-                   == TRUE)
-                       break;
+               if (backward) {
+                       if (messageview_search_string_backward
+                               (messageview, body_str, case_sens) == TRUE)
+                               break;
+               } else {
+                       if (messageview_search_string
+                               (messageview, body_str, case_sens) == TRUE)
+                               break;
+               }
 
                if (all_searched) {
                        alertpanel_message
@@ -195,9 +199,11 @@ static void message_search_execute(GtkButton *button, gpointer data)
 
                val = alertpanel(_("Search finished"), str,
                                 _("Yes"), _("No"), NULL);
-               if (G_ALERTDEFAULT == val)
+               if (G_ALERTDEFAULT == val) {
                        manage_window_focus_in(window, NULL, NULL);
-               else
+                       messageview_set_position(messageview,
+                                                backward ? -1 : 0);
+               } else
                        break;
        }
 }
index 64926e4..a16be14 100644 (file)
@@ -528,6 +528,12 @@ void messageview_select_all(MessageView *messageview)
                        (GTK_EDITABLE(messageview->textview->text), 0, -1);
 }
 
+void messageview_set_position(MessageView *messageview, gint pos)
+{
+       if (messageview->type == MVIEW_TEXT)
+               textview_set_position(messageview->textview, pos);
+}
+
 gboolean messageview_search_string(MessageView *messageview, const gchar *str,
                                   gboolean case_sens)
 {
@@ -537,6 +543,16 @@ gboolean messageview_search_string(MessageView *messageview, const gchar *str,
        return FALSE;
 }
 
+gboolean messageview_search_string_backward(MessageView *messageview,
+                                           const gchar *str,
+                                           gboolean case_sens)
+{
+       if (messageview->type == MVIEW_TEXT)
+               return textview_search_string_backward(messageview->textview,
+                                                      str, case_sens);
+       return FALSE;
+}
+
 GtkWidget *messageview_get_text_widget(MessageView *messageview)
 {
        return messageview->textview->text;
index b29057f..bb6d834 100644 (file)
@@ -65,10 +65,15 @@ void messageview_quote_color_set            (void);
 void messageview_set_font                      (MessageView    *messageview);
 void messageview_copy_clipboard                        (MessageView    *messageview);
 void messageview_select_all                    (MessageView    *messageview);
+void messageview_set_position                  (MessageView    *messageview,
+                                                gint            pos);
 
 gboolean messageview_search_string             (MessageView    *messageview,
                                                 const gchar    *str,
                                                 gboolean        case_sens);
+gboolean messageview_search_string_backward    (MessageView    *messageview,
+                                                const gchar    *str,
+                                                gboolean        case_sens);
 
 GtkWidget *messageview_get_text_widget         (MessageView    *messageview);
 
index bb28c12..40961de 100644 (file)
@@ -86,7 +86,7 @@ gchar *mgu_list_coalesce( GSList *list ) {
 
        if( ! list ) return NULL;
 
-       // Calculate maximum length of text
+       /* Calculate maximum length of text */
        len = 0;
        node = list;
        while( node ) {
@@ -95,7 +95,7 @@ gchar *mgu_list_coalesce( GSList *list ) {
                node = g_slist_next( node );
        }
 
-       // Create new buffer.
+       /* Create new buffer. */
        buf = g_new0( gchar, len+1 );
        start = buf;
        node = list;
index 1d6f25b..626bf75 100644 (file)
@@ -27,7 +27,7 @@
 #include <stdio.h>
 #include <glib.h>
 
-// Error codes
+/* Error codes */
 #define MGU_SUCCESS        0
 #define MGU_BAD_ARGS       -1
 #define MGU_NO_FILE        -2
@@ -47,7 +47,7 @@
 #define MGU_OPEN_DIRECTORY -16
 #define MGU_NO_PATH        -17
 
-// Function prototypes
+/* Function prototypes */
 void mgu_print_list            ( GSList *list, FILE *stream );
 void mgu_print_dlist           ( GList *list, FILE *stream );
 void mgu_free_list             ( GSList *list );
index 90c4b41..f12ef1e 100644 (file)
@@ -681,7 +681,8 @@ FILE *procmime_get_text_content(MimeInfo *mimeinfo, FILE *infp)
                        fputs(buf, outfp);
                }
        }
-       if (conv_fail) g_warning(_("Code conversion failed.\n"));
+       if (conv_fail)
+               g_warning(_("procmime_get_text_content(): Code conversion failed.\n"));
 
        fclose(tmpfp);
        rewind(outfp);
index a962e29..80f5ef2 100644 (file)
@@ -75,6 +75,8 @@ void summary_search(SummaryView *summaryview)
 {
        if (!window)
                summary_search_create(summaryview);
+       else
+               gtk_widget_hide(window);
 
        gtk_widget_grab_focus(search_btn);
        gtk_widget_grab_focus(subject_entry);
@@ -350,11 +352,17 @@ static void summary_search_execute(GtkButton *button, gpointer data)
                        if (search_all)
                                gtk_ctree_select(ctree, node);
                        else {
-                               summary_select_node(summaryview, node, TRUE);
-                               if (body_matched) {
-                                       messageview_search_string
-                                               (summaryview->messageview,
-                                                body_str, case_sens);
+                               if (summaryview->msg_is_toggled_on) {
+                                       summary_select_node
+                                               (summaryview, node, TRUE);
+                                       if (body_matched) {
+                                               messageview_search_string
+                                                       (summaryview->messageview,
+                                                        body_str, case_sens);
+                                       }
+                               } else {
+                                       summary_select_node
+                                               (summaryview, node, FALSE);
                                }
                                break;
                        }
index 744d2f6..3a86a12 100644 (file)
@@ -219,7 +219,7 @@ void syldap_free( SyldapServer *ldapServer ) {
 
        ldapServer->callBack = NULL;
 
-       // Free internal stuff
+       /* Free internal stuff */
        g_free( ldapServer->name );
        g_free( ldapServer->hostName );
        g_free( ldapServer->baseDN );
@@ -233,11 +233,11 @@ void syldap_free( SyldapServer *ldapServer ) {
        ldapServer->maxEntries = 0;
        ldapServer->newSearch = FALSE;
 
-       // Clear cache
+       /* Clear cache */
        addrcache_clear( ldapServer->addressCache );
        addrcache_free( ldapServer->addressCache );
 
-       // Clear pointers
+       /* Clear pointers */
        ldapServer->name = NULL;
        ldapServer->hostName = NULL;
        ldapServer->baseDN = NULL;
@@ -251,7 +251,7 @@ void syldap_free( SyldapServer *ldapServer ) {
        ldapServer->retVal = MGU_SUCCESS;
        ldapServer->accessFlag = FALSE;
 
-       // Now release LDAP object
+       /* Now release LDAP object */
        g_free( ldapServer );
 
 }
@@ -338,7 +338,7 @@ static void syldap_build_items_fl( SyldapServer *ldapServer, GSList *listAddr, G
        ItemPerson *person;
        ItemEMail *email;
 
-       // Find longest first name in list
+       /* Find longest first name in list */
        while( nodeFirst ) {
                if( firstName == NULL ) {
                        firstName = nodeFirst->data;
@@ -353,7 +353,7 @@ static void syldap_build_items_fl( SyldapServer *ldapServer, GSList *listAddr, G
                nodeFirst = g_slist_next( nodeFirst );
        }
 
-       // Format name
+       /* Format name */
        if( listLast ) {
                lastName = listLast->data;
        }
@@ -384,7 +384,7 @@ static void syldap_build_items_fl( SyldapServer *ldapServer, GSList *listAddr, G
                addrcache_add_person( ldapServer->addressCache, person );
        }
 
-       // Add address item
+       /* Add address item */
        while( nodeAddress ) {
                email = addritem_create_item_email();
                addritem_email_set_address( email, nodeAddress->data );
@@ -408,7 +408,7 @@ static GSList *syldap_add_list_values( LDAP *ld, LDAPMessage *entry, char *attr
 
        if( ( vals = ldap_get_values( ld, entry, attr ) ) != NULL ) {
                for( i = 0; vals[i] != NULL; i++ ) {
-                       // printf( "lv\t%s: %s\n", attr, vals[i] );
+                       /* printf( "lv\t%s: %s\n", attr, vals[i] ); */
                        list = g_slist_append( list, g_strdup( vals[i] ) );
                }
        }
@@ -425,7 +425,7 @@ static GSList *syldap_add_single_value( LDAP *ld, LDAPMessage *entry, char *attr
 
        if( ( vals = ldap_get_values( ld, entry, attr ) ) != NULL ) {
                if( vals[0] != NULL ) {
-                       // printf( "sv\t%s: %s\n", attr, vals[0] );
+                       /* printf( "sv\t%s: %s\n", attr, vals[0] ); */
                        list = g_slist_append( list, g_strdup( vals[0] ) );
                }
        }
@@ -455,7 +455,7 @@ gboolean syldap_check_search( SyldapServer *ldapServer ) {
 
        ldapServer->retVal = MGU_LDAP_CRITERIA;
 
-       // Test search criteria
+       /* Test search criteria */
        if( ldapServer->searchCriteria == NULL ) {
                return FALSE;
        }
@@ -501,7 +501,7 @@ gint syldap_search( SyldapServer *ldapServer ) {
                return ldapServer->retVal;
        }
 
-       // Set timeout
+       /* Set timeout */
        timeout.tv_sec = ldapServer->timeOut;
        timeout.tv_usec = 0L;
 
@@ -511,16 +511,16 @@ gint syldap_search( SyldapServer *ldapServer ) {
                return ldapServer->retVal;
        }
 
-       // printf( "connected to LDAP host %s on port %d\n", ldapServer->hostName, ldapServer->port );
+       /* printf( "connected to LDAP host %s on port %d\n", ldapServer->hostName, ldapServer->port ); */
 
-       // Bind to the server, if required
+       /* Bind to the server, if required */
        if( ldapServer->bindDN ) {
                if( * ldapServer->bindDN != '\0' ) {
-                       // printf( "binding...\n" );
+                       /* printf( "binding...\n" ); */
                        rc = ldap_simple_bind_s( ld, ldapServer->bindDN, ldapServer->bindPass );
-                       // printf( "rc=%d\n", rc );
+                       /* printf( "rc=%d\n", rc ); */
                        if( rc != LDAP_SUCCESS ) {
-                               // printf( "LDAP Error: ldap_simple_bind_s: %s\n", ldap_err2string( rc ) );
+                               /* printf( "LDAP Error: ldap_simple_bind_s: %s\n", ldap_err2string( rc ) ); */
                                ldap_unbind( ld );
                                ldapServer->retVal = MGU_LDAP_BIND;
                                return ldapServer->retVal;
@@ -528,7 +528,7 @@ gint syldap_search( SyldapServer *ldapServer ) {
                }
        }
 
-       // Define all attributes we are interested in.
+       /* Define all attributes we are interested in. */
        attribs[0] = SYLDAP_ATTR_DN;
        attribs[1] = SYLDAP_ATTR_COMMONNAME;
        attribs[2] = SYLDAP_ATTR_GIVENNAME;
@@ -537,7 +537,7 @@ gint syldap_search( SyldapServer *ldapServer ) {
        attribs[5] = SYLDAP_ATTR_UID;
        attribs[6] = NULL;
 
-       // Create LDAP search string and apply search criteria
+       /* Create LDAP search string and apply search criteria */
        criteria = g_strdup_printf( ldapServer->searchCriteria, ldapServer->searchValue );
        rc = ldap_search_ext_s( ld, ldapServer->baseDN, LDAP_SCOPE_SUBTREE, criteria, attribs, 0, NULL, NULL,
                       &timeout, 0, &result );
@@ -549,27 +549,27 @@ gint syldap_search( SyldapServer *ldapServer ) {
                return ldapServer->retVal;
        }
        if( rc != LDAP_SUCCESS ) {
-               // printf( "LDAP Error: ldap_search_st: %s\n", ldap_err2string( rc ) );
+               /* printf( "LDAP Error: ldap_search_st: %s\n", ldap_err2string( rc ) ); */
                ldap_unbind( ld );
                ldapServer->retVal = MGU_LDAP_SEARCH;
                return ldapServer->retVal;
        }
 
-       // printf( "Total results are: %d\n", ldap_count_entries( ld, result ) );
+       /* printf( "Total results are: %d\n", ldap_count_entries( ld, result ) ); */
 
-       // Clear the cache if we have new entries, otherwise leave untouched.
+       /* Clear the cache if we have new entries, otherwise leave untouched. */
        if( ldap_count_entries( ld, result ) > 0 ) {
                addrcache_clear( ldapServer->addressCache );
        }
 
-       // Process results
+       /* Process results */
        ldapServer->entriesRead = 0;
        for( e = ldap_first_entry( ld, result ); e != NULL; e = ldap_next_entry( ld, e ) ) {
                entriesFound = TRUE;
                if( ldapServer->entriesRead >= ldapServer->maxEntries ) break;          
-               // printf( "DN: %s\n", ldap_get_dn( ld, e ) );
+               /* printf( "DN: %s\n", ldap_get_dn( ld, e ) ); */
 
-               // Process all attributes
+               /* Process all attributes */
                for( attribute = ldap_first_attribute( ld, e, &ber ); attribute != NULL;
                               attribute = ldap_next_attribute( ld, e, ber ) ) {
                        if( strcasecmp( attribute, SYLDAP_ATTR_COMMONNAME ) == 0 ) {
@@ -592,13 +592,13 @@ gint syldap_search( SyldapServer *ldapServer ) {
                        }
                }
 
-               // Free memory used to store attribute
+               /* Free memory used to store attribute */
                ldap_memfree( attribute );
 
-               // Format and add items to cache
+               /* Format and add items to cache */
                syldap_build_items_fl( ldapServer, listAddress, listFirst, listLast );
 
-               // Free up
+               /* Free up */
                syldap_free_lists( listName, listAddress, listID, listDN, listFirst, listLast );
                listName = listAddress = listID = listFirst = listLast = listDN = NULL;
 
@@ -610,7 +610,7 @@ gint syldap_search( SyldapServer *ldapServer ) {
        syldap_free_lists( listName, listAddress, listID, listDN, listFirst, listLast );
        listName = listAddress = listID = listFirst = listLast = listDN = NULL;
        
-       // Free up and disconnect
+       /* Free up and disconnect */
        ldap_msgfree( result );
        ldap_unbind( ld );
        ldapServer->newSearch = FALSE;
@@ -623,28 +623,28 @@ gint syldap_search( SyldapServer *ldapServer ) {
        return ldapServer->retVal;
 }
 
-// ============================================================================================
+/* ============================================================================================ */
 /*
 * Read data into list. Main entry point
 * Return: TRUE if file read successfully.
 */
-// ============================================================================================
+/* ============================================================================================ */
 gint syldap_read_data( SyldapServer *ldapServer ) {
        g_return_val_if_fail( ldapServer != NULL, -1 );
 
        ldapServer->accessFlag = FALSE;
        pthread_detach( pthread_self() );
        if( ldapServer->newSearch ) {
-               // Read data into the list
+               /* Read data into the list */
                syldap_search( ldapServer );
 
-               // Mark cache
+               /* Mark cache */
                ldapServer->addressCache->modified = FALSE;
                ldapServer->addressCache->dataRead = TRUE;
                ldapServer->accessFlag = FALSE;
        }
 
-       // Callback
+       /* Callback */
        ldapServer->busyFlag = FALSE;
        if( ldapServer->callBack ) {
                sched_yield();
@@ -655,29 +655,29 @@ gint syldap_read_data( SyldapServer *ldapServer ) {
        return ldapServer->retVal;
 }
 
-// ============================================================================================
+/* ============================================================================================ */
 /*
 * Cancel read with thread.
 */
-// ============================================================================================
+/* ============================================================================================ */
 void syldap_cancel_read( SyldapServer *ldapServer ) {
        g_return_if_fail( ldapServer != NULL );
 
        if( ldapServer->thread ) {
-               // printf( "thread cancelled\n" );
+               /* printf( "thread cancelled\n" ); */
                pthread_cancel( *ldapServer->thread );
        }
        ldapServer->thread = NULL;
        ldapServer->busyFlag = FALSE;
 }
 
-// ============================================================================================
+/* ============================================================================================ */
 /*
 * Read data into list using a background thread.
 * Return: TRUE if file read successfully. Callback function will be
 * notified when search is complete.
 */
-// ============================================================================================
+/* ============================================================================================ */
 gint syldap_read_data_th( SyldapServer *ldapServer ) {
        pthread_t thread;
 
@@ -742,7 +742,7 @@ GList *syldap_read_basedn_s( const gchar *host, const gint port, const gchar *bi
        if( host == NULL ) return baseDN;
        if( port < 1 ) return baseDN;
 
-       // Set timeout
+       /* Set timeout */
        timeout.tv_usec = 0L;
        if( tov > 0 ) {
                timeout.tv_sec = tov;
@@ -751,40 +751,40 @@ GList *syldap_read_basedn_s( const gchar *host, const gint port, const gchar *bi
                timeout.tv_sec = 30L;
        }
 
-       // Connect to server.
+       /* Connect to server. */
        if( ( ld = ldap_init( host, port ) ) == NULL ) {
                return baseDN;
        }
 
-       // Bind to the server, if required
+       /* Bind to the server, if required */
        if( bindDN ) {
                if( *bindDN != '\0' ) {
                        rc = ldap_simple_bind_s( ld, bindDN, bindPW );
                        if( rc != LDAP_SUCCESS ) {
-                               // printf( "LDAP Error: ldap_simple_bind_s: %s\n", ldap_err2string( rc ) );
+                               /* printf( "LDAP Error: ldap_simple_bind_s: %s\n", ldap_err2string( rc ) ); */
                                ldap_unbind( ld );
                                return baseDN;
                        }
                }
        }
 
-       // Test for LDAP version 3
+       /* Test for LDAP version 3 */
        attribs[0] = SYLDAP_V3_TEST_ATTR;
        attribs[1] = NULL;
        rc = ldap_search_ext_s( ld, SYLDAP_SEARCHBASE_V3, LDAP_SCOPE_BASE, SYLDAP_TEST_FILTER, attribs,
                       0, NULL, NULL, &timeout, 0, &result );
        if( rc == LDAP_SUCCESS ) {
-               // Process entries
+               /* Process entries */
                for( e = ldap_first_entry( ld, result ); e != NULL; e = ldap_next_entry( ld, e ) ) {
-                       // printf( "DN: %s\n", ldap_get_dn( ld, e ) );
+                       /* printf( "DN: %s\n", ldap_get_dn( ld, e ) ); */
 
-                       // Process attributes
+                       /* Process attributes */
                        for( attribute = ldap_first_attribute( ld, e, &ber ); attribute != NULL;
                                        attribute = ldap_next_attribute( ld, e, ber ) ) {
                                if( strcasecmp( attribute, SYLDAP_V3_TEST_ATTR ) == 0 ) {
                                        if( ( vals = ldap_get_values( ld, e, attribute ) ) != NULL ) {
                                                for( i = 0; vals[i] != NULL; i++ ) {
-                                                       // printf( "\t%s: %s\n", attribute, vals[i] );
+                                                       /* printf( "\t%s: %s\n", attribute, vals[i] ); */
                                                        baseDN = g_list_append( baseDN, g_strdup( vals[i] ) );
                                                }
                                        }
@@ -802,25 +802,25 @@ GList *syldap_read_basedn_s( const gchar *host, const gint port, const gchar *bi
        }
 
        if( baseDN == NULL ) {
-               // Test for LDAP version 2
+               /* Test for LDAP version 2 */
                attribs[0] = NULL;
                rc = ldap_search_ext_s( ld, SYLDAP_SEARCHBASE_V2, LDAP_SCOPE_BASE, SYLDAP_TEST_FILTER, attribs,
                               0, NULL, NULL, &timeout, 0, &result );
                if( rc == LDAP_SUCCESS ) {
-                       // Process entries
+                       /* Process entries */
                        for( e = ldap_first_entry( ld, result ); e != NULL; e = ldap_next_entry( ld, e ) ) {
-                               // if( baseDN ) break;                  
-                               // printf( "DN: %s\n", ldap_get_dn( ld, e ) );
+                               /* if( baseDN ) break;                   */
+                               /* printf( "DN: %s\n", ldap_get_dn( ld, e ) ); */
 
-                               // Process attributes
+                               /* Process attributes */
                                for( attribute = ldap_first_attribute( ld, e, &ber ); attribute != NULL;
                                               attribute = ldap_next_attribute( ld, e, ber ) ) {
-                                       // if( baseDN ) break;                  
+                                       /* if( baseDN ) break;                   */
                                        if( strcasecmp( attribute, SYLDAP_V2_TEST_ATTR ) == 0 ) {
                                                if( ( vals = ldap_get_values( ld, e, attribute ) ) != NULL ) {
                                                        for( i = 0; vals[i] != NULL; i++ ) {
                                                                char *ch;
-                                                               // Strip the 'ldb:' from the front of the value
+                                                               /* Strip the 'ldb:' from the front of the value */
                                                                ch = ( char * ) strchr( vals[i], ':' );
                                                                if( ch ) {
                                                                        gchar *bn = g_strdup( ++ch );
@@ -867,7 +867,7 @@ GList *syldap_read_basedn( SyldapServer *ldapServer ) {
        if( ldapServer->hostName == NULL ) return baseDN;
        if( ldapServer->port < 1 ) return baseDN;
 
-       // Set timeout
+       /* Set timeout */
        timeout.tv_usec = 0L;
        if( ldapServer->timeOut > 0 ) {
                timeout.tv_sec = ldapServer->timeOut;
@@ -876,18 +876,18 @@ GList *syldap_read_basedn( SyldapServer *ldapServer ) {
                timeout.tv_sec = 30L;
        }
 
-       // Connect to server.
+       /* Connect to server. */
        if( ( ld = ldap_init( ldapServer->hostName, ldapServer->port ) ) == NULL ) {
                ldapServer->retVal = MGU_LDAP_INIT;
                return baseDN;
        }
 
-       // Bind to the server, if required
+       /* Bind to the server, if required */
        if( ldapServer->bindDN ) {
                if( *ldapServer->bindDN != '\0' ) {
                        rc = ldap_simple_bind_s( ld, ldapServer->bindDN, ldapServer->bindPass );
                        if( rc != LDAP_SUCCESS ) {
-                               //printf( "LDAP Error: ldap_simple_bind_s: %s\n", ldap_err2string( rc ) );
+                               /* printf( "LDAP Error: ldap_simple_bind_s: %s\n", ldap_err2string( rc ) ); */
                                ldap_unbind( ld );
                                ldapServer->retVal = MGU_LDAP_BIND;
                                return baseDN;
@@ -897,23 +897,23 @@ GList *syldap_read_basedn( SyldapServer *ldapServer ) {
 
        ldapServer->retVal = MGU_LDAP_SEARCH;
 
-       // Test for LDAP version 3
+       /* Test for LDAP version 3 */
        attribs[0] = SYLDAP_V3_TEST_ATTR;
        attribs[1] = NULL;
        rc = ldap_search_ext_s( ld, SYLDAP_SEARCHBASE_V3, LDAP_SCOPE_BASE, SYLDAP_TEST_FILTER, attribs,
                       0, NULL, NULL, &timeout, 0, &result );
        if( rc == LDAP_SUCCESS ) {
-               // Process entries
+               /* Process entries */
                for( e = ldap_first_entry( ld, result ); e != NULL; e = ldap_next_entry( ld, e ) ) {
-                       // printf( "DN: %s\n", ldap_get_dn( ld, e ) );
+                       /* printf( "DN: %s\n", ldap_get_dn( ld, e ) ); */
 
-                       // Process attributes
+                       /* Process attributes */
                        for( attribute = ldap_first_attribute( ld, e, &ber ); attribute != NULL;
                                        attribute = ldap_next_attribute( ld, e, ber ) ) {
                                if( strcasecmp( attribute, SYLDAP_V3_TEST_ATTR ) == 0 ) {
                                        if( ( vals = ldap_get_values( ld, e, attribute ) ) != NULL ) {
                                                for( i = 0; vals[i] != NULL; i++ ) {
-                                                       // printf( "\t%s: %s\n", attribute, vals[i] );
+                                                       /* printf( "\t%s: %s\n", attribute, vals[i] ); */
                                                        baseDN = g_list_append( baseDN, g_strdup( vals[i] ) );
                                                }
                                        }
@@ -933,25 +933,25 @@ GList *syldap_read_basedn( SyldapServer *ldapServer ) {
        }
 
        if( baseDN == NULL ) {
-               // Test for LDAP version 2
+               /* Test for LDAP version 2 */
                attribs[0] = NULL;
                rc = ldap_search_ext_s( ld, SYLDAP_SEARCHBASE_V2, LDAP_SCOPE_BASE, SYLDAP_TEST_FILTER, attribs,
                               0, NULL, NULL, &timeout, 0, &result );
                if( rc == LDAP_SUCCESS ) {
-                       // Process entries
+                       /* Process entries */
                        for( e = ldap_first_entry( ld, result ); e != NULL; e = ldap_next_entry( ld, e ) ) {
-                               // if( baseDN ) break;                  
-                               // printf( "DN: %s\n", ldap_get_dn( ld, e ) );
+                               /* if( baseDN ) break;                   */
+                               /* printf( "DN: %s\n", ldap_get_dn( ld, e ) ); */
 
-                               // Process attributes
+                               /* Process attributes */
                                for( attribute = ldap_first_attribute( ld, e, &ber ); attribute != NULL;
                                               attribute = ldap_next_attribute( ld, e, ber ) ) {
-                                       // if( baseDN ) break;                  
+                                       /* if( baseDN ) break;                   */
                                        if( strcasecmp( attribute, SYLDAP_V2_TEST_ATTR ) == 0 ) {
                                                if( ( vals = ldap_get_values( ld, e, attribute ) ) != NULL ) {
                                                        for( i = 0; vals[i] != NULL; i++ ) {
                                                                char *ch;
-                                                               // Strip the 'ldb:' from the front of the value
+                                                               /* Strip the 'ldb:' from the front of the value */
                                                                ch = ( char * ) strchr( vals[i], ':' );
                                                                if( ch ) {
                                                                        gchar *bn = g_strdup( ++ch );
@@ -1039,13 +1039,13 @@ gboolean syldap_test_connect( SyldapServer *ldapServer ) {
 gboolean syldap_test_ldap_lib() {
        void *handle, *fun;
        
-       // Get library
+       /* Get library */
        handle = dlopen( LDAP_LINK_LIB_NAME_1, RTLD_LAZY );
        if( ! handle ) {
                return FALSE;
        }
 
-       // Test for symbols we need
+       /* Test for symbols we need */
        fun = dlsym( handle, "ldap_init" );
        if( ! fun ) {
                dlclose( handle );
index 6396e9c..9c2449d 100644 (file)
@@ -44,7 +44,6 @@
 #define SYLDAP_ATTR_EMAIL      "mail"
 #define SYLDAP_ATTR_UID        "uid"
 
-// VCard object
 typedef struct _SyldapServer SyldapServer;
 struct _SyldapServer {
        gchar        *name;
@@ -60,7 +59,7 @@ struct _SyldapServer {
        gint         timeOut;
        gboolean     newSearch;
        AddressCache *addressCache;
-       // ItemFolder   *rootFolder;
+       /* ItemFolder   *rootFolder; */
        gboolean     accessFlag;
        gint         retVal;
        pthread_t    *thread;
@@ -94,7 +93,7 @@ gint syldap_read_data         ( SyldapServer *ldapServer );
 gint syldap_read_data_th       ( SyldapServer *ldapServer );
 void syldap_cancel_read                ( SyldapServer *ldapServer );
 
-// GList *syldap_get_address_list      ( const SyldapServer *ldapServer );
+/* GList *syldap_get_address_list      ( const SyldapServer *ldapServer ); */
 ItemFolder *syldap_get_root_folder     ( SyldapServer *ldapServer );
 GList *syldap_get_list_person  ( SyldapServer *ldapServer );
 GList *syldap_get_list_folder  ( SyldapServer *ldapServer );
index 7a52d56..5279b97 100644 (file)
@@ -183,15 +183,15 @@ TextView *textview_create(void)
        gtk_signal_connect(GTK_OBJECT(text_sb), "key_press_event",
                           GTK_SIGNAL_FUNC(textview_key_pressed),
                           textview);
-       gtk_signal_connect(GTK_OBJECT(text_sb), "button_press_event",
-                          GTK_SIGNAL_FUNC(textview_button_pressed),
-                          textview);
+       gtk_signal_connect_after(GTK_OBJECT(text_sb), "button_press_event",
+                                GTK_SIGNAL_FUNC(textview_button_pressed),
+                                textview);
        gtk_signal_connect(GTK_OBJECT(text_mb), "key_press_event",
                           GTK_SIGNAL_FUNC(textview_key_pressed),
                           textview);
-       gtk_signal_connect(GTK_OBJECT(text_mb), "button_press_event",
-                          GTK_SIGNAL_FUNC(textview_button_pressed),
-                          textview);
+       gtk_signal_connect_after(GTK_OBJECT(text_mb), "button_press_event",
+                                GTK_SIGNAL_FUNC(textview_button_pressed),
+                                textview);
 
        gtk_widget_show(scrolledwin_sb);
        gtk_widget_show(scrolledwin_mb);
@@ -209,6 +209,7 @@ TextView *textview_create(void)
        textview->text_is_mb     = FALSE;
        textview->uri_list       = NULL;
        textview->body_pos       = 0;
+       textview->cur_pos        = 0;
 
        return textview;
 }
@@ -335,6 +336,7 @@ void textview_show_part(TextView *textview, MimeInfo *mimeinfo, FILE *fp)
        gtk_text_freeze(text);
 
        textview->body_pos = 0;
+       textview->cur_pos  = 0;
 
        if (headers) {
                textview_show_header(textview, headers);
@@ -932,6 +934,16 @@ enum
        H_ORGANIZATION  = 11,
 };
 
+void textview_set_position(TextView *textview, gint pos)
+{
+       if (pos < 0) {
+               textview->cur_pos =
+                       gtk_text_get_length(GTK_TEXT(textview->text));
+       } else {
+               textview->cur_pos = pos;
+       }
+}
+
 static GPtrArray *textview_scan_header(TextView *textview, FILE *fp)
 {
        gchar buf[BUFFSIZE];
@@ -1050,24 +1062,69 @@ gboolean textview_search_string(TextView *textview, const gchar *str,
        wcs = strdup_mbstowcs(str);
        g_return_val_if_fail(wcs != NULL, FALSE);
        len = wcslen(wcs);
-       pos = gtk_editable_get_position(GTK_EDITABLE(text));
+       pos = textview->cur_pos;
        if (pos < textview->body_pos)
                pos = textview->body_pos;
        text_len = gtk_text_get_length(text);
+       if (text_len - pos < len) {
+               g_free(wcs);
+               return FALSE;
+       }
 
        for (; pos < text_len; pos++) {
                if (text_len - pos < len) break;
                if (gtkut_text_match_string(text, pos, wcs, len, case_sens)
                    == TRUE) {
-                       gtk_text_freeze(text);
-                       gtk_text_set_point(text, pos + len);
-                       gtk_editable_set_position(GTK_EDITABLE(text), pos + len);
+                       gtk_editable_set_position(GTK_EDITABLE(text),
+                                                 pos + len);
                        gtk_editable_select_region(GTK_EDITABLE(text),
                                                   pos, pos + len);
-                       gtk_text_thaw(text);
+                       textview_set_position(textview, pos + len);
                        found = TRUE;
                        break;
                }
+               if (text_len - pos == len) break;
+       }
+
+       g_free(wcs);
+       return found;
+}
+
+gboolean textview_search_string_backward(TextView *textview, const gchar *str,
+                                        gboolean case_sens)
+{
+       GtkText *text = GTK_TEXT(textview->text);
+       gint pos;
+       wchar_t *wcs;
+       gint len;
+       gint text_len;
+       gboolean found = FALSE;
+
+       g_return_val_if_fail(str != NULL, FALSE);
+
+       wcs = strdup_mbstowcs(str);
+       g_return_val_if_fail(wcs != NULL, FALSE);
+       len = wcslen(wcs);
+       pos = textview->cur_pos;
+       text_len = gtk_text_get_length(text);
+       if (text_len - textview->body_pos < len) {
+               g_free(wcs);
+               return FALSE;
+       }
+       if (pos <= textview->body_pos || text_len - pos < len)
+               pos = text_len - len;
+
+       for (; pos >= textview->body_pos; pos--) {
+               if (gtkut_text_match_string(text, pos, wcs, len, case_sens)
+                   == TRUE) {
+                       gtk_editable_set_position(GTK_EDITABLE(text), pos);
+                       gtk_editable_select_region(GTK_EDITABLE(text),
+                                                  pos, pos + len);
+                       textview_set_position(textview, pos - 1);
+                       found = TRUE;
+                       break;
+               }
+               if (pos == textview->body_pos) break;
        }
 
        g_free(wcs);
@@ -1293,19 +1350,19 @@ static void textview_key_pressed(GtkWidget *widget, GdkEventKey *event,
 static void textview_button_pressed(GtkWidget *widget, GdkEventButton *event,
                                    TextView *textview)
 {
+       textview->cur_pos = 
+               gtk_editable_get_position(GTK_EDITABLE(textview->text));
+
        if (event &&
            ((event->button == 1 && event->type == GDK_2BUTTON_PRESS)
             || event->button == 2 || event->button == 3)) {
                GSList *cur;
-               guint current_pos;
-
-               current_pos = GTK_EDITABLE(textview->text)->current_pos;
 
                for (cur = textview->uri_list; cur != NULL; cur = cur->next) {
                        RemoteURI *uri = (RemoteURI *)cur->data;
 
-                       if (current_pos >= uri->start &&
-                           current_pos <  uri->end) {
+                       if (textview->cur_pos >= uri->start &&
+                           textview->cur_pos <  uri->end) {
                                if (!g_strncasecmp(uri->uri, "mailto:", 7)) {
                                        if (event->button == 3) {
                                                gchar *fromname, *fromaddress;
index bcf4f2c..e3eccdf 100644 (file)
@@ -46,6 +46,7 @@ struct _TextView
 
        GSList *uri_list;
        gint body_pos;
+       gint cur_pos;
 
        GdkFont *msgfont;
        GdkFont *boldfont;
@@ -73,6 +74,8 @@ void textview_clear           (TextView       *textview);
 void textview_destroy          (TextView       *textview);
 void textview_set_font         (TextView       *textview,
                                 const gchar    *codeset);
+void textview_set_position     (TextView       *textview,
+                                gint            pos);
 void textview_scroll_one_line  (TextView       *textview,
                                 gboolean        up);
 gboolean textview_scroll_page  (TextView       *textview,
@@ -80,8 +83,11 @@ gboolean textview_scroll_page        (TextView       *textview,
 
 void textview_update_message_colors    (void);
 
-gboolean textview_search_string        (TextView       *textview,
-                                const gchar    *str,
-                                gboolean        case_sens);
+gboolean textview_search_string                        (TextView       *textview,
+                                                const gchar    *str,
+                                                gboolean        case_sens);
+gboolean textview_search_string_backward       (TextView       *textview,
+                                                const gchar    *str,
+                                                gboolean        case_sens);
 
 #endif /* __TEXTVIEW_H__ */
index d6c63a7..9040cf9 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 /*
- * Functions necessary to access VCard files. VCard files are used
+ * Functions necessary to access vCard files. vCard files are used
  * by GnomeCard for addressbook, and Netscape for sending business
  * card information. Refer to RFC2426 for more information.
  */
@@ -148,7 +148,7 @@ void vcard_free( VCardFile *cardFile ) {
        addrcache_clear( cardFile->addressCache );
        addrcache_free( cardFile->addressCache );
 
-       // Clear pointers
+       /* Clear pointers */
        cardFile->file = NULL;
        cardFile->name = NULL;
        cardFile->path = NULL;
@@ -182,18 +182,18 @@ void vcard_print_file( VCardFile *cardFile, FILE *stream ) {
 static gint vcard_open_file( VCardFile* cardFile ) {
        g_return_val_if_fail( cardFile != NULL, -1 );
 
-       // fprintf( stdout, "Opening file\n" );
+       /* fprintf( stdout, "Opening file\n" ); */
        cardFile->addressCache->dataRead = FALSE;
        if( cardFile->path ) {
                cardFile->file = fopen( cardFile->path, "r" );
                if( ! cardFile->file ) {
-                       // fprintf( stderr, "can't open %s\n", cardFile->path );
+                       /* fprintf( stderr, "can't open %s\n", cardFile->path ); */
                        cardFile->retVal = MGU_OPEN_FILE;
                        return cardFile->retVal;
                }
        }
        else {
-               // fprintf( stderr, "file not specified\n" );
+               /* fprintf( stderr, "file not specified\n" ); */
                cardFile->retVal = MGU_NO_FILE;
                return cardFile->retVal;
        }
@@ -284,10 +284,10 @@ static gchar *vcard_read_qp( VCardFile *cardFile, char *tagvalue ) {
                line = vcard_get_line( cardFile );
        }
 
-       // Coalesce linked list into one long buffer.
+       /* Coalesce linked list into one long buffer. */
        line = mgu_list_coalesce( listQP );
 
-       // Clean up
+       /* Clean up */
        mgu_free_list( listQP );
        listQP = NULL;
        return line;
@@ -335,7 +335,7 @@ static gchar *vcard_get_tagvalue( gchar* line, gchar dlm ) {
                value = g_strndup( start, len+1 );
        }
        else {
-               // Ensure that we get an empty string
+               /* Ensure that we get an empty string */
                value = g_strndup( "", 1 );
        }
        value[ len ] = '\0';
@@ -409,7 +409,7 @@ static void vcard_build_items( VCardFile *cardFile, GSList *listName, GSList *li
        }
 }
 
-// Unescape characters in quoted-printable string.
+/* Unescape characters in quoted-printable string. */
 static void vcard_unescape_qp( gchar *value ) {
        gchar *ptr, *src, *dest;
        gint d, v = 0;
@@ -438,7 +438,7 @@ static void vcard_unescape_qp( gchar *value ) {
                        }
                }
                if( gotch ) {
-                       // Replace = with char and move down in buffer
+                       /* Replace = with char and move down in buffer */
                        *ptr = v;
                        src = ptr + 3;
                        dest = ptr + 1;
@@ -453,29 +453,29 @@ static void vcard_unescape_qp( gchar *value ) {
 
 /*
 * Read file data into root folder.
-* Note that one VCard can have multiple E-Mail addresses (MAIL tags);
+* Note that one vCard can have multiple E-Mail addresses (MAIL tags);
 * these are broken out into separate address items. An address item
 * is generated for the person identified by FN tag and each EMAIL tag.
 * If a sub-type is included in the EMAIL entry, this will be used as
-* the Remarks member. Also note that it is possible for one VCard
+* the Remarks member. Also note that it is possible for one vCard
 * entry to have multiple FN tags; this might not make sense. However,
 * it will generate duplicate address entries for each person listed.
 */
 static void vcard_read_file( VCardFile *cardFile ) {
        gchar *tagtemp = NULL, *tagname = NULL, *tagvalue = NULL, *tagtype = NULL;
        GSList *listName = NULL, *listAddress = NULL, *listRemarks = NULL, *listID = NULL;
-       //GSList *listQP = NULL;
+       /* GSList *listQP = NULL; */
 
        for( ;; ) {
                gchar *line =  vcard_get_line( cardFile );
                if( line == NULL ) break;
 
-               // fprintf( stdout, "%s\n", line );
+               /* fprintf( stdout, "%s\n", line ); */
 
                /* Parse line */
                tagtemp = vcard_get_tagname( line, VCARD_SEP_TAG );
                if( tagtemp ) {
-                       // fprintf( stdout, "\ttemp:  %s\n", tagtemp );
+                       /* fprintf( stdout, "\ttemp:  %s\n", tagtemp ); */
                        tagvalue = vcard_get_tagvalue( line, VCARD_SEP_TAG );
                        tagname = vcard_get_tagname( tagtemp, VCARD_SEP_TYPE );
                        tagtype = vcard_get_tagvalue( tagtemp, VCARD_SEP_TYPE );
@@ -484,42 +484,42 @@ static void vcard_read_file( VCardFile *cardFile ) {
                                tagtemp = NULL;
                        }
 
-                       // fprintf( stdout, "\tname:  %s\n", tagname );
-                       // fprintf( stdout, "\ttype:  %s\n", tagtype );
-                       // fprintf( stdout, "\tvalue: %s\n", tagvalue );
+                       /* fprintf( stdout, "\tname:  %s\n", tagname ); */
+                       /* fprintf( stdout, "\ttype:  %s\n", tagtype ); */
+                       /* fprintf( stdout, "\tvalue: %s\n", tagvalue ); */
 
                        if( tagvalue ) {
                                if( g_strcasecmp( tagtype, VCARD_TYPE_QP ) == 0 ) {
-                                       // Quoted-Printable: could span multiple lines
+                                       /* Quoted-Printable: could span multiple lines */
                                        tagvalue = vcard_read_qp( cardFile, tagvalue );
                                        vcard_unescape_qp( tagvalue );
-                                       // fprintf( stdout, "QUOTED-PRINTABLE !!! final\n>%s<\n", tagvalue );
+                                       /* fprintf( stdout, "QUOTED-PRINTABLE !!! final\n>%s<\n", tagvalue ); */
                                }
 
                                if( g_strcasecmp( tagname, VCARD_TAG_START ) == 0 &&
                                        g_strcasecmp( tagvalue, VCARD_NAME ) == 0 ) {
-                                       // fprintf( stdout, "start card\n" );
+                                       /* fprintf( stdout, "start card\n" ); */
                                        vcard_free_lists( listName, listAddress, listRemarks, listID );
                                        listName = listAddress = listRemarks = listID = NULL;
                                }
                                if( g_strcasecmp( tagname, VCARD_TAG_FULLNAME ) == 0 ) {
-                                       // fprintf( stdout, "- full name: %s\n", tagvalue );
+                                       /* fprintf( stdout, "- full name: %s\n", tagvalue ); */
                                        listName = g_slist_append( listName, g_strdup( tagvalue ) );
                                }
                                if( g_strcasecmp( tagname, VCARD_TAG_EMAIL ) == 0 ) {
-                                       // fprintf( stdout, "- address: %s\n", tagvalue );
+                                       /* fprintf( stdout, "- address: %s\n", tagvalue ); */
                                        listAddress = g_slist_append( listAddress, g_strdup( tagvalue ) );
                                        listRemarks = g_slist_append( listRemarks, g_strdup( tagtype ) );
                                }
                                if( g_strcasecmp( tagname, VCARD_TAG_UID ) == 0 ) {
-                                       // fprintf( stdout, "- id: %s\n", tagvalue );
+                                       /* fprintf( stdout, "- id: %s\n", tagvalue ); */
                                        listID = g_slist_append( listID, g_strdup( tagvalue ) );
                                }
                                if( g_strcasecmp( tagname, VCARD_TAG_END ) == 0 &&
                                        g_strcasecmp( tagvalue, VCARD_NAME ) == 0 ) {
-                                       // VCard is complete
-                                       // fprintf( stdout, "end card\n--\n" );
-                                       // vcard_dump_lists( listName, listAddress, listRemarks, listID, stdout );
+                                       /* vCard is complete */
+                                       /* fprintf( stdout, "end card\n--\n" ); */
+                                       /* vcard_dump_lists( listName, listAddress, listRemarks, listID, stdout ); */
                                        vcard_build_items( cardFile, listName, listAddress, listRemarks, listID );
                                        vcard_free_lists( listName, listAddress, listRemarks, listID );
                                        listName = listAddress = listRemarks = listID = NULL;
@@ -531,17 +531,17 @@ static void vcard_read_file( VCardFile *cardFile ) {
                }
        }
 
-       // Free lists
+       /* Free lists */
        vcard_free_lists( listName, listAddress, listRemarks, listID );
        listName = listAddress = listRemarks = listID = NULL;
 }
 
-// ============================================================================================
+/* ============================================================================================ */
 /*
 * Read file into list. Main entry point
 * Return: TRUE if file read successfully.
 */
-// ============================================================================================
+/* ============================================================================================ */
 gint vcard_read_data( VCardFile *cardFile ) {
        g_return_val_if_fail( cardFile != NULL, -1 );
 
@@ -551,11 +551,11 @@ gint vcard_read_data( VCardFile *cardFile ) {
                addrcache_clear( cardFile->addressCache );
                vcard_open_file( cardFile );
                if( cardFile->retVal == MGU_SUCCESS ) {
-                       // Read data into the list
+                       /* Read data into the list */
                        vcard_read_file( cardFile );
                        vcard_close_file( cardFile );
 
-                       // Mark cache
+                       /* Mark cache */
                        addrcache_mark_file( cardFile->addressCache, cardFile->path );
                        cardFile->addressCache->modified = FALSE;
                        cardFile->addressCache->dataRead = TRUE;
@@ -650,7 +650,7 @@ gchar *vcard_find_gnomecard( void ) {
 
        fileSpec = NULL;
        if( ( fp = fopen( str, "r" ) ) != NULL ) {
-               // Read configuration file
+               /* Read configuration file */
                lenlbl = strlen( GNOMECARD_SECTION );
                while( fgets( buf, sizeof( buf ), fp ) != NULL ) {
                        if( 0 == g_strncasecmp( buf, GNOMECARD_SECTION, lenlbl ) ) {
@@ -674,7 +674,7 @@ gchar *vcard_find_gnomecard( void ) {
        }
 
        if( fileSpec == NULL ) {
-               // Use the home directory
+               /* Use the home directory */
                str[ len ] = '\0';
                fileSpec = g_strdup( str );
        }
@@ -683,7 +683,7 @@ gchar *vcard_find_gnomecard( void ) {
 }
 
 /*
-* Attempt to read file, testing for valid VCard format.
+* Attempt to read file, testing for valid vCard format.
 * Return: TRUE if file appears to be valid format.
 */
 gint vcard_test_read_file( const gchar *fileSpec ) {
@@ -718,7 +718,7 @@ gint vcard_test_read_file( const gchar *fileSpec ) {
 
                                if( tagvalue ) {
                                        if( g_strcasecmp( tagtype, VCARD_TYPE_QP ) == 0 ) {
-                                               // Quoted-Printable: could span multiple lines
+                                               /* Quoted-Printable: could span multiple lines */
                                                tagvalue = vcard_read_qp( cardFile, tagvalue );
                                                vcard_unescape_qp( tagvalue );
                                        }
@@ -728,7 +728,7 @@ gint vcard_test_read_file( const gchar *fileSpec ) {
                                        }
                                        if( g_strcasecmp( tagname, VCARD_TAG_END ) == 0 &&
                                                g_strcasecmp( tagvalue, VCARD_NAME ) == 0 ) {
-                                               // VCard is complete
+                                               /* vCard is complete */
                                                if( haveStart ) cardFile->retVal = MGU_SUCCESS;
                                        }
                                        g_free( tagvalue );
index ced8c7c..dc68e98 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 /*
- * Definitions necessary to access VCard files. VCard files are used
+ * Definitions necessary to access vCard files. vCard files are used
  * by GnomeCard for addressbook, and Netscape for sending business
  * card information. Refer to RFC2426 for more information.
  */
@@ -49,7 +49,7 @@
 #define        VCARD_SEP_TYPE     ';'
 
 /*
-// Typical VCard entry:
+// Typical vCard entry:
 //
 // BEGIN:VCARD
 // FN:Axle Rose
@@ -66,7 +66,7 @@
 // END:VCARD
 */
 
-// VCard object
+/* vCard object */
 typedef struct _VCardFile VCardFile;
 struct _VCardFile {
        gchar        *name;