aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/contact-list-editor/e-contact-list-model.h
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2001-06-28 05:04:44 +0800
committerChris Toshok <toshok@src.gnome.org>2001-06-28 05:04:44 +0800
commit780e047c0471ed396ac6ac7f2534fa81034a581f (patch)
treef52f7b487bae9de35011f133418b6550e6bbe7a4 /addressbook/gui/contact-list-editor/e-contact-list-model.h
parent513c03c3f87985c02715e6a6bd19d5539cf2fb97 (diff)
downloadgsoc2013-evolution-780e047c0471ed396ac6ac7f2534fa81034a581f.tar
gsoc2013-evolution-780e047c0471ed396ac6ac7f2534fa81034a581f.tar.gz
gsoc2013-evolution-780e047c0471ed396ac6ac7f2534fa81034a581f.tar.bz2
gsoc2013-evolution-780e047c0471ed396ac6ac7f2534fa81034a581f.tar.lz
gsoc2013-evolution-780e047c0471ed396ac6ac7f2534fa81034a581f.tar.xz
gsoc2013-evolution-780e047c0471ed396ac6ac7f2534fa81034a581f.tar.zst
gsoc2013-evolution-780e047c0471ed396ac6ac7f2534fa81034a581f.zip
track storage change - we're only using 1 array now.
2001-06-27 Chris Toshok <toshok@ximian.com> * gui/contact-list-editor/e-contact-list-model.c (contact_list_row_count): track storage change - we're only using 1 array now. (contact_list_value_at): same. (contact_list_model_destroy): same. (e_contact_list_model_init): same. (e_contact_list_model_add_email): same. (e_contact_list_model_add_card): same. (e_contact_list_model_remove_row): same. (e_contact_list_model_remove_all): new function - just free/unref all existing rows. (e_contact_list_model_get_email): new function, returns the alloc'ed string containing either an email address or an encoded ECardId. * gui/contact-list-editor/e-contact-list-model.h: remove the 2 separate arrays for email and cards, and store them in the same array. * gui/contact-list-editor/e-contact-list-editor.h (struct _EContactListEditor): add the visible_addr_checkbutton widget. * gui/contact-list-editor/e-contact-list-editor.c (visible_addrs_toggled_cb): new function. (e_contact_list_editor_init): connect to "toggled" on visible_addrs_checkbutton. (file_save_cb): new function. (tb_save_and_close_cb): new function. (verbs): add Save and Save & Close. (list_added_cb): new function. (list_modified_cb): new function. (save_card): new function - we do *not* use e_card_merging_* calls here. (e_contact_list_editor_get_arg): un-#if 0 code in the "card" getter. (e_contact_list_editor_set_arg): same for the "card" setter. (extract_info): new function. (fill_in_info): new function. * gui/contact-list-editor/contact-list-editor.glade: add a checkbutton at the bottom to determine whether to visibly include mail addresses in mail sent to this list. svn path=/trunk/; revision=10542
Diffstat (limited to 'addressbook/gui/contact-list-editor/e-contact-list-model.h')
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-model.h26
1 files changed, 16 insertions, 10 deletions
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-model.h b/addressbook/gui/contact-list-editor/e-contact-list-model.h
index 8665245501..7b1e092944 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-model.h
+++ b/addressbook/gui/contact-list-editor/e-contact-list-model.h
@@ -16,20 +16,23 @@
typedef struct _EContactListModel EContactListModel;
typedef struct _EContactListModelClass EContactListModelClass;
+typedef enum {
+ E_CONTACT_LIST_MODEL_ROW_EMAIL,
+ E_CONTACT_LIST_MODEL_ROW_CARD,
+} EContactListModelRowType;
+
typedef struct {
+ EContactListModelRowType type;
ECardSimple *simple;
- char *string;
-} SimpleAndString;
+ char *string;
+} EContactListModelRow;
struct _EContactListModel {
ETableModel parent;
- SimpleAndString **simples;
- int simple_count;
- int simple_alloc;
- char **emails;
- int email_count;
- int email_alloc;
+ EContactListModelRow **data;
+ int data_count;
+ int data_alloc;
};
@@ -42,8 +45,11 @@ GtkType e_contact_list_model_get_type (void);
void e_contact_list_model_construct (EContactListModel *model);
ETableModel *e_contact_list_model_new (void);
-void e_contact_list_model_add_email (EContactListModel *model, const char *email);
-void e_contact_list_model_add_card (EContactListModel *model, ECardSimple *simple);
+void e_contact_list_model_add_email (EContactListModel *model, const char *email);
+void e_contact_list_model_add_card (EContactListModel *model, ECardSimple *simple);
void e_contact_list_model_remove_row (EContactListModel *model, int row);
+void e_contact_list_model_remove_all (EContactListModel *model);
+char *e_contact_list_model_get_row (EContactListModel *model, ECardSimple *simple);
+char *e_contact_list_model_get_email (EContactListModel *model, int row);
#endif /* _E_CONTACT_LIST_MODEL_H_ */