aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authornobody <nobody@localhost>2005-06-04 19:32:58 +0800
committernobody <nobody@localhost>2005-06-04 19:32:58 +0800
commitf0b6f8b31f2e89a084e326e0c49b1b578733b4c5 (patch)
tree7f6a0c236378f446ba5c5e095350d6683e2b8004 /calendar
parentc2e8785c01707e3845328decba6e8429493b3a52 (diff)
downloadgsoc2013-evolution-EVOLUTION_2_2_3.tar.gz
gsoc2013-evolution-EVOLUTION_2_2_3.tar.zst
gsoc2013-evolution-EVOLUTION_2_2_3.zip
This commit was manufactured by cvs2svn to create tagEVOLUTION_2_2_3
'EVOLUTION_2_2_3'. svn path=/tags/EVOLUTION_2_2_3/; revision=29455
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog323
-rw-r--r--calendar/calendar-errors.xml.h146
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.c308
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.h18
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.c2
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c105
-rw-r--r--calendar/gui/calendar-component.c17
-rw-r--r--calendar/gui/dialogs/comp-editor.c97
-rw-r--r--calendar/gui/dialogs/event-page.c1
-rw-r--r--calendar/gui/dialogs/recur-comp.c13
-rw-r--r--calendar/gui/dialogs/task-page.c1
-rw-r--r--calendar/gui/e-cal-model.c13
-rw-r--r--calendar/gui/e-calendar-view.c59
-rw-r--r--calendar/gui/e-day-view.c179
-rw-r--r--calendar/gui/e-meeting-list-view.c2
-rw-r--r--calendar/gui/e-tasks.c2
-rw-r--r--calendar/gui/e-week-view-event-item.c2
-rw-r--r--calendar/gui/gnome-cal.c41
-rw-r--r--calendar/gui/print.c5
-rw-r--r--calendar/gui/tasks-component.c4
20 files changed, 427 insertions, 911 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index c4975be5e4..553140d554 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,102 +1,8 @@
-2005-05-30 Thouis R. Jones <thouis@csail.mit.edu>
-
- Fixes #272301
-
- * gui/apps_evolution_calendar.schemas.in.in:
- * gui/calendar-config-keys.h:
- * gui/calendar-config.c: (calendar_config_get_marcus_bains,
- calendar_config_add_notification_marcus_bains):
- * gui/calendar-config.h:
- * gui/e-day-view-config.c: (set_marcus_bains,
- marcus_bains_changed_cb, e_day_view_config_set_view):
- * gui/e-day-view-main-item.c: (e_day_view_main_item_draw):
- * gui/e-day-view-time-item.c: (e_day_view_time_item_draw):
- * gui/e-day-view.c: (e_day_view_init, e_day_view_set_colors,
- e_day_view_get_show_marcus_bains, e_day_view_set_marcus_bains,
- e_day_view_update_marcus_bains):
- * gui/e-day-view.h:
- * gui/gnome-cal.c: (update_marcus_bains_line_cb, setup_widgets,
- gnome_calendar_destroy): Added Marcus Bains Line to main item
- view and time bar.
-
2005-05-30 Harry Lu <harry.lu@sun.com>
- * gui/itip-utils.c: (itip_send_comp): check whether backend could
+ * gui/itip-utils.c: (itip_send_comp): check whether backend could
handle sending resuests/updates, and if so, just return.
-2005-05-24 Chenthill Palanisamy <pchenthill@novell.com>
-
- Fixes #272114
- * gui/dialogs/calendar-setup.c: (eccp_commit),
- (calendar_setup_edit_calendar): Check if the color is
- present in the source before setting it.
-
-2005-05-24 Srinivasa Ragavan <sragavan@novell.com>
- * gui/dialogs/cal-attachment-bar.c, gui/dialogs/cal-attachment-bar.h,
- gui/dialogs/cal-attachment.c, gui/dialogs/cal-attachment.h,
- gui/dialogs/comp-editor.c, calendar.error.xml: Added the support to DnD
- remote URL to the attachment window. It downloads asynchronously and
- attaches.
-
-2005-05-16 Srinivasa Ragavan <sragavan@novell.com>
-
- * gui/dialogs/comp-editor.c (attachment_bar_changed_cb)
- (attachment_bar_icon_clicked_cb) (setup_widgets)
- (comp_editor_sensitize_attachment_bar) (fill_widgets):
- Removed the expander in calendar attachment. It keeps showing
- now, to ease DnD.
-
-2005-05-16 Chenthill Palanisamy <pchenthill@novell.com>
-
- * gui/gnome-cal.c: (client_cal_opened_cb),
- (default_client_cal_opened_cb): Removed the debug
- messages.
-
-2005-05-16 Not Zed <NotZed@Ximian.com>
-
- * moved e-error to e-util/
-
-2005-05-16: Srinivasa Ragavan <sragavan@novell.com>
-
- * gui/GNOME_Evolution_Calendar.server.in.in: Added tooltips
-
-2005-05-13 Sushma Rai <rsushma@novell.com>
-
- * gui/dialogs/recurrence-page.c (make_ending_until_special): Setting
- two weeks after the start date as default "until" date.
- Fixes #268906
-
-2005-05-12 Harish Krishnaswamy <kharish@novell.com>
-
- on behalf of jack jia <jack.jia@sun.com>
- fixes #229794
-
- * gui/dialogs/recurrence-page.c: (make_weekly_special):
- Allow deselection of the current day while scheduling
- recurrences based on weeek days.
-
-2005-05-12 Sushma Rai <rsushma@novell.com>
-
- * gui/e-cal-model-tasks.c (get_geo): Not marking geographical locations
- for translation.
- Fixes #261080
-
-2005-05-12 Vivek Jain <jvivek@novell.com>
-
- Fixes #271523
-
- * gui/dialogs/calendar-setup.c:
- (CalendarSourceDialog): included an ECalSourceType member in
- the structure
- (calendar_setup_edit_calendar): set source_type as EVENT
- (calendar_setup_edit_task_list): set source_type as TODO
- (eccp_general_offline): Change the label according to the type
-
-2005-05-12 Srinivasa Ragavan <sragavan@novell.com>
- * gui/task-component.c (selector_tree_drag_motion): Fixes the bug 269416
- It makes the DnD to move tasks instead copying.
-
-
2005-05-09 Rodrigo Moya <rodrigo@novell.com>
Fixes #301350
@@ -107,102 +13,16 @@
reload alarms.
(queue_midnight_refresh): made the midnight value be global.
-2005-05-09 Philip Van Hoof <pvanhoof@gnome.org>
-
- * gui/alarm-notify/*: Made the alarm-notify dialog
- multi-alarm aware
-
2005-05-09 Rodrigo Moya <rodrigo@novell.com>
* gui/migration.c (migrate_ical_folder_to_source): cover the case when
there is no calendar.ics/tasks.ics file in the folder to migrate.
-
-2005-05-06 Vivek Jain <jvivek@novell.com>
-
- **Fixes #261079
- * gui/e-alarm-list.c:(get_alarm_string)
- Added translator comments.
-
-2005-05-06 Chenthill Palanisamy <pchenthill@novell.com>
-
- * gui/apps_evolution_calendar.schemas.in.in: Fixing a
- grammar mistake.
- See 301459
-
-2005-05-06 Changwoo Ryu <cwryu@debian.org>
-
- * gui/apps_evolution_calendar.schemas.in.in: added a missing
- period in long description. and fixed an invalid tag.
-
-2005-05-06 Chenthill Palanisamy <pchenthill@novell.com>
-
- Fixes #272464
- * calendar-errors.xml:
- * calendar-errors.xml.h: Changed the primary and secondary
- messages to make it more clear.
-
-2005-05-06 Vivek Jain <jvivek@novell.com>
-
- **Fixes #272566
- * gui/dialogs/event-page.glade:
- removed unwanted space in button label
-
-2005-05-06 Rodrigo Moya <rodrigo@novell.com>
-
- * gui/e-cal-model.c (e_cal_view_objects_added_cb): uncomment code that
- shouldn't be.
-
-2005-05-06 Rodrigo Moya <rodrigo@novell.com>
-
- Fixes #271679
-
- * gui/dialogs/comp-editor.c (save_comp):
- * gui/e-week-view.c (e_week_view_on_editing_stopped,
- e_week_view_change_event_time): set correct start/end times for
- individual instances and remove all rules and exceptions.
- (e_week_view_reshape_event_span): show recurrence icons for
- detached instances also.
-
- * gui/e-day-view.c (e_day_view_finish_resize,
- e_day_view_finish_long_event_resize, e_day_view_on_editing_stopped,
- e_day_view_on_top_canvas_drag_data_received,
- e_day_view_on_main_canvas_drag_data_received,
- e_day_view_change_event_time): set the correct start/end times when
- modifying individual instances and remove all rules and exceptions.
- (e_day_view_on_top_canvas_motion, e_day_view_on_main_canvas_motion):
- disable D&D for recurring events.
- (e_day_view_reshape_long_event, e_day_view_reshape_day_event):
- check for detached instances and show recurrence icons for them also.
-
- * gui/e-week-view-event-item.c (e_week_view_event_item_draw_icons):
- * gui/e-day-view-top-item.c (e_day_view_top_item_draw_long_event):
- * gui/e-day-view-main-item.c (e_day_view_main_item_draw_day_event):
- check for detached instances and show recurrence icons for them also.
-
- * gui/e-cal-model.c (set_instance_times): don't use the RECURRENCE-ID
- to get the datetime.
-
- * gui/e-calendar-view.c (e_calendar_view_delete_selected_occurrence):
- exceptions need to be date only.
- (e_calendar_view_copy_clipboard): remove RECURRENCE-IDs from components
- we copy to the clipboard.
- (e_calendar_view_cut_clipboard): when cutting instances, remove only
- the selected instances.
- (on_unrecur_appointment): use MOD_ALL to modify the master object and
- remove recurrence-id from detached event.
-
- * gui/dialogs/recur-comp.c (recur_component_dialog): re-enabled.
-
-2005-05-05 Rodrigo Moya <rodrigo@novell.com>
-
- * gui/dialogs/event-page.c:
- * gui/dialogs/task-page.c: removed GAL's e-categories.h include.
-
+
2005-05-01 Chenthill Palanisamy <pchenthill@novell.com>
Fixes #274406
* gui/alarm-notify/alarm-notify.c: (cal_opened_cb): Removed the
- additional unref present.
+ additional unref present.
2005-04-18 Chenthill Palanisamy <pchenthill@novell.com>
@@ -223,55 +43,31 @@
* gui/e-cal-model.c: (cal_opened_cb): If the status
is busy call open method again, do not remove the
client.
+
* gui/gnome-cal.c: (client_cal_opened_cb),
(default_client_cal_opened_cb): IF the status is busy
and the load_state is not loaded call open method.
-2005-04-04 Rodrigo Moya <rodrigo@novell.com>
-
- Fixes #68423
-
- * gui/migration.c (migrate_ical):
- * gui/e-tasks,c (e_tasks_expunge):
- * gui/gnome-cal.c (gnome_calendar_purge): fixed huge (in some cases)
- memory leaks.
-
-2005-04-01 Rodrigo Moya <rodrigo@novell.com>
-
- Fixes #41740
-
- * gui/calendar-errors.xml:
- * gui/calendar-errors.xml.h: added editor error.
-
- * gui/alarm-notify/alarm-queue.c (edit_component): display error messages
- when we can't load the component in the editor.
-
- * gui/alarm-notify/Makefile.am: linked against libemiscwidgets.la.
-
-2005-04-01 Chenthill Palanisamy <pchenthill@novell.com>
-
- Fixes #73879
- * gui/dialogs/comp-editor.[ch]:
- (comp_editor_sensitize_attachment_bar): Added a function
- to sensitize/desensitize the attachment bar.
- (comp_editor_notify_client_changed): When client changes
- sensitize the attachment bar.
- * gui/dialogs/event-editor.c: (event_editor_construct):
- * gui/dialogs/task-editor.c: (task_editor_construct): Sensitize
- the attachment bar.
+2005-04-06 Chenthill Palanisamy <pchenthill@novell.com>
+
+ Fixes #73508
+ * gui/dialogs/meeting-page.c: (meeting_page_fill_widgets): Set the
+ organizers status as NEEDS ACTION, checking for the static capability.
-2005-03-31 Chenthill Palanisamy <pchenthill@novell.com>
+2005-04-06 Chenthill Palanisamy <pchenthill@novell.com>
Fixes #73969
* gui/e-calendar-view.c: (delete_event): Remove the
recurrence id property if its present.
-2005-03-30 Li Yuan <li.yuan@sun.com>
+2005-04-04 Rodrigo Moya <rodrigo@novell.com>
- Fixes #73914
+ Fixes #68423
- * gui/dialogs/cal-prefs-dialog.glade:
- add a11y name to Publishing Table.
+ * gui/migration.c (migrate_ical):
+ * gui/e-tasks,c (e_tasks_expunge):
+ * gui/gnome-cal.c (gnome_calendar_purge): fixed huge (in some cases)
+ memory leaks.
2005-03-28 Rodrigo Moya <rodrigo@novell.com>
@@ -280,15 +76,22 @@
* gui/alarm-queue.c (display_notification): make the alarm dialog sticky
when not using the system tray.
+2005-03-25 Harry Lu <harry.lu@sun.com>
+
+ Fix a string break by 44579's patch.
+
+ * gui/print.c: (print_comp_item): split the strings to
+ reuse existing strings.
+
2005-03-24 JP Rosevear <jpr@novell.com>
-
- Fixes #69272
-
- * gui/comp-util.c (cal_comp_event_new_with_defaults): ensure we
- always return a valid comp
-
- * gui/comp-util.c (cal_comp_task_new_with_defaults): ditto; fix
- obvious pasto that would cause a leak
+
+ Fixes #69272
+
+ * gui/comp-util.c (cal_comp_event_new_with_defaults): ensure we
+ always return a valid comp
+
+ * gui/comp-util.c (cal_comp_task_new_with_defaults): ditto; fix
+ obvious pasto that would cause a leak
2005-03-24 Chenthill Palanisamy <pchenthill@novell.com>
@@ -296,38 +99,33 @@
* gui/e-meeting-list-view.c: (attendee_edited_cb): Check if
we are editing the same row and if so do not remove the attendee.
-2005-03-24 Chenthill Palanisamy <pchenthill@novell.com>
-
- Fixes #73508
- * gui/dialogs/meeting-page.c: (meeting_page_fill_widgets): Set the
- organizers status as NEEDS ACTION, checking for the static capability.
-
2005-03-16 Li Yuan <li.yuan@sun.com>
- * gui/calendar-view.c: (calendar_view_class_init):
- remove the edit function.
+ * gui/print.c: (print_comp_item):
- Fixes # 40762
+ Fixes #44579
-2005-03-22 Chenthill Palanisamy <pchenthill@novell.com>
+2005-03-18 Chenthill Palanisamy <pchenthill@novell.com>
- * gui/calendar-component.c: (popup_event_cb): Popup all the
- menu items when clicked on the source.
+ Fixes #68525, 68580
+ * gui/gnome-cal.c (update_query), (gnome_calendar_init):
+ Added a boolean variable to avoid crash when a race condition
+ occurs.
-2005-03-21 Chenthill Palanisamy <pchenthill@novell.com>
+2005-03-16 Rodrigo Moya <rodrigo@novell.com>
- Fixes #73031
- * gui/dialogs/event-editor.c: (event_editor_finalize):
- * gui/dialogs/task-editor.c: (task_editor_finalize): Added
- a check for the presence of the object before unreffing it.
+ Fixes #72983
+
+ * gui/e-cal-list-view.c (e_cal_list_view_new): set EXPAND_RECURRENCES
+ flag on the model.
-2005-03-21 JP Rosevear <jpr@novell.com>
+2005-03-15 JP Rosevear <jpr@novell.com>
* gui/gnome-cal.c (default_client_cal_opened_cb): if its busy, try
again
(client_cal_opened_cb): ditto
-2005-03-21 JP Rosevear <jpr@novell.com>
+2005-03-15 JP Rosevear <jpr@novell.com>
* gui/e-day-view.c (e_day_view_on_main_canvas_drag_data_received):
abort sequence
@@ -335,40 +133,15 @@
(e_day_view_on_main_canvas_motion): ditto
* gui/e-calendar-view.c (on_unrecur_appointment): clear recur id
+ on the existing and new before updating, modify ALL for the master
-2005-03-21 JP Rosevear <jpr@novell.com>
-
+2005-03-15 JP Rosevear <jpr@novell.com>
+
* gui/tasks-component.c (ensure_sources): ensure the color and
primary config are set on the personal source
* gui/calendar-component.c (ensure_sources): ditto
-2005-03-21 Li Yuan <li.yuan@sun.com>
-
- * gui/print.c: (print_comp_item):
- Fixes #44579
-
-2005-03-17 Chenthill Palanisamy <pchenthill@novell.com>
-
- Fixes #68525, 68580
- * gui/gnome-cal.c (update_query), (gnome_calendar_init):
- Added a boolean variable to avoid crash when a race condition
- occurs.
-
-2005-03-16 Rodrigo Moya <rodrigo@novell.com>
-
- Fixes #73101
-
- * calendar-errors.xml:
- * calendar-errors.xml.h: removed unnecessary leading space.
-
-2005-03-16 Rodrigo Moya <rodrigo@novell.com>
-
- Fixes #72983
-
- * gui/e-cal-list-view.c (e_cal_list_view_new): set EXPAND_RECURRENCES
- flag on the model.
-
2005-03-15 JP Rosevear <jpr@novell.com>
* gui/itip-utils.c (itip_send_comp): when publishing, the to_list
diff --git a/calendar/calendar-errors.xml.h b/calendar/calendar-errors.xml.h
new file mode 100644
index 0000000000..926a2acf1b
--- /dev/null
+++ b/calendar/calendar-errors.xml.h
@@ -0,0 +1,146 @@
+/* calendar:prompt-cancel-meeting primary */
+char *s = N_("Would you like to send all the participants a cancellation notice?");
+/* calendar:prompt-cancel-meeting secondary */
+char *s = N_("If you don't send a cancellation notice, the other participants may not know the meeting is canceled.");
+char *s = N_("Don't Send");
+char *s = N_("Send Notice");
+/* calendar:prompt-delete-meeting primary */
+char *s = N_("Are you sure you want to delete this meeting?");
+/* calendar:prompt-delete-meeting secondary */
+char *s = N_("All information on this meeting will be deleted and can not be restored.");
+/* calendar:prompt-cancel-task primary */
+char *s = N_("Would you like to send all the participants a cancellation notice?");
+/* calendar:prompt-cancel-task secondary */
+char *s = N_("If you don't send a cancellation notice, the other participants may not know the task has been deleted.");
+char *s = N_("Don't Send");
+char *s = N_("Send Notice");
+/* calendar:prompt-delete-task primary */
+char *s = N_("Are you sure you want to delete this task?");
+/* calendar:prompt-delete-task secondary */
+char *s = N_("All information on this task will be deleted and can not be restored.");
+/* calendar:prompt-cancel-journal primary */
+char *s = N_("Would you like to send a cancellation notice for this journal entry?");
+/* calendar:prompt-cancel-journal secondary */
+char *s = N_("If you don't send a cancellation notice, the other participants may not know the journal has been deleted.");
+char *s = N_("Don't Send");
+char *s = N_("Send Notice");
+/* calendar:prompt-delete-journal primary */
+char *s = N_("Are you sure you want to delete this journal entry?");
+/* calendar:prompt-delete-journal secondary */
+char *s = N_("All information on this journal entry will be deleted and can not be restored.");
+/* calendar:prompt-delete-titled-appointment primary */
+char *s = N_("Are you sure you want to delete the appointment titled '{0}'?");
+/* calendar:prompt-delete-titled-appointment secondary */
+char *s = N_("All information on this appointment will be deleted and can not be restored.");
+/* calendar:prompt-delete-appointment primary */
+char *s = N_("Are you sure you want to delete this appointment?");
+/* calendar:prompt-delete-appointment secondary */
+char *s = N_("All information on this appointment will be deleted and can not be restored.");
+/* calendar:prompt-delete-named-task primary */
+char *s = N_("Are you sure you want to delete the '{0}' task?");
+/* calendar:prompt-delete-named-task secondary */
+char *s = N_("All information on this task will be deleted and can not be restored.");
+/* calendar:prompt-delete-task primary */
+char *s = N_("Are you sure you want to delete this task?");
+/* calendar:prompt-delete-task secondary */
+char *s = N_("All information on this task will be deleted and can not be restored.");
+/* calendar:prompt-delete-named-journal primary */
+char *s = N_("Are you sure you want to delete the journal entry '{0}'?");
+/* calendar:prompt-delete-named-journal secondary */
+char *s = N_("All information in this journal will be deleted and can not be restored.");
+/* calendar:prompt-delete-journal primary */
+char *s = N_("Are you sure you want to delete this journal entry?");
+/* calendar:prompt-delete-journal secondary */
+char *s = N_("All information in this journal will be deleted and can not be restored.");
+/* calendar:prompt-delete-appointments primary */
+char *s = N_("Are you sure you want to delete these {0} appointments?");
+/* calendar:prompt-delete-appointments secondary */
+char *s = N_("All information on these appointments will be deleted and can not be restored.");
+/* calendar:prompt-delete-tasks primary */
+char *s = N_("Are you sure you want to delete these {0} tasks?");
+/* calendar:prompt-delete-tasks secondary */
+char *s = N_("All information on these tasks will be deleted and can not be restored.");
+/* calendar:prompt-delete-journals primary */
+char *s = N_("Are you sure you want to delete these {0} journal entries?");
+/* calendar:prompt-delete-journals secondary */
+char *s = N_("All information in these journal entries will be deleted and can not be restored.");
+/* calendar:prompt-save-appointment title */
+char *s = N_("Save Appointment");
+/* calendar:prompt-save-appointment primary */
+char *s = N_("Would you like to save your changes to this appointment?");
+/* calendar:prompt-save-appointment secondary */
+char *s = N_("You have made changes to this appointment, but not yet saved them.");
+char *s = N_("Discard Changes");
+char *s = N_("Save Changes");
+/* calendar:prompt-save-task title */
+char *s = N_("Save Task");
+/* calendar:prompt-save-task primary */
+char *s = N_("Would you like to save your changes to this task?");
+/* calendar:prompt-save-task secondary */
+char *s = N_("You have made changes to this task, but not yet saved them.");
+char *s = N_("Discard Changes");
+char *s = N_("Save Changes");
+/* calendar:prompt-meeting-invite primary */
+char *s = N_("Would you like to send meeting invitations to participants?");
+/* calendar:prompt-meeting-invite secondary */
+char *s = N_("Email invitations will be sent to all participants and allow them to RSVP.");
+char *s = N_("Don't Send");
+char *s = N_("Send");
+/* calendar:prompt-send-updated-meeting-info primary */
+char *s = N_("Would you like to send updated meeting information to participants?");
+/* calendar:prompt-send-updated-meeting-info secondary */
+char *s = N_("Sending updated information allows other participants to keep their calendars up to date.");
+char *s = N_("Don't Send");
+char *s = N_("Send");
+/* calendar:prompt-send-task primary */
+char *s = N_("Would you like to send this task to participants?");
+/* calendar:prompt-send-task secondary */
+char *s = N_("Email invitations will be sent to all participants and allow them to accept this task.");
+char *s = N_("Don't Send");
+char *s = N_("Send");
+/* calendar:prompt-send-updated-task-info primary */
+char *s = N_("Would you like to send updated task information to participants?");
+/* calendar:prompt-send-updated-task-info secondary */
+char *s = N_("Sending updated information allows other participants to keep their task lists up to date.");
+char *s = N_("Don't Send");
+char *s = N_("Send");
+/* calendar:tasks-crashed primary */
+char *s = N_("The Evolution tasks have quit unexpectedly.");
+/* calendar:tasks-crashed secondary */
+char *s = N_("Your tasks will not be available until Evolution is restarted.");
+/* calendar:calendar-crashed primary */
+char *s = N_("The Evolution calendar has quit unexpectedly.");
+/* calendar:calendar-crashed secondary */
+char *s = N_("Your calendars will not be available until Evolution is restarted.");
+/* calendar:prompt-delete-calendar primary */
+char *s = N_("Delete calendar '{0}'?");
+/* calendar:prompt-delete-calendar secondary */
+char *s = N_("This calendar will be removed permanently.");
+/* calendar:prompt-delete-task-list primary */
+char *s = N_("Delete task list '{0}'?");
+/* calendar:prompt-delete-task-list secondary */
+char *s = N_("This task list will be removed permanently.");
+/* calendar:prompt-send-no-subject-calendar primary */
+char *s = N_("Are you sure you want to send the appointment without a summary?");
+/* calendar:prompt-send-no-subject-calendar secondary */
+char *s = N_("Adding a meaningful Summary to your appointment will give your recipients an idea of what your appointment is about.");
+char *s = N_("_Send");
+/* calendar:prompt-send-no-subject-task primary */
+char *s = N_("Are you sure you want to send the task without a summary?");
+/* calendar:prompt-send-no-subject-task secondary */
+char *s = N_("Adding a meaningful Summary to your task will give your recipients an idea of what your task is about.");
+char *s = N_("_Send");
+/* calendar:prompt-no-contents-offline-calendar primary */
+char *s = N_("Error loading calendar");
+/* calendar:prompt-no-contents-offline-calendar secondary */
+char *s = N_("The calendar is not marked for offline usage");
+/* calendar:prompt-no-contents-offline-tasks primary */
+char *s = N_("Error loading task list");
+/* calendar:prompt-no-contents-offline-tasks secondary */
+char *s = N_("The task list is not marked for offline usage");
+/* calendar:server-version title */
+char *s = N_("Server Version");
+/* calendar:server-version primary */
+char *s = N_("Your server needs to be updated");
+/* calendar:server-version secondary */
+char *s = N_(" Some features may not work correctly with your current server version ");
diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.c b/calendar/gui/alarm-notify/alarm-notify-dialog.c
index 3b81bad8f1..ee625c96f9 100644
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.c
+++ b/calendar/gui/alarm-notify/alarm-notify-dialog.c
@@ -22,8 +22,6 @@
#include <config.h>
#include <stdio.h>
#include <string.h>
-#include <gtk/gtktreeview.h>
-#include <gtk/gtkcellrenderertext.h>
#include <gtk/gtkdialog.h>
#include <gtk/gtkimage.h>
#include <gtk/gtklabel.h>
@@ -44,65 +42,31 @@
#include <e-util/e-icon-factory.h>
-
-enum {
- ALARM_DISPLAY_COLUMN,
- ALARM_SUMMARY_COLUMN,
- ALARM_DESCRIPTION_COLUMN,
- ALARM_LOCATION_COLUMN,
-
- ALARM_START_COLUMN,
- ALARM_END_COLUMN,
-
- ALARM_FUNCINFO_COLUMN,
-
- N_ALARM_COLUMNS
-};
-
/* The useful contents of the alarm notify dialog */
-
-typedef struct {
- AlarmNotifyFunc func;
- gpointer func_data;
-} AlarmFuncInfo;
-
typedef struct {
GladeXML *xml;
GtkWidget *dialog;
+ GtkWidget *title;
GtkWidget *snooze_time;
GtkWidget *minutes_label;
GtkWidget *description;
GtkWidget *location;
- GtkWidget *treeview;
- GtkWidget *scrolledwindow;
-
- AlarmFuncInfo *cur_funcinfo;
-
+ GtkWidget *start;
+ GtkWidget *end;
+
+ AlarmNotifyFunc func;
+ gpointer func_data;
} AlarmNotify;
enum {
- AN_RESPONSE_EDIT = 0,
+ AN_RESPONSE_EDIT = 0,
AN_RESPONSE_SNOOZE = 1
};
static void
-tree_selection_changed_cb (GtkTreeSelection *selection, gpointer data);
-
-static void
-fill_in_labels (AlarmNotify *an, const gchar *summary, const gchar *description,
- const gchar *location, time_t occur_start, time_t occur_end);
-
-
-
-AlarmNotify *an = NULL;
-gboolean have_one = FALSE;
-
-
-
-static void
an_update_minutes_label (GtkSpinButton *sb, gpointer data)
{
AlarmNotify *an;
@@ -122,31 +86,20 @@ dialog_response_cb (GtkDialog *dialog, guint response_id, gpointer user_data)
{
int snooze_timeout;
AlarmNotify *an = user_data;
- GtkTreeIter iter;
- GtkTreeModel *model = NULL;
- AlarmFuncInfo *funcinfo = NULL;
- GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (an->treeview));
-
- if (gtk_tree_selection_get_selected (selection, &model, &iter))
- gtk_tree_model_get (model, &iter, ALARM_FUNCINFO_COLUMN, &funcinfo, -1);
-
- g_return_if_fail (funcinfo);
switch (response_id) {
case AN_RESPONSE_EDIT:
- (* funcinfo->func) (ALARM_NOTIFY_EDIT, -1, funcinfo->func_data);
+ (* an->func) (ALARM_NOTIFY_EDIT, -1, an->func_data);
break;
case AN_RESPONSE_SNOOZE:
snooze_timeout = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (an->snooze_time));
- (* funcinfo->func) (ALARM_NOTIFY_SNOOZE, snooze_timeout, funcinfo->func_data);
+ (* an->func) (ALARM_NOTIFY_SNOOZE, snooze_timeout, an->func_data);
break;
case GTK_RESPONSE_CLOSE:
case GTK_RESPONSE_DELETE_EVENT:
- (* funcinfo->func) (ALARM_NOTIFY_CLOSE, -1, funcinfo->func_data);
+ (* an->func) (ALARM_NOTIFY_CLOSE, -1, an->func_data);
break;
}
-
- return;
}
static void
@@ -159,203 +112,124 @@ dialog_destroyed_cb (GtkWidget *dialog, gpointer user_data)
}
/**
- * notified_alarms_dialog_new:
+ * alarm_notify_dialog:
+ * @trigger: Trigger time for the alarm.
+ * @occur_start: Start of occurrence time for the event.
+ * @occur_end: End of occurrence time for the event.
+ * @vtype: Type of the component which corresponds to the alarm.
+ * @summary: Short summary of the appointment
+ * @description: Long description of the appointment
+ * @location: Location of the appointment
+ * @func: Function to be called when a dialog action is invoked.
+ * @func_data: Closure data for @func.
+ *
+ * Runs the alarm notification dialog. The specified @func will be used to
+ * notify the client about result of the actions in the dialog.
*
- * Return value: a new dialog in which you can add alarm notifications
+ * Return value: a pointer to the dialog widget created or NULL if there is an error.
**/
-AlarmNotificationsDialog *
-notified_alarms_dialog_new (void)
+GtkWidget *
+alarm_notify_dialog (time_t trigger, time_t occur_start, time_t occur_end,
+ ECalComponentVType vtype, const char *summary,
+ const char *description, const char *location,
+ AlarmNotifyFunc func, gpointer func_data)
{
+ AlarmNotify *an;
GtkWidget *image;
+ icaltimezone *current_zone;
+ char *title;
+ char *start, *end;
char *icon_path;
GList *icon_list;
- GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
- AlarmNotificationsDialog *na = NULL;
- AlarmNotify *an = g_new0 (AlarmNotify, 1);
- GtkTreeViewColumn *column = NULL;
- GtkTreeSelection *selection = NULL;
- GtkTreeModel *model = GTK_TREE_MODEL (gtk_list_store_new (
- N_ALARM_COLUMNS,
-
- G_TYPE_STRING, /* Display */
- G_TYPE_STRING, /* Summary */
- G_TYPE_STRING, /* Description */
- G_TYPE_STRING, /* Location */
-
- G_TYPE_POINTER, /* Start */
- G_TYPE_POINTER, /* End */
-
- G_TYPE_POINTER /* FuncInfo*/));
-
+
+ g_return_val_if_fail (trigger != -1, NULL);
+
+ /* Only VEVENTs or VTODOs can have alarms */
+ g_return_val_if_fail (vtype == E_CAL_COMPONENT_EVENT || vtype == E_CAL_COMPONENT_TODO, NULL);
+ g_return_val_if_fail (summary != NULL, NULL);
+ g_return_val_if_fail (description != NULL, NULL);
+ g_return_val_if_fail (location != NULL, NULL);
+ g_return_val_if_fail (func != NULL, NULL);
+
+ an = g_new0 (AlarmNotify, 1);
+
+ an->func = func;
+ an->func_data = func_data;
+
an->xml = glade_xml_new (EVOLUTION_GLADEDIR "/alarm-notify.glade", NULL, NULL);
if (!an->xml) {
g_message ("alarm_notify_dialog(): Could not load the Glade XML file!");
g_free (an);
return NULL;
}
-
+
an->dialog = glade_xml_get_widget (an->xml, "alarm-notify");
+ an->title = glade_xml_get_widget (an->xml, "title-label");
an->snooze_time = glade_xml_get_widget (an->xml, "snooze-time");
an->minutes_label = glade_xml_get_widget (an->xml, "minutes-label");
an->description = glade_xml_get_widget (an->xml, "description-label");
an->location = glade_xml_get_widget (an->xml, "location-label");
- an->treeview = glade_xml_get_widget (an->xml, "appointments-treeview");
- an->scrolledwindow = glade_xml_get_widget (an->xml, "treeview-scrolledwindow");
+ an->start = glade_xml_get_widget (an->xml, "start-label");
+ an->end = glade_xml_get_widget (an->xml, "end-label");
- if (!(an->dialog && an->scrolledwindow && an->treeview && an->snooze_time
- && an->description && an->location)) {
+ if (!(an->dialog && an->title && an->snooze_time
+ && an->description && an->location && an->start && an->end)) {
g_message ("alarm_notify_dialog(): Could not find all widgets in Glade file!");
g_object_unref (an->xml);
g_free (an);
return NULL;
}
- gtk_tree_view_set_model (GTK_TREE_VIEW(an->treeview), model);
-
- column = gtk_tree_view_column_new_with_attributes (_("Start time"),
- renderer, "text", ALARM_DISPLAY_COLUMN, NULL);
-
- gtk_tree_view_column_set_attributes (column, renderer,
- "markup", ALARM_DISPLAY_COLUMN, NULL);
-
- gtk_tree_view_append_column (GTK_TREE_VIEW (an->treeview), column);
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (an->treeview));
- gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
- g_signal_connect (G_OBJECT (selection), "changed",
- G_CALLBACK (tree_selection_changed_cb), an);
-
gtk_widget_realize (an->dialog);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (an->dialog)->vbox), 0);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (an->dialog)->action_area), 12);
- image = glade_xml_get_widget (an->xml, "alarm-image");
+
+ image = glade_xml_get_widget (an->xml, "alarm-image");
icon_path = e_icon_factory_get_icon_filename ("stock_alarm", E_ICON_SIZE_DIALOG);
gtk_image_set_from_file (GTK_IMAGE (image), icon_path);
g_free (icon_path);
-
- g_signal_connect (G_OBJECT (an->dialog), "response", G_CALLBACK (dialog_response_cb), an);
- g_signal_connect (G_OBJECT (an->dialog), "destroy", G_CALLBACK (dialog_destroyed_cb), an);
-
- if (!GTK_WIDGET_REALIZED (an->dialog))
- gtk_widget_realize (an->dialog);
- icon_list = e_icon_factory_get_icon_list ("stock_alarm");
- if (icon_list) {
- gtk_window_set_icon_list (GTK_WINDOW (an->dialog), icon_list);
- g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
- g_list_free (icon_list);
- }
-
- /* Set callback for updating the snooze "minutes" label */
- g_signal_connect (G_OBJECT (an->snooze_time), "value_changed",
- G_CALLBACK (an_update_minutes_label), an);
-
-
- na = g_new0 (AlarmNotificationsDialog, 1);
-
- na->treeview = an->treeview;
- na->dialog = an->dialog;
-
- return na;
-}
-
-
-/**
- * add_alarm_to_notified_alarms_dialog:
- * @na: Pointer to the dialog-info
- * @trigger: Trigger time for the alarm.
- * @occur_start: Start of occurrence time for the event.
- * @occur_end: End of occurrence time for the event.
- * @vtype: Type of the component which corresponds to the alarm.
- * @summary: Short summary of the appointment
- * @description: Long description of the appointment
- * @location: Location of the appointment
- * @func: Function to be called when a dialog action is invoked.
- * @func_data: Closure data for @func.
- *
- * The specified @func will be used to notify the client about result of
- * the actions in the dialog.
- *
- * Return value: the iter in the treeview of the dialog
- **/
-
-GtkTreeIter
-add_alarm_to_notified_alarms_dialog (AlarmNotificationsDialog *na, time_t trigger,
- time_t occur_start, time_t occur_end,
- ECalComponentVType vtype, const char *summary,
- const char *description, const char *location,
- AlarmNotifyFunc func, gpointer func_data)
-{
- GtkTreeIter iter;
- GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (na->treeview));
- AlarmFuncInfo *funcinfo = NULL;
- gchar *to_display = NULL, *start, *end;
- icaltimezone *current_zone;
-
- g_return_val_if_fail (trigger != -1, iter);
- /* Only VEVENTs or VTODOs can have alarms */
- g_return_val_if_fail (vtype == E_CAL_COMPONENT_EVENT || vtype == E_CAL_COMPONENT_TODO, iter);
- g_return_val_if_fail (summary != NULL, iter);
- g_return_val_if_fail (description != NULL, iter);
- g_return_val_if_fail (location != NULL, iter);
- g_return_val_if_fail (func != NULL, iter);
-
- funcinfo = g_new0 (AlarmFuncInfo, 1);
- funcinfo->func = func;
- funcinfo->func_data = func_data;
-
- gtk_list_store_append (GTK_LIST_STORE(model), &iter);
+ /* Title */
+
+ gtk_window_set_title (GTK_WINDOW (an->dialog), summary);
+
+ /* Set the widget contents */
+
+ title = g_strdup_printf ("<big><b>%s</b></big>", summary);
+ gtk_label_set_markup (GTK_LABEL (an->title), title);
+ g_free (title);
+
+ gtk_label_set_text (GTK_LABEL (an->description), description);
+ gtk_label_set_text (GTK_LABEL (an->location), location);
+
+ /* Stringize the times */
current_zone = config_data_get_timezone ();
+
start = timet_to_str_with_zone (occur_start, current_zone);
+ gtk_label_set_text (GTK_LABEL (an->start), start);
+
end = timet_to_str_with_zone (occur_end, current_zone);
- to_display = g_strdup_printf (_("<big><b>%s</b></big>\n%s until %s"),
- summary, start, end);
- g_free (start);
- g_free (end);
- gtk_list_store_set (GTK_LIST_STORE(model), &iter,
- ALARM_DISPLAY_COLUMN, to_display, -1);
- g_free (to_display);
-
- gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_SUMMARY_COLUMN, summary, -1);
- gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_DESCRIPTION_COLUMN, description, -1);
- gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_LOCATION_COLUMN, location, -1);
- gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_START_COLUMN, occur_start, -1);
- gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_END_COLUMN, occur_end, -1);
- gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_FUNCINFO_COLUMN, funcinfo, -1);
-
- return iter;
-}
+ gtk_label_set_text (GTK_LABEL (an->end), end);
-static void
-tree_selection_changed_cb (GtkTreeSelection *selection, gpointer user_data)
-{
- GtkTreeModel *model;
- GtkTreeIter iter;
-
- if (gtk_tree_selection_get_selected (selection, &model, &iter))
- {
- AlarmNotify *an = user_data;
- gchar *summary, *description, *location;
- time_t occur_start, occur_end;
-
- gtk_tree_model_get (model, &iter, ALARM_SUMMARY_COLUMN, &summary, -1);
- gtk_tree_model_get (model, &iter, ALARM_DESCRIPTION_COLUMN, &description, -1);
- gtk_tree_model_get (model, &iter, ALARM_LOCATION_COLUMN, &location, -1);
- gtk_tree_model_get (model, &iter, ALARM_START_COLUMN, &occur_start, -1);
- gtk_tree_model_get (model, &iter, ALARM_END_COLUMN, &occur_end, -1);\
- gtk_tree_model_get (model, &iter, ALARM_FUNCINFO_COLUMN, &an->cur_funcinfo, -1);
-
- fill_in_labels (an, summary, description, location, occur_start, occur_end);
- }
-}
+ /* Set callback for updating the snooze "minutes" label */
+ g_signal_connect (G_OBJECT (an->snooze_time), "value_changed",
+ G_CALLBACK (an_update_minutes_label), an);
+ /* Run! */
+
+ if (!GTK_WIDGET_REALIZED (an->dialog))
+ gtk_widget_realize (an->dialog);
+ icon_list = e_icon_factory_get_icon_list ("stock_alarm");
+ if (icon_list) {
+ gtk_window_set_icon_list (GTK_WINDOW (an->dialog), icon_list);
+ g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
+ g_list_free (icon_list);
+ }
+ g_signal_connect (G_OBJECT (an->dialog), "response", G_CALLBACK (dialog_response_cb), an);
+ g_signal_connect (G_OBJECT (an->dialog), "destroy", G_CALLBACK (dialog_destroyed_cb), an);
+ gtk_widget_show (an->dialog);
-static void
-fill_in_labels (AlarmNotify *an, const gchar *summary, const gchar *description,
- const gchar *location, time_t occur_start, time_t occur_end)
-{
- gtk_label_set_text (GTK_LABEL (an->description), description);
- gtk_label_set_text (GTK_LABEL (an->location), location);
+ return an->dialog;
}
diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.h b/calendar/gui/alarm-notify/alarm-notify-dialog.h
index 7c6b65870f..cf01f76af9 100644
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.h
+++ b/calendar/gui/alarm-notify/alarm-notify-dialog.h
@@ -25,9 +25,6 @@
#include <glib.h>
#include <libecal/e-cal-component.h>
#include <gtk/gtkwidget.h>
-#include <gtk/gtktreemodel.h>
-#include <gtk/gtktreeselection.h>
-#include <gtk/gtkliststore.h>
@@ -37,25 +34,12 @@ typedef enum {
ALARM_NOTIFY_EDIT
} AlarmNotifyResult;
-typedef struct _AlarmNotificationsDialog AlarmNotificationsDialog;
-struct _AlarmNotificationsDialog
-{
- GtkWidget *dialog;
- GtkWidget *treeview;
-};
-
typedef void (* AlarmNotifyFunc) (AlarmNotifyResult result, int snooze_mins, gpointer data);
-AlarmNotificationsDialog *
-notified_alarms_dialog_new (void);
-
-GtkTreeIter
-add_alarm_to_notified_alarms_dialog (AlarmNotificationsDialog *na, time_t trigger,
- time_t occur_start, time_t occur_end,
+GtkWidget *alarm_notify_dialog (time_t trigger, time_t occur_start, time_t occur_end,
ECalComponentVType vtype, const char *summary,
const char *description, const char *location,
AlarmNotifyFunc func, gpointer func_data);
-
#endif
diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c
index 51aac05cdd..60f9c3fded 100644
--- a/calendar/gui/alarm-notify/alarm-notify.c
+++ b/calendar/gui/alarm-notify/alarm-notify.c
@@ -285,7 +285,7 @@ AlarmNotify *
alarm_notify_new (void)
{
AlarmNotify *an;
-
+
an = g_object_new (TYPE_ALARM_NOTIFY,
"poa", bonobo_poa_get_threaded (ORBIT_THREAD_HINT_PER_REQUEST, NULL),
NULL);
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
index 0f42e0abb0..b0b83d5b8e 100644
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ b/calendar/gui/alarm-notify/alarm-queue.c
@@ -52,13 +52,9 @@
#include "config-data.h"
#include "util.h"
#include "e-util/e-popup.h"
-#include "e-util/e-error.h"
-/* The dialog with alarm nofications */
-static AlarmNotificationsDialog *alarm_notifications_dialog = NULL;
-
/* Whether the queueing system has been initialized */
static gboolean alarm_queue_inited;
@@ -127,8 +123,6 @@ typedef struct {
static gpointer midnight_refresh_id = NULL;
static time_t midnight = 0;
-static void
-remove_client_alarms (ClientAlarms *ca);
static void display_notification (time_t trigger, CompQueuedAlarms *cqa,
gpointer alarm_id, gboolean use_description);
static void audio_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id);
@@ -689,7 +683,7 @@ edit_component (ECal *client, ECalComponent *comp)
0, NULL, &ev);
if (BONOBO_EX (&ev)) {
- e_error_run (NULL, "editor-error", bonobo_exception_get_text (&ev));
+ g_message (G_STRLOC ": Could not activate the component editor factory");
CORBA_exception_free (&ev);
return;
}
@@ -706,7 +700,7 @@ edit_component (ECal *client, ECalComponent *comp)
GNOME_Evolution_Calendar_CompEditorFactory_editExisting (factory, uri, (char *) uid, corba_type, &ev);
if (BONOBO_EX (&ev))
- e_error_run (NULL, "editor-error", bonobo_exception_get_text (&ev));
+ g_message (G_STRLOC ": Exception while editing the component");
CORBA_exception_free (&ev);
@@ -728,7 +722,7 @@ typedef struct {
ECalView *query;
GtkWidget *tray_icon;
GtkWidget *image;
- GtkTreeIter iter;
+ GtkWidget *alarm_dialog;
} TrayIconData;
static void
@@ -761,7 +755,7 @@ static void
notify_dialog_cb (AlarmNotifyResult result, int snooze_mins, gpointer data)
{
TrayIconData *tray_data = data;
-
+
g_signal_handlers_disconnect_matched (tray_data->query, G_SIGNAL_MATCH_FUNC,
0, 0, NULL, on_dialog_objs_removed_cb, NULL);
@@ -769,86 +763,39 @@ notify_dialog_cb (AlarmNotifyResult result, int snooze_mins, gpointer data)
case ALARM_NOTIFY_SNOOZE:
create_snooze (tray_data->cqa, tray_data->alarm_id, snooze_mins);
tray_data->cqa = NULL;
-
- if (alarm_notifications_dialog) {
- GtkTreeSelection *selection =
- gtk_tree_view_get_selection (
- GTK_TREE_VIEW (alarm_notifications_dialog->treeview));
- GtkTreeIter iter;
- GtkTreeModel *model = NULL;
-
- /* We can also use tray_data->iter */
- if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
- gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
- if (!gtk_tree_model_get_iter_first (model, &iter)) {
- /* We removed the last one */
- gtk_widget_destroy (alarm_notifications_dialog->dialog);
- g_free (alarm_notifications_dialog);
- alarm_notifications_dialog = NULL;
- } else {
- /* Select the first */
- gtk_tree_selection_select_iter (selection, &iter);
- }
- }
-
- }
-
break;
case ALARM_NOTIFY_EDIT:
edit_component (tray_data->client, tray_data->comp);
-
- gtk_widget_destroy (alarm_notifications_dialog->dialog);
- g_free (alarm_notifications_dialog);
- alarm_notifications_dialog = NULL;
-
- gtk_widget_destroy (tray_data->tray_icon);
-
break;
case ALARM_NOTIFY_CLOSE:
-
-
- if (alarm_notifications_dialog) {
- GtkTreeIter iter;
- GtkTreeModel *model =
- gtk_tree_view_get_model (
- GTK_TREE_VIEW (alarm_notifications_dialog->treeview));
- gboolean valid = gtk_tree_model_get_iter_first (model, &iter);
-
- /* Maybe we should warn about this first? */
- while (valid) {
- gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
- valid = gtk_tree_model_iter_next (model, &iter);
- }
-
- gtk_widget_destroy (alarm_notifications_dialog->dialog);
- g_free (alarm_notifications_dialog);
- alarm_notifications_dialog = NULL;
- }
-
- gtk_widget_destroy (tray_data->tray_icon);
-
+ /* Do nothing */
break;
default:
g_assert_not_reached ();
}
- return;
+ gtk_widget_destroy (tray_data->tray_icon);
}
static gint
tray_icon_destroyed_cb (GtkWidget *tray, gpointer user_data)
{
TrayIconData *tray_data = user_data;
-
+
g_signal_handlers_disconnect_matched (tray_data->query, G_SIGNAL_MATCH_FUNC,
0, 0, NULL, on_dialog_objs_removed_cb, NULL);
if (tray_data->cqa != NULL)
remove_queued_alarm (tray_data->cqa, tray_data->alarm_id, TRUE, TRUE);
+ if (tray_data->alarm_dialog != NULL) {
+ gtk_widget_destroy (tray_data->alarm_dialog);
+ tray_data->alarm_dialog = NULL;
+ }
+
if (tray_data->summary != NULL) {
g_free (tray_data->summary);
tray_data->summary = NULL;
@@ -882,28 +829,11 @@ static gboolean
open_alarm_dialog (TrayIconData *tray_data)
{
QueuedAlarm *qa;
-
+
qa = lookup_queued_alarm (tray_data->cqa, tray_data->alarm_id);
if (qa) {
-
gtk_widget_hide (tray_data->tray_icon);
-
- if (!alarm_notifications_dialog)
- alarm_notifications_dialog = notified_alarms_dialog_new ();
-
- if (alarm_notifications_dialog) {
-
- GtkTreeSelection *selection = NULL;
- GtkTreeModel *model = NULL;
-
- selection = gtk_tree_view_get_selection (
- GTK_TREE_VIEW (alarm_notifications_dialog->treeview));
- model = gtk_tree_view_get_model (
- GTK_TREE_VIEW(alarm_notifications_dialog->treeview));
-
- tray_data->iter = add_alarm_to_notified_alarms_dialog (
- alarm_notifications_dialog,
- tray_data->trigger,
+ tray_data->alarm_dialog = alarm_notify_dialog (tray_data->trigger,
qa->instance->occur_start,
qa->instance->occur_end,
e_cal_component_get_vtype (tray_data->comp),
@@ -911,11 +841,6 @@ open_alarm_dialog (TrayIconData *tray_data)
tray_data->description,
tray_data->location,
notify_dialog_cb, tray_data);
-
- gtk_tree_selection_select_iter (selection, &tray_data->iter);
-
- }
-
}
return TRUE;
@@ -1111,7 +1036,7 @@ display_notification (time_t trigger, CompQueuedAlarms *cqa,
if (!config_data_get_notify_with_tray ()) {
tray_data->blink_id = -1;
open_alarm_dialog (tray_data);
- gtk_window_stick (GTK_WINDOW (alarm_notifications_dialog->dialog));
+ gtk_window_stick (GTK_WINDOW (tray_data->alarm_dialog));
} else {
tray_data->blink_id = g_timeout_add (500, tray_icon_blink_cb, tray_data);
gtk_widget_show (tray_icon);
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index c37e87e82a..55c4200115 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -52,7 +52,7 @@
#include "dialogs/copy-source-dialog.h"
#include "dialogs/event-editor.h"
#include "widgets/misc/e-info-label.h"
-#include "e-util/e-error.h"
+#include "widgets/misc/e-error.h"
#include "e-util/e-icon-factory.h"
#include "e-cal-menu.h"
#include "e-cal-popup.h"
@@ -564,8 +564,19 @@ popup_event_cb(ESourceSelector *selector, ESource *insource, GdkEventButton *eve
t = e_cal_popup_target_new_source(ep, selector);
t->target.widget = (GtkWidget *)component_view->calendar;
- for (i=0;i<sizeof(ecc_source_popups)/sizeof(ecc_source_popups[0]);i++)
- menus = g_slist_prepend(menus, &ecc_source_popups[i]);
+ if (!insource) {
+
+ ESourceGroup *group;
+
+ group = e_source_selector_get_primary_source_group (selector);
+ g_object_ref (group);
+ ecc_source_popups [0].user_data = group;
+ menus = g_slist_prepend (menus, &ecc_source_popups [0]);
+ }
+ else {
+ for (i=1;i<sizeof(ecc_source_popups)/sizeof(ecc_source_popups[0]);i++)
+ menus = g_slist_prepend(menus, &ecc_source_popups[i]);
+ }
e_popup_add_items((EPopup *)ep, menus, NULL, ecc_source_popup_free, component_view);
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index cba7968268..8286b444e8 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -60,7 +60,7 @@
#include "cal-attachment-bar.h"
#include "widgets/misc/e-expander.h"
-#include "e-util/e-error.h"
+#include "widgets/misc/e-error.h"
#define d(x) x
@@ -255,23 +255,17 @@ drop_action(CompEditor *editor, GdkDragContext *context, guint32 action, GtkSele
g_free (str);
} else {
url = camel_url_new (str, NULL);
+ g_free (str);
- if (url == NULL) {
- g_free (str);
+ if (url == NULL)
continue;
- }
if (!g_ascii_strcasecmp (url->protocol, "file"))
cal_attachment_bar_attach
(CAL_ATTACHMENT_BAR (editor->priv->attachment_bar),
url->path);
- else
- cal_attachment_bar_attach_remote_file
- (CAL_ATTACHMENT_BAR (editor->priv->attachment_bar),
- str);
camel_url_free (url);
- g_free (str);
}
}
@@ -656,12 +650,6 @@ save_comp (CompEditor *editor)
if (!cal_comp_is_on_server (priv->comp, priv->client)) {
result = e_cal_create_object (priv->client, icalcomp, NULL, &error);
} else {
- if (priv->mod == CALOBJ_MOD_THIS) {
- e_cal_component_set_rdate_list (priv->comp, NULL);
- e_cal_component_set_rrule_list (priv->comp, NULL);
- e_cal_component_set_exdate_list (priv->comp, NULL);
- e_cal_component_set_exrule_list (priv->comp, NULL);
- }
result = e_cal_modify_object (priv->client, icalcomp, priv->mod, &error);
}
@@ -791,24 +779,6 @@ response_cb (GtkWidget *widget, int response, gpointer data)
switch (response) {
case GTK_RESPONSE_OK:
- /* Check whether the downloads are completed */
- if (cal_attachment_bar_get_download_count (CAL_ATTACHMENT_BAR (editor->priv->attachment_bar)) ){
- ECalComponentVType vtype = e_cal_component_get_vtype(editor->priv->comp);
- gboolean response;
-
- if (vtype == E_CAL_COMPONENT_EVENT)
- response = em_utils_prompt_user((GtkWindow *)widget,
- NULL,
- "calendar:ask-send-event-pending-download",
- NULL);
- else
- response = em_utils_prompt_user((GtkWindow *)widget,
- NULL,
- "calendar:ask-send-task-pending-download",
- NULL);
- if (!response)
- return;
- }
commit_all_fields (editor);
if (e_cal_component_is_instance (priv->comp))
@@ -870,7 +840,7 @@ attachment_bar_changed_cb (CalAttachmentBar *bar,
CAL_ATTACHMENT_BAR (editor->priv->attachment_bar));
if (attachment_num) {
gchar *num_text = g_strdup_printf (
- ngettext ("<b>%d</b> Attachment", "<b>%d</b> Attachments", attachment_num),
+ ngettext ("<b>%d</b> File Attached", "<b>%d</b> Files Attached", attachment_num),
attachment_num);
gtk_label_set_markup (GTK_LABEL (editor->priv->attachment_expander_num),
num_text);
@@ -917,6 +887,23 @@ attachment_bar_icon_clicked_cb (CalAttachmentBar *bar, GdkEvent *event, void *da
return FALSE;
}
+static void
+attachment_expander_activate_cb (EExpander *expander,
+ void *data)
+{
+ CompEditor *editor = COMP_EDITOR (data);
+ gboolean show = e_expander_get_expanded (expander);
+
+ /* Update the expander label */
+ if (show)
+ gtk_label_set_text_with_mnemonic (GTK_LABEL (editor->priv->attachment_expander_label),
+ _("Hide _Attachment Bar (drop attachments here)"));
+ else
+ gtk_label_set_text_with_mnemonic (GTK_LABEL (editor->priv->attachment_expander_label),
+ _("Show _Attachment Bar (drop attachments here)"));
+
+}
+
/* Creates the basic in the editor */
static void
setup_widgets (CompEditor *editor)
@@ -965,7 +952,7 @@ setup_widgets (CompEditor *editor)
g_signal_connect (GNOME_ICON_LIST (priv->attachment_bar), "event",
G_CALLBACK (attachment_bar_icon_clicked_cb), NULL);
priv->attachment_expander_label =
- gtk_label_new_with_mnemonic (_("_Attachment Bar (drop attachments here)"));
+ gtk_label_new_with_mnemonic (_("Show _Attachment Bar (drop attachments here)"));
priv->attachment_expander_num = gtk_label_new ("");
gtk_label_set_use_markup (GTK_LABEL (priv->attachment_expander_num), TRUE);
gtk_misc_set_alignment (GTK_MISC (priv->attachment_expander_label), 0.0, 0.5);
@@ -983,33 +970,26 @@ setup_widgets (CompEditor *editor)
gtk_box_pack_start (GTK_BOX (expander_hbox), priv->attachment_expander_icon,
TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (expander_hbox), priv->attachment_expander_num,
- FALSE, TRUE, 0);
+ TRUE, TRUE, 0);
gtk_widget_show_all (expander_hbox);
gtk_widget_hide (priv->attachment_expander_icon);
- gtk_box_pack_start (GTK_BOX (vbox), expander_hbox,
- FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), priv->attachment_scrolled_window, FALSE, FALSE, GNOME_PAD_SMALL);
-
- gtk_widget_show (priv->attachment_scrolled_window);
- gtk_widget_show (expander_hbox);
-
+ priv->attachment_expander = e_expander_new ("");
+ e_expander_set_label_widget (E_EXPANDER (priv->attachment_expander), expander_hbox);
+ atk_object_set_name (gtk_widget_get_accessible (priv->attachment_expander), _("Attachment Button: Press space key to toggle attachment bar"));
-}
-
-void
-comp_editor_sensitize_attachment_bar (CompEditor *editor, gboolean set)
-{
- CompEditorPrivate *priv;
-
- g_return_if_fail (IS_COMP_EDITOR (editor));
+ gtk_container_add (GTK_CONTAINER (priv->attachment_expander),
+ priv->attachment_scrolled_window);
+ gtk_box_pack_start (GTK_BOX (vbox), priv->attachment_expander,
+ FALSE, FALSE, GNOME_PAD_SMALL);
+ gtk_widget_show (priv->attachment_expander);
+ e_expander_set_expanded (E_EXPANDER (priv->attachment_expander), FALSE);
+ g_signal_connect_after (priv->attachment_expander, "activate",
+ G_CALLBACK (attachment_expander_activate_cb), editor);
- priv = editor->priv;
- gtk_widget_set_sensitive (GTK_WIDGET (priv->attachment_bar), set);
- gtk_widget_set_sensitive (GTK_WIDGET (priv->attachment_scrolled_window), set);
}
-
+
/* Object initialization function for the calendar component editor */
static void
comp_editor_init (CompEditor *editor)
@@ -1697,6 +1677,7 @@ fill_widgets (CompEditor *editor)
e_cal_component_get_attachment_list (priv->comp, &attachment_list);
cal_attachment_bar_set_attachment_list
((CalAttachmentBar *)priv->attachment_bar, attachment_list);
+ e_expander_set_expanded (E_EXPANDER (priv->attachment_expander), TRUE);
}
for (l = priv->pages; l != NULL; l = l->next)
@@ -1788,7 +1769,6 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method)
if (!e_cal_component_has_attachments (priv->comp)) {
if (itip_send_comp (method, priv->comp, priv->client,
NULL, NULL)) {
-#if 0
tmp_comp = priv->comp;
g_object_ref (tmp_comp);
comp_editor_edit_comp (editor, tmp_comp);
@@ -1796,7 +1776,6 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method)
comp_editor_set_changed (editor, TRUE);
save_comp (editor);
-#endif
return TRUE;
}
@@ -1835,7 +1814,7 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method)
comp_editor_set_changed (editor, TRUE);
- return FALSE;
+ return FALSE;
}
@@ -2035,7 +2014,7 @@ comp_editor_notify_client_changed (CompEditor *editor, ECal *client)
if (!e_cal_is_read_only (client, &read_only, NULL))
read_only = TRUE;
- comp_editor_sensitize_attachment_bar (editor, !read_only);
+
gtk_dialog_set_response_sensitive (GTK_DIALOG (editor), GTK_RESPONSE_OK, !read_only);
}
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index ae466e6d2f..51b11170cd 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -32,6 +32,7 @@
#include <gtk/gtkmessagedialog.h>
#include <libgnome/gnome-i18n.h>
#include <glade/glade.h>
+#include <gal/widgets/e-categories.h>
#include <libedataserverui/e-source-option-menu.h>
#include "common/authentication.h"
#include "e-util/e-categories-config.h"
diff --git a/calendar/gui/dialogs/recur-comp.c b/calendar/gui/dialogs/recur-comp.c
index cfffa29c69..734516e904 100644
--- a/calendar/gui/dialogs/recur-comp.c
+++ b/calendar/gui/dialogs/recur-comp.c
@@ -36,6 +36,7 @@ recur_component_dialog (ECal *client,
CalObjModType *mod,
GtkWindow *parent)
{
+#if 0
char *str;
GtkWidget *dialog, *rb_this, *rb_prior, *rb_future, *rb_all, *hbox;
GtkWidget *placeholder, *vbox;
@@ -133,4 +134,16 @@ recur_component_dialog (ECal *client,
gtk_widget_destroy (dialog);
return ret;
+#endif
+
+ icalproperty *prop;
+
+ prop = icalcomponent_get_first_property (e_cal_component_get_icalcomponent (comp),
+ ICAL_RECURRENCEID_PROPERTY);
+ if (prop)
+ icalcomponent_remove_property (e_cal_component_get_icalcomponent (comp), prop);
+
+ *mod = CALOBJ_MOD_ALL;
+
+ return TRUE;
}
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index 17845dfaf6..04aca3ebba 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -34,6 +34,7 @@
#include <gtk/gtkmessagedialog.h>
#include <libgnome/gnome-i18n.h>
#include <glade/glade.h>
+#include <gal/widgets/e-categories.h>
#include <libedataserverui/e-source-option-menu.h>
#include <widgets/misc/e-dateedit.h>
#include "common/authentication.h"
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index ff8872d129..ca0f16a4ba 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -1301,7 +1301,12 @@ set_instance_times (ECalModelComponent *comp_data, icaltimezone *zone)
start_time = icalcomponent_get_dtstart (comp_data->icalcomp);
end_time = icalcomponent_get_dtend (comp_data->icalcomp);
- comp_data->instance_start = icaltime_as_timet (start_time);
+ if (e_cal_util_component_is_instance (comp_data->icalcomp)) {
+ itt = icaltime_convert_to_zone (recur_time, icaltimezone_get_utc_timezone ());
+ comp_data->instance_start = icaltime_as_timet (itt);
+ } else {
+ comp_data->instance_start = icaltime_as_timet (start_time);
+ }
comp_data->instance_end = comp_data->instance_start +
(icaltime_as_timet (end_time) - icaltime_as_timet (start_time));
@@ -1327,9 +1332,9 @@ e_cal_view_objects_added_cb (ECalView *query, GList *objects, gpointer user_data
pos = get_position_in_array (priv->objects, comp_data);
e_table_model_row_deleted (E_TABLE_MODEL (model), pos);
- g_ptr_array_remove (priv->objects, comp_data);
- e_cal_model_free_component_data (comp_data);
- }
+ g_ptr_array_remove (priv->objects, comp_data);
+ e_cal_model_free_component_data (comp_data);
+ }
if ((priv->flags & E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES)) {
RecurrenceExpansionData rdata;
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index f879d3d63a..b5fba03676 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -670,21 +670,7 @@ e_calendar_view_cut_clipboard (ECalendarView *cal_view)
event->comp_data->client, NULL, NULL);
e_cal_component_get_uid (comp, &uid);
- if (e_cal_component_is_instance (comp)) {
- const char *rid;
- icalcomponent *icalcomp;
-
- /* when cutting detached instances, only cut that instance */
- rid = e_cal_component_get_recurid_as_string (comp);
- if (e_cal_get_object (event->comp_data->client, uid, rid, &icalcomp, NULL)) {
- e_cal_remove_object_with_mod (event->comp_data->client, uid,
- rid, CALOBJ_MOD_THIS,
- &error);
- icalcomponent_free (icalcomp);
- } else
- e_cal_remove_object (event->comp_data->client, uid, &error);
- } else
- e_cal_remove_object (event->comp_data->client, uid, &error);
+ e_cal_remove_object (event->comp_data->client, uid, &error);
delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
g_clear_error (&error);
@@ -725,15 +711,6 @@ e_calendar_view_copy_clipboard (ECalendarView *cal_view)
event = (ECalendarViewEvent *) l->data;
new_icalcomp = icalcomponent_new_clone (event->comp_data->icalcomp);
-
- /* remove RECURRENCE-IDs from copied objects */
- if (e_cal_util_component_is_instance (new_icalcomp)) {
- icalproperty *prop;
-
- prop = icalcomponent_get_first_property (new_icalcomp, ICAL_RECURRENCEID_PROPERTY);
- if (prop)
- icalcomponent_remove_property (new_icalcomp, prop);
- }
icalcomponent_add_component (vcal_comp, new_icalcomp);
}
@@ -856,7 +833,6 @@ delete_event (ECalendarView *cal_view, ECalendarViewEvent *event)
}
e_cal_remove_object (event->comp_data->client, uid, &error);
-
delete_error_dialog (error, E_CAL_COMPONENT_EVENT);
g_clear_error (&error);
}
@@ -908,9 +884,6 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
const char *uid, *rid = NULL;
GError *error = NULL;
ECalComponent *comp;
- struct icaltimetype itt;
- ECalComponentDateTime dt;
- icaltimezone *zone;
selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
@@ -921,17 +894,27 @@ e_calendar_view_delete_selected_occurrence (ECalendarView *cal_view)
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
e_cal_component_get_uid (comp, &uid);
+ if (e_cal_component_is_instance (comp))
+ rid = e_cal_component_get_recurid_as_string (comp);
+ else {
+ ECalComponentDateTime dt;
+ icaltimezone *zone;
- e_cal_component_get_dtstart (comp, &dt);
- e_cal_get_timezone (event->comp_data->client, dt.tzid, &zone, NULL);
+ if (!e_cal_component_has_recurrences (comp)) {
+ g_object_unref (comp);
+ return;
+ }
- if (zone)
- itt = icaltime_from_timet_with_zone (event->comp_data->instance_start, TRUE, zone);
- else
- itt = icaltime_from_timet (event->comp_data->instance_start, TRUE);
- rid = icaltime_as_ical_string (itt);
+ /* get the RECUR-ID from the instance start date */
+ e_cal_component_get_dtstart (comp, &dt);
+ if (e_cal_get_timezone (event->comp_data->client, dt.tzid, &zone, NULL)) {
+ rid = icaltime_as_ical_string (
+ icaltime_from_timet_with_zone (event->comp_data->instance_start, TRUE, zone));
+ } else
+ rid = icaltime_as_ical_string (icaltime_from_timet (event->comp_data->instance_start, TRUE));
- e_cal_component_free_datetime (&dt);
+ e_cal_component_free_datetime (&dt);
+ }
if (rid) {
if (delete_component_dialog (comp, FALSE, 1, e_cal_component_get_vtype (comp), GTK_WIDGET (cal_view))) {
@@ -1291,7 +1274,6 @@ on_unrecur_appointment (EPopup *ep, EPopupItem *pitem, void *data)
GList *selected;
ECal *client;
char *new_uid;
- icalproperty *prop;
selected = e_calendar_view_get_selected_events (cal_view);
if (!selected)
@@ -1317,9 +1299,6 @@ on_unrecur_appointment (EPopup *ep, EPopupItem *pitem, void *data)
the start & end times to the instances times. */
new_comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (new_comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- if ((prop = icalcomponent_get_first_property (e_cal_component_get_icalcomponent (new_comp),
- ICAL_RECURRENCEID_PROPERTY)))
- icalcomponent_remove_property (e_cal_component_get_icalcomponent (new_comp), prop);
new_uid = e_cal_component_gen_uid ();
e_cal_component_set_uid (new_comp, new_uid);
g_free (new_uid);
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 1bee23f573..c5af654028 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -716,10 +716,6 @@ e_day_view_init (EDayView *day_view)
day_view->week_start_day = 0;
day_view->scroll_to_work_day = TRUE;
- day_view->show_marcus_bains_line = TRUE;
- day_view->marcus_bains_day_view_color = NULL;
- day_view->marcus_bains_time_bar_color = NULL;
-
day_view->editing_event_day = -1;
day_view->editing_event_num = -1;
@@ -1165,7 +1161,6 @@ e_day_view_set_colors(EDayView *day_view, GtkWidget *widget)
day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER] = widget->style->dark[GTK_STATE_NORMAL];
day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND] = widget->style->bg[GTK_STATE_ACTIVE];
day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BORDER] = widget->style->dark[GTK_STATE_NORMAL];
- day_view->colors[E_DAY_VIEW_COLOR_MARCUS_BAINS_LINE] = widget->style->dark[GTK_STATE_PRELIGHT];
}
static void
@@ -2473,59 +2468,6 @@ e_day_view_set_working_day (EDayView *day_view,
gtk_widget_queue_draw (day_view->main_canvas);
}
-
-/* Whether we display the Marcus Bains Line in the main canvas and time canvas. */
-gboolean
-e_day_view_get_show_marcus_bains (EDayView *day_view)
-{
- g_return_val_if_fail (E_IS_DAY_VIEW (day_view), TRUE);
- return day_view->show_marcus_bains_line;
-}
-
-/* Force a redraw of the Marcus Bains Lines */
-void
-e_day_view_update_marcus_bains (EDayView *day_view)
-{
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
- gtk_widget_queue_draw (day_view->main_canvas);
- gtk_widget_queue_draw (day_view->time_canvas);
-}
-
-
-/* Update the variables controlling the Marcus Bains Line (display toggle, and colors). */
-void
-e_day_view_set_marcus_bains (EDayView *day_view,
- gboolean show_line,
- const char *dayview_color,
- const char *timebar_color)
-{
- g_return_if_fail (E_IS_DAY_VIEW (day_view));
-
- if ((day_view->show_marcus_bains_line != show_line) |
- (day_view->marcus_bains_day_view_color != dayview_color) |
- (day_view->marcus_bains_time_bar_color != timebar_color)) {
-
- if (day_view->marcus_bains_day_view_color)
- g_free (day_view->marcus_bains_day_view_color);
- if (day_view->marcus_bains_time_bar_color)
- g_free (day_view->marcus_bains_time_bar_color);
-
- day_view->show_marcus_bains_line = show_line;
- if (dayview_color)
- day_view->marcus_bains_day_view_color = g_strdup (dayview_color);
- else
- day_view->marcus_bains_day_view_color = NULL;
-
- if (timebar_color)
- day_view->marcus_bains_time_bar_color = g_strdup (timebar_color);
- else
- day_view->marcus_bains_time_bar_color = NULL;
-
- e_day_view_update_marcus_bains (day_view);
- }
-}
-
-
/* Whether we display event end times in the main canvas. */
gboolean
e_day_view_get_show_event_end_times (EDayView *day_view)
@@ -3544,7 +3486,7 @@ e_day_view_on_top_canvas_motion (GtkWidget *widget,
cursor = day_view->normal_cursor;
/* Recurring events can't be resized. */
- if (event && !e_cal_util_component_has_recurrences (event->comp_data->icalcomp)) {
+ if (event && !e_cal_util_component_has_recurrences (event->comp_data->icalcomp)) {
switch (pos) {
case E_CALENDAR_VIEW_POS_LEFT_EDGE:
case E_CALENDAR_VIEW_POS_RIGHT_EDGE:
@@ -3912,37 +3854,16 @@ e_day_view_finish_long_event_resize (EDayView *day_view)
e_cal_component_set_dtend (comp, &date);
}
- e_cal_component_commit_sequence (comp);
if (e_cal_component_is_instance (comp)) {
if (!recur_component_dialog (client, comp, &mod, NULL)) {
gtk_widget_queue_draw (day_view->top_canvas);
goto out;
}
-
- if (mod == CALOBJ_MOD_THIS) {
- /* set the correct DTSTART/DTEND on the individual recurrence */
- if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_TOP_EDGE) {
- *date.value = icaltime_from_timet_with_zone (
- event->comp_data->instance_end, FALSE,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- e_cal_component_set_dtend (comp, &date);
- } else {
- *date.value = icaltime_from_timet_with_zone (
- event->comp_data->instance_start, FALSE,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- e_cal_component_set_dtstart (comp, &date);
- }
-
- e_cal_component_set_rdate_list (comp, NULL);
- e_cal_component_set_rrule_list (comp, NULL);
- e_cal_component_set_exdate_list (comp, NULL);
- e_cal_component_set_exrule_list (comp, NULL);
-
- e_cal_component_commit_sequence (comp);
- }
}
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
+
+ e_cal_component_commit_sequence (comp);
e_calendar_view_modify_and_send (comp, client, mod, toplevel, TRUE);
out:
@@ -4024,26 +3945,6 @@ e_day_view_finish_resize (EDayView *day_view)
gtk_widget_queue_draw (day_view->top_canvas);
goto out;
}
-
- if (mod == CALOBJ_MOD_THIS) {
- /* set the correct DTSTART/DTEND on the individual recurrence */
- if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_TOP_EDGE) {
- *date.value = icaltime_from_timet_with_zone (
- event->comp_data->instance_end, FALSE,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- e_cal_component_set_dtend (comp, &date);
- } else {
- *date.value = icaltime_from_timet_with_zone (
- event->comp_data->instance_start, FALSE,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- e_cal_component_set_dtstart (comp, &date);
- }
-
- e_cal_component_set_rdate_list (comp, NULL);
- e_cal_component_set_rrule_list (comp, NULL);
- e_cal_component_set_exdate_list (comp, NULL);
- e_cal_component_set_exrule_list (comp, NULL);
- }
}
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
@@ -4380,7 +4281,7 @@ e_day_view_reshape_long_event (EDayView *day_view,
if (e_cal_component_has_alarms (comp))
num_icons++;
- if (e_cal_component_has_recurrences (comp) || e_cal_component_is_instance (comp))
+ if (e_cal_component_has_recurrences (comp))
num_icons++;
if (event->different_timezone)
num_icons++;
@@ -4550,7 +4451,7 @@ e_day_view_reshape_day_event (EDayView *day_view,
if (e_cal_component_has_alarms (comp))
num_icons++;
- if (e_cal_component_has_recurrences (comp) || e_cal_component_is_instance (comp))
+ if (e_cal_component_has_recurrences (comp))
num_icons++;
if (e_cal_component_has_attachments (comp))
num_icons++;
@@ -5919,13 +5820,6 @@ e_day_view_change_event_time (EDayView *day_view, time_t start_dt, time_t end_dt
gtk_widget_queue_draw (day_view->top_canvas);
goto out;
}
-
- if (mod == CALOBJ_MOD_THIS) {
- e_cal_component_set_rdate_list (comp, NULL);
- e_cal_component_set_rrule_list (comp, NULL);
- e_cal_component_set_exdate_list (comp, NULL);
- e_cal_component_set_exrule_list (comp, NULL);
- }
}
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
@@ -6141,45 +6035,6 @@ e_day_view_on_editing_stopped (EDayView *day_view,
if (!recur_component_dialog (client, comp, &mod, NULL)) {
goto out;
}
-
- if (mod == CALOBJ_MOD_THIS) {
- ECalComponentDateTime dt;
-
- e_cal_component_get_dtstart (comp, &dt);
- if (dt.value->zone) {
- *dt.value = icaltime_from_timet_with_zone (
- event->comp_data->instance_start,
- dt.value->is_date,
- dt.value->zone);
- } else {
- *dt.value = icaltime_from_timet_with_zone (
- event->comp_data->instance_start,
- dt.value->is_date,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- }
- e_cal_component_set_dtstart (comp, &dt);
-
- e_cal_component_get_dtend (comp, &dt);
- if (dt.value->zone) {
- *dt.value = icaltime_from_timet_with_zone (
- event->comp_data->instance_end,
- dt.value->is_date,
- dt.value->zone);
- } else {
- *dt.value = icaltime_from_timet_with_zone (
- event->comp_data->instance_end,
- dt.value->is_date,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
- }
- e_cal_component_set_dtend (comp, &dt);
-
- e_cal_component_set_rdate_list (comp, NULL);
- e_cal_component_set_rrule_list (comp, NULL);
- e_cal_component_set_exdate_list (comp, NULL);
- e_cal_component_set_exrule_list (comp, NULL);
-
- e_cal_component_commit_sequence (comp);
- }
}
/* FIXME When sending here, what exactly should we send? */
@@ -7142,7 +6997,9 @@ e_day_view_on_drag_data_get (GtkWidget *widget,
vcal = e_cal_util_new_top_level ();
e_cal_util_add_timezones_from_component (vcal, event->comp_data->icalcomp);
- icalcomponent_add_component (vcal, icalcomponent_new_clone (event->comp_data->icalcomp));
+ icalcomponent_add_component (
+ vcal,
+ icalcomponent_new_clone (event->comp_data->icalcomp));
comp_str = icalcomponent_as_ical_string (vcal);
if (comp_str) {
@@ -7279,20 +7136,14 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
if (event->canvas_item)
gnome_canvas_item_show (event->canvas_item);
- e_cal_component_commit_sequence (comp);
if (e_cal_component_is_instance (comp)) {
if (!recur_component_dialog (client, comp, &mod, NULL))
return;
-
- if (mod == CALOBJ_MOD_THIS) {
- e_cal_component_set_rdate_list (comp, NULL);
- e_cal_component_set_rrule_list (comp, NULL);
- e_cal_component_set_exdate_list (comp, NULL);
- e_cal_component_set_exrule_list (comp, NULL);
- }
}
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
+ e_cal_component_commit_sequence (comp);
+
e_calendar_view_modify_and_send (comp, client, mod, toplevel, FALSE);
g_object_unref (comp);
@@ -7474,22 +7325,16 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
if (event->canvas_item)
gnome_canvas_item_show (event->canvas_item);
- e_cal_component_commit_sequence (comp);
if (e_cal_component_is_instance (comp)) {
if (!recur_component_dialog (client, comp, &mod, NULL)) {
g_object_unref (comp);
return;
}
-
- if (mod == CALOBJ_MOD_THIS) {
- e_cal_component_set_rdate_list (comp, NULL);
- e_cal_component_set_rrule_list (comp, NULL);
- e_cal_component_set_exdate_list (comp, NULL);
- e_cal_component_set_exrule_list (comp, NULL);
- }
}
toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (day_view)));
+ e_cal_component_commit_sequence (comp);
+
e_calendar_view_modify_and_send (comp, client, mod, toplevel, FALSE);
g_object_unref (comp);
diff --git a/calendar/gui/e-meeting-list-view.c b/calendar/gui/e-meeting-list-view.c
index 088301fc92..ad67a262b7 100644
--- a/calendar/gui/e-meeting-list-view.c
+++ b/calendar/gui/e-meeting-list-view.c
@@ -233,7 +233,7 @@ attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, GList *address
char *name = names->data, *email = addresses->data;
int existing_row;
- if (!((name && *name) || (email && *email)) || ((e_meeting_store_find_attendee (model, email, &existing_row) != NULL) && existing_row != row)){
+ if (!((name && *name) || (email && *email)) || (e_meeting_store_find_attendee (model, email, &existing_row) != NULL) && existing_row != row) {
if (existing_attendee)
e_meeting_store_remove_attendee (model, existing_attendee);
} else {
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c
index 3845b62bba..1d1c405c0d 100644
--- a/calendar/gui/e-tasks.c
+++ b/calendar/gui/e-tasks.c
@@ -33,7 +33,7 @@
#include <gal/menus/gal-view-factory-etable.h>
#include <gal/menus/gal-view-etable.h>
-#include "e-util/e-error.h"
+#include "widgets/misc/e-error.h"
#include "e-util/e-categories-config.h"
#include "e-util/e-config-listener.h"
#include "e-util/e-time-utils.h"
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index 4bb3fe089a..13e2d14142 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -615,7 +615,7 @@ e_week_view_event_item_draw_icons (EWeekViewEventItem *wveitem,
num_icons++;
}
- if (e_cal_component_has_recurrences (comp) || e_cal_component_is_instance (comp)) {
+ if (e_cal_component_has_recurrences (comp)) {
draw_recurrence_icon = TRUE;
num_icons++;
}
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 0a038e4539..e96942e44f 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -51,7 +51,7 @@
#include <gal/menus/gal-view-etable.h>
#include <gal/menus/gal-define-views-dialog.h>
#include "widgets/menus/gal-view-menus.h"
-#include "e-util/e-error.h"
+#include "widgets/misc/e-error.h"
#include "e-comp-editor-registry.h"
#include "dialogs/delete-error.h"
#include "dialogs/event-editor.h"
@@ -138,7 +138,6 @@ struct _GnomeCalendarPrivate {
char *sexp;
char *todo_sexp;
guint update_timeout;
- guint update_marcus_bains_line_timeout;
/* This is the view currently shown. We use it to keep track of the
positions of the panes. range_selected is TRUE if a range of dates
@@ -176,6 +175,7 @@ struct _GnomeCalendarPrivate {
'dates-shown-changed' signal.*/
time_t visible_start;
time_t visible_end;
+
gboolean updating;
};
@@ -717,13 +717,13 @@ update_query (GnomeCalendar *gcal)
priv = gcal->priv;
- if (priv->updating == TRUE) {
+ if (priv->updating == TRUE)
return;
- }
+
+ priv->updating = TRUE;
e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), _("Updating query"));
e_calendar_item_clear_marks (priv->date_navigator->calitem);
- priv->updating = TRUE;
/* free the previous queries */
for (l = priv->dn_queries; l != NULL; l = l->next) {
old_query = l->data;
@@ -737,7 +737,7 @@ update_query (GnomeCalendar *gcal)
g_list_free (priv->dn_queries);
priv->dn_queries = NULL;
-
+
g_assert (priv->sexp != NULL);
real_sexp = adjust_e_cal_view_sexp (gcal, priv->sexp);
@@ -775,10 +775,11 @@ update_query (GnomeCalendar *gcal)
}
/* free memory */
- priv->updating = FALSE;
g_free (real_sexp);
+ priv->updating = FALSE;
e_calendar_view_set_status_message (E_CALENDAR_VIEW (priv->week_view), NULL);
update_todo_view (gcal);
+
}
static void
@@ -1088,21 +1089,6 @@ update_todo_view_cb (GnomeCalendar *gcal)
return TRUE;
}
-static gboolean
-update_marcus_bains_line_cb (GnomeCalendar *gcal)
-{
- GnomeCalendarPrivate *priv;
-
- priv = gcal->priv;
-
- if ((priv->current_view_type == GNOME_CAL_DAY_VIEW) ||
- (priv->current_view_type == GNOME_CAL_WORK_WEEK_VIEW)) {
- e_day_view_update_marcus_bains (E_DAY_VIEW (gnome_calendar_get_current_view_widget (gcal)));
- }
-
- return TRUE;
-}
-
static void
config_hide_completed_tasks_changed_cb (GConfClient *client, guint id, GConfEntry *entry, gpointer data)
{
@@ -1335,9 +1321,6 @@ setup_widgets (GnomeCalendar *gcal)
e_calendar_view_set_timezone (E_CALENDAR_VIEW (priv->work_week_view), priv->zone);
connect_day_view_focus (gcal, E_DAY_VIEW (priv->work_week_view));
- /* The Marcus Bains line */
- priv->update_marcus_bains_line_timeout = g_timeout_add_full (G_PRIORITY_LOW, 60000, (GSourceFunc) update_marcus_bains_line_cb, gcal, NULL);
-
/* The Week View. */
priv->week_view = e_week_view_new ();
e_calendar_view_set_calendar (E_CALENDAR_VIEW (priv->week_view), gcal);
@@ -1539,11 +1522,6 @@ gnome_calendar_destroy (GtkObject *object)
priv->view_instance = NULL;
}
- if (priv->update_marcus_bains_line_timeout) {
- g_source_remove (priv->update_marcus_bains_line_timeout);
- priv->update_marcus_bains_line_timeout = 0;
- }
-
if (priv->view_menus) {
g_object_unref (priv->view_menus);
priv->view_menus = NULL;
@@ -2223,8 +2201,10 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal)
}
switch (status) {
case E_CALENDAR_STATUS_OK:
+ g_message ("********* the state in ok is %d \n", state);
break;
case E_CALENDAR_STATUS_BUSY:
+ g_message ("********* the state is %d \n", state);
if (state == E_CAL_LOAD_NOT_LOADED)
e_cal_open_async (ecal, FALSE);
return;
@@ -2319,6 +2299,7 @@ default_client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar
case E_CALENDAR_STATUS_OK:
break;
case E_CALENDAR_STATUS_BUSY:
+ g_message ("********* the state is %d \n", state);
if (state == E_CAL_LOAD_NOT_LOADED)
e_cal_open_async (ecal, FALSE);
return;
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index fceb6c06ef..47f863f4d4 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -2317,7 +2317,7 @@ print_comp_item (GnomePrintContext *pc, ECalComponent *comp, ECal *client,
/* Summary */
font = get_font_for_size (18, GNOME_FONT_BOLD, FALSE);
e_cal_component_get_summary (comp, &text);
- summary_string = g_strdup_printf (_("Summary: %s"), text.value);
+ summary_string = g_strdup_printf (("%s %s"), _("Summary:"), text.value);
top = bound_text (pc, font, summary_string, left, right,
top - 3, bottom, 0);
g_free (summary_string);
@@ -2325,7 +2325,8 @@ print_comp_item (GnomePrintContext *pc, ECalComponent *comp, ECal *client,
/* Location */
e_cal_component_get_location (comp, &location);
if (location && location[0]) {
- location_string = g_strdup_printf (_("Location: %s"),
+ location_string = g_strdup_printf (("%s %s"),
+ _("Location:"),
location);
top = bound_text (pc, font, location_string, left, right,
top - 3, bottom, 0);
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c
index 3472c31f24..74ef16bd61 100644
--- a/calendar/gui/tasks-component.c
+++ b/calendar/gui/tasks-component.c
@@ -48,7 +48,7 @@
#include "dialogs/copy-source-dialog.h"
#include "dialogs/task-editor.h"
#include "widgets/misc/e-info-label.h"
-#include "e-util/e-error.h"
+#include "widgets/misc/e-error.h"
#include "e-util/e-icon-factory.h"
#define CREATE_TASK_ID "task"
@@ -641,8 +641,6 @@ selector_tree_drag_motion (GtkWidget *widget,
gtk_tree_view_set_drag_dest_row(GTK_TREE_VIEW (widget), path, GTK_TREE_VIEW_DROP_INTO_OR_BEFORE);
action = context->suggested_action;
- if (action == GDK_ACTION_COPY && (context->actions & GDK_ACTION_MOVE))
- action=GDK_ACTION_MOVE;
finish:
if (path)