aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gncal-todo.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@nuclecu.unam.mx>1999-03-31 04:38:06 +0800
committerArturo Espinosa <unammx@src.gnome.org>1999-03-31 04:38:06 +0800
commit1217f279ad9a5c79d61642a49eba38a552c1ec52 (patch)
tree27b455fe6085822691b25e3ed99059bcc4076599 /calendar/gui/gncal-todo.c
parent841b3a9102bf9be685571ae278128ddfec1afa46 (diff)
downloadgsoc2013-evolution-1217f279ad9a5c79d61642a49eba38a552c1ec52.tar.gz
gsoc2013-evolution-1217f279ad9a5c79d61642a49eba38a552c1ec52.tar.zst
gsoc2013-evolution-1217f279ad9a5c79d61642a49eba38a552c1ec52.zip
Made static. Make it use the full year format for strftime().
1999-03-30 Federico Mena Quintero <federico@nuclecu.unam.mx> * gncal-todo.c (convert_time_t_to_char): Made static. Make it use the full year format for strftime(). svn path=/trunk/; revision=791
Diffstat (limited to 'calendar/gui/gncal-todo.c')
-rw-r--r--calendar/gui/gncal-todo.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/calendar/gui/gncal-todo.c b/calendar/gui/gncal-todo.c
index 669b07e07e..e1c708384b 100644
--- a/calendar/gui/gncal-todo.c
+++ b/calendar/gui/gncal-todo.c
@@ -473,22 +473,19 @@ gncal_todo_new (GnomeCalendar *calendar)
return GTK_WIDGET (todo);
}
-
-
-char *
+static char *
convert_time_t_to_char (time_t t)
{
- char *buffer;
+ char buf[100];
struct tm *tm;
- buffer = g_malloc(15);
tm = localtime (&t);
- strftime(buffer, 15, "%m/%d/%y", tm);
+ strftime(buf, sizeof (buf), "%m/%d/%Y", tm);
- return buffer;
+ return g_strdup (buf);
}
-GtkStyle *
+static GtkStyle *
make_overdue_todo_style(GncalTodo *todo)
{
GtkStyle *overdue_style = NULL;
@@ -531,7 +528,7 @@ insert_in_clist (GncalTodo *todo, iCalObject *ico)
*/
if(ico->dtend && todo_show_due_date) {
- text[1] = convert_time_t_to_char(ico->dtend);
+ text[1] = convert_time_t_to_char (ico->dtend);
/* Append the data's pointer so later it can be properly freed */
todo->data_ptrs = g_slist_append (todo->data_ptrs, text[1]);
}