aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gnome-month-item.c
Commit message (Collapse)AuthorAgeFilesLines
* Today: we can now configure the colors for the monthly items, courtesy ofFederico Mena Quintero1998-09-031-39/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Today: we can now configure the colors for the monthly items, courtesy of the canvas and GnomeColorPicker. Look at the preferences dialog, it is kind of nice. There are still some bugs to be fixed, nothing major. 1998-09-03 Federico Mena Quintero <federico@nuclecu.unam.mx> * prop.c (create_colors_page): We can now configure the colors of the monthly calendars! Wheeeeee! There are still some nits to be fixed, which are listed in the TODO file. (build_color_spec): New function to build color specifications. (parse_color_spec): New function to parse color specifications. * mark.c: Modified all functions to use the configured colors. * goto.c: Likewise. * main.c (colors_changed): New function that notifies all calendars that colors have changed. * gnome-cal.c (gnome_calendar_colors_changed): New function that notifies all the views that the colors have changed. * month-view.c (month_view_colors_changed): New function that notifies the month view that colors have changed. * year-view.c (year_view_colors_changed): New function that notifies the year view that colors have changed. * gnome-month-item.h (struct _GnomeMonthItem): Added fields for outline and day box colors. * gnome-month-item.c (gnome_month_item_set_arg): Added outline_color, outline_color_gdk, day_box_color, and day_box_color_gdk arguments to month items. These are convenient to quickly set the colors of the month item. (gnome_month_item_get_arg): Likewise. * main.[ch]: Added a global array of structures for color preferences. svn path=/trunk/; revision=360
* Centralized marking of month items. We now have a little utility functionFederico Mena Quintero1998-08-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Centralized marking of month items. We now have a little utility function to colorify the days in a month item that have events scheduled for them. This is currently used by the year view and the go-to dialog. Fixed buglets here and there. 1998-08-29 Federico Mena Quintero <federico@nuclecu.unam.mx> * mark.[ch]: New files with utility functions to mark calendars with their events. * mark.c (mark_month_item): New public function to mark a month item with events. (unmark_month_item): New public function to unmark all the days in a month item to their default appearance. * year-view.c (year_view_set): Use the new unmark_month_item() and mark_month_item() to mark the months with events. * goto.c (update): New function that updates the calendar in the Go-to dialog by marking the days. * timeutil.c (time_year_begin): Modified to take a time_t value. (time_year_end): Likewise. (time_month_begin): Actually implemented this function, which was in the header file but not here. (time_days_in_month): New public function that returns the number of days in a month. * Makefile.am (gnomecal_SOURCES): Added mark.[ch] to the sources. * year-view.c (unmark_days): Use unmark_month_item(). * gncal-full-day.c (gncal_full_day_destroy): Fixed crash when destroying the full day view. The full day's destroy method is unusual in that it destroys the list of child widgets itself, as it does not have a remove method, so it needs to reset the list to NULL. svn path=/trunk/; revision=351
* Today: fixed calculation of day indexes when weeks start on Monday. TheFederico Mena Quintero1998-08-281-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Today: fixed calculation of day indexes when weeks start on Monday. The year view now marks days (and fixed bugs in day marking as well). Next step: make a generic month-marker routine and use that all over the place. 1998-08-27 Federico Mena Quintero <federico@nuclecu.unam.mx> * gnome-month-item.c (build_month): Now does the correct thing when the user wants weeks to start on Monday. Now all the Monday special casing, as far as day numbering is concerned, is only in this function. * year-view.c (mark_days): This function marks the days that have events in them. It also fixes a memory leak in the old implementation (it was leaking the whole list). (unmark_days): New function used to unmark all the days in the year view. (mark_event): New function that marks all the days that are spanned by a time range. It also fixes the bug in the old implementation where it could possibly mark days past the ends of the year (if the event crosses year boundaries, for example). * timeutil.c (time_year_begin): Take the year parameter since year 1, not 1900. (time_year_end): Likewise. * year-view.c (year_view_size_allocate): Now changing the size of the calendars is done in the idle loop. (idle_handler): This function actually does the resizing of the items. * year-view.h (struct _YearView): Added idle_id and need_resize fields. svn path=/trunk/; revision=346
* Set the heading color of the month item.Federico Mena Quintero1998-08-261-7/+192
| | | | | | | | | | | | | | | | | | | 1998-08-25 Federico Mena Quintero <federico@nuclecu.unam.mx> * goto.c (create_days): Set the heading color of the month item. * main.c: Use GNOME_STOCK_PIXMAP_JUMP_TO, now that it exists, instead of goto.xpm. Also, removed goto.xpm from cvs. * gnome-month-item.h (struct _GnomeMonthItem): Added fields for the heading and day number fonts. Added fields for heading and day number label colors. * gnome-month-item.c (gnome_month_item_class_init): ARG_DAY_NAMES should be write-only. Also, added arguments for heading and day number fonts. Added arguments for heading and day number colors. svn path=/trunk/; revision=339
* We now have a nice generic monthly calendar item for the canvas. WeFederico Mena Quintero1998-08-191-51/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <federico@nuclecu.unam.mx> * 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 <federico@nuclecu.unam.mx> * 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
* Doh. Actually recalculate the days using the month and year.Federico Mena Quintero1998-08-141-13/+3
| | | | | | | | | | | | | | | 1998-08-13 Federico Mena Quintero <federico@nuclecu.unam.mx> * gnome-month-item.c (gnome_month_item_set_arg): Doh. Actually recalculate the days using the month and year. * main.c: Added "Go to" button to quickly jump to a specific date. * goto.c: New file that defines the quick go-to date dialog. * Makefile.am (gnomecal_SOURCES): Added goto.c to the sources. svn path=/trunk/; revision=317
* More work on the month view - FedericoArturo Espinosa1998-08-131-16/+124
| | | | svn path=/trunk/; revision=312
* More work on the month view item - FedericoArturo Espinosa1998-08-121-18/+178
| | | | svn path=/trunk/; revision=311
* Fix small cut&paste bug - FedericoArturo Espinosa1998-08-111-1/+1
| | | | svn path=/trunk/; revision=309
* Oops - FedericoArturo Espinosa1998-08-111-0/+1
| | | | svn path=/trunk/; revision=308
* Start of the month view widget. This will use the generic month item andFederico Mena Quintero1998-08-111-0/+573
1998-08-10 Federico Mena Quintero <federico@nuclecu.unam.mx> * month-view.[ch]: Start of the month view widget. This will use the generic month item and extend it to have the semantics desired for the gnomecal month view. * gnome-month-item.[ch]: New generic canvas item for the month view and the "small calendars". This is intended to be a high-level display engine for monthly calendars. This is a work in progress. * gnome-cal.h (GnomeCalendar): Added a month_view field. * gnome-cal.c (setup_widgets): Create the month view and insert it into the notebook. * Makefile.am: Added month-view.[ch] and gnome-month-item.[ch] to the sources. svn path=/trunk/; revision=307