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/table/e-cell-date.c | |
parent | cc3a98fc1ad5bb87aa7335f3de404ee7feee1541 (diff) | |
download | gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.gz gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.zst gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.zip |
Prefer GLib basic types over C types.
Diffstat (limited to 'widgets/table/e-cell-date.c')
-rw-r--r-- | widgets/table/e-cell-date.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/widgets/table/e-cell-date.c b/widgets/table/e-cell-date.c index 53bceb557d..d9dcbbea3b 100644 --- a/widgets/table/e-cell-date.c +++ b/widgets/table/e-cell-date.c @@ -40,15 +40,15 @@ G_DEFINE_TYPE (ECellDate, e_cell_date, E_CELL_TEXT_TYPE) #define localtime_r(timep, result) (localtime (timep) ? memcpy ((result), localtime (timep), sizeof (*(result))) : 0) #endif -static char * -ecd_get_text(ECellText *cell, ETableModel *model, int col, int row) +static gchar * +ecd_get_text(ECellText *cell, ETableModel *model, gint col, gint row) { time_t date = GPOINTER_TO_INT (e_table_model_value_at(model, col, row)); time_t nowdate = time(NULL); time_t yesdate; struct tm then, now, yesterday; - char buf[100]; - char *temp; + gchar buf[100]; + gchar *temp; gboolean done = FALSE; if (date == 0) { @@ -83,7 +83,7 @@ ecd_get_text(ECellText *cell, ETableModel *model, int col, int row) } } if (!done) { - int i; + gint i; for (i = 2; i < 7; i++) { yesdate = nowdate - 60 * 60 * 24 * i; localtime_r (&yesdate, &yesterday); @@ -111,7 +111,7 @@ ecd_get_text(ECellText *cell, ETableModel *model, int col, int row) } static void -ecd_free_text(ECellText *cell, char *text) +ecd_free_text(ECellText *cell, gchar *text) { g_free(text); } @@ -156,7 +156,7 @@ e_cell_date_init (ECellDate *ecd) * Returns: an ECell object that can be used to render dates. */ ECell * -e_cell_date_new (const char *fontname, GtkJustification justify) +e_cell_date_new (const gchar *fontname, GtkJustification justify) { ECellDate *ecd = g_object_new (E_CELL_DATE_TYPE, NULL); |