diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-05-27 22:29:19 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-05-27 22:29:19 +0800 |
commit | 948235c3d1076dbe6ed2e57a24c16a083bbd9f01 (patch) | |
tree | 4133b1adfd94d8f889ca7ad4ad851346518f4171 /widgets/menus/gal-define-views-model.c | |
parent | cc3a98fc1ad5bb87aa7335f3de404ee7feee1541 (diff) | |
download | gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.gz gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.bz2 gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.lz gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.xz gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.zst gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.zip |
Prefer GLib basic types over C types.
Diffstat (limited to 'widgets/menus/gal-define-views-model.c')
-rw-r--r-- | widgets/menus/gal-define-views-model.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/widgets/menus/gal-define-views-model.c b/widgets/menus/gal-define-views-model.c index 9f67473c32..82ab22eedc 100644 --- a/widgets/menus/gal-define-views-model.c +++ b/widgets/menus/gal-define-views-model.c @@ -78,20 +78,20 @@ gdvm_row_count (ETableModel *etc) } /* This function returns the value at a particular point in our ETableModel. */ -static void * -gdvm_value_at (ETableModel *etc, int col, int row) +static gpointer +gdvm_value_at (ETableModel *etc, gint col, gint row) { GalDefineViewsModel *views = GAL_DEFINE_VIEWS_MODEL(etc); - const char *value; + const gchar *value; value = gal_view_get_title (gal_view_collection_get_view(views->collection, row)); - return (void *)(value ? value : ""); + return (gpointer)(value ? value : ""); } /* This function sets the value at a particular point in our ETableModel. */ static void -gdvm_set_value_at (ETableModel *etc, int col, int row, const void *val) +gdvm_set_value_at (ETableModel *etc, gint col, gint row, gconstpointer val) { GalDefineViewsModel *views = GAL_DEFINE_VIEWS_MODEL(etc); if (views->editable) { @@ -103,7 +103,7 @@ gdvm_set_value_at (ETableModel *etc, int col, int row, const void *val) /* This function returns whether a particular cell is editable. */ static gboolean -gdvm_is_cell_editable (ETableModel *etc, int col, int row) +gdvm_is_cell_editable (ETableModel *etc, gint col, gint row) { return GAL_DEFINE_VIEWS_MODEL(etc)->editable; } @@ -114,33 +114,33 @@ gdvm_append_row (ETableModel *etm, ETableModel *source, gint row) } /* This function duplicates the value passed to it. */ -static void * -gdvm_duplicate_value (ETableModel *etc, int col, const void *value) +static gpointer +gdvm_duplicate_value (ETableModel *etc, gint col, gconstpointer value) { return g_strdup(value); } /* This function frees the value passed to it. */ static void -gdvm_free_value (ETableModel *etc, int col, void *value) +gdvm_free_value (ETableModel *etc, gint col, gpointer value) { g_free(value); } -static void * -gdvm_initialize_value (ETableModel *etc, int col) +static gpointer +gdvm_initialize_value (ETableModel *etc, gint col) { return g_strdup(""); } static gboolean -gdvm_value_is_empty (ETableModel *etc, int col, const void *value) +gdvm_value_is_empty (ETableModel *etc, gint col, gconstpointer value) { - return !(value && *(char *)value); + return !(value && *(gchar *)value); } -static char * -gdvm_value_to_string (ETableModel *etc, int col, const void *value) +static gchar * +gdvm_value_to_string (ETableModel *etc, gint col, gconstpointer value) { return g_strdup(value); } @@ -279,7 +279,7 @@ gal_define_views_model_new (void) */ GalView * gal_define_views_model_get_view (GalDefineViewsModel *model, - int n) + gint n) { return gal_view_collection_get_view(model->collection, n); } @@ -293,7 +293,7 @@ gal_define_views_model_get_view (GalDefineViewsModel *model, */ void gal_define_views_model_delete_view (GalDefineViewsModel *model, - int n) + gint n) { e_table_model_pre_change(E_TABLE_MODEL(model)); gal_view_collection_delete_view(model->collection, n); @@ -309,7 +309,7 @@ gal_define_views_model_delete_view (GalDefineViewsModel *model, */ void gal_define_views_model_copy_view (GalDefineViewsModel *model, - int n) + gint n) { ETableModel *etm = E_TABLE_MODEL(model); e_table_model_pre_change(etm); |