aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/dialogs/comp-editor.c167
-rw-r--r--calendar/gui/dialogs/event-editor.c41
-rw-r--r--calendar/gui/dialogs/recurrence-page.c4
-rw-r--r--calendar/gui/dialogs/task-editor.c31
-rw-r--r--calendar/gui/e-cal-model.c2
-rw-r--r--calendar/gui/e-cell-date-edit-text.h5
-rw-r--r--calendar/gui/e-day-view-top-item.c49
-rw-r--r--calendar/gui/e-meeting-store.c96
-rw-r--r--calendar/gui/e-week-view-layout.c6
-rw-r--r--calendar/gui/e-week-view.c6
-rw-r--r--calendar/gui/gnome-cal.c10
-rw-r--r--calendar/gui/goto.c23
-rw-r--r--calendar/gui/print.c4
13 files changed, 312 insertions, 132 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index dcb8dde7b1..ce01b7da4d 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -177,11 +177,15 @@ static const gchar *ui =
static void comp_editor_show_help (CompEditor *editor);
static void real_edit_comp (CompEditor *editor, ECalComponent *comp);
-static gboolean real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms);
+static gboolean real_send_comp (CompEditor *editor,
+ ECalComponentItipMethod method,
+ gboolean strip_alarms);
static gboolean prompt_and_save_changes (CompEditor *editor, gboolean send);
static void close_dialog (CompEditor *editor);
-static void page_dates_changed_cb (CompEditor *editor, CompEditorPageDates *dates, CompEditorPage *page);
+static void page_dates_changed_cb (CompEditor *editor,
+ CompEditorPageDates *dates,
+ CompEditorPage *page);
static void obj_modified_cb (ECal *client, GList *objs, CompEditor *editor);
static void obj_removed_cb (ECal *client, GList *uids, CompEditor *editor);
@@ -415,7 +419,8 @@ save_comp (CompEditor *editor)
clone = e_cal_component_clone (priv->comp);
comp_editor_copy_new_attendees (clone, priv->comp);
for (l = priv->pages; l != NULL; l = l->next) {
- if (IS_COMP_EDITOR_PAGE(l->data) && !comp_editor_page_fill_component (l->data, clone)) {
+ if (IS_COMP_EDITOR_PAGE (l->data) &&
+ !comp_editor_page_fill_component (l->data, clone)) {
g_object_unref (clone);
g_hash_table_destroy (timezones);
comp_editor_show_page (editor, COMP_EDITOR_PAGE (l->data));
@@ -428,7 +433,9 @@ save_comp (CompEditor *editor)
}
/* If we are not the organizer, we don't update the sequence number */
- if (!e_cal_component_has_organizer (clone) || itip_organizer_is_user (clone, priv->client) || itip_sentby_is_user (clone, priv->client))
+ if (!e_cal_component_has_organizer (clone) ||
+ itip_organizer_is_user (clone, priv->client) ||
+ itip_sentby_is_user (clone, priv->client))
e_cal_component_commit_sequence (clone);
else
e_cal_component_abort_sequence (clone);
@@ -469,16 +476,20 @@ save_comp (CompEditor *editor)
if (result && priv->mod == CALOBJ_MOD_THIS) {
/* FIXME do we really need to do this ? */
- if ((flags & COMP_EDITOR_DELEGATE) || !e_cal_component_has_organizer (clone) || itip_organizer_is_user (clone, priv->client) || itip_sentby_is_user (clone, priv->client))
+ if ((flags & COMP_EDITOR_DELEGATE) ||
+ !e_cal_component_has_organizer (clone) ||
+ itip_organizer_is_user (clone, priv->client) ||
+ itip_sentby_is_user (clone, priv->client))
e_cal_component_commit_sequence (clone);
else
e_cal_component_abort_sequence (clone);
}
}
- /* If the delay delivery is set, the items will not be created in the server immediately,
- so we need not show them in the view. They will appear as soon as the server creates
- it after the delay period */
+ /* If the delay delivery is set, the items will not be created in
+ * the server immediately, so we need not show them in the view.
+ * They will appear as soon as the server creates it after the
+ * delay period. */
if (result && e_cal_component_has_attendees (priv->comp)) {
gboolean delay_set = FALSE;
icalproperty *icalprop;
@@ -525,14 +536,18 @@ save_comp (CompEditor *editor)
cal_comp_is_on_server (priv->comp, priv->source_client)) {
/* Comp found a new home. Remove it from old one. */
- if (e_cal_component_is_instance (priv->comp) || e_cal_component_has_recurrences (priv->comp))
- e_cal_remove_object_with_mod (priv->source_client, orig_uid_copy, NULL,
- CALOBJ_MOD_ALL, NULL);
+ if (e_cal_component_is_instance (priv->comp) ||
+ e_cal_component_has_recurrences (priv->comp))
+ e_cal_remove_object_with_mod (
+ priv->source_client, orig_uid_copy,
+ NULL, CALOBJ_MOD_ALL, NULL);
else
- e_cal_remove_object (priv->source_client, orig_uid_copy, NULL);
+ e_cal_remove_object (
+ priv->source_client,
+ orig_uid_copy, NULL);
- /* Let priv->source_client point to new home, so we can move it
- * again this session. */
+ /* Let priv->source_client point to new home,
+ * so we can move it again this session. */
g_object_unref (priv->source_client);
priv->source_client = g_object_ref (priv->client);
@@ -575,17 +590,29 @@ save_comp_with_send (CompEditor *editor)
return FALSE;
delegated = delegate && !e_cal_get_save_schedules (priv->client);
- if (delegated || (send && send_component_dialog ((GtkWindow *) editor, priv->client, priv->comp, !priv->existing_org, &strip_alarms, !priv->existing_org ? NULL : &only_new_attendees))) {
+ if (delegated || (send && send_component_dialog (
+ (GtkWindow *) editor, priv->client, priv->comp,
+ !priv->existing_org, &strip_alarms, !priv->existing_org ?
+ NULL : &only_new_attendees))) {
if (delegated)
only_new_attendees = FALSE;
- comp_editor_set_flags (editor, (comp_editor_get_flags (editor) & (~COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY)) | (only_new_attendees ? COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY : 0));
+ comp_editor_set_flags (
+ editor, (comp_editor_get_flags (editor) &
+ (~COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY)) |
+ (only_new_attendees ?
+ COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY : 0));
- if ((itip_organizer_is_user (priv->comp, priv->client) || itip_sentby_is_user (priv->comp, priv->client))) {
+ if ((itip_organizer_is_user (priv->comp, priv->client) ||
+ itip_sentby_is_user (priv->comp, priv->client))) {
if (e_cal_component_get_vtype (priv->comp) == E_CAL_COMPONENT_JOURNAL)
- return comp_editor_send_comp (editor, E_CAL_COMPONENT_METHOD_PUBLISH, strip_alarms);
+ return comp_editor_send_comp (
+ editor, E_CAL_COMPONENT_METHOD_PUBLISH,
+ strip_alarms);
else
- return comp_editor_send_comp (editor, E_CAL_COMPONENT_METHOD_REQUEST, strip_alarms);
+ return comp_editor_send_comp (
+ editor, E_CAL_COMPONENT_METHOD_REQUEST,
+ strip_alarms);
} else {
if (!comp_editor_send_comp (editor, E_CAL_COMPONENT_METHOD_REQUEST, strip_alarms))
return FALSE;
@@ -754,7 +781,9 @@ remove_event_dialog (ECal *client,
g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), TRUE);
- dialog = gtk_message_dialog_new (parent, 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "%s", _("Keep original item?"));
+ dialog = gtk_message_dialog_new (
+ parent, 0, GTK_MESSAGE_QUESTION,
+ GTK_BUTTONS_YES_NO, "%s", _("Keep original item?"));
gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
ret = gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_YES;
gtk_widget_destroy (dialog);
@@ -799,13 +828,21 @@ action_save_cb (GtkAction *action,
}
if (!e_cal_is_read_only (priv->client, &read_only, NULL) || read_only) {
- e_alert_run_dialog_for_args ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (editor)), "calendar:prompt-read-only-cal-editor", e_source_peek_name (e_cal_get_source (priv->client)), NULL);
+ e_alert_run_dialog_for_args (
+ (GtkWindow *) gtk_widget_get_toplevel (
+ GTK_WIDGET (editor)),
+ "calendar:prompt-read-only-cal-editor",
+ e_source_peek_name (
+ e_cal_get_source (priv->client)),
+ NULL);
return;
}
commit_all_fields (editor);
if (e_cal_component_has_recurrences (priv->comp)) {
- if (!recur_component_dialog (priv->client, priv->comp, &priv->mod, GTK_WINDOW (editor), delegated))
+ if (!recur_component_dialog (
+ priv->client, priv->comp, &priv->mod,
+ GTK_WINDOW (editor), delegated))
return;
} else if (e_cal_component_is_instance (priv->comp))
priv->mod = CALOBJ_MOD_THIS;
@@ -828,13 +865,15 @@ action_save_cb (GtkAction *action,
flags = comp_editor_get_flags (editor);
delegate = flags & COMP_EDITOR_DELEGATE;
- if (delegate && !remove_event_dialog (priv->client, priv->comp, GTK_WINDOW (editor))) {
+ if (delegate && !remove_event_dialog (
+ priv->client, priv->comp, GTK_WINDOW (editor))) {
const gchar *uid = NULL;
GError *error = NULL;
e_cal_component_get_uid (priv->comp, &uid);
- if (e_cal_component_is_instance (priv->comp) || e_cal_component_has_recurrences (priv->comp)) {
+ if (e_cal_component_is_instance (priv->comp) ||
+ 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);
@@ -1836,7 +1875,13 @@ prompt_and_save_changes (CompEditor *editor, gboolean send)
switch (save_component_dialog (GTK_WINDOW(editor), priv->comp)) {
case GTK_RESPONSE_YES: /* Save */
if (!e_cal_is_read_only (priv->client, &read_only, NULL) || read_only) {
- e_alert_run_dialog_for_args ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (editor)), "calendar:prompt-read-only-cal-editor", e_source_peek_name (e_cal_get_source (priv->client)), NULL);
+ e_alert_run_dialog_for_args (
+ (GtkWindow *) gtk_widget_get_toplevel (
+ GTK_WIDGET (editor)),
+ "calendar:prompt-read-only-cal-editor",
+ e_source_peek_name (
+ e_cal_get_source (priv->client)),
+ NULL);
/* don't discard changes when selected readonly calendar */
return FALSE;
}
@@ -1853,7 +1898,9 @@ prompt_and_save_changes (CompEditor *editor, gboolean send)
return FALSE;
if (e_cal_component_is_instance (priv->comp))
- if (!recur_component_dialog (priv->client, priv->comp, &priv->mod, GTK_WINDOW (editor), FALSE))
+ if (!recur_component_dialog (
+ priv->client, priv->comp, &priv->mod,
+ GTK_WINDOW (editor), FALSE))
return FALSE;
if (send && save_comp_with_send (editor))
@@ -2397,8 +2444,10 @@ comp_editor_remove_page (CompEditor *editor, CompEditorPage *page)
return;
/* Disconnect all the signals added in append_page(). */
- g_signal_handlers_disconnect_matched (page, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, editor);
- g_signal_handlers_disconnect_matched (page_widget, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, page);
+ g_signal_handlers_disconnect_matched (
+ page, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, editor);
+ g_signal_handlers_disconnect_matched (
+ page_widget, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, page);
gtk_notebook_remove_page (priv->notebook, page_num);
@@ -2634,7 +2683,9 @@ real_edit_comp (CompEditor *editor, ECalComponent *comp)
/* TODO These functions should be available in e-cal-component.c */
static void
-set_attendees_for_delegation (ECalComponent *comp, const gchar *address, ECalComponentItipMethod method)
+set_attendees_for_delegation (ECalComponent *comp,
+ const gchar *address,
+ ECalComponentItipMethod method)
{
icalproperty *prop;
icalparameter *param;
@@ -2671,8 +2722,9 @@ 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;
- icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY)) {
+ 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")) {
break;
}
@@ -2692,7 +2744,9 @@ get_users_from_memo_comp (ECalComponent *comp, GList **users)
}
static gboolean
-real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms)
+real_send_comp (CompEditor *editor,
+ ECalComponentItipMethod method,
+ gboolean strip_alarms)
{
CompEditorPrivate *priv;
CompEditorFlags flags;
@@ -2729,7 +2783,8 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean str
if (e_cal_component_get_vtype (send_comp) == E_CAL_COMPONENT_JOURNAL)
get_users_from_memo_comp (send_comp, &users);
- /* The user updates the delegated status to the Organizer, so remove all other attendees */
+ /* The user updates the delegated status to the Organizer,
+ * so remove all other attendees. */
if (flags & COMP_EDITOR_DELEGATE) {
address = itip_get_comp_attendee (send_comp, priv->client);
@@ -2737,10 +2792,13 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean str
set_attendees_for_delegation (send_comp, address, method);
}
- if (!e_cal_component_has_attachments (priv->comp)
- || e_cal_get_static_capability (priv->client, CAL_STATIC_CAPABILITY_CREATE_MESSAGES)) {
- if (itip_send_comp (method, send_comp, priv->client,
- NULL, NULL, users, strip_alarms, priv->flags & COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY)) {
+ if (!e_cal_component_has_attachments (priv->comp) ||
+ e_cal_get_static_capability (priv->client,
+ CAL_STATIC_CAPABILITY_CREATE_MESSAGES)) {
+ if (itip_send_comp (
+ method, send_comp, priv->client,
+ NULL, NULL, users, strip_alarms,
+ priv->flags & COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY)) {
g_object_unref (send_comp);
return TRUE;
}
@@ -2755,7 +2813,9 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean str
for (attach = mime_attach_list; attach; attach = attach->next) {
struct CalMimeAttach *cma = (struct CalMimeAttach *) attach->data;
- attach_list = g_slist_append (attach_list, g_strconcat ("cid:", cma->content_id, NULL));
+ attach_list = g_slist_append (
+ attach_list, g_strconcat (
+ "cid:", cma->content_id, NULL));
}
if (attach_list) {
@@ -2765,8 +2825,10 @@ real_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean str
g_slist_free (attach_list);
}
- if (itip_send_comp (method, send_comp, priv->client,
- NULL, mime_attach_list, users, strip_alarms, priv->flags & COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY)) {
+ if (itip_send_comp (
+ method, send_comp, priv->client,
+ NULL, mime_attach_list, users, strip_alarms,
+ priv->flags & COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY)) {
gboolean saved = save_comp (editor);
g_object_unref (send_comp);
@@ -2879,7 +2941,8 @@ comp_editor_delete_comp (CompEditor *editor)
priv = editor->priv;
e_cal_component_get_uid (priv->comp, &uid);
- if (e_cal_component_is_instance (priv->comp)|| e_cal_component_has_recurrences (priv->comp))
+ if (e_cal_component_is_instance (priv->comp) ||
+ e_cal_component_has_recurrences (priv->comp))
e_cal_remove_object_with_mod (priv->client, uid, NULL,
CALOBJ_MOD_ALL, NULL);
else
@@ -2895,7 +2958,9 @@ comp_editor_delete_comp (CompEditor *editor)
*
**/
gboolean
-comp_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms)
+comp_editor_send_comp (CompEditor *editor,
+ ECalComponentItipMethod method,
+ gboolean strip_alarms)
{
CompEditorClass *class;
@@ -2984,8 +3049,10 @@ comp_editor_get_mime_attach_list (CompEditor *editor)
if (!desc || *desc == '\0')
desc = _("attachment");
cal_mime_attach->description = g_strdup (desc);
- cal_mime_attach->content_type = g_strdup (camel_data_wrapper_get_mime_type (wrapper));
- cal_mime_attach->content_id = g_strdup (camel_mime_part_get_content_id (mime_part));
+ cal_mime_attach->content_type = g_strdup (
+ camel_data_wrapper_get_mime_type (wrapper));
+ cal_mime_attach->content_id = g_strdup (
+ camel_mime_part_get_content_id (mime_part));
disp = camel_mime_part_get_disposition (mime_part);
if (disp && !g_ascii_strcasecmp(disp, "inline"))
@@ -3012,9 +3079,12 @@ page_dates_changed_cb (CompEditor *editor,
if (page != (CompEditorPage *) l->data && IS_COMP_EDITOR_PAGE(l->data))
comp_editor_page_set_dates (l->data, dates);
- if (!priv->warned && priv->existing_org && !priv->user_org && !(editor->priv->flags & COMP_EDITOR_NEW_ITEM)) {
- e_notice (priv->notebook, GTK_MESSAGE_INFO,
- _("Changes made to this item may be discarded if an update arrives"));
+ if (!priv->warned && priv->existing_org && !priv->user_org &&
+ !(editor->priv->flags & COMP_EDITOR_NEW_ITEM)) {
+ e_notice (
+ priv->notebook, GTK_MESSAGE_INFO,
+ _("Changes made to this item may be discarded "
+ "if an update arrives"));
priv->warned = TRUE;
}
}
@@ -3030,7 +3100,8 @@ obj_modified_cb (ECal *client,
priv = editor->priv;
/* We queried based on a specific UID so we definitely changed */
- if (changed_component_dialog ((GtkWindow *) editor, priv->comp, FALSE, priv->changed)) {
+ if (changed_component_dialog (
+ (GtkWindow *) editor, priv->comp, FALSE, priv->changed)) {
icalcomponent *icalcomp = icalcomponent_new_clone (objects->data);
comp = e_cal_component_new ();
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index f055884d0d..b0dee13f27 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -106,8 +106,11 @@ static const gchar *ui =
" </toolbar>"
"</ui>";
-static void event_editor_edit_comp (CompEditor *editor, ECalComponent *comp);
-static gboolean event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms);
+static void event_editor_edit_comp (CompEditor *editor,
+ ECalComponent *comp);
+static gboolean event_editor_send_comp (CompEditor *editor,
+ ECalComponentItipMethod method,
+ gboolean strip_alarms);
G_DEFINE_TYPE (EventEditor, event_editor, TYPE_COMP_EDITOR)
@@ -365,7 +368,9 @@ event_editor_constructor (GType type,
event_page_show_options (priv->event_page);
comp_editor_set_group_item (editor, TRUE);
- if (!((flags & COMP_EDITOR_USER_ORG) || (flags & COMP_EDITOR_DELEGATE)|| (flags & COMP_EDITOR_NEW_ITEM))) {
+ if (!((flags & COMP_EDITOR_USER_ORG) ||
+ (flags & COMP_EDITOR_DELEGATE) ||
+ (flags & COMP_EDITOR_NEW_ITEM))) {
GtkAction *action;
action = comp_editor_get_action (editor, "free-busy");
@@ -635,7 +640,8 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
gtk_action_set_visible (action, TRUE);
}
- if (!(delegate && e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY))) {
+ if (!(delegate && e_cal_get_static_capability (
+ client, CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY))) {
event_page_remove_all_attendees (priv->event_page);
for (l = attendees; l != NULL; l = l->next) {
@@ -645,11 +651,15 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
if (delegate && !g_str_equal (itip_strip_mailto (ca->value), user_email))
continue;
- ia = E_MEETING_ATTENDEE (e_meeting_attendee_new_from_e_cal_component_attendee (ca));
+ ia = E_MEETING_ATTENDEE (
+ e_meeting_attendee_new_from_e_cal_component_attendee (ca));
- /* If we aren't the organizer or the attendee is just delegated, don't allow editing */
- if (!comp_editor_get_user_org (editor) || e_meeting_attendee_is_set_delto (ia))
- e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE);
+ /* If we aren't the organizer or the attendee
+ * is just delegated, don't allow editing. */
+ if (!comp_editor_get_user_org (editor) ||
+ e_meeting_attendee_is_set_delto (ia))
+ e_meeting_attendee_set_edit_level (
+ ia, E_MEETING_ATTENDEE_EDIT_NONE);
event_page_add_attendee (priv->event_page, ia);
@@ -663,7 +673,9 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
EIterator *it;
accounts = itip_addresses_get ();
- for (it = e_list_get_iterator((EList *)accounts);e_iterator_is_valid(it);e_iterator_next(it)) {
+ for (it = e_list_get_iterator((EList *)accounts);
+ e_iterator_is_valid(it);
+ e_iterator_next(it)) {
EMeetingAttendee *ia;
account = (EAccount*)e_iterator_get(it);
@@ -687,13 +699,17 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
}
e_cal_component_free_attendee_list (attendees);
- comp_editor_set_needs_send (editor, priv->meeting_shown && (itip_organizer_is_user (comp, client) || itip_sentby_is_user (comp, client)));
+ comp_editor_set_needs_send (
+ editor, priv->meeting_shown && (itip_organizer_is_user (
+ comp, client) || itip_sentby_is_user (comp, client)));
priv->updating = FALSE;
}
static gboolean
-event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms)
+event_editor_send_comp (CompEditor *editor,
+ ECalComponentItipMethod method,
+ gboolean strip_alarms)
{
EventEditorPrivate *priv;
ECalComponent *comp = NULL;
@@ -721,7 +737,8 @@ event_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboo
parent:
if (COMP_EDITOR_CLASS (event_editor_parent_class)->send_comp)
- return COMP_EDITOR_CLASS (event_editor_parent_class)->send_comp (editor, method, strip_alarms);
+ return COMP_EDITOR_CLASS (event_editor_parent_class)->
+ send_comp (editor, method, strip_alarms);
return FALSE;
}
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index ae79698efd..c2efce759c 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -493,7 +493,7 @@ get_start_weekday_mask (ECalComponent *comp)
e_cal_component_get_dtstart (comp, &dt);
if (dt.value) {
- short weekday;
+ gshort weekday;
weekday = icaltime_day_of_week (*dt.value);
retval = 0x1 << (weekday - 1);
@@ -1325,7 +1325,7 @@ make_recurrence_special (RecurrencePage *rpage)
/* Counts the elements in the by_xxx fields of an icalrecurrencetype */
static gint
-count_by_xxx (short *field, gint max_elements)
+count_by_xxx (gshort *field, gint max_elements)
{
gint i;
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 09494cec1a..01f65aa8fd 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -88,8 +88,11 @@ static const gchar *ui =
" </toolbar>"
"</ui>";
-static void task_editor_edit_comp (CompEditor *editor, ECalComponent *comp);
-static gboolean task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms);
+static void task_editor_edit_comp (CompEditor *editor,
+ ECalComponent *comp);
+static gboolean task_editor_send_comp (CompEditor *editor,
+ ECalComponentItipMethod method,
+ gboolean strip_alarms);
G_DEFINE_TYPE (TaskEditor, task_editor, TYPE_COMP_EDITOR)
@@ -413,9 +416,12 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
EMeetingAttendee *ia;
ia = E_MEETING_ATTENDEE (e_meeting_attendee_new_from_e_cal_component_attendee (ca));
- /* If we aren't the organizer or the attendee is just delegating, don't allow editing */
- if (!comp_editor_get_user_org (editor) || e_meeting_attendee_is_set_delto (ia))
- e_meeting_attendee_set_edit_level (ia, E_MEETING_ATTENDEE_EDIT_NONE);
+ /* If we aren't the organizer or the attendee is just
+ * delegating, don't allow editing. */
+ if (!comp_editor_get_user_org (editor) ||
+ e_meeting_attendee_is_set_delto (ia))
+ e_meeting_attendee_set_edit_level (
+ ia, E_MEETING_ATTENDEE_EDIT_NONE);
task_page_add_attendee (priv->task_page, ia);
g_object_unref (ia);
@@ -428,7 +434,9 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
EIterator *it;
accounts = itip_addresses_get ();
- for (it = e_list_get_iterator((EList *)accounts);e_iterator_is_valid(it);e_iterator_next(it)) {
+ for (it = e_list_get_iterator((EList *)accounts);
+ e_iterator_is_valid(it);
+ e_iterator_next(it)) {
EMeetingAttendee *ia;
account = (EAccount*)e_iterator_get(it);
@@ -451,13 +459,17 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
}
e_cal_component_free_attendee_list (attendees);
- comp_editor_set_needs_send (editor, priv->assignment_shown && itip_organizer_is_user (comp, client));
+ comp_editor_set_needs_send (
+ editor, priv->assignment_shown &&
+ itip_organizer_is_user (comp, client));
priv->updating = FALSE;
}
static gboolean
-task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gboolean strip_alarms)
+task_editor_send_comp (CompEditor *editor,
+ ECalComponentItipMethod method,
+ gboolean strip_alarms)
{
TaskEditorPrivate *priv;
ECalComponent *comp = NULL;
@@ -485,7 +497,8 @@ task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gbool
parent:
if (COMP_EDITOR_CLASS (task_editor_parent_class)->send_comp)
- return COMP_EDITOR_CLASS (task_editor_parent_class)->send_comp (editor, method, strip_alarms);
+ return COMP_EDITOR_CLASS (task_editor_parent_class)->
+ send_comp (editor, method, strip_alarms);
return FALSE;
}
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index d04c87ad93..d0166b9f0e 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -2774,7 +2774,7 @@ e_cal_model_generate_instances (ECalModel *model, time_t start, time_t end,
gint i, n;
n = e_table_model_row_count (E_TABLE_MODEL (model));
- for (i = 0; i < n; i ++) {
+ for (i = 0; i < n; i++) {
ECalModelComponent *comp_data = e_cal_model_get_component_at (model, i);
mdata.comp_data = comp_data;
diff --git a/calendar/gui/e-cell-date-edit-text.h b/calendar/gui/e-cell-date-edit-text.h
index 335374c141..aab7e27edf 100644
--- a/calendar/gui/e-cell-date-edit-text.h
+++ b/calendar/gui/e-cell-date-edit-text.h
@@ -80,8 +80,9 @@ gboolean e_cell_date_edit_text_get_use_24_hour_format
void e_cell_date_edit_text_set_use_24_hour_format
(ECellDateEditText *ecd,
gboolean use_24_hour);
-
-gint e_cell_date_edit_compare_cb (gconstpointer a, gconstpointer b, gpointer cmp_cache);
+gint e_cell_date_edit_compare_cb (gconstpointer a,
+ gconstpointer b,
+ gpointer cmp_cache);
G_END_DECLS
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c
index f622b8252b..c0b718d63b 100644
--- a/calendar/gui/e-day-view-top-item.c
+++ b/calendar/gui/e-day-view-top-item.c
@@ -104,19 +104,24 @@ day_view_top_item_draw_triangle (EDayViewTopItem *top_item,
cairo_save (cr);
/* Fill it in. */
- if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)),
- event->comp_data),
- &bg_color)) {
+ if (gdk_color_parse (
+ e_cal_model_get_color_for_component (
+ e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)),
+ event->comp_data), &bg_color)) {
GdkColormap *colormap;
colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE)) {
gdk_cairo_set_source_color (cr, &bg_color);
} else {
- gdk_cairo_set_source_color (cr, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND]);
+ gdk_cairo_set_source_color (
+ cr, &day_view->colors
+ [E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND]);
}
} else {
- gdk_cairo_set_source_color (cr, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND]);
+ gdk_cairo_set_source_color (
+ cr, &day_view->colors
+ [E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND]);
}
cairo_move_to (cr, points[0].x, points[0].y);
@@ -127,7 +132,8 @@ day_view_top_item_draw_triangle (EDayViewTopItem *top_item,
cairo_restore (cr);
cairo_save (cr);
- gdk_cairo_set_source_color (cr, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BORDER]);
+ gdk_cairo_set_source_color (
+ cr, &day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BORDER]);
cairo_move_to (cr, x, y);
cairo_line_to (cr, x + w, c1);
cairo_move_to (cr, x, y + h - 1);
@@ -207,11 +213,13 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
gc = day_view->main_gc;
fg_gc = style->fg_gc[GTK_STATE_NORMAL];
comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
+ e_cal_component_set_icalcomponent (
+ comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- if (gdk_color_parse (e_cal_model_get_color_for_component (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)),
- event->comp_data),
- &bg_color)) {
+ if (gdk_color_parse (
+ e_cal_model_get_color_for_component (
+ e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)),
+ event->comp_data), &bg_color)) {
GdkColormap *colormap;
colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view));
@@ -393,7 +401,9 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
+ event->end_minute;
hour = offset / 60;
minute = offset % 60;
- time_x = item_x + item_w - E_DAY_VIEW_LONG_EVENT_X_PAD - time_width - E_DAY_VIEW_LONG_EVENT_TIME_X_PAD - x;
+ time_x =
+ item_x + item_w - E_DAY_VIEW_LONG_EVENT_X_PAD -
+ time_width - E_DAY_VIEW_LONG_EVENT_TIME_X_PAD - x;
if (time_x >= min_end_time_x) {
/* Calculate the actual hour number to display. */
@@ -431,7 +441,9 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
icon_y = item_y + E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT
+ E_DAY_VIEW_ICON_Y_PAD - y;
- if (icon_x <= max_icon_x && (e_cal_component_has_recurrences (comp) || e_cal_component_is_instance (comp))) {
+ if (icon_x <= max_icon_x && (
+ e_cal_component_has_recurrences (comp) ||
+ e_cal_component_is_instance (comp))) {
cairo_save (cr);
gdk_cairo_set_source_pixbuf (cr, day_view->recurrence_icon, icon_x, icon_y);
cairo_paint (cr);
@@ -615,7 +627,10 @@ day_view_top_item_draw (GnomeCanvasItem *canvas_item,
gtk_widget_get_allocation (
GTK_WIDGET (canvas_item->canvas), &allocation);
canvas_width = allocation.width;
- canvas_height = (show_dates ? 1 : (MAX (1, day_view->rows_in_top_display) + 1)) * day_view->top_row_height;
+ canvas_height =
+ (show_dates ? 1 :
+ (MAX (1, day_view->rows_in_top_display) + 1)) *
+ day_view->top_row_height;
left_edge = 0;
item_height = day_view->top_row_height - E_DAY_VIEW_TOP_CANVAS_Y_GAP;
@@ -680,7 +695,9 @@ day_view_top_item_draw (GnomeCanvasItem *canvas_item,
rect_h = canvas_height - 1 - rect_y;
cairo_save (cr);
- gdk_cairo_set_source_color (cr, &day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS_SELECTED]);
+ gdk_cairo_set_source_color (
+ cr, &day_view->colors
+ [E_DAY_VIEW_COLOR_BG_TOP_CANVAS_SELECTED]);
cairo_rectangle (cr, rect_x - x, rect_y - y,
rect_w, rect_h);
cairo_fill (cr);
@@ -739,7 +756,9 @@ day_view_top_item_draw (GnomeCanvasItem *canvas_item,
/* Draw the lines between each column. */
if (day != 0) {
cairo_save (cr);
- gdk_cairo_set_source_color (cr, &day_view->colors[E_DAY_VIEW_COLOR_BG_TOP_CANVAS_GRID]);
+ gdk_cairo_set_source_color (
+ cr, &day_view->colors
+ [E_DAY_VIEW_COLOR_BG_TOP_CANVAS_GRID]);
cairo_move_to (cr, day_view->day_offsets[day] - x,
item_height - y);
cairo_line_to (cr, day_view->day_offsets[day] - x,
diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c
index 6cfaecabfa..51bf75f750 100644
--- a/calendar/gui/e-meeting-store.c
+++ b/calendar/gui/e-meeting-store.c
@@ -326,43 +326,60 @@ get_value (GtkTreeModel *model, GtkTreeIter *iter, gint col, GValue *value)
switch (col) {
case E_MEETING_STORE_ADDRESS_COL:
g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, itip_strip_mailto (e_meeting_attendee_get_address (attendee)));
+ g_value_set_string (
+ value, itip_strip_mailto (
+ e_meeting_attendee_get_address (attendee)));
break;
case E_MEETING_STORE_MEMBER_COL:
g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, e_meeting_attendee_get_member (attendee));
+ g_value_set_string (
+ value, e_meeting_attendee_get_member (attendee));
break;
case E_MEETING_STORE_TYPE_COL:
g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, type_to_text (e_meeting_attendee_get_cutype (attendee)));
+ g_value_set_string (
+ value, type_to_text (
+ e_meeting_attendee_get_cutype (attendee)));
break;
case E_MEETING_STORE_ROLE_COL:
g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, role_to_text (e_meeting_attendee_get_role (attendee)));
+ g_value_set_string (
+ value, role_to_text (
+ e_meeting_attendee_get_role (attendee)));
break;
case E_MEETING_STORE_RSVP_COL:
g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, boolean_to_text (e_meeting_attendee_get_rsvp (attendee)));
+ g_value_set_string (
+ value, boolean_to_text (
+ e_meeting_attendee_get_rsvp (attendee)));
break;
case E_MEETING_STORE_DELTO_COL:
g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, itip_strip_mailto (e_meeting_attendee_get_delto (attendee)));
+ g_value_set_string (
+ value, itip_strip_mailto (
+ e_meeting_attendee_get_delto (attendee)));
break;
case E_MEETING_STORE_DELFROM_COL:
g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, itip_strip_mailto (e_meeting_attendee_get_delfrom (attendee)));
+ g_value_set_string (
+ value, itip_strip_mailto (
+ e_meeting_attendee_get_delfrom (attendee)));
break;
case E_MEETING_STORE_STATUS_COL:
g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, partstat_to_text (e_meeting_attendee_get_status (attendee)));
+ g_value_set_string (
+ value, partstat_to_text (
+ e_meeting_attendee_get_status (attendee)));
break;
case E_MEETING_STORE_CN_COL:
g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, e_meeting_attendee_get_cn (attendee));
+ g_value_set_string (
+ value, e_meeting_attendee_get_cn (attendee));
break;
case E_MEETING_STORE_LANGUAGE_COL:
g_value_init (value, G_TYPE_STRING);
- g_value_set_string (value, e_meeting_attendee_get_language (attendee));
+ g_value_set_string (
+ value, e_meeting_attendee_get_language (attendee));
break;
case E_MEETING_STORE_ATTENDEE_COL:
g_value_init (value, G_TYPE_STRING);
@@ -370,12 +387,16 @@ get_value (GtkTreeModel *model, GtkTreeIter *iter, gint col, GValue *value)
if (strcmp (cn, ""))
g_value_set_string (value, cn);
else
- g_value_set_string (value, itip_strip_mailto (e_meeting_attendee_get_address (attendee)));
+ g_value_set_string (
+ value, itip_strip_mailto (
+ e_meeting_attendee_get_address (attendee)));
break;
case E_MEETING_STORE_ATTENDEE_UNDERLINE_COL:
cn = e_meeting_attendee_get_cn (attendee);
g_value_init (value, PANGO_TYPE_UNDERLINE);
- g_value_set_enum (value, strcmp ("", cn) == 0 ? PANGO_UNDERLINE_NONE : PANGO_UNDERLINE_SINGLE);
+ g_value_set_enum (
+ value, strcmp ("", cn) == 0 ?
+ PANGO_UNDERLINE_NONE : PANGO_UNDERLINE_SINGLE);
}
}
@@ -480,7 +501,9 @@ e_meeting_store_set_value (EMeetingStore *store, gint row, gint col, const gchar
switch (col) {
case E_MEETING_STORE_ADDRESS_COL:
if (val != NULL && *((gchar *)val))
- e_meeting_attendee_set_address (attendee, g_strdup_printf ("MAILTO:%s", (gchar *) val));
+ e_meeting_attendee_set_address (
+ attendee, g_strdup_printf (
+ "MAILTO:%s", (gchar *) val));
break;
case E_MEETING_STORE_MEMBER_COL:
e_meeting_attendee_set_member (attendee, g_strdup (val));
@@ -525,10 +548,14 @@ refresh_queue_remove (EMeetingStore *store, EMeetingAttendee *attendee)
priv = store->priv;
/* Free the queue data */
- qdata = g_hash_table_lookup (priv->refresh_data, itip_strip_mailto (e_meeting_attendee_get_address (attendee)));
+ qdata = g_hash_table_lookup (
+ priv->refresh_data, itip_strip_mailto (
+ e_meeting_attendee_get_address (attendee)));
if (qdata) {
g_mutex_lock (priv->mutex);
- g_hash_table_remove (priv->refresh_data, itip_strip_mailto (e_meeting_attendee_get_address (attendee)));
+ g_hash_table_remove (
+ priv->refresh_data, itip_strip_mailto (
+ e_meeting_attendee_get_address (attendee)));
g_mutex_unlock (priv->mutex);
g_ptr_array_free (qdata->call_backs, TRUE);
g_ptr_array_free (qdata->data, TRUE);
@@ -889,7 +916,9 @@ e_meeting_store_remove_all_attendees (EMeetingStore *store)
}
EMeetingAttendee *
-e_meeting_store_find_attendee (EMeetingStore *store, const gchar *address, gint *row)
+e_meeting_store_find_attendee (EMeetingStore *store,
+ const gchar *address,
+ gint *row)
{
EMeetingAttendee *attendee;
gint i;
@@ -903,7 +932,9 @@ e_meeting_store_find_attendee (EMeetingStore *store, const gchar *address, gint
attendee = g_ptr_array_index (store->priv->attendees, i);
attendee_address = e_meeting_attendee_get_address (attendee);
- if (attendee_address && !g_ascii_strcasecmp (itip_strip_mailto (attendee_address), itip_strip_mailto (address))) {
+ if (attendee_address && !g_ascii_strcasecmp (
+ itip_strip_mailto (attendee_address),
+ itip_strip_mailto (address))) {
if (row != NULL)
*row = i;
@@ -1229,7 +1260,9 @@ freebusy_async (gpointer data)
we should be able to get free busy asynchronously */
g_static_mutex_lock (&mutex);
priv->num_queries++;
- e_cal_get_free_busy (fbd->client, fbd->users, fbd->startt, fbd->endt, &(fbd->fb_data), NULL);
+ e_cal_get_free_busy (
+ fbd->client, fbd->users, fbd->startt,
+ fbd->endt, &(fbd->fb_data), NULL);
priv->num_queries--;
g_static_mutex_unlock (&mutex);
@@ -1311,7 +1344,9 @@ refresh_busy_periods (gpointer data)
attendee = g_ptr_array_index (priv->refresh_queue, i);
g_return_val_if_fail (attendee != NULL, FALSE);
- qdata = g_hash_table_lookup (priv->refresh_data, itip_strip_mailto (e_meeting_attendee_get_address (attendee)));
+ qdata = g_hash_table_lookup (
+ priv->refresh_data, itip_strip_mailto (
+ e_meeting_attendee_get_address (attendee)));
if (!qdata)
continue;
@@ -1403,7 +1438,8 @@ refresh_queue_add (EMeetingStore *store, gint row,
priv = store->priv;
attendee = g_ptr_array_index (priv->attendees, row);
- if ((attendee == NULL) || !strcmp (itip_strip_mailto (e_meeting_attendee_get_address (attendee)), ""))
+ if ((attendee == NULL) || !strcmp (itip_strip_mailto (
+ e_meeting_attendee_get_address (attendee)), ""))
return;
/* check the queue if the attendee is already in there*/
@@ -1411,12 +1447,16 @@ refresh_queue_add (EMeetingStore *store, gint row,
if (attendee == g_ptr_array_index (priv->refresh_queue, i))
return;
- if (!strcmp (e_meeting_attendee_get_address (attendee), e_meeting_attendee_get_address (g_ptr_array_index (priv->refresh_queue, i))))
+ if (!strcmp (e_meeting_attendee_get_address (attendee),
+ e_meeting_attendee_get_address (
+ g_ptr_array_index (priv->refresh_queue, i))))
return;
}
g_mutex_lock (priv->mutex);
- qdata = g_hash_table_lookup (priv->refresh_data, itip_strip_mailto (e_meeting_attendee_get_address (attendee)));
+ qdata = g_hash_table_lookup (
+ priv->refresh_data, itip_strip_mailto (
+ e_meeting_attendee_get_address (attendee)));
if (qdata == NULL) {
qdata = g_new0 (EMeetingStoreQueueData, 1);
@@ -1434,7 +1474,9 @@ refresh_queue_add (EMeetingStore *store, gint row,
g_ptr_array_add (qdata->call_backs, call_back);
g_ptr_array_add (qdata->data, data);
- g_hash_table_insert (priv->refresh_data, (gpointer)itip_strip_mailto (e_meeting_attendee_get_address (attendee)), qdata);
+ g_hash_table_insert (
+ priv->refresh_data, (gpointer) itip_strip_mailto (
+ e_meeting_attendee_get_address (attendee)), qdata);
} else {
if (e_meeting_time_compare_times (start, &qdata->start) == -1)
qdata->start = *start;
@@ -1486,7 +1528,9 @@ async_read (GObject *source_object, GAsyncResult *res, gpointer data)
qdata->buffer[read] = '\0';
qdata->string = g_string_append (qdata->string, qdata->buffer);
- g_input_stream_read_async (istream, qdata->buffer, BUF_SIZE - 1, G_PRIORITY_DEFAULT, NULL, async_read, qdata);
+ g_input_stream_read_async (
+ istream, qdata->buffer, BUF_SIZE - 1,
+ G_PRIORITY_DEFAULT, NULL, async_read, qdata);
}
}
@@ -1518,7 +1562,9 @@ start_async_read (const gchar *uri, gpointer data)
if (!istream)
process_callbacks (qdata);
else
- g_input_stream_read_async (istream, qdata->buffer, BUF_SIZE - 1, G_PRIORITY_DEFAULT, NULL, async_read, qdata);
+ g_input_stream_read_async (
+ istream, qdata->buffer, BUF_SIZE - 1,
+ G_PRIORITY_DEFAULT, NULL, async_read, qdata);
}
void
diff --git a/calendar/gui/e-week-view-layout.c b/calendar/gui/e-week-view-layout.c
index 8962d81610..7863791e25 100644
--- a/calendar/gui/e-week-view-layout.c
+++ b/calendar/gui/e-week-view-layout.c
@@ -348,7 +348,7 @@ e_week_view_layout_get_day_position (gint day,
edge = 3;
if (wk (0) + wk (1) + wk (2) < wk (3) + wk (4) + wk (5) + wk (6))
- edge ++;
+ edge++;
if (day < edge) {
*day_x = 0;
@@ -375,10 +375,10 @@ e_week_view_layout_get_day_position (gint day,
if (wd > 6) { /* too many rows, make last shorter */
arr [i - m] --;
- wd --;
+ wd--;
} else if (wd < 6) { /* free rows left, enlarge those bigger */
arr [i - m] ++;
- wd ++;
+ wd++;
}
if (wd == 6)
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index db6d861c28..c842e30377 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -2309,8 +2309,8 @@ e_week_view_get_day_position (EWeekView *week_view,
while (cell_h > 1) {
*day_h += week_view->row_heights[cell_y + 1];
- cell_h --;
- cell_y ++;
+ cell_h--;
+ cell_y++;
}
}
@@ -2633,7 +2633,7 @@ e_week_view_convert_position_to_day (EWeekView *week_view,
} else {
week = 0;
- for (day = 0; day < 7; day ++) {
+ for (day = 0; day < 7; day++) {
gint day_x = 0, day_y = 0, rows = 0;
e_week_view_layout_get_day_position (day, FALSE, 1, week_view->display_start_day, week_view->compress_weekend,
&day_x, &day_y, &rows);
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 5ecbf0a157..29b92cb8c6 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -808,11 +808,17 @@ dn_e_cal_view_objects_removed_cb (ECalView *query, GList *ids, gpointer data)
/* Callback used when the calendar query is done */
static void
-dn_e_cal_view_complete_cb (ECalView *query, ECalendarStatus status, const gchar *error_msg, gpointer data)
+dn_e_cal_view_complete_cb (ECalView *query,
+ ECalendarStatus status,
+ const gchar *error_msg,
+ gpointer data)
{
/* FIXME Better error reporting */
if (status != E_CALENDAR_STATUS_OK)
- g_warning (G_STRLOC ": Query did not successfully complete, code:%d (%s)", status, error_msg ? error_msg : "Unknown error");
+ g_warning (
+ G_STRLOC ": Query did not successfully complete, "
+ "code: %d (%s)", status, error_msg ? error_msg :
+ "Unknown error");
}
ECalendarView *
diff --git a/calendar/gui/goto.c b/calendar/gui/goto.c
index 569c15f38f..fdb22641a6 100644
--- a/calendar/gui/goto.c
+++ b/calendar/gui/goto.c
@@ -85,9 +85,8 @@ ecal_date_range_changed (ECalendarItem *calitem, gpointer user_data)
tag_calendar_by_client (dlg->ecal, client);
}
-/* Event handler for day groups in the month item. A button press makes the calendar jump to the
- * selected day and destroys the Go-to dialog box.
- */
+/* Event handler for day groups in the month item. A button press makes
+ * the calendar jump to the selected day and destroys the Go-to dialog box. */
static void
ecal_event (ECalendarItem *calitem, gpointer user_data)
{
@@ -193,13 +192,21 @@ goto_dialog_init_widgets (GoToDialog *dlg)
{
GtkAdjustment *adj;
- g_signal_connect (dlg->month_combobox, "changed", G_CALLBACK (month_changed), dlg);
+ g_signal_connect (
+ dlg->month_combobox, "changed",
+ G_CALLBACK (month_changed), dlg);
adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (dlg->year));
- g_signal_connect (adj, "value_changed", G_CALLBACK (year_changed), dlg);
-
- g_signal_connect (dlg->ecal->calitem, "date_range_changed", G_CALLBACK (ecal_date_range_changed), dlg);
- g_signal_connect (dlg->ecal->calitem, "selection_changed", G_CALLBACK (ecal_event), dlg);
+ g_signal_connect (
+ adj, "value_changed",
+ G_CALLBACK (year_changed), dlg);
+
+ g_signal_connect (
+ dlg->ecal->calitem, "date_range_changed",
+ G_CALLBACK (ecal_date_range_changed), dlg);
+ g_signal_connect (
+ dlg->ecal->calitem, "selection_changed",
+ G_CALLBACK (ecal_event), dlg);
}
/* Creates a "goto date" dialog and runs it */
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index ab2f784c33..1371f2d516 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -848,7 +848,7 @@ print_day_background (GtkPrintContext *context, GnomeCalendar *gcal,
cairo_line_to (cr, right, y - yinc / 2);
cairo_set_line_width (cr, 1);
cairo_stroke (cr);
- row ++;
+ row++;
}
pango_font_description_free (font_hour);
@@ -2780,7 +2780,7 @@ print_comp_draw_real (GtkPrintOperation *operation,
&page_start, &pages);
if (next_line) {
- next_line ++;
+ next_line++;
if (!*next_line)
next_line = NULL;
}