aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-09-09 00:52:31 +0800
committerChris Lahey <clahey@src.gnome.org>2000-09-09 00:52:31 +0800
commit48c3fcd45d757f8e60e7ed37ca96fd843e690d0b (patch)
tree9c3b922f2b3a85113bd20ad5b5d2c884e8eab5fa /shell
parent7816388a7ab06deb31f269c0f716eea5a62c9666 (diff)
downloadgsoc2013-evolution-48c3fcd45d757f8e60e7ed37ca96fd843e690d0b.tar
gsoc2013-evolution-48c3fcd45d757f8e60e7ed37ca96fd843e690d0b.tar.gz
gsoc2013-evolution-48c3fcd45d757f8e60e7ed37ca96fd843e690d0b.tar.bz2
gsoc2013-evolution-48c3fcd45d757f8e60e7ed37ca96fd843e690d0b.tar.lz
gsoc2013-evolution-48c3fcd45d757f8e60e7ed37ca96fd843e690d0b.tar.xz
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')
-rw-r--r--shell/ChangeLog7
-rw-r--r--shell/e-storage-set-view.c52
-rw-r--r--shell/evolution-storage-listener.c5
-rw-r--r--shell/evolution-storage.c2
4 files changed, 62 insertions, 4 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index be76238302..86352d5825 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
2000-09-08 Ettore Perazzoli <ettore@helixcode.com>
* e-shell.c (set_owner_on_components): New.
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,
diff --git a/shell/evolution-storage-listener.c b/shell/evolution-storage-listener.c
index e051c1d2ea..ee45e442ea 100644
--- a/shell/evolution-storage-listener.c
+++ b/shell/evolution-storage-listener.c
@@ -38,7 +38,7 @@ static GtkObjectClass *parent_class = NULL;
struct _EvolutionStorageListenerPrivate {
Evolution_StorageListener corba_objref;
- EvolutionStorageListenerServant *servant;
+ POA_Evolution_StorageListener *servant;
};
@@ -287,13 +287,12 @@ evolution_storage_listener_new (void)
EvolutionStorageListener *new;
EvolutionStorageListenerPrivate *priv;
Evolution_StorageListener corba_objref;
- POA_Evolution_StorageListener *servant;
new = gtk_type_new (evolution_storage_listener_get_type ());
priv = new->priv;
priv->servant = create_servant (new);
- corba_objref = activate_servant (new, servant);
+ corba_objref = activate_servant (new, priv->servant);
evolution_storage_listener_construct (new, corba_objref);
diff --git a/shell/evolution-storage.c b/shell/evolution-storage.c
index 8e3374158f..9912b5bb2a 100644
--- a/shell/evolution-storage.c
+++ b/shell/evolution-storage.c
@@ -158,7 +158,9 @@ static void
corba_class_init (void)
{
POA_Evolution_Storage__vepv *vepv;
+#ifndef NO_WARNINGS
POA_Evolution_Storage__epv *epv;
+#endif
PortableServer_ServantBase__epv *base_epv;
base_epv = g_new0 (PortableServer_ServantBase__epv, 1);