aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/contact-list-editor/e-contact-list-model.h
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2007-11-29 04:54:19 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-11-29 04:54:19 +0800
commit4bca50f1c5060efbfe2f0c9d011e4d51f1e8be0f (patch)
tree670e42776b90bc2b22ab060828d944b8b1c6af6d /addressbook/gui/contact-list-editor/e-contact-list-model.h
parentcfbb09abfdba072800304ab46146323b3b2ff785 (diff)
downloadgsoc2013-evolution-4bca50f1c5060efbfe2f0c9d011e4d51f1e8be0f.tar
gsoc2013-evolution-4bca50f1c5060efbfe2f0c9d011e4d51f1e8be0f.tar.gz
gsoc2013-evolution-4bca50f1c5060efbfe2f0c9d011e4d51f1e8be0f.tar.bz2
gsoc2013-evolution-4bca50f1c5060efbfe2f0c9d011e4d51f1e8be0f.tar.lz
gsoc2013-evolution-4bca50f1c5060efbfe2f0c9d011e4d51f1e8be0f.tar.xz
gsoc2013-evolution-4bca50f1c5060efbfe2f0c9d011e4d51f1e8be0f.tar.zst
gsoc2013-evolution-4bca50f1c5060efbfe2f0c9d011e4d51f1e8be0f.zip
** Fixes bug #489652
2007-11-28 Matthew Barnes <mbarnes@redhat.com> ** Fixes bug #489652 Migrate the contact list editor from ETable to GtkTreeView and fix some HIG issues. * addressbook/gui/contact-list-editor/Makefile.am: Remove e-contact-list-editor.etspec Remove e-contact-list-editor-marshal.list * addressbook/gui/contact-list-editor/contact-list-editor.glade: Fix some HIG issues and give all the widgets proper names. * addressbook/gui/contact-list-editor/e-contact-list-model.c: * addressbook/gui/contact-list-editor/e-contact-list-model.h: EContactListModel is now a subclass of GtkListStore. * addressbook/gui/contact-list-editor/e-contact-list.c: * addressbook/gui/contact-list-editor/e-contact-list.h: Use a GtkTreeView instead of an ETable for displaying members. Refactor everything; see bug #489652 for more details. svn path=/trunk/; revision=34610
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.h68
1 files changed, 41 insertions, 27 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 55fe251ad2..68de720286 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-model.h
+++ b/addressbook/gui/contact-list-editor/e-contact-list-model.h
@@ -1,48 +1,62 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
#ifndef _E_CONTACT_LIST_MODEL_H_
#define _E_CONTACT_LIST_MODEL_H_
-#include <table/e-table-model.h>
+#include <gtk/gtk.h>
#include <libebook/e-contact.h>
#include <libebook/e-destination.h>
-G_BEGIN_DECLS
+/* Standard GObject macros */
+#define E_TYPE_CONTACT_LIST_MODEL \
+ (e_contact_list_model_get_type ())
+#define E_CONTACT_LIST_MODEL(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_CONTACT_LIST_MODEL, EContactListModel))
+#define E_CONTACT_LIST_MODEL_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_CONTACT_LIST_MODEL, EContactListModelClass))
+#define E_IS_CONTACT_LIST_MODEL(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_CONTACT_LIST_MODEL))
+#define E_IS_CONTACT_LIST_MODEL_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_CONTACT_LIST_MODEL))
+#define E_CONTACT_LIST_MODEL_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_CONTACT_LIST_MODEL, EContactListModelClass))
-#define E_TYPE_CONTACT_LIST_MODEL (e_contact_list_model_get_type ())
-#define E_CONTACT_LIST_MODEL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TYPE_CONTACT_LIST_MODEL, EContactListModel))
-#define E_CONTACT_LIST_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_TYPE_CONTACT_LIST_MODEL, EContactListModelClass))
-#define E_IS_CONTACT_LIST_MODEL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TYPE_CONTACT_LIST_MODEL))
-#define E_IS_CONTACT_LIST_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TYPE_CONTACT_LIST_MODEL))
+G_BEGIN_DECLS
typedef struct _EContactListModel EContactListModel;
typedef struct _EContactListModelClass EContactListModelClass;
struct _EContactListModel {
- ETableModel parent;
-
- EDestination **data;
- int data_count;
- int data_alloc;
+ GtkListStore parent;
};
-
struct _EContactListModelClass {
- ETableModelClass parent_class;
+ GtkListStoreClass parent_class;
};
-
-GType 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_destination (EContactListModel *model, EDestination *dest);
-void e_contact_list_model_add_email (EContactListModel *model, const char *email);
-void e_contact_list_model_add_contact (EContactListModel *model, EContact *contact, int email_num);
-
-void e_contact_list_model_remove_row (EContactListModel *model, int row);
-void e_contact_list_model_remove_all (EContactListModel *model);
-
-const EDestination *e_contact_list_model_get_destination (EContactListModel *model, int row);
+GType e_contact_list_model_get_type (void);
+GtkTreeModel * e_contact_list_model_new (void);
+gboolean e_contact_list_model_has_email (EContactListModel *model,
+ const gchar *email);
+void e_contact_list_model_add_destination
+ (EContactListModel *model,
+ EDestination *dest);
+void e_contact_list_model_add_email (EContactListModel *model,
+ const gchar *email);
+void e_contact_list_model_add_contact(EContactListModel *model,
+ EContact *contact,
+ gint email_num);
+void e_contact_list_model_remove_row (EContactListModel *model,
+ gint row);
+void e_contact_list_model_remove_all (EContactListModel *model);
+EDestination * e_contact_list_model_get_destination
+ (EContactListModel *model,
+ gint row);
G_END_DECLS