2007-01-20 [colin] 2.7.1cvs41
authorColin Leroy <colin@colino.net>
Sat, 20 Jan 2007 20:39:34 +0000 (20:39 +0000)
committerColin Leroy <colin@colino.net>
Sat, 20 Jan 2007 20:39:34 +0000 (20:39 +0000)
* src/account.c
* src/account.h
* src/addrbook.c
* src/addrbook.h
* src/addrcache.c
* src/addrcache.h
* src/addrclip.c
* src/addrclip.h
* src/addressbook.c
* src/addressbook.h
* src/addrharvest.c
* src/addrharvest.h
* src/addrindex.c
* src/addrindex.h
* src/editaddress.c
* src/editaddress.h
Make functions that aren't used in other
files static

19 files changed:
ChangeLog
PATCHSETS
configure.ac
src/account.c
src/account.h
src/addrbook.c
src/addrbook.h
src/addrcache.c
src/addrcache.h
src/addrclip.c
src/addrclip.h
src/addressbook.c
src/addressbook.h
src/addrharvest.c
src/addrharvest.h
src/addrindex.c
src/addrindex.h
src/editaddress.c
src/editaddress.h

index 2938d9c38bb66fed112394602ab007246cf59796..2bff8ae711e5bdde4291ff2dc00e5814243304a6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2007-01-20 [colin]     2.7.1cvs41
+
+       * src/account.c
+       * src/account.h
+       * src/addrbook.c
+       * src/addrbook.h
+       * src/addrcache.c
+       * src/addrcache.h
+       * src/addrclip.c
+       * src/addrclip.h
+       * src/addressbook.c
+       * src/addressbook.h
+       * src/addrharvest.c
+       * src/addrharvest.h
+       * src/addrindex.c
+       * src/addrindex.h
+       * src/editaddress.c
+       * src/editaddress.h
+               Make functions that aren't used in other
+               files static
+
 2007-01-20 [colin]     2.7.1cvs40
 
        * src/account.c
index 61f2cc2788e1e6ae938aec829dcaf8d0ac686d21..91db0610368edf428b5a3af4fcfcb88d2afb67fc 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.3.2.11 -r 1.3.2.12 src/ldapquery.c;  cvs diff -u -r 1.1.4.6 -r 1.1.4.7 src/ldaputil.c;  cvs diff -u -r 1.1.4.5 -r 1.1.4.6 src/ldaputil.h;  ) > 2.7.1cvs38.patchset
 ( cvs diff -u -r 1.8.2.17 -r 1.8.2.18 src/editldap.c;  ) > 2.7.1cvs39.patchset
 ( cvs diff -u -r 1.61.2.56 -r 1.61.2.57 src/account.c;  cvs diff -u -r 1.22.2.12 -r 1.22.2.13 src/addrbook.c;  cvs diff -u -r 1.15.2.9 -r 1.15.2.10 src/addrcache.c;  cvs diff -u -r 1.60.2.77 -r 1.60.2.78 src/addressbook.c;  cvs diff -u -r 1.5.10.15 -r 1.5.10.16 src/addrgather.c;  cvs diff -u -r 1.28.2.21 -r 1.28.2.22 src/addrindex.c;  cvs diff -u -r 1.1.4.5 -r 1.1.4.6 src/addrquery.c;  cvs diff -u -r 1.3.2.5 -r 1.3.2.6 src/addrselect.c;  cvs diff -u -r 1.2.4.15 -r 1.2.4.16 src/browseldap.c;  cvs diff -u -r 1.382.2.353 -r 1.382.2.354 src/compose.c;  cvs diff -u -r 1.5.12.8 -r 1.5.12.9 src/editbook.c;  cvs diff -u -r 1.5.12.11 -r 1.5.12.12 src/editjpilot.c;  cvs diff -u -r 1.8.2.18 -r 1.8.2.19 src/editldap.c;  cvs diff -u -r 1.10.2.9 -r 1.10.2.10 src/editldap_basedn.c;  cvs diff -u -r 1.5.12.10 -r 1.5.12.11 src/editvcard.c;  cvs diff -u -r 1.5.2.16 -r 1.5.2.17 src/exporthtml.c;  cvs diff -u -r 1.1.4.14 -r 1.1.4.15 src/exportldif.c;  cvs diff -u -r 1.213.2.131 -r 1.213.2.132 src/folder.c;  cvs diff -u -r 1.207.2.144 -r 1.207.2.145 src/folderview.c;  cvs diff -u -r 1.1.2.15 -r 1.1.2.16 src/image_viewer.c;  cvs diff -u -r 1.179.2.154 -r 1.179.2.155 src/imap.c;  cvs diff -u -r 1.4.12.14 -r 1.4.12.15 src/importmutt.c;  cvs diff -u -r 1.1.14.14 -r 1.1.14.15 src/importpine.c;  cvs diff -u -r 1.18.2.22 -r 1.18.2.23 src/jpilot.c;  cvs diff -u -r 1.3.2.12 -r 1.3.2.13 src/ldapquery.c;  cvs diff -u -r 1.115.2.128 -r 1.115.2.129 src/main.c;  cvs diff -u -r 1.274.2.167 -r 1.274.2.168 src/mainwindow.c;  cvs diff -u -r 1.75.2.33 -r 1.75.2.34 src/matcher.c;  cvs diff -u -r 1.94.2.120 -r 1.94.2.121 src/messageview.c;  cvs diff -u -r 1.79.2.51 -r 1.79.2.52 src/mh.c;  cvs diff -u -r 1.83.2.99 -r 1.83.2.100 src/mimeview.c;  cvs diff -u -r 1.16.2.49 -r 1.16.2.50 src/msgcache.c;  cvs diff -u -r 1.6.10.10 -r 1.6.10.11 src/mutt.c;  cvs diff -u -r 1.101.2.35 -r 1.101.2.36 src/news.c;  cvs diff -u -r 1.6.2.9 -r 1.6.2.10 src/pine.c;  cvs diff -u -r 1.105.2.83 -r 1.105.2.84 src/prefs_account.c;  cvs diff -u -r 1.204.2.120 -r 1.204.2.121 src/prefs_common.c;  cvs diff -u -r 1.1.2.16 -r 1.1.2.17 src/prefs_compose_writing.c;  cvs diff -u -r 1.3.2.12 -r 1.3.2.13 src/prefs_ext_prog.c;  cvs diff -u -r 1.52.2.35 -r 1.52.2.36 src/prefs_folder_item.c;  cvs diff -u -r 1.4.2.18 -r 1.4.2.19 src/prefs_fonts.c;  cvs diff -u -r 1.1.2.22 -r 1.1.2.23 src/prefs_message.c;  cvs diff -u -r 1.1.2.30 -r 1.1.2.31 src/prefs_msg_colors.c;  cvs diff -u -r 1.1.2.16 -r 1.1.2.17 src/prefs_other.c;  cvs diff -u -r 1.1.2.16 -r 1.1.2.17 src/prefs_quote.c;  cvs diff -u -r 1.1.2.15 -r 1.1.2.16 src/prefs_receive.c;  cvs diff -u -r 1.1.2.13 -r 1.1.2.14 src/prefs_send.c;  cvs diff -u -r 1.5.2.31 -r 1.5.2.32 src/prefs_spelling.c;  cvs diff -u -r 1.1.2.34 -r 1.1.2.35 src/prefs_summaries.c;  cvs diff -u -r 1.30.2.31 -r 1.30.2.32 src/prefs_toolbar.c;  cvs diff -u -r 1.1.2.14 -r 1.1.2.15 src/prefs_wrapping.c;  cvs diff -u -r 1.10.2.12 -r 1.10.2.13 src/privacy.c;  cvs diff -u -r 1.49.2.88 -r 1.49.2.89 src/procmime.c;  cvs diff -u -r 1.150.2.87 -r 1.150.2.88 src/procmsg.c;  cvs diff -u -r 1.3.2.25 -r 1.3.2.26 src/ssl_manager.c;  cvs diff -u -r 1.5.2.15 -r 1.5.2.16 src/statusbar.c;  cvs diff -u -r 1.395.2.280 -r 1.395.2.281 src/summaryview.c;  cvs diff -u -r 1.43.2.59 -r 1.43.2.60 src/toolbar.c;  cvs diff -u -r 1.14.2.8 -r 1.14.2.9 src/vcard.c;  cvs diff -u -r 1.10.2.5 -r 1.10.2.6 src/common/hooks.c;  cvs diff -u -r 1.6.2.8 -r 1.6.2.9 src/common/log.c;  cvs diff -u -r 1.3.2.7 -r 1.3.2.8 src/common/passcrypt.c;  cvs diff -u -r 1.13.2.24 -r 1.13.2.25 src/common/socket.c;  cvs diff -u -r 1.9.2.18 -r 1.9.2.19 src/common/ssl.c;  cvs diff -u -r 1.4.2.16 -r 1.4.2.17 src/common/ssl_certificate.c;  cvs diff -u -r 1.2.4.17 -r 1.2.4.18 src/common/template.c;  cvs diff -u -r 1.36.2.95 -r 1.36.2.96 src/common/utils.c;  cvs diff -u -r 1.1.4.72 -r 1.1.4.73 src/etpan/imap-thread.c;  cvs diff -u -r 1.9.2.13 -r 1.9.2.14 src/gtk/sslcertwindow.c;  cvs diff -u -r 1.6.2.4 -r 1.6.2.5 src/gtk/sslcertwindow.h;  ) > 2.7.1cvs40.patchset
+( cvs diff -u -r 1.61.2.57 -r 1.61.2.58 src/account.c;  cvs diff -u -r 1.11.2.7 -r 1.11.2.8 src/account.h;  cvs diff -u -r 1.22.2.13 -r 1.22.2.14 src/addrbook.c;  cvs diff -u -r 1.7.2.2 -r 1.7.2.3 src/addrbook.h;  cvs diff -u -r 1.15.2.10 -r 1.15.2.11 src/addrcache.c;  cvs diff -u -r 1.9.2.5 -r 1.9.2.6 src/addrcache.h;  cvs diff -u -r 1.5.2.4 -r 1.5.2.5 src/addrclip.c;  cvs diff -u -r 1.1.14.4 -r 1.1.14.5 src/addrclip.h;  cvs diff -u -r 1.60.2.78 -r 1.60.2.79 src/addressbook.c;  cvs diff -u -r 1.18.2.7 -r 1.18.2.8 src/addressbook.h;  cvs diff -u -r 1.6.10.14 -r 1.6.10.15 src/addrharvest.c;  cvs diff -u -r 1.4.12.4 -r 1.4.12.5 src/addrharvest.h;  cvs diff -u -r 1.28.2.22 -r 1.28.2.23 src/addrindex.c;  cvs diff -u -r 1.9.2.10 -r 1.9.2.11 src/addrindex.h;  cvs diff -u -r 1.14.2.21 -r 1.14.2.22 src/editaddress.c;  cvs diff -u -r 1.3.2.5 -r 1.3.2.6 src/editaddress.h;  ) > 2.7.1cvs41.patchset
index b683ca49b379908bf2b9a700579347609925a977..a35283cda377d02ccb7f8cb2a8a7d107540f8c9d 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=7
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=40
+EXTRA_VERSION=41
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 53341f19d10501b2020796051f278726189636b2..580b89b36acfcb2abbc220b945f33e29e136eef4 100644 (file)
@@ -89,6 +89,9 @@ static struct EditAccount {
 static GdkPixbuf *mark_pixbuf;
 
 static void account_edit_create                (void);
+static void          account_destroy           (PrefsAccount   *ac_prefs);
+static void          account_set_as_default    (PrefsAccount   *ac_prefs);
+static void          account_set_menu          (void);
 
 static void account_edit_prefs         (GtkWidget *widget, gpointer data);
 static void account_delete             (GtkWidget *widget, gpointer data);
@@ -346,7 +349,7 @@ PrefsAccount *account_find_from_item(FolderItem *item)
        return ac;
 }
 
-void account_set_menu(void)
+static void account_set_menu(void)
 {
        main_window_set_account_menu(account_list);
 }
@@ -356,15 +359,6 @@ void account_set_menu_only_toolbar(void)
        main_window_set_account_menu_only_toolbar(account_list);
 }
 
-void account_foreach(AccountFunc func, gpointer user_data)
-{
-       GList *cur;
-
-       for (cur = account_list; cur != NULL; cur = cur->next)
-               if (func((PrefsAccount *)cur->data, user_data) != 0)
-                       return;
-}
-
 GList *account_get_list(void)
 {
        return account_list;
@@ -461,7 +455,7 @@ void account_open(PrefsAccount *ac_prefs)
        main_window_reflect_prefs_all();
 }
 
-void account_set_as_default(PrefsAccount *ac_prefs)
+static void account_set_as_default(PrefsAccount *ac_prefs)
 {
        PrefsAccount *ap;
        GList *cur;
index 81a7e1d786ecc47dd35be87dceb83bbaec839373..dbeb3cca5656a332650e174f815080123ea8015f 100644 (file)
@@ -42,17 +42,13 @@ PrefsAccount *account_find_from_address             (const gchar    *address);
 PrefsAccount *account_find_from_id             (gint            id);
 PrefsAccount *account_find_from_item           (FolderItem     *item);
 
-void         account_set_menu          (void);
 void         account_set_menu_only_toolbar     (void);
 
-void         account_foreach           (AccountFunc     func,
-                                        gpointer        user_data);
 GList       *account_get_list          (void);
 
 void         account_edit_open         (void);
 void         account_add               (void);
 void         account_open              (PrefsAccount   *ac_prefs);
-void         account_set_as_default    (PrefsAccount   *ac_prefs);
 void         account_set_as_recv_at_get_all    (PrefsAccount   *ac_prefs);
 PrefsAccount *account_get_default      (void);
 
@@ -60,7 +56,6 @@ void        account_set_missing_folder(void);
 FolderItem   *account_get_special_folder(PrefsAccount          *ac_prefs,
                                         SpecialFolderItemType   type);
 
-void         account_destroy           (PrefsAccount   *ac_prefs);
 PrefsAccount *account_get_reply_account        (MsgInfo        *msginfo, 
                                         gboolean        reply_autosel);
 void         account_rename_path       (const gchar    *old_id, 
index ff1e7d43bac4cb8e5c17a6b6fb711661ef385c1c..3b1dc2dddb0a1ab2bbe1db7e4cffa76eb6584d4c 100644 (file)
@@ -45,6 +45,8 @@
 
 #define ID_TIME_OFFSET            998000000
 
+static void addrbook_print_book                ( AddressBookFile *book, FILE *stream );
+
 /**
  * Create new address book
  * \return Address book.
@@ -114,17 +116,6 @@ gboolean addrbook_get_modified(AddressBookFile *book)
        return book->addressCache->modified;
 }
 
-/**
- * Specify book as modified.
- * \param book  Address book.
- * \param value Indicator.
- */
-void addrbook_set_modified(AddressBookFile *book, const gboolean value)
-{
-       g_return_if_fail(book != NULL);
-       book->addressCache->modified = value;
-}
-
 gboolean addrbook_get_accessed(AddressBookFile *book)
 {
        g_return_val_if_fail(book != NULL, FALSE);
@@ -148,17 +139,6 @@ gboolean addrbook_get_read_flag(AddressBookFile *book)
        return book->addressCache->dataRead;
 }
 
-/**
- * Specify address book as read.
- * \param book  Address book.
- * \param value Value.
- */
-void addrbook_set_read_flag(AddressBookFile *book, const gboolean value)
-{
-       g_return_if_fail(book != NULL);
-       book->addressCache->dataRead = value;
-}
-
 gint addrbook_get_status(AddressBookFile *book)
 {
        g_return_val_if_fail(book != NULL, -1);
@@ -200,28 +180,6 @@ void addrbook_set_dirty(AddressBookFile *book, const gboolean value)
        addrcache_set_dirty(book->addressCache, value);
 }
 
-/**
- * Empty address book contents.
- * \param book Address book.
- */
-void addrbook_empty_book(AddressBookFile *book)
-{
-       g_return_if_fail(book != NULL);
-
-       /* Free up internal objects */
-       addrcache_clear(book->addressCache);
-       addrcache_set_dirty(book->addressCache, FALSE);
-       g_list_free(book->tempList);
-
-       /* Reset to initial state */
-       book->tempList = NULL;
-       book->tempHash = NULL;
-       book->addressCache->dataRead = FALSE;
-       book->addressCache->modified = FALSE;
-       book->addressCache->accessFlag = FALSE;
-       book->retVal = MGU_SUCCESS;
-}
-
 /**
  * Free address book.
  * \param book Address book.
@@ -256,7 +214,7 @@ void addrbook_free_book(AddressBookFile *book)
  * \param book   Address book.
  * \param stream Output stream.
  */
-void addrbook_print_book(AddressBookFile *book, FILE *stream)
+static void addrbook_print_book(AddressBookFile *book, FILE *stream)
 {
        g_return_if_fail(book != NULL);
 
@@ -1301,48 +1259,6 @@ gint addrbook_save_data(AddressBookFile *book)
  * **********************************************************************
  */
 
-/**
- * Move email item within list of person's email items.
- * \param  book       Address book.
- * \param  person     Person.
- * \param  itemMove   EMail item to move.
- * \param  itemTarget EMail item to move before.
- * \return Moved item.
- */
-ItemEMail *addrbook_move_email_before(AddressBookFile *book, ItemPerson *person,
-                                     ItemEMail *itemMove, ItemEMail *itemTarget)
-{
-       ItemEMail *email = NULL;
-
-       g_return_val_if_fail(book != NULL, NULL);
-
-       email = addritem_move_email_before(person, itemMove, itemTarget);
-       if (email) 
-               addrcache_set_dirty(book->addressCache, TRUE);
-       return email;
-}
-
-/**
- * Move email item within list of person's email items.
- * \param  book       Address book.
- * \param  person     Person.
- * \param  itemMove   EMail item to move.
- * \param  itemTarget EMail item after which to move.
- * \return Moved item.
- */
-ItemEMail *addrbook_move_email_after(AddressBookFile *book, ItemPerson *person,
-                                    ItemEMail *itemMove, ItemEMail *itemTarget)
-{
-       ItemEMail *email = NULL;
-
-       g_return_val_if_fail(book != NULL, NULL);
-
-       email = addritem_move_email_after(person, itemMove, itemTarget);
-       if (email)
-               addrcache_set_dirty(book->addressCache, TRUE);
-       return email;
-}
-
 /**
  * Hash table callback function for simple deletion of hashtable entries.
  * \param  key   Table key (will be freed).
@@ -1761,42 +1677,6 @@ void addrbook_add_attrib_list( AddressBookFile *book, ItemPerson *person, GList
        addrcache_set_dirty( book->addressCache, TRUE );
 }
 
-/**
- * Remove folder from address book. Children are re-parented to the parent
- * folder.
- * \param  book   Address book.
- * \param  folder Folder to remove.
- * \return Folder, or <i>NULL</i> if not found. Note that object should still
- *         be freed.
- */
-ItemFolder *addrbook_remove_folder(AddressBookFile *book, ItemFolder *folder)
-{
-       ItemFolder *f;
-
-       g_return_val_if_fail(book != NULL, NULL);
-
-       f = addrcache_remove_folder(book->addressCache, folder);
-       return f;
-}
-
-/**
- * Remove folder from address book. Children are deleted.
- * \param  book   Address book.
- * \param  folder Folder to remove.
- * \return Folder, or <i>NULL</i> if not found. Note that object should still
- *         be freed.
- */
-ItemFolder *addrbook_remove_folder_delete(AddressBookFile *book, 
-                                         ItemFolder *folder)
-{
-       ItemFolder *f;
-
-       g_return_val_if_fail(book != NULL, NULL);
-
-       f = addrcache_remove_folder_delete(book->addressCache, folder);
-       return f;
-}
-
 #define WORK_BUFLEN     1024
 #define ADDRBOOK_DIGITS "0123456789"
 
index d67c9d442e9a2d555f991c112143f71692c61111..b10ce1b2f63a2a82a4f9588a43fc8682f21c4c9e 100644 (file)
@@ -50,20 +50,16 @@ struct _AddressBookFile {
 /* Function prototypes */
 
 AddressBookFile *addrbook_create_book  ( void );
-void addrbook_empty_book               ( AddressBookFile *book );
+
 void addrbook_free_book                        ( AddressBookFile *book );
-void addrbook_print_book               ( AddressBookFile *book, FILE *stream );
-void addrbook_dump_hash                        ( AddressBookFile *book, FILE *stream );
 void addrbook_dump_book                        ( AddressBookFile *book, FILE *stream );
 void addrbook_set_name                 ( AddressBookFile *book, const gchar *value );
 void addrbook_set_path                 ( AddressBookFile *book, const gchar *value );
 void addrbook_set_file                 ( AddressBookFile *book, const gchar *value );
 gboolean addrbook_get_modified         ( AddressBookFile *book );
-void addrbook_set_modified             ( AddressBookFile *book, const gboolean value );
 gboolean addrbook_get_accessed         ( AddressBookFile *book );
 void addrbook_set_accessed             ( AddressBookFile *book, const gboolean value );
 gboolean addrbook_get_read_flag                ( AddressBookFile *book );
-void addrbook_set_read_flag            ( AddressBookFile *book, const gboolean value );
 gint addrbook_get_status               ( AddressBookFile *book );
 ItemFolder *addrbook_get_root_folder   ( AddressBookFile *book );
 GList *addrbook_get_list_folder                ( AddressBookFile *book );
@@ -80,11 +76,6 @@ ItemEMail *addrbook_person_remove_email      ( AddressBookFile *book, ItemPerson *per
 gint addrbook_read_data                        ( AddressBookFile *book );
 gint addrbook_save_data                        ( AddressBookFile *book );
 
-ItemEMail *addrbook_move_email_before  ( AddressBookFile *book, ItemPerson *person,
-                                         ItemEMail *itemMove, ItemEMail *itemTarget );
-ItemEMail *addrbook_move_email_after   ( AddressBookFile *book, ItemPerson *person,
-                                         ItemEMail *itemMove, ItemEMail *itemTarget );
-
 void addrbook_update_address_list      ( AddressBookFile *book, ItemPerson *person,
                                          GList *listEMail );
 ItemPerson *addrbook_add_address_list  ( AddressBookFile *book, ItemFolder *folder,
@@ -101,9 +92,6 @@ void addrbook_update_attrib_list     ( AddressBookFile *book, ItemPerson *person,
 void addrbook_add_attrib_list          ( AddressBookFile *book, ItemPerson *person,
                                          GList *listAttrib );
 
-ItemFolder *addrbook_remove_folder     ( AddressBookFile *book, ItemFolder *folder );
-ItemFolder *addrbook_remove_folder_delete( AddressBookFile *book, ItemFolder *folder );
-
 GList *addrbook_get_bookfile_list      ( AddressBookFile *book );
 gchar *addrbook_gen_new_file_name      ( gint fileNum );
 gint addrbook_test_read_file           ( AddressBookFile *book, gchar *fileName );
index 7f4175df94f9a96cc8011835ba2b9b545115b19f..ce03ab4ac4830d1cd1902071504b01907665dac0 100644 (file)
@@ -103,30 +103,6 @@ void addrcache_set_dirty( AddressCache *cache, const gboolean value ) {
        g_return_if_fail( cache != NULL );
        cache->dirtyFlag = value;
 }
-gboolean addrcache_get_modified( AddressCache *cache ) {
-       g_return_val_if_fail( cache != NULL, FALSE );
-       return cache->modified;
-}
-void addrcache_set_modified( AddressCache *cache, const gboolean value ) {
-       g_return_if_fail( cache != NULL );
-       cache->modified = value;
-}
-gboolean addrcache_get_read_flag( AddressCache *cache ) {
-       g_return_val_if_fail( cache != NULL, FALSE );
-       return cache->dataRead;
-}
-void addrcache_set_read_flag( AddressCache *cache, const gboolean value ) {
-       g_return_if_fail( cache != NULL );
-       cache->dataRead = value;
-}
-gboolean addrcache_get_accessed( AddressCache *cache ) {
-       g_return_val_if_fail( cache != NULL, FALSE );
-       return cache->accessFlag;
-}
-void addrcache_set_accessed( AddressCache *cache, const gboolean value ) {
-       g_return_if_fail( cache != NULL );
-       cache->accessFlag = value;
-}
 gchar *addrcache_get_name( AddressCache *cache ) {
        g_return_val_if_fail( cache != NULL, NULL );
        return cache->name;
@@ -292,47 +268,6 @@ gboolean addrcache_mark_file( AddressCache *cache, gchar *path ) {
        return retVal;
 }
 
-/*
-* Print list of items.
-*/
-void addrcache_print_item_list( GList *list, FILE *stream ) {
-       GList *node = list;
-       while( node ) {
-               AddrItemObject *obj = node->data;
-               if( ADDRITEM_TYPE(obj) == ITEMTYPE_PERSON ) {
-                       addritem_print_item_person( ( ItemPerson * ) obj, stream );
-               }
-               else if( ADDRITEM_TYPE(obj) == ITEMTYPE_GROUP ) {
-                       addritem_print_item_group( ( ItemGroup * ) obj, stream );
-               }
-               else if( ADDRITEM_TYPE(obj) == ITEMTYPE_FOLDER ) {
-                       addritem_print_item_folder( ( ItemFolder * ) obj, stream );
-               }
-               node = g_list_next( node );
-       }
-       fprintf( stream, "\t---\n" );
-}
-
-/*
-* Print item hash table visitor function.
-*/
-static void addrcache_print_item_vis( gpointer key, gpointer value, gpointer data ) {
-       AddrItemObject *obj = ( AddrItemObject * ) value;
-       FILE *stream = ( FILE * ) data;
-       if( ADDRITEM_TYPE(obj) == ITEMTYPE_PERSON ) {
-               addritem_print_item_person( ( ItemPerson * ) obj, stream );
-       }
-       else if( ADDRITEM_TYPE(obj) == ITEMTYPE_EMAIL ) {
-               printf( "addrcache: print email\n" );
-       }
-       else if( ADDRITEM_TYPE(obj) == ITEMTYPE_GROUP ) {
-               addritem_print_item_group( ( ItemGroup * ) obj, stream );
-       }
-       else if( ADDRITEM_TYPE(obj) == ITEMTYPE_FOLDER ) {
-               addritem_print_item_folder( ( ItemFolder * ) obj, stream );
-       }
-}
-
 /*
 * Dump entire address cache hash table contents.
 */
@@ -347,15 +282,6 @@ void addrcache_print( AddressCache *cache, FILE *stream ) {
        fprintf( stream, "data read: %s\n",  cache->dataRead ? "yes" : "no" );
 }
 
-/*
-* Dump entire address cache hash table contents.
-*/
-void addrcache_dump_hash( AddressCache *cache, FILE *stream ) {
-       g_return_if_fail( cache != NULL );
-       addrcache_print( cache, stream );
-       g_hash_table_foreach( cache->itemHash, addrcache_print_item_vis, stream );
-}
-
 /*
  * Allocate ID for person.
  */
@@ -695,40 +621,6 @@ AddrItemObject *addrcache_get_object( AddressCache *cache, const gchar *uid ) {
        return NULL;
 }
 
-/*
-* Return pointer for specified object ID.
-* param: uid Object ID.
-* return: Person object, or NULL if not found.
-*/
-ItemPerson *addrcache_get_person( AddressCache *cache, const gchar *uid ) {
-       ItemPerson *person = NULL;
-       AddrItemObject *obj = addrcache_get_object( cache, uid );
-
-       if( obj ) {
-               if( ADDRITEM_TYPE(obj) == ITEMTYPE_PERSON ) {
-                       person = ( ItemPerson * ) obj;
-               }
-       }
-       return person;
-}
-
-/*
-* Return pointer for specified object ID.
-* param: uid group ID.
-* return: Group object, or NULL if not found.
-*/
-ItemGroup *addrcache_get_group( AddressCache *cache, const gchar *uid ) {
-       ItemGroup *group = NULL;
-       AddrItemObject *obj = addrcache_get_object( cache, uid );
-
-       if( obj ) {
-               if( ADDRITEM_TYPE(obj) == ITEMTYPE_GROUP ) {
-                       group = ( ItemGroup * ) obj;
-               }
-       }
-       return group;
-}
-
 /*
 * Find email address in address cache.
 * param: eid   EMail ID.
@@ -746,44 +638,6 @@ ItemEMail *addrcache_get_email( AddressCache *cache, const gchar *eid ) {
        return email;
 }
 
-/*
-* Remove attribute from person.
-* param: uid   Object ID for person.
-*        aid   Attribute ID.
-* return: UserAttribute object, or NULL if not found. Note that object should still be freed.
-*/
-UserAttribute *addrcache_person_remove_attrib_id( AddressCache *cache, const gchar *uid, const gchar *aid ) {
-       UserAttribute *attrib = NULL;
-       ItemPerson *person;
-
-       if( aid == NULL || *aid == '\0' ) return NULL;
-
-       person = addrcache_get_person( cache, uid );
-       if( person ) {
-               attrib = addritem_person_remove_attrib_id( person, aid );
-               cache->dirtyFlag = TRUE;
-       }
-       return attrib;
-}
-
-/*
-* Remove attribute from person.
-* param: person        Person.
-*        attrib        Attribute to remove.
-* return: UserAttribute object. Note that object should still be freed.
-*/
-UserAttribute *addrcache_person_remove_attribute( AddressCache *cache, ItemPerson *person, UserAttribute *attrib ) {
-       UserAttribute *found = NULL;
-
-       g_return_val_if_fail( cache != NULL, NULL );
-
-       if( person && attrib ) {
-               found = addritem_person_remove_attribute( person, attrib );
-               cache->dirtyFlag = TRUE;
-       }
-       return found;
-}
-
 /*
 * Remove group from address cache.
 * param: group Group to remove.
@@ -969,129 +823,6 @@ void addrcache_person_move_email(
        }
 }
 
-/*
-* Return link list of address items for root level folder. Note that the list contains
-* references to items and should be g_free() when done. Do *NOT* attempt to use the
-* addrcache_free_xxx() functions... this will destroy the address cache data!
-* Return: List of items, or NULL if none.
-*/
-GList *addrcache_folder_get_address_list( AddressCache *cache, ItemFolder *folder ) {
-       GList *list = NULL;
-       GList *node = NULL;
-       ItemFolder *f = folder;
-
-       g_return_val_if_fail( cache != NULL, NULL );
-
-       if( ! f ) f = cache->rootFolder;
-       node = f->listPerson;
-       while( node ) {
-               list = g_list_append( list, node->data );
-               node = g_list_next( node );
-       }
-       node = f->listGroup;
-       while( node ) {
-               list = g_list_append( list, node->data );
-               node = g_list_next( node );
-       }
-       return list;
-}
-
-/*
-* Return link list of persons for specified folder. Note that the list contains
-* references to items and should be g_free() when done. Do *NOT* attempt to use the
-* addrcache_free_xxx() functions... this will destroy the address cache data!
-* Return: List of items, or NULL if none.
-*/
-GList *addrcache_folder_get_person_list( AddressCache *cache, ItemFolder *folder ) {
-       ItemFolder *f = folder;
-
-       g_return_val_if_fail( cache != NULL, NULL );
-
-       if( ! f ) f = cache->rootFolder;
-       return addritem_folder_get_person_list( f );
-}
-
-/*
-* Return link list of group items for specified folder. Note that the list contains
-* references to items and should be g_free() when done. Do *NOT* attempt to use the
-* addrcache_free_xxx() functions... this will destroy the address cache data!
-* Return: List of items, or NULL if none.
-*/
-GList *addrcache_folder_get_group_list( AddressCache *cache, ItemFolder *folder ) {
-       ItemFolder *f = folder;
-
-       g_return_val_if_fail( cache != NULL, NULL );
-
-       if( ! f ) f = cache->rootFolder;
-       return addritem_folder_get_group_list( f );
-}
-
-/*
-* Return link list of folder items for specified folder. Note that the list contains
-* references to items and should be g_free() when done. Do *NOT* attempt to used the
-* addrcache_free_xxx() functions... this will destroy the address cache data!
-* Return: List of items, or NULL if none.
-*/
-GList *addrcache_folder_get_folder_list( AddressCache *cache, ItemFolder *folder ) {
-       GList *node = NULL;
-       GList *list = NULL;
-       ItemFolder *f = folder;
-
-       g_return_val_if_fail( cache != NULL, NULL );
-
-       if( ! f ) f = cache->rootFolder;
-       node = f->listFolder;
-       while( node ) {
-               list = g_list_append( list, node->data );
-               node = g_list_next( node );
-       }
-       return list;
-}
-
-/*
-* Return link list of address items for root level folder. Note that the list contains
-* references to items and should be g_free() when done. Do *NOT* attempt to used the
-* addrcache_free_xxx() functions... this will destroy the address cache data!
-* Return: List of items, or NULL if none.
-*/
-GList *addrcache_get_address_list( AddressCache *cache ) {
-       g_return_val_if_fail( cache != NULL, NULL );
-       return addrcache_folder_get_address_list( cache, cache->rootFolder );
-}
-
-/*
-* Return link list of persons for root level folder. Note that the list contains
-* references to items and should be g_free() when done. Do *NOT* attempt to used the
-* addrcache_free_xxx() functions... this will destroy the address cache data!
-* Return: List of items, or NULL if none.
-*/
-GList *addrcache_get_person_list( AddressCache *cache ) {
-       g_return_val_if_fail( cache != NULL, NULL );
-       return addritem_folder_get_person_list( cache->rootFolder );
-}
-
-/*
-* Return link list of group items in root level folder. Note that the list contains
-* references to items and should be g_free() when done. Do *NOT* attempt to used the
-* addrcache_free_xxx() functions... this will destroy the address cache data!
-* Return: List of items, or NULL if none.
-*/
-GList *addrcache_get_group_list( AddressCache *cache ) {
-       g_return_val_if_fail( cache != NULL, NULL );
-       return cache->rootFolder->listGroup;
-}
-
-/*
-* Return link list of folder items in root level folder. Note that the list contains
-* references to items and should be g_free() when done. Do *NOT* attempt to used the
-* addrcache_free_xxx() functions... this will destroy the address cache data!
-* Return: List of items, or NULL if none.
-*/
-GList *addrcache_get_folder_list( AddressCache *cache ) {
-       g_return_val_if_fail( cache != NULL, NULL );
-       return cache->rootFolder->listFolder;
-}
-
 /*
 * Group visitor function.
 */
@@ -1133,26 +864,6 @@ GList *addrcache_get_group_for_person( AddressCache *cache, ItemPerson *person )
        return list;
 }
 
-/*
-* Find root folder for specified folder.
-* Enter: folder Folder to search.
-* Return: root folder, or NULL if not found.
-*/
-ItemFolder *addrcache_find_root_folder( ItemFolder *folder ) {
-       ItemFolder *item = folder;
-       gint count = 0;
-
-       while( item ) {
-               if( item->isRoot ) break;
-               if( ++count > ADDRCACHE_MAX_SEARCH_COUNT ) {
-                       item = NULL;
-                       break;
-               }
-               item = ( ItemFolder * ) ADDRITEM_PARENT(folder);
-       }
-       return item;
-}
-
 /*
 * Get all person visitor function.
 */
index 97636e709c706b67b69840968251462c616f7017..d0c2ed7e34380f37134376c8293a85a9a104c847 100644 (file)
@@ -54,15 +54,6 @@ GList *addrcache_get_list_person     ( AddressCache *cache );
 gboolean addrcache_get_dirty           ( AddressCache *cache );
 void addrcache_set_dirty               ( AddressCache *cache,
                                          const gboolean value );
-gboolean addrcache_get_modified                ( AddressCache *cache );
-void addrcache_set_modified            ( AddressCache *cache,
-                                         const gboolean value );
-gboolean addrcache_get_read_flag       ( AddressCache *cache );
-void addrcache_set_read_flag           ( AddressCache *cache,
-                                         const gboolean value );
-gboolean addrcache_get_accessed                ( AddressCache *cache );
-void addrcache_set_accessed            ( AddressCache *cache,
-                                         const gboolean value );
 gchar *addrcache_get_name              ( AddressCache *cache );
 void addrcache_set_name                        ( AddressCache *cache,
                                          const gchar *value );
@@ -73,9 +64,7 @@ void addrcache_free                   ( AddressCache *cache );
 gboolean addrcache_check_file          ( AddressCache *cache, gchar *path );
 gboolean addrcache_mark_file           ( AddressCache *cache, gchar *path );
 
-void addrcache_print_item_list         ( GList *list, FILE *stream );
 void addrcache_print                   ( AddressCache *cache, FILE *stream );
-void addrcache_dump_hash               ( AddressCache *cache, FILE *stream );
 
 void addrcache_id_person               ( AddressCache *cache, ItemPerson *person );
 void addrcache_id_group                        ( AddressCache *cache, ItemGroup *group );
@@ -121,16 +110,8 @@ void addrcache_folder_move_folder  ( AddressCache *cache,
                                          ItemFolder *target );
 
 AddrItemObject *addrcache_get_object   ( AddressCache *cache, const gchar *uid );
-ItemPerson *addrcache_get_person       ( AddressCache *cache, const gchar *uid );
-ItemGroup *addrcache_get_group         ( AddressCache *cache, const gchar *uid );
 ItemEMail *addrcache_get_email         ( AddressCache *cache, const gchar *eid );
 
-UserAttribute *addrcache_person_remove_attrib_id( AddressCache *cache,
-                                                 const gchar *uid,
-                                                 const gchar *aid );
-UserAttribute *addrcache_person_remove_attribute( AddressCache *cache,
-                                                 ItemPerson *person,
-                                                 UserAttribute *attrib );
 
 ItemGroup *addrcache_remove_group      ( AddressCache *cache, ItemGroup *group );
 ItemPerson *addrcache_remove_person    ( AddressCache *cache, ItemPerson *person );
@@ -143,19 +124,9 @@ void addrcache_person_move_email   ( AddressCache *cache,
                                          ItemEMail *email,
                                          ItemPerson *target );
 
-GList *addrcache_folder_get_address_list( AddressCache *cache, ItemFolder *folder );
-GList *addrcache_folder_get_person_list        ( AddressCache *cache, ItemFolder *folder );
-GList *addrcache_folder_get_group_list ( AddressCache *cache, ItemFolder *folder );
-GList *addrcache_folder_get_folder_list        ( AddressCache *cache, ItemFolder *folder );
-
-GList *addrcache_get_address_list      ( AddressCache *cache );
-GList *addrcache_get_person_list       ( AddressCache *cache );
-GList *addrcache_get_group_list                ( AddressCache *cache );
-GList *addrcache_get_folder_list       ( AddressCache *cache );
 
 GList *addrcache_get_group_for_person  ( AddressCache *cache, ItemPerson *person );
 
-ItemFolder *addrcache_find_root_folder ( ItemFolder *folder );
 GList *addrcache_get_all_persons       ( AddressCache *cache );
 GList *addrcache_get_all_groups                ( AddressCache *cache );
 
index da7d0fda836d0bf2dd4691d868a6a2402eef527d..27bedb89a8a083be6d1ea6707788b6a10d08314a 100644 (file)
@@ -142,24 +142,6 @@ void addrclip_add( AddressClipboard *clipBoard, AddrSelectList *asl ) {
        }
 }
 
-/*
-* Add a single address selection objects to clipbard.
-* Enter: clipBoard Clipboard.
-*        item      Address selection object.
-*/
-void addrclip_add_item(
-       AddressClipboard *clipBoard, AddrSelectItem *item )
-{
-       g_return_if_fail( clipBoard != NULL );
-       if( item ) {
-               AddrSelectItem *itemCopy;
-
-               itemCopy = addrselect_item_copy( item );
-               clipBoard->objectList =
-                       g_list_append( clipBoard->objectList, itemCopy );
-       }
-}
-
 /*
 * Show clipboard contents.
 * Enter: clipBoard Clipboard.
@@ -821,229 +803,6 @@ static gint addrclip_copy_email_to_person(
        return cnt;
 }
 
-/*
-* Paste (copy) E-Mail addresses from clipboard into specified person.
-* Enter: clipBoard Clipboard.
-*        cache     Target address cache.
-*        person    Target person where data is pasted.
-* Return: Number of EMail records added.
-*/
-static gint addrclip_copyto_person(
-       AddressClipboard *clipBoard, AddressCache *cache, ItemPerson *person )
-{
-       gint cnt;
-       GList *node;
-
-       cnt = 0;
-       node = clipBoard->objectList;
-       while( node ) {
-               AddressCache *cacheFrom;
-               AddrSelectItem *item;
-               AddrItemObject *aio;
-
-               item = node->data;
-               node = g_list_next( node );
-               cacheFrom = addrindex_get_cache(
-                               clipBoard->addressIndex, item->cacheID );
-               if( cacheFrom == NULL ) continue;
-               aio = addrcache_get_object( cacheFrom, item->uid );
-               if( aio ) {
-                       cnt += addrclip_copy_email_to_person( aio, cache, person );
-               }
-       }
-       return cnt;
-}
-
-/*
-* Paste (copy) E-Mail addresses from clipboard into specified person.
-* Enter: clipBoard Clipboard.
-*        book      Target address book.
-*        person    Target person where data is pasted.
-* Return: Number of EMail records added.
-*/
-gint addrclip_paste_person_copy(
-       AddressClipboard *clipBoard, AddressBookFile *book,
-       ItemPerson *person )
-{
-       gint cnt;
-       AddressCache *cache;
-
-       cnt = 0;
-       g_return_val_if_fail( clipBoard != NULL, cnt );
-
-       cache = book->addressCache;
-       if( person ) {
-               cnt = addrclip_copyto_person( clipBoard, cache, person );
-       }
-       return cnt;
-}
-
-/*
- * Move email addresses for specified person to target person.
- * Enter: cache      Address cache to paste into.
- *        fromPerson Person supplying email addresses.
- *        target     Person to receive email addresses.
- * Return: Number of addresses moved.
- */
-static gint addrclip_person_move_email(
-       AddressCache *cache, ItemPerson *fromPerson, ItemPerson *target )
-{
-       gint cnt;
-       GList *node;
-
-       cnt = 0;
-       while( (node = fromPerson->listEMail) != NULL ) {
-               ItemEMail *email;
-
-               email = node->data;
-               addrcache_person_move_email( cache, email, target );
-               cnt++;
-       }
-       return cnt;
-}
-
-/*
-* Paste (cut) E-Mail addresses from clipboard into specified person.
-* Enter: clipBoard Clipboard.
-*        cache     Target address cache.
-*        person    Target person where data is pasted.
-* Return: Number of EMail records added.
-*/
-static gint addrclip_paste_person_move(
-       AddressClipboard *clipBoard, AddressCache *cache, ItemPerson *person )
-{
-       gint cnt;
-       AddressCache *cacheFrom;
-       AddrSelectItem *item;
-       AddrItemObject *aio;
-       GList *node;
-       GList *listEMail;
-
-       cnt = 0;
-       node = clipBoard->objectList;
-       while( node ) {
-               item = node->data;
-               node = g_list_next( node );
-               cacheFrom = addrindex_get_cache(
-                               clipBoard->addressIndex, item->cacheID );
-               if( cacheFrom == NULL ) continue;
-               aio = addrcache_get_object( cacheFrom, item->uid );
-               if( aio ) {
-                       if( ADDRITEM_TYPE(aio) == ITEMTYPE_PERSON ) {
-                               ItemPerson *fromPerson;
-
-                               fromPerson = ( ItemPerson * ) aio;
-                               cnt += addrclip_person_move_email(
-                                       cache, fromPerson, person );
-
-                               if( addritem_person_empty( fromPerson ) ) {
-                                       fromPerson =
-                                               addrcache_remove_person(
-                                                       cacheFrom, fromPerson );
-                                       if( fromPerson != NULL ) {
-                                               addritem_free_item_person( fromPerson );
-                                       }
-                               }
-                               fromPerson = NULL;
-                       }
-                       else if( ADDRITEM_TYPE(aio) == ITEMTYPE_EMAIL ) {
-                               ItemEMail *email;
-
-                               email = ( ItemEMail * ) aio;
-                               addrcache_person_move_email(
-                                       cache, email, person );
-                               cnt++;
-                       }
-                       else if( ADDRITEM_TYPE(aio) == ITEMTYPE_GROUP ) {
-                               ItemGroup *group;
-
-                               group = ( ItemGroup * ) aio;
-                               listEMail = group->listEMail;
-                               cnt += addrclip_person_add_email(
-                                       cache, person, listEMail );
-                       }
-               }
-       }
-       return cnt;
-}
-
-/*
-* Paste (cut) E-Mail addresses from clipboard into specified person.
-* Enter: clipBoard Clipboard.
-*        book      Target address book.
-*        person    Target person where data is pasted.
-* Return: Number of EMail records added.
-*/
-gint addrclip_paste_person_cut(
-       AddressClipboard *clipBoard, AddressBookFile *book,
-       ItemPerson *person )
-{
-       gint cnt;
-       AddressCache *cache, *cacheFrom;
-
-       cnt = 0;
-       g_return_val_if_fail( clipBoard != NULL, cnt );
-
-       cache = book->addressCache;
-       if( person ) {
-               clipBoard->moveFlag = FALSE;
-               cacheFrom = addrclip_list_get_cache( clipBoard );
-               if( cacheFrom && cacheFrom == cache ) {
-                       cnt = addrclip_paste_person_move(
-                               clipBoard, cache, person );
-                       clipBoard->moveFlag = TRUE;
-               }
-               else {
-                       /* Move items across address books */
-                       cnt = addrclip_copyto_person(
-                               clipBoard, cache, person );
-               }
-       }
-       return cnt;
-}
-
-/*
-* Remove address items that were cut from clipboard. Note that that only
-* E-Mail items are actually deleted. Any Person items will not be deleted
-* (not even E-Mail items that owned by a person). Any Group or Folder
-* items will *NOT* be deleted.
-* Enter: clipBoard Clipboard.
-*/
-void addrclip_delete_address( AddressClipboard *clipBoard ) {
-       AddrSelectItem *item;
-       AddrItemObject *aio;
-       AddressCache *cacheFrom;
-       GList *node;
-
-       /* If cutting within current cache, no deletion is necessary */
-       if( clipBoard->moveFlag ) return;
-
-       /* Remove groups */
-       node = clipBoard->objectList;
-       while( node ) {
-               item = node->data;
-               node = g_list_next( node );
-               cacheFrom = addrindex_get_cache(
-                               clipBoard->addressIndex, item->cacheID );
-               if( cacheFrom == NULL ) continue;
-               aio = addrcache_get_object( cacheFrom, item->uid );
-               if( aio ) {
-                       if( ADDRITEM_TYPE(aio) == ITEMTYPE_EMAIL ) {
-                               ItemEMail *email;
-                               ItemPerson *person;
-
-                               email = ( ItemEMail * ) aio;
-                               person = ( ItemPerson * ) ADDRITEM_PARENT(email);
-                               email = addrcache_person_remove_email(
-                                               cacheFrom, person, email );
-                               if( email ) {
-                                       addritem_free_item_email( email );
-                               }
-                       }
-               }
-       }
-}
-
 /*
 * End of Source.
 */
index df0aef0808d21e44e564bad9ffa9c4d79089327f..3136236d0927f58f9b5fd6a3f5c9052c44d0ebc9 100644 (file)
@@ -51,12 +51,6 @@ void addrclip_set_index              ( AddressClipboard *clipBoard,
                                  AddressIndex *addrIndex );
 void addrclip_add              ( AddressClipboard *clipBoard,
                                  AddrSelectList *asl );
-/*
-void addrclip_add              ( AddressClipboard *clipBoard,
-                                 GList *addrList );
-*/
-void addrclip_add_item         ( AddressClipboard *clipBoard,
-                                 AddrSelectItem *item );
 gboolean addrclip_is_empty     ( AddressClipboard *clipBoard );
 void addrclip_list_show                ( AddressClipboard *clipBoard,
                                  FILE *stream );
@@ -67,13 +61,6 @@ GList *addrclip_paste_copy   ( AddressClipboard *clipBoard,
 GList *addrclip_paste_cut      ( AddressClipboard *clipBoard,
                                  AddressBookFile *book,
                                  ItemFolder *folder );
-void addrclip_delete_address   ( AddressClipboard *clipBoard );
-gint addrclip_paste_person_copy        ( AddressClipboard *clipBoard,
-                                 AddressBookFile *book,
-                                 ItemPerson *person );
-gint addrclip_paste_person_cut ( AddressClipboard *clipBoard,
-                                 AddressBookFile *book,
-                                 ItemPerson *person );
 
 #endif /* __ADDRRESS_CLIP_H__ */
 
index 2e0caa0664b056c382937121efd208066dafe645..72f01aca0c39f419358abe563b8e4d81bdb6acdf 100644 (file)
@@ -183,6 +183,10 @@ static AddressBook_win addrbook;
 static GHashTable *_addressBookTypeHash_ = NULL;
 static GList *_addressBookTypeList_ = NULL;
 
+static void addressbook_new_address_from_book_post_cb( ItemPerson *person );
+static void addressbook_new_address_from_folder_post_cb( ItemPerson *person );
+static void addressbook_edit_address_post_cb( ItemPerson *person );
+
 static void addressbook_create                 (void);
 static gint addressbook_close                  (void);
 static void addressbook_button_set_sensitive   (void);
@@ -2832,7 +2836,7 @@ static void addressbook_treenode_delete_cb(
        }
 }
 
-void addressbook_new_address_from_book_post_cb( ItemPerson *person )
+static void addressbook_new_address_from_book_post_cb( ItemPerson *person )
 {
        if( person && addrbook.treeSelected == addrbook.opened ) {
                gtk_clist_unselect_all( GTK_CLIST(addrbook.clist) );
@@ -2842,7 +2846,7 @@ void addressbook_new_address_from_book_post_cb( ItemPerson *person )
        addressbook_address_list_set_focus();
 }
 
-void addressbook_new_address_from_folder_post_cb( ItemPerson *person )
+static void addressbook_new_address_from_folder_post_cb( ItemPerson *person )
 {
        if( person && addrbook.treeSelected == addrbook.opened) {
                gtk_sctree_select( GTK_SCTREE(addrbook.ctree), addrbook.opened );
@@ -2967,7 +2971,7 @@ static void addressbook_move_nodes_up( GtkCTree *ctree, GtkCTreeNode *node ) {
        }
 }
 
-void addressbook_edit_address_post_cb( ItemPerson *person )
+static void addressbook_edit_address_post_cb( ItemPerson *person )
 {
        if( person ) {
                addressbook_folder_refresh_one_person( GTK_CTREE(addrbook.clist), person );
index 4f9b274e34b8f4dad14a981b78f9e562db90d300..18cc985fbf5982104ccf743ecf9a3957634c336a 100644 (file)
@@ -58,9 +58,6 @@ void addressbook_harvest              ( FolderItem *folderItem,
                                          GList *msgList);
 
 void addressbook_read_all              ( void );
-void addressbook_new_address_from_book_post_cb( ItemPerson *person );
-void addressbook_new_address_from_folder_post_cb( ItemPerson *person );
-void addressbook_edit_address_post_cb( ItemPerson *person );
 void addressbook_address_list_set_focus( void );
 void addressbook_address_list_disable_some_actions( void );
 
index 1aae70d2963a2f450743966270ff93ef74d04151..4bc52675fe9768f08e54fcd3bfd90d147f6a1a14 100644 (file)
@@ -269,31 +269,6 @@ void addrharvest_free( AddressHarvester *harvester ) {
        g_free( harvester );
 }
 
-/*
-* Display object to specified stream.
-* Enter: harvester Harvester.
-*        stream    Output stream.
-*/
-void addrharvest_print( AddressHarvester *harvester, FILE *stream ) {
-       GList *node;
-       HeaderEntry *entry;
-
-       g_return_if_fail( harvester != NULL );
-       fprintf( stream, "Address Harvester:\n" );
-       fprintf( stream, " file path: '%s'\n", harvester->path );
-       fprintf( stream, "max folder: %d'\n", harvester->folderSize );
-
-       node = harvester->headerTable;
-       while( node ) {
-               entry = node->data;
-               fprintf( stream, "   header: %s", entry->header );
-               fprintf( stream, "\t: %s", entry->selected ? "yes" : "no" );
-               fprintf( stream, "\t: %d\n", entry->count );
-               node = g_list_next( node );
-       }
-       fprintf( stream, "  ret val: %d\n", harvester->retVal );
-}
-
 /*
  * Insert address into cache.
  * Enter: harvester Harvester object.
index 655802ada8dcd2115eacd52484ee3c04f45a662b..8fbc9a9db7da8914b74b75936285d5aaeca3aaad 100644 (file)
@@ -61,8 +61,6 @@ void addrharvest_set_recurse          ( AddressHarvester* harvester,
                                          const gboolean value );
 gint addrharvest_get_count             ( AddressHarvester* harvester,
                                          const gchar *name );
-void addrharvest_print                 ( AddressHarvester *harvester,
-                                         FILE *stream );
 gint addrharvest_harvest               ( AddressHarvester *harvester,
                                          AddressCache *cache,
                                          GList *msgList );
index 109243044269bb1578f8b0c6b6f27c29f1bc8c4a..87c9d4b7963e9083380946722d6c8cb842a73e04 100644 (file)
@@ -137,6 +137,17 @@ struct _AddressIfAttr {
        gchar *value;
 };
 
+static AddressDataSource *addrindex_create_datasource  ( AddressIfType ifType );
+
+static GList *addrindex_ds_get_all_persons     ( AddressDataSource *ds );
+static GList *addrindex_ds_get_all_groups      ( AddressDataSource *ds );
+static AddressDataSource *addrindex_get_datasource     ( AddressIndex *addrIndex,
+                                                 const gchar *cacheID );
+static AddressInterface *addrindex_get_interface       ( AddressIndex *addrIndex,
+                                                 AddressIfType ifType );
+static gint addrindex_write_to                 ( AddressIndex *addrIndex,
+                                         const gchar *newFile );
+
 /*
  * Define DOM fragment.
  */
@@ -518,7 +529,7 @@ gchar *addrindex_get_cache_id( AddressIndex *addrIndex, AddressDataSource *ds )
  * \param cacheID   ID.
  * \return Data source, or NULL if not found.
  */
-AddressDataSource *addrindex_get_datasource(
+static AddressDataSource *addrindex_get_datasource(
                AddressIndex *addrIndex, const gchar *cacheID )
 {
        g_return_val_if_fail( addrIndex != NULL, NULL );
@@ -633,14 +644,6 @@ AddressIndex *addrindex_create_index( void ) {
        return _addressIndex_;
 }
 
-/**
- * Return reference to address index.
- * \return Address index object.
- */
-AddressIndex *addrindex_get_object( void ) {
-       return _addressIndex_;
-}
-
 /**
  * Property - Specify file path to address index file.
  * \param addrIndex Address index.
@@ -661,27 +664,6 @@ void addrindex_set_file_name( AddressIndex *addrIndex, const gchar *value ) {
        addrIndex->fileName = mgu_replace_string( addrIndex->fileName, value );
 }
 
-/**
- * Property - Specify file path to be used.
- * \param addrIndex Address index.
- * \param value Path to JPilot file.
- */
-void addrindex_set_dirty( AddressIndex *addrIndex, const gboolean value ) {
-       g_return_if_fail( addrIndex != NULL );
-       addrIndex->dirtyFlag = value;
-}
-
-/**
- * Property - get loaded flag. Note that this flag is set after reading data
- * from the address books.
- * \param addrIndex Address index.
- * \return <i>TRUE</i> if address index data was loaded.
- */
-gboolean addrindex_get_loaded( AddressIndex *addrIndex ) {
-       g_return_val_if_fail( addrIndex != NULL, FALSE );
-       return addrIndex->loadedFlag;
-}
-
 /**
  * Return list of address interfaces.
  * \param addrIndex Address index.
@@ -787,7 +769,7 @@ void addrindex_print_index( AddressIndex *addrIndex, FILE *stream ) {
  * \param  ifType Interface type.
  * \return Address interface, or NULL if not found.
  */
-AddressInterface *addrindex_get_interface(
+static AddressInterface *addrindex_get_interface(
        AddressIndex *addrIndex, AddressIfType ifType )
 {
        AddressInterface *retVal = NULL;
@@ -1682,7 +1664,7 @@ static void addrindex_write_index( AddressIndex *addrIndex, FILE *fp ) {
 * return: Status code, from addrIndex->retVal.
 * Note: File will be created in directory specified by addrIndex.
 */
-gint addrindex_write_to( AddressIndex *addrIndex, const gchar *newFile ) {
+static gint addrindex_write_to( AddressIndex *addrIndex, const gchar *newFile ) {
        FILE *fp;
        gchar *fileSpec;
 #ifndef DEV_STANDALONE
@@ -2375,38 +2357,6 @@ ItemFolder *addrindex_ds_get_root_folder( AddressDataSource *ds ) {
        return retVal;
 }
 
-/*
- * Return list of folders for specified data source.
- */
-GList *addrindex_ds_get_list_folder( AddressDataSource *ds ) {
-       GList *retVal = FALSE;
-       AddressInterface *iface;
-
-       if( ds == NULL ) return retVal;
-       iface = ds->interface;
-       if( iface == NULL ) return retVal;
-       if( iface->getListFolder ) {
-               retVal = ( iface->getListFolder ) ( ds->rawDataSource );
-       }
-       return retVal;
-}
-
-/*
- * Return list of persons in root folder for specified data source.
- */
-GList *addrindex_ds_get_list_person( AddressDataSource *ds ) {
-       GList *retVal = FALSE;
-       AddressInterface *iface;
-
-       if( ds == NULL ) return retVal;
-       iface = ds->interface;
-       if( iface == NULL ) return retVal;
-       if( iface->getListPerson ) {
-               retVal = ( iface->getListPerson ) ( ds->rawDataSource );
-       }
-       return retVal;
-}
-
 /*
  * Return name for specified data source.
  */
@@ -2451,7 +2401,7 @@ gboolean addrindex_ds_get_readonly( AddressDataSource *ds ) {
 /*
  * Return list of all persons for specified data source.
  */
-GList *addrindex_ds_get_all_persons( AddressDataSource *ds ) {
+static GList *addrindex_ds_get_all_persons( AddressDataSource *ds ) {
        GList *retVal = NULL;
        AddressInterface *iface;
 
@@ -2467,7 +2417,7 @@ GList *addrindex_ds_get_all_persons( AddressDataSource *ds ) {
 /*
  * Return list of all groups for specified data source.
  */
-GList *addrindex_ds_get_all_groups( AddressDataSource *ds ) {
+static GList *addrindex_ds_get_all_groups( AddressDataSource *ds ) {
        GList *retVal = NULL;
        AddressInterface *iface;
 
index d287dd000dada8c8e2abe87203917af3d16c9b1b..1d2beb22514a13ce5b379aed27536e25f481f476 100644 (file)
@@ -103,23 +103,15 @@ void addrindex_initialize         ( void );
 void addrindex_teardown                        ( void );
 
 AddressIndex *addrindex_create_index   ( void );
-AddressIndex *addrindex_get_object     ( void );
 void addrindex_set_file_path           ( AddressIndex *addrIndex,
                                          const gchar *value );
 void addrindex_set_file_name           ( AddressIndex *addrIndex,
                                          const gchar *value );
-void addrindex_set_dirty               ( AddressIndex *addrIndex,
-                                         const gboolean value );
-gboolean addrindex_get_loaded          ( AddressIndex *addrIndex );
 
 GList *addrindex_get_interface_list    ( AddressIndex *addrIndex );
 void addrindex_free_index              ( AddressIndex *addrIndex );
 void addrindex_print_index             ( AddressIndex *addrIndex, FILE *stream );
 
-AddressInterface *addrindex_get_interface      ( AddressIndex *addrIndex,
-                                                 AddressIfType ifType );
-
-AddressDataSource *addrindex_create_datasource ( AddressIfType ifType );
 
 AddressDataSource *addrindex_index_add_datasource      ( AddressIndex *addrIndex,
                                                          AddressIfType ifType,
@@ -130,14 +122,10 @@ AddressDataSource *addrindex_index_remove_datasource      ( AddressIndex *addrIndex,
 void addrindex_free_datasource         ( AddressDataSource *ds );
 gchar *addrindex_get_cache_id          ( AddressIndex *addrIndex,
                                          AddressDataSource *ds );
-AddressDataSource *addrindex_get_datasource    ( AddressIndex *addrIndex,
-                                                 const gchar *cacheID );
 AddressCache *addrindex_get_cache      ( AddressIndex *addrIndex,
                                          const gchar *cacheID );
 
 gint addrindex_read_data               ( AddressIndex *addrIndex );
-gint addrindex_write_to                        ( AddressIndex *addrIndex,
-                                         const gchar *newFile );
 gint addrindex_save_data               ( AddressIndex *addrIndex );
 gint addrindex_create_new_books                ( AddressIndex *addrIndex );
 gint addrindex_save_all_books          ( AddressIndex *addrIndex );
@@ -148,14 +136,10 @@ gboolean addrindex_ds_get_read_flag       ( AddressDataSource *ds );
 gint addrindex_ds_get_status_code      ( AddressDataSource *ds );
 gint addrindex_ds_read_data            ( AddressDataSource *ds );
 ItemFolder *addrindex_ds_get_root_folder( AddressDataSource *ds );
-GList *addrindex_ds_get_list_folder    ( AddressDataSource *ds );
-GList *addrindex_ds_get_list_person    ( AddressDataSource *ds );
 gchar *addrindex_ds_get_name           ( AddressDataSource *ds );
 void addrindex_ds_set_access_flag      ( AddressDataSource *ds,
                                          gboolean *value );
 gboolean addrindex_ds_get_readonly     ( AddressDataSource *ds );
-GList *addrindex_ds_get_all_persons    ( AddressDataSource *ds );
-GList *addrindex_ds_get_all_groups     ( AddressDataSource *ds );
 
 /* Search support */
 gint addrindex_setup_search            ( const gchar *searchTerm,
index 91aad647eeaba84ebc40f8ec0217357a2d928a12..8a478c166db0c8c29615803f59d1b101299d3681 100644 (file)
@@ -117,6 +117,8 @@ typedef enum {
 #define PAGE_EMAIL             1
 #define PAGE_ATTRIBUTES        2
 
+static gboolean addressbook_edit_person_close( gboolean cancelled );
+
 static void edit_person_status_show( gchar *msg ) {
        if( personeditdlg.statusbar != NULL ) {
                gtk_statusbar_pop( GTK_STATUSBAR(personeditdlg.statusbar), personeditdlg.status_cid );
@@ -1248,7 +1250,7 @@ void addressbook_edit_person_invalidate( AddressBookFile *abf, ItemFolder *paren
                addressbook_edit_person_close( TRUE );
 }
 
-gboolean addressbook_edit_person_close( gboolean cancelled )
+static gboolean addressbook_edit_person_close( gboolean cancelled )
 {
        GList *listEMail = NULL;
        GList *listAttrib = NULL;
index b72c3906e33a43549fb69a9c3fc28cf92a722ace..3046d39bff2a90f4248ada726f0157adc5bf2ca7 100644 (file)
@@ -33,6 +33,5 @@ ItemPerson *addressbook_edit_person( AddressBookFile *abf, ItemFolder *parent, I
 void addressbook_edit_person_invalidate( AddressBookFile *abf, ItemFolder *parent_folder,
                                                                                 ItemPerson *person );
 void addressbook_edit_person_widgetset_hide( void );
-gboolean addressbook_edit_person_close( gboolean cancelled );
 
 #endif /* __EDITADDRESS_H__ */