From 6158ea365fc20a777a444011e92713fa3168bdda Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Wed, 19 Aug 1998 00:31:04 +0000 Subject: We now have a nice generic monthly calendar item for the canvas. We also have a convenient "Go To" dialog, just like in the PalmPilot. Next step is a pretty month view - Federico 1998-08-18 Federico Mena Quintero * gnome-month-item.c (gnome_month_item_day2index): New public function to get the displayed day index of the specified date. * gnome-cal.c (gnome_calendar_goto_today): New public function to jump to the current day. * goto.c (day_event): Jump to the selected day when the user clicks the mouse, and prelight days as appropriate. * timeutil.c (time_from_day): New public function to build a time_t from a year/month/day triplet. * gnome-month-item.c (gnome_month_item_num2child): (gnome_month_item_child2num): New public functions to convert an index into a child and vice-versa, respectively. (gnome_month_item_num2day): New public function to convert a child number into a displayed day number. * goto.c (goto_dialog): Doh, use gnome-dialog properly :-) * gnome-month-item.c (create_items): Use g_strdup()ed day names from the start. 1998-08-17 Federico Mena Quintero * main.c (gnome_toolbar): Made it use goto.xpm. * Makefile.am (EXTRA_DIST): Added goto.xpm to the list of files. svn path=/trunk/; revision=326 --- calendar/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'calendar/main.c') diff --git a/calendar/main.c b/calendar/main.c index ebb008927f..9240acdfc1 100644 --- a/calendar/main.c +++ b/calendar/main.c @@ -19,6 +19,7 @@ #include "gnome-cal.h" #include "main.h" #include "timeutil.h" +#include "goto.xpm" #define COOKIE_USER_HOME_DIR ((char *) -1) @@ -223,7 +224,7 @@ next_clicked (GtkWidget *widget, GnomeCalendar *gcal) static void today_clicked (GtkWidget *widget, GnomeCalendar *gcal) { - gnome_calendar_goto (gcal, time (NULL)); + gnome_calendar_goto_today (gcal); } static void @@ -386,7 +387,7 @@ static GnomeUIInfo gnome_toolbar [] = { GNOMEUIINFO_SEPARATOR, - GNOMEUIINFO_ITEM_STOCK (N_("Go to"), N_("Go to a specific date"), goto_clicked, GNOME_STOCK_PIXMAP_STOP), + GNOMEUIINFO_ITEM (N_("Go to"), N_("Go to a specific date"), goto_clicked, goto_xpm), GNOMEUIINFO_END }; -- cgit v1.2.3