diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-09-09 00:52:31 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-09-09 00:52:31 +0800 |
commit | 48c3fcd45d757f8e60e7ed37ca96fd843e690d0b (patch) | |
tree | 9c3b922f2b3a85113bd20ad5b5d2c884e8eab5fa /shell/e-storage-set-view.c | |
parent | 7816388a7ab06deb31f269c0f716eea5a62c9666 (diff) | |
download | gsoc2013-evolution-48c3fcd45d757f8e60e7ed37ca96fd843e690d0b.tar.gz gsoc2013-evolution-48c3fcd45d757f8e60e7ed37ca96fd843e690d0b.tar.zst gsoc2013-evolution-48c3fcd45d757f8e60e7ed37ca96fd843e690d0b.zip |
Added base ETableModel functions.
2000-09-08 Christopher James Lahey <clahey@helixcode.com>
* e-storage-set-view.c: Added base ETableModel functions.
* evolution-storage-listener.c, evolution-storage.c: Fixed some
warnings.
svn path=/trunk/; revision=5267
Diffstat (limited to 'shell/e-storage-set-view.c')
-rw-r--r-- | shell/e-storage-set-view.c | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c index 9f9dba0467..b90f556286 100644 --- a/shell/e-storage-set-view.c +++ b/shell/e-storage-set-view.c @@ -419,6 +419,50 @@ etable_drag_data_get (EStorageSetView *storage_set_view, } +/* ETableModel Methods */ + +/* This function returns the number of columns in our ETableModel. */ +static int +etree_col_count (ETableModel *etc, void *data) +{ + return 1; +} + +/* This function duplicates the value passed to it. */ +static void * +etree_duplicate_value (ETableModel *etc, int col, const void *value, void *data) +{ + return g_strdup (value); +} + +/* This function frees the value passed to it. */ +static void +etree_free_value (ETableModel *etc, int col, void *value, void *data) +{ + g_free (value); +} + +/* This function creates an empty value. */ +static void * +etree_initialize_value (ETableModel *etc, int col, void *data) +{ + return g_strdup (""); +} + +/* This function reports if a value is empty. */ +static gboolean +etree_value_is_empty (ETableModel *etc, int col, const void *value, void *data) +{ + return !(value && *(char *)value); +} + +/* This function reports if a value is empty. */ +static char * +etree_value_to_string (ETableModel *etc, int col, const void *value, void *data) +{ + return g_strdup(value); +} + /* ETreeModel Methods */ static GdkPixbuf* @@ -773,7 +817,13 @@ e_storage_set_view_construct (EStorageSetView *storage_set_view, priv->tree_expanded_pixbuf = gdk_pixbuf_new_from_xpm_data((const char**)tree_expanded_xpm); priv->tree_unexpanded_pixbuf = gdk_pixbuf_new_from_xpm_data((const char**)tree_unexpanded_xpm); - priv->etree_model = e_tree_simple_new (etree_icon_at, + priv->etree_model = e_tree_simple_new (etree_col_count, + etree_duplicate_value, + etree_free_value, + etree_initialize_value, + etree_value_is_empty, + etree_value_to_string, + etree_icon_at, etree_value_at, etree_set_value_at, etree_is_editable, |