Back out last change, should have gone in on HEAD.

Thu Nov  7 14:59:43 2002  Owen Taylor  <otaylor@redhat.com>

        * tests/testcalendar.c: Back out last change, should have gone in
        on HEAD.
This commit is contained in:
Owen Taylor
2002-11-07 20:01:06 +00:00
committed by Owen Taylor
parent 85051bd972
commit 9061e6eceb
7 changed files with 39 additions and 8 deletions

View File

@@ -1,3 +1,8 @@
Thu Nov 7 14:59:43 2002 Owen Taylor <otaylor@redhat.com>
* tests/testcalendar.c: Back out last change, should have gone in
on HEAD.
Thu Nov 7 14:51:31 2002 Owen Taylor <otaylor@redhat.com>
* tests/testcalendar.c (calendar_date_to_string):

View File

@@ -1,3 +1,8 @@
Thu Nov 7 14:59:43 2002 Owen Taylor <otaylor@redhat.com>
* tests/testcalendar.c: Back out last change, should have gone in
on HEAD.
Thu Nov 7 14:51:31 2002 Owen Taylor <otaylor@redhat.com>
* tests/testcalendar.c (calendar_date_to_string):

View File

@@ -1,3 +1,8 @@
Thu Nov 7 14:59:43 2002 Owen Taylor <otaylor@redhat.com>
* tests/testcalendar.c: Back out last change, should have gone in
on HEAD.
Thu Nov 7 14:51:31 2002 Owen Taylor <otaylor@redhat.com>
* tests/testcalendar.c (calendar_date_to_string):

View File

@@ -1,3 +1,8 @@
Thu Nov 7 14:59:43 2002 Owen Taylor <otaylor@redhat.com>
* tests/testcalendar.c: Back out last change, should have gone in
on HEAD.
Thu Nov 7 14:51:31 2002 Owen Taylor <otaylor@redhat.com>
* tests/testcalendar.c (calendar_date_to_string):

View File

@@ -1,3 +1,8 @@
Thu Nov 7 14:59:43 2002 Owen Taylor <otaylor@redhat.com>
* tests/testcalendar.c: Back out last change, should have gone in
on HEAD.
Thu Nov 7 14:51:31 2002 Owen Taylor <otaylor@redhat.com>
* tests/testcalendar.c (calendar_date_to_string):

View File

@@ -1,3 +1,8 @@
Thu Nov 7 14:59:43 2002 Owen Taylor <otaylor@redhat.com>
* tests/testcalendar.c: Back out last change, should have gone in
on HEAD.
Thu Nov 7 14:51:31 2002 Owen Taylor <otaylor@redhat.com>
* tests/testcalendar.c (calendar_date_to_string):

View File

@@ -21,6 +21,7 @@
#include <gtk/gtk.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#define DEF_PAD 10
#define DEF_PAD_SMALL 5
@@ -54,15 +55,15 @@ void calendar_date_to_string( CalendarData *data,
char *buffer,
gint buff_len )
{
GDate *date;
guint year, month, day;
gtk_calendar_get_date (GTK_CALENDAR(data->window),
&year, &month, &day);
date = g_date_new_dmy (day, month, year);
g_date_strftime (buffer, buff_len-1, "%x", date);
struct tm tm;
time_t time;
g_date_free (date);
memset (&tm, 0, sizeof (tm));
gtk_calendar_get_date (GTK_CALENDAR(data->window),
&tm.tm_year, &tm.tm_mon, &tm.tm_mday);
tm.tm_year -= TM_YEAR_BASE;
time = mktime(&tm);
strftime (buffer, buff_len-1, "%x", gmtime(&time));
}
void calendar_set_signal_strings (char *sig_str,