aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c3
-rw-r--r--calendar/gui/alarm-notify/config-data.c14
-rw-r--r--calendar/gui/comp-util.c12
-rw-r--r--calendar/gui/dialogs/comp-editor.c30
-rw-r--r--calendar/gui/dialogs/copy-source-dialog.c17
-rw-r--r--calendar/gui/dialogs/event-editor.c19
-rw-r--r--calendar/gui/dialogs/goto-dialog.c15
-rw-r--r--calendar/gui/dialogs/task-editor.c3
-rw-r--r--calendar/gui/e-day-view-time-item.c12
-rw-r--r--calendar/gui/e-day-view-top-item.c23
-rw-r--r--calendar/gui/e-meeting-attendee.c8
-rw-r--r--calendar/gui/e-meeting-store.c16
-rw-r--r--calendar/gui/e-task-table.c30
-rw-r--r--calendar/gui/e-week-view-event-item.c34
-rw-r--r--calendar/gui/e-week-view-main-item.c14
-rw-r--r--calendar/gui/ea-cal-view-event.c6
-rw-r--r--calendar/gui/ea-calendar.c47
-rw-r--r--calendar/gui/ea-day-view-main-item.c3
-rw-r--r--calendar/gui/gnome-cal.c13
-rw-r--r--calendar/gui/gnome-cal.h6
-rw-r--r--calendar/gui/itip-utils.c26
-rw-r--r--calendar/gui/print.c23
22 files changed, 250 insertions, 124 deletions
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
index 42dc10c6e9..e8e5485e45 100644
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ b/calendar/gui/alarm-notify/alarm-queue.c
@@ -2120,7 +2120,8 @@ remove_client_alarms (ClientAlarms *ca)
{
debug (("size %d", g_hash_table_size (ca->uid_alarms_hash)));
- g_hash_table_foreach_remove (ca->uid_alarms_hash, (GHRFunc) remove_comp_by_id, ca);
+ g_hash_table_foreach_remove (
+ ca->uid_alarms_hash, (GHRFunc) remove_comp_by_id, ca);
/* The hash table should be empty now */
g_return_if_fail (g_hash_table_size (ca->uid_alarms_hash) == 0);
diff --git a/calendar/gui/alarm-notify/config-data.c b/calendar/gui/alarm-notify/config-data.c
index e1fe1f48ff..41207d48fb 100644
--- a/calendar/gui/alarm-notify/config-data.c
+++ b/calendar/gui/alarm-notify/config-data.c
@@ -309,9 +309,13 @@ config_data_get_last_notification_time (ECal *cal)
if (cal) {
ESource *source = e_cal_get_source (cal);
if (source) {
- const gchar *last_notified = e_source_get_property (source, "last-notified");
+ const gchar *last_notified;
+
GTimeVal tmval = {0};
+ last_notified = e_source_get_property (
+ source, "last-notified");
+
if (last_notified && *last_notified &&
g_time_val_from_iso8601 (last_notified, &tmval)) {
time_t now = time (NULL), val = (time_t) tmval.tv_sec;
@@ -326,9 +330,13 @@ config_data_get_last_notification_time (ECal *cal)
if (!(client = config_data_get_conf_client ()))
return -1;
- value = gconf_client_get_without_default (client, KEY_LAST_NOTIFICATION_TIME, NULL);
+ value = gconf_client_get_without_default (
+ client, KEY_LAST_NOTIFICATION_TIME, NULL);
if (value) {
- time_t val = (time_t) gconf_value_get_int (value), now = time (NULL);
+ time_t val, now;
+
+ val = (time_t) gconf_value_get_int (value);
+ now = time (NULL);
if (val > now)
val = now;
diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c
index 4c5f80adcd..fbf9e7dc82 100644
--- a/calendar/gui/comp-util.c
+++ b/calendar/gui/comp-util.c
@@ -444,11 +444,15 @@ cal_comp_update_time_by_active_window (ECalComponent *comp, EShell *shell)
g_return_if_fail (shell != NULL);
window = e_shell_get_active_window (shell);
- if (window && E_IS_SHELL_WINDOW (window)) {
- EShellWindow *shell_window = E_SHELL_WINDOW (window);
- if (e_shell_window_get_active_view (shell_window)
- && g_str_equal (e_shell_window_get_active_view (shell_window), "calendar")) {
+ if (E_IS_SHELL_WINDOW (window)) {
+ EShellWindow *shell_window;
+ const gchar *active_view;
+
+ shell_window = E_SHELL_WINDOW (window);
+ active_view = e_shell_window_get_active_view (shell_window);
+
+ if (g_strcmp0 (active_view, "calendar") == 0) {
EShellContent *shell_content;
EShellView *shell_view;
GnomeCalendar *gnome_cal;
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index c8640b608a..cc794ae3f5 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -477,9 +477,14 @@ save_comp (CompEditor *editor)
if (result)
g_signal_emit_by_name (editor, "object_created");
} else {
+ gboolean has_recurrences;
- if (e_cal_component_has_recurrences (priv->comp) && priv->mod == CALOBJ_MOD_ALL)
- comp_util_sanitize_recurrence_master (priv->comp, priv->client);
+ has_recurrences =
+ e_cal_component_has_recurrences (priv->comp);
+
+ if (has_recurrences && priv->mod == CALOBJ_MOD_ALL)
+ comp_util_sanitize_recurrence_master (
+ priv->comp, priv->client);
if (priv->mod == CALOBJ_MOD_THIS) {
e_cal_component_set_rdate_list (priv->comp, NULL);
@@ -904,7 +909,9 @@ action_save_cb (GtkAction *action,
e_cal_component_has_recurrences (priv->comp)) {
gchar *rid;
rid = e_cal_component_get_recurid_as_string (priv->comp);
- e_cal_remove_object_with_mod (priv->client, uid, rid, priv->mod, &error);
+ e_cal_remove_object_with_mod (
+ priv->client, uid, rid,
+ priv->mod, &error);
g_free (rid);
} else
e_cal_remove_object (priv->client, uid, &error);
@@ -3020,8 +3027,8 @@ set_attendees_for_delegation (ECalComponent *comp,
icalcomp = e_cal_component_get_icalcomponent (comp);
for (prop = icalcomponent_get_first_property (icalcomp, ICAL_ATTENDEE_PROPERTY);
- prop;
- prop = icalcomponent_get_next_property (icalcomp, ICAL_ATTENDEE_PROPERTY)) {
+ prop;
+ prop = icalcomponent_get_next_property (icalcomp, ICAL_ATTENDEE_PROPERTY)) {
const gchar *attendee = icalproperty_get_attendee (prop);
const gchar *delfrom = NULL;
@@ -3049,14 +3056,17 @@ get_users_from_memo_comp (ECalComponent *comp, GList **users)
icalcomp = e_cal_component_get_icalcomponent (comp);
for (icalprop = icalcomponent_get_first_property (icalcomp, ICAL_X_PROPERTY);
- icalprop != NULL;
- icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY)) {
- if (g_str_equal (icalproperty_get_x_name (icalprop), "X-EVOLUTION-RECIPIENTS")) {
+ icalprop != NULL;
+ icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY)) {
+ const gchar *x_name;
+
+ x_name = icalproperty_get_x_name (icalprop);
+
+ if (g_str_equal (x_name, "X-EVOLUTION-RECIPIENTS"))
break;
- }
}
- if (icalprop) {
+ if (icalprop) {
attendees = icalproperty_get_x (icalprop);
emails = g_strsplit (attendees, ";", -1);
diff --git a/calendar/gui/dialogs/copy-source-dialog.c b/calendar/gui/dialogs/copy-source-dialog.c
index f1c568849b..547a91069c 100644
--- a/calendar/gui/dialogs/copy-source-dialog.c
+++ b/calendar/gui/dialogs/copy-source-dialog.c
@@ -119,9 +119,13 @@ copy_source (CopySourceDialogData *csdd)
for (l = obj_list; l != NULL; l = l->next) {
/* FIXME: process recurrences */
/* FIXME: process errors */
- if (e_cal_get_object (dest_client, icalcomponent_get_uid (l->data), NULL,
- &icalcomp, NULL)) {
- e_cal_modify_object (dest_client, l->data, CALOBJ_MOD_ALL, NULL);
+ if (e_cal_get_object (
+ dest_client,
+ icalcomponent_get_uid (l->data),
+ NULL, &icalcomp, NULL)) {
+ e_cal_modify_object (
+ dest_client, l->data,
+ CALOBJ_MOD_ALL, NULL);
icalcomponent_free (icalcomp);
} else {
gchar *uid = NULL;
@@ -129,8 +133,11 @@ copy_source (CopySourceDialogData *csdd)
icalcomp = l->data;
- /* add timezone information from source ECal to the destination ECal */
- icalcomponent_foreach_tzid (icalcomp, add_timezone_to_cal_cb, &ftd);
+ /* Add timezone information from source
+ * ECal to the destination ECal. */
+ icalcomponent_foreach_tzid (
+ icalcomp,
+ add_timezone_to_cal_cb, &ftd);
if (e_cal_create_object (dest_client, icalcomp, &uid, &error)) {
g_free (uid);
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 41985bd8b7..64d3b67891 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -363,7 +363,8 @@ event_editor_constructor (GType type,
if (is_meeting) {
- if (e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS))
+ if (e_cal_get_static_capability (
+ client, CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS))
event_page_show_options (priv->event_page);
comp_editor_set_group_item (editor, TRUE);
@@ -651,8 +652,13 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
for (l = attendees; l != NULL; l = l->next) {
ECalComponentAttendee *ca = l->data;
EMeetingAttendee *ia;
+ gboolean addresses_match;
- if (delegate && !g_str_equal (itip_strip_mailto (ca->value), user_email))
+ addresses_match =
+ g_str_equal (user_email,
+ itip_strip_mailto (ca->value));
+
+ if (delegate && !addresses_match)
continue;
ia = E_MEETING_ATTENDEE (
@@ -677,13 +683,16 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
ia = e_meeting_store_find_self (priv->model, &row);
if (ia != NULL)
- e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_STATUS);
+ e_meeting_attendee_set_edit_level (
+ ia, E_MEETING_ATTENDEE_EDIT_STATUS);
} else if (e_cal_get_organizer_must_attend (client)) {
EMeetingAttendee *ia;
- ia = e_meeting_store_find_attendee (priv->model, organizer.value, &row);
+ ia = e_meeting_store_find_attendee (
+ priv->model, organizer.value, &row);
if (ia != NULL)
- e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE);
+ e_meeting_attendee_set_edit_level (
+ ia, E_MEETING_ATTENDEE_EDIT_NONE);
}
}
diff --git a/calendar/gui/dialogs/goto-dialog.c b/calendar/gui/dialogs/goto-dialog.c
index 282d5547ff..bc20baa7c2 100644
--- a/calendar/gui/dialogs/goto-dialog.c
+++ b/calendar/gui/dialogs/goto-dialog.c
@@ -60,21 +60,28 @@ static GoToDialog *dlg = NULL;
static void
year_changed (GtkAdjustment *adj, gpointer data)
{
+ GtkSpinButton *spin_button;
GoToDialog *dlg = data;
- dlg->year_val = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (dlg->year));
- e_calendar_item_set_first_month (dlg->ecal->calitem, dlg->year_val, dlg->month_val);
+ spin_button = GTK_SPIN_BUTTON (dlg->year);
+ dlg->year_val = gtk_spin_button_get_value_as_int (spin_button);
+
+ e_calendar_item_set_first_month (
+ dlg->ecal->calitem, dlg->year_val, dlg->month_val);
}
/* Callback used when a month button is toggled */
static void
month_changed (GtkToggleButton *toggle, gpointer data)
{
+ GtkComboBox *combo_box;
GoToDialog *dlg = data;
- dlg->month_val = gtk_combo_box_get_active (GTK_COMBO_BOX (dlg->month_combobox));
+ combo_box = GTK_COMBO_BOX (dlg->month_combobox);
+ dlg->month_val = gtk_combo_box_get_active (combo_box);
- e_calendar_item_set_first_month (dlg->ecal->calitem, dlg->year_val, dlg->month_val);
+ e_calendar_item_set_first_month (
+ dlg->ecal->calitem, dlg->year_val, dlg->month_val);
}
static void
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 30a5bbb9f9..f24db192b2 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -168,7 +168,8 @@ task_editor_constructor (GType type,
gtk_action_group_set_visible (action_group, is_assigned);
if (is_assigned) {
- if (e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS))
+ if (e_cal_get_static_capability (
+ client, CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS))
task_page_show_options (priv->task_page);
comp_editor_set_group_item (editor, TRUE);
}
diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c
index 7d87f6a02d..e65dc4d617 100644
--- a/calendar/gui/e-day-view-time-item.c
+++ b/calendar/gui/e-day-view-time-item.c
@@ -542,7 +542,9 @@ edvti_draw_zone (GnomeCanvasItem *canvas_item,
layout = pango_cairo_create_layout (cr);
pango_layout_set_text (layout, buffer, -1);
pango_layout_get_pixel_size (layout, &minute_width, NULL);
- cairo_translate (cr, minute_x2 - minute_width, row_y + small_font_y_offset);
+ cairo_translate (
+ cr, minute_x2 - minute_width,
+ row_y + small_font_y_offset);
pango_cairo_update_layout (cr, layout);
pango_cairo_show_layout (cr, layout);
cairo_restore (cr);
@@ -859,8 +861,12 @@ e_day_view_time_item_show_popup_menu (EDayViewTimeItem *time_item,
if (zone == time_item->priv->second_zone)
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), TRUE);
gtk_menu_shell_append (GTK_MENU_SHELL (submenu), item);
- g_object_set_data_full (G_OBJECT (item), "timezone", g_strdup (s->data), g_free);
- g_signal_connect (item, "toggled", G_CALLBACK (edvti_on_set_zone), time_item);
+ g_object_set_data_full (
+ G_OBJECT (item), "timezone",
+ g_strdup (s->data), g_free);
+ g_signal_connect (
+ item, "toggled",
+ G_CALLBACK (edvti_on_set_zone), time_item);
}
calendar_config_free_day_second_zones (recent_zones);
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c
index 0b8b65ad53..201d10394b 100644
--- a/calendar/gui/e-day-view-top-item.c
+++ b/calendar/gui/e-day-view-top-item.c
@@ -816,24 +816,31 @@ e_day_view_top_item_get_type (void)
}
void
-e_day_view_top_item_get_day_label (EDayView *day_view, gint day,
- gchar *buffer, gint buffer_len)
+e_day_view_top_item_get_day_label (EDayView *day_view,
+ gint day,
+ gchar *buffer,
+ gint buffer_len)
{
+ ECalendarView *view;
struct icaltimetype day_start_tt;
+ const icaltimezone *zone;
struct tm day_start = { 0 };
const gchar *format;
- day_start_tt = icaltime_from_timet_with_zone (day_view->day_starts[day],
- FALSE,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
+ view = E_CALENDAR_VIEW (day_view);
+ zone = e_calendar_view_get_timezone (view);
+
+ day_start_tt = icaltime_from_timet_with_zone (
+ day_view->day_starts[day], FALSE, zone);
day_start.tm_year = day_start_tt.year - 1900;
day_start.tm_mon = day_start_tt.month - 1;
day_start.tm_mday = day_start_tt.day;
day_start.tm_isdst = -1;
- day_start.tm_wday = time_day_of_week (day_start_tt.day,
- day_start_tt.month - 1,
- day_start_tt.year);
+ day_start.tm_wday = time_day_of_week (
+ day_start_tt.day,
+ day_start_tt.month - 1,
+ day_start_tt.year);
if (day_view->date_format == E_DAY_VIEW_DATE_FULL)
/* strftime format %A = full weekday name, %d = day of month,
diff --git a/calendar/gui/e-meeting-attendee.c b/calendar/gui/e-meeting-attendee.c
index c7c5bdfca2..5b101a5d61 100644
--- a/calendar/gui/e-meeting-attendee.c
+++ b/calendar/gui/e-meeting-attendee.c
@@ -855,7 +855,13 @@ e_meeting_attendee_add_busy_period (EMeetingAttendee *ia,
priv->busy_periods_start.hour = period.start.hour;
priv->busy_periods_start.minute = period.start.minute;
} else {
- switch (g_date_compare (&period.start.date, &priv->busy_periods_start.date)) {
+ gint compare;
+
+ compare = g_date_compare (
+ &period.start.date,
+ &priv->busy_periods_start.date);
+
+ switch (compare) {
case -1:
priv->busy_periods_start.date = period.start.date;
priv->busy_periods_start.hour = period.start.hour;
diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c
index 1ac83c8e0e..e18c259f65 100644
--- a/calendar/gui/e-meeting-store.c
+++ b/calendar/gui/e-meeting-store.c
@@ -1073,11 +1073,17 @@ e_meeting_store_remove_all_attendees (EMeetingStore *store)
{
gint i, j, k;
- for (i = 0, j = e_meeting_store_count_actual_attendees (store), k = 0; i < j; i++) {
- /* Always try to remove the attendee at index 0 since it is the only one that will
- * continue to exist until all attendees are removed. */
- EMeetingAttendee *attendee = g_ptr_array_index (store->priv->attendees, k);
- GtkTreePath *path = gtk_tree_path_new ();
+ for (i = 0, j = e_meeting_store_count_actual_attendees (store), k = 0;
+ i < j; i++) {
+ /* Always try to remove the attendee at index 0 since
+ * it is the only one that will continue to exist until
+ * all attendees are removed. */
+ EMeetingAttendee *attendee;
+ GtkTreePath *path;
+
+ attendee = g_ptr_array_index (store->priv->attendees, k);
+
+ path = gtk_tree_path_new ();
gtk_tree_path_append_index (path, k);
gtk_tree_model_row_deleted (GTK_TREE_MODEL (store), path);
gtk_tree_path_free (path);
diff --git a/calendar/gui/e-task-table.c b/calendar/gui/e-task-table.c
index b68dbea737..540ce1cc63 100644
--- a/calendar/gui/e-task-table.c
+++ b/calendar/gui/e-task-table.c
@@ -1615,13 +1615,17 @@ hide_completed_rows (ECalModel *model,
ECalComponentId *id;
ECalComponent *comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (m->data));
+ e_cal_component_set_icalcomponent (
+ comp, icalcomponent_new_clone (m->data));
id = e_cal_component_get_id (comp);
- if ((comp_data = e_cal_model_get_component_for_uid (model, id))) {
+ comp_data = e_cal_model_get_component_for_uid (model, id);
+ if (comp_data != NULL) {
e_table_model_pre_change (E_TABLE_MODEL (model));
- pos = get_position_in_array (comp_objects, comp_data);
- e_table_model_row_deleted (E_TABLE_MODEL (model), pos);
+ pos = get_position_in_array (
+ comp_objects, comp_data);
+ e_table_model_row_deleted (
+ E_TABLE_MODEL (model), pos);
changed = TRUE;
if (g_ptr_array_remove (comp_objects, comp_data))
@@ -1665,16 +1669,20 @@ show_completed_rows (ECalModel *model,
ECalComponentId *id;
ECalComponent *comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (m->data));
+ e_cal_component_set_icalcomponent (
+ comp, icalcomponent_new_clone (m->data));
id = e_cal_component_get_id (comp);
if (!(e_cal_model_get_component_for_uid (model, id))) {
e_table_model_pre_change (E_TABLE_MODEL (model));
- comp_data = g_object_new (E_TYPE_CAL_MODEL_COMPONENT, NULL);
+ comp_data = g_object_new (
+ E_TYPE_CAL_MODEL_COMPONENT, NULL);
comp_data->client = g_object_ref (client);
- comp_data->icalcomp = icalcomponent_new_clone (m->data);
- e_cal_model_set_instance_times (comp_data,
- e_cal_model_get_timezone (model));
+ comp_data->icalcomp =
+ icalcomponent_new_clone (m->data);
+ e_cal_model_set_instance_times (
+ comp_data,
+ e_cal_model_get_timezone (model));
comp_data->dtstart = NULL;
comp_data->dtend = NULL;
comp_data->due = NULL;
@@ -1682,7 +1690,9 @@ show_completed_rows (ECalModel *model,
comp_data->color = NULL;
g_ptr_array_add (comp_objects, comp_data);
- e_table_model_row_inserted (E_TABLE_MODEL (model), comp_objects->len - 1);
+ e_table_model_row_inserted (
+ E_TABLE_MODEL (model),
+ comp_objects->len - 1);
}
e_cal_component_free_id (id);
g_object_unref (comp);
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index 998e0b2643..917d7de46d 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -140,7 +140,8 @@ week_view_event_item_double_click (EWeekViewEventItem *event_item,
if (week_view->editing_event_num >= 0) {
EWeekViewEvent *editing;
- if (!is_array_index_in_bounds (week_view->events, week_view->editing_event_num))
+ if (!is_array_index_in_bounds (
+ week_view->events, week_view->editing_event_num))
return TRUE;
editing = &g_array_index (
@@ -569,7 +570,8 @@ week_view_event_item_draw_triangle (EWeekViewEventItem *event_item,
cairo_restore (cr);
cairo_save (cr);
- gdk_cairo_set_source_color (cr, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BORDER]);
+ gdk_cairo_set_source_color (
+ cr, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BORDER]);
/* If the height is odd we can use the same central point for both
lines. If it is even we use different end-points. */
@@ -825,11 +827,15 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item,
if (can_draw_in_region (draw_region, cx0, cy0, rect_width, rect_height)) {
cairo_save (cr);
- draw_curved_rectangle (cr, cx0, cy0, rect_width, rect_height, radius);
-
- pat = cairo_pattern_create_linear (rect_x + 2, y1 + 1, rect_x + 2, y2 - 7.25);
- cairo_pattern_add_color_stop_rgba (pat, 1, red/cc, green/cc, blue/cc, 0.8);
- cairo_pattern_add_color_stop_rgba (pat, 0, red/cc, green/cc, blue/cc, 0.4);
+ draw_curved_rectangle (
+ cr, cx0, cy0, rect_width, rect_height, radius);
+
+ pat = cairo_pattern_create_linear (
+ rect_x + 2, y1 + 1, rect_x + 2, y2 - 7.25);
+ cairo_pattern_add_color_stop_rgba (
+ pat, 1, red/cc, green/cc, blue/cc, 0.8);
+ cairo_pattern_add_color_stop_rgba (
+ pat, 0, red/cc, green/cc, blue/cc, 0.4);
cairo_set_source (cr, pat);
cairo_fill_preserve (cr);
cairo_pattern_destroy (pat);
@@ -938,11 +944,15 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item,
if (can_draw_in_region (draw_region, cx0, cy0, rect_width, rect_height)) {
cairo_save (cr);
- draw_curved_rectangle (cr, cx0, cy0, rect_width, rect_height, radius);
-
- pat = cairo_pattern_create_linear (rect_x + 2, y1 + 1, rect_x + 2, y2 - 7.25);
- cairo_pattern_add_color_stop_rgba (pat, 1, red/cc, green/cc, blue/cc, 0.8);
- cairo_pattern_add_color_stop_rgba (pat, 0, red/cc, green/cc, blue/cc, 0.4);
+ draw_curved_rectangle (
+ cr, cx0, cy0, rect_width, rect_height, radius);
+
+ pat = cairo_pattern_create_linear (
+ rect_x + 2, y1 + 1, rect_x + 2, y2 - 7.25);
+ cairo_pattern_add_color_stop_rgba (
+ pat, 1, red/cc, green/cc, blue/cc, 0.8);
+ cairo_pattern_add_color_stop_rgba (
+ pat, 0, red/cc, green/cc, blue/cc, 0.4);
cairo_set_source (cr, pat);
cairo_fill_preserve (cr);
cairo_pattern_destroy (pat);
diff --git a/calendar/gui/e-week-view-main-item.c b/calendar/gui/e-week-view-main-item.c
index ee0cd400e9..03cf3b56d4 100644
--- a/calendar/gui/e-week-view-main-item.c
+++ b/calendar/gui/e-week-view-main-item.c
@@ -90,8 +90,9 @@ week_view_main_item_draw_day (EWeekViewMainItem *main_item,
/* Set up Pango prerequisites */
font_desc = pango_font_description_copy (style->font_desc);
pango_context = gtk_widget_get_pango_context (GTK_WIDGET (week_view));
- font_metrics = pango_context_get_metrics (pango_context, font_desc,
- pango_context_get_language (pango_context));
+ font_metrics = pango_context_get_metrics (
+ pango_context, font_desc,
+ pango_context_get_language (pango_context));
day_of_week = gdate_to_cal_weekdays (g_date_get_weekday (date));
month = g_date_get_month (date);
@@ -102,11 +103,16 @@ week_view_main_item_draw_day (EWeekViewMainItem *main_item,
E_WEEK_VIEW_DATE_LINE_T_PAD;
if (!today) {
+ ECalendarView *view;
struct icaltimetype tt;
+ const icaltimezone *zone;
+
+ view = E_CALENDAR_VIEW (week_view);
+ zone = e_calendar_view_get_timezone (view);
/* Check if we are drawing today */
- tt = icaltime_from_timet_with_zone (time (NULL), FALSE,
- e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
+ tt = icaltime_from_timet_with_zone (
+ time (NULL), FALSE, zone);
today = g_date_get_year (date) == tt.year
&& g_date_get_month (date) == tt.month
&& g_date_get_day (date) == tt.day;
diff --git a/calendar/gui/ea-cal-view-event.c b/calendar/gui/ea-cal-view-event.c
index bd73d59674..6682681483 100644
--- a/calendar/gui/ea-cal-view-event.c
+++ b/calendar/gui/ea-cal-view-event.c
@@ -299,9 +299,11 @@ ea_cal_view_event_get_name (AtkObject *accessible)
summary = icalcomponent_get_summary (event->comp_data->icalcomp);
if (summary)
- summary_string = g_strdup_printf (_("Calendar Event: Summary is %s."), summary);
+ summary_string = g_strdup_printf (
+ _("Calendar Event: Summary is %s."), summary);
else
- summary_string = g_strdup (_("Calendar Event: It has no summary."));
+ summary_string = g_strdup (
+ _("Calendar Event: It has no summary."));
name_string = g_strdup_printf (
"%s %s %s %s", summary_string,
diff --git a/calendar/gui/ea-calendar.c b/calendar/gui/ea-calendar.c
index dbc20fd9a6..423e2dfbd7 100644
--- a/calendar/gui/ea-calendar.c
+++ b/calendar/gui/ea-calendar.c
@@ -75,29 +75,30 @@ gnome_calendar_a11y_init (void)
e_week_view_main_item_type = g_type_class_ref (
e_week_view_main_item_get_type ());
- g_signal_add_emission_hook (g_signal_lookup ("event", E_TYPE_TEXT),
- 0, ea_calendar_focus_watcher,
- NULL, (GDestroyNotify) NULL);
- g_signal_add_emission_hook (g_signal_lookup ("event", GNOME_TYPE_CANVAS_PIXBUF),
- 0, ea_calendar_focus_watcher,
- NULL, (GDestroyNotify) NULL);
- g_signal_add_emission_hook (g_signal_lookup ("event-after",
- e_day_view_get_type ()),
- 0, ea_calendar_focus_watcher,
- NULL, (GDestroyNotify) NULL);
- g_signal_add_emission_hook (g_signal_lookup ("event",
- e_day_view_main_item_get_type ()),
- 0, ea_calendar_focus_watcher,
- NULL, (GDestroyNotify) NULL);
- g_signal_add_emission_hook (g_signal_lookup ("event-after",
- E_TYPE_WEEK_VIEW),
- 0, ea_calendar_focus_watcher,
- NULL, (GDestroyNotify) NULL);
- g_signal_add_emission_hook (g_signal_lookup ("event",
- e_week_view_main_item_get_type ()),
- 0, ea_calendar_focus_watcher,
- NULL, (GDestroyNotify) NULL);
-
+ g_signal_add_emission_hook (
+ g_signal_lookup ("event", E_TYPE_TEXT),
+ 0, ea_calendar_focus_watcher,
+ NULL, (GDestroyNotify) NULL);
+ g_signal_add_emission_hook (
+ g_signal_lookup ("event", GNOME_TYPE_CANVAS_PIXBUF),
+ 0, ea_calendar_focus_watcher,
+ NULL, (GDestroyNotify) NULL);
+ g_signal_add_emission_hook (
+ g_signal_lookup ("event-after", E_TYPE_DAY_VIEW),
+ 0, ea_calendar_focus_watcher,
+ NULL, (GDestroyNotify) NULL);
+ g_signal_add_emission_hook (
+ g_signal_lookup ("event", E_TYPE_DAY_VIEW_MAIN_ITEM),
+ 0, ea_calendar_focus_watcher,
+ NULL, (GDestroyNotify) NULL);
+ g_signal_add_emission_hook (
+ g_signal_lookup ("event-after", E_TYPE_WEEK_VIEW),
+ 0, ea_calendar_focus_watcher,
+ NULL, (GDestroyNotify) NULL);
+ g_signal_add_emission_hook (
+ g_signal_lookup ("event", E_TYPE_WEEK_VIEW_MAIN_ITEM),
+ 0, ea_calendar_focus_watcher,
+ NULL, (GDestroyNotify) NULL);
}
}
diff --git a/calendar/gui/ea-day-view-main-item.c b/calendar/gui/ea-day-view-main-item.c
index 6ea15a4b8d..36abbc0954 100644
--- a/calendar/gui/ea-day-view-main-item.c
+++ b/calendar/gui/ea-day-view-main-item.c
@@ -1124,7 +1124,8 @@ table_interface_get_row_description (AtkTable *table,
description = ea_cell_table_get_row_label (cell_data, row);
if (!description) {
gchar buffer[128];
- ea_day_view_main_item_get_row_label (ea_main_item, row, buffer, sizeof (buffer));
+ ea_day_view_main_item_get_row_label (
+ ea_main_item, row, buffer, sizeof (buffer));
ea_cell_table_set_row_label (cell_data, row, buffer);
description = ea_cell_table_get_row_label (cell_data,
row);
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 789fbcc451..ffbc449584 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -1058,8 +1058,9 @@ free_dn_queries (GnomeCalendar *gcal)
for (l = priv->dn_queries; l != NULL; l = l->next) {
if (!l->data)
continue;
- g_signal_handlers_disconnect_matched ((ECalView *) l->data, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, gcal);
+ g_signal_handlers_disconnect_matched (
+ l->data, G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL, gcal);
g_object_unref (l->data);
}
@@ -2262,12 +2263,16 @@ gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than)
if (e_cal_util_component_is_instance (m->data) ||
e_cal_util_component_has_recurrences (m->data)) {
gchar *rid = NULL;
- struct icaltimetype recur_id = icalcomponent_get_recurrenceid (m->data);
+ struct icaltimetype recur_id;
+
+ recur_id = icalcomponent_get_recurrenceid (m->data);
if (!icaltime_is_null_time (recur_id) )
rid = icaltime_as_ical_string_r (recur_id);
- e_cal_remove_object_with_mod (client, uid, rid, CALOBJ_MOD_ALL, &error);
+ e_cal_remove_object_with_mod (
+ client, uid, rid,
+ CALOBJ_MOD_ALL, &error);
g_free (rid);
} else {
e_cal_remove_object (client, uid, &error);
diff --git a/calendar/gui/gnome-cal.h b/calendar/gui/gnome-cal.h
index 042282bc70..92f6f3ad36 100644
--- a/calendar/gui/gnome-cal.h
+++ b/calendar/gui/gnome-cal.h
@@ -120,9 +120,11 @@ void gnome_calendar_set_date_navigator
(GnomeCalendar *gcal,
ECalendar *date_navigator);
GtkWidget * gnome_calendar_get_memo_table (GnomeCalendar *gcal);
-void gnome_calendar_set_memo_table (GnomeCalendar *gcal, GtkWidget *memo_table);
+void gnome_calendar_set_memo_table (GnomeCalendar *gcal,
+ GtkWidget *memo_table);
GtkWidget * gnome_calendar_get_task_table (GnomeCalendar *gcal);
-void gnome_calendar_set_task_table (GnomeCalendar *gcal, GtkWidget *task_table);
+void gnome_calendar_set_task_table (GnomeCalendar *gcal,
+ GtkWidget *task_table);
ECalModel * gnome_calendar_get_model (GnomeCalendar *gcal);
void gnome_calendar_update_query (GnomeCalendar *gcal);
void gnome_calendar_set_search_query (GnomeCalendar *gcal,
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index 2bc566b771..4d56645b38 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -567,20 +567,26 @@ comp_to_list (ECalComponentItipMethod method,
for (l = attendees; l != NULL; l = l->next) {
ECalComponentAttendee *att = l->data;
- if (att->cutype != ICAL_CUTYPE_INDIVIDUAL && att->cutype != ICAL_CUTYPE_GROUP)
+ if (att->cutype != ICAL_CUTYPE_INDIVIDUAL &&
+ att->cutype != ICAL_CUTYPE_GROUP)
continue;
else if (users_has_attendee (users, att->value))
continue;
- else if (att->sentby && users_has_attendee (users, att->sentby))
+ else if (att->sentby &&
+ users_has_attendee (users, att->sentby))
continue;
- else if (!g_ascii_strcasecmp (att->value, organizer.value))
+ else if (!g_ascii_strcasecmp (
+ att->value, organizer.value))
continue;
- else if (att->sentby && !g_ascii_strcasecmp (att->sentby, organizer.sentby))
+ else if (att->sentby && !g_ascii_strcasecmp (
+ att->sentby, organizer.sentby))
continue;
- else if (!g_ascii_strcasecmp (itip_strip_mailto (att->value), sender))
+ else if (!g_ascii_strcasecmp (
+ itip_strip_mailto (att->value), sender))
continue;
- else if (att->status == ICAL_PARTSTAT_DELEGATED && (att->delto && *att->delto)
- && !(att->rsvp) && method == E_CAL_COMPONENT_METHOD_REQUEST)
+ else if (att->status == ICAL_PARTSTAT_DELEGATED &&
+ (att->delto && *att->delto) && !(att->rsvp) &&
+ method == E_CAL_COMPONENT_METHOD_REQUEST)
continue;
else if (only_attendees &&
!comp_editor_have_in_new_attendees_lst (
@@ -673,7 +679,8 @@ comp_to_list (ECalComponentItipMethod method,
for (l = attendees; l != NULL; l = l->next) {
ECalComponentAttendee *att = l->data;
- if (att->cutype != ICAL_CUTYPE_INDIVIDUAL && att->cutype != ICAL_CUTYPE_GROUP)
+ if (att->cutype != ICAL_CUTYPE_INDIVIDUAL &&
+ att->cutype != ICAL_CUTYPE_GROUP)
continue;
if (!g_ascii_strcasecmp (
@@ -1079,7 +1086,8 @@ comp_sentby (ECalComponent *comp, ECal *client)
}
}
- if (!itip_organizer_is_user (comp, client) && !itip_sentby_is_user (comp, client)) {
+ if (!itip_organizer_is_user (comp, client) &&
+ !itip_sentby_is_user (comp, client)) {
EAccount *a = e_get_default_account ();
organizer.value = g_strdup (organizer.value);
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index 0be794727e..a4d4fd61c8 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -746,20 +746,27 @@ print_month_small (GtkPrintContext *context, GnomeCalendar *gcal, time_t month,
}
if (day != 0) {
- time_t week_begin = time_week_begin_with_zone (now, week_start_day, zone);
+ time_t week_begin;
- convert_timet_to_struct_tm (week_begin, zone, &tm);
+ week_begin = time_week_begin_with_zone (
+ now, week_start_day, zone);
- /* month in e_calendar_item_get_week_number is also zero-based */
+ convert_timet_to_struct_tm (
+ week_begin, zone, &tm);
+
+ /* Month in e_calendar_item_get_week_number
+ * is also zero-based. */
sprintf (
buf, "%d",
e_calendar_item_get_week_number (
NULL, tm.tm_mday, tm.tm_mon,
tm.tm_year + 1900));
- print_text (context, font_normal, buf, PANGO_ALIGN_RIGHT,
- cell_left, text_right,
- cell_top, cell_bottom);
+ print_text (
+ context, font_normal,
+ buf, PANGO_ALIGN_RIGHT,
+ cell_left, text_right,
+ cell_top, cell_bottom);
}
}
@@ -1766,7 +1773,9 @@ print_week_event (GtkPrintContext *context, PangoFontDescription *font,
+ psi->rows_per_cell * (psi->row_height + 2);
if (span->row >= psi->rows_per_compressed_cell && psi->compress_weekend) {
- gint end_day_of_week = (psi->display_start_weekday + span->start_day) % 7;
+ gint end_day_of_week =
+ (psi->display_start_weekday +
+ span->start_day) % 7;
if (end_day_of_week == 5 || end_day_of_week == 6) {
/* Sat or Sun */