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
This commit is contained in:
committed by
Chris Lahey
parent
7816388a7a
commit
48c3fcd45d
@ -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.
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user