aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-day-view.c
Commit message (Collapse)AuthorAgeFilesLines
* Add mouse wheel scrolling support to the calendar day and week viewsAnders Carlsson2000-07-081-1/+47
| | | | svn path=/trunk/; revision=3971
* Sync - FedericoFederico Mena Quintero2000-06-231-12/+29
| | | | svn path=/trunk/; revision=3693
* set event before using it! (e_day_view_init): used new colors from tigert.Damon Chaplin2000-06-211-8/+9
| | | | | | | | | | 2000-06-21 Damon Chaplin <damon@helixcode.com> * gui/e-day-view.c (e_day_view_reshape_long_event): set event before using it! (e_day_view_init): used new colors from tigert. svn path=/trunk/; revision=3671
* Remove the usage of the "x" and "y" arguments.Christopher James Lahey2000-06-211-8/+11
| | | | | | | | | 2000-06-21 Christopher James Lahey <clahey@helixcode.com> * gui/e-day-view.c, gui/e-week-view.c: Remove the usage of the "x" and "y" arguments. svn path=/trunk/; revision=3669
* got rid of some debug messagesDamon Chaplin2000-06-211-18/+0
| | | | svn path=/trunk/; revision=3666
* changed so it keeps the selection range. It just moves it on one day/weekDamon Chaplin2000-06-211-19/+347
| | | | | | | | | | | | | | | | 2000-06-21 Damon Chaplin <damon@helixcode.com> * gui/gnome-cal.c (gnome_calendar_direction): changed so it keeps the selection range. It just moves it on one day/week etc. This makes it very handy for the keyboard shortcut code. * gui/calendar-commands.c (calendar_control_activate): fixed bug setting the radio button active. * gui/e-day-view.[hc]: added support for keyboard navigation and selection of the time range. svn path=/trunk/; revision=3665
* fixed a DnD bug.Damon Chaplin2000-06-191-3/+5
| | | | | | | | | 2000-06-18 Damon Chaplin <damon@helixcode.com> * gui/e-day-view.c (e_day_view_on_top_canvas_drag_data_received): fixed a DnD bug. svn path=/trunk/; revision=3628
* added little buttons which are shown when there are more events than willDamon Chaplin2000-06-171-0/+2
| | | | | | | | | | | | | | | | | | | | * gui/e-week-view.c: added little buttons which are shown when there are more events than will fit in a day. Clicking on the button takes the user to the 1-Day view and shows the full day. * gui/e-day-view.c: * gui/e-week-view.c: set the "use_ellipsis" arg to TRUE for the EText items so we get tooltips automatically. Though we may want to use our own code to show tooltips so we can show the tips when the mouse is around the edges of the event box, and we may want to show the start and end times of the event in full. * gui/calendar-commands.c (calendar_control_activate): * gui/gnome-cal.h: added view_toolbar_buttons[] so we can access the radio buttons in the code easily. We need this if we want to jump to another view programmatically. svn path=/trunk/; revision=3605
* Took out some debugging code.Damon Chaplin2000-06-161-1/+1
| | | | | | Took out some debugging code. svn path=/trunk/; revision=3592
* updated.Damon Chaplin2000-06-161-4/+23
| | | | | | | | | | | 2000-06-16 Damon Chaplin <damon@helixcode.com> * cal-util/test-recur.c: updated. * cal-util/cal-recur.[hc]: mostly finished, though it depends on the iCalObject struct being updated to support more of iCalendar. svn path=/trunk/; revision=3591
* instead of returning a text representation, decode the text and return anSeth Alves2000-06-081-8/+5
| | | | | | | | | | | | | | | | | | | | | | * cal-client/cal-client.c (cal_client_get_object): instead of returning a text representation, decode the text and return an iCalObject. Also added CalClientGetStatus which indicates success or type of failure. * cal-util/calobj.c (ical_object_find_in_string): #ifed out ical_object_find_in_string since it is unused now. * cal-client/client-test.c (list_uids): track get_object change * gui/calendar-commands.c (calendar_iterate): same * gui/e-day-view.c (e_day_view_update_event): same * gui/e-week-view.c (e_week_view_update_event): same * gui/print.c (print_day_details): same (print_day_summary): same (print_todo_details): same * gui/gnome-cal.c (trigger_alarm_cb): same * gui/gncal-todo.c (gncal_todo_update): same svn path=/trunk/; revision=3463
* allow the right button to popup the menu, even when the event is beingDamon Chaplin2000-06-061-0/+12
| | | | | | | | | | | | | | | | | 2000-06-05 Damon Chaplin <damon@helixcode.com> * gui/e-week-view-event-item.c (e_week_view_event_item_button_press): allow the right button to popup the menu, even when the event is being edited. * gui/e-week-view.c: * gui/e-day-view.c: Set the keyboard focus to the EDayView/EWeekView when the right button is clicked, so that any event being edited is saved before any action (e.g. opening the Event Editor dialog) is started. Note that this won't work if we switch to asynchronous notification. svn path=/trunk/; revision=3427
* New function to call the print engine. (calendar_toolbar): Added the PrintFederico Mena Quintero2000-06-031-4/+11
| | | | | | | | | | | | | | | | | | | | | | 2000-06-02 Federico Mena Quintero <federico@helixcode.com> * gui/calendar-commands.c (print): New function to call the print engine. (calendar_toolbar): Added the Print button. (calendar_control_activate): Added the File/Print item. * gui/e-day-view.c (e_day_view_get_selected_time_range): Allow start_time and end_time to be NULL. * gui/e-week-view.c (e_week_view_get_selected_time_range): Likewise. * gui/print.c (range_selector_new): Show the range selector widgets. Use the correct radio group for all of them! (print_calendar): Do the dialog box here. We may want to split this function later into smaller chunks. svn path=/trunk/; revision=3409
* Implemented. (gnome_calendar_add_object): Removed function, since it wasFederico Mena Quintero2000-06-021-18/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-06-02 Federico Mena Quintero <federico@helixcode.com> * gui/gnome-cal.c (save_ical_object_cb): Implemented. (gnome_calendar_add_object): Removed function, since it was identical to gnome_calendar_update_object(). Modified the rest of the code to use only the latter. (gnome_calendar_remove_object): Be more paranoid about the UID. (gnome_calendar_update_object): Ditto. Also, renamed this function from gnome_calendar_object_changed(), for consistency with the lower-level CalClient interface. * gui/event-editor.c (event_editor_class_init): New "save_ical_object" signal to ask that our parent store the calendar object to the backend. (save_ical_object): New function to save the calendar object, actually if just emits the signal. (file_save_cb): Implemented. (dialog_to_ical_object): We want priv-> alarm_program_run_program_entry (i.e. the entry inside the GnomeFileEntry), not the file entry itself. (dialog_to_ical_object): Only insert the recurrence ending date if the event is recurrent! svn path=/trunk/; revision=3380
* Added a hash table to map calendar objects to their respective eventFederico Mena Quintero2000-06-011-37/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-05-31 Federico Mena Quintero <federico@helixcode.com> * gui/gnome-cal.h (GnomeCalendar): Added a hash table to map calendar objects to their respective event editors. * gui/gnome-cal.c (gnome_calendar_init): Create the object_editor_hash. (gnome_calendar_destroy): Free the object_editor_hash. (gnome_calendar_edit_object): New function to centralize the launching of event editors; if one already exists for a particular calendar object, we just raise its window. (edit): Use gnome_calendar_edit_object(). * gui/calendar-commands.c (display_objedit): Use gnome_calendar_edit_object(). (display_objedit_today): Likewise. * gui/e-day-view.c (e_day_view_on_new_appointment): Likewise. (e_day_view_on_edit_appointment): Likewise. * gui/e-week-view.c (e_week_view_on_new_appointment): Likewise. (e_week_view_on_edit_appointment): Likewise. * gui/event-editor.c (event_editor_new): Do not take in an iCalObject; rather provide an event_editor_set_ical_object() function. We need this because a single editor may be switched between different calendar objects. Also, do not show the event editor; leave it up to the client code. (event_editor_construct): Likewise. (clear_widgets): New function to clear the widgets to default values. (fill_widgets): New function to fill in the widgets from the iCalObject. We don't do this in init_widgets() anymore. (free_exception_clist_data): New function to free the exceptions clist data. We were leaking the row data. (init_widgets): Hook to the destroy signal of the exceptions clist. (event_editor_set_ical_object): New function. Now it also makes a copy of the calendar object for the event editor; clients do not need to copy it anymore. (event_editor_destroy): Unref the UI handler as well. (event_editor_class_init): New "ical_object_released" signal to notify the parent that we are no longer editing the calendar object. (make_title_from_ico): Handle NULL objects. * gui/event-editor.h (EventEditor): Removed fields that are no longer used. svn path=/trunk/; revision=3317
* Flush - FedericoFederico Mena Quintero2000-05-301-10/+7
| | | | svn path=/trunk/; revision=3280
* new files to implement iCalendar recurrence rules. These are only partDamon Chaplin2000-05-201-90/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-05-20 Damon Chaplin <damon@helixcode.com> * cal-util/cal-recur.[hc]: new files to implement iCalendar recurrence rules. These are only part finished, but people may like to check that the architecture seems OK. 2000-05-17 Damon Chaplin <damon@helixcode.com> * gui/e-day-view.c (e_day_view_on_delete_occurrence): * gui/e-week-view.c (e_week_view_on_delete_occurrence): use a copy of the iCalObject so we detect the change in the "update_event" callback. Maybe we should just update the view ourselves and then we wouldn't need to detect any change in the callback. * cal-util/calobj.c (ical_object_reset_recurrence): new function to get rid of any recurrence rules. Used when we 'unrecur' an event. * gui/e-day-view.c (e_day_view_key_press): don't add a new event if it won't fit, or we end up adding a new event for each key press. (e_day_view_update_event_label): don't update it if it doesn't have an EText item (i.e. it isn't visible). * gui/e-day-view-time-item.c: allow selection of times using this column. svn path=/trunk/; revision=3144
* Alarm stuff I had not cvs added, sigh - FedericoFederico Mena Quintero2000-05-161-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-05-14 Federico Mena Quintero <federico@helixcode.com> * gui/gnome-cal.c (display_notification): Use the alarm notification dialog. (display_notification_cb): New callback for the result of the alarm notification dialog. * gui/dialogs/alarm-notify.glade: New file with the alarm notification dialog. * gui/dialogs/alarm-notify-dialog.[ch]: New file. * gui/dialogs/Makefile.am: New file. * gui/Makefile.am (SUBDIRS): Added the dialogs directory. 2000-05-13 Federico Mena Quintero <federico@helixcode.com> * gui/gnome-cal.c (trigger_alarm_cb): Better error checking, and plug leaks of str_ico and ico. * gui/evolution-calendar-control.c (main): Initialize libglade. svn path=/trunk/; revision=3072
* gladeified replacement for eventedit.cSeth Alves2000-05-161-2/+2
| | | | | | | | | | * gui/event-editor.[ch]: gladeified replacement for eventedit.c * gui/event-editor-utils.[ch]: utilities used by event-editor.c * gui/event-editor-dialog.glade: glade file used by event-editor.c svn path=/trunk/; revision=3046
* call e_day_view_stop_editing_event here to avoid a divide by zero a bitSeth Alves2000-05-091-0/+6
| | | | | | | | * gui/e-day-view.c (e_day_view_on_delete_appointment): call e_day_view_stop_editing_event here to avoid a divide by zero a bit further on. i'm not sure if this is the best fix for this. svn path=/trunk/; revision=2922
* don't set the ico->uid to NULL or we won't find any other occurrences ofDamon Chaplin2000-05-091-4/+5
| | | | | | | | | | | | | | | | | 2000-05-08 Damon Chaplin <damon@helixcode.com> * gui/e-week-view.c (e_week_view_remove_event_cb): * gui/e-day-view.c (e_day_view_remove_event_cb): don't set the ico->uid to NULL or we won't find any other occurrences of the event. Set the editing_event_day/num to -1 instead. * gui/e-week-view-event-item.c (e_week_view_event_item_draw): fixed the positioning of the icons for long events. * cal-util/calobj.c (ical_object_normalize_summary): forgot to terminate the string. svn path=/trunk/; revision=2920
* show the EText item, just in case it hasn't moved, otherwise it won'tDamon Chaplin2000-05-081-0/+10
| | | | | | | | | | | | | | 2000-05-07 Damon Chaplin <damon@helixcode.com> * gui/e-day-view.c (e_day_view_on_main_canvas_drag_data_received): (e_day_view_on_top_canvas_drag_data_received): show the EText item, just in case it hasn't moved, otherwise it won't appear. * gui/e-day-view.h (E_DAY_VIEW_BAR_WIDTH): increased from 6 to 8 to make it easier to drag an event. Also increased E_DAY_VIEW_GAP_WIDTH since it must be >= the BAR_WIDTH. svn path=/trunk/; revision=2878
* finish editing event when user hits Return key.Damon Chaplin2000-05-071-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | 2000-05-06 Damon Chaplin <damon@helixcode.com> * gui/e-day-view.c: * gui/e-week-view.c: finish editing event when user hits Return key. (e_week_view_on_text_item_event): stop event signals after doing any other calls, since otherwise it will also stop any other resulting event signals. * gui/e-week-view-event-item.c (e_week_view_event_item_draw): don't draw the start/end times while editing. * gui/eventedit.c: changed the Summary field to a GtkEntry, since we now only want a single line of text. * cal-util/calobj.c (ical_object_normalize_summary): new function to convert the summary field to a single line of text, by converting any sequence of CR & LF characters to a single space. (ical_object_create_from_vobject): call the above function. I think all functions that load iCalObjects go through this. (ical_new): called it here as well just in case. svn path=/trunk/; revision=2827
* added guint ref_count to iCalObject struct, and ical_object_ref/unref()Damon Chaplin2000-05-061-45/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-05-06 Damon Chaplin <damon@helixcode.com> * cal-util/calobj.[hc]: added guint ref_count to iCalObject struct, and ical_object_ref/unref() functions. I've updated all the gui/ stuff to use ref_counts but I haven't touched the pcs/ stuff. Maybe just using ical_object_destroy() is OK there. * gui/gncal-todo.c: * gui/calendar-commands.c: * gui/eventedit.c: * gui/e-week-view.c: * gui/e-day-view.c: use refcounting for iCalObjects. * gui/e-day-view-main-item.c: * gui/e-day-view-top-item.c: * gui/e-day-view.c: try not to ever draw outside the event, even when the event is very small. 2000-05-05 Damon Chaplin <damon@helixcode.com> * gui/e-day-view.c: don't allow recurring events to be resized or dragged, and don't show the resize/drag cursors. Actually it may be better to let the user do the resize/drag and then ask them what they want to do - change the single occurrence or the entire series. * gui/e-day-view-time-item.c (e_day_view_time_item_show_popup_menu): use e_auto_kill_popup_menu_on_hide() to destroy the popup menu. * gui/popup-menu.c: include e-gui-utils.h svn path=/trunk/; revision=2823
* for the long events pass E_DAY_VIEW_LONG_EVENT as the day. Fixes SEGV.Damon Chaplin2000-05-051-5/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-05-04 Damon Chaplin <damon@helixcode.com> * gui/e-day-view.c (e_day_view_foreach_event_with_uid): for the long events pass E_DAY_VIEW_LONG_EVENT as the day. Fixes SEGV. * gui/calendar-commands.c: when we switch views, grab the focus. * gui/gnome-cal.c (gnome_calendar_tag_calendar): (gnome_calendar_mark_gtk_calendar_day): changed this so it uses cal_client_get_events_in_range(), and doesn't load any objects. Also just return if it isn't visible. * gui/calendar-commands.c (calendar_get_events_in_range): call g_list_sort() to sort the list rather than g_list_insert_sorted() for each element. It is much more efficient. Also changed it so that the co->ev_start/end fields are copied from the CalObjInstance rather than the parameters to the function (that is right, isn't it?) Also freed the list elements, and finally the list. (calendar_iterate): changed this to use cal_client_get_events_in_range since that is more efficient than getting all the uids and then loading and parsing all the events. * pcs/cal-backend.c (save): output the '... saved' message before freeing the string! * gui/gncal-todo.c (gncal_todo_update): * gui/e-week-view.c (e_week_view_update_event): * gui/e-day-view.c (e_day_view_update_event): * gui/calendar-commands.c (calendar_get_events_in_range): (calendar_iterate): free obj_string after it is parsed. svn path=/trunk/; revision=2802
* set the active radio button here. Oops - it wasn't a Bonobo problem afterDamon Chaplin2000-05-031-16/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-05-02 Damon Chaplin <damon@helixcode.com> * gui/calendar-commands.c (calendar_control_activate): set the active radio button here. Oops - it wasn't a Bonobo problem after all. * gui/popup-menu.c (popup_menu): added call to e_auto_kill_popup_menu_on_hide() to destroy the menu. * gui/e-week-view.c (e_week_view_show_popup_menu): * gui/e-day-view.c (e_day_view_on_event_right_click): ico->user_data isn't useful any more, since the event editor keeps its own iCalObject. So for now we make the menu commands available even when the event is being edited in the event editor. Also corrected misspellings of 'occurance' -> 'occurrence'. * gui/eventedit.c (event_editor_destroy): destroy the iCalObject. The event editor now uses its own independent iCalObject. * gui/e-week-view.c (e_week_view_on_unrecur_appointment): * gui/e-day-view.c (e_day_view_on_unrecur_appointment): create a new uid for the new single instance. I'm not sure what we should do about the creation/last modification times of the objects. * gui/e-week-view.c (e_week_view_on_edit_appointment): * gui/e-day-view.c (e_day_view_on_edit_appointment): duplicate the iCalObject before passing it to the event editor, since it will change the fields. If we don't duplicate it we won't know what has changed when we get the "update_event" callback. * gui/e-week-view.c (e_week_view_key_press): * gui/e-day-view.c (e_day_view_key_press): set the created and last_mod times of the new iCalObject. We may want to set the default alarm as well. * cal-util/calobj.c (ical_gen_uid): made this function public so we can generate new uids if necessary. svn path=/trunk/; revision=2759
* new function to get the currently seleted time range form the currentDamon Chaplin2000-05-011-42/+84
| | | | | | | | | | | | | | | | | | | 2000-05-01 Damon Chaplin <damon@helixcode.com> * gui/gnome-cal.[hc] (gnome_calendar_get_current_time_range): new function to get the currently seleted time range form the current view. * gui/calendar-commands.c (display_objedit): use the above function to get the time for the new appointment. * gui/e-week-view.c: * gui/e-day-view.c: use a shallow copy of the ico when we update the times (when resizing/dragging). Otherwise we won't detect that the time has changed in the "update_event" callback. Also added functions to get the currently selected time range. svn path=/trunk/; revision=2712
* new function to see if the event dates have changed (including anyDamon Chaplin2000-05-011-50/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-05-01 Damon Chaplin <damon@helixcode.com> * cal-util/calobj.c (ical_object_compare_dates): new function to see if the event dates have changed (including any recurrence rules). It is used for optimization when we get the "object_changed" signal. We have to do far less work if the dates are unchanged. * gui/e-week-view.c: * gui/e-day-view.c: only draw the selection when we have the keyboard focus, since the user expects to be able to type in a new event when the selection is shown. Also keep the selection when we lose focus, but just don't show it. Also quite a few changes to cope with the new client/server architecture. * gui/e-day-view-top-item.c (e_day_view_top_item_draw): * gui/e-day-view-main-item.c (e_day_view_main_item_draw): * gui/e-week-view-main-item.c (e_week_view_main_item_draw_day): only draw the selection if the widget has the keyboard focus. * gui/gnome-cal.c (mark_gtk_calendar_day): fixed so it works with events longer than one day. And changed the code for updating events in the new views. svn path=/trunk/; revision=2701
* compare iCalObjects by their UIDs instead of by their pointers.Seth Alves2000-04-261-1/+4
| | | | | | | * gui/e-day-view.c (e_day_view_find_event_from_ico): compare iCalObjects by their UIDs instead of by their pointers. svn path=/trunk/; revision=2617
* allow for null icoSeth Alves2000-04-261-1/+1
| | | | | | | | * gui/e-day-view.c (e_day_view_update_event): allow for null ico * gui/e-week-view.c (e_week_view_update_event): allow for null ico svn path=/trunk/; revision=2605
* added new source files and pixmaps, and removed old source files, whichDamon Chaplin2000-04-241-167/+330
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-04-24 Damon Chaplin <damon@helixcode.com> * gui/Makefile.am: added new source files and pixmaps, and removed old source files, which can be deleted. * gui/e-week-view-titles-item.[hc]: * gui/e-week-view-main-item.[hc]: * gui/e-week-view-event-item.[hc]: * gui/e-week-view.[hc]: new files implementing the week/month views. * gui/yearview.xpm: * gui/monthview.xpm: * gui/weekview.xpm: * gui/workweekview.xpm: * gui/dayview.xpm: new pixmaps for the toolbar buttons. These aren't intended to be the final pixmaps. * gui/calendar-commands.c: added radio buttons to the toolbar to switch between the calendar views, and moved the am_pm_flag here so we can get rid of view-utils.c. * gui/gnome-cal.[hc]: made it a subclass of GtkVBox, rearranged the widgets into 2 notebooks, and added the selection_start_time and selection_end_time fields. * gui/goto.c: updated to use new selection time range. * gui/quick-view.c: added '#include <gtk/gtkwindow.h>' so it compiles. * gui/e-day-view.[hc]: changed the interface to support the new selection time range, got rid of a few debugging messages and changed a few bits. svn path=/trunk/; revision=2583
* build test-calendar-widget and evolution-calendar, common stuff is in aSeth Alves2000-04-061-2/+2
| | | | | | | | | | | | | | | * gui/Makefile.am: build test-calendar-widget and evolution-calendar, common stuff is in a library * gui/gnome-cal.c (gnome_calendar_get_type): made the calendar widget based on a gtk_frame rather than a gnome_app * gui/calendar-commands.c: split out some of main.c * gui/evolution-calendar-control.c: bonobo bung so evolution can use the calendar widget svn path=/trunk/; revision=2294
* Fix includes. (e_day_view_on_delete_occurance): Do not callFederico Mena Quintero2000-03-231-13/+4
| | | | | | | | | | | | | | | | | 2000-03-17 Federico Mena Quintero <federico@helixcode.com> * gui/e-day-view.c: Fix includes. (e_day_view_on_delete_occurance): Do not call save_default_calendar(). (e_day_view_on_delete_appointment): Likewise. (e_day_view_on_unrecur_appointment): Likewise. (e_day_view_finish_long_event_resize): Likewise. (e_day_view_finish_resize): Likewise. (e_day_view_key_press): Likewise. (e_day_view_on_editing_stopped): Likewise. (e_day_view_on_top_canvas_drag_data_received): Likewise. (e_day_view_on_main_canvas_drag_data_received): Likewise. svn path=/trunk/; revision=2140
* New widget for Day/Work-Week views. Unfinished.Damon Chaplin2000-03-141-0/+4585
svn path=/trunk/; revision=2115