aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/alarm-dialog.c15
-rw-r--r--calendar/gui/dialogs/changed-comp.c17
-rw-r--r--calendar/gui/dialogs/comp-editor-page.c26
-rw-r--r--calendar/gui/dialogs/comp-editor.c96
-rw-r--r--calendar/gui/dialogs/delete-comp.c10
-rw-r--r--calendar/gui/dialogs/delete-error.c7
-rw-r--r--calendar/gui/dialogs/e-delegate-dialog.c5
-rw-r--r--calendar/gui/dialogs/e-send-options-utils.c6
-rw-r--r--calendar/gui/dialogs/event-editor.c4
-rw-r--r--calendar/gui/dialogs/event-page.c289
-rw-r--r--calendar/gui/dialogs/goto-dialog.c14
-rw-r--r--calendar/gui/dialogs/memo-page.c54
-rw-r--r--calendar/gui/dialogs/recurrence-page.c247
-rw-r--r--calendar/gui/dialogs/schedule-page.c95
-rw-r--r--calendar/gui/dialogs/send-comp.c10
-rw-r--r--calendar/gui/dialogs/task-details-page.c73
-rw-r--r--calendar/gui/dialogs/task-page.c130
17 files changed, 637 insertions, 461 deletions
diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c
index d6fb07e91a..dda1d8548b 100644
--- a/calendar/gui/dialogs/alarm-dialog.c
+++ b/calendar/gui/dialogs/alarm-dialog.c
@@ -532,7 +532,7 @@ alarm_to_malarm_widgets (Dialog *dialog,
e_destination_set_email (dest, a->value);
}
e_destination_store_append_destination (destination_store, dest);
- g_object_unref (G_OBJECT (dest));
+ g_object_unref (dest);
}
e_cal_component_free_attendee_list (attendee_list);
}
@@ -620,11 +620,11 @@ populate_widgets_from_alarm (Dialog *dialog)
action = g_new0 (ECalComponentAlarmAction, 1);
e_cal_component_alarm_get_action (dialog->alarm, action);
- g_return_if_fail ( action != NULL );
+ g_return_if_fail (action != NULL);
trigger = g_new0 (ECalComponentAlarmTrigger, 1);
e_cal_component_alarm_get_trigger (dialog->alarm, trigger);
- g_return_if_fail ( trigger != NULL );
+ g_return_if_fail (trigger != NULL);
if (*action == E_CAL_COMPONENT_ALARM_NONE)
return;
@@ -842,10 +842,11 @@ get_widgets (Dialog *dialog)
cell = gtk_cell_renderer_text_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), cell, TRUE);
- gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), cell,
- "text", 0,
- "sensitive", 1,
- NULL);
+ gtk_cell_layout_set_attributes (
+ GTK_CELL_LAYOUT (combo), cell,
+ "text", 0,
+ "sensitive", 1,
+ NULL);
for (i = 0; i < G_N_ELEMENTS (actions); i++) {
GtkTreeIter iter;
diff --git a/calendar/gui/dialogs/changed-comp.c b/calendar/gui/dialogs/changed-comp.c
index f8a98c9908..fdbc228ae2 100644
--- a/calendar/gui/dialogs/changed-comp.c
+++ b/calendar/gui/dialogs/changed-comp.c
@@ -69,8 +69,9 @@ changed_component_dialog (GtkWindow *parent,
break;
default:
- g_message ("changed_component_dialog(): "
- "Cannot handle object of type %d", vtype);
+ g_message (
+ "changed_component_dialog(): "
+ "Cannot handle object of type %d", vtype);
return FALSE;
}
if (changed)
@@ -93,8 +94,9 @@ changed_component_dialog (GtkWindow *parent,
break;
default:
- g_message ("changed_component_dialog(): "
- "Cannot handle object of type %d", vtype);
+ g_message (
+ "changed_component_dialog(): "
+ "Cannot handle object of type %d", vtype);
return FALSE;
}
if (changed)
@@ -103,9 +105,10 @@ changed_component_dialog (GtkWindow *parent,
str = g_strdup_printf (_("%s You have made no changes, update the editor?"), str);
}
- dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_YES_NO, "%s", str);
+ dialog = gtk_message_dialog_new (
+ parent, GTK_DIALOG_MODAL,
+ GTK_MESSAGE_QUESTION,
+ GTK_BUTTONS_YES_NO, "%s", str);
gtk_window_set_icon_name (GTK_WINDOW (dialog), "x-office-calendar");
diff --git a/calendar/gui/dialogs/comp-editor-page.c b/calendar/gui/dialogs/comp-editor-page.c
index 356d4d78b2..3a6d67107b 100644
--- a/calendar/gui/dialogs/comp-editor-page.c
+++ b/calendar/gui/dialogs/comp-editor-page.c
@@ -154,14 +154,15 @@ comp_editor_page_class_init (CompEditorPageClass *class)
FALSE,
G_PARAM_READWRITE));
- comp_editor_page_signals[DATES_CHANGED] =
- g_signal_new ("dates_changed",
- G_TYPE_FROM_CLASS (class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (CompEditorPageClass, dates_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
+ comp_editor_page_signals[DATES_CHANGED] = g_signal_new (
+ "dates_changed",
+ G_TYPE_FROM_CLASS (class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (CompEditorPageClass, dates_changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1,
+ G_TYPE_POINTER);
}
static void
@@ -222,7 +223,7 @@ comp_editor_page_set_updating (CompEditorPage *page,
{
g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
- if ((page->priv->updating ? 1 : 0) == (updating ? 1 : 0))
+ if (page->priv->updating == updating)
return;
page->priv->updating = updating;
@@ -406,9 +407,10 @@ comp_editor_page_notify_dates_changed (CompEditorPage *page,
{
g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
- g_signal_emit (page,
- comp_editor_page_signals[DATES_CHANGED], 0,
- dates);
+ g_signal_emit (
+ page,
+ comp_editor_page_signals[DATES_CHANGED], 0,
+ dates);
}
/**
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 78505c2428..4eaf1bce75 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -500,10 +500,11 @@ save_comp (CompEditor *editor)
/* Stop listening because we are about to change things */
if (priv->view) {
- g_signal_handlers_disconnect_matched (G_OBJECT (priv->view),
- G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL,
- editor);
+ g_signal_handlers_disconnect_matched (
+ priv->view,
+ G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL,
+ editor);
g_object_unref (priv->view);
priv->view = NULL;
@@ -949,15 +950,17 @@ save_and_close_editor (CompEditor *editor,
ECalComponentVType vtype = e_cal_component_get_vtype (editor->priv->comp);
if (vtype == E_CAL_COMPONENT_EVENT)
- response = em_utils_prompt_user ((GtkWindow *) widget,
- NULL,
- "calendar:ask-send-event-pending-download",
- NULL);
+ 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);
+ response = em_utils_prompt_user (
+ (GtkWindow *) widget,
+ NULL,
+ "calendar:ask-send-task-pending-download",
+ NULL);
#endif
if (!response)
return;
@@ -1602,7 +1605,7 @@ comp_editor_dispose (GObject *object)
if (priv->view) {
g_signal_handlers_disconnect_matched (
- G_OBJECT (priv->view), G_SIGNAL_MATCH_DATA,
+ priv->view, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, object);
g_object_unref (priv->view);
priv->view = NULL;
@@ -1614,7 +1617,7 @@ comp_editor_dispose (GObject *object)
store = e_attachment_view_get_store (
E_ATTACHMENT_VIEW (priv->attachment_view));
g_signal_handlers_disconnect_matched (
- G_OBJECT (store), G_SIGNAL_MATCH_DATA,
+ store, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, object);
g_object_unref (priv->attachment_view);
priv->attachment_view = NULL;
@@ -1672,28 +1675,40 @@ comp_editor_bind_settings (CompEditor *editor)
g_return_if_fail (editor != NULL);
action = comp_editor_get_action (editor, "view-categories");
- g_settings_bind (editor->priv->calendar_settings, "editor-show-categories",
- G_OBJECT (action), "active", G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (
+ editor->priv->calendar_settings, "editor-show-categories",
+ action, "active",
+ G_SETTINGS_BIND_DEFAULT);
action = comp_editor_get_action (editor, "view-role");
- g_settings_bind (editor->priv->calendar_settings, "editor-show-role",
- G_OBJECT (action), "active", G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (
+ editor->priv->calendar_settings, "editor-show-role",
+ action, "active",
+ G_SETTINGS_BIND_DEFAULT);
action = comp_editor_get_action (editor, "view-rsvp");
- g_settings_bind (editor->priv->calendar_settings, "editor-show-rsvp",
- G_OBJECT (action), "active", G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (
+ editor->priv->calendar_settings, "editor-show-rsvp",
+ action, "active",
+ G_SETTINGS_BIND_DEFAULT);
action = comp_editor_get_action (editor, "view-status");
- g_settings_bind (editor->priv->calendar_settings, "editor-show-status",
- G_OBJECT (action), "active", G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (
+ editor->priv->calendar_settings, "editor-show-status",
+ action, "active",
+ G_SETTINGS_BIND_DEFAULT);
action = comp_editor_get_action (editor, "view-time-zone");
- g_settings_bind (editor->priv->calendar_settings, "editor-show-timezone",
- G_OBJECT (action), "active", G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (
+ editor->priv->calendar_settings, "editor-show-timezone",
+ action, "active",
+ G_SETTINGS_BIND_DEFAULT);
action = comp_editor_get_action (editor, "view-type");
- g_settings_bind (editor->priv->calendar_settings, "editor-show-type",
- G_OBJECT (action), "active", G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (
+ editor->priv->calendar_settings, "editor-show-type",
+ action, "active",
+ G_SETTINGS_BIND_DEFAULT);
}
static gboolean
@@ -2327,8 +2342,9 @@ close_dialog (CompEditor *editor)
* calls happen during destruction and we might get a change
* notification back when we are in an inconsistent state */
if (priv->view)
- g_signal_handlers_disconnect_matched (G_OBJECT (priv->view),
- G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, editor);
+ g_signal_handlers_disconnect_matched (
+ priv->view, G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL, editor);
gtk_widget_destroy (GTK_WIDGET (editor));
}
@@ -2461,7 +2477,7 @@ comp_editor_set_summary (CompEditor *editor,
e_notice (
editor->priv->notebook, GTK_MESSAGE_INFO,
_("Changes made to this item may be "
- "discarded if an update arrives"));
+ "discarded if an update arrives"));
editor->priv->warned = TRUE;
}
@@ -2514,7 +2530,7 @@ comp_editor_set_use_24_hour_format (CompEditor *editor,
{
g_return_if_fail (IS_COMP_EDITOR (editor));
- if ((editor->priv->use_24_hour_format ? 1 : 0) == (use_24_hour_format ? 1 : 0))
+ if (editor->priv->use_24_hour_format == use_24_hour_format)
return;
editor->priv->use_24_hour_format = use_24_hour_format;
@@ -2627,10 +2643,10 @@ comp_editor_set_changed (CompEditor *editor,
g_return_if_fail (IS_COMP_EDITOR (editor));
/* always process below changes, because other parts of
- the editor listen for 'changed' notifications to update
- its widgets, thus do it even the value actually didn't change
+ * the editor listen for 'changed' notifications to update
+ * its widgets, thus do it even the value actually didn't change
*/
- if ((editor->priv->changed ? 1 : 0) != (changed ? 1 : 0)) {
+ if (editor->priv->changed != changed) {
editor->priv->changed = changed;
action = comp_editor_get_action (editor, "save");
@@ -2648,7 +2664,7 @@ comp_editor_set_changed (CompEditor *editor,
e_notice (
editor->priv->notebook, GTK_MESSAGE_INFO,
_("Changes made to this item may be "
- "discarded if an update arrives"));
+ "discarded if an update arrives"));
editor->priv->warned = TRUE;
}
@@ -2814,8 +2830,9 @@ page_mapped_cb (GtkWidget *page_widget,
return;
if (page->accel_group) {
- gtk_window_add_accel_group (GTK_WINDOW (toplevel),
- page->accel_group);
+ gtk_window_add_accel_group (
+ GTK_WINDOW (toplevel),
+ page->accel_group);
}
}
@@ -3353,8 +3370,9 @@ real_send_comp (CompEditor *editor,
}
if (!e_cal_component_has_attachments (priv->comp) ||
- e_client_check_capability (E_CLIENT (priv->cal_client),
- CAL_STATIC_CAPABILITY_CREATE_MESSAGES)) {
+ e_client_check_capability (
+ E_CLIENT (priv->cal_client),
+ CAL_STATIC_CAPABILITY_CREATE_MESSAGES)) {
if (itip_send_comp (
registry, method, send_comp, priv->cal_client,
NULL, NULL, users, strip_alarms,
@@ -3652,7 +3670,7 @@ page_dates_changed_cb (CompEditor *editor,
e_notice (
priv->notebook, GTK_MESSAGE_INFO,
_("Changes made to this item may be discarded "
- "if an update arrives"));
+ "if an update arrives"));
priv->warned = TRUE;
}
}
diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c
index d082551344..93e2df0d91 100644
--- a/calendar/gui/dialogs/delete-comp.c
+++ b/calendar/gui/dialogs/delete-comp.c
@@ -115,8 +115,9 @@ delete_component_dialog (ECalComponent *comp,
break;
default:
- g_message ("delete_component_dialog(): Cannot handle object of type %d",
- vtype);
+ g_message (
+ "delete_component_dialog(): Cannot handle object of type %d",
+ vtype);
g_free (arg0);
return FALSE;
}
@@ -144,8 +145,9 @@ delete_component_dialog (ECalComponent *comp,
break;
default:
- g_message ("delete_component_dialog(): Cannot handle objects of type %d",
- vtype);
+ g_message (
+ "delete_component_dialog(): Cannot handle objects of type %d",
+ vtype);
return FALSE;
}
diff --git a/calendar/gui/dialogs/delete-error.c b/calendar/gui/dialogs/delete-error.c
index 7dc53253fa..313bcea82f 100644
--- a/calendar/gui/dialogs/delete-error.c
+++ b/calendar/gui/dialogs/delete-error.c
@@ -109,9 +109,10 @@ delete_error_dialog (const GError *error,
return;
}
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK, str, error->message);
+ dialog = gtk_message_dialog_new (
+ NULL, GTK_DIALOG_MODAL,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_OK, str, error->message);
if (vtype == E_CAL_COMPONENT_EVENT)
icon_name = "x-office-calendar";
else if (vtype == E_CAL_COMPONENT_TODO)
diff --git a/calendar/gui/dialogs/e-delegate-dialog.c b/calendar/gui/dialogs/e-delegate-dialog.c
index a7016a4cdd..9ae253dc00 100644
--- a/calendar/gui/dialogs/e-delegate-dialog.c
+++ b/calendar/gui/dialogs/e-delegate-dialog.c
@@ -186,8 +186,9 @@ addressbook_clicked_cb (GtkWidget *widget,
{
EDelegateDialog *edd = data;
- e_name_selector_show_dialog (edd->priv->name_selector,
- e_delegate_dialog_get_toplevel (edd));
+ e_name_selector_show_dialog (
+ edd->priv->name_selector,
+ e_delegate_dialog_get_toplevel (edd));
}
static void
diff --git a/calendar/gui/dialogs/e-send-options-utils.c b/calendar/gui/dialogs/e-send-options-utils.c
index 6f3d4034ab..8157e10fab 100644
--- a/calendar/gui/dialogs/e-send-options-utils.c
+++ b/calendar/gui/dialogs/e-send-options-utils.c
@@ -194,13 +194,13 @@ e_send_options_utils_fill_component (ESendOptionsDialog *sod,
if (gopts->reply_convenient)
prop = icalproperty_new_x ("convenient");
else
- prop = icalproperty_new_x ((const gchar *) g_strdup_printf ( "%d", gopts->reply_within));
+ prop = icalproperty_new_x ((const gchar *) g_strdup_printf ("%d", gopts->reply_within));
icalproperty_set_x_name (prop, "X-EVOLUTION-OPTIONS-REPLY");
icalcomponent_add_property (icalcomp, prop);
}
if (gopts->expiration_enabled && gopts->expire_after) {
- prop = icalproperty_new_x ((const gchar *) g_strdup_printf ( "%d", gopts->expire_after));
+ prop = icalproperty_new_x ((const gchar *) g_strdup_printf ("%d", gopts->expire_after));
icalproperty_set_x_name (prop, "X-EVOLUTION-OPTIONS-EXPIRE");
icalcomponent_add_property (icalcomp, prop);
}
@@ -220,7 +220,7 @@ e_send_options_utils_fill_component (ESendOptionsDialog *sod,
}
if (sopts->tracking_enabled)
- prop = icalproperty_new_x ((const gchar *) g_strdup_printf ( "%d", sopts->track_when));
+ prop = icalproperty_new_x ((const gchar *) g_strdup_printf ("%d", sopts->track_when));
else
prop = icalproperty_new_x ("0");
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 1460ff47db..0681aa4ed7 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -664,8 +664,8 @@ event_editor_edit_comp (CompEditor *editor,
EMeetingAttendee *ia;
gboolean addresses_match;
- addresses_match =
- g_str_equal (user_email,
+ addresses_match = g_str_equal (
+ user_email,
itip_strip_mailto (ca->value));
if (delegate && !addresses_match)
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index f590b9f37f..cb4698fcf3 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -204,10 +204,10 @@ static void notify_dates_changed (EventPage *epage, struct icaltimetype *start_t
static gboolean check_start_before_end (struct icaltimetype *start_tt, icaltimezone *start_zone,
struct icaltimetype *end_tt, icaltimezone *end_zone, gboolean adjust_end_time);
static void set_attendees (ECalComponent *comp, const GPtrArray *attendees);
-static void hour_sel_changed ( GtkSpinButton *widget, EventPage *epage);
-static void minute_sel_changed ( GtkSpinButton *widget, EventPage *epage);
-static void hour_minute_changed ( EventPage *epage);
-static void update_end_time_combo ( EventPage *epage);
+static void hour_sel_changed (GtkSpinButton *widget, EventPage *epage);
+static void minute_sel_changed (GtkSpinButton *widget, EventPage *epage);
+static void hour_minute_changed (EventPage *epage);
+static void update_end_time_combo (EventPage *epage);
static void event_page_select_organizer (EventPage *epage, const gchar *backend_address);
static void set_subscriber_info_string (EventPage *epage, const gchar *backend_address);
@@ -755,11 +755,17 @@ update_time (EventPage *epage,
if (!start_zone) {
/* FIXME: Handle error better. */
GError *error = NULL;
- if (!e_cal_client_get_timezone_sync (client, start_date->tzid, &start_zone, NULL, &error)) {
- g_warning ("Couldn't get timezone '%s' from server: %s",
- start_date->tzid ? start_date->tzid : "", error ? error->message : "Unknown error");
- if (error)
- g_error_free (error);
+
+ e_cal_client_get_timezone_sync (
+ client, start_date->tzid,
+ &start_zone, NULL, &error);
+
+ if (error != NULL) {
+ g_warning (
+ "Couldn't get timezone '%s' from server: %s",
+ start_date->tzid ? start_date->tzid : "",
+ error->message);
+ g_error_free (error);
}
}
}
@@ -1167,11 +1173,13 @@ event_page_fill_widgets (CompEditorPage *page,
ECalComponentText *dtext;
dtext = l->data;
- gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)),
- dtext->value ? dtext->value : "", -1);
+ gtk_text_buffer_set_text (
+ gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)),
+ dtext->value ? dtext->value : "", -1);
} else {
- gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)),
- "", 0);
+ gtk_text_buffer_set_text (
+ gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)),
+ "", 0);
}
e_cal_component_free_text_list (l);
e_buffer_tagger_update_tags (GTK_TEXT_VIEW (priv->description));
@@ -1216,7 +1224,7 @@ event_page_fill_widgets (CompEditorPage *page,
if (e_client_check_capability (E_CLIENT (client), CAL_STATIC_CAPABILITY_NO_ORGANIZER) && (flags & COMP_EDITOR_DELEGATE))
string = g_strdup (backend_addr);
- else if ( organizer.cn != NULL)
+ else if (organizer.cn != NULL)
string = g_strdup_printf ("%s <%s>", organizer.cn, strip);
else
string = g_strdup (strip);
@@ -1477,20 +1485,22 @@ event_page_fill_component (CompEditorPage *page,
comp_editor_page_display_validation_error (page, _("Start date is wrong"), priv->start_time);
return FALSE;
}
- start_date_set = e_date_edit_get_date (E_DATE_EDIT (priv->start_time),
- &start_tt.year,
- &start_tt.month,
- &start_tt.day);
+ start_date_set = e_date_edit_get_date (
+ E_DATE_EDIT (priv->start_time),
+ &start_tt.year,
+ &start_tt.month,
+ &start_tt.day);
g_return_val_if_fail (start_date_set, FALSE);
if (!e_date_edit_date_is_valid (E_DATE_EDIT (priv->end_time))) {
comp_editor_page_display_validation_error (page, _("End date is wrong"), priv->end_time);
return FALSE;
}
- end_date_set = e_date_edit_get_date (E_DATE_EDIT (priv->end_time),
- &end_tt.year,
- &end_tt.month,
- &end_tt.day);
+ end_date_set = e_date_edit_get_date (
+ E_DATE_EDIT (priv->end_time),
+ &end_tt.year,
+ &end_tt.month,
+ &end_tt.day);
g_return_val_if_fail (end_date_set, FALSE);
/* If the all_day toggle is set, we use DATE values for DTSTART and
@@ -1510,16 +1520,18 @@ event_page_fill_component (CompEditorPage *page,
comp_editor_page_display_validation_error (page, _("Start time is wrong"), priv->start_time);
return FALSE;
}
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->start_time),
- &start_tt.hour,
- &start_tt.minute);
+ e_date_edit_get_time_of_day (
+ E_DATE_EDIT (priv->start_time),
+ &start_tt.hour,
+ &start_tt.minute);
if (!e_date_edit_time_is_valid (E_DATE_EDIT (priv->end_time))) {
comp_editor_page_display_validation_error (page, _("End time is wrong"), priv->end_time);
return FALSE;
}
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->end_time),
- &end_tt.hour,
- &end_tt.minute);
+ e_date_edit_get_time_of_day (
+ E_DATE_EDIT (priv->end_time),
+ &end_tt.hour,
+ &end_tt.minute);
start_zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->start_timezone));
start_date.tzid = icaltimezone_get_tzid (start_zone);
end_date.tzid = icaltimezone_get_tzid (start_zone);
@@ -1710,8 +1722,9 @@ event_page_fill_component (CompEditorPage *page,
}
if (e_meeting_store_count_actual_attendees (priv->meeting_store) < 1) {
- e_notice (priv->main, GTK_MESSAGE_ERROR,
- _("At least one attendee is required."));
+ e_notice (
+ priv->main, GTK_MESSAGE_ERROR,
+ _("At least one attendee is required."));
return FALSE;
}
@@ -1941,7 +1954,7 @@ time_sel_changed (GtkComboBox *combo,
gtk_widget_show (priv->time_hour);
gtk_widget_hide (priv->end_time);
- update_end_time_combo ( epage);
+ update_end_time_combo (epage);
}
}
@@ -1956,27 +1969,31 @@ void update_end_time_combo (EventPage *epage)
priv = epage->priv;
- e_date_edit_get_date (E_DATE_EDIT (priv->start_time),
- &start_tt.year,
- &start_tt.month,
- &start_tt.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->start_time),
- &start_tt.hour,
- &start_tt.minute);
- e_date_edit_get_date (E_DATE_EDIT (priv->end_time),
- &end_tt.year,
- &end_tt.month,
- &end_tt.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->end_time),
- &end_tt.hour,
- &end_tt.minute);
+ e_date_edit_get_date (
+ E_DATE_EDIT (priv->start_time),
+ &start_tt.year,
+ &start_tt.month,
+ &start_tt.day);
+ e_date_edit_get_time_of_day (
+ E_DATE_EDIT (priv->start_time),
+ &start_tt.hour,
+ &start_tt.minute);
+ e_date_edit_get_date (
+ E_DATE_EDIT (priv->end_time),
+ &end_tt.year,
+ &end_tt.month,
+ &end_tt.day);
+ e_date_edit_get_time_of_day (
+ E_DATE_EDIT (priv->end_time),
+ &end_tt.hour,
+ &end_tt.minute);
end_timet = icaltime_as_timet (end_tt);
start_timet = icaltime_as_timet (start_tt);
end_timet -= start_timet;
- hours = end_timet / ( 60 * 60 );
- minutes = (end_timet / 60) - ( hours * 60 );
+ hours = end_timet / (60 * 60);
+ minutes = (end_timet / 60) - (hours * 60);
gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->hour_selector), hours);
gtk_spin_button_set_value (GTK_SPIN_BUTTON (priv->minute_selector), minutes);
@@ -2030,25 +2047,28 @@ hour_minute_changed (EventPage *epage)
priv = epage->priv;
- e_date_edit_get_date (E_DATE_EDIT (priv->start_time),
- &end_tt.year,
- &end_tt.month,
- &end_tt.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->start_time),
- &end_tt.hour,
- &end_tt.minute);
+ e_date_edit_get_date (
+ E_DATE_EDIT (priv->start_time),
+ &end_tt.year,
+ &end_tt.month,
+ &end_tt.day);
+ e_date_edit_get_time_of_day (
+ E_DATE_EDIT (priv->start_time),
+ &end_tt.hour,
+ &end_tt.minute);
for_hours = gtk_spin_button_get_value (GTK_SPIN_BUTTON (priv->hour_selector));
for_minutes = gtk_spin_button_get_value (GTK_SPIN_BUTTON (priv->minute_selector));
icaltime_adjust (&end_tt, 0, for_hours, for_minutes, 0);
- e_date_edit_set_date_and_time_of_day (E_DATE_EDIT (priv->end_time),
- end_tt.year,
- end_tt.month,
- end_tt.day,
- end_tt.hour,
- end_tt.minute);
+ e_date_edit_set_date_and_time_of_day (
+ E_DATE_EDIT (priv->end_time),
+ end_tt.year,
+ end_tt.month,
+ end_tt.day,
+ end_tt.hour,
+ end_tt.minute);
}
static void
@@ -2205,7 +2225,7 @@ remove_clicked_cb (GtkButton *btn,
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->list_view));
model = GTK_TREE_MODEL (priv->meeting_store);
- if (!(paths = gtk_tree_selection_get_selected_rows (selection, &model ))) {
+ if (!(paths = gtk_tree_selection_get_selected_rows (selection, &model))) {
g_warning ("Could not get a selection to delete.");
return;
}
@@ -2354,22 +2374,26 @@ event_page_set_all_day_event (EventPage *epage,
e_date_edit_set_show_time (E_DATE_EDIT (priv->start_time), !all_day);
e_date_edit_set_show_time (E_DATE_EDIT (priv->end_time), !all_day);
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->start_time),
- &start_tt.year,
- &start_tt.month,
- &start_tt.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->start_time),
- &start_tt.hour,
- &start_tt.minute);
+ date_set = e_date_edit_get_date (
+ E_DATE_EDIT (priv->start_time),
+ &start_tt.year,
+ &start_tt.month,
+ &start_tt.day);
+ e_date_edit_get_time_of_day (
+ E_DATE_EDIT (priv->start_time),
+ &start_tt.hour,
+ &start_tt.minute);
g_return_if_fail (date_set);
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->end_time),
- &end_tt.year,
- &end_tt.month,
- &end_tt.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->end_time),
- &end_tt.hour,
- &end_tt.minute);
+ date_set = e_date_edit_get_date (
+ E_DATE_EDIT (priv->end_time),
+ &end_tt.year,
+ &end_tt.month,
+ &end_tt.day);
+ e_date_edit_get_time_of_day (
+ E_DATE_EDIT (priv->end_time),
+ &end_tt.hour,
+ &end_tt.minute);
g_return_if_fail (date_set);
/* TODO implement the for portion in end time selector */
@@ -2434,15 +2458,19 @@ event_page_set_all_day_event (EventPage *epage,
g_signal_handlers_block_matched (priv->start_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage);
g_signal_handlers_block_matched (priv->end_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage);
- e_date_edit_set_date (E_DATE_EDIT (priv->start_time), start_tt.year,
- start_tt.month, start_tt.day);
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->start_time),
- start_tt.hour, start_tt.minute);
+ e_date_edit_set_date (
+ E_DATE_EDIT (priv->start_time), start_tt.year,
+ start_tt.month, start_tt.day);
+ e_date_edit_set_time_of_day (
+ E_DATE_EDIT (priv->start_time),
+ start_tt.hour, start_tt.minute);
- e_date_edit_set_date (E_DATE_EDIT (priv->end_time), end_tt.year,
- end_tt.month, end_tt.day);
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->end_time),
- end_tt.hour, end_tt.minute);
+ e_date_edit_set_date (
+ E_DATE_EDIT (priv->end_time), end_tt.year,
+ end_tt.month, end_tt.day);
+ e_date_edit_set_time_of_day (
+ E_DATE_EDIT (priv->end_time),
+ end_tt.hour, end_tt.minute);
g_signal_handlers_unblock_matched (priv->start_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage);
g_signal_handlers_unblock_matched (priv->end_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage);
@@ -2651,7 +2679,7 @@ get_widgets (EventPage *epage)
&& priv->location
&& priv->start_time
&& priv->end_time
- && priv->description );
+ && priv->description);
}
static void
@@ -2734,14 +2762,16 @@ check_start_before_end (struct icaltimetype *start_tt,
/* Modify the end time, to be the start + 1 hour. */
*end_tt = *start_tt;
icaltime_adjust (end_tt, 0, 1, 0, 0);
- icaltimezone_convert_time (end_tt, start_zone,
- end_zone);
+ icaltimezone_convert_time (
+ end_tt, start_zone,
+ end_zone);
} else {
/* Modify the start time, to be the end - 1 hour. */
*start_tt = *end_tt;
icaltime_adjust (start_tt, 0, -1, 0, 0);
- icaltimezone_convert_time (start_tt, end_zone,
- start_zone);
+ icaltimezone_convert_time (
+ start_tt, end_zone,
+ start_zone);
}
return TRUE;
}
@@ -2777,16 +2807,18 @@ times_updated (EventPage *epage,
/* Fetch the start and end times and timezones from the widgets. */
all_day_event = priv->all_day_event;
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->start_time),
- &start_tt.year,
- &start_tt.month,
- &start_tt.day);
+ date_set = e_date_edit_get_date (
+ E_DATE_EDIT (priv->start_time),
+ &start_tt.year,
+ &start_tt.month,
+ &start_tt.day);
g_return_if_fail (date_set);
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->end_time),
- &end_tt.year,
- &end_tt.month,
- &end_tt.day);
+ date_set = e_date_edit_get_date (
+ E_DATE_EDIT (priv->end_time),
+ &end_tt.year,
+ &end_tt.month,
+ &end_tt.day);
g_return_if_fail (date_set);
if (all_day_event) {
@@ -2808,12 +2840,14 @@ times_updated (EventPage *epage,
} else {
/* For DATE-TIME events, we have to convert to the same
* timezone before comparing. */
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->start_time),
- &start_tt.hour,
- &start_tt.minute);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->end_time),
- &end_tt.hour,
- &end_tt.minute);
+ e_date_edit_get_time_of_day (
+ E_DATE_EDIT (priv->start_time),
+ &start_tt.hour,
+ &start_tt.minute);
+ e_date_edit_get_time_of_day (
+ E_DATE_EDIT (priv->end_time),
+ &end_tt.hour,
+ &end_tt.minute);
start_zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->start_timezone));
@@ -2829,20 +2863,24 @@ times_updated (EventPage *epage,
if (set_start_date) {
g_signal_handlers_block_matched (priv->start_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage);
- e_date_edit_set_date (E_DATE_EDIT (priv->start_time),
- start_tt.year, start_tt.month,
- start_tt.day);
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->start_time),
- start_tt.hour, start_tt.minute);
+ e_date_edit_set_date (
+ E_DATE_EDIT (priv->start_time),
+ start_tt.year, start_tt.month,
+ start_tt.day);
+ e_date_edit_set_time_of_day (
+ E_DATE_EDIT (priv->start_time),
+ start_tt.hour, start_tt.minute);
g_signal_handlers_unblock_matched (priv->start_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage);
}
if (set_end_date) {
g_signal_handlers_block_matched (priv->end_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage);
- e_date_edit_set_date (E_DATE_EDIT (priv->end_time),
- end_tt.year, end_tt.month, end_tt.day);
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->end_time),
- end_tt.hour, end_tt.minute);
+ e_date_edit_set_date (
+ E_DATE_EDIT (priv->end_time),
+ end_tt.year, end_tt.month, end_tt.day);
+ e_date_edit_set_time_of_day (
+ E_DATE_EDIT (priv->end_time),
+ end_tt.hour, end_tt.minute);
g_signal_handlers_unblock_matched (priv->end_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage);
}
@@ -3393,10 +3431,10 @@ init_widgets (EventPage *epage)
g_signal_connect (
priv->end_time_combo, "changed",
G_CALLBACK (time_sel_changed), epage);
- update_end_time_combo ( epage);
+ update_end_time_combo (epage);
/* Hour and Minute selector */
- gtk_spin_button_set_range ( (GtkSpinButton *) priv->hour_selector, 0, G_MAXINT);
+ gtk_spin_button_set_range ((GtkSpinButton *) priv->hour_selector, 0, G_MAXINT);
g_signal_connect (
priv->hour_selector, "value-changed",
G_CALLBACK (hour_sel_changed), epage);
@@ -3440,7 +3478,8 @@ init_widgets (EventPage *epage)
store = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (priv->alarm_time_combo)));
if (combo_label) {
gtk_list_store_append (store, &iter);
- gtk_list_store_set (store, &iter,
+ gtk_list_store_set (
+ store, &iter,
0, combo_label,
-1);
g_free (combo_label);
@@ -3450,12 +3489,14 @@ init_widgets (EventPage *epage)
}
gtk_list_store_append (store, &iter);
- gtk_list_store_set (store, &iter,
+ gtk_list_store_set (
+ store, &iter,
0, _("Customize"),
-1);
gtk_list_store_insert (store, &iter, 0);
- gtk_list_store_set (store, &iter,
+ gtk_list_store_set (
+ store, &iter,
/* Translators: "None" for "No reminder set" */
0, C_("cal-reminders", "None"),
-1);
@@ -3579,19 +3620,22 @@ event_page_construct (EventPage *epage,
e_load_ui_builder_definition (priv->builder, "event-page.ui");
if (!get_widgets (epage)) {
- g_message ("event_page_construct(): "
- "Could not find all widgets in the XML file!");
+ g_message (
+ "event_page_construct(): "
+ "Could not find all widgets in the XML file!");
return NULL;
}
/* Create entry completion and attach it to the entry */
priv->location_completion = gtk_entry_completion_new ();
- gtk_entry_set_completion (GTK_ENTRY (priv->location),
+ gtk_entry_set_completion (
+ GTK_ENTRY (priv->location),
priv->location_completion);
/* Initialize completino model */
list_store = gtk_list_store_new (1, G_TYPE_STRING);
- gtk_entry_completion_set_model (priv->location_completion,
+ gtk_entry_completion_set_model (
+ priv->location_completion,
GTK_TREE_MODEL (list_store));
gtk_entry_completion_set_text_column (priv->location_completion, 0);
@@ -3618,8 +3662,9 @@ event_page_construct (EventPage *epage,
G_CALLBACK (organizer_changed_cb), epage);
if (!init_widgets (epage)) {
- g_message ("event_page_construct(): "
- "Could not initialize the widgets!");
+ g_message (
+ "event_page_construct(): "
+ "Could not initialize the widgets!");
return NULL;
}
diff --git a/calendar/gui/dialogs/goto-dialog.c b/calendar/gui/dialogs/goto-dialog.c
index 4a77c87554..132438865c 100644
--- a/calendar/gui/dialogs/goto-dialog.c
+++ b/calendar/gui/dialogs/goto-dialog.c
@@ -164,17 +164,19 @@ create_ecal (GoToDialog *dlg)
dlg->ecal = E_CALENDAR (e_calendar_new ());
calitem = dlg->ecal->calitem;
- gnome_canvas_item_set (GNOME_CANVAS_ITEM (calitem),
- "move_selection_when_moving", FALSE,
- NULL);
+ gnome_canvas_item_set (
+ GNOME_CANVAS_ITEM (calitem),
+ "move_selection_when_moving", FALSE,
+ NULL);
e_calendar_item_set_display_popup (calitem, FALSE);
gtk_widget_show (GTK_WIDGET (dlg->ecal));
gtk_box_pack_start (GTK_BOX (dlg->vbox), GTK_WIDGET (dlg->ecal), TRUE, TRUE, 0);
e_calendar_item_set_first_month (calitem, dlg->year_val, dlg->month_val);
- e_calendar_item_set_get_time_callback (calitem,
- get_current_time,
- dlg, NULL);
+ e_calendar_item_set_get_time_callback (
+ calitem,
+ get_current_time,
+ dlg, NULL);
ecal_date_range_changed (calitem, dlg);
}
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index 57332a1e0c..01d3c9143c 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -300,11 +300,13 @@ memo_page_fill_widgets (CompEditorPage *page,
ECalComponentText *dtext;
dtext = l->data;
- gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->memo_content)),
- dtext->value ? dtext->value : "", -1);
+ gtk_text_buffer_set_text (
+ gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->memo_content)),
+ dtext->value ? dtext->value : "", -1);
} else {
- gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->memo_content)),
- "", 0);
+ gtk_text_buffer_set_text (
+ gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->memo_content)),
+ "", 0);
}
e_cal_component_free_text_list (l);
e_buffer_tagger_update_tags (GTK_TEXT_VIEW (priv->memo_content));
@@ -313,9 +315,10 @@ memo_page_fill_widgets (CompEditorPage *page,
e_cal_component_get_dtstart (comp, &d);
if (d.value) {
struct icaltimetype *start_tt = d.value;
- e_date_edit_set_date (E_DATE_EDIT (priv->start_date),
- start_tt->year, start_tt->month,
- start_tt->day);
+ e_date_edit_set_date (
+ E_DATE_EDIT (priv->start_date),
+ start_tt->year, start_tt->month,
+ start_tt->day);
} else if (!(flags & COMP_EDITOR_NEW_ITEM))
e_date_edit_set_time (E_DATE_EDIT (priv->start_date), -1);
e_cal_component_free_datetime (&d);
@@ -342,7 +345,7 @@ memo_page_fill_widgets (CompEditorPage *page,
const gchar *strip = itip_strip_mailto (organizer.value);
gchar *string;
- if ( organizer.cn != NULL)
+ if (organizer.cn != NULL)
string = g_strdup_printf ("%s <%s>", organizer.cn, strip);
else
string = g_strdup (strip);
@@ -536,8 +539,9 @@ fill_comp_with_recipients (ENameSelector *name_selector,
icalcomponent *icalcomp;
icalproperty *icalprop;
- e_name_selector_model_peek_section (name_selector_model, "To",
- NULL, &destination_store);
+ e_name_selector_model_peek_section (
+ name_selector_model, "To",
+ NULL, &destination_store);
destinations = e_destination_store_list_destinations (destination_store);
for (l = destinations; l; l = g_list_next (l)) {
@@ -581,8 +585,9 @@ fill_comp_with_recipients (ENameSelector *name_selector,
EContact *n_con = NULL;
gchar *query;
- query = g_strdup_printf ("(is \"full_name\" \"%s\")",
- (gchar *) e_contact_get (contact, E_CONTACT_FULL_NAME));
+ query = g_strdup_printf (
+ "(is \"full_name\" \"%s\")",
+ (gchar *) e_contact_get (contact, E_CONTACT_FULL_NAME));
if (!e_book_client_get_contacts_sync (book_client, query, &contacts, NULL, NULL)) {
g_warning ("Could not get contact from the book \n");
@@ -966,7 +971,7 @@ mpage_client_opened_cb (GObject *source_object,
editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (mpage));
priv = mpage->priv;
- if (error) {
+ if (error != NULL) {
GtkWidget *dialog;
ECalClient *old_client;
@@ -976,11 +981,12 @@ mpage_client_opened_cb (GObject *source_object,
E_SOURCE_COMBO_BOX (priv->source_combo_box),
e_client_get_source (E_CLIENT (old_client)));
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
- GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
- _("Unable to open memos in '%s': %s"),
- e_source_get_display_name (source),
- error ? error->message : _("Unknown error"));
+ dialog = gtk_message_dialog_new (
+ NULL, GTK_DIALOG_MODAL,
+ GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
+ _("Unable to open memos in '%s': %s"),
+ e_source_get_display_name (source),
+ error->message);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
@@ -1068,8 +1074,9 @@ static void
to_button_clicked_cb (GtkButton *button,
MemoPage *mpage)
{
- e_name_selector_show_dialog (mpage->priv->name_selector,
- mpage->priv->main);
+ e_name_selector_show_dialog (
+ mpage->priv->name_selector,
+ mpage->priv->main);
}
static void
@@ -1248,8 +1255,9 @@ memo_page_construct (MemoPage *mpage)
e_load_ui_builder_definition (priv->builder, "memo-page.ui");
if (!get_widgets (mpage)) {
- g_message ("memo_page_construct(): "
- "Could not find all widgets in the XML file!");
+ g_message (
+ "memo_page_construct(): "
+ "Could not find all widgets in the XML file!");
return NULL;
}
@@ -1295,7 +1303,7 @@ memo_page_construct (MemoPage *mpage)
if (!init_widgets (mpage)) {
g_message ("memo_page_construct(): "
- "Could not initialize the widgets!");
+ "Could not initialize the widgets!");
return NULL;
}
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index 64bbb946c5..d04d490b3d 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -267,8 +267,9 @@ preview_recur (RecurrencePage *rpage)
fill_component (rpage, comp);
- tag_calendar_by_comp (E_CALENDAR (priv->preview_calendar), comp,
- client, zone, TRUE, FALSE, FALSE, priv->cancellable);
+ tag_calendar_by_comp (
+ E_CALENDAR (priv->preview_calendar), comp,
+ client, zone, TRUE, FALSE, FALSE, priv->cancellable);
g_object_unref (comp);
}
@@ -440,18 +441,20 @@ clear_widgets (RecurrencePage *rpage)
g_signal_handlers_unblock_matched (adj, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
g_signal_handlers_block_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_combo_box_set (priv->interval_unit_combo,
- ICAL_DAILY_RECURRENCE,
- freq_map);
+ e_dialog_combo_box_set (
+ priv->interval_unit_combo,
+ ICAL_DAILY_RECURRENCE,
+ freq_map);
g_signal_handlers_unblock_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
priv->ending_date_tt = icaltime_today ();
priv->ending_count = 2;
g_signal_handlers_block_matched (priv->ending_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_combo_box_set (priv->ending_combo,
- priv->ending_count == -1 ? ENDING_FOREVER : ENDING_FOR,
- ending_types_map);
+ e_dialog_combo_box_set (
+ priv->ending_combo,
+ priv->ending_count == -1 ? ENDING_FOREVER : ENDING_FOR,
+ ending_types_map);
g_signal_handlers_unblock_matched (priv->ending_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
if (priv->ending_count == -1)
priv->ending_count = 2;
@@ -571,11 +574,13 @@ sensitize_recur_widgets (RecurrencePage *rpage)
gtk_widget_set_sensitive (priv->params, FALSE);
gtk_widget_hide (priv->params);
- label = gtk_label_new (_("This appointment contains "
- "recurrences that Evolution "
- "cannot edit."));
- gtk_container_add (GTK_CONTAINER (priv->custom_warning_bin),
- label);
+ label = gtk_label_new (
+ _("This appointment contains "
+ "recurrences that Evolution "
+ "cannot edit."));
+ gtk_container_add (
+ GTK_CONTAINER (priv->custom_warning_bin),
+ label);
gtk_widget_show_all (priv->custom_warning_bin);
} else if (recurs) {
gtk_widget_set_sensitive (priv->params, sens);
@@ -801,10 +806,12 @@ simple_recur_to_comp (RecurrencePage *rpage,
g_return_if_fail (priv->month_num_combo != NULL);
g_return_if_fail (GTK_IS_COMBO_BOX (priv->month_num_combo));
- month_num = e_dialog_combo_box_get (priv->month_num_combo,
- month_num_options_map );
- month_day = e_dialog_combo_box_get (priv->month_day_combo,
- month_day_options_map);
+ month_num = e_dialog_combo_box_get (
+ priv->month_num_combo,
+ month_num_options_map);
+ month_day = e_dialog_combo_box_get (
+ priv->month_day_combo,
+ month_day_options_map);
if (month_num == MONTH_NUM_LAST)
month_num = -1;
@@ -891,10 +898,11 @@ simple_recur_to_comp (RecurrencePage *rpage,
/* We only allow a DATE value to be set for the UNTIL property,
* since we don't support sub-day recurrences. */
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->ending_date_edit),
- &r.until.year,
- &r.until.month,
- &r.until.day);
+ date_set = e_date_edit_get_date (
+ E_DATE_EDIT (priv->ending_date_edit),
+ &r.until.year,
+ &r.until.month,
+ &r.until.day);
g_return_if_fail (date_set);
r.until.is_date = 1;
@@ -965,9 +973,10 @@ fill_component (RecurrencePage *rpage,
g_return_val_if_fail (dt != NULL, FALSE);
if (!icaltime_is_valid_time (*dt->value)) {
- comp_editor_page_display_validation_error (COMP_EDITOR_PAGE (rpage),
- _("Recurrence date is invalid"),
- priv->exception_list);
+ comp_editor_page_display_validation_error (
+ COMP_EDITOR_PAGE (rpage),
+ _("Recurrence date is invalid"),
+ priv->exception_list);
return FALSE;
}
@@ -1180,10 +1189,11 @@ make_recur_month_num_combo (gint month_index)
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), cell, TRUE);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), cell, "text", 0, NULL);
- gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combo),
- cell,
- only_leaf_sensitive,
- NULL, NULL);
+ gtk_cell_layout_set_cell_data_func (
+ GTK_CELL_LAYOUT (combo),
+ cell,
+ only_leaf_sensitive,
+ NULL, NULL);
return combo;
}
@@ -1229,8 +1239,9 @@ month_num_combo_changed_cb (GtkComboBox *combo,
priv = rpage->priv;
- month_day = e_dialog_combo_box_get (priv->month_day_combo,
- month_day_options_map);
+ month_day = e_dialog_combo_box_get (
+ priv->month_day_combo,
+ month_day_options_map);
if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (priv->month_num_combo), &iter)) {
gint value;
@@ -1264,13 +1275,15 @@ month_num_combo_changed_cb (GtkComboBox *combo,
}
if (month_num == MONTH_NUM_DAY && month_day != MONTH_DAY_NTH)
- e_dialog_combo_box_set (priv->month_day_combo,
- MONTH_DAY_NTH,
- month_day_options_map);
+ e_dialog_combo_box_set (
+ priv->month_day_combo,
+ MONTH_DAY_NTH,
+ month_day_options_map);
else if (month_num != MONTH_NUM_DAY && month_num != MONTH_NUM_LAST && month_day == MONTH_DAY_NTH)
- e_dialog_combo_box_set (priv->month_day_combo,
- MONTH_DAY_MON,
- month_num_options_map);
+ e_dialog_combo_box_set (
+ priv->month_day_combo,
+ MONTH_DAY_MON,
+ month_num_options_map);
comp_editor_page_changed (COMP_EDITOR_PAGE (rpage));
}
@@ -1289,18 +1302,22 @@ month_day_combo_changed_cb (GtkComboBox *combo,
priv = rpage->priv;
- month_num = e_dialog_combo_box_get (priv->month_num_combo,
- month_num_options_map);
- month_day = e_dialog_combo_box_get (priv->month_day_combo,
- month_day_options_map);
+ month_num = e_dialog_combo_box_get (
+ priv->month_num_combo,
+ month_num_options_map);
+ month_day = e_dialog_combo_box_get (
+ priv->month_day_combo,
+ month_day_options_map);
if (month_day == MONTH_DAY_NTH && month_num != MONTH_NUM_LAST && month_num != MONTH_NUM_DAY)
- e_dialog_combo_box_set (priv->month_num_combo,
- MONTH_NUM_DAY,
- month_num_options_map);
+ e_dialog_combo_box_set (
+ priv->month_num_combo,
+ MONTH_NUM_DAY,
+ month_num_options_map);
else if (month_day != MONTH_DAY_NTH && month_num == MONTH_NUM_DAY)
- e_dialog_combo_box_set (priv->month_num_combo,
- MONTH_NUM_FIRST,
- month_num_options_map);
+ e_dialog_combo_box_set (
+ priv->month_num_combo,
+ MONTH_NUM_FIRST,
+ month_num_options_map);
comp_editor_page_changed (COMP_EDITOR_PAGE (rpage));
}
@@ -1333,22 +1350,26 @@ make_monthly_special (RecurrencePage *rpage)
adj = GTK_ADJUSTMENT (gtk_adjustment_new (1, 1, 31, 1, 10, 10));
priv->month_num_combo = make_recur_month_num_combo (priv->month_index);
- gtk_box_pack_start (GTK_BOX (hbox), priv->month_num_combo,
- FALSE, FALSE, 6);
+ gtk_box_pack_start (
+ GTK_BOX (hbox), priv->month_num_combo,
+ FALSE, FALSE, 6);
priv->month_day_combo = make_recur_month_combobox ();
- gtk_box_pack_start (GTK_BOX (hbox), priv->month_day_combo,
- FALSE, FALSE, 6);
+ gtk_box_pack_start (
+ GTK_BOX (hbox), priv->month_day_combo,
+ FALSE, FALSE, 6);
gtk_widget_show_all (hbox);
/* Set the options */
- e_dialog_combo_box_set (priv->month_num_combo,
- priv->month_num,
- month_num_options_map);
- e_dialog_combo_box_set (priv->month_day_combo,
- priv->month_day,
- month_day_options_map);
+ e_dialog_combo_box_set (
+ priv->month_num_combo,
+ priv->month_num,
+ month_num_options_map);
+ e_dialog_combo_box_set (
+ priv->month_day_combo,
+ priv->month_day,
+ month_day_options_map);
g_signal_connect_swapped (
adj, "value-changed",
@@ -1452,8 +1473,9 @@ make_ending_until_special (RecurrencePage *rpage)
priv->ending_date_edit = comp_editor_new_date_edit (TRUE, FALSE, FALSE);
de = E_DATE_EDIT (priv->ending_date_edit);
- gtk_container_add (GTK_CONTAINER (priv->ending_special),
- GTK_WIDGET (de));
+ gtk_container_add (
+ GTK_CONTAINER (priv->ending_special),
+ GTK_WIDGET (de));
gtk_widget_show_all (GTK_WIDGET (de));
/* Set the value */
@@ -1503,8 +1525,9 @@ make_ending_count_special (RecurrencePage *rpage)
adj = GTK_ADJUSTMENT (gtk_adjustment_new (1, 1, 10000, 1, 10, 0));
priv->ending_count_spin = gtk_spin_button_new (adj, 1, 0);
gtk_spin_button_set_numeric ((GtkSpinButton *) priv->ending_count_spin, TRUE);
- gtk_box_pack_start (GTK_BOX (hbox), priv->ending_count_spin,
- FALSE, FALSE, 6);
+ gtk_box_pack_start (
+ GTK_BOX (hbox), priv->ending_count_spin,
+ FALSE, FALSE, 6);
label = gtk_label_new (_("occurrences"));
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 6);
@@ -1587,9 +1610,10 @@ fill_ending_date (RecurrencePage *rpage,
if (r->until.year == 0) {
/* Forever */
- e_dialog_combo_box_set (priv->ending_combo,
- ENDING_FOREVER,
- ending_types_map);
+ e_dialog_combo_box_set (
+ priv->ending_combo,
+ ENDING_FOREVER,
+ ending_types_map);
} else {
/* Ending date */
@@ -1629,17 +1653,19 @@ fill_ending_date (RecurrencePage *rpage,
}
priv->ending_date_tt = r->until;
- e_dialog_combo_box_set (priv->ending_combo,
- ENDING_UNTIL,
- ending_types_map);
+ e_dialog_combo_box_set (
+ priv->ending_combo,
+ ENDING_UNTIL,
+ ending_types_map);
}
} else {
/* Count of occurrences */
priv->ending_count = r->count;
- e_dialog_combo_box_set (priv->ending_combo,
- ENDING_FOR,
- ending_types_map);
+ e_dialog_combo_box_set (
+ priv->ending_combo,
+ ENDING_FOR,
+ ending_types_map);
}
g_signal_handlers_unblock_matched (priv->ending_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
@@ -1777,9 +1803,10 @@ recurrence_page_fill_widgets (CompEditorPage *page,
goto custom;
g_signal_handlers_block_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_combo_box_set (priv->interval_unit_combo,
- ICAL_DAILY_RECURRENCE,
- freq_map);
+ e_dialog_combo_box_set (
+ priv->interval_unit_combo,
+ ICAL_DAILY_RECURRENCE,
+ freq_map);
g_signal_handlers_unblock_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
break;
@@ -1843,9 +1870,10 @@ recurrence_page_fill_widgets (CompEditorPage *page,
priv->weekday_day_mask = day_mask;
g_signal_handlers_block_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_combo_box_set (priv->interval_unit_combo,
- ICAL_WEEKLY_RECURRENCE,
- freq_map);
+ e_dialog_combo_box_set (
+ priv->interval_unit_combo,
+ ICAL_WEEKLY_RECURRENCE,
+ freq_map);
g_signal_handlers_unblock_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
break;
}
@@ -1942,9 +1970,10 @@ recurrence_page_fill_widgets (CompEditorPage *page,
goto custom;
g_signal_handlers_block_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_combo_box_set (priv->interval_unit_combo,
- ICAL_MONTHLY_RECURRENCE,
- freq_map);
+ e_dialog_combo_box_set (
+ priv->interval_unit_combo,
+ ICAL_MONTHLY_RECURRENCE,
+ freq_map);
g_signal_handlers_unblock_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
break;
@@ -1958,9 +1987,10 @@ recurrence_page_fill_widgets (CompEditorPage *page,
goto custom;
g_signal_handlers_block_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
- e_dialog_combo_box_set (priv->interval_unit_combo,
- ICAL_YEARLY_RECURRENCE,
- freq_map);
+ e_dialog_combo_box_set (
+ priv->interval_unit_combo,
+ ICAL_YEARLY_RECURRENCE,
+ freq_map);
g_signal_handlers_unblock_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
break;
@@ -2061,10 +2091,12 @@ recurrence_page_set_dates (CompEditorPage *page,
priv->weekday_blocked_day_mask = mask;
if (priv->weekday_picker != NULL) {
- weekday_picker_set_days (WEEKDAY_PICKER (priv->weekday_picker),
- priv->weekday_day_mask);
- weekday_picker_set_blocked_days (WEEKDAY_PICKER (priv->weekday_picker),
- priv->weekday_blocked_day_mask);
+ weekday_picker_set_days (
+ WEEKDAY_PICKER (priv->weekday_picker),
+ priv->weekday_day_mask);
+ weekday_picker_set_blocked_days (
+ WEEKDAY_PICKER (priv->weekday_picker),
+ priv->weekday_blocked_day_mask);
}
}
@@ -2200,11 +2232,12 @@ create_exception_dialog (RecurrencePage *rpage,
priv = rpage->priv;
toplevel = gtk_widget_get_toplevel (priv->main);
- dialog = gtk_dialog_new_with_buttons (title, GTK_WINDOW (toplevel),
- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
- GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
- NULL);
+ dialog = gtk_dialog_new_with_buttons (
+ title, GTK_WINDOW (toplevel),
+ GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
+ GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
+ NULL);
*date_edit = comp_editor_new_date_edit (TRUE, FALSE, TRUE);
gtk_widget_show (*date_edit);
@@ -2234,10 +2267,11 @@ exception_add_cb (GtkWidget *widget,
dt.tzid = NULL;
icaltime.is_date = 1;
- date_set = e_date_edit_get_date (E_DATE_EDIT (date_edit),
- &icaltime.year,
- &icaltime.month,
- &icaltime.day);
+ date_set = e_date_edit_get_date (
+ E_DATE_EDIT (date_edit),
+ &icaltime.year,
+ &icaltime.month,
+ &icaltime.day);
g_return_if_fail (date_set);
append_exception (rpage, &dt);
@@ -2270,8 +2304,9 @@ exception_modify_cb (GtkWidget *widget,
current_dt = e_date_time_list_get_date_time (priv->exception_list_store, &iter);
dialog = create_exception_dialog (rpage, _("Modify exception"), &date_edit);
- e_date_edit_set_date (E_DATE_EDIT (date_edit),
- current_dt->value->year, current_dt->value->month, current_dt->value->day);
+ e_date_edit_set_date (
+ E_DATE_EDIT (date_edit),
+ current_dt->value->year, current_dt->value->month, current_dt->value->day);
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) {
ECalComponentDateTime dt;
@@ -2280,8 +2315,9 @@ exception_modify_cb (GtkWidget *widget,
dt.value = &icaltime;
tt = dt.value;
- e_date_edit_get_date (E_DATE_EDIT (date_edit),
- &tt->year, &tt->month, &tt->day);
+ e_date_edit_get_date (
+ E_DATE_EDIT (date_edit),
+ &tt->year, &tt->month, &tt->day);
tt->hour = 0;
tt->minute = 0;
tt->second = 0;
@@ -2382,8 +2418,9 @@ init_widgets (RecurrencePage *rpage)
ecal->calitem, "date_range_changed",
G_CALLBACK (preview_date_range_changed_cb), rpage);
e_calendar_item_set_max_days_sel (ecal->calitem, 0);
- gtk_container_add (GTK_CONTAINER (priv->preview_bin),
- priv->preview_calendar);
+ gtk_container_add (
+ GTK_CONTAINER (priv->preview_bin),
+ priv->preview_calendar);
gtk_widget_show (priv->preview_calendar);
e_calendar_item_set_get_time_callback (
@@ -2442,8 +2479,9 @@ init_widgets (RecurrencePage *rpage)
/* Model */
priv->exception_list_store = e_date_time_list_new ();
- gtk_tree_view_set_model (GTK_TREE_VIEW (priv->exception_list),
- GTK_TREE_MODEL (priv->exception_list_store));
+ gtk_tree_view_set_model (
+ GTK_TREE_VIEW (priv->exception_list),
+ GTK_TREE_MODEL (priv->exception_list_store));
g_object_bind_property (
editor, "use-24-hour-format",
@@ -2489,8 +2527,9 @@ recurrence_page_construct (RecurrencePage *rpage,
e_load_ui_builder_definition (priv->builder, "recurrence-page.ui");
if (!get_widgets (rpage)) {
- g_message ("recurrence_page_construct(): "
- "Could not find all widgets in the XML file!");
+ g_message (
+ "recurrence_page_construct(): "
+ "Could not find all widgets in the XML file!");
return NULL;
}
diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c
index 3fcf1749cc..eafdb91744 100644
--- a/calendar/gui/dialogs/schedule-page.c
+++ b/calendar/gui/dialogs/schedule-page.c
@@ -104,13 +104,17 @@ update_time (SchedulePage *spage,
if (!start_zone) {
GError *error = NULL;
- if (!e_cal_client_get_timezone_sync (client, start_date->tzid, &start_zone, NULL, &error)) {
+ e_cal_client_get_timezone_sync (
+ client, start_date->tzid,
+ &start_zone, NULL, &error);
+
+ if (error != NULL) {
/* FIXME: Handle error better. */
- g_warning ("Couldn't get timezone '%s' from server: %s",
- start_date->tzid ? start_date->tzid : "",
- error ? error->message : "Unknown error");
- if (error)
- g_error_free (error);
+ g_warning (
+ "Couldn't get timezone '%s' from server: %s",
+ start_date->tzid ? start_date->tzid : "",
+ error->message);
+ g_error_free (error);
}
}
}
@@ -119,13 +123,18 @@ update_time (SchedulePage *spage,
end_zone = icaltimezone_get_builtin_timezone_from_tzid (end_date->tzid);
if (!end_zone) {
GError *error = NULL;
- if (!e_cal_client_get_timezone_sync (client, end_date->tzid, &end_zone, NULL, &error)) {
+
+ e_cal_client_get_timezone_sync (
+ client, end_date->tzid,
+ &end_zone, NULL, &error);
+
+ if (error != NULL) {
/* FIXME: Handle error better. */
- g_warning ("Couldn't get timezone '%s' from server: %s",
- end_date->tzid ? end_date->tzid : "",
- error ? error->message : "Unknown error");
- if (error)
- g_error_free (error);
+ g_warning (
+ "Couldn't get timezone '%s' from server: %s",
+ end_date->tzid ? end_date->tzid : "",
+ error->message);
+ g_error_free (error);
}
}
}
@@ -155,15 +164,19 @@ update_time (SchedulePage *spage,
}
}
- e_date_edit_set_date (E_DATE_EDIT (priv->sel->start_date_edit), start_tt.year,
- start_tt.month, start_tt.day);
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->sel->start_date_edit),
- start_tt.hour, start_tt.minute);
+ e_date_edit_set_date (
+ E_DATE_EDIT (priv->sel->start_date_edit), start_tt.year,
+ start_tt.month, start_tt.day);
+ e_date_edit_set_time_of_day (
+ E_DATE_EDIT (priv->sel->start_date_edit),
+ start_tt.hour, start_tt.minute);
- e_date_edit_set_date (E_DATE_EDIT (priv->sel->end_date_edit), end_tt.year,
- end_tt.month, end_tt.day);
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->sel->end_date_edit),
- end_tt.hour, end_tt.minute);
+ e_date_edit_set_date (
+ E_DATE_EDIT (priv->sel->end_date_edit), end_tt.year,
+ end_tt.month, end_tt.day);
+ e_date_edit_set_time_of_day (
+ E_DATE_EDIT (priv->sel->end_date_edit),
+ end_tt.hour, end_tt.minute);
}
@@ -387,8 +400,9 @@ schedule_page_construct (SchedulePage *spage,
e_load_ui_builder_definition (priv->builder, "schedule-page.ui");
if (!get_widgets (spage)) {
- g_message ("schedule_page_construct(): "
- "Could not find all widgets in the XML file!");
+ g_message (
+ "schedule_page_construct(): "
+ "Could not find all widgets in the XML file!");
return NULL;
}
@@ -409,8 +423,9 @@ schedule_page_construct (SchedulePage *spage,
gtk_box_pack_start (GTK_BOX (priv->main), GTK_WIDGET (priv->sel), TRUE, TRUE, 6);
if (!init_widgets (spage)) {
- g_message ("schedule_page_construct(): "
- "Could not initialize the widgets!");
+ g_message (
+ "schedule_page_construct(): "
+ "Could not initialize the widgets!");
return NULL;
}
@@ -489,20 +504,24 @@ times_changed_cb (GtkWidget *widget,
editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (spage));
- e_date_edit_get_date (E_DATE_EDIT (priv->sel->start_date_edit),
- &start_tt.year,
- &start_tt.month,
- &start_tt.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->sel->start_date_edit),
- &start_tt.hour,
- &start_tt.minute);
- e_date_edit_get_date (E_DATE_EDIT (priv->sel->end_date_edit),
- &end_tt.year,
- &end_tt.month,
- &end_tt.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->sel->end_date_edit),
- &end_tt.hour,
- &end_tt.minute);
+ e_date_edit_get_date (
+ E_DATE_EDIT (priv->sel->start_date_edit),
+ &start_tt.year,
+ &start_tt.month,
+ &start_tt.day);
+ e_date_edit_get_time_of_day (
+ E_DATE_EDIT (priv->sel->start_date_edit),
+ &start_tt.hour,
+ &start_tt.minute);
+ e_date_edit_get_date (
+ E_DATE_EDIT (priv->sel->end_date_edit),
+ &end_tt.year,
+ &end_tt.month,
+ &end_tt.day);
+ e_date_edit_get_time_of_day (
+ E_DATE_EDIT (priv->sel->end_date_edit),
+ &end_tt.hour,
+ &end_tt.minute);
start_dt.value = &start_tt;
end_dt.value = &end_tt;
diff --git a/calendar/gui/dialogs/send-comp.c b/calendar/gui/dialogs/send-comp.c
index 5f11665bea..fa7640eae7 100644
--- a/calendar/gui/dialogs/send-comp.c
+++ b/calendar/gui/dialogs/send-comp.c
@@ -170,8 +170,9 @@ send_component_dialog (GtkWindow *parent,
case E_CAL_COMPONENT_JOURNAL:
return TRUE;
default:
- g_message ("send_component_dialog(): "
- "Cannot handle object of type %d", vtype);
+ g_message (
+ "send_component_dialog(): "
+ "Cannot handle object of type %d", vtype);
return FALSE;
}
@@ -232,8 +233,9 @@ send_component_prompt_subject (GtkWindow *parent,
break;
default:
- g_message ("send_component_prompt_subject(): "
- "Cannot handle object of type %d", vtype);
+ g_message (
+ "send_component_prompt_subject(): "
+ "Cannot handle object of type %d", vtype);
return FALSE;
}
diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c
index c31fef6e23..2ada645842 100644
--- a/calendar/gui/dialogs/task-details-page.c
+++ b/calendar/gui/dialogs/task-details-page.c
@@ -279,12 +279,14 @@ task_details_page_fill_widgets (CompEditorPage *page,
icaltimezone_convert_time (completed, utc_zone, zone);
- e_date_edit_set_date (E_DATE_EDIT (priv->completed_date),
- completed->year, completed->month,
- completed->day);
- e_date_edit_set_time_of_day (E_DATE_EDIT (priv->completed_date),
- completed->hour,
- completed->minute);
+ e_date_edit_set_date (
+ E_DATE_EDIT (priv->completed_date),
+ completed->year, completed->month,
+ completed->day);
+ e_date_edit_set_time_of_day (
+ E_DATE_EDIT (priv->completed_date),
+ completed->hour,
+ completed->minute);
e_cal_component_free_icaltimetype (completed);
}
@@ -357,20 +359,23 @@ task_details_page_fill_component (CompEditorPage *page,
return FALSE;
}
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->completed_date),
- &icalcomplete.year,
- &icalcomplete.month,
- &icalcomplete.day);
+ date_set = e_date_edit_get_date (
+ E_DATE_EDIT (priv->completed_date),
+ &icalcomplete.year,
+ &icalcomplete.month,
+ &icalcomplete.day);
if (date_set) {
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->completed_date),
- &icalcomplete.hour,
- &icalcomplete.minute);
+ e_date_edit_get_time_of_day (
+ E_DATE_EDIT (priv->completed_date),
+ &icalcomplete.hour,
+ &icalcomplete.minute);
/* COMPLETED today or before */
icaltoday = icaltime_current_time_with_zone (zone);
- icaltimezone_convert_time (&icaltoday, zone,
- icaltimezone_get_utc_timezone ());
+ icaltimezone_convert_time (
+ &icaltoday, zone,
+ icaltimezone_get_utc_timezone ());
if (icaltime_compare_date_only (icalcomplete, icaltoday) > 0) {
comp_editor_page_display_validation_error (
@@ -385,7 +390,8 @@ task_details_page_fill_component (CompEditorPage *page,
* entire time the dialog is shown. Otherwise if the user
* changes the timezone, the COMPLETED date may get changed
* as well. */
- icaltimezone_convert_time (&icalcomplete, zone,
+ icaltimezone_convert_time (
+ &icalcomplete, zone,
icaltimezone_get_utc_timezone ());
e_cal_component_set_completed (comp, &icalcomplete);
} else {
@@ -539,30 +545,34 @@ date_changed_cb (EDateEdit *dedit,
comp_editor_page_set_updating (COMP_EDITOR_PAGE (tdpage), TRUE);
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->completed_date),
- &completed_tt.year,
- &completed_tt.month,
- &completed_tt.day);
- e_date_edit_get_time_of_day (E_DATE_EDIT (priv->completed_date),
- &completed_tt.hour,
- &completed_tt.minute);
+ date_set = e_date_edit_get_date (
+ E_DATE_EDIT (priv->completed_date),
+ &completed_tt.year,
+ &completed_tt.month,
+ &completed_tt.day);
+ e_date_edit_get_time_of_day (
+ E_DATE_EDIT (priv->completed_date),
+ &completed_tt.hour,
+ &completed_tt.minute);
status = e_dialog_combo_box_get (priv->status_combo, status_map);
if (!date_set) {
completed_tt = icaltime_null_time ();
if (status == ICAL_STATUS_COMPLETED) {
- e_dialog_combo_box_set (priv->status_combo,
- ICAL_STATUS_NONE,
- status_map);
+ e_dialog_combo_box_set (
+ priv->status_combo,
+ ICAL_STATUS_NONE,
+ status_map);
gtk_spin_button_set_value (
GTK_SPIN_BUTTON (priv->percent_complete), 0);
}
} else {
if (status != ICAL_STATUS_COMPLETED) {
- e_dialog_combo_box_set (priv->status_combo,
- ICAL_STATUS_COMPLETED,
- status_map);
+ e_dialog_combo_box_set (
+ priv->status_combo,
+ ICAL_STATUS_COMPLETED,
+ status_map);
}
gtk_spin_button_set_value (
GTK_SPIN_BUTTON (priv->percent_complete), 100);
@@ -746,8 +756,9 @@ task_details_page_construct (TaskDetailsPage *tdpage)
e_load_ui_builder_definition (priv->builder, "task-details-page.ui");
if (!get_widgets (tdpage)) {
- g_message ("task_details_page_construct(): "
- "Could not find all widgets in the XML file!");
+ g_message (
+ "task_details_page_construct(): "
+ "Could not find all widgets in the XML file!");
return NULL;
}
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index 9f1542ced3..49f86212c0 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -256,7 +256,8 @@ check_starts_in_the_past (TaskPage *tpage)
due_in_past = date_in_past (tpage, E_DATE_EDIT (priv->due_date));
if (start_in_past || due_in_past) {
- gchar *tmp = g_strconcat ("<b>", start_in_past ? _("Task's start date is in the past") : "",
+ gchar *tmp = g_strconcat (
+ "<b>", start_in_past ? _("Task's start date is in the past") : "",
start_in_past && due_in_past ? "\n" : "", due_in_past ? _("Task's due date is in the past") : "", "</b>", NULL);
task_page_set_info_string (tpage, GTK_STOCK_DIALOG_WARNING, tmp);
g_free (tmp);
@@ -544,11 +545,13 @@ task_page_fill_widgets (CompEditorPage *page,
ECalComponentText *dtext;
dtext = l->data;
- gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)),
- dtext->value ? dtext->value : "", -1);
+ gtk_text_buffer_set_text (
+ gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)),
+ dtext->value ? dtext->value : "", -1);
} else {
- gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)),
- "", 0);
+ gtk_text_buffer_set_text (
+ gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)),
+ "", 0);
}
e_cal_component_free_text_list (l);
e_buffer_tagger_update_tags (GTK_TEXT_VIEW (priv->description));
@@ -560,9 +563,10 @@ task_page_fill_widgets (CompEditorPage *page,
zone = NULL;
if (d.value) {
struct icaltimetype *due_tt = d.value;
- e_date_edit_set_date (E_DATE_EDIT (priv->due_date),
- due_tt->year, due_tt->month,
- due_tt->day);
+ e_date_edit_set_date (
+ E_DATE_EDIT (priv->due_date),
+ due_tt->year, due_tt->month,
+ due_tt->day);
e_date_edit_set_time_of_day (E_DATE_EDIT (priv->due_date), -1, -1);
} else {
e_date_edit_set_time (E_DATE_EDIT (priv->due_date), -1);
@@ -578,16 +582,22 @@ task_page_fill_widgets (CompEditorPage *page,
* first. */
if (!zone && d.tzid) {
GError *error = NULL;
- if (!e_cal_client_get_timezone_sync (client, d.tzid, &zone, NULL, &error))
+
+ e_cal_client_get_timezone_sync (
+ client, d.tzid, &zone, NULL, &error);
+
+ if (error != NULL) {
/* FIXME: Handle error better. */
- g_warning ("Couldn't get timezone '%s' from server: %s",
- d.tzid ? d.tzid : "", error ? error->message : "Unknown error");
- if (error)
- g_error_free (error);
+ g_warning (
+ "Couldn't get timezone '%s' from server: %s",
+ d.tzid ? d.tzid : "", error->message);
+ g_error_free (error);
+ }
}
- e_timezone_entry_set_timezone (E_TIMEZONE_ENTRY (priv->timezone),
- zone ? zone : default_zone);
+ e_timezone_entry_set_timezone (
+ E_TIMEZONE_ENTRY (priv->timezone),
+ zone ? zone : default_zone);
action = comp_editor_get_action (editor, "view-time-zone");
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
@@ -608,9 +618,10 @@ task_page_fill_widgets (CompEditorPage *page,
zone = NULL;
if (d.value) {
struct icaltimetype *start_tt = d.value;
- e_date_edit_set_date (E_DATE_EDIT (priv->start_date),
- start_tt->year, start_tt->month,
- start_tt->day);
+ e_date_edit_set_date (
+ E_DATE_EDIT (priv->start_date),
+ start_tt->year, start_tt->month,
+ start_tt->day);
e_date_edit_set_time_of_day (E_DATE_EDIT (priv->start_date), -1, -1);
} else {
e_date_edit_set_time (E_DATE_EDIT (priv->start_date), -1);
@@ -676,7 +687,7 @@ task_page_fill_widgets (CompEditorPage *page,
if (e_client_check_capability (E_CLIENT (client), CAL_STATIC_CAPABILITY_NO_ORGANIZER) && (flags & COMP_EDITOR_DELEGATE))
string = g_strdup (priv->user_add);
- else if ( organizer.cn != NULL)
+ else if (organizer.cn != NULL)
string = g_strdup_printf ("%s <%s>", organizer.cn, strip);
else
string = g_strdup (strip);
@@ -835,10 +846,11 @@ task_page_fill_component (CompEditorPage *page,
return FALSE;
}
- due_date_set = e_date_edit_get_date (E_DATE_EDIT (priv->due_date),
- &due_tt.year,
- &due_tt.month,
- &due_tt.day);
+ due_date_set = e_date_edit_get_date (
+ E_DATE_EDIT (priv->due_date),
+ &due_tt.year,
+ &due_tt.month,
+ &due_tt.day);
if (due_date_set) {
due_tt.is_date = TRUE;
date.tzid = NULL;
@@ -855,10 +867,11 @@ task_page_fill_component (CompEditorPage *page,
start_tt = icaltime_null_time ();
date.value = &start_tt;
- start_date_set = e_date_edit_get_date (E_DATE_EDIT (priv->start_date),
- &start_tt.year,
- &start_tt.month,
- &start_tt.day);
+ start_date_set = e_date_edit_get_date (
+ E_DATE_EDIT (priv->start_date),
+ &start_tt.year,
+ &start_tt.month,
+ &start_tt.day);
if (start_date_set) {
start_tt.is_date = TRUE;
date.tzid = NULL;
@@ -935,12 +948,13 @@ task_page_fill_component (CompEditorPage *page,
}
if (e_meeting_store_count_actual_attendees (priv->meeting_store) < 1) {
- e_notice (priv->main, GTK_MESSAGE_ERROR,
- _("At least one attendee is required."));
+ e_notice (
+ priv->main, GTK_MESSAGE_ERROR,
+ _("At least one attendee is required."));
return FALSE;
}
- if (flags & COMP_EDITOR_DELEGATE ) {
+ if (flags & COMP_EDITOR_DELEGATE) {
GSList *attendee_list, *l;
gint i;
const GPtrArray *attendees = e_meeting_store_get_attendees (priv->meeting_store);
@@ -1595,10 +1609,11 @@ date_changed_cb (EDateEdit *dedit,
if (comp_editor_page_get_updating (COMP_EDITOR_PAGE (tpage)))
return;
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->start_date),
- &start_tt.year,
- &start_tt.month,
- &start_tt.day);
+ date_set = e_date_edit_get_date (
+ E_DATE_EDIT (priv->start_date),
+ &start_tt.year,
+ &start_tt.month,
+ &start_tt.day);
if (date_set) {
start_tt.is_date = TRUE;
start_dt.tzid = NULL;
@@ -1607,10 +1622,11 @@ date_changed_cb (EDateEdit *dedit,
start_dt.tzid = NULL;
}
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->due_date),
- &due_tt.year,
- &due_tt.month,
- &due_tt.day);
+ date_set = e_date_edit_get_date (
+ E_DATE_EDIT (priv->due_date),
+ &due_tt.year,
+ &due_tt.month,
+ &due_tt.day);
if (date_set) {
due_tt.is_date = TRUE;
due_dt.tzid = NULL;
@@ -1677,14 +1693,16 @@ check_start_before_end (struct icaltimetype *start_tt,
/* Modify the end time, to be the start + 1 hour/day. */
*end_tt = *start_tt;
icaltime_adjust (end_tt, 0, adjust_by_hour ? 1 : 24, 0, 0);
- icaltimezone_convert_time (end_tt, start_zone,
- end_zone);
+ icaltimezone_convert_time (
+ end_tt, start_zone,
+ end_zone);
} else {
/* Modify the start time, to be the end - 1 hour/day. */
*start_tt = *end_tt;
icaltime_adjust (start_tt, 0, adjust_by_hour ? -1 : -24, 0, 0);
- icaltimezone_convert_time (start_tt, end_zone,
- start_zone);
+ icaltimezone_convert_time (
+ start_tt, end_zone,
+ start_zone);
}
return TRUE;
}
@@ -1720,17 +1738,19 @@ times_updated (TaskPage *tpage,
if (comp_editor_page_get_updating (COMP_EDITOR_PAGE (tpage)))
return;
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->start_date),
- &start_tt.year,
- &start_tt.month,
- &start_tt.day);
+ date_set = e_date_edit_get_date (
+ E_DATE_EDIT (priv->start_date),
+ &start_tt.year,
+ &start_tt.month,
+ &start_tt.day);
if (!date_set)
return;
- date_set = e_date_edit_get_date (E_DATE_EDIT (priv->due_date),
- &end_tt.year,
- &end_tt.month,
- &end_tt.day);
+ date_set = e_date_edit_get_date (
+ E_DATE_EDIT (priv->due_date),
+ &end_tt.year,
+ &end_tt.month,
+ &end_tt.day);
if (!date_set)
return;
@@ -2156,8 +2176,9 @@ task_page_construct (TaskPage *tpage,
e_load_ui_builder_definition (priv->builder, "task-page.ui");
if (!get_widgets (tpage)) {
- g_message ("task_page_construct(): "
- "Could not find all widgets in the XML file!");
+ g_message (
+ "task_page_construct(): "
+ "Could not find all widgets in the XML file!");
return NULL;
}
@@ -2184,8 +2205,9 @@ task_page_construct (TaskPage *tpage,
G_CALLBACK (organizer_changed_cb), tpage);
if (!init_widgets (tpage)) {
- g_message ("task_page_construct(): "
- "Could not initialize the widgets!");
+ g_message (
+ "task_page_construct(): "
+ "Could not initialize the widgets!");
return NULL;
}