diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-05-08 12:58:41 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-05-08 12:58:41 +0800 |
commit | 3c0c62e2958b5dccca490908145c534022a85563 (patch) | |
tree | 421d5332f2518c99cfd6ac6dd4aa325f1a0a1a84 /addressbook/gui/widgets/e-minicard-view-model.h | |
parent | 5d4895eb431adfbf2c7895d4257fa20a28f474f9 (diff) | |
download | gsoc2013-evolution-3c0c62e2958b5dccca490908145c534022a85563.tar gsoc2013-evolution-3c0c62e2958b5dccca490908145c534022a85563.tar.gz gsoc2013-evolution-3c0c62e2958b5dccca490908145c534022a85563.tar.bz2 gsoc2013-evolution-3c0c62e2958b5dccca490908145c534022a85563.tar.lz gsoc2013-evolution-3c0c62e2958b5dccca490908145c534022a85563.tar.xz gsoc2013-evolution-3c0c62e2958b5dccca490908145c534022a85563.tar.zst gsoc2013-evolution-3c0c62e2958b5dccca490908145c534022a85563.zip |
Removed e-card-pairs.h since we're not using it.
2001-05-08 Christopher James Lahey <clahey@ximian.com>
* backend/ebook/Makefile.am (libebookinclude_HEADERS): Removed
e-card-pairs.h since we're not using it.
* backend/ebook/e-book-view.c (e_book_view_check_listener_queue):
Added break; to default: case here.
* backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h:
Added changed variable so as to avoid sync_card when possible.
(e_card_simple_destroy): Free all the data here properly.
(e_card_simple_get_arg): Slight simplification here.
(fill_in_info, e_card_simple_arbitrary_foreach,
e_card_simple_get_arbitrary): Call e_card_free_empty_lists here to
save a bit of memory.
* backend/ebook/e-card.c, backend/ebook/e-card.h: Fixed up
includes a bit.
(e_card_list_get_vcard, e_card_list_send): Added these functions
for acting on a group of cards.
(parse_org): Cleaned up this function a bit.
(e_card_free_empty_lists): Added this function to delete
unnecessary ELists and save a bit of memory.
(e_v_object_get_child_value): Made this return NULL if not found
instead of g_strdup("").
* contact-editor/e-contact-save-as.c,
contact-editor/e-contact-save-as.h (e_contact_list_save_as): Added
this function to save multiple contacts.
* gui/widgets/Makefile.am: Commented out reflow test.
(libeminicard_a_SOURCES): Added e-minicard-view-model.c and
e-minicard-view-model.h.
* gui/widgets/e-minicard-view-model.c,
gui/widgets/e-minicard-view-model.h: Model for use in
EMinicardView.
* gui/widgets/e-minicard-view.c, gui/widgets/e-minicard-view.h:
Reworked this to use the new EReflow stuff.
* gui/widgets/e-minicard.c (e_minicard_event): Doesn't handle
right click menus now. Emits a signal on the parent canvas item
instead.
* printing/e-contact-print-envelope.c,
printing/e-contact-print-envelope.h
(e_contact_print_envelope_list_dialog_new): Added this function to
print multiple envelopes (only prints first for now.)
* printing/e-contact-print.c, printing/e-contact-print.h
(e_contact_print_card_list_dialog_new): Added this function to
print multiple cards. Only prints the first for now.
svn path=/trunk/; revision=9711
Diffstat (limited to 'addressbook/gui/widgets/e-minicard-view-model.h')
-rw-r--r-- | addressbook/gui/widgets/e-minicard-view-model.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/addressbook/gui/widgets/e-minicard-view-model.h b/addressbook/gui/widgets/e-minicard-view-model.h new file mode 100644 index 0000000000..c0e1029522 --- /dev/null +++ b/addressbook/gui/widgets/e-minicard-view-model.h @@ -0,0 +1,69 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +#ifndef _E_MINICARD_VIEW_MODEL_H_ +#define _E_MINICARD_VIEW_MODEL_H_ + +#include <gal/widgets/e-reflow-model.h> +#include <gal/widgets/e-selection-model.h> +#include "addressbook/backend/ebook/e-book.h" +#include "addressbook/backend/ebook/e-book-view.h" +#include "addressbook/backend/ebook/e-card.h" + +#define E_MINICARD_VIEW_MODEL_TYPE (e_minicard_view_model_get_type ()) +#define E_MINICARD_VIEW_MODEL(o) (GTK_CHECK_CAST ((o), E_MINICARD_VIEW_MODEL_TYPE, EMinicardViewModel)) +#define E_MINICARD_VIEW_MODEL_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_MINICARD_VIEW_MODEL_TYPE, EMinicardViewModelClass)) +#define E_IS_MINICARD_VIEW_MODEL(o) (GTK_CHECK_TYPE ((o), E_MINICARD_VIEW_MODEL_TYPE)) +#define E_IS_MINICARD_VIEW_MODEL_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_MINICARD_VIEW_MODEL_TYPE)) + +/* Virtual Column list: + 0 Email + 1 Full Name + 2 Street + 3 Phone +*/ + +typedef struct _EMinicardViewModel EMinicardViewModel; +typedef struct _EMinicardViewModelClass EMinicardViewModelClass; + +struct _EMinicardViewModel { + EReflowModel parent; + + /* item specific fields */ + EBook *book; + char *query; + EBookView *book_view; + + int get_view_idle; + + ECard **data; + int data_count; + int allocated_count; + + int create_card_id, remove_card_id, modify_card_id, status_message_id; + + guint editable : 1; + guint first_get_view : 1; +}; + + +struct _EMinicardViewModelClass { + EReflowModelClass parent_class; + + /* + * Signals + */ + void (*status_message) (EMinicardViewModel *model, const gchar *message); +}; + + +GtkType e_minicard_view_model_get_type (void); +EReflowModel *e_minicard_view_model_new (void); + +/* Returns object with ref count of 1. */ +ECard *e_minicard_view_model_get_card (EMinicardViewModel *model, + int row); +void e_minicard_view_model_stop (EMinicardViewModel *model); +gint e_minicard_view_model_right_click (EMinicardViewModel *emvm, + GdkEvent *event, + ESelectionModel *selection); + +#endif /* _E_MINICARD_VIEW_MODEL_H_ */ |