aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gnome-month-item.c
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2svn to create tag 'GGV_0_30'.GGV_0_30nobody1999-04-171-1246/+0
| | | | svn path=/tags/GGV_0_30/; revision=820
* will define fonts via fontset. Friendlier to locales that use iso8859-[^1]Sergey I. Panov1999-02-181-0/+32
| | | | | | | | | | | | | * gnome-month-item.c,gnome-month-item.h,goto.c,mark.h, month-view.c,prop.c,quick-view.c,year-view.c: will define fonts via fontset. Friendlier to locales that use iso8859-[^1] and koi8-r encodings. Does not solve problem for Asian languiges --- better solution is needed (e.g. standart GNOME fontstyles defined in gtkrc). Interpol svn path=/trunk/; revision=677
* Use the font #defines. (month_view_new): Set the colors of the month viewFederico Mena Quintero1998-10-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1998-10-01 Federico Mena Quintero <federico@nuclecu.unam.mx> * month-view.c (month_view_init): Use the font #defines. (month_view_new): Set the colors of the month view upon creation. (mark_current_day): New function to mark the current day in the month view. (month_view_set): Mark the current day. (month_view_colors_changed): Mark the current day and colorify the month item appropriately. * month-view.h: Added year and month fields to the MonthView structure. * main.c: Renamed the Appointments color property, since it will be used by the month view as well. * goto.c (update): Set the current day's font and color. * year-view.c (year_view_init): Set the fonts of the month items when creating them. * mark.h: Added new #defines for HEADING_FONT and TITLE_FONT. * year-view.c (year_view_init): Use the new font #defines. * prop.c (prop_apply_colors): Fixed to work with the I-am-paranoid-and-I-need-to-size-my-ints changes to GnomeColorPicker. (color_spec_from_picker): Likewise. svn path=/trunk/; revision=424
* Colorify the month item and prepare it for prelighting here.Federico Mena Quintero1998-10-011-59/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1998-09-30 Federico Mena Quintero <federico@nuclecu.unam.mx> * goto.c (create_days): Colorify the month item and prepare it for prelighting here. * main.c (color_props): Changed the default colors to something not dull. * year-view.c (compute_min_size): New function to compute the minimum size of the year view properly. (year_view_size_request): Added two new fields to the year view structure that contain the minimum size. Return this in the size_request method. (year_view_new): Call compute_min_size to save the minimum size for later use. (idle_handler): Make it resize the items correctly. * gnome-month-item.c (gnome_month_item_set_arg): Reshape when necessary. This is needed becaues we now actually calculate a minimum size for the month item based on the font sizes and paddings. (check_heading_sizes): New function to calculate a minimum size based on the headings' dimensions. (check_day_sizes): New function to calculate a minimum size based on the day number labels' dimensions. (check_sizes): New function that computes a minimum size for the month item. (reshape): Now calls check_sizes() to ensure a minimum size for the month item. svn path=/trunk/; revision=419
* Stuff that I forgot to commit yesterday.Federico Mena Quintero1998-10-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stuff that I forgot to commit yesterday. Now the year view has a nifty pop-up view you can activate if you click on a day with mouse button 1. It will display a quick view of the appointments in that day. Also, reworked the marking and coloring code for month items so that the year view is not glacially slow anymore when switching years. It still is slow when first mapping or realizing the year view, I'm not sure why. I will look into that. 1998-09-29 Federico Mena Quintero <federico@nuclecu.unam.mx> * prop.c (fetch_color_spec): Changed name from fetch_prelight_spec and made it conform to the new prelighting mechanism. (fake_mark_days): Set the proper day attributes. (reconfigure_month): Use colorify_month_item(). (fake_mark_days): Use mark_month_item_index(). * mark.c (colorify_month_item): New public function to reset the colors in a month item. (get_attributes): New internal function that creates an array of attributes for the days in a month item. This is the basis of all the new optimizations to month item marking. (unmark_month_item): Now it uses the attributes array to unmark only the days that need unmarking. (mark_event_in_month): Update the day attributes array. (month_item_prepare_prelight): Changed the definition of the prelight color query function. Use the new function. (day_event): Do color changes based on the day attributes array. (mark_month_item_index): New public function to mark a single day by index. (mark_event_in_month): Use mark_month_item_index(). * gnome-month-item.c (gnome_month_item_num2child): Now takes an int, not a GnomeMonthItemChild. (gnome_month_item_child2num): Now returns an int, not a GnomeMonthItemChild. (gnome_month_item_num2day): Now takes an int, not a GnomeMonthItemChild. * goto.c (goto_dialog): Create the days before the year spin button, because the year_changed callback expects the month item to be created. The new semantics of the spin button cause it to emit a value_changed signal on the adjustment upon creation -- is this the behavior we want from it? (goto_dialog): Use gtk_window_set_modal() instead of the deprectaed gnome_dialog_set_modal(). * quick-view.c (quick_view_new): Make it look not as crappy by putting the title inside the frame. (quick_view_do_popup): Fixed the pointer grab and added a cursor. (create_items_for_event): Query the text width/height from the text item using the new object arguments, so that the size of the popup window can be set properly. * year-view.c (do_quick_view_popup): Calculate a nice date string for the popup window. svn path=/trunk/; revision=415
* 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