aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-08-16 23:25:56 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-09-04 19:34:32 +0800
commitfcbbdfbd18e15b4ee8322a0217cf03a689a5e033 (patch)
treee16cd2a2279558c6a2bfb6ca39fcbaac4c85ba59 /calendar/gui
parentf78417c48861759d7b0c4535ecd3febe4638a7d3 (diff)
downloadgsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.gz
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.bz2
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.lz
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.xz
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.zst
gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.c104
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.c2
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c38
-rw-r--r--calendar/gui/alarm-notify/alarm.c11
-rw-r--r--calendar/gui/alarm-notify/config-data.c11
-rw-r--r--calendar/gui/alarm-notify/notify-main.c5
-rw-r--r--calendar/gui/alarm-notify/util.c6
-rw-r--r--calendar/gui/calendar-config.c30
-rw-r--r--calendar/gui/calendar-config.h6
-rw-r--r--calendar/gui/calendar-view-factory.c5
-rw-r--r--calendar/gui/calendar-view.c16
-rw-r--r--calendar/gui/comp-util.c51
-rw-r--r--calendar/gui/comp-util.h4
-rw-r--r--calendar/gui/dialogs/alarm-dialog.c121
-rw-r--r--calendar/gui/dialogs/alarm-list-dialog.c18
-rw-r--r--calendar/gui/dialogs/calendar-setup.c68
-rw-r--r--calendar/gui/dialogs/changed-comp.c5
-rw-r--r--calendar/gui/dialogs/comp-editor-page.c15
-rw-r--r--calendar/gui/dialogs/comp-editor-page.h6
-rw-r--r--calendar/gui/dialogs/comp-editor-util.c25
-rw-r--r--calendar/gui/dialogs/comp-editor.c96
-rw-r--r--calendar/gui/dialogs/comp-editor.h10
-rw-r--r--calendar/gui/dialogs/copy-source-dialog.c11
-rw-r--r--calendar/gui/dialogs/delete-comp.c8
-rw-r--r--calendar/gui/dialogs/delete-error.c3
-rw-r--r--calendar/gui/dialogs/e-delegate-dialog.c24
-rw-r--r--calendar/gui/dialogs/e-delegate-dialog.h6
-rw-r--r--calendar/gui/dialogs/e-send-options-utils.c4
-rw-r--r--calendar/gui/dialogs/event-editor.c5
-rw-r--r--calendar/gui/dialogs/event-page.c205
-rw-r--r--calendar/gui/dialogs/goto-dialog.c18
-rw-r--r--calendar/gui/dialogs/memo-page.c25
-rw-r--r--calendar/gui/dialogs/recur-comp.c7
-rw-r--r--calendar/gui/dialogs/recurrence-page.c106
-rw-r--r--calendar/gui/dialogs/save-comp.c3
-rw-r--r--calendar/gui/dialogs/schedule-page.c29
-rw-r--r--calendar/gui/dialogs/select-source-dialog.c6
-rw-r--r--calendar/gui/dialogs/send-comp.c16
-rw-r--r--calendar/gui/dialogs/task-details-page.c30
-rw-r--r--calendar/gui/dialogs/task-editor.c3
-rw-r--r--calendar/gui/dialogs/task-page.c116
-rw-r--r--calendar/gui/e-alarm-list.c61
-rw-r--r--calendar/gui/e-cal-component-preview.c6
-rw-r--r--calendar/gui/e-cal-config.c15
-rw-r--r--calendar/gui/e-cal-config.h2
-rw-r--r--calendar/gui/e-cal-event.c3
-rw-r--r--calendar/gui/e-cal-list-view.c56
-rw-r--r--calendar/gui/e-cal-model-calendar.c51
-rw-r--r--calendar/gui/e-cal-model-calendar.h2
-rw-r--r--calendar/gui/e-cal-model-memos.c38
-rw-r--r--calendar/gui/e-cal-model-memos.h2
-rw-r--r--calendar/gui/e-cal-model-tasks.c95
-rw-r--r--calendar/gui/e-cal-model-tasks.h2
-rw-r--r--calendar/gui/e-cal-model.c302
-rw-r--r--calendar/gui/e-cal-model.h2
-rw-r--r--calendar/gui/e-calendar-view.c118
-rw-r--r--calendar/gui/e-cell-date-edit-text.c22
-rw-r--r--calendar/gui/e-date-time-list.c29
-rw-r--r--calendar/gui/e-day-view-layout.c106
-rw-r--r--calendar/gui/e-day-view-layout.h2
-rw-r--r--calendar/gui/e-day-view-main-item.c58
-rw-r--r--calendar/gui/e-day-view-time-item.c97
-rw-r--r--calendar/gui/e-day-view-top-item.c34
-rw-r--r--calendar/gui/e-day-view.c988
-rw-r--r--calendar/gui/e-day-view.h98
-rw-r--r--calendar/gui/e-meeting-attendee.c93
-rw-r--r--calendar/gui/e-meeting-attendee.h6
-rw-r--r--calendar/gui/e-meeting-list-view.c229
-rw-r--r--calendar/gui/e-meeting-store.c128
-rw-r--r--calendar/gui/e-meeting-time-sel-item.c173
-rw-r--r--calendar/gui/e-meeting-time-sel.c454
-rw-r--r--calendar/gui/e-meeting-time-sel.h64
-rw-r--r--calendar/gui/e-meeting-types.h10
-rw-r--r--calendar/gui/e-meeting-utils.c4
-rw-r--r--calendar/gui/e-memo-table.c13
-rw-r--r--calendar/gui/e-select-names-editable.c6
-rw-r--r--calendar/gui/e-select-names-renderer.c28
-rw-r--r--calendar/gui/e-task-table.c53
-rw-r--r--calendar/gui/e-timezone-entry.c16
-rw-r--r--calendar/gui/e-week-view-event-item.c46
-rw-r--r--calendar/gui/e-week-view-layout.c142
-rw-r--r--calendar/gui/e-week-view-layout.h8
-rw-r--r--calendar/gui/e-week-view-main-item.c40
-rw-r--r--calendar/gui/e-week-view-titles-item.c4
-rw-r--r--calendar/gui/e-week-view.c483
-rw-r--r--calendar/gui/e-week-view.h66
-rw-r--r--calendar/gui/ea-cal-view-event.c24
-rw-r--r--calendar/gui/ea-cal-view.c52
-rw-r--r--calendar/gui/ea-cal-view.h2
-rw-r--r--calendar/gui/ea-calendar.c6
-rw-r--r--calendar/gui/ea-day-view-cell.c17
-rw-r--r--calendar/gui/ea-day-view-cell.h2
-rw-r--r--calendar/gui/ea-day-view-main-item.c186
-rw-r--r--calendar/gui/ea-day-view-main-item.h2
-rw-r--r--calendar/gui/ea-day-view.c7
-rw-r--r--calendar/gui/ea-day-view.h2
-rw-r--r--calendar/gui/ea-gnome-calendar.c12
-rw-r--r--calendar/gui/ea-gnome-calendar.h2
-rw-r--r--calendar/gui/ea-jump-button.c6
-rw-r--r--calendar/gui/ea-week-view-cell.c17
-rw-r--r--calendar/gui/ea-week-view-cell.h2
-rw-r--r--calendar/gui/ea-week-view-main-item.c168
-rw-r--r--calendar/gui/ea-week-view-main-item.h2
-rw-r--r--calendar/gui/ea-week-view.c7
-rw-r--r--calendar/gui/ea-week-view.h2
-rw-r--r--calendar/gui/gnome-cal.c93
-rw-r--r--calendar/gui/gnome-cal.h4
-rw-r--r--calendar/gui/itip-utils.c20
-rw-r--r--calendar/gui/misc.c6
-rw-r--r--calendar/gui/print.c512
-rw-r--r--calendar/gui/tag-calendar.c16
-rw-r--r--calendar/gui/weekday-picker.c19
112 files changed, 3893 insertions, 2828 deletions
diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.c b/calendar/gui/alarm-notify/alarm-notify-dialog.c
index e409432d3f..1e54ccf53c 100644
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.c
+++ b/calendar/gui/alarm-notify/alarm-notify-dialog.c
@@ -80,21 +80,23 @@ typedef struct {
} AlarmNotify;
-
-static void
-tree_selection_changed_cb (GtkTreeSelection *selection, gpointer data);
+static void tree_selection_changed_cb (GtkTreeSelection *selection,
+ gpointer data);
+static void fill_in_labels (AlarmNotify *an,
+ const gchar *summary,
+ const gchar *description,
+ const gchar *location,
+ time_t occur_start,
+ time_t occur_end);
+
+static void edit_pressed_cb (GtkButton *button,
+ gpointer user_data);
+static void snooze_pressed_cb (GtkButton *button,
+ gpointer user_data);
static void
-fill_in_labels (AlarmNotify *an, const gchar *summary, const gchar *description,
- const gchar *location, time_t occur_start, time_t occur_end);
-static void
-edit_pressed_cb (GtkButton *button, gpointer user_data);
-
-static void
-snooze_pressed_cb (GtkButton *button, gpointer user_data);
-
-static void
-an_update_minutes_label (GtkSpinButton *sb, gpointer data)
+an_update_minutes_label (GtkSpinButton *sb,
+ gpointer data)
{
AlarmNotify *an;
gint snooze_timeout_min;
@@ -106,7 +108,8 @@ an_update_minutes_label (GtkSpinButton *sb, gpointer data)
}
static void
-an_update_hrs_label (GtkSpinButton *sb, gpointer data)
+an_update_hrs_label (GtkSpinButton *sb,
+ gpointer data)
{
AlarmNotify *an;
gint snooze_timeout_hrs;
@@ -118,7 +121,8 @@ an_update_hrs_label (GtkSpinButton *sb, gpointer data)
}
static void
-an_update_days_label (GtkSpinButton *sb, gpointer data)
+an_update_days_label (GtkSpinButton *sb,
+ gpointer data)
{
AlarmNotify *an;
gint snooze_timeout_days;
@@ -130,7 +134,9 @@ an_update_days_label (GtkSpinButton *sb, gpointer data)
}
static void
-dialog_response_cb (GtkDialog *dialog, guint response_id, gpointer user_data)
+dialog_response_cb (GtkDialog *dialog,
+ guint response_id,
+ gpointer user_data)
{
AlarmNotify *an = user_data;
GtkTreeIter iter;
@@ -161,7 +167,8 @@ dialog_response_cb (GtkDialog *dialog, guint response_id, gpointer user_data)
}
static void
-edit_pressed_cb (GtkButton *button, gpointer user_data)
+edit_pressed_cb (GtkButton *button,
+ gpointer user_data)
{
AlarmNotify *an = user_data;
AlarmFuncInfo *funcinfo = NULL;
@@ -180,7 +187,8 @@ edit_pressed_cb (GtkButton *button, gpointer user_data)
#define DEFAULT_SNOOZE_MINS 5
static void
-snooze_pressed_cb (GtkButton *button, gpointer user_data)
+snooze_pressed_cb (GtkButton *button,
+ gpointer user_data)
{
gint snooze_timeout;
AlarmNotify *an = user_data;
@@ -205,7 +213,8 @@ snooze_pressed_cb (GtkButton *button, gpointer user_data)
}
static void
-dismiss_pressed_cb (GtkButton *button, gpointer user_data)
+dismiss_pressed_cb (GtkButton *button,
+ gpointer user_data)
{
AlarmNotify *an = user_data;
GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (an->treeview));
@@ -229,7 +238,8 @@ dismiss_pressed_cb (GtkButton *button, gpointer user_data)
}
static void
-dialog_destroyed_cb (GtkWidget *dialog, gpointer user_data)
+dialog_destroyed_cb (GtkWidget *dialog,
+ gpointer user_data)
{
AlarmNotify *an = user_data;
@@ -265,7 +275,7 @@ notified_alarms_dialog_new (void)
G_TYPE_POINTER, /* Start */
G_TYPE_POINTER, /* End */
- G_TYPE_POINTER /* FuncInfo*/));
+ G_TYPE_POINTER /* FuncInfo */));
an->builder = gtk_builder_new ();
e_load_ui_builder_definition (an->builder, "alarm-notify.ui");
@@ -310,7 +320,8 @@ notified_alarms_dialog_new (void)
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (an->treeview));
gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
- g_signal_connect (G_OBJECT (selection), "changed",
+ g_signal_connect (
+ selection, "changed",
G_CALLBACK (tree_selection_changed_cb), an);
gtk_widget_realize (an->dialog);
@@ -328,8 +339,12 @@ notified_alarms_dialog_new (void)
g_signal_connect (edit_btn, "clicked", G_CALLBACK (edit_pressed_cb), an);
g_signal_connect (snooze_btn, "clicked", G_CALLBACK (snooze_pressed_cb), an);
g_signal_connect (an->dismiss_btn, "clicked", G_CALLBACK (dismiss_pressed_cb), an);
- g_signal_connect (G_OBJECT (an->dialog), "response", G_CALLBACK (dialog_response_cb), an);
- g_signal_connect (G_OBJECT (an->dialog), "destroy", G_CALLBACK (dialog_destroyed_cb), an);
+ g_signal_connect (
+ an->dialog, "response",
+ G_CALLBACK (dialog_response_cb), an);
+ g_signal_connect (
+ an->dialog, "destroy",
+ G_CALLBACK (dialog_destroyed_cb), an);
if (!gtk_widget_get_realized (an->dialog))
gtk_widget_realize (an->dialog);
@@ -337,16 +352,19 @@ notified_alarms_dialog_new (void)
gtk_window_set_icon_name (GTK_WINDOW (an->dialog), "stock_alarm");
/* Set callback for updating the snooze "minutes" label */
- g_signal_connect (G_OBJECT (an->snooze_time_min), "value_changed",
- G_CALLBACK (an_update_minutes_label), an);
+ g_signal_connect (
+ an->snooze_time_min, "value_changed",
+ G_CALLBACK (an_update_minutes_label), an);
/* Set callback for updating the snooze "hours" label */
- g_signal_connect (G_OBJECT (an->snooze_time_hrs), "value_changed",
- G_CALLBACK (an_update_hrs_label), an);
+ g_signal_connect (
+ an->snooze_time_hrs, "value_changed",
+ G_CALLBACK (an_update_hrs_label), an);
/* Set callback for updating the snooze "days" label */
- g_signal_connect (G_OBJECT (an->snooze_time_days), "value_changed",
- G_CALLBACK (an_update_days_label), an);
+ g_signal_connect (
+ an->snooze_time_days, "value_changed",
+ G_CALLBACK (an_update_days_label), an);
na = g_new0 (AlarmNotificationsDialog, 1);
@@ -376,11 +394,16 @@ notified_alarms_dialog_new (void)
**/
GtkTreeIter
-add_alarm_to_notified_alarms_dialog (AlarmNotificationsDialog *na, time_t trigger,
- time_t occur_start, time_t occur_end,
- ECalComponentVType vtype, const gchar *summary,
- const gchar *description, const gchar *location,
- AlarmNotifyFunc func, gpointer func_data)
+add_alarm_to_notified_alarms_dialog (AlarmNotificationsDialog *na,
+ time_t trigger,
+ time_t occur_start,
+ time_t occur_end,
+ ECalComponentVType vtype,
+ const gchar *summary,
+ const gchar *description,
+ const gchar *location,
+ AlarmNotifyFunc func,
+ gpointer func_data)
{
GtkTreeIter iter;
GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (na->treeview));
@@ -428,7 +451,8 @@ add_alarm_to_notified_alarms_dialog (AlarmNotificationsDialog *na, time_t trigge
}
static void
-tree_selection_changed_cb (GtkTreeSelection *selection, gpointer user_data)
+tree_selection_changed_cb (GtkTreeSelection *selection,
+ gpointer user_data)
{
GtkTreeModel *model;
GtkTreeIter iter;
@@ -454,8 +478,12 @@ tree_selection_changed_cb (GtkTreeSelection *selection, gpointer user_data)
}
static void
-fill_in_labels (AlarmNotify *an, const gchar *summary, const gchar *description,
- const gchar *location, time_t occur_start, time_t occur_end)
+fill_in_labels (AlarmNotify *an,
+ const gchar *summary,
+ const gchar *description,
+ const gchar *location,
+ time_t occur_start,
+ time_t occur_end)
{
GtkTextTagTable *table = gtk_text_tag_table_new ();
GtkTextBuffer *buffer = gtk_text_buffer_new (table);
diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c
index 9a4a76aa46..8682011e21 100644
--- a/calendar/gui/alarm-notify/alarm-notify.c
+++ b/calendar/gui/alarm-notify/alarm-notify.c
@@ -42,7 +42,7 @@
struct _AlarmNotifyPrivate {
/* Mapping from EUri's to LoadedClient structures */
/* FIXME do we need per source type uri hashes? or perhaps we
- just need to hash based on source */
+ * just need to hash based on source */
GHashTable *uri_client_hash[E_CAL_CLIENT_SOURCE_TYPE_LAST];
ESourceList *source_lists[E_CAL_CLIENT_SOURCE_TYPE_LAST];
ESourceList *selected_calendars;
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
index c143429f8f..d7a1346a8e 100644
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ b/calendar/gui/alarm-notify/alarm-queue.c
@@ -180,10 +180,10 @@ static void
message_proxy (Message *msg)
{
g_return_if_fail (msg->func != NULL);
-
+ *
msg->func (msg);
}
-
+ *
static gpointer
create_thread_pool (void)
{
@@ -344,7 +344,7 @@ remove_queued_alarm (CompQueuedAlarms *cqa,
gboolean free_object,
gboolean remove_alarm)
{
- QueuedAlarm *qa=NULL;
+ QueuedAlarm *qa = NULL;
GSList *l;
debug (("..."));
@@ -576,7 +576,9 @@ add_component_alarms (ClientAlarms *ca,
/* Loads the alarms of a client for a given range of time */
static void
-load_alarms (ClientAlarms *ca, time_t start, time_t end)
+load_alarms (ClientAlarms *ca,
+ time_t start,
+ time_t end)
{
gchar *str_query, *iso_start, *iso_end;
GError *error = NULL;
@@ -1609,10 +1611,12 @@ display_notification (time_t trigger,
tray_icon = gtk_status_icon_new ();
gtk_status_icon_set_from_icon_name (
tray_icon, "appointment-soon");
- g_signal_connect (G_OBJECT (tray_icon), "activate",
- G_CALLBACK (icon_activated), NULL);
- g_signal_connect (G_OBJECT (tray_icon), "popup-menu",
- G_CALLBACK (popup_menu), NULL);
+ g_signal_connect (
+ tray_icon, "activate",
+ G_CALLBACK (icon_activated), NULL);
+ g_signal_connect (
+ tray_icon, "popup-menu",
+ G_CALLBACK (popup_menu), NULL);
}
current_zone = config_data_get_timezone ();
@@ -1661,8 +1665,9 @@ display_notification (time_t trigger,
g_free (time_str);
g_free (str);
- g_signal_connect (G_OBJECT (tray_data->view), "objects_removed",
- G_CALLBACK (on_dialog_objs_removed_cb), tray_data);
+ g_signal_connect (
+ tray_data->view, "objects_removed",
+ G_CALLBACK (on_dialog_objs_removed_cb), tray_data);
/* FIXME: We should remove this check */
if (!config_data_get_notify_with_tray ()) {
@@ -1864,7 +1869,8 @@ mail_notification (time_t trigger,
/* Performs notification of a procedure alarm */
static gboolean
-procedure_notification_dialog (const gchar *cmd, const gchar *url)
+procedure_notification_dialog (const gchar *cmd,
+ const gchar *url)
{
GtkWidget *container;
GtkWidget *dialog;
@@ -2037,7 +2043,9 @@ alarm_queue_init (gpointer data)
}
static gboolean
-free_client_alarms_cb (gpointer key, gpointer value, gpointer user_data)
+free_client_alarms_cb (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
ClientAlarms *ca = value;
@@ -2101,7 +2109,8 @@ alarm_queue_done (void)
}
static gboolean
-compare_ids (gpointer a, gpointer b)
+compare_ids (gpointer a,
+ gpointer b)
{
ECalComponentId *id, *id1;
@@ -2370,7 +2379,8 @@ update_cqa (CompQueuedAlarms *cqa,
}
static void
-update_qa (ECalComponentAlarms *alarms, QueuedAlarm *qa)
+update_qa (ECalComponentAlarms *alarms,
+ QueuedAlarm *qa)
{
ECalComponentAlarmInstance *al_inst;
GSList *instance_list;
diff --git a/calendar/gui/alarm-notify/alarm.c b/calendar/gui/alarm-notify/alarm.c
index 95d1d7b5a2..968eb95959 100644
--- a/calendar/gui/alarm-notify/alarm.c
+++ b/calendar/gui/alarm-notify/alarm.c
@@ -167,7 +167,8 @@ setup_timeout (void)
/* Used from g_list_insert_sorted(); compares the
* trigger times of two AlarmRecord structures. */
static gint
-compare_alarm_by_time (gconstpointer a, gconstpointer b)
+compare_alarm_by_time (gconstpointer a,
+ gconstpointer b)
{
const AlarmRecord *ara = a;
const AlarmRecord *arb = b;
@@ -187,7 +188,7 @@ queue_alarm (AlarmRecord *ar)
old_head = alarms;
/* Insert the new alarm in order if the alarm's trigger time is
- after the current time */
+ * after the current time */
alarms = g_list_insert_sorted (alarms, ar, compare_alarm_by_time);
/* If there first item on the list didn't change, the time out is fine */
@@ -215,8 +216,10 @@ queue_alarm (AlarmRecord *ar)
* the alarm will not be queued and the function will return NULL.
**/
gpointer
-alarm_add (time_t trigger, AlarmFunction alarm_fn, gpointer data,
- AlarmDestroyNotify destroy_notify_fn)
+alarm_add (time_t trigger,
+ AlarmFunction alarm_fn,
+ gpointer data,
+ AlarmDestroyNotify destroy_notify_fn)
{
AlarmRecord *ar;
diff --git a/calendar/gui/alarm-notify/config-data.c b/calendar/gui/alarm-notify/config-data.c
index 31425c5985..d056131280 100644
--- a/calendar/gui/alarm-notify/config-data.c
+++ b/calendar/gui/alarm-notify/config-data.c
@@ -124,7 +124,7 @@ config_data_get_calendars (const gchar *key)
state = gconf_client_get_bool (conf_client,
"/apps/evolution/calendar/notify/notify_with_tray",
NULL);
- if (!state) /* Should be old client*/ {
+ if (!state) /* Should be old client */ {
GSList *source;
gconf_client_set_bool (conf_client,
"/apps/evolution/calendar/notify/notify_with_tray",
@@ -158,8 +158,8 @@ config_data_get_calendars (const gchar *key)
void
config_data_replace_string_list (const gchar *key,
- const gchar *old,
- const gchar *new)
+ const gchar *old,
+ const gchar *new)
{
GSList *source, *tmp;
@@ -259,7 +259,8 @@ config_data_get_notify_with_tray (void)
* triggered while it was not running.
**/
void
-config_data_set_last_notification_time (ECalClient *cal, time_t t)
+config_data_set_last_notification_time (ECalClient *cal,
+ time_t t)
{
GConfClient *client;
time_t current_t, now = time (NULL);
@@ -287,7 +288,7 @@ config_data_set_last_notification_time (ECalClient *cal, time_t t)
return;
/* we only store the new notification time if it is bigger
- than the already stored one */
+ * than the already stored one */
current_t = gconf_client_get_int (client, KEY_LAST_NOTIFICATION_TIME, NULL);
if (t > current_t || current_t > now)
gconf_client_set_int (client, KEY_LAST_NOTIFICATION_TIME, t, NULL);
diff --git a/calendar/gui/alarm-notify/notify-main.c b/calendar/gui/alarm-notify/notify-main.c
index a420074c4d..225dde4c26 100644
--- a/calendar/gui/alarm-notify/notify-main.c
+++ b/calendar/gui/alarm-notify/notify-main.c
@@ -45,7 +45,8 @@
#include "e-util/e-util-private.h"
gint
-main (gint argc, gchar **argv)
+main (gint argc,
+ gchar **argv)
{
AlarmNotify *alarm_notify_service;
gint exit_status;
@@ -68,7 +69,7 @@ main (gint argc, gchar **argv)
p_SetProcessDEPPolicy = GetProcAddress (GetModuleHandle ("kernel32.dll"), "SetProcessDEPPolicy");
if (p_SetProcessDEPPolicy)
- (*p_SetProcessDEPPolicy) (PROCESS_DEP_ENABLE|PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION);
+ (*p_SetProcessDEPPolicy) (PROCESS_DEP_ENABLE | PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION);
}
#endif
#endif
diff --git a/calendar/gui/alarm-notify/util.c b/calendar/gui/alarm-notify/util.c
index d5c6678cc4..891ea131bc 100644
--- a/calendar/gui/alarm-notify/util.c
+++ b/calendar/gui/alarm-notify/util.c
@@ -34,7 +34,8 @@
/* Converts a time_t to a string, relative to the specified timezone */
gchar *
-timet_to_str_with_zone (time_t t, icaltimezone *zone)
+timet_to_str_with_zone (time_t t,
+ icaltimezone *zone)
{
struct icaltimetype itt;
struct tm tm;
@@ -52,7 +53,8 @@ timet_to_str_with_zone (time_t t, icaltimezone *zone)
}
gchar *
-calculate_time (time_t start, time_t end)
+calculate_time (time_t start,
+ time_t end)
{
time_t difference = end - start;
gchar *str;
diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c
index 29fdb4b2cb..6d97cdf8cf 100644
--- a/calendar/gui/calendar-config.c
+++ b/calendar/gui/calendar-config.c
@@ -70,7 +70,7 @@ calendar_config_remove_notification (guint id)
}
/* Returns TRUE if the locale has 'am' and 'pm' strings defined, in which
- case the user can choose between 12 and 24-hour time formats. */
+ * case the user can choose between 12 and 24-hour time formats. */
gboolean
calendar_config_locale_supports_12_hour_format (void)
{
@@ -133,14 +133,14 @@ calendar_config_get_icaltimezone (void)
/* Whether we use 24-hour format or 12-hour format (AM/PM). */
gboolean
-calendar_config_get_24_hour_format (void)
+calendar_config_get_24_hour_format (void)
{
calendar_config_init ();
/* If the locale defines 'am' and 'pm' strings then the user has the
- choice of 12-hour or 24-hour time format, with 12-hour as the
- default. If the locale doesn't have 'am' and 'pm' strings we have
- to use 24-hour format, or strftime ()/strptime () won't work. */
+ * choice of 12-hour or 24-hour time format, with 12-hour as the
+ * default. If the locale doesn't have 'am' and 'pm' strings we have
+ * to use 24-hour format, or strftime ()/strptime () won't work. */
if (calendar_config_locale_supports_12_hour_format ())
return gconf_client_get_bool (config, CALENDAR_CONFIG_24HOUR, NULL);
@@ -157,7 +157,8 @@ calendar_config_get_month_scroll_by_week (void)
}
guint
-calendar_config_add_notification_month_scroll_by_week (GConfClientNotifyFunc func, gpointer data)
+calendar_config_add_notification_month_scroll_by_week (GConfClientNotifyFunc func,
+ gpointer data)
{
guint id;
@@ -172,7 +173,7 @@ calendar_config_add_notification_month_scroll_by_week (GConfClientNotifyFunc fun
/* The working days of the week, a bit-wise combination of flags. */
CalWeekdays
-calendar_config_get_working_days (void)
+calendar_config_get_working_days (void)
{
calendar_config_init ();
@@ -181,7 +182,7 @@ calendar_config_get_working_days (void)
/* Settings to hide completed tasks. */
gboolean
-calendar_config_get_hide_completed_tasks (void)
+calendar_config_get_hide_completed_tasks (void)
{
calendar_config_init ();
@@ -189,7 +190,7 @@ calendar_config_get_hide_completed_tasks (void)
}
static EDurationType
-calendar_config_get_hide_completed_tasks_units (void)
+calendar_config_get_hide_completed_tasks_units (void)
{
gchar *units;
EDurationType cu;
@@ -232,7 +233,7 @@ calendar_config_get_hide_completed_tasks_sexp (gboolean get_completed)
if (value == 0) {
/* If the value is 0, we want to hide completed tasks
- immediately, so we filter out all complete/incomplete tasks.*/
+ * immediately, so we filter out all complete/incomplete tasks.*/
if (!get_completed)
sexp = g_strdup ("(not is-completed?)");
else
@@ -244,7 +245,7 @@ calendar_config_get_hide_completed_tasks_sexp (gboolean get_completed)
time_t t;
/* Get the current time, and subtract the appropriate
- number of days/hours/minutes. */
+ * number of days/hours/minutes. */
zone = calendar_config_get_icaltimezone ();
tt = icaltime_current_time_with_zone (zone);
@@ -265,7 +266,7 @@ calendar_config_get_hide_completed_tasks_sexp (gboolean get_completed)
t = icaltime_as_timet_with_zone (tt, zone);
/* Convert the time to an ISO date string, and build
- the query sub-expression. */
+ * the query sub-expression. */
isodate = isodate_from_time_t (t);
if (!get_completed)
sexp = g_strdup_printf ("(not (completed-before? (make-time \"%s\")))", isodate);
@@ -299,7 +300,7 @@ calendar_config_get_dir_path (void)
}
/* contains list of strings, locations, recently used as the second timezone in a day view.
- Free with calendar_config_free_day_second_zones. */
+ * Free with calendar_config_free_day_second_zones. */
GSList *
calendar_config_get_day_second_zones (void)
{
@@ -424,7 +425,8 @@ calendar_config_select_day_second_zone (void)
}
guint
-calendar_config_add_notification_day_second_zone (GConfClientNotifyFunc func, gpointer data)
+calendar_config_add_notification_day_second_zone (GConfClientNotifyFunc func,
+ gpointer data)
{
guint id;
diff --git a/calendar/gui/calendar-config.h b/calendar/gui/calendar-config.h
index 61e92efae4..0be1e203c9 100644
--- a/calendar/gui/calendar-config.h
+++ b/calendar/gui/calendar-config.h
@@ -34,8 +34,8 @@
#include <e-util/e-util-enums.h>
/* These are used to get/set the working days in the week. The bit-flags are
- combined together. The bits must be from 0 (Sun) to 6 (Sat) to match the
- day values used by localtime etc. */
+ * combined together. The bits must be from 0 (Sun) to 6 (Sat) to match the
+ * day values used by localtime etc. */
typedef enum
{
CAL_SUNDAY = 1 << 0,
@@ -68,7 +68,7 @@ gboolean calendar_config_get_hide_completed_tasks (void);
gchar * calendar_config_get_hide_completed_tasks_sexp (gboolean get_completed);
/* Returns TRUE if the locale has 'am' and 'pm' strings defined, i.e. it
- supports 12-hour time format. */
+ * supports 12-hour time format. */
gboolean calendar_config_locale_supports_12_hour_format (void);
void calendar_config_set_dir_path (const gchar *);
diff --git a/calendar/gui/calendar-view-factory.c b/calendar/gui/calendar-view-factory.c
index 67736985ce..b1d4a4fd72 100644
--- a/calendar/gui/calendar-view-factory.c
+++ b/calendar/gui/calendar-view-factory.c
@@ -159,7 +159,8 @@ calendar_view_factory_get_type_code (GalViewFactory *factory)
/* new_view method for the calendar view factory */
static GalView *
-calendar_view_factory_new_view (GalViewFactory *factory, const gchar *name)
+calendar_view_factory_new_view (GalViewFactory *factory,
+ const gchar *name)
{
CalendarViewFactory *cal_view_factory;
CalendarViewFactoryPrivate *priv;
@@ -186,7 +187,7 @@ calendar_view_factory_new_view (GalViewFactory *factory, const gchar *name)
**/
GalViewFactory *
calendar_view_factory_construct (CalendarViewFactory *cal_view_factory,
- GnomeCalendarViewType view_type)
+ GnomeCalendarViewType view_type)
{
CalendarViewFactoryPrivate *priv;
diff --git a/calendar/gui/calendar-view.c b/calendar/gui/calendar-view.c
index 78b0b15716..0931a4b189 100644
--- a/calendar/gui/calendar-view.c
+++ b/calendar/gui/calendar-view.c
@@ -114,14 +114,16 @@ calendar_view_finalize (GObject *object)
/* load method of the calendar view */
static void
-calendar_view_load (GalView *view, const gchar *filename)
+calendar_view_load (GalView *view,
+ const gchar *filename)
{
/* nothing */
}
/* save method of the calendar view */
static void
-calendar_view_save (GalView *view, const gchar *filename)
+calendar_view_save (GalView *view,
+ const gchar *filename)
{
/* nothing */
}
@@ -141,7 +143,8 @@ calendar_view_get_title (GalView *view)
/* set_title method of the calendar view */
static void
-calendar_view_set_title (GalView *view, const gchar *title)
+calendar_view_set_title (GalView *view,
+ const gchar *title)
{
CalendarView *cal_view;
CalendarViewPrivate *priv;
@@ -218,8 +221,8 @@ calendar_view_clone (GalView *view)
**/
CalendarView *
calendar_view_construct (CalendarView *cal_view,
- GnomeCalendarViewType view_type,
- const gchar *title)
+ GnomeCalendarViewType view_type,
+ const gchar *title)
{
CalendarViewPrivate *priv;
@@ -245,7 +248,8 @@ calendar_view_construct (CalendarView *cal_view,
* Return value: A newly-created calendar view.
**/
CalendarView *
-calendar_view_new (GnomeCalendarViewType view_type, const gchar *title)
+calendar_view_new (GnomeCalendarViewType view_type,
+ const gchar *title)
{
CalendarView *cal_view;
diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c
index 43f87f7fa1..9405f24b5a 100644
--- a/calendar/gui/comp-util.c
+++ b/calendar/gui/comp-util.c
@@ -50,7 +50,9 @@
* component object.
**/
void
-cal_comp_util_add_exdate (ECalComponent *comp, time_t t, icaltimezone *zone)
+cal_comp_util_add_exdate (ECalComponent *comp,
+ time_t t,
+ icaltimezone *zone)
{
GSList *list;
ECalComponentDateTime *cdt;
@@ -72,7 +74,8 @@ cal_comp_util_add_exdate (ECalComponent *comp, time_t t, icaltimezone *zone)
/* Returns TRUE if the TZIDs are equivalent, i.e. both NULL or the same. */
static gboolean
-e_cal_component_compare_tzid (const gchar *tzid1, const gchar *tzid2)
+e_cal_component_compare_tzid (const gchar *tzid1,
+ const gchar *tzid2)
{
gboolean retval = TRUE;
@@ -101,8 +104,8 @@ e_cal_component_compare_tzid (const gchar *tzid1, const gchar *tzid2)
**/
gboolean
cal_comp_util_compare_event_timezones (ECalComponent *comp,
- ECalClient *client,
- icaltimezone *zone)
+ ECalClient *client,
+ icaltimezone *zone)
{
ECalComponentDateTime start_datetime, end_datetime;
const gchar *tzid;
@@ -116,8 +119,8 @@ cal_comp_util_compare_event_timezones (ECalComponent *comp,
e_cal_component_get_dtend (comp, &end_datetime);
/* If either the DTSTART or the DTEND is a DATE value, we return TRUE.
- Maybe if one was a DATE-TIME we should check that, but that should
- not happen often. */
+ * Maybe if one was a DATE-TIME we should check that, but that should
+ * not happen often. */
if ((start_datetime.value && start_datetime.value->is_date)
|| (end_datetime.value && end_datetime.value->is_date)) {
retval = TRUE;
@@ -125,8 +128,8 @@ cal_comp_util_compare_event_timezones (ECalComponent *comp,
}
/* If the event uses UTC for DTSTART & DTEND, return TRUE. Outlook
- will send single events as UTC, so we don't want to mark all of
- these. */
+ * will send single events as UTC, so we don't want to mark all of
+ * these. */
if ((!start_datetime.value || start_datetime.value->is_utc)
&& (!end_datetime.value || end_datetime.value->is_utc)) {
retval = TRUE;
@@ -134,8 +137,8 @@ cal_comp_util_compare_event_timezones (ECalComponent *comp,
}
/* If the event uses floating time for DTSTART & DTEND, return TRUE.
- Imported vCalendar files will use floating times, so we don't want
- to mark all of these. */
+ * Imported vCalendar files will use floating times, so we don't want
+ * to mark all of these. */
if (!start_datetime.tzid && !end_datetime.tzid) {
retval = TRUE;
goto out;
@@ -145,12 +148,12 @@ cal_comp_util_compare_event_timezones (ECalComponent *comp,
if (e_cal_component_compare_tzid (tzid, start_datetime.tzid)
&& e_cal_component_compare_tzid (tzid, end_datetime.tzid)) {
/* If both TZIDs are the same as the given zone's TZID, then
- we know the timezones are the same so we return TRUE. */
+ * we know the timezones are the same so we return TRUE. */
retval = TRUE;
} else {
/* If the TZIDs differ, we have to compare the UTC offsets
- of the start and end times, using their own timezones and
- the given timezone. */
+ * of the start and end times, using their own timezones and
+ * the given timezone. */
if (!e_cal_client_get_timezone_sync (client, start_datetime.tzid,
&start_zone, NULL, NULL))
goto out;
@@ -211,7 +214,8 @@ cal_comp_util_compare_event_timezones (ECalComponent *comp,
* user cancelled the deletion.
**/
gboolean
-cal_comp_is_on_server (ECalComponent *comp, ECalClient *client)
+cal_comp_is_on_server (ECalComponent *comp,
+ ECalClient *client)
{
const gchar *uid;
gchar *rid = NULL;
@@ -260,7 +264,8 @@ cal_comp_is_on_server (ECalComponent *comp, ECalClient *client)
* icalcomponent, not the ECalComponent.
**/
gboolean
-is_icalcomp_on_the_server (icalcomponent *icalcomp, ECalClient *client)
+is_icalcomp_on_the_server (icalcomponent *icalcomp,
+ ECalClient *client)
{
gboolean on_server;
ECalComponent *comp;
@@ -435,7 +440,8 @@ cal_comp_memo_new_with_defaults (ECalClient *client)
}
void
-cal_comp_update_time_by_active_window (ECalComponent *comp, EShell *shell)
+cal_comp_update_time_by_active_window (ECalComponent *comp,
+ EShell *shell)
{
GtkWindow *window;
@@ -502,7 +508,8 @@ cal_comp_update_time_by_active_window (ECalComponent *comp, EShell *shell)
* Returns: the number of icons owned by the component.
**/
gint
-cal_comp_util_get_n_icons (ECalComponent *comp, GSList **pixbufs)
+cal_comp_util_get_n_icons (ECalComponent *comp,
+ GSList **pixbufs)
{
GSList *categories_list, *elem;
gint num_icons = 0;
@@ -543,7 +550,8 @@ cal_comp_util_get_n_icons (ECalComponent *comp, GSList **pixbufs)
* cal_comp_selection_get_string_list() to get this list from target data.
**/
void
-cal_comp_selection_set_string_list (GtkSelectionData *data, GSList *str_list)
+cal_comp_selection_set_string_list (GtkSelectionData *data,
+ GSList *str_list)
{
/* format is "str1\0str2\0...strN\0" */
GSList *p;
@@ -612,7 +620,9 @@ cal_comp_selection_get_string_list (GtkSelectionData *selection_data)
}
static void
-datetime_to_zone (ECalClient *client, ECalComponentDateTime *date, const gchar *tzid)
+datetime_to_zone (ECalClient *client,
+ ECalComponentDateTime *date,
+ const gchar *tzid)
{
icaltimezone *from, *to;
@@ -783,7 +793,8 @@ comp_util_sanitize_recurrence_master (ECalComponent *comp,
}
gchar *
-icalcomp_suggest_filename (icalcomponent *icalcomp, const gchar *default_name)
+icalcomp_suggest_filename (icalcomponent *icalcomp,
+ const gchar *default_name)
{
icalproperty *prop;
const gchar *summary = NULL;
diff --git a/calendar/gui/comp-util.h b/calendar/gui/comp-util.h
index 1f69ddb107..12508da42e 100644
--- a/calendar/gui/comp-util.h
+++ b/calendar/gui/comp-util.h
@@ -35,8 +35,8 @@ struct _EShell;
void cal_comp_util_add_exdate (ECalComponent *comp, time_t t, icaltimezone *zone);
/* Returns TRUE if the component uses the given timezone for both DTSTART
- and DTEND, or if the UTC offsets of the start and end times are the same
- as in the given zone. */
+ * and DTEND, or if the UTC offsets of the start and end times are the same
+ * as in the given zone. */
gboolean cal_comp_util_compare_event_timezones (ECalComponent *comp,
ECalClient *client,
icaltimezone *zone);
diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c
index ab50520d5c..59cdb4515b 100644
--- a/calendar/gui/dialogs/alarm-dialog.c
+++ b/calendar/gui/dialogs/alarm-dialog.c
@@ -246,7 +246,8 @@ alarm_to_dialog (Dialog *dialog)
}
static void
-alarm_to_repeat_widgets (Dialog *dialog, ECalComponentAlarm *alarm)
+alarm_to_repeat_widgets (Dialog *dialog,
+ ECalComponentAlarm *alarm)
{
ECalComponentAlarmRepeat repeat;
@@ -284,7 +285,8 @@ alarm_to_repeat_widgets (Dialog *dialog, ECalComponentAlarm *alarm)
}
static void
-repeat_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
+repeat_widgets_to_alarm (Dialog *dialog,
+ ECalComponentAlarm *alarm)
{
ECalComponentAlarmRepeat repeat;
@@ -325,7 +327,8 @@ repeat_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
/* Fills the audio alarm data with the values from the widgets */
static void
-aalarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
+aalarm_widgets_to_alarm (Dialog *dialog,
+ ECalComponentAlarm *alarm)
{
gchar *url;
icalattach *attach;
@@ -344,7 +347,8 @@ aalarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
/* Fills the widgets with audio alarm data */
static void
-alarm_to_aalarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm)
+alarm_to_aalarm_widgets (Dialog *dialog,
+ ECalComponentAlarm *alarm)
{
const gchar *url;
icalattach *attach;
@@ -364,7 +368,8 @@ alarm_to_aalarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm)
/* Fills the widgets with display alarm data */
static void
-alarm_to_dalarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm )
+alarm_to_dalarm_widgets (Dialog *dialog,
+ ECalComponentAlarm *alarm)
{
ECalComponentText description;
GtkTextBuffer *text_buffer;
@@ -381,7 +386,8 @@ alarm_to_dalarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm )
/* Fills the display alarm data with the values from the widgets */
static void
-dalarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
+dalarm_widgets_to_alarm (Dialog *dialog,
+ ECalComponentAlarm *alarm)
{
gchar *str;
ECalComponentText description;
@@ -423,7 +429,8 @@ dalarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
/* Fills the mail alarm data with the values from the widgets */
static void
-malarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
+malarm_widgets_to_alarm (Dialog *dialog,
+ ECalComponentAlarm *alarm)
{
gchar *str;
ECalComponentText description;
@@ -497,7 +504,8 @@ malarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
/* Fills the widgets from mail alarm data */
static void
-alarm_to_malarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm )
+alarm_to_malarm_widgets (Dialog *dialog,
+ ECalComponentAlarm *alarm)
{
ENameSelectorModel *name_selector_model;
EDestinationStore *destination_store;
@@ -543,7 +551,8 @@ alarm_to_malarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm )
/* Fills the widgets from procedure alarm data */
static void
-alarm_to_palarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm)
+alarm_to_palarm_widgets (Dialog *dialog,
+ ECalComponentAlarm *alarm)
{
ECalComponentText description;
const gchar *url;
@@ -564,7 +573,8 @@ alarm_to_palarm_widgets (Dialog *dialog, ECalComponentAlarm *alarm)
/* Fills the procedure alarm data with the values from the widgets */
static void
-palarm_widgets_to_alarm (Dialog *dialog, ECalComponentAlarm *alarm)
+palarm_widgets_to_alarm (Dialog *dialog,
+ ECalComponentAlarm *alarm)
{
gchar *program;
icalattach *attach;
@@ -820,7 +830,7 @@ get_widgets (Dialog *dialog)
N_("Send an email")
};
- GtkComboBox *combo = (GtkComboBox*) dialog->action_combo;
+ GtkComboBox *combo = (GtkComboBox *) dialog->action_combo;
GtkCellRenderer *cell;
GtkListStore *store;
gint i;
@@ -881,13 +891,16 @@ get_widgets (Dialog *dialog)
}
static void
-addressbook_clicked_cb (GtkWidget *widget, Dialog *dialog)
+addressbook_clicked_cb (GtkWidget *widget,
+ Dialog *dialog)
{
e_name_selector_show_dialog (dialog->name_selector, dialog->toplevel);
}
static void
-addressbook_response_cb (GtkWidget *widget, gint response, gpointer data)
+addressbook_response_cb (GtkWidget *widget,
+ gint response,
+ gpointer data)
{
Dialog *dialog = data;
ENameSelectorDialog *name_selector_dialog;
@@ -913,8 +926,9 @@ setup_select_names (Dialog *dialog)
gtk_widget_show (dialog->malarm_addresses);
gtk_box_pack_end (GTK_BOX (dialog->malarm_address_group), dialog->malarm_addresses, TRUE, TRUE, 0);
- g_signal_connect (G_OBJECT (dialog->malarm_addressbook), "clicked",
- G_CALLBACK (addressbook_clicked_cb), dialog);
+ g_signal_connect (
+ dialog->malarm_addressbook, "clicked",
+ G_CALLBACK (addressbook_clicked_cb), dialog);
name_selector_dialog = e_name_selector_peek_dialog (dialog->name_selector);
g_signal_connect (name_selector_dialog, "response",
@@ -927,7 +941,8 @@ setup_select_names (Dialog *dialog)
* repeat group options as appropriate.
*/
static void
-repeat_toggle_toggled_cb (GtkToggleButton *toggle, gpointer data)
+repeat_toggle_toggled_cb (GtkToggleButton *toggle,
+ gpointer data)
{
Dialog *dialog = data;
gboolean active;
@@ -960,7 +975,8 @@ check_custom_sound (Dialog *dialog)
}
static void
-aalarm_sound_toggled_cb (GtkToggleButton *toggle, gpointer data)
+aalarm_sound_toggled_cb (GtkToggleButton *toggle,
+ gpointer data)
{
Dialog *dialog = data;
gboolean active;
@@ -972,7 +988,8 @@ aalarm_sound_toggled_cb (GtkToggleButton *toggle, gpointer data)
}
static void
-aalarm_attach_changed_cb (GtkWidget *widget, gpointer data)
+aalarm_attach_changed_cb (GtkWidget *widget,
+ gpointer data)
{
Dialog *dialog = data;
@@ -999,7 +1016,8 @@ check_custom_message (Dialog *dialog)
}
static void
-dalarm_message_toggled_cb (GtkToggleButton *toggle, gpointer data)
+dalarm_message_toggled_cb (GtkToggleButton *toggle,
+ gpointer data)
{
Dialog *dialog = data;
gboolean active;
@@ -1011,7 +1029,8 @@ dalarm_message_toggled_cb (GtkToggleButton *toggle, gpointer data)
}
static void
-dalarm_description_changed_cb (GtkWidget *widget, gpointer data)
+dalarm_description_changed_cb (GtkWidget *widget,
+ gpointer data)
{
Dialog *dialog = data;
@@ -1031,7 +1050,8 @@ check_custom_program (Dialog *dialog)
}
static void
-palarm_program_changed_cb (GtkWidget *widget, gpointer data)
+palarm_program_changed_cb (GtkWidget *widget,
+ gpointer data)
{
Dialog *dialog = data;
@@ -1074,7 +1094,8 @@ malarm_addresses_changed_cb (GtkWidget *editable,
}
static void
-malarm_message_toggled_cb (GtkToggleButton *toggle, gpointer data)
+malarm_message_toggled_cb (GtkToggleButton *toggle,
+ gpointer data)
{
Dialog *dialog = data;
gboolean active;
@@ -1086,7 +1107,8 @@ malarm_message_toggled_cb (GtkToggleButton *toggle, gpointer data)
}
static void
-malarm_description_changed_cb (GtkWidget *widget, gpointer data)
+malarm_description_changed_cb (GtkWidget *widget,
+ gpointer data)
{
Dialog *dialog = data;
@@ -1094,7 +1116,8 @@ malarm_description_changed_cb (GtkWidget *widget, gpointer data)
}
static void
-action_changed_cb (GtkWidget *action_combo, gpointer data)
+action_changed_cb (GtkWidget *action_combo,
+ gpointer data)
{
Dialog *dialog = data;
gchar *dir;
@@ -1146,43 +1169,53 @@ init_widgets (Dialog *dialog)
{
GtkTextBuffer *text_buffer;
- g_signal_connect (dialog->action_combo, "changed",
- G_CALLBACK (action_changed_cb),
- dialog);
+ g_signal_connect (
+ dialog->action_combo, "changed",
+ G_CALLBACK (action_changed_cb), dialog);
- g_signal_connect (G_OBJECT (dialog->repeat_toggle), "toggled",
- G_CALLBACK (repeat_toggle_toggled_cb), dialog);
+ g_signal_connect (
+ dialog->repeat_toggle, "toggled",
+ G_CALLBACK (repeat_toggle_toggled_cb), dialog);
/* Handle custom sounds */
- g_signal_connect (G_OBJECT (dialog->aalarm_sound), "toggled",
- G_CALLBACK (aalarm_sound_toggled_cb), dialog);
- g_signal_connect (G_OBJECT (dialog->aalarm_file_chooser), "selection-changed",
- G_CALLBACK (aalarm_attach_changed_cb), dialog);
+ g_signal_connect (
+ dialog->aalarm_sound, "toggled",
+ G_CALLBACK (aalarm_sound_toggled_cb), dialog);
+ g_signal_connect (
+ dialog->aalarm_file_chooser, "selection-changed",
+ G_CALLBACK (aalarm_attach_changed_cb), dialog);
/* Handle custom messages */
- g_signal_connect (G_OBJECT (dialog->dalarm_message), "toggled",
- G_CALLBACK (dalarm_message_toggled_cb), dialog);
+ g_signal_connect (
+ dialog->dalarm_message, "toggled",
+ G_CALLBACK (dalarm_message_toggled_cb), dialog);
text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->dalarm_description));
- g_signal_connect (G_OBJECT (text_buffer), "changed",
- G_CALLBACK (dalarm_description_changed_cb), dialog);
+ g_signal_connect (
+ text_buffer, "changed",
+ G_CALLBACK (dalarm_description_changed_cb), dialog);
/* Handle program */
- g_signal_connect (G_OBJECT (dialog->palarm_program), "changed",
- G_CALLBACK (palarm_program_changed_cb), dialog);
+ g_signal_connect (
+ dialog->palarm_program, "changed",
+ G_CALLBACK (palarm_program_changed_cb), dialog);
/* Handle custom email */
- g_signal_connect (G_OBJECT (dialog->malarm_message), "toggled",
- G_CALLBACK (malarm_message_toggled_cb), dialog);
+ g_signal_connect (
+ dialog->malarm_message, "toggled",
+ G_CALLBACK (malarm_message_toggled_cb), dialog);
text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->malarm_description));
- g_signal_connect (G_OBJECT (text_buffer), "changed",
- G_CALLBACK (malarm_description_changed_cb), dialog);
+ g_signal_connect (
+ text_buffer, "changed",
+ G_CALLBACK (malarm_description_changed_cb), dialog);
g_signal_connect (dialog->malarm_addresses, "changed",
G_CALLBACK (malarm_addresses_changed_cb), dialog);
}
gboolean
-alarm_dialog_run (GtkWidget *parent, ECalClient *cal_client, ECalComponentAlarm *alarm)
+alarm_dialog_run (GtkWidget *parent,
+ ECalClient *cal_client,
+ ECalComponentAlarm *alarm)
{
Dialog dialog;
GtkWidget *container;
diff --git a/calendar/gui/dialogs/alarm-list-dialog.c b/calendar/gui/dialogs/alarm-list-dialog.c
index c83dde429d..48503c1023 100644
--- a/calendar/gui/dialogs/alarm-list-dialog.c
+++ b/calendar/gui/dialogs/alarm-list-dialog.c
@@ -110,7 +110,8 @@ sensitize_buttons (Dialog *dialog)
/* Callback used for the "add reminder" button */
static void
-add_clicked_cb (GtkButton *button, gpointer data)
+add_clicked_cb (GtkButton *button,
+ gpointer data)
{
Dialog *dialog = data;
ECalComponentAlarm *alarm;
@@ -140,7 +141,8 @@ add_clicked_cb (GtkButton *button, gpointer data)
/* Callback used for the "edit reminder" button */
static void
-edit_clicked_cb (GtkButton *button, gpointer data)
+edit_clicked_cb (GtkButton *button,
+ gpointer data)
{
Dialog *dialog = data;
GtkTreeSelection *selection;
@@ -168,7 +170,8 @@ edit_clicked_cb (GtkButton *button, gpointer data)
/* Callback used for the "delete reminder" button */
static void
-delete_clicked_cb (GtkButton *button, gpointer data)
+delete_clicked_cb (GtkButton *button,
+ gpointer data)
{
Dialog *dialog = data;
GtkTreeSelection *selection;
@@ -203,7 +206,8 @@ delete_clicked_cb (GtkButton *button, gpointer data)
}
static void
-selection_changed_cb (GtkTreeSelection *selection, gpointer data)
+selection_changed_cb (GtkTreeSelection *selection,
+ gpointer data)
{
Dialog *dialog = data;
@@ -211,7 +215,8 @@ selection_changed_cb (GtkTreeSelection *selection, gpointer data)
}
void
-alarm_list_dialog_set_client (GtkWidget *dlg_box, ECalClient *cal_client)
+alarm_list_dialog_set_client (GtkWidget *dlg_box,
+ ECalClient *cal_client)
{
Dialog *dialog;
@@ -310,7 +315,8 @@ alarm_list_dialog_run (GtkWidget *parent,
}
GtkWidget *
-alarm_list_dialog_peek (ECalClient *cal_client, EAlarmList *list_store)
+alarm_list_dialog_peek (ECalClient *cal_client,
+ EAlarmList *list_store)
{
Dialog *dialog;
diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c
index 3894061eb0..0ffdb4cf1f 100644
--- a/calendar/gui/dialogs/calendar-setup.c
+++ b/calendar/gui/dialogs/calendar-setup.c
@@ -59,7 +59,9 @@ struct _CalendarSourceDialog {
};
static gboolean
-eccp_check_complete (EConfig *ec, const gchar *pageid, gpointer data)
+eccp_check_complete (EConfig *ec,
+ const gchar *pageid,
+ gpointer data)
{
CalendarSourceDialog *sdialog = data;
gboolean valid = TRUE;
@@ -101,7 +103,9 @@ eccp_commit (EConfig *ec,
}
static void
-eccp_free (EConfig *ec, GSList *items, gpointer data)
+eccp_free (EConfig *ec,
+ GSList *items,
+ gpointer data)
{
CalendarSourceDialog *sdialog = data;
@@ -117,7 +121,8 @@ eccp_free (EConfig *ec, GSList *items, gpointer data)
}
static void
-eccp_type_changed (GtkComboBox *dropdown, CalendarSourceDialog *sdialog)
+eccp_type_changed (GtkComboBox *dropdown,
+ CalendarSourceDialog *sdialog)
{
gint id = gtk_combo_box_get_active (dropdown);
GtkTreeModel *model;
@@ -169,7 +174,7 @@ eccp_get_source_type (EConfig *ec,
gtk_label_set_markup (GTK_LABEL (type), markup);
gtk_misc_set_alignment (GTK_MISC (type), 0.0, 0.5);
g_free (markup);
- gtk_table_attach (GTK_TABLE (parent), type, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
+ gtk_table_attach (GTK_TABLE (parent), type, 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
} else {
GtkCellRenderer *cell;
GtkListStore *store;
@@ -203,19 +208,20 @@ eccp_get_source_type (EConfig *ec,
gtk_combo_box_set_active ((GtkComboBox *) type, active);
g_signal_connect (type, "changed", G_CALLBACK (eccp_type_changed), sdialog);
gtk_widget_show (type);
- gtk_table_attach (GTK_TABLE (parent), type, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
+ gtk_table_attach (GTK_TABLE (parent), type, 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), type);
}
gtk_widget_show (label);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
- gtk_table_attach (GTK_TABLE (parent), label, 0, 1, row, row+1, GTK_FILL, 0, 0, 0);
+ gtk_table_attach (GTK_TABLE (parent), label, 0, 1, row, row + 1, GTK_FILL, 0, 0, 0);
return type;
}
static void
-name_changed (GtkEntry *entry, ECalConfigTargetSource *t)
+name_changed (GtkEntry *entry,
+ ECalConfigTargetSource *t)
{
ESource *source = t->source;
e_source_set_name (source, gtk_entry_get_text (GTK_ENTRY (entry)));
@@ -242,13 +248,15 @@ eccp_get_source_name (EConfig *ec,
label = gtk_label_new_with_mnemonic (_("_Name:"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_widget_show (label);
- gtk_table_attach (GTK_TABLE (parent), label, 0, 1, row, row+1, GTK_FILL, 0, 0, 0);
+ gtk_table_attach (GTK_TABLE (parent), label, 0, 1, row, row + 1, GTK_FILL, 0, 0, 0);
entry = gtk_entry_new ();
gtk_widget_show (entry);
- gtk_table_attach (GTK_TABLE (parent), entry, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
+ gtk_table_attach (GTK_TABLE (parent), entry, 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
- g_signal_connect (G_OBJECT (entry), "changed", G_CALLBACK (name_changed), (gpointer) t);
+ g_signal_connect (
+ entry, "changed",
+ G_CALLBACK (name_changed), (gpointer) t);
if (source)
gtk_entry_set_text (GTK_ENTRY (entry), e_source_peek_name (source));
@@ -257,7 +265,8 @@ eccp_get_source_name (EConfig *ec,
}
static void
-offline_status_changed_cb (GtkWidget *widget, CalendarSourceDialog *sdialog)
+offline_status_changed_cb (GtkWidget *widget,
+ CalendarSourceDialog *sdialog)
{
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
@@ -296,7 +305,7 @@ eccp_general_offline (EConfig *ec,
gtk_widget_show (offline_setting);
g_signal_connect (offline_setting, "toggled", G_CALLBACK (offline_status_changed_cb), sdialog);
- gtk_table_attach (GTK_TABLE (parent), offline_setting, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
+ gtk_table_attach (GTK_TABLE (parent), offline_setting, 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
}
@@ -307,7 +316,8 @@ eccp_general_offline (EConfig *ec,
}
static void
-alarm_status_changed_cb (GtkWidget *widget, CalendarSourceDialog *sdialog)
+alarm_status_changed_cb (GtkWidget *widget,
+ CalendarSourceDialog *sdialog)
{
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
e_source_set_property (sdialog->source, "alarm", "true");
@@ -317,11 +327,11 @@ alarm_status_changed_cb (GtkWidget *widget, CalendarSourceDialog *sdialog)
static GtkWidget *
eccp_notify_reminders (EConfig *ec,
- EConfigItem *item,
- GtkWidget *parent,
- GtkWidget *old,
- gint position,
- gpointer data)
+ EConfigItem *item,
+ GtkWidget *parent,
+ GtkWidget *old,
+ gint position,
+ gpointer data)
{
CalendarSourceDialog *sdialog = data;
GtkWidget *reminder_setting = NULL;
@@ -342,20 +352,22 @@ eccp_notify_reminders (EConfig *ec,
gtk_widget_show (reminder_setting);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (reminder_setting), alarm && g_str_equal (alarm, "true"));
g_signal_connect (reminder_setting, "toggled", G_CALLBACK (alarm_status_changed_cb), sdialog);
- gtk_table_attach (GTK_TABLE (parent), reminder_setting, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
+ gtk_table_attach (GTK_TABLE (parent), reminder_setting, 1, 2, row, row + 1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
return reminder_setting;
}
static void
-color_changed (GtkColorButton *color_button, ECalConfigTargetSource *target)
+color_changed (GtkColorButton *color_button,
+ ECalConfigTargetSource *target)
{
ESource *source = target->source;
gchar color_spec[16];
GdkColor color;
gtk_color_button_get_color (color_button, &color);
- g_snprintf (color_spec, sizeof (color_spec), "#%04x%04x%04x",
+ g_snprintf (
+ color_spec, sizeof (color_spec), "#%04x%04x%04x",
color.red, color.green, color.blue);
e_source_set_color_spec (source, color_spec);
}
@@ -475,7 +487,9 @@ static ECalConfigItem ecmp_items[] = {
*/
static void
-cs_load_sources (CalendarSourceDialog *sdialog, const gchar *conf_key, ESourceGroup *group)
+cs_load_sources (CalendarSourceDialog *sdialog,
+ const gchar *conf_key,
+ ESourceGroup *group)
{
GConfClient *gconf;
@@ -501,7 +515,9 @@ cs_load_sources (CalendarSourceDialog *sdialog, const gchar *conf_key, ESourceGr
* Show calendar properties for @source.
**/
void
-calendar_setup_edit_calendar (GtkWindow *parent, ESource *source, ESourceGroup *group)
+calendar_setup_edit_calendar (GtkWindow *parent,
+ ESource *source,
+ ESourceGroup *group)
{
CalendarSourceDialog *sdialog = g_new0 (CalendarSourceDialog, 1);
gchar *xml;
@@ -561,7 +577,8 @@ calendar_setup_new_calendar (GtkWindow *parent)
}
void
-calendar_setup_edit_task_list (GtkWindow *parent, ESource *source)
+calendar_setup_edit_task_list (GtkWindow *parent,
+ ESource *source)
{
CalendarSourceDialog *sdialog = g_new0 (CalendarSourceDialog, 1);
gchar *xml;
@@ -620,7 +637,8 @@ calendar_setup_new_task_list (GtkWindow *parent)
}
void
-calendar_setup_edit_memo_list (GtkWindow *parent, ESource *source)
+calendar_setup_edit_memo_list (GtkWindow *parent,
+ ESource *source)
{
CalendarSourceDialog *sdialog = g_new0 (CalendarSourceDialog, 1);
gchar *xml;
diff --git a/calendar/gui/dialogs/changed-comp.c b/calendar/gui/dialogs/changed-comp.c
index 5fb0240037..78928795f6 100644
--- a/calendar/gui/dialogs/changed-comp.c
+++ b/calendar/gui/dialogs/changed-comp.c
@@ -44,7 +44,10 @@
* Return value: TRUE if the user clicked Yes, FALSE otherwise.
**/
gboolean
-changed_component_dialog (GtkWindow *parent, ECalComponent *comp, gboolean deleted, gboolean changed)
+changed_component_dialog (GtkWindow *parent,
+ ECalComponent *comp,
+ gboolean deleted,
+ gboolean changed)
{
GtkWidget *dialog;
ECalComponentVType vtype;
diff --git a/calendar/gui/dialogs/comp-editor-page.c b/calendar/gui/dialogs/comp-editor-page.c
index 89adf7c491..3d8af28153 100644
--- a/calendar/gui/dialogs/comp-editor-page.c
+++ b/calendar/gui/dialogs/comp-editor-page.c
@@ -329,7 +329,8 @@ comp_editor_page_fill_widgets (CompEditorPage *page,
* Returns: TRUE if the component could be filled, FALSE otherwise
**/
gboolean
-comp_editor_page_fill_component (CompEditorPage *page, ECalComponent *comp)
+comp_editor_page_fill_component (CompEditorPage *page,
+ ECalComponent *comp)
{
CompEditorPageClass *class;
@@ -355,7 +356,8 @@ comp_editor_page_fill_component (CompEditorPage *page, ECalComponent *comp)
* Returns: TRUE if the timezones were added, FALSE otherwise.
*/
gboolean
-comp_editor_page_fill_timezones (CompEditorPage *page, GHashTable *timezones)
+comp_editor_page_fill_timezones (CompEditorPage *page,
+ GHashTable *timezones)
{
CompEditorPageClass *class;
@@ -378,7 +380,8 @@ comp_editor_page_fill_timezones (CompEditorPage *page, GHashTable *timezones)
* Sets the date values for this group of widgets
**/
void
-comp_editor_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
+comp_editor_page_set_dates (CompEditorPage *page,
+ CompEditorPageDates *dates)
{
CompEditorPageClass *class;
@@ -421,7 +424,7 @@ comp_editor_page_add_attendee (CompEditorPage *page,
**/
void
comp_editor_page_notify_dates_changed (CompEditorPage *page,
- CompEditorPageDates *dates)
+ CompEditorPageDates *dates)
{
g_return_if_fail (IS_COMP_EDITOR_PAGE (page));
@@ -442,8 +445,8 @@ comp_editor_page_notify_dates_changed (CompEditorPage *page,
*/
void
comp_editor_page_display_validation_error (CompEditorPage *page,
- const gchar *msg,
- GtkWidget *field)
+ const gchar *msg,
+ GtkWidget *field)
{
GtkWidget *dialog;
diff --git a/calendar/gui/dialogs/comp-editor-page.h b/calendar/gui/dialogs/comp-editor-page.h
index a33d83810d..f8ab87de63 100644
--- a/calendar/gui/dialogs/comp-editor-page.h
+++ b/calendar/gui/dialogs/comp-editor-page.h
@@ -71,9 +71,9 @@ struct _CompEditorPage {
GObject object;
/* The GtkAccelGroup for the page. We install this when the page is
- mapped, and uninstall when it is unmapped. libglade would do this
- normally, but we create our pages individually so have to do it
- ourselves. */
+ * mapped, and uninstall when it is unmapped. libglade would do this
+ * normally, but we create our pages individually so have to do it
+ * ourselves. */
GtkAccelGroup *accel_group;
CompEditorPagePrivate *priv;
diff --git a/calendar/gui/dialogs/comp-editor-util.c b/calendar/gui/dialogs/comp-editor-util.c
index a98314b389..cbc34cb108 100644
--- a/calendar/gui/dialogs/comp-editor-util.c
+++ b/calendar/gui/dialogs/comp-editor-util.c
@@ -49,7 +49,8 @@
* results.
**/
void
-comp_editor_dates (CompEditorPageDates *dates, ECalComponent *comp)
+comp_editor_dates (CompEditorPageDates *dates,
+ ECalComponent *comp)
{
ECalComponentDateTime dt;
@@ -59,8 +60,8 @@ comp_editor_dates (CompEditorPageDates *dates, ECalComponent *comp)
dates->complete = NULL;
/* Note that the ECalComponentDateTime's returned contain allocated
- icaltimetype and tzid values, so we just take over ownership of
- those. */
+ * icaltimetype and tzid values, so we just take over ownership of
+ * those. */
e_cal_component_get_dtstart (comp, &dt);
if (dt.value) {
dates->start = g_new (ECalComponentDateTime, 1);
@@ -89,7 +90,7 @@ void
comp_editor_free_dates (CompEditorPageDates *dates)
{
/* Note that e_cal_component_free_datetime() only frees the fields in
- the struct. It doesn't free the struct itself, so we do that. */
+ * the struct. It doesn't free the struct itself, so we do that. */
if (dates->start) {
e_cal_component_free_datetime (dates->start);
g_free (dates->start);
@@ -142,9 +143,9 @@ comp_editor_new_date_edit (gboolean show_date,
}
/* Returns the current time, for EDateEdit widgets and ECalendar items in the
- dialogs.
- FIXME: Should probably use the timezone from somewhere in the component
- rather than the current timezone. */
+ * dialogs.
+ * FIXME: Should probably use the timezone from somewhere in the component
+ * rather than the current timezone. */
struct tm
comp_editor_get_current_time (EDateEdit *date_edit,
CompEditor *editor)
@@ -242,7 +243,9 @@ comp_editor_strip_categories (const gchar *categories)
}
static GSList *
-manage_new_attendees (const GSList *lst, const gchar *eml, gboolean add)
+manage_new_attendees (const GSList *lst,
+ const gchar *eml,
+ gboolean add)
{
GSList *copy = NULL;
const GSList *l;
@@ -328,7 +331,8 @@ comp_editor_manage_new_attendees (ECalComponent *comp,
* Copies "new-attendees" information from @src to @des component.
**/
void
-comp_editor_copy_new_attendees (ECalComponent *des, ECalComponent *src)
+comp_editor_copy_new_attendees (ECalComponent *des,
+ ECalComponent *src)
{
GSList *copy = NULL, *l;
@@ -350,7 +354,8 @@ comp_editor_copy_new_attendees (ECalComponent *des, ECalComponent *src)
* Returns: Whether @ma is present in the list of new attendees of the comp.
**/
gboolean
-comp_editor_have_in_new_attendees (ECalComponent *comp, EMeetingAttendee *ma)
+comp_editor_have_in_new_attendees (ECalComponent *comp,
+ EMeetingAttendee *ma)
{
const gchar *eml;
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index c94b2f5016..1d5a45af31 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -107,7 +107,7 @@ struct _CompEditorPrivate {
guint32 attachment_bar_visible : 1;
/* TODO use this flags for setting all the boolean variables
- below */
+ * below */
CompEditorFlags flags;
icaltimezone *zone;
@@ -238,7 +238,7 @@ static void
attachment_store_changed_cb (CompEditor *editor)
{
/* Mark the editor as changed so it prompts about unsaved
- changes on close */
+ * changes on close */
comp_editor_set_changed (editor, TRUE);
}
@@ -348,8 +348,8 @@ get_attachment_list (CompEditor *editor)
}
/* This sets the focus to the toplevel, so any field being edited is committed.
- FIXME: In future we may also want to check some of the fields are valid,
- e.g. the EDateEdit fields. */
+ * FIXME: In future we may also want to check some of the fields are valid,
+ * e.g. the EDateEdit fields. */
static void
commit_all_fields (CompEditor *editor)
{
@@ -443,7 +443,9 @@ listen_for_changes (CompEditor *editor)
}
static void
-send_timezone (gpointer key, gpointer value, gpointer user_data)
+send_timezone (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
icaltimezone *zone = value;
CompEditor *editor = user_data;
@@ -885,8 +887,8 @@ action_print_preview_cb (GtkAction *action,
static gboolean
remove_event_dialog (ECalClient *client,
- ECalComponent *comp,
- GtkWindow *parent)
+ ECalComponent *comp,
+ GtkWindow *parent)
{
GtkWidget *dialog;
gboolean ret;
@@ -1508,7 +1510,8 @@ comp_editor_get_property (GObject *object,
}
static void
-unref_page_cb (gpointer editor_page, gpointer comp_editor)
+unref_page_cb (gpointer editor_page,
+ gpointer comp_editor)
{
if (IS_COMP_EDITOR_PAGE (editor_page)) {
GtkWidget *page_widget;
@@ -1568,25 +1571,26 @@ comp_editor_dispose (GObject *object)
}
if (priv->view) {
- g_signal_handlers_disconnect_matched (G_OBJECT (priv->view),
- G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL,
- object);
-
+ g_signal_handlers_disconnect_matched (
+ G_OBJECT (priv->view), G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL, object);
g_object_unref (priv->view);
priv->view = NULL;
}
if (priv->attachment_view) {
- g_signal_handlers_disconnect_matched (G_OBJECT (e_attachment_view_get_store (E_ATTACHMENT_VIEW (priv->attachment_view))),
- G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL,
- object);
+ EAttachmentStore *store;
+
+ store = e_attachment_view_get_store (
+ E_ATTACHMENT_VIEW (priv->attachment_view));
+ g_signal_handlers_disconnect_matched (
+ G_OBJECT (store), G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL, object);
}
/* We want to destroy the pages after the widgets get destroyed,
- since they have lots of signal handlers connected to the widgets
- with the pages as the data. */
+ * since they have lots of signal handlers connected to the widgets
+ * with the pages as the data. */
g_list_foreach (priv->pages, (GFunc) unref_page_cb, object);
g_list_free (priv->pages);
priv->pages = NULL;
@@ -2050,7 +2054,7 @@ comp_editor_init (CompEditor *editor)
/* Fine Tuning */
action = comp_editor_get_action (editor, "attach");
- g_object_set (G_OBJECT (action), "short-label", _("Attach"), NULL);
+ g_object_set (action, "short-label", _("Attach"), NULL);
/* Desensitize the "save" action. */
action = comp_editor_get_action (editor, "save");
@@ -2175,7 +2179,8 @@ comp_editor_init (CompEditor *editor)
}
static gboolean
-prompt_and_save_changes (CompEditor *editor, gboolean send)
+prompt_and_save_changes (CompEditor *editor,
+ gboolean send)
{
CompEditorPrivate *priv;
gboolean correct = FALSE;
@@ -2254,8 +2259,8 @@ close_dialog (CompEditor *editor)
g_signal_emit_by_name (editor, "comp_closed", priv->saved);
/* FIXME Unfortunately we do this here because otherwise corba
- calls happen during destruction and we might get a change
- notification back when we are in an inconsistent state */
+ * 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);
@@ -2275,7 +2280,8 @@ comp_editor_compare (CompEditor *editor_a,
}
void
-comp_editor_set_existing_org (CompEditor *editor, gboolean existing_org)
+comp_editor_set_existing_org (CompEditor *editor,
+ gboolean existing_org)
{
g_return_if_fail (IS_COMP_EDITOR (editor));
@@ -2745,9 +2751,9 @@ page_unmapped_cb (GtkWidget *page_widget,
**/
void
comp_editor_append_widget (CompEditor *editor,
- GtkWidget *page,
- const gchar *label,
- gboolean add)
+ GtkWidget *page,
+ const gchar *label,
+ gboolean add)
{
CompEditorPrivate *priv;
GtkWidget *label_widget = NULL;
@@ -2771,7 +2777,7 @@ comp_editor_append_widget (CompEditor *editor,
}
/* Listen for when the page is mapped/unmapped so we can
- install/uninstall the appropriate GtkAccelGroup.
+ * install/uninstall the appropriate GtkAccelGroup.
g_signal_connect (
page, "map",
G_CALLBACK (page_mapped_cb), page);
@@ -2794,9 +2800,9 @@ comp_editor_append_widget (CompEditor *editor,
**/
void
comp_editor_append_page (CompEditor *editor,
- CompEditorPage *page,
- const gchar *label,
- gboolean add)
+ CompEditorPage *page,
+ const gchar *label,
+ gboolean add)
{
CompEditorPrivate *priv;
GtkWidget *page_widget;
@@ -2843,7 +2849,7 @@ comp_editor_append_page (CompEditor *editor,
G_CALLBACK (page_dates_changed_cb), editor);
/* Listen for when the page is mapped/unmapped so we can
- install/uninstall the appropriate GtkAccelGroup. */
+ * install/uninstall the appropriate GtkAccelGroup. */
g_signal_connect (
page_widget, "map",
G_CALLBACK (page_mapped_cb), page);
@@ -2866,7 +2872,8 @@ comp_editor_append_page (CompEditor *editor,
* Removes the page from the component editor
**/
void
-comp_editor_remove_page (CompEditor *editor, CompEditorPage *page)
+comp_editor_remove_page (CompEditor *editor,
+ CompEditorPage *page)
{
CompEditorPrivate *priv;
GtkWidget *page_widget;
@@ -2902,7 +2909,8 @@ comp_editor_remove_page (CompEditor *editor, CompEditorPage *page)
*
**/
void
-comp_editor_show_page (CompEditor *editor, CompEditorPage *page)
+comp_editor_show_page (CompEditor *editor,
+ CompEditorPage *page)
{
CompEditorPrivate *priv;
GtkWidget *page_widget;
@@ -3009,7 +3017,8 @@ attachment_loaded_cb (EAttachment *attachment,
}
static void
-set_attachment_list (CompEditor *editor, GSList *uri_list)
+set_attachment_list (CompEditor *editor,
+ GSList *uri_list)
{
EAttachmentStore *store;
EAttachmentView *view;
@@ -3090,7 +3099,8 @@ fill_widgets (CompEditor *editor)
}
static void
-real_edit_comp (CompEditor *editor, ECalComponent *comp)
+real_edit_comp (CompEditor *editor,
+ ECalComponent *comp)
{
CompEditorPrivate *priv;
@@ -3152,7 +3162,8 @@ set_attendees_for_delegation (ECalComponent *comp,
}
static void
-get_users_from_memo_comp (ECalComponent *comp, GSList **users)
+get_users_from_memo_comp (ECalComponent *comp,
+ GSList **users)
{
icalcomponent *icalcomp;
icalproperty *icalprop;
@@ -3298,7 +3309,8 @@ real_send_comp (CompEditor *editor,
* Starts the editor editing the given component
**/
void
-comp_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
+comp_editor_edit_comp (CompEditor *editor,
+ ECalComponent *comp)
{
CompEditorClass *class;
@@ -3328,7 +3340,8 @@ comp_editor_get_comp (CompEditor *editor)
* Returns: Newly allocated component, should be unref-ed by g_object_unref().
**/
ECalComponent *
-comp_editor_get_current_comp (CompEditor *editor, gboolean *correct)
+comp_editor_get_current_comp (CompEditor *editor,
+ gboolean *correct)
{
CompEditorPrivate *priv;
ECalComponent *comp;
@@ -3361,7 +3374,8 @@ comp_editor_get_current_comp (CompEditor *editor, gboolean *correct)
*
**/
gboolean
-comp_editor_save_comp (CompEditor *editor, gboolean send)
+comp_editor_save_comp (CompEditor *editor,
+ gboolean send)
{
return prompt_and_save_changes (editor, send);
}
@@ -3516,7 +3530,7 @@ comp_editor_get_mime_attach_list (CompEditor *editor)
static void
page_dates_changed_cb (CompEditor *editor,
- CompEditorPageDates *dates,
+ CompEditorPageDates *dates,
CompEditorPage *page)
{
CompEditorPrivate *priv = editor->priv;
diff --git a/calendar/gui/dialogs/comp-editor.h b/calendar/gui/dialogs/comp-editor.h
index aca5c8ef11..c2a3082a31 100644
--- a/calendar/gui/dialogs/comp-editor.h
+++ b/calendar/gui/dialogs/comp-editor.h
@@ -91,11 +91,11 @@ struct _CompEditorClass {
};
typedef enum {
- COMP_EDITOR_NEW_ITEM = 1<<0,
- COMP_EDITOR_MEETING = 1<<1,
- COMP_EDITOR_DELEGATE = 1<<2,
- COMP_EDITOR_USER_ORG = 1<<3,
- COMP_EDITOR_IS_ASSIGNED = 1<<4,
+ COMP_EDITOR_NEW_ITEM = 1 << 0,
+ COMP_EDITOR_MEETING = 1 << 1,
+ COMP_EDITOR_DELEGATE = 1 << 2,
+ COMP_EDITOR_USER_ORG = 1 << 3,
+ COMP_EDITOR_IS_ASSIGNED = 1 << 4,
COMP_EDITOR_IS_SHARED = 1 << 5,
COMP_EDITOR_SEND_TO_NEW_ATTENDEES_ONLY = 1 << 6
} CompEditorFlags;
diff --git a/calendar/gui/dialogs/copy-source-dialog.c b/calendar/gui/dialogs/copy-source-dialog.c
index 31e7cef1b5..e247f13264 100644
--- a/calendar/gui/dialogs/copy-source-dialog.c
+++ b/calendar/gui/dialogs/copy-source-dialog.c
@@ -41,7 +41,9 @@ typedef struct {
} CopySourceDialogData;
static void
-show_error (CopySourceDialogData *csdd, const gchar *msg, const GError *error)
+show_error (CopySourceDialogData *csdd,
+ const gchar *msg,
+ const GError *error)
{
GtkWidget *dialog;
@@ -59,7 +61,8 @@ struct ForeachTzidData
};
static void
-add_timezone_to_cal_cb (icalparameter *param, gpointer data)
+add_timezone_to_cal_cb (icalparameter *param,
+ gpointer data)
{
struct ForeachTzidData *ftd = data;
icaltimezone *tz = NULL;
@@ -231,7 +234,9 @@ copy_source (const CopySourceDialogData *const_csdd)
* source to copy to.
*/
void
-copy_source_dialog (GtkWindow *parent, ESource *source, ECalClientSourceType obj_type)
+copy_source_dialog (GtkWindow *parent,
+ ESource *source,
+ ECalClientSourceType obj_type)
{
CopySourceDialogData csdd;
diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c
index f5ac9c9ce4..a28fa00221 100644
--- a/calendar/gui/dialogs/delete-comp.c
+++ b/calendar/gui/dialogs/delete-comp.c
@@ -162,7 +162,8 @@ delete_component_dialog (ECalComponent *comp,
}
static void
-cb_toggled_cb (GtkToggleButton *toggle, gpointer data)
+cb_toggled_cb (GtkToggleButton *toggle,
+ gpointer data)
{
gboolean active = FALSE;
GtkWidget *entry = (GtkWidget *) data;
@@ -172,7 +173,10 @@ cb_toggled_cb (GtkToggleButton *toggle, gpointer data)
}
gboolean
-prompt_retract_dialog (ECalComponent *comp, gchar **retract_text, GtkWidget *parent, gboolean *retract)
+prompt_retract_dialog (ECalComponent *comp,
+ gchar **retract_text,
+ GtkWidget *parent,
+ gboolean *retract)
{
gchar *message = NULL;
ECalComponentVType type = E_CAL_COMPONENT_NO_TYPE;
diff --git a/calendar/gui/dialogs/delete-error.c b/calendar/gui/dialogs/delete-error.c
index cd461c7858..a5cc6a1b02 100644
--- a/calendar/gui/dialogs/delete-error.c
+++ b/calendar/gui/dialogs/delete-error.c
@@ -39,7 +39,8 @@
*
**/
void
-delete_error_dialog (const GError *error, ECalComponentVType vtype)
+delete_error_dialog (const GError *error,
+ ECalComponentVType vtype)
{
GtkWidget *dialog;
const gchar *str;
diff --git a/calendar/gui/dialogs/e-delegate-dialog.c b/calendar/gui/dialogs/e-delegate-dialog.c
index da6eeea05d..af61f807a8 100644
--- a/calendar/gui/dialogs/e-delegate-dialog.c
+++ b/calendar/gui/dialogs/e-delegate-dialog.c
@@ -114,7 +114,9 @@ e_delegate_dialog_finalize (GObject *object)
}
EDelegateDialog *
-e_delegate_dialog_construct (EDelegateDialog *edd, const gchar *name, const gchar *address)
+e_delegate_dialog_construct (EDelegateDialog *edd,
+ const gchar *name,
+ const gchar *address)
{
EDelegateDialogPrivate *priv;
EDestinationStore *destination_store;
@@ -157,7 +159,7 @@ e_delegate_dialog_construct (EDelegateDialog *edd, const gchar *name, const gcha
e_destination_store_append_destination (destination_store, dest);
g_object_unref (dest);
- g_signal_connect((priv->addressbook), "clicked",
+ g_signal_connect ((priv->addressbook), "clicked",
G_CALLBACK (addressbook_clicked_cb), edd);
name_selector_dialog = e_name_selector_peek_dialog (priv->name_selector);
@@ -188,7 +190,8 @@ get_widgets (EDelegateDialog *edd)
}
static void
-addressbook_clicked_cb (GtkWidget *widget, gpointer data)
+addressbook_clicked_cb (GtkWidget *widget,
+ gpointer data)
{
EDelegateDialog *edd = data;
@@ -197,7 +200,9 @@ addressbook_clicked_cb (GtkWidget *widget, gpointer data)
}
static void
-addressbook_response_cb (GtkWidget *widget, gint response, gpointer data)
+addressbook_response_cb (GtkWidget *widget,
+ gint response,
+ gpointer data)
{
EDelegateDialog *edd = data;
EDelegateDialogPrivate *priv;
@@ -218,7 +223,8 @@ addressbook_response_cb (GtkWidget *widget, gint response, gpointer data)
* editor could not be created.
**/
EDelegateDialog *
-e_delegate_dialog_new (const gchar *name, const gchar *address)
+e_delegate_dialog_new (const gchar *name,
+ const gchar *address)
{
EDelegateDialog *edd;
@@ -227,7 +233,7 @@ e_delegate_dialog_new (const gchar *name, const gchar *address)
}
gchar *
-e_delegate_dialog_get_delegate (EDelegateDialog *edd)
+e_delegate_dialog_get_delegate (EDelegateDialog *edd)
{
EDelegateDialogPrivate *priv;
ENameSelectorModel *name_selector_model;
@@ -258,7 +264,7 @@ e_delegate_dialog_get_delegate (EDelegateDialog *edd)
}
gchar *
-e_delegate_dialog_get_delegate_name (EDelegateDialog *edd)
+e_delegate_dialog_get_delegate_name (EDelegateDialog *edd)
{
EDelegateDialogPrivate *priv;
ENameSelectorModel *name_selector_model;
@@ -288,8 +294,8 @@ e_delegate_dialog_get_delegate_name (EDelegateDialog *edd)
return g_strdup (priv->name);
}
-GtkWidget*
-e_delegate_dialog_get_toplevel (EDelegateDialog *edd)
+GtkWidget *
+e_delegate_dialog_get_toplevel (EDelegateDialog *edd)
{
EDelegateDialogPrivate *priv;
diff --git a/calendar/gui/dialogs/e-delegate-dialog.h b/calendar/gui/dialogs/e-delegate-dialog.h
index 5e1c9f0e5b..032901c8bc 100644
--- a/calendar/gui/dialogs/e-delegate-dialog.h
+++ b/calendar/gui/dialogs/e-delegate-dialog.h
@@ -52,11 +52,11 @@ struct _EDelegateDialogClass {
GType e_delegate_dialog_get_type (void);
-EDelegateDialog* e_delegate_dialog_construct (EDelegateDialog *etd,
+EDelegateDialog * e_delegate_dialog_construct (EDelegateDialog *etd,
const gchar *name,
const gchar *address);
-EDelegateDialog* e_delegate_dialog_new (const gchar *name,
+EDelegateDialog * e_delegate_dialog_new (const gchar *name,
const gchar *address);
gchar * e_delegate_dialog_get_delegate (EDelegateDialog *etd);
@@ -66,7 +66,7 @@ gchar * e_delegate_dialog_get_delegate_name (EDelegateDialog *etd);
void e_delegate_dialog_set_delegate (EDelegateDialog *etd,
const gchar *address);
-GtkWidget* e_delegate_dialog_get_toplevel (EDelegateDialog *etd);
+GtkWidget * e_delegate_dialog_get_toplevel (EDelegateDialog *etd);
diff --git a/calendar/gui/dialogs/e-send-options-utils.c b/calendar/gui/dialogs/e-send-options-utils.c
index d85e821d91..f8e933574c 100644
--- a/calendar/gui/dialogs/e-send-options-utils.c
+++ b/calendar/gui/dialogs/e-send-options-utils.c
@@ -31,7 +31,9 @@
#include <string.h>
void
-e_send_options_utils_set_default_data (ESendOptionsDialog *sod, ESource *source, const gchar *type)
+e_send_options_utils_set_default_data (ESendOptionsDialog *sod,
+ ESource *source,
+ const gchar *type)
{
ESendOptionsGeneral *gopts = NULL;
ESendOptionsStatusTracking *sopts;
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 0529e90286..f89b67056d 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -377,7 +377,7 @@ event_editor_constructor (GType type,
}
event_page_set_meeting (priv->event_page, TRUE);
- priv->meeting_shown=TRUE;
+ priv->meeting_shown = TRUE;
if (e_shell_get_express_mode (shell)) {
attendee_page = event_page_get_attendee_page (priv->event_page);
@@ -597,7 +597,8 @@ event_editor_init (EventEditor *ee)
}
static void
-event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
+event_editor_edit_comp (CompEditor *editor,
+ ECalComponent *comp)
{
EventEditorPrivate *priv;
ECalComponentOrganizer organizer;
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 0ecb18393c..653f0215ac 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -183,8 +183,8 @@ struct _EventPagePrivate {
gint alarm_interval;
/* This is TRUE if both the start & end timezone are the same. If the
- start timezone is then changed, we updated the end timezone to the
- same value, since 99% of events start and end in one timezone. */
+ * start timezone is then changed, we updated the end timezone to the
+ * same value, since 99% of events start and end in one timezone. */
gboolean sync_timezones;
gboolean is_meeting;
@@ -645,7 +645,7 @@ sensitize_widgets (EventPage *epage)
alarm = e_dialog_combo_box_get (priv->alarm_time_combo, priv->alarm_map) != ALARM_NONE;
custom = is_custom_alarm_store (priv->alarm_list_store, priv->old_summary, priv->alarm_units, priv->alarm_interval, NULL) ||
- e_dialog_combo_box_get (priv->alarm_time_combo, priv->alarm_map) == ALARM_CUSTOM ? TRUE:FALSE;
+ e_dialog_combo_box_get (priv->alarm_time_combo, priv->alarm_map) == ALARM_CUSTOM ? TRUE : FALSE;
if (alarm && !priv->alarm_icon) {
priv->alarm_icon = create_alarm_image_button ("stock_bell", _("This event has reminders"), epage);
@@ -729,7 +729,7 @@ update_time (EventPage *epage,
GtkAction *action;
struct icaltimetype *start_tt, *end_tt, implied_tt;
icaltimezone *start_zone = NULL, *def_zone = NULL;
- gboolean all_day_event, homezone=TRUE;
+ gboolean all_day_event, homezone = TRUE;
gboolean show_timezone;
editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (epage));
@@ -737,8 +737,8 @@ update_time (EventPage *epage,
if (start_date->tzid) {
/* Note that if we are creating a new event, the timezones may not be
- on the server, so we try to get the builtin timezone with the TZID
- first. */
+ * on the server, so we try to get the builtin timezone with the TZID
+ * first. */
start_zone = icaltimezone_get_builtin_timezone_from_tzid (start_date->tzid);
if (!start_zone) {
/* FIXME: Handle error better. */
@@ -753,7 +753,7 @@ update_time (EventPage *epage,
}
/* If both times are DATE values, we set the 'All Day Event' checkbox.
- Also, if DTEND is after DTSTART, we subtract 1 day from it. */
+ * Also, if DTEND is after DTSTART, we subtract 1 day from it. */
all_day_event = FALSE;
start_tt = start_date->value;
end_tt = end_date->value;
@@ -774,8 +774,8 @@ update_time (EventPage *epage,
set_all_day (epage, all_day_event);
/* If it is an all day event, we set both timezones to the current
- timezone, so that if the user toggles the 'All Day Event' checkbox
- the event uses the current timezone rather than none at all. */
+ * timezone, so that if the user toggles the 'All Day Event' checkbox
+ * the event uses the current timezone rather than none at all. */
if (all_day_event)
start_zone = e_meeting_store_get_timezone (
epage->priv->meeting_store);
@@ -809,7 +809,7 @@ update_time (EventPage *epage,
0, 0, NULL, NULL, epage);
/* Set the timezones, and set sync_timezones to TRUE if both timezones
- are the same. */
+ * are the same. */
g_signal_handlers_block_matched (
epage->priv->start_timezone, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, epage);
@@ -843,7 +843,8 @@ update_time (EventPage *epage,
}
static void
-organizer_changed_cb (GtkEntry *entry, EventPage *epage)
+organizer_changed_cb (GtkEntry *entry,
+ EventPage *epage)
{
gchar *name;
gchar *mailto;
@@ -949,7 +950,7 @@ event_page_focus_main_widget (CompEditorPage *page)
static void
event_page_load_locations_list (CompEditorPage *page,
- ECalComponent *comp)
+ ECalComponent *comp)
{
EShell *shell;
EShellBackend *backend;
@@ -1008,7 +1009,7 @@ event_page_load_locations_list (CompEditorPage *page,
static void
event_page_save_locations_list (CompEditorPage *page,
- ECalComponent *comp)
+ ECalComponent *comp)
{
EShell *shell;
EShellBackend *backend;
@@ -1455,7 +1456,7 @@ event_page_fill_component (CompEditorPage *page,
g_return_val_if_fail (end_date_set, FALSE);
/* If the all_day toggle is set, we use DATE values for DTSTART and
- DTEND. If not, we fetch the hour & minute from the widgets. */
+ * DTEND. If not, we fetch the hour & minute from the widgets. */
all_day_event = priv->all_day_event;
if (all_day_event) {
@@ -1806,28 +1807,32 @@ event_page_init (EventPage *epage)
}
void
-event_page_set_view_role (EventPage *epage, gboolean state)
+event_page_set_view_role (EventPage *epage,
+ gboolean state)
{
e_meeting_list_view_column_set_visible (
epage->priv->list_view, E_MEETING_STORE_ROLE_COL, state);
}
void
-event_page_set_view_status (EventPage *epage, gboolean state)
+event_page_set_view_status (EventPage *epage,
+ gboolean state)
{
e_meeting_list_view_column_set_visible (
epage->priv->list_view, E_MEETING_STORE_STATUS_COL, state);
}
void
-event_page_set_view_type (EventPage *epage, gboolean state)
+event_page_set_view_type (EventPage *epage,
+ gboolean state)
{
e_meeting_list_view_column_set_visible (
epage->priv->list_view, E_MEETING_STORE_TYPE_COL, state);
}
void
-event_page_set_view_rsvp (EventPage *epage, gboolean state)
+event_page_set_view_rsvp (EventPage *epage,
+ gboolean state)
{
e_meeting_list_view_column_set_visible (
epage->priv->list_view, E_MEETING_STORE_RSVP_COL, state);
@@ -1860,7 +1865,8 @@ event_page_show_options (EventPage *page)
}
void
-event_page_set_meeting (EventPage *page, gboolean set)
+event_page_set_meeting (EventPage *page,
+ gboolean set)
{
g_return_if_fail (IS_EVENT_PAGE (page));
@@ -1870,7 +1876,8 @@ event_page_set_meeting (EventPage *page, gboolean set)
}
void
-event_page_set_delegate (EventPage *page, gboolean set)
+event_page_set_delegate (EventPage *page,
+ gboolean set)
{
g_return_if_fail (IS_EVENT_PAGE (page));
@@ -1881,7 +1888,8 @@ event_page_set_delegate (EventPage *page, gboolean set)
}
static void
-time_sel_changed (GtkComboBox *combo, EventPage *epage)
+time_sel_changed (GtkComboBox *combo,
+ EventPage *epage)
{
EventPagePrivate *priv;
gint selection = gtk_combo_box_get_active (combo);
@@ -1932,20 +1940,22 @@ void update_end_time_combo (EventPage *epage)
end_timet -= start_timet;
hours = end_timet / ( 60 * 60 );
- minutes = (end_timet/60) - ( hours * 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);
}
static void
-hour_sel_changed (GtkSpinButton *widget, EventPage *epage)
+hour_sel_changed (GtkSpinButton *widget,
+ EventPage *epage)
{
hour_minute_changed (epage);
}
static void
-minute_sel_changed (GtkSpinButton *widget, EventPage *epage)
+minute_sel_changed (GtkSpinButton *widget,
+ EventPage *epage)
{
hour_minute_changed (epage);
}
@@ -1981,7 +1991,8 @@ hour_minute_changed (EventPage *epage)
}
static void
-edit_clicked_cb (GtkButton *btn, EventPage *epage)
+edit_clicked_cb (GtkButton *btn,
+ EventPage *epage)
{
EventPagePrivate *priv;
GtkTreePath *path = NULL;
@@ -2001,7 +2012,8 @@ edit_clicked_cb (GtkButton *btn, EventPage *epage)
}
static void
-add_clicked_cb (GtkButton *btn, EventPage *epage)
+add_clicked_cb (GtkButton *btn,
+ EventPage *epage)
{
CompEditor *editor;
CompEditorFlags flags;
@@ -2020,7 +2032,8 @@ add_clicked_cb (GtkButton *btn, EventPage *epage)
}
static gboolean
-existing_attendee (EMeetingAttendee *ia, ECalComponent *comp)
+existing_attendee (EMeetingAttendee *ia,
+ ECalComponent *comp)
{
GSList *attendees, *l;
const gchar *ia_address;
@@ -2056,7 +2069,8 @@ existing_attendee (EMeetingAttendee *ia, ECalComponent *comp)
}
static void
-remove_attendee (EventPage *epage, EMeetingAttendee *ia)
+remove_attendee (EventPage *epage,
+ EMeetingAttendee *ia)
{
EventPagePrivate *priv = epage->priv;
CompEditor *editor;
@@ -2070,7 +2084,7 @@ remove_attendee (EventPage *epage, EMeetingAttendee *ia)
delegate = (flags & COMP_EDITOR_DELEGATE);
/* If the user deletes the organizer attendee explicitly,
- assume they no longer want the organizer showing up */
+ * assume they no longer want the organizer showing up */
if (ia == priv->ia) {
g_object_unref (priv->ia);
priv->ia = NULL;
@@ -2113,7 +2127,8 @@ remove_attendee (EventPage *epage, EMeetingAttendee *ia)
}
static void
-remove_clicked_cb (GtkButton *btn, EventPage *epage)
+remove_clicked_cb (GtkButton *btn,
+ EventPage *epage)
{
EventPagePrivate *priv;
EMeetingAttendee *ia;
@@ -2135,7 +2150,7 @@ remove_clicked_cb (GtkButton *btn, EventPage *epage)
}
paths = g_list_reverse (paths);
- for (tmp = paths; tmp; tmp=tmp->next) {
+ for (tmp = paths; tmp; tmp = tmp->next) {
path = tmp->data;
gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->meeting_store), &iter, path);
@@ -2214,8 +2229,10 @@ attendee_added_cb (EMeetingListView *emlv,
}
static gboolean
-list_view_event (EMeetingListView *list_view, GdkEvent *event, EventPage *epage) {
-
+list_view_event (EMeetingListView *list_view,
+ GdkEvent *event,
+ EventPage *epage)
+{
EventPagePrivate *priv = epage->priv;
CompEditor *editor;
CompEditorFlags flags;
@@ -2240,7 +2257,9 @@ list_view_event (EMeetingListView *list_view, GdkEvent *event, EventPage *epage)
}
static gboolean
-list_key_press (EMeetingListView *list_view, GdkEventKey *event, EventPage *epage)
+list_key_press (EMeetingListView *list_view,
+ GdkEventKey *event,
+ EventPage *epage)
{
if (event->keyval == GDK_KEY_Delete) {
@@ -2257,7 +2276,8 @@ list_key_press (EMeetingListView *list_view, GdkEventKey *event, EventPage *epag
}
void
-event_page_set_all_day_event (EventPage *epage, gboolean all_day)
+event_page_set_all_day_event (EventPage *epage,
+ gboolean all_day)
{
EventPagePrivate *priv = epage->priv;
struct icaltimetype start_tt = icaltime_null_time ();
@@ -2309,7 +2329,7 @@ event_page_set_all_day_event (EventPage *epage, gboolean all_day)
start_tt.is_date = TRUE;
/* Round down to the start of the day, or the start of the
- previous day if it is midnight. */
+ * previous day if it is midnight. */
icaltime_adjust (&end_tt, 0, 0, 0, -1);
end_tt.hour = 0;
end_tt.minute = 0;
@@ -2322,8 +2342,8 @@ event_page_set_all_day_event (EventPage *epage, gboolean all_day)
&& end_tt.month == start_tt.month
&& end_tt.day == start_tt.day) {
/* The event is within one day, so we set the event
- start to the start of the working day, and the end
- to one hour later. */
+ * start to the start of the working day, and the end
+ * to one hour later. */
start_tt.hour =
comp_editor_get_work_day_start_hour (editor);
start_tt.minute =
@@ -2334,8 +2354,8 @@ event_page_set_all_day_event (EventPage *epage, gboolean all_day)
icaltime_adjust (&end_tt, 0, 1, 0, 0);
} else {
/* The event is longer than 1 day, so we keep exactly
- the same times, just using DATE-TIME rather than
- DATE. */
+ * the same times, just using DATE-TIME rather than
+ * DATE. */
icaltime_adjust (&end_tt, 1, 0, 0, 0);
}
@@ -2373,7 +2393,8 @@ event_page_set_all_day_event (EventPage *epage, gboolean all_day)
}
void
-event_page_set_show_time_busy (EventPage *epage, gboolean state)
+event_page_set_show_time_busy (EventPage *epage,
+ gboolean state)
{
epage->priv->show_time_as_busy = state;
comp_editor_page_changed (COMP_EDITOR_PAGE (epage));
@@ -2386,7 +2407,8 @@ event_page_show_alarm (EventPage *epage)
}
void
-event_page_set_show_timezone (EventPage *epage, gboolean state)
+event_page_set_show_timezone (EventPage *epage,
+ gboolean state)
{
if (state) {
gtk_widget_show_all (epage->priv->start_timezone);
@@ -2399,7 +2421,8 @@ event_page_set_show_timezone (EventPage *epage, gboolean state)
}
void
-event_page_set_show_categories (EventPage *epage, gboolean state)
+event_page_set_show_categories (EventPage *epage,
+ gboolean state)
{
if (state) {
gtk_widget_show (epage->priv->categories_btn);
@@ -2412,7 +2435,9 @@ event_page_set_show_categories (EventPage *epage, gboolean state)
/*If the msg has some value set, the icon should always be set */
void
-event_page_set_info_string (EventPage *epage, const gchar *icon, const gchar *msg)
+event_page_set_info_string (EventPage *epage,
+ const gchar *icon,
+ const gchar *msg)
{
EventPagePrivate *priv;
@@ -2454,7 +2479,7 @@ get_widgets (EventPage *epage)
return FALSE;
/* Get the GtkAccelGroup from the toplevel window, so we can install
- it when the notebook page is mapped. */
+ * it when the notebook page is mapped. */
toplevel = gtk_widget_get_toplevel (priv->main);
accel_groups = gtk_accel_groups_from_object (G_OBJECT (toplevel));
if (accel_groups)
@@ -2572,11 +2597,12 @@ summary_changed_cb (GtkEditable *editable,
}
/* Note that this assumes that the start_tt and end_tt passed to it are the
- dates visible to the user. For DATE values, we have to add 1 day to the
- end_tt before emitting the signal. */
+ * dates visible to the user. For DATE values, we have to add 1 day to the
+ * end_tt before emitting the signal. */
static void
-notify_dates_changed (EventPage *epage, struct icaltimetype *start_tt,
- struct icaltimetype *end_tt)
+notify_dates_changed (EventPage *epage,
+ struct icaltimetype *start_tt,
+ struct icaltimetype *end_tt)
{
EventPagePrivate *priv;
CompEditorPageDates dates;
@@ -2592,7 +2618,7 @@ notify_dates_changed (EventPage *epage, struct icaltimetype *start_tt,
if (all_day_event) {
/* The actual DTEND is 1 day after the displayed date for
- DATE values. */
+ * DATE values. */
icaltime_adjust (end_tt, 1, 0, 0, 0);
} else {
start_zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->start_timezone));
@@ -2615,10 +2641,10 @@ notify_dates_changed (EventPage *epage, struct icaltimetype *start_tt,
static gboolean
check_start_before_end (struct icaltimetype *start_tt,
- icaltimezone *start_zone,
- struct icaltimetype *end_tt,
- icaltimezone *end_zone,
- gboolean adjust_end_time)
+ icaltimezone *start_zone,
+ struct icaltimetype *end_tt,
+ icaltimezone *end_zone,
+ gboolean adjust_end_time)
{
struct icaltimetype end_tt_copy;
gint cmp;
@@ -2628,7 +2654,7 @@ check_start_before_end (struct icaltimetype *start_tt,
icaltimezone_convert_time (&end_tt_copy, end_zone, start_zone);
/* Now check if the start time is after the end time. If it is,
- we need to modify one of the times. */
+ * we need to modify one of the times. */
cmp = icaltime_compare (*start_tt, end_tt_copy);
if (cmp > 0) {
if (adjust_end_time) {
@@ -2660,7 +2686,8 @@ check_start_before_end (struct icaltimetype *start_tt,
* start or end time, the other time is adjusted to make it valid.
*/
static void
-times_updated (EventPage *epage, gboolean adjust_end_time)
+times_updated (EventPage *epage,
+ gboolean adjust_end_time)
{
EventPagePrivate *priv;
struct icaltimetype start_tt = icaltime_null_time ();
@@ -2691,7 +2718,7 @@ times_updated (EventPage *epage, gboolean adjust_end_time)
if (all_day_event) {
/* All Day Events are simple. We just compare the dates and if
- start > end we copy one of them to the other. */
+ * start > end we copy one of them to the other. */
gint cmp = icaltime_compare_date_only (start_tt, end_tt);
if (cmp > 0) {
if (adjust_end_time) {
@@ -2707,7 +2734,7 @@ times_updated (EventPage *epage, gboolean adjust_end_time)
end_tt.is_date = TRUE;
} else {
/* For DATE-TIME events, we have to convert to the same
- timezone before comparing. */
+ * timezone before comparing. */
e_date_edit_get_time_of_day (E_DATE_EDIT (priv->start_time),
&start_tt.hour,
&start_tt.minute);
@@ -2858,7 +2885,9 @@ event_page_send_options_clicked_cb (EventPage *epage)
}
static void
-epage_client_opened_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+epage_client_opened_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ESource *source = E_SOURCE (source_object);
EClient *client = NULL;
@@ -2928,7 +2957,8 @@ epage_client_opened_cb (GObject *source_object, GAsyncResult *result, gpointer u
}
static void
-source_changed_cb (ESourceComboBox *source_combo_box, EventPage *epage)
+source_changed_cb (ESourceComboBox *source_combo_box,
+ EventPage *epage)
{
EventPagePrivate *priv = epage->priv;
ESource *source;
@@ -2950,7 +2980,8 @@ source_changed_cb (ESourceComboBox *source_combo_box, EventPage *epage)
}
static void
-set_subscriber_info_string (EventPage *epage, const gchar *backend_address)
+set_subscriber_info_string (EventPage *epage,
+ const gchar *backend_address)
{
CompEditor *editor;
ECalClient *client;
@@ -2963,7 +2994,7 @@ set_subscriber_info_string (EventPage *epage, const gchar *backend_address)
if (e_source_get_property (source, "subscriber")) {
g_free (epage->priv->subscriber_info_text);
/* Translators: This string is used when we are creating an Event
- (meeting or appointment) on behalf of some other user */
+ * (meeting or appointment) on behalf of some other user */
epage->priv->subscriber_info_text = g_markup_printf_escaped (_("You are acting on behalf of %s"), backend_address);
} else {
g_free (epage->priv->subscriber_info_text);
@@ -3131,7 +3162,7 @@ init_widgets (EventPage *epage)
client = comp_editor_get_client (editor);
/* Make sure the EDateEdit widgets use our timezones to get the
- current time. */
+ * current time. */
e_date_edit_set_get_time_callback (
E_DATE_EDIT (priv->start_time),
(EDateEditGetTimeCallback) comp_editor_get_current_time,
@@ -3147,7 +3178,7 @@ init_widgets (EventPage *epage)
gtk_widget_hide (priv->info_hbox);
/* Summary */
- g_signal_connect((priv->summary), "changed",
+ g_signal_connect ((priv->summary), "changed",
G_CALLBACK (summary_changed_cb), epage);
/* Description */
@@ -3164,11 +3195,11 @@ init_widgets (EventPage *epage)
G_CALLBACK (end_date_changed_cb), epage);
/* Categories */
- g_signal_connect((priv->categories_btn), "clicked",
+ g_signal_connect ((priv->categories_btn), "clicked",
G_CALLBACK (categories_clicked_cb), epage);
/* Source selector */
- g_signal_connect((priv->source_selector), "changed",
+ g_signal_connect ((priv->source_selector), "changed",
G_CALLBACK (source_changed_cb), epage);
/* Alarms */
priv->alarm_list_store = e_alarm_list_new ();
@@ -3183,7 +3214,7 @@ init_widgets (EventPage *epage)
G_CALLBACK (comp_editor_page_changed), epage);
/* Timezone changed */
- g_signal_connect((priv->start_timezone), "changed",
+ g_signal_connect ((priv->start_timezone), "changed",
G_CALLBACK (start_timezone_changed_cb), epage);
e_meeting_list_view_column_set_visible (
@@ -3212,24 +3243,40 @@ init_widgets (EventPage *epage)
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->list_view));
gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
- g_signal_connect (G_OBJECT (priv->list_view), "event", G_CALLBACK (list_view_event), epage);
- g_signal_connect (priv->list_view, "key_press_event", G_CALLBACK (list_key_press), epage);
+ g_signal_connect (
+ priv->list_view, "event",
+ G_CALLBACK (list_view_event), epage);
+ g_signal_connect (
+ priv->list_view, "key_press_event",
+ G_CALLBACK (list_key_press), epage);
/* Add attendee button */
- g_signal_connect (priv->add, "clicked", G_CALLBACK (add_clicked_cb), epage);
+ g_signal_connect (
+ priv->add, "clicked",
+ G_CALLBACK (add_clicked_cb), epage);
/* Remove attendee button */
- g_signal_connect (priv->remove, "clicked", G_CALLBACK (remove_clicked_cb), epage);
+ g_signal_connect (
+ priv->remove, "clicked",
+ G_CALLBACK (remove_clicked_cb), epage);
/* Edit attendee button */
- g_signal_connect (priv->edit, "clicked", G_CALLBACK (edit_clicked_cb), epage);
+ g_signal_connect (
+ priv->edit, "clicked",
+ G_CALLBACK (edit_clicked_cb), epage);
/* Contacts button */
- g_signal_connect(priv->invite, "clicked", G_CALLBACK (invite_cb), epage);
+ g_signal_connect (
+ priv->invite, "clicked",
+ G_CALLBACK (invite_cb), epage);
/* Alarm dialog */
- g_signal_connect (GTK_DIALOG (priv->alarm_dialog), "response", G_CALLBACK (gtk_widget_hide), priv->alarm_dialog);
- g_signal_connect (GTK_DIALOG (priv->alarm_dialog), "delete-event", G_CALLBACK (gtk_widget_hide), priv->alarm_dialog);
+ g_signal_connect (
+ priv->alarm_dialog, "response",
+ G_CALLBACK (gtk_widget_hide), priv->alarm_dialog);
+ g_signal_connect (
+ priv->alarm_dialog, "delete-event",
+ G_CALLBACK (gtk_widget_hide), priv->alarm_dialog);
priv->alarm_list_dlg_widget = alarm_list_dialog_peek (client, priv->alarm_list_store);
gtk_widget_reparent (priv->alarm_list_dlg_widget, priv->alarm_box);
gtk_widget_show_all (priv->alarm_list_dlg_widget);
@@ -3259,7 +3306,7 @@ init_widgets (EventPage *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);
g_signal_connect (priv->minute_selector, "value-changed", G_CALLBACK (minute_sel_changed), epage);
@@ -3363,7 +3410,8 @@ init_widgets (EventPage *epage)
static void
-event_page_select_organizer (EventPage *epage, const gchar *backend_address)
+event_page_select_organizer (EventPage *epage,
+ const gchar *backend_address)
{
EventPagePrivate *priv = epage->priv;
CompEditor *editor;
@@ -3505,7 +3553,8 @@ event_page_new (EMeetingStore *meeting_store,
}
static void
-set_attendees (ECalComponent *comp, const GPtrArray *attendees)
+set_attendees (ECalComponent *comp,
+ const GPtrArray *attendees)
{
GSList *comp_attendees = NULL, *l;
gint i;
diff --git a/calendar/gui/dialogs/goto-dialog.c b/calendar/gui/dialogs/goto-dialog.c
index 7b8fffa430..4a77c87554 100644
--- a/calendar/gui/dialogs/goto-dialog.c
+++ b/calendar/gui/dialogs/goto-dialog.c
@@ -59,7 +59,8 @@ static GoToDialog *dlg = NULL;
/* Callback used when the year adjustment is changed */
static void
-year_changed (GtkAdjustment *adj, gpointer data)
+year_changed (GtkAdjustment *adj,
+ gpointer data)
{
GtkSpinButton *spin_button;
GoToDialog *dlg = data;
@@ -73,7 +74,8 @@ year_changed (GtkAdjustment *adj, gpointer data)
/* Callback used when a month button is toggled */
static void
-month_changed (GtkToggleButton *toggle, gpointer data)
+month_changed (GtkToggleButton *toggle,
+ gpointer data)
{
GtkComboBox *combo_box;
GoToDialog *dlg = data;
@@ -86,7 +88,8 @@ month_changed (GtkToggleButton *toggle, gpointer data)
}
static void
-ecal_date_range_changed (ECalendarItem *calitem, gpointer user_data)
+ecal_date_range_changed (ECalendarItem *calitem,
+ gpointer user_data)
{
GoToDialog *dlg = user_data;
ECalModel *model;
@@ -101,7 +104,8 @@ ecal_date_range_changed (ECalendarItem *calitem, gpointer user_data)
/* 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)
+ecal_event (ECalendarItem *calitem,
+ gpointer user_data)
{
GoToDialog *dlg = user_data;
GDate start_date, end_date;
@@ -127,7 +131,8 @@ ecal_event (ECalendarItem *calitem, gpointer user_data)
/* Returns the current time, for the ECalendarItem. */
static struct tm
-get_current_time (ECalendarItem *calitem, gpointer data)
+get_current_time (ECalendarItem *calitem,
+ gpointer data)
{
icaltimezone *zone;
struct tm tmp_tm = { 0 };
@@ -224,7 +229,8 @@ goto_dialog_init_widgets (GoToDialog *dlg)
/* Creates a "goto date" dialog and runs it */
void
-goto_dialog (GtkWindow *parent, GnomeCalendar *gcal)
+goto_dialog (GtkWindow *parent,
+ GnomeCalendar *gcal)
{
ECalModel *model;
time_t start_time;
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index 9c14fccd0a..cf1e879d1d 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -503,7 +503,8 @@ get_recipients (ECalComponent *comp)
}
static gboolean
-fill_comp_with_recipients (ENameSelector *name_selector, ECalComponent *comp)
+fill_comp_with_recipients (ENameSelector *name_selector,
+ ECalComponent *comp)
{
EDestinationStore *destination_store;
GString *str = NULL;
@@ -678,7 +679,7 @@ memo_page_fill_component (CompEditorPage *page,
gunichar uc;
for (i = 0, p = str, uc = g_utf8_get_char_validated (p, -1);
- i < 50 && p && uc < (gunichar)-2;
+ i < 50 && p && uc < (gunichar) - 2;
i++, p = g_utf8_next_char (p), uc = g_utf8_get_char_validated (p, -1)) {
if (uc == '\n' || !uc) {
p = NULL;
@@ -784,7 +785,8 @@ memo_page_fill_component (CompEditorPage *page,
}
void
-memo_page_set_show_categories (MemoPage *page, gboolean state)
+memo_page_set_show_categories (MemoPage *page,
+ gboolean state)
{
if (state) {
gtk_widget_show (page->priv->categories_btn);
@@ -797,7 +799,9 @@ memo_page_set_show_categories (MemoPage *page, gboolean state)
/*If the msg has some value set, the icon should always be set */
void
-memo_page_set_info_string (MemoPage *mpage, const gchar *icon, const gchar *msg)
+memo_page_set_info_string (MemoPage *mpage,
+ const gchar *icon,
+ const gchar *msg)
{
MemoPagePrivate *priv;
@@ -834,7 +838,7 @@ get_widgets (MemoPage *mpage)
}
/* Get the GtkAccelGroup from the toplevel window, so we can install
- it when the notebook page is mapped. */
+ * it when the notebook page is mapped. */
toplevel = gtk_widget_get_toplevel (priv->main);
accel_groups = gtk_accel_groups_from_object (G_OBJECT (toplevel));
if (accel_groups)
@@ -896,7 +900,9 @@ categories_clicked_cb (GtkWidget *button,
}
static void
-mpage_client_opened_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+mpage_client_opened_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ESource *source = E_SOURCE (source_object);
EClient *client = NULL;
@@ -1002,7 +1008,7 @@ set_subscriber_info_string (MemoPage *mpage,
if (e_source_get_property (source, "subscriber")) {
g_free (mpage->priv->subscriber_info_text);
/* Translators: This string is used when we are creating a Memo
- on behalf of some other user */
+ * on behalf of some other user */
mpage->priv->subscriber_info_text = g_markup_printf_escaped (_("You are acting on behalf of %s"), backend_address);
} else {
g_free (mpage->priv->subscriber_info_text);
@@ -1082,7 +1088,7 @@ init_widgets (MemoPage *mpage)
G_CALLBACK (source_changed_cb), mpage);
/* Connect the default signal handler to use to make sure the "changed"
- field gets set whenever a field is changed. */
+ * field gets set whenever a field is changed. */
/* Belongs to priv->memo_content */
g_signal_connect_swapped (
@@ -1142,7 +1148,8 @@ get_to_entry (ENameSelector *name_selector)
}
static void
-memo_page_select_organizer (MemoPage *mpage, const gchar *backend_address)
+memo_page_select_organizer (MemoPage *mpage,
+ const gchar *backend_address)
{
MemoPagePrivate *priv;
CompEditor *editor;
diff --git a/calendar/gui/dialogs/recur-comp.c b/calendar/gui/dialogs/recur-comp.c
index 3514c03dbf..e9a941998d 100644
--- a/calendar/gui/dialogs/recur-comp.c
+++ b/calendar/gui/dialogs/recur-comp.c
@@ -33,9 +33,10 @@
gboolean
recur_component_dialog (ECalClient *client,
- ECalComponent *comp,
- CalObjModType *mod,
- GtkWindow *parent, gboolean delegated)
+ ECalComponent *comp,
+ CalObjModType *mod,
+ GtkWindow *parent,
+ gboolean delegated)
{
gchar *str;
GtkWidget *dialog, *rb_this, *rb_prior, *rb_future, *rb_all, *hbox;
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index fa18e0d9f1..6f201b596f 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -463,7 +463,8 @@ clear_widgets (RecurrencePage *rpage)
/* Appends an exception date to the list */
static void
-append_exception (RecurrencePage *rpage, ECalComponentDateTime *datetime)
+append_exception (RecurrencePage *rpage,
+ ECalComponentDateTime *datetime)
{
RecurrencePagePrivate *priv;
GtkTreeView *view;
@@ -478,7 +479,8 @@ append_exception (RecurrencePage *rpage, ECalComponentDateTime *datetime)
/* Fills in the exception widgets with the data from the calendar component */
static void
-fill_exception_widgets (RecurrencePage *rpage, ECalComponent *comp)
+fill_exception_widgets (RecurrencePage *rpage,
+ ECalComponent *comp)
{
GSList *list, *l;
@@ -588,7 +590,8 @@ sensitize_recur_widgets (RecurrencePage *rpage)
}
static void
-update_with_readonly (RecurrencePage *rpage, gboolean read_only)
+update_with_readonly (RecurrencePage *rpage,
+ gboolean read_only)
{
RecurrencePagePrivate *priv = rpage->priv;
CompEditor *editor;
@@ -617,7 +620,9 @@ update_with_readonly (RecurrencePage *rpage, gboolean read_only)
}
static void
-rpage_get_objects_for_uid_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+rpage_get_objects_for_uid_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ECalClient *client = E_CAL_CLIENT (source_object);
RecurrencePage *rpage = user_data;
@@ -639,7 +644,9 @@ rpage_get_objects_for_uid_cb (GObject *source_object, GAsyncResult *result, gpoi
}
static void
-rpage_get_object_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+rpage_get_object_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ECalClient *client = E_CAL_CLIENT (source_object);
RecurrencePage *rpage = user_data;
@@ -711,24 +718,12 @@ sensitize_buttons (RecurrencePage *rpage)
}
}
-#if 0
-/* Encondes a position/weekday pair into the proper format for
- * icalrecurrencetype.by_day. Not needed at present.
- */
-static short
-nth_weekday (gint pos, icalrecurrencetype_weekday weekday)
-{
- g_assert (pos > 0 && pos <= 5);
-
- return (pos << 3) | (gint) weekday;
-}
-#endif
-
/* Gets the simple recurrence data from the recurrence widgets and stores it in
* the calendar component.
*/
static void
-simple_recur_to_comp (RecurrencePage *rpage, ECalComponent *comp)
+simple_recur_to_comp (RecurrencePage *rpage,
+ ECalComponent *comp)
{
RecurrencePagePrivate *priv;
struct icalrecurrencetype r;
@@ -820,8 +815,8 @@ simple_recur_to_comp (RecurrencePage *rpage, ECalComponent *comp)
break;
/* Outlook 2000 uses BYDAY=TU;BYSETPOS=2, and will not
- accept BYDAY=2TU. So we now use the same as Outlook
- by default. */
+ * accept BYDAY=2TU. So we now use the same as Outlook
+ * by default. */
case MONTH_DAY_MON:
r.by_day[0] = ICAL_MONDAY_WEEKDAY;
r.by_set_pos[0] = month_num;
@@ -890,7 +885,7 @@ simple_recur_to_comp (RecurrencePage *rpage, ECalComponent *comp)
g_return_if_fail (E_IS_DATE_EDIT (priv->ending_date_edit));
/* We only allow a DATE value to be set for the UNTIL property,
- since we don't support sub-day recurrences. */
+ * 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,
@@ -921,7 +916,8 @@ simple_recur_to_comp (RecurrencePage *rpage, ECalComponent *comp)
* custom recurrence, it leaves it intact.
*/
static gboolean
-fill_component (RecurrencePage *rpage, ECalComponent *comp)
+fill_component (RecurrencePage *rpage,
+ ECalComponent *comp)
{
RecurrencePagePrivate *priv;
gboolean recurs;
@@ -1058,7 +1054,11 @@ make_weekly_special (RecurrencePage *rpage)
/* Creates the subtree for the monthly recurrence number */
static void
-make_recur_month_num_subtree (GtkTreeStore *store, GtkTreeIter *par, const gchar *title, gint start, gint end)
+make_recur_month_num_subtree (GtkTreeStore *store,
+ GtkTreeIter *par,
+ const gchar *title,
+ gint start,
+ gint end)
{
GtkTreeIter iter, parent;
gint i;
@@ -1071,12 +1071,13 @@ make_recur_month_num_subtree (GtkTreeStore *store, GtkTreeIter *par, const gchar
gtk_tree_store_set (store, &iter, 0, _(e_cal_recur_nth[i]), 1, i + 1, -1);
}
}
+
static void
-only_leaf_sensitive (GtkCellLayout *cell_layout,
- GtkCellRenderer *cell,
- GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- gpointer data)
+only_leaf_sensitive (GtkCellLayout *cell_layout,
+ GtkCellRenderer *cell,
+ GtkTreeModel *tree_model,
+ GtkTreeIter *iter,
+ gpointer data)
{
gboolean sensitive;
@@ -1184,8 +1185,8 @@ make_recur_month_combobox (void)
{
static const gchar *options[] = {
/* For Translator : 'day' is part of the sentence of the form 'appointment recurs/Every [x] month(s) on the [first] [day] [forever]'
- (dropdown menu options are in[square brackets]). This means that after 'first', either the string 'day' or
- the name of a week day (like 'Monday' or 'Friday') always follow. */
+ * (dropdown menu options are in[square brackets]). This means that after 'first', either the string 'day' or
+ * the name of a week day (like 'Monday' or 'Friday') always follow. */
N_("day"),
N_("Monday"),
N_("Tuesday"),
@@ -1209,7 +1210,8 @@ make_recur_month_combobox (void)
}
static void
-month_num_combo_changed_cb (GtkComboBox *combo, RecurrencePage *rpage)
+month_num_combo_changed_cb (GtkComboBox *combo,
+ RecurrencePage *rpage)
{
GtkTreeIter iter;
RecurrencePagePrivate *priv;
@@ -1269,7 +1271,8 @@ month_num_combo_changed_cb (GtkComboBox *combo, RecurrencePage *rpage)
* are 1-31 while a Sunday is the 1st through 5th.
*/
static void
-month_day_combo_changed_cb (GtkComboBox *combo, RecurrencePage *rpage)
+month_day_combo_changed_cb (GtkComboBox *combo,
+ RecurrencePage *rpage)
{
RecurrencePagePrivate *priv;
enum month_num_options month_num;
@@ -1403,7 +1406,8 @@ make_recurrence_special (RecurrencePage *rpage)
/* Counts the elements in the by_xxx fields of an icalrecurrencetype */
static gint
-count_by_xxx (gshort *field, gint max_elements)
+count_by_xxx (gshort *field,
+ gint max_elements)
{
gint i;
@@ -1456,7 +1460,7 @@ make_ending_until_special (RecurrencePage *rpage)
G_CALLBACK (comp_editor_page_changed), rpage);
/* Make sure the EDateEdit widget uses our timezones to get the
- current time. */
+ * current time. */
e_date_edit_set_get_time_callback (
de,
(EDateEditGetTimeCallback) comp_editor_get_current_time,
@@ -1554,7 +1558,8 @@ make_ending_special (RecurrencePage *rpage)
* component.
*/
static void
-fill_ending_date (RecurrencePage *rpage, struct icalrecurrencetype *r)
+fill_ending_date (RecurrencePage *rpage,
+ struct icalrecurrencetype *r)
{
RecurrencePagePrivate *priv = rpage->priv;
CompEditor *editor;
@@ -1635,7 +1640,8 @@ fill_ending_date (RecurrencePage *rpage, struct icalrecurrencetype *r)
* no rdates or exrules (exdates are handled just fine elsewhere).
*/
static gboolean
-recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
+recurrence_page_fill_widgets (CompEditorPage *page,
+ ECalComponent *comp)
{
RecurrencePage *rpage;
RecurrencePagePrivate *priv;
@@ -1867,8 +1873,8 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
enum month_day_options month_day;
/* Outlook 2000 uses BYDAY=TU;BYSETPOS=2, and will not
- accept BYDAY=2TU. So we now use the same as Outlook
- by default. */
+ * accept BYDAY=2TU. So we now use the same as Outlook
+ * by default. */
weekday = icalrecurrencetype_day_day_of_week (r->by_day[0]);
pos = icalrecurrencetype_day_position (r->by_day[0]);
@@ -1988,7 +1994,8 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
/* fill_component handler for the recurrence page */
static gboolean
-recurrence_page_fill_component (CompEditorPage *page, ECalComponent *comp)
+recurrence_page_fill_component (CompEditorPage *page,
+ ECalComponent *comp)
{
RecurrencePage *rpage;
@@ -1998,7 +2005,8 @@ recurrence_page_fill_component (CompEditorPage *page, ECalComponent *comp)
/* set_dates handler for the recurrence page */
static void
-recurrence_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
+recurrence_page_set_dates (CompEditorPage *page,
+ CompEditorPageDates *dates)
{
RecurrencePage *rpage;
RecurrencePagePrivate *priv;
@@ -2088,7 +2096,7 @@ get_widgets (RecurrencePage *rpage)
return FALSE;
/* Get the GtkAccelGroup from the toplevel window, so we can install
- it when the notebook page is mapped. */
+ * it when the notebook page is mapped. */
toplevel = gtk_widget_get_toplevel (priv->main);
accel_groups = gtk_accel_groups_from_object (G_OBJECT (toplevel));
if (accel_groups)
@@ -2170,7 +2178,9 @@ type_toggled_cb (GtkToggleButton *toggle,
}
static GtkWidget *
-create_exception_dialog (RecurrencePage *rpage, const gchar *title, GtkWidget **date_edit)
+create_exception_dialog (RecurrencePage *rpage,
+ const gchar *title,
+ GtkWidget **date_edit)
{
RecurrencePagePrivate *priv;
GtkWidget *dialog, *toplevel;
@@ -2357,7 +2367,7 @@ init_widgets (RecurrencePage *rpage)
priv->preview_calendar = e_calendar_new ();
ecal = E_CALENDAR (priv->preview_calendar);
- g_signal_connect((ecal->calitem), "date_range_changed",
+ g_signal_connect ((ecal->calitem), "date_range_changed",
G_CALLBACK (preview_date_range_changed_cb),
rpage);
e_calendar_item_set_max_days_sel (ecal->calitem, 0);
@@ -2373,7 +2383,7 @@ init_widgets (RecurrencePage *rpage)
/* Recurrence types */
- g_signal_connect(priv->recurs, "toggled", G_CALLBACK (type_toggled_cb), rpage);
+ g_signal_connect (priv->recurs, "toggled", G_CALLBACK (type_toggled_cb), rpage);
/* Recurrence interval */
@@ -2402,11 +2412,11 @@ init_widgets (RecurrencePage *rpage)
/* Exception buttons */
- g_signal_connect((priv->exception_add), "clicked",
+ g_signal_connect ((priv->exception_add), "clicked",
G_CALLBACK (exception_add_cb), rpage);
- g_signal_connect((priv->exception_modify), "clicked",
+ g_signal_connect ((priv->exception_modify), "clicked",
G_CALLBACK (exception_modify_cb), rpage);
- g_signal_connect((priv->exception_delete), "clicked",
+ g_signal_connect ((priv->exception_delete), "clicked",
G_CALLBACK (exception_delete_cb), rpage);
gtk_widget_set_sensitive (priv->exception_modify, FALSE);
diff --git a/calendar/gui/dialogs/save-comp.c b/calendar/gui/dialogs/save-comp.c
index 0f9a6fba8e..459ff9a4c6 100644
--- a/calendar/gui/dialogs/save-comp.c
+++ b/calendar/gui/dialogs/save-comp.c
@@ -41,7 +41,8 @@
**/
GtkResponseType
-save_component_dialog (GtkWindow *parent, ECalComponent *comp)
+save_component_dialog (GtkWindow *parent,
+ ECalComponent *comp)
{
ECalComponentVType vtype = e_cal_component_get_vtype (comp);
CompEditorFlags flags;
diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c
index 0b78f55c7b..3b96fbd2bc 100644
--- a/calendar/gui/dialogs/schedule-page.c
+++ b/calendar/gui/dialogs/schedule-page.c
@@ -54,8 +54,8 @@ struct _SchedulePagePrivate {
EMeetingTimeSelector *sel;
/* The timezone we use. Note that we use the same timezone for the
- start and end date. We convert the end date if it is passed in in
- another timezone. */
+ * start and end date. We convert the end date if it is passed in in
+ * another timezone. */
icaltimezone *zone;
};
@@ -95,8 +95,8 @@ update_time (SchedulePage *spage,
if (start_date->tzid) {
/* Note that if we are creating a new event, the timezones may not be
- on the server, so we try to get the builtin timezone with the TZID
- first. */
+ * on the server, so we try to get the builtin timezone with the TZID
+ * first. */
start_zone = icaltimezone_get_builtin_timezone_from_tzid (start_date->tzid);
if (!start_zone) {
GError *error = NULL;
@@ -145,7 +145,7 @@ update_time (SchedulePage *spage,
all_day = (start_tt.is_date && end_tt.is_date) ? TRUE : FALSE;
/* For All Day Events, if DTEND is after DTSTART, we subtract 1 day
- from it. */
+ * from it. */
if (all_day) {
if (icaltime_compare_date_only (end_tt, start_tt) > 0) {
icaltime_adjust (&end_tt, -1, 0, 0, 0);
@@ -215,7 +215,8 @@ schedule_page_focus_main_widget (CompEditorPage *page)
}
static gboolean
-schedule_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
+schedule_page_fill_widgets (CompEditorPage *page,
+ ECalComponent *comp)
{
SchedulePage *spage;
ECalComponentDateTime start_date, end_date;
@@ -242,13 +243,15 @@ schedule_page_fill_widgets (CompEditorPage *page, ECalComponent *comp)
}
static gboolean
-schedule_page_fill_component (CompEditorPage *page, ECalComponent *comp)
+schedule_page_fill_component (CompEditorPage *page,
+ ECalComponent *comp)
{
return TRUE;
}
static void
-schedule_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates)
+schedule_page_set_dates (CompEditorPage *page,
+ CompEditorPageDates *dates)
{
SchedulePage *spage;
@@ -304,7 +307,7 @@ get_widgets (SchedulePage *spage)
return FALSE;
/* Get the GtkAccelGroup from the toplevel window, so we can install
- it when the notebook page is mapped. */
+ * it when the notebook page is mapped. */
toplevel = gtk_widget_get_toplevel (priv->main);
accel_groups = gtk_accel_groups_from_object (G_OBJECT (toplevel));
if (accel_groups)
@@ -368,7 +371,8 @@ schedule_page_set_meeting_time (SchedulePage *spage,
* be created.
**/
SchedulePage *
-schedule_page_construct (SchedulePage *spage, EMeetingStore *ems)
+schedule_page_construct (SchedulePage *spage,
+ EMeetingStore *ems)
{
SchedulePagePrivate *priv = spage->priv;
CompEditor *editor;
@@ -450,7 +454,8 @@ schedule_page_update_free_busy (SchedulePage *spage)
}
void
-schedule_page_set_name_selector (SchedulePage *spage, ENameSelector *name_selector)
+schedule_page_set_name_selector (SchedulePage *spage,
+ ENameSelector *name_selector)
{
SchedulePagePrivate *priv;
@@ -504,7 +509,7 @@ times_changed_cb (GtkWidget *widget,
end_dt.tzid = start_dt.tzid;
} else {
/* For All-Day Events, we set the timezone to NULL, and add
- 1 day to DTEND. */
+ * 1 day to DTEND. */
start_dt.value->is_date = TRUE;
start_dt.tzid = NULL;
end_dt.value->is_date = TRUE;
diff --git a/calendar/gui/dialogs/select-source-dialog.c b/calendar/gui/dialogs/select-source-dialog.c
index 4ae9f0a0d8..6a768e5b7a 100644
--- a/calendar/gui/dialogs/select-source-dialog.c
+++ b/calendar/gui/dialogs/select-source-dialog.c
@@ -35,7 +35,9 @@
* Implements dialog for allowing user to select a destination source.
*/
ESource *
-select_source_dialog (GtkWindow *parent, ECalClientSourceType obj_type, ESource *except_source)
+select_source_dialog (GtkWindow *parent,
+ ECalClientSourceType obj_type,
+ ESource *except_source)
{
GtkWidget *dialog;
ESourceList *source_list;
@@ -78,7 +80,7 @@ select_source_dialog (GtkWindow *parent, ECalClientSourceType obj_type, ESource
gchar *absolute_uri;
/* set the absolute URI on the source we keep around, since the group
- will be unrefed */
+ * will be unrefed */
absolute_uri = e_source_build_absolute_uri (selected_source);
e_source_set_absolute_uri (selected_source, (const gchar *) absolute_uri);
diff --git a/calendar/gui/dialogs/send-comp.c b/calendar/gui/dialogs/send-comp.c
index bf016403ec..3752db372b 100644
--- a/calendar/gui/dialogs/send-comp.c
+++ b/calendar/gui/dialogs/send-comp.c
@@ -106,7 +106,8 @@ have_nonprocedural_alarm (ECalComponent *comp)
}
static GtkWidget *
-add_checkbox (GtkBox *where, const gchar *caption)
+add_checkbox (GtkBox *where,
+ const gchar *caption)
{
GtkWidget *checkbox, *align;
@@ -133,7 +134,12 @@ add_checkbox (GtkBox *where, const gchar *caption)
* Return value: TRUE if the user clicked Yes, FALSE otherwise.
**/
gboolean
-send_component_dialog (GtkWindow *parent, ECalClient *client, ECalComponent *comp, gboolean new, gboolean *strip_alarms, gboolean *only_new_attendees)
+send_component_dialog (GtkWindow *parent,
+ ECalClient *client,
+ ECalComponent *comp,
+ gboolean new,
+ gboolean *strip_alarms,
+ gboolean *only_new_attendees)
{
ECalComponentVType vtype;
const gchar *id;
@@ -173,7 +179,7 @@ send_component_dialog (GtkWindow *parent, ECalClient *client, ECalComponent *com
if (only_new_attendees && !component_has_new_attendees (comp)) {
/* do not show the check if there is no new attendee and
- set as all attendees are required to be notified */
+ * set as all attendees are required to be notified */
*only_new_attendees = FALSE;
/* pretend it as being passed NULL to simplify code below */
@@ -206,7 +212,9 @@ send_component_dialog (GtkWindow *parent, ECalClient *client, ECalComponent *com
}
gboolean
-send_component_prompt_subject (GtkWindow *parent, ECalClient *client, ECalComponent *comp)
+send_component_prompt_subject (GtkWindow *parent,
+ ECalClient *client,
+ ECalComponent *comp)
{
ECalComponentVType vtype;
const gchar *id;
diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c
index bc828cf431..de30baca77 100644
--- a/calendar/gui/dialogs/task-details-page.c
+++ b/calendar/gui/dialogs/task-details-page.c
@@ -269,7 +269,7 @@ task_details_page_fill_widgets (CompEditorPage *page,
icaltimezone *utc_zone, *zone;
/* Completed is in UTC, but that would confuse the user, so
- we convert it to local time. */
+ * we convert it to local time. */
utc_zone = icaltimezone_get_utc_timezone ();
zone = comp_editor_get_timezone (editor);
@@ -376,11 +376,11 @@ task_details_page_fill_component (CompEditorPage *page,
}
/* COMPLETED must be in UTC, so we assume that the date in the
- dialog is in the current timezone, and we now convert it
- to UTC. FIXME: We should really use one timezone for the
- entire time the dialog is shown. Otherwise if the user
- changes the timezone, the COMPLETED date may get changed
- as well. */
+ * dialog is in the current timezone, and we now convert it
+ * to UTC. FIXME: We should really use one timezone for the
+ * 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_get_utc_timezone ());
e_cal_component_set_completed (comp, &icalcomplete);
@@ -461,7 +461,7 @@ get_widgets (TaskDetailsPage *tdpage)
return FALSE;
/* Get the GtkAccelGroup from the toplevel window, so we can install
- it when the notebook page is mapped. */
+ * it when the notebook page is mapped. */
toplevel = gtk_widget_get_toplevel (priv->main);
accel_groups = gtk_accel_groups_from_object (G_OBJECT (toplevel));
if (accel_groups)
@@ -499,7 +499,9 @@ get_widgets (TaskDetailsPage *tdpage)
}
static void
-complete_date_changed (TaskDetailsPage *tdpage, time_t ctime, gboolean complete)
+complete_date_changed (TaskDetailsPage *tdpage,
+ time_t ctime,
+ gboolean complete)
{
CompEditorPageDates dates = {NULL, NULL, NULL, NULL};
icaltimezone *zone;
@@ -573,7 +575,8 @@ date_changed_cb (EDateEdit *dedit,
}
static void
-status_changed (GtkWidget *combo, TaskDetailsPage *tdpage)
+status_changed (GtkWidget *combo,
+ TaskDetailsPage *tdpage)
{
TaskDetailsPagePrivate *priv;
icalproperty_status status;
@@ -618,7 +621,8 @@ status_changed (GtkWidget *combo, TaskDetailsPage *tdpage)
}
static void
-percent_complete_changed (GtkAdjustment *adj, TaskDetailsPage *tdpage)
+percent_complete_changed (GtkAdjustment *adj,
+ TaskDetailsPage *tdpage)
{
TaskDetailsPagePrivate *priv;
gint percent;
@@ -673,7 +677,7 @@ init_widgets (TaskDetailsPage *tdpage)
editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (tdpage));
/* Make sure the EDateEdit widgets use our timezones to get the
- current time. */
+ * current time. */
e_date_edit_set_get_time_callback (
E_DATE_EDIT (priv->completed_date),
(EDateEditGetTimeCallback) comp_editor_get_current_time,
@@ -689,8 +693,8 @@ init_widgets (TaskDetailsPage *tdpage)
priv->url_entry);
/* Connect signals. The Status, Percent Complete & Date Completed
- properties are closely related so whenever one changes we may need
- to update the other 2. */
+ * properties are closely related so whenever one changes we may need
+ * to update the other 2. */
g_signal_connect (
GTK_COMBO_BOX (priv->status_combo), "changed",
G_CALLBACK (status_changed), tdpage);
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index ee31eb0a1c..31593e0a04 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -377,7 +377,8 @@ task_editor_init (TaskEditor *te)
}
static void
-task_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
+task_editor_edit_comp (CompEditor *editor,
+ ECalComponent *comp)
{
TaskEditorPrivate *priv;
ECalComponentOrganizer organizer;
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index 958eac682b..d88976be75 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -546,14 +546,14 @@ task_page_fill_widgets (CompEditorPage *page,
e_date_edit_set_time (E_DATE_EDIT (priv->due_date), -1);
/* If no time is set, we use the default timezone, so the
- user usually doesn't have to set this when they set the
- date. */
+ * user usually doesn't have to set this when they set the
+ * date. */
zone = NULL;
}
/* Note that if we are creating a new task, the timezones may not be
- on the server, so we try to get the builtin timezone with the TZID
- first. */
+ * on the server, so we try to get the builtin timezone with the TZID
+ * first. */
if (!zone && d.tzid) {
GError *error = NULL;
if (!e_cal_client_get_timezone_sync (client, d.tzid, &zone, NULL, &error))
@@ -1018,7 +1018,8 @@ task_page_init (TaskPage *tpage)
}
void
-task_page_set_view_role (TaskPage *page, gboolean state)
+task_page_set_view_role (TaskPage *page,
+ gboolean state)
{
TaskPagePrivate *priv = page->priv;
@@ -1026,7 +1027,8 @@ task_page_set_view_role (TaskPage *page, gboolean state)
}
void
-task_page_set_view_status (TaskPage *page, gboolean state)
+task_page_set_view_status (TaskPage *page,
+ gboolean state)
{
TaskPagePrivate *priv = page->priv;
@@ -1034,7 +1036,8 @@ task_page_set_view_status (TaskPage *page, gboolean state)
}
void
-task_page_set_view_type (TaskPage *page, gboolean state)
+task_page_set_view_type (TaskPage *page,
+ gboolean state)
{
TaskPagePrivate *priv = page->priv;
@@ -1042,7 +1045,8 @@ task_page_set_view_type (TaskPage *page, gboolean state)
}
void
-task_page_set_view_rsvp (TaskPage *page, gboolean state)
+task_page_set_view_rsvp (TaskPage *page,
+ gboolean state)
{
TaskPagePrivate *priv = page->priv;
@@ -1076,7 +1080,8 @@ task_page_show_options (TaskPage *page)
}
void
-task_page_set_assignment (TaskPage *page, gboolean set)
+task_page_set_assignment (TaskPage *page,
+ gboolean set)
{
g_return_if_fail (IS_TASK_PAGE (page));
@@ -1085,7 +1090,8 @@ task_page_set_assignment (TaskPage *page, gboolean set)
}
static void
-add_clicked_cb (GtkButton *btn, TaskPage *page)
+add_clicked_cb (GtkButton *btn,
+ TaskPage *page)
{
EMeetingAttendee *attendee;
CompEditor *editor;
@@ -1120,7 +1126,8 @@ static void edit_clicked_cb (GtkButton *btn, TaskPage *tpage)
}
static gboolean
-existing_attendee (EMeetingAttendee *ia, ECalComponent *comp)
+existing_attendee (EMeetingAttendee *ia,
+ ECalComponent *comp)
{
GSList *attendees, *l;
const gchar *ia_address;
@@ -1156,7 +1163,8 @@ existing_attendee (EMeetingAttendee *ia, ECalComponent *comp)
}
static void
-remove_attendee (TaskPage *page, EMeetingAttendee *ia)
+remove_attendee (TaskPage *page,
+ EMeetingAttendee *ia)
{
TaskPagePrivate *priv = page->priv;
CompEditor *editor;
@@ -1167,7 +1175,7 @@ remove_attendee (TaskPage *page, EMeetingAttendee *ia)
flags = comp_editor_get_flags (editor);
/* If the user deletes the organizer attendee explicitly,
- assume they no longer want the organizer showing up */
+ * assume they no longer want the organizer showing up */
if (ia == priv->ia) {
g_object_unref (priv->ia);
priv->ia = NULL;
@@ -1209,7 +1217,8 @@ remove_attendee (TaskPage *page, EMeetingAttendee *ia)
}
static void
-remove_clicked_cb (GtkButton *btn, TaskPage *page)
+remove_clicked_cb (GtkButton *btn,
+ TaskPage *page)
{
TaskPagePrivate *priv;
EMeetingAttendee *ia;
@@ -1231,7 +1240,7 @@ remove_clicked_cb (GtkButton *btn, TaskPage *page)
}
paths = g_list_reverse (paths);
- for (tmp = paths; tmp; tmp=tmp->next) {
+ for (tmp = paths; tmp; tmp = tmp->next) {
path = tmp->data;
gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->meeting_store), &iter, path);
@@ -1310,8 +1319,10 @@ attendee_added_cb (EMeetingListView *emlv,
}
static gboolean
-list_view_event (EMeetingListView *list_view, GdkEvent *event, TaskPage *page) {
-
+list_view_event (EMeetingListView *list_view,
+ GdkEvent *event,
+ TaskPage *page)
+{
TaskPagePrivate *priv= page->priv;
CompEditor *editor;
CompEditorFlags flags;
@@ -1336,7 +1347,9 @@ list_view_event (EMeetingListView *list_view, GdkEvent *event, TaskPage *page) {
}
static gboolean
-list_key_press (EMeetingListView *list_view, GdkEventKey *event, TaskPage *page)
+list_key_press (EMeetingListView *list_view,
+ GdkEventKey *event,
+ TaskPage *page)
{
if (event->keyval == GDK_KEY_Delete) {
@@ -1353,7 +1366,8 @@ list_key_press (EMeetingListView *list_view, GdkEventKey *event, TaskPage *page)
}
void
-task_page_set_show_timezone (TaskPage *page, gboolean state)
+task_page_set_show_timezone (TaskPage *page,
+ gboolean state)
{
if (state) {
gtk_widget_show_all (page->priv->timezone);
@@ -1366,7 +1380,8 @@ task_page_set_show_timezone (TaskPage *page, gboolean state)
}
void
-task_page_set_show_categories (TaskPage *page, gboolean state)
+task_page_set_show_categories (TaskPage *page,
+ gboolean state)
{
if (state) {
gtk_widget_show (page->priv->categories_btn);
@@ -1379,7 +1394,9 @@ task_page_set_show_categories (TaskPage *page, gboolean state)
/*If the msg has some value set, the icon should always be set */
void
-task_page_set_info_string (TaskPage *tpage, const gchar *icon, const gchar *msg)
+task_page_set_info_string (TaskPage *tpage,
+ const gchar *icon,
+ const gchar *msg)
{
TaskPagePrivate *priv;
@@ -1414,7 +1431,7 @@ get_widgets (TaskPage *tpage)
return FALSE;
/* Get the GtkAccelGroup from the toplevel window, so we can install
- it when the notebook page is mapped. */
+ * it when the notebook page is mapped. */
toplevel = gtk_widget_get_toplevel (priv->main);
accel_groups = gtk_accel_groups_from_object (G_OBJECT (toplevel));
if (accel_groups)
@@ -1585,11 +1602,11 @@ categories_clicked_cb (GtkWidget *button,
static gboolean
check_start_before_end (struct icaltimetype *start_tt,
- icaltimezone *start_zone,
- struct icaltimetype *end_tt,
- icaltimezone *end_zone,
- gboolean adjust_end_time,
- gboolean adjust_by_hour)
+ icaltimezone *start_zone,
+ struct icaltimetype *end_tt,
+ icaltimezone *end_zone,
+ gboolean adjust_end_time,
+ gboolean adjust_by_hour)
{
struct icaltimetype end_tt_copy;
gint cmp;
@@ -1599,7 +1616,7 @@ check_start_before_end (struct icaltimetype *start_tt,
icaltimezone_convert_time (&end_tt_copy, end_zone, start_zone);
/* Now check if the start time is after the end time. If it is,
- we need to modify one of the times. */
+ * we need to modify one of the times. */
cmp = icaltime_compare (*start_tt, end_tt_copy);
if (cmp > 0) {
if (adjust_end_time) {
@@ -1634,7 +1651,8 @@ check_start_before_end (struct icaltimetype *start_tt,
* otherwise times will differ one hour.
*/
static void
-times_updated (TaskPage *tpage, gboolean adjust_end_time)
+times_updated (TaskPage *tpage,
+ gboolean adjust_end_time)
{
TaskPagePrivate *priv;
struct icaltimetype start_tt = icaltime_null_time ();
@@ -1704,7 +1722,9 @@ due_date_changed_cb (TaskPage *tpage)
}
static void
-tpage_client_opened_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+tpage_client_opened_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
ESource *source = E_SOURCE (source_object);
EClient *client = NULL;
@@ -1775,7 +1795,8 @@ tpage_client_opened_cb (GObject *source_object, GAsyncResult *result, gpointer u
}
static void
-source_changed_cb (ESourceComboBox *source_combo_box, TaskPage *tpage)
+source_changed_cb (ESourceComboBox *source_combo_box,
+ TaskPage *tpage)
{
TaskPagePrivate *priv = tpage->priv;
ESource *source;
@@ -1791,13 +1812,16 @@ source_changed_cb (ESourceComboBox *source_combo_box, TaskPage *tpage)
}
priv->open_cancellable = g_cancellable_new ();
- e_client_utils_open_new (source, E_CLIENT_SOURCE_TYPE_TASKS, FALSE, priv->open_cancellable,
- e_client_utils_authenticate_handler, NULL,
- tpage_client_opened_cb, tpage);
+ e_client_utils_open_new (
+ source, E_CLIENT_SOURCE_TYPE_TASKS,
+ FALSE, priv->open_cancellable,
+ e_client_utils_authenticate_handler, NULL,
+ tpage_client_opened_cb, tpage);
}
static void
-set_subscriber_info_string (TaskPage *tpage, const gchar *backend_address)
+set_subscriber_info_string (TaskPage *tpage,
+ const gchar *backend_address)
{
CompEditor *editor;
ECalClient *client;
@@ -1810,7 +1834,7 @@ set_subscriber_info_string (TaskPage *tpage, const gchar *backend_address)
if (e_source_get_property (source, "subscriber")) {
g_free (tpage->priv->subscriber_info_text);
/* Translators: This string is used when we are creating a Task
- on behalf of some other user */
+ * on behalf of some other user */
tpage->priv->subscriber_info_text = g_markup_printf_escaped (_("You are acting on behalf of %s"), backend_address);
} else {
g_free (tpage->priv->subscriber_info_text);
@@ -1865,7 +1889,7 @@ init_widgets (TaskPage *tpage)
editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (tpage));
/* Make sure the EDateEdit widgets use our timezones to get the
- current time. */
+ * current time. */
e_date_edit_set_get_time_callback (
E_DATE_EDIT (priv->start_date),
(EDateEditGetTimeCallback) comp_editor_get_current_time,
@@ -1881,7 +1905,7 @@ init_widgets (TaskPage *tpage)
gtk_widget_hide (priv->info_hbox);
/* Summary */
- g_signal_connect((priv->summary), "changed",
+ g_signal_connect ((priv->summary), "changed",
G_CALLBACK (summary_changed_cb), tpage);
/* Description */
@@ -1892,23 +1916,23 @@ init_widgets (TaskPage *tpage)
e_buffer_tagger_connect (GTK_TEXT_VIEW (priv->description));
/* Dates */
- g_signal_connect((priv->start_date), "changed",
+ g_signal_connect ((priv->start_date), "changed",
G_CALLBACK (date_changed_cb), tpage);
- g_signal_connect((priv->due_date), "changed",
+ g_signal_connect ((priv->due_date), "changed",
G_CALLBACK (date_changed_cb), tpage);
/* time zone changed */
g_signal_connect (priv->timezone, "changed", G_CALLBACK(timezone_changed_cb), tpage);
/* Categories button */
- g_signal_connect((priv->categories_btn), "clicked",
+ g_signal_connect ((priv->categories_btn), "clicked",
G_CALLBACK (categories_clicked_cb), tpage);
/* Source selector */
g_signal_connect (priv->source_selector, "changed", G_CALLBACK (source_changed_cb), tpage);
/* Connect the default signal handler to use to make sure the "changed"
- field gets set whenever a field is changed. */
+ * field gets set whenever a field is changed. */
/* Belongs to priv->description */
g_signal_connect_swapped (
@@ -1953,7 +1977,7 @@ init_widgets (TaskPage *tpage)
g_signal_connect (priv->remove, "clicked", G_CALLBACK (remove_clicked_cb), tpage);
/* Contacts button */
- g_signal_connect(priv->invite, "clicked", G_CALLBACK (invite_cb), tpage);
+ g_signal_connect (priv->invite, "clicked", G_CALLBACK (invite_cb), tpage);
/* Meeting List View */
g_signal_connect (priv->list_view, "attendee_added", G_CALLBACK (attendee_added_cb), tpage);
@@ -1999,7 +2023,8 @@ init_widgets (TaskPage *tpage)
static void
-task_page_select_organizer (TaskPage *tpage, const gchar *backend_address)
+task_page_select_organizer (TaskPage *tpage,
+ const gchar *backend_address)
{
TaskPagePrivate *priv = tpage->priv;
CompEditor *editor;
@@ -2117,7 +2142,8 @@ task_page_construct (TaskPage *tpage,
* not be created.
**/
TaskPage *
-task_page_new (EMeetingStore *model, CompEditor *editor)
+task_page_new (EMeetingStore *model,
+ CompEditor *editor)
{
TaskPage *tpage;
ECalClient *client;
diff --git a/calendar/gui/e-alarm-list.c b/calendar/gui/e-alarm-list.c
index 3a1efc3333..35c3484c13 100644
--- a/calendar/gui/e-alarm-list.c
+++ b/calendar/gui/e-alarm-list.c
@@ -176,7 +176,8 @@ all_rows_deleted (EAlarmList *alarm_list)
}
static void
-row_deleted (EAlarmList *alarm_list, gint n)
+row_deleted (EAlarmList *alarm_list,
+ gint n)
{
GtkTreePath *path;
@@ -187,7 +188,8 @@ row_deleted (EAlarmList *alarm_list, gint n)
}
static void
-row_added (EAlarmList *alarm_list, gint n)
+row_added (EAlarmList *alarm_list,
+ gint n)
{
GtkTreePath *path;
GtkTreeIter iter;
@@ -202,7 +204,8 @@ row_added (EAlarmList *alarm_list, gint n)
}
static void
-row_updated (EAlarmList *alarm_list, gint n)
+row_updated (EAlarmList *alarm_list,
+ gint n)
{
GtkTreePath *path;
GtkTreeIter iter;
@@ -238,7 +241,7 @@ e_alarm_list_get_n_columns (GtkTreeModel *tree_model)
static GType
e_alarm_list_get_column_type (GtkTreeModel *tree_model,
- gint index)
+ gint index)
{
EAlarmList *alarm_list = (EAlarmList *) tree_model;
@@ -251,7 +254,8 @@ e_alarm_list_get_column_type (GtkTreeModel *tree_model,
}
const ECalComponentAlarm *
-e_alarm_list_get_alarm (EAlarmList *alarm_list, GtkTreeIter *iter)
+e_alarm_list_get_alarm (EAlarmList *alarm_list,
+ GtkTreeIter *iter)
{
g_return_val_if_fail (IS_VALID_ITER (alarm_list, iter), NULL);
@@ -271,8 +275,9 @@ copy_alarm (const ECalComponentAlarm *alarm)
}
void
-e_alarm_list_set_alarm (EAlarmList *alarm_list, GtkTreeIter *iter,
- const ECalComponentAlarm *alarm)
+e_alarm_list_set_alarm (EAlarmList *alarm_list,
+ GtkTreeIter *iter,
+ const ECalComponentAlarm *alarm)
{
ECalComponentAlarm *alarm_old;
@@ -285,8 +290,9 @@ e_alarm_list_set_alarm (EAlarmList *alarm_list, GtkTreeIter *iter,
}
void
-e_alarm_list_append (EAlarmList *alarm_list, GtkTreeIter *iter,
- const ECalComponentAlarm *alarm)
+e_alarm_list_append (EAlarmList *alarm_list,
+ GtkTreeIter *iter,
+ const ECalComponentAlarm *alarm)
{
g_return_if_fail (alarm != NULL);
@@ -300,7 +306,8 @@ e_alarm_list_append (EAlarmList *alarm_list, GtkTreeIter *iter,
}
void
-e_alarm_list_remove (EAlarmList *alarm_list, GtkTreeIter *iter)
+e_alarm_list_remove (EAlarmList *alarm_list,
+ GtkTreeIter *iter)
{
gint n;
@@ -328,7 +335,9 @@ e_alarm_list_clear (EAlarmList *alarm_list)
}
static gboolean
-e_alarm_list_get_iter (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreePath *path)
+e_alarm_list_get_iter (GtkTreeModel *tree_model,
+ GtkTreeIter *iter,
+ GtkTreePath *path)
{
EAlarmList *alarm_list = (EAlarmList *) tree_model;
GList *l;
@@ -354,7 +363,7 @@ e_alarm_list_get_iter (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreePath
static GtkTreePath *
e_alarm_list_get_path (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
+ GtkTreeIter *iter)
{
EAlarmList *alarm_list = (EAlarmList *) tree_model;
GtkTreePath *retval;
@@ -539,9 +548,9 @@ get_alarm_string (ECalComponentAlarm *alarm)
static void
e_alarm_list_get_value (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- gint column,
- GValue *value)
+ GtkTreeIter *iter,
+ gint column,
+ GValue *value)
{
EAlarmList *alarm_list = E_ALARM_LIST (tree_model);
ECalComponentAlarm *alarm;
@@ -574,8 +583,8 @@ e_alarm_list_get_value (GtkTreeModel *tree_model,
}
static gboolean
-e_alarm_list_iter_next (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
+e_alarm_list_iter_next (GtkTreeModel *tree_model,
+ GtkTreeIter *iter)
{
GList *l;
@@ -597,8 +606,8 @@ e_alarm_list_iter_next (GtkTreeModel *tree_model,
static gboolean
e_alarm_list_iter_children (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *parent)
+ GtkTreeIter *iter,
+ GtkTreeIter *parent)
{
EAlarmList *alarm_list = E_ALARM_LIST (tree_model);
@@ -619,7 +628,7 @@ e_alarm_list_iter_children (GtkTreeModel *tree_model,
static gboolean
e_alarm_list_iter_has_child (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
+ GtkTreeIter *iter)
{
g_return_val_if_fail (IS_VALID_ITER (E_ALARM_LIST (tree_model), iter), FALSE);
return FALSE;
@@ -627,7 +636,7 @@ e_alarm_list_iter_has_child (GtkTreeModel *tree_model,
static gint
e_alarm_list_iter_n_children (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
+ GtkTreeIter *iter)
{
EAlarmList *alarm_list = E_ALARM_LIST (tree_model);
@@ -642,9 +651,9 @@ e_alarm_list_iter_n_children (GtkTreeModel *tree_model,
static gboolean
e_alarm_list_iter_nth_child (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *parent,
- gint n)
+ GtkTreeIter *iter,
+ GtkTreeIter *parent,
+ gint n)
{
EAlarmList *alarm_list = E_ALARM_LIST (tree_model);
@@ -670,8 +679,8 @@ e_alarm_list_iter_nth_child (GtkTreeModel *tree_model,
static gboolean
e_alarm_list_iter_parent (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *child)
+ GtkTreeIter *iter,
+ GtkTreeIter *child)
{
return FALSE;
}
diff --git a/calendar/gui/e-cal-component-preview.c b/calendar/gui/e-cal-component-preview.c
index f5b8322fa7..ec4f817042 100644
--- a/calendar/gui/e-cal-component-preview.c
+++ b/calendar/gui/e-cal-component-preview.c
@@ -40,7 +40,7 @@
struct _ECalComponentPreviewPrivate {
/* information about currently showing component in a preview;
- if it didn't change then the preview is not updated */
+ * if it didn't change then the preview is not updated */
gchar *cal_uid;
gchar *comp_uid;
struct icaltimetype comp_last_modified;
@@ -67,7 +67,7 @@ clear_comp_info (ECalComponentPreview *preview)
}
/* Stores information about actually shown component and
- returns whether component in the preview changed */
+ * returns whether component in the preview changed */
static gboolean
update_comp_info (ECalComponentPreview *preview,
ECalClient *client,
@@ -457,7 +457,7 @@ e_cal_component_preview_display (ECalComponentPreview *preview,
g_return_if_fail (E_IS_CAL_COMPONENT (comp));
/* do not update preview when setting the same component as last time,
- which even didn't change */
+ * which even didn't change */
if (!update_comp_info (preview, client, comp))
return;
diff --git a/calendar/gui/e-cal-config.c b/calendar/gui/e-cal-config.c
index 804af17e91..8269a1067e 100644
--- a/calendar/gui/e-cal-config.c
+++ b/calendar/gui/e-cal-config.c
@@ -41,7 +41,8 @@ ecp_init (ECalConfig *cfg)
}
static void
-ecp_target_free (EConfig *ec, EConfigTarget *t)
+ecp_target_free (EConfig *ec,
+ EConfigTarget *t)
{
struct _ECalConfigPrivate *p = E_CAL_CONFIG (ec)->priv;
@@ -78,13 +79,15 @@ ecp_target_free (EConfig *ec, EConfigTarget *t)
}
static void
-ecp_source_changed (struct _ESource *source, EConfig *ec)
+ecp_source_changed (ESource *source,
+ EConfig *ec)
{
e_config_target_changed (ec, E_CONFIG_TARGET_CHANGED_STATE);
}
static void
-ecp_set_target (EConfig *ec, EConfigTarget *t)
+ecp_set_target (EConfig *ec,
+ EConfigTarget *t)
{
struct _ECalConfigPrivate *p = E_CAL_CONFIG (ec)->priv;
@@ -139,7 +142,8 @@ e_cal_config_get_type (void)
}
ECalConfig *
-e_cal_config_new (gint type, const gchar *menuid)
+e_cal_config_new (gint type,
+ const gchar *menuid)
{
ECalConfig *ecp = g_object_new (e_cal_config_get_type (), NULL);
e_config_construct (&ecp->config, type, menuid);
@@ -147,7 +151,8 @@ e_cal_config_new (gint type, const gchar *menuid)
}
ECalConfigTargetSource *
-e_cal_config_target_new_source (ECalConfig *ecp, ESource *source)
+e_cal_config_target_new_source (ECalConfig *ecp,
+ ESource *source)
{
ECalConfigTargetSource *t;
diff --git a/calendar/gui/e-cal-config.h b/calendar/gui/e-cal-config.h
index f803e99285..582bdf6a53 100644
--- a/calendar/gui/e-cal-config.h
+++ b/calendar/gui/e-cal-config.h
@@ -73,7 +73,7 @@ typedef struct _ECalConfigTargetPrefs ECalConfigTargetPrefs;
struct _ECalConfigTargetSource {
EConfigTarget target;
- struct _ESource *source;
+ ESource *source;
ECalClientSourceType source_type;
};
diff --git a/calendar/gui/e-cal-event.c b/calendar/gui/e-cal-event.c
index af84e9e865..176e2923b3 100644
--- a/calendar/gui/e-cal-event.c
+++ b/calendar/gui/e-cal-event.c
@@ -40,7 +40,8 @@ ece_finalize (GObject *o)
}
static void
-ece_target_free (EEvent *ev, EEventTarget *t)
+ece_target_free (EEvent *ev,
+ EEventTarget *t)
{
switch (t->type) {
case E_CAL_EVENT_TARGET_BACKEND: {
diff --git a/calendar/gui/e-cal-list-view.c b/calendar/gui/e-cal-list-view.c
index c287b7a6ca..48458e6123 100644
--- a/calendar/gui/e-cal-list-view.c
+++ b/calendar/gui/e-cal-list-view.c
@@ -109,7 +109,8 @@ e_cal_list_view_init (ECalListView *cal_list_view)
/* Returns the current time, for the ECellDateEdit items. */
static struct tm
-get_current_time_cb (ECellDateEdit *ecde, gpointer data)
+get_current_time_cb (ECellDateEdit *ecde,
+ gpointer data)
{
ECalListView *cal_list_view = data;
icaltimezone *zone;
@@ -132,7 +133,8 @@ get_current_time_cb (ECellDateEdit *ecde, gpointer data)
}
void
-e_cal_list_view_load_state (ECalListView *cal_list_view, gchar *filename)
+e_cal_list_view_load_state (ECalListView *cal_list_view,
+ gchar *filename)
{
struct stat st;
@@ -145,7 +147,8 @@ e_cal_list_view_load_state (ECalListView *cal_list_view, gchar *filename)
}
void
-e_cal_list_view_save_state (ECalListView *cal_list_view, gchar *filename)
+e_cal_list_view_save_state (ECalListView *cal_list_view,
+ gchar *filename)
{
g_return_if_fail (cal_list_view != NULL);
g_return_if_fail (E_IS_CAL_LIST_VIEW (cal_list_view));
@@ -176,7 +179,7 @@ setup_e_table (ECalListView *cal_list_view)
/* Normal string fields */
cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
- g_object_set (G_OBJECT (cell),
+ g_object_set (cell,
"bg_color_column", E_CAL_MODEL_FIELD_COLOR,
NULL);
@@ -186,7 +189,7 @@ setup_e_table (ECalListView *cal_list_view)
/* Date fields */
cell = e_cell_date_edit_text_new (NULL, GTK_JUSTIFY_LEFT);
- g_object_set (G_OBJECT (cell),
+ g_object_set (cell,
"bg_color_column", E_CAL_MODEL_FIELD_COLOR,
NULL);
@@ -225,7 +228,7 @@ setup_e_table (ECalListView *cal_list_view)
/* Combo fields */
cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
- g_object_set (G_OBJECT (cell),
+ g_object_set (cell,
"bg_color_column", E_CAL_MODEL_FIELD_COLOR,
"editable", FALSE,
NULL);
@@ -366,8 +369,11 @@ e_cal_list_view_popup_menu (GtkWidget *widget)
}
static gboolean
-e_cal_list_view_on_table_double_click (GtkWidget *table, gint row, gint col, GdkEvent *event,
- gpointer data)
+e_cal_list_view_on_table_double_click (GtkWidget *table,
+ gint row,
+ gint col,
+ GdkEvent *event,
+ gpointer data)
{
ECalListView *cal_list_view = E_CAL_LIST_VIEW (data);
ECalModelComponent *comp_data;
@@ -379,8 +385,11 @@ e_cal_list_view_on_table_double_click (GtkWidget *table, gint row, gint col, Gdk
}
static gboolean
-e_cal_list_view_on_table_right_click (GtkWidget *table, gint row, gint col, GdkEvent *event,
- gpointer data)
+e_cal_list_view_on_table_right_click (GtkWidget *table,
+ gint row,
+ gint col,
+ GdkEvent *event,
+ gpointer data)
{
ECalListView *cal_list_view = E_CAL_LIST_VIEW (data);
@@ -389,7 +398,9 @@ e_cal_list_view_on_table_right_click (GtkWidget *table, gint row, gint col, GdkE
}
static void
-e_cal_list_view_cursor_change_cb (ETable *etable, gint row, gpointer data)
+e_cal_list_view_cursor_change_cb (ETable *etable,
+ gint row,
+ gpointer data)
{
ECalListView *cal_list_view = E_CAL_LIST_VIEW (data);
@@ -397,7 +408,9 @@ e_cal_list_view_cursor_change_cb (ETable *etable, gint row, gpointer data)
}
static gboolean
-e_cal_list_view_get_selected_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time)
+e_cal_list_view_get_selected_time_range (ECalendarView *cal_view,
+ time_t *start_time,
+ time_t *end_time)
{
GList *selected;
icaltimezone *zone;
@@ -471,7 +484,10 @@ e_cal_list_view_get_selected_events (ECalendarView *cal_view)
}
static void
-adjust_range (icaltimetype icaltime, time_t *earliest, time_t *latest, gboolean *set)
+adjust_range (icaltimetype icaltime,
+ time_t *earliest,
+ time_t *latest,
+ gboolean *set)
{
time_t t;
@@ -485,11 +501,13 @@ adjust_range (icaltimetype icaltime, time_t *earliest, time_t *latest, gboolean
*set = TRUE;
}
-/* NOTE: Time use for this function increases linearly with number of events. This is not
- * ideal, since it's used in a couple of places. We could probably be smarter about it,
- * and use do it less frequently... */
+/* NOTE: Time use for this function increases linearly with number of events.
+ * This is not ideal, since it's used in a couple of places. We could probably
+ * be smarter about it, and use do it less frequently... */
static gboolean
-e_cal_list_view_get_visible_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time)
+e_cal_list_view_get_visible_time_range (ECalendarView *cal_view,
+ time_t *start_time,
+ time_t *end_time)
{
time_t earliest = G_MAXINT, latest = 0;
gboolean set = FALSE;
@@ -532,7 +550,9 @@ e_cal_list_view_get_visible_time_range (ECalendarView *cal_view, time_t *start_t
}
gboolean
-e_cal_list_view_get_range_shown (ECalListView *cal_list_view, GDate *start_date, gint *days_shown)
+e_cal_list_view_get_range_shown (ECalListView *cal_list_view,
+ GDate *start_date,
+ gint *days_shown)
{
time_t first, last;
GDate end_date;
diff --git a/calendar/gui/e-cal-model-calendar.c b/calendar/gui/e-cal-model-calendar.c
index ea8dd7bba7..1254a8711b 100644
--- a/calendar/gui/e-cal-model-calendar.c
+++ b/calendar/gui/e-cal-model-calendar.c
@@ -114,7 +114,8 @@ ecmc_column_count (ETableModel *etm)
}
static ECellDateEditValue *
-get_dtend (ECalModelCalendar *model, ECalModelComponent *comp_data)
+get_dtend (ECalModelCalendar *model,
+ ECalModelComponent *comp_data)
{
struct icaltimetype tt_end;
@@ -194,7 +195,9 @@ get_transparency (ECalModelComponent *comp_data)
}
static gpointer
-ecmc_value_at (ETableModel *etm, gint col, gint row)
+ecmc_value_at (ETableModel *etm,
+ gint col,
+ gint row)
{
ECalModelComponent *comp_data;
ECalModelCalendar *model = (ECalModelCalendar *) etm;
@@ -224,13 +227,16 @@ ecmc_value_at (ETableModel *etm, gint col, gint row)
}
static void
-set_dtend (ECalModel* model, ECalModelComponent *comp_data, gconstpointer value)
+set_dtend (ECalModel *model,
+ ECalModelComponent *comp_data,
+ gconstpointer value)
{
e_cal_model_update_comp_time (model, comp_data, value, ICAL_DTEND_PROPERTY, icalproperty_set_dtend, icalproperty_new_dtend);
}
static void
-set_location (ECalModelComponent *comp_data, gconstpointer value)
+set_location (ECalModelComponent *comp_data,
+ gconstpointer value)
{
icalproperty *prop;
@@ -252,7 +258,8 @@ set_location (ECalModelComponent *comp_data, gconstpointer value)
}
static void
-set_transparency (ECalModelComponent *comp_data, gconstpointer value)
+set_transparency (ECalModelComponent *comp_data,
+ gconstpointer value)
{
icalproperty *prop;
@@ -289,7 +296,10 @@ set_transparency (ECalModelComponent *comp_data, gconstpointer value)
}
static void
-ecmc_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer value)
+ecmc_set_value_at (ETableModel *etm,
+ gint col,
+ gint row,
+ gconstpointer value)
{
ECalModelComponent *comp_data;
CalObjModType mod = CALOBJ_MOD_ALL;
@@ -377,7 +387,9 @@ ecmc_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer value)
}
static gboolean
-ecmc_is_cell_editable (ETableModel *etm, gint col, gint row)
+ecmc_is_cell_editable (ETableModel *etm,
+ gint col,
+ gint row)
{
ECalModelCalendar *model = (ECalModelCalendar *) etm;
@@ -402,7 +414,9 @@ ecmc_is_cell_editable (ETableModel *etm, gint col, gint row)
}
static gpointer
-ecmc_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
+ecmc_duplicate_value (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_CALENDAR_FIELD_LAST, NULL);
@@ -430,7 +444,9 @@ ecmc_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
}
static void
-ecmc_free_value (ETableModel *etm, gint col, gpointer value)
+ecmc_free_value (ETableModel *etm,
+ gint col,
+ gpointer value)
{
g_return_if_fail (col >= 0 && col < E_CAL_MODEL_CALENDAR_FIELD_LAST);
@@ -450,7 +466,8 @@ ecmc_free_value (ETableModel *etm, gint col, gpointer value)
}
static gpointer
-ecmc_initialize_value (ETableModel *etm, gint col)
+ecmc_initialize_value (ETableModel *etm,
+ gint col)
{
g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_CALENDAR_FIELD_LAST, NULL);
@@ -469,7 +486,9 @@ ecmc_initialize_value (ETableModel *etm, gint col)
}
static gboolean
-ecmc_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
+ecmc_value_is_empty (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_CALENDAR_FIELD_LAST, TRUE);
@@ -488,7 +507,9 @@ ecmc_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
}
static gchar *
-ecmc_value_to_string (ETableModel *etm, gint col, gconstpointer value)
+ecmc_value_to_string (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_CALENDAR_FIELD_LAST, g_strdup (""));
@@ -509,8 +530,10 @@ ecmc_value_to_string (ETableModel *etm, gint col, gconstpointer value)
/* ECalModel class methods */
static void
-ecmc_fill_component_from_model (ECalModel *model, ECalModelComponent *comp_data,
- ETableModel *source_model, gint row)
+ecmc_fill_component_from_model (ECalModel *model,
+ ECalModelComponent *comp_data,
+ ETableModel *source_model,
+ gint row)
{
g_return_if_fail (E_IS_CAL_MODEL_CALENDAR (model));
g_return_if_fail (comp_data != NULL);
diff --git a/calendar/gui/e-cal-model-calendar.h b/calendar/gui/e-cal-model-calendar.h
index 6e3b3fe617..f29d7d413d 100644
--- a/calendar/gui/e-cal-model-calendar.h
+++ b/calendar/gui/e-cal-model-calendar.h
@@ -55,7 +55,7 @@ typedef struct _ECalModelCalendarPrivate ECalModelCalendarPrivate;
typedef enum {
/* If you add new items here or reorder them, you have to update the
- .etspec files for the tables using this model */
+ * .etspec files for the tables using this model */
E_CAL_MODEL_CALENDAR_FIELD_DTEND = E_CAL_MODEL_FIELD_LAST,
E_CAL_MODEL_CALENDAR_FIELD_LOCATION,
E_CAL_MODEL_CALENDAR_FIELD_TRANSPARENCY,
diff --git a/calendar/gui/e-cal-model-memos.c b/calendar/gui/e-cal-model-memos.c
index 59a48d031c..261cdda058 100644
--- a/calendar/gui/e-cal-model-memos.c
+++ b/calendar/gui/e-cal-model-memos.c
@@ -115,7 +115,9 @@ ecmm_column_count (ETableModel *etm)
}
static gpointer
-ecmm_value_at (ETableModel *etm, gint col, gint row)
+ecmm_value_at (ETableModel *etm,
+ gint col,
+ gint row)
{
ECalModelComponent *comp_data;
ECalModelMemos *model = (ECalModelMemos *) etm;
@@ -136,7 +138,10 @@ ecmm_value_at (ETableModel *etm, gint col, gint row)
}
static void
-ecmm_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer value)
+ecmm_set_value_at (ETableModel *etm,
+ gint col,
+ gint row,
+ gconstpointer value)
{
ECalModelComponent *comp_data;
ECalModelMemos *model = (ECalModelMemos *) etm;
@@ -168,7 +173,9 @@ ecmm_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer value)
}
static gboolean
-ecmm_is_cell_editable (ETableModel *etm, gint col, gint row)
+ecmm_is_cell_editable (ETableModel *etm,
+ gint col,
+ gint row)
{
ECalModelMemos *model = (ECalModelMemos *) etm;
gboolean retval = FALSE;
@@ -187,7 +194,9 @@ ecmm_is_cell_editable (ETableModel *etm, gint col, gint row)
}
static gpointer
-ecmm_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
+ecmm_duplicate_value (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_MEMOS_FIELD_LAST, NULL);
@@ -198,7 +207,9 @@ ecmm_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
}
static void
-ecmm_free_value (ETableModel *etm, gint col, gpointer value)
+ecmm_free_value (ETableModel *etm,
+ gint col,
+ gpointer value)
{
g_return_if_fail (col >= 0 && col < E_CAL_MODEL_MEMOS_FIELD_LAST);
@@ -209,7 +220,8 @@ ecmm_free_value (ETableModel *etm, gint col, gpointer value)
}
static gpointer
-ecmm_initialize_value (ETableModel *etm, gint col)
+ecmm_initialize_value (ETableModel *etm,
+ gint col)
{
g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_MEMOS_FIELD_LAST, NULL);
@@ -220,7 +232,9 @@ ecmm_initialize_value (ETableModel *etm, gint col)
}
static gboolean
-ecmm_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
+ecmm_value_is_empty (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_MEMOS_FIELD_LAST, TRUE);
@@ -231,7 +245,9 @@ ecmm_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
}
static gchar *
-ecmm_value_to_string (ETableModel *etm, gint col, gconstpointer value)
+ecmm_value_to_string (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_MEMOS_FIELD_LAST, g_strdup (""));
@@ -244,8 +260,10 @@ ecmm_value_to_string (ETableModel *etm, gint col, gconstpointer value)
/* ECalModel class methods */
static void
-ecmm_fill_component_from_model (ECalModel *model, ECalModelComponent *comp_data,
- ETableModel *source_model, gint row)
+ecmm_fill_component_from_model (ECalModel *model,
+ ECalModelComponent *comp_data,
+ ETableModel *source_model,
+ gint row)
{
icaltimetype start;
g_return_if_fail (E_IS_CAL_MODEL_MEMOS (model));
diff --git a/calendar/gui/e-cal-model-memos.h b/calendar/gui/e-cal-model-memos.h
index 3977bbe0cb..2be1e4d97c 100644
--- a/calendar/gui/e-cal-model-memos.h
+++ b/calendar/gui/e-cal-model-memos.h
@@ -56,7 +56,7 @@ typedef struct _ECalModelMemosPrivate ECalModelMemosPrivate;
typedef enum {
/* If you add new items here or reorder them, you have to update the
- .etspec files for the tables using this model */
+ * .etspec files for the tables using this model */
E_CAL_MODEL_MEMOS_FIELD_LAST = E_CAL_MODEL_FIELD_LAST
} ECalModelMemoField;
diff --git a/calendar/gui/e-cal-model-tasks.c b/calendar/gui/e-cal-model-tasks.c
index 51811c783f..8602ce58cf 100644
--- a/calendar/gui/e-cal-model-tasks.c
+++ b/calendar/gui/e-cal-model-tasks.c
@@ -195,13 +195,14 @@ ecmt_column_count (ETableModel *etm)
}
/* This makes sure a task is marked as complete.
- It makes sure the "Date Completed" property is set. If the completed_date
- is not -1, then that is used, otherwise if the "Date Completed" property
- is not already set it is set to the current time.
- It makes sure the percent is set to 100, and that the status is "Completed".
- Note that this doesn't update the component on the server. */
+ * It makes sure the "Date Completed" property is set. If the completed_date
+ * is not -1, then that is used, otherwise if the "Date Completed" property
+ * is not already set it is set to the current time.
+ * It makes sure the percent is set to 100, and that the status is "Completed".
+ * Note that this doesn't update the component on the server. */
static void
-ensure_task_complete (ECalModelComponent *comp_data, time_t completed_date)
+ensure_task_complete (ECalModelComponent *comp_data,
+ time_t completed_date)
{
icalproperty *prop;
gboolean set_completed = TRUE;
@@ -276,9 +277,9 @@ ensure_task_partially_complete (ECalModelComponent *comp_data)
}
/* This makes sure a task is marked as incomplete. It clears the
- "Date Completed" property. If the percent is set to 100 it removes it,
- and if the status is "Completed" it sets it to "Needs Action".
- Note that this doesn't update the component on the client. */
+ * "Date Completed" property. If the percent is set to 100 it removes it,
+ * and if the status is "Completed" it sets it to "Needs Action".
+ * Note that this doesn't update the component on the client. */
static void
ensure_task_not_complete (ECalModelComponent *comp_data)
{
@@ -486,7 +487,8 @@ typedef enum {
} ECalModelTasksDueStatus;
static ECalModelTasksDueStatus
-get_due_status (ECalModelTasks *model, ECalModelComponent *comp_data)
+get_due_status (ECalModelTasks *model,
+ ECalModelComponent *comp_data)
{
icalproperty *prop;
@@ -542,7 +544,8 @@ get_due_status (ECalModelTasks *model, ECalModelComponent *comp_data)
}
static gboolean
-is_overdue (ECalModelTasks *model, ECalModelComponent *comp_data)
+is_overdue (ECalModelTasks *model,
+ ECalModelComponent *comp_data)
{
switch (get_due_status (model, comp_data)) {
case E_CAL_MODEL_TASKS_DUE_NEVER:
@@ -558,7 +561,9 @@ is_overdue (ECalModelTasks *model, ECalModelComponent *comp_data)
}
static gpointer
-ecmt_value_at (ETableModel *etm, gint col, gint row)
+ecmt_value_at (ETableModel *etm,
+ gint col,
+ gint row)
{
ECalModelComponent *comp_data;
ECalModelTasks *model = (ECalModelTasks *) etm;
@@ -602,7 +607,9 @@ ecmt_value_at (ETableModel *etm, gint col, gint row)
}
static void
-set_completed (ECalModelTasks *model, ECalModelComponent *comp_data, gconstpointer value)
+set_completed (ECalModelTasks *model,
+ ECalModelComponent *comp_data,
+ gconstpointer value)
{
ECellDateEditValue *dv = (ECellDateEditValue *) value;
@@ -613,12 +620,12 @@ set_completed (ECalModelTasks *model, ECalModelComponent *comp_data, gconstpoint
if (dv->tt.is_date) {
/* if it's a date, it will be floating,
- but completed needs a date time value */
+ * but completed needs a date time value */
dv->tt.is_date = FALSE;
t = icaltime_as_timet_with_zone (dv->tt, e_cal_model_get_timezone (E_CAL_MODEL (model)));
} else {
/* we assume that COMPLETED is entered in the current timezone,
- even though it gets stored in UTC */
+ * even though it gets stored in UTC */
t = icaltime_as_timet_with_zone (dv->tt, dv->zone);
}
@@ -627,7 +634,8 @@ set_completed (ECalModelTasks *model, ECalModelComponent *comp_data, gconstpoint
}
static void
-set_complete (ECalModelComponent *comp_data, gconstpointer value)
+set_complete (ECalModelComponent *comp_data,
+ gconstpointer value)
{
gint state = GPOINTER_TO_INT (value);
@@ -638,7 +646,9 @@ set_complete (ECalModelComponent *comp_data, gconstpointer value)
}
static void
-set_due (ECalModel* model, ECalModelComponent *comp_data, gconstpointer value)
+set_due (ECalModel *model,
+ ECalModelComponent *comp_data,
+ gconstpointer value)
{
e_cal_model_update_comp_time (model, comp_data, value, ICAL_DUE_PROPERTY, icalproperty_set_due, icalproperty_new_due);
}
@@ -658,7 +668,8 @@ show_geo_warning (void)
}
static void
-set_geo (ECalModelComponent *comp_data, const gchar *value)
+set_geo (ECalModelComponent *comp_data,
+ const gchar *value)
{
gdouble latitude, longitude;
gint matched;
@@ -690,7 +701,8 @@ set_geo (ECalModelComponent *comp_data, const gchar *value)
}
static void
-set_status (ECalModelComponent *comp_data, const gchar *value)
+set_status (ECalModelComponent *comp_data,
+ const gchar *value)
{
icalproperty_status status;
icalproperty *prop;
@@ -748,7 +760,8 @@ set_status (ECalModelComponent *comp_data, const gchar *value)
}
static void
-set_percent (ECalModelComponent *comp_data, gconstpointer value)
+set_percent (ECalModelComponent *comp_data,
+ gconstpointer value)
{
icalproperty *prop;
gint percent = GPOINTER_TO_INT (value);
@@ -790,7 +803,8 @@ set_percent (ECalModelComponent *comp_data, gconstpointer value)
}
static void
-set_priority (ECalModelComponent *comp_data, const gchar *value)
+set_priority (ECalModelComponent *comp_data,
+ const gchar *value)
{
icalproperty *prop;
gint priority;
@@ -812,7 +826,8 @@ set_priority (ECalModelComponent *comp_data, const gchar *value)
}
static void
-set_url (ECalModelComponent *comp_data, const gchar *value)
+set_url (ECalModelComponent *comp_data,
+ const gchar *value)
{
icalproperty *prop;
@@ -834,7 +849,10 @@ set_url (ECalModelComponent *comp_data, const gchar *value)
}
static void
-ecmt_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer value)
+ecmt_set_value_at (ETableModel *etm,
+ gint col,
+ gint row,
+ gconstpointer value)
{
ECalModelComponent *comp_data;
ECalModelTasks *model = (ECalModelTasks *) etm;
@@ -861,7 +879,7 @@ ecmt_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer value)
set_complete (comp_data, value);
break;
case E_CAL_MODEL_TASKS_FIELD_DUE :
- set_due ((ECalModel*) model, comp_data, value);
+ set_due ((ECalModel *) model, comp_data, value);
break;
case E_CAL_MODEL_TASKS_FIELD_GEO :
set_geo (comp_data, value);
@@ -884,7 +902,9 @@ ecmt_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer value)
}
static gboolean
-ecmt_is_cell_editable (ETableModel *etm, gint col, gint row)
+ecmt_is_cell_editable (ETableModel *etm,
+ gint col,
+ gint row)
{
ECalModelTasks *model = (ECalModelTasks *) etm;
@@ -915,7 +935,9 @@ ecmt_is_cell_editable (ETableModel *etm, gint col, gint row)
}
static gpointer
-ecmt_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
+ecmt_duplicate_value (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_TASKS_FIELD_LAST, NULL);
@@ -951,7 +973,9 @@ ecmt_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
}
static void
-ecmt_free_value (ETableModel *etm, gint col, gpointer value)
+ecmt_free_value (ETableModel *etm,
+ gint col,
+ gpointer value)
{
g_return_if_fail (col >= 0 && col < E_CAL_MODEL_TASKS_FIELD_LAST);
@@ -978,7 +1002,8 @@ ecmt_free_value (ETableModel *etm, gint col, gpointer value)
}
static gpointer
-ecmt_initialize_value (ETableModel *etm, gint col)
+ecmt_initialize_value (ETableModel *etm,
+ gint col)
{
ECalModelTasks *model = (ECalModelTasks *) etm;
@@ -1007,7 +1032,9 @@ ecmt_initialize_value (ETableModel *etm, gint col)
}
static gboolean
-ecmt_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
+ecmt_value_is_empty (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
ECalModelTasks *model = (ECalModelTasks *) etm;
@@ -1037,7 +1064,9 @@ ecmt_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
}
static gchar *
-ecmt_value_to_string (ETableModel *etm, gint col, gconstpointer value)
+ecmt_value_to_string (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
ECalModelTasks *model = (ECalModelTasks *) etm;
@@ -1099,8 +1128,10 @@ ecmt_get_color_for_component (ECalModel *model,
}
static void
-ecmt_fill_component_from_model (ECalModel *model, ECalModelComponent *comp_data,
- ETableModel *source_model, gint row)
+ecmt_fill_component_from_model (ECalModel *model,
+ ECalModelComponent *comp_data,
+ ETableModel *source_model,
+ gint row)
{
gpointer value;
diff --git a/calendar/gui/e-cal-model-tasks.h b/calendar/gui/e-cal-model-tasks.h
index c0ceaaa2c5..f35f8dd28c 100644
--- a/calendar/gui/e-cal-model-tasks.h
+++ b/calendar/gui/e-cal-model-tasks.h
@@ -55,7 +55,7 @@ typedef struct _ECalModelTasksPrivate ECalModelTasksPrivate;
typedef enum {
/* If you add new items here or reorder them, you have to update the
- .etspec files for the tables using this model */
+ * .etspec files for the tables using this model */
E_CAL_MODEL_TASKS_FIELD_COMPLETED = E_CAL_MODEL_FIELD_LAST,
E_CAL_MODEL_TASKS_FIELD_COMPLETE,
E_CAL_MODEL_TASKS_FIELD_DUE,
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index 7a00fdb7dd..9bb8235d6e 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -778,7 +778,8 @@ get_classification (ECalModelComponent *comp_data)
}
static const gchar *
-get_color (ECalModel *model, ECalModelComponent *comp_data)
+get_color (ECalModel *model,
+ ECalModelComponent *comp_data)
{
g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
@@ -809,8 +810,9 @@ get_description (ECalModelComponent *comp_data)
return (gpointer) "";
}
-static ECellDateEditValue*
-get_dtstart (ECalModel *model, ECalModelComponent *comp_data)
+static ECellDateEditValue *
+get_dtstart (ECalModel *model,
+ ECalModelComponent *comp_data)
{
ECalModelPrivate *priv;
struct icaltimetype tt_start;
@@ -857,8 +859,12 @@ get_dtstart (ECalModel *model, ECalModelComponent *comp_data)
return comp_data->dtstart;
}
-static ECellDateEditValue*
-get_datetime_from_utc (ECalModel *model, ECalModelComponent *comp_data, icalproperty_kind propkind, struct icaltimetype (*get_value)(const icalproperty* prop), ECellDateEditValue **buffer)
+static ECellDateEditValue *
+get_datetime_from_utc (ECalModel *model,
+ ECalModelComponent *comp_data,
+ icalproperty_kind propkind,
+ struct icaltimetype (*get_value) (const icalproperty *prop),
+ ECellDateEditValue **buffer)
{
ECalModelPrivate *priv;
struct icaltimetype tt_value;
@@ -913,7 +919,9 @@ get_uid (ECalModelComponent *comp_data)
}
static gpointer
-ecm_value_at (ETableModel *etm, gint col, gint row)
+ecm_value_at (ETableModel *etm,
+ gint col,
+ gint row)
{
ECalModelPrivate *priv;
ECalModelComponent *comp_data;
@@ -1005,7 +1013,8 @@ ecm_value_at (ETableModel *etm, gint col, gint row)
}
static void
-set_categories (ECalModelComponent *comp_data, const gchar *value)
+set_categories (ECalModelComponent *comp_data,
+ const gchar *value)
{
icalproperty *prop;
@@ -1025,7 +1034,8 @@ set_categories (ECalModelComponent *comp_data, const gchar *value)
}
static void
-set_classification (ECalModelComponent *comp_data, const gchar *value)
+set_classification (ECalModelComponent *comp_data,
+ const gchar *value)
{
icalproperty *prop;
@@ -1056,7 +1066,8 @@ set_classification (ECalModelComponent *comp_data, const gchar *value)
}
static void
-set_description (ECalModelComponent *comp_data, const gchar *value)
+set_description (ECalModelComponent *comp_data,
+ const gchar *value)
{
icalproperty *prop;
@@ -1082,7 +1093,10 @@ set_description (ECalModelComponent *comp_data, const gchar *value)
}
static void
-datetime_to_zone (ECalClient *client, struct icaltimetype *tt, icaltimezone *tt_zone, const gchar *tzid)
+datetime_to_zone (ECalClient *client,
+ struct icaltimetype *tt,
+ icaltimezone *tt_zone,
+ const gchar *tzid)
{
icaltimezone *from, *to;
const gchar *tt_tzid = NULL;
@@ -1108,7 +1122,13 @@ datetime_to_zone (ECalClient *client, struct icaltimetype *tt, icaltimezone *tt_
/* updates time in a component, and keeps the timezone used in it, if exists */
void
-e_cal_model_update_comp_time (ECalModel *model, ECalModelComponent *comp_data, gconstpointer time_value, icalproperty_kind kind, void (*set_func)(icalproperty *prop, struct icaltimetype v), icalproperty * (*new_func)(struct icaltimetype v))
+e_cal_model_update_comp_time (ECalModel *model,
+ ECalModelComponent *comp_data,
+ gconstpointer time_value,
+ icalproperty_kind kind,
+ void (*set_func) (icalproperty *prop,
+ struct icaltimetype v),
+ icalproperty * (*new_func) (struct icaltimetype v))
{
ECellDateEditValue *dv = (ECellDateEditValue *) time_value;
icalproperty *prop;
@@ -1127,7 +1147,7 @@ e_cal_model_update_comp_time (ECalModel *model, ECalModelComponent *comp_data, g
param = NULL;
/* If we are setting the property to NULL (i.e. removing it), then
- we remove it if it exists. */
+ * we remove it if it exists. */
if (!dv) {
if (prop) {
icalcomponent_remove_property (comp_data->icalcomp, prop);
@@ -1165,17 +1185,25 @@ e_cal_model_update_comp_time (ECalModel *model, ECalModelComponent *comp_data, g
}
static void
-set_dtstart (ECalModel *model, ECalModelComponent *comp_data, gconstpointer value)
+set_dtstart (ECalModel *model,
+ ECalModelComponent *comp_data,
+ gconstpointer value)
{
- e_cal_model_update_comp_time (model, comp_data, value, ICAL_DTSTART_PROPERTY, icalproperty_set_dtstart, icalproperty_new_dtstart);
+ e_cal_model_update_comp_time (
+ model, comp_data, value,
+ ICAL_DTSTART_PROPERTY,
+ icalproperty_set_dtstart,
+ icalproperty_new_dtstart);
}
static void
-set_summary (ECalModelComponent *comp_data, const gchar *value)
+set_summary (ECalModelComponent *comp_data,
+ const gchar *value)
{
icalproperty *prop;
- prop = icalcomponent_get_first_property (comp_data->icalcomp, ICAL_SUMMARY_PROPERTY);
+ prop = icalcomponent_get_first_property (
+ comp_data->icalcomp, ICAL_SUMMARY_PROPERTY);
if (string_is_empty (value)) {
if (prop) {
@@ -1193,7 +1221,10 @@ set_summary (ECalModelComponent *comp_data, const gchar *value)
}
static void
-ecm_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer value)
+ecm_set_value_at (ETableModel *etm,
+ gint col,
+ gint row,
+ gconstpointer value)
{
ECalModelPrivate *priv;
ECalModelComponent *comp_data;
@@ -1250,7 +1281,8 @@ ecm_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer value)
* Returns: Whether @row is editable or not.
**/
gboolean
-e_cal_model_test_row_editable (ECalModel *model, gint row)
+e_cal_model_test_row_editable (ECalModel *model,
+ gint row)
{
gboolean readonly;
ECalClient *client = NULL;
@@ -1276,7 +1308,9 @@ e_cal_model_test_row_editable (ECalModel *model, gint row)
}
static gboolean
-ecm_is_cell_editable (ETableModel *etm, gint col, gint row)
+ecm_is_cell_editable (ETableModel *etm,
+ gint col,
+ gint row)
{
ECalModelPrivate *priv;
ECalModel *model = (ECalModel *) etm;
@@ -1304,7 +1338,9 @@ ecm_is_cell_editable (ETableModel *etm, gint col, gint row)
}
static void
-ecm_append_row (ETableModel *etm, ETableModel *source, gint row)
+ecm_append_row (ETableModel *etm,
+ ETableModel *source,
+ gint row)
{
ECalModelClass *model_class;
ECalModelComponent *comp_data;
@@ -1377,7 +1413,9 @@ ecm_append_row (ETableModel *etm, ETableModel *source, gint row)
}
static gpointer
-ecm_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
+ecm_duplicate_value (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_FIELD_LAST, NULL);
@@ -1412,7 +1450,9 @@ ecm_duplicate_value (ETableModel *etm, gint col, gconstpointer value)
}
static void
-ecm_free_value (ETableModel *etm, gint col, gpointer value)
+ecm_free_value (ETableModel *etm,
+ gint col,
+ gpointer value)
{
g_return_if_fail (col >= 0 && col < E_CAL_MODEL_FIELD_LAST);
@@ -1442,7 +1482,8 @@ ecm_free_value (ETableModel *etm, gint col, gpointer value)
}
static gpointer
-ecm_initialize_value (ETableModel *etm, gint col)
+ecm_initialize_value (ETableModel *etm,
+ gint col)
{
ECalModelPrivate *priv;
ECalModel *model = (ECalModel *) etm;
@@ -1473,7 +1514,9 @@ ecm_initialize_value (ETableModel *etm, gint col)
}
static gboolean
-ecm_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
+ecm_value_is_empty (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
ECalModelPrivate *priv;
ECalModel *model = (ECalModel *) etm;
@@ -1514,7 +1557,9 @@ ecm_value_is_empty (ETableModel *etm, gint col, gconstpointer value)
}
static gchar *
-ecm_value_to_string (ETableModel *etm, gint col, gconstpointer value)
+ecm_value_to_string (ETableModel *etm,
+ gint col,
+ gconstpointer value)
{
g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_FIELD_LAST, g_strdup (""));
@@ -1553,7 +1598,8 @@ typedef struct {
} AssignedColorData;
static const gchar *
-ecm_get_color_for_component (ECalModel *model, ECalModelComponent *comp_data)
+ecm_get_color_for_component (ECalModel *model,
+ ECalModelComponent *comp_data)
{
ESource *source;
const gchar *color_spec;
@@ -1633,7 +1679,8 @@ e_cal_model_get_component_kind (ECalModel *model)
}
void
-e_cal_model_set_component_kind (ECalModel *model, icalcomponent_kind kind)
+e_cal_model_set_component_kind (ECalModel *model,
+ icalcomponent_kind kind)
{
g_return_if_fail (E_IS_CAL_MODEL (model));
@@ -1649,7 +1696,8 @@ e_cal_model_get_flags (ECalModel *model)
}
void
-e_cal_model_set_flags (ECalModel *model, ECalModelFlags flags)
+e_cal_model_set_flags (ECalModel *model,
+ ECalModelFlags flags)
{
g_return_if_fail (E_IS_CAL_MODEL (model));
@@ -1679,7 +1727,7 @@ e_cal_model_set_timezone (ECalModel *model,
model->priv->zone = zone;
/* the timezone affects the times shown for date fields,
- so we need to redisplay everything */
+ * so we need to redisplay everything */
e_table_model_changed (E_TABLE_MODEL (model));
g_object_notify (G_OBJECT (model), "timezone");
@@ -1925,7 +1973,8 @@ e_cal_model_get_default_client (ECalModel *model)
}
void
-e_cal_model_set_default_client (ECalModel *model, ECalClient *client)
+e_cal_model_set_default_client (ECalModel *model,
+ ECalClient *client)
{
ECalModelPrivate *priv;
ECalModelClient *client_data;
@@ -1988,7 +2037,8 @@ e_cal_model_get_client_list (ECalModel *model)
* @uri: Uri for the client to get.
*/
ECalClient *
-e_cal_model_get_client_for_uri (ECalModel *model, const gchar *uri)
+e_cal_model_get_client_for_uri (ECalModel *model,
+ const gchar *uri)
{
GList *l;
@@ -2006,7 +2056,8 @@ e_cal_model_get_client_for_uri (ECalModel *model, const gchar *uri)
}
static ECalModelClient *
-find_client_data (ECalModel *model, ECalClient *client)
+find_client_data (ECalModel *model,
+ ECalClient *client)
{
ECalModelPrivate *priv;
GList *l;
@@ -2024,7 +2075,9 @@ find_client_data (ECalModel *model, ECalClient *client)
}
static ECalModelComponent *
-search_by_id_and_client (ECalModelPrivate *priv, ECalClient *client, const ECalComponentId *id)
+search_by_id_and_client (ECalModelPrivate *priv,
+ ECalClient *client,
+ const ECalComponentId *id)
{
gint i;
@@ -2070,7 +2123,10 @@ typedef struct {
} RecurrenceExpansionData;
static gboolean
-add_instance_cb (ECalComponent *comp, time_t instance_start, time_t instance_end, gpointer user_data)
+add_instance_cb (ECalComponent *comp,
+ time_t instance_start,
+ time_t instance_end,
+ gpointer user_data)
{
ECalModelComponent *comp_data;
ECalModelPrivate *priv;
@@ -2145,7 +2201,8 @@ ensure_dates_are_in_default_zone (ECalModel *model,
}
static gint
-place_master_object_first_cb (gconstpointer p1, gconstpointer p2)
+place_master_object_first_cb (gconstpointer p1,
+ gconstpointer p2)
{
icalcomponent *c1 = (icalcomponent *) p1, *c2 = (icalcomponent *) p2;
const gchar *uid1, *uid2;
@@ -2180,7 +2237,9 @@ place_master_object_first_cb (gconstpointer p1, gconstpointer p2)
static void client_view_objects_added_cb (ECalClientView *view, const GSList *objects, ECalModel *model);
static void
-process_added (ECalClientView *view, const GSList *objects, ECalModel *model)
+process_added (ECalClientView *view,
+ const GSList *objects,
+ ECalModel *model)
{
ECalModelPrivate *priv;
const GSList *l;
@@ -2260,7 +2319,9 @@ process_added (ECalClientView *view, const GSList *objects, ECalModel *model)
}
static void
-process_modified (ECalClientView *view, const GSList *objects, ECalModel *model)
+process_modified (ECalClientView *view,
+ const GSList *objects,
+ ECalModel *model)
{
ECalModelPrivate *priv;
const GSList *l;
@@ -2343,7 +2404,9 @@ process_modified (ECalClientView *view, const GSList *objects, ECalModel *model)
}
static void
-process_removed (ECalClientView *view, const GSList *ids, ECalModel *model)
+process_removed (ECalClientView *view,
+ const GSList *ids,
+ ECalModel *model)
{
ECalModelPrivate *priv;
const GSList *l;
@@ -2406,9 +2469,16 @@ free_comp_id (gpointer id)
}
static void
-process_event (ECalClientView *view, const GSList *objects, ECalModel *model,
- void (*process_fn) (ECalClientView *view, const GSList *objects, ECalModel *model),
- gboolean *in, GSList **save_list, gpointer (*copy_fn) (gpointer data), void (*free_fn)(gpointer data))
+process_event (ECalClientView *view,
+ const GSList *objects,
+ ECalModel *model,
+ void (*process_fn) (ECalClientView *view,
+ const GSList *objects,
+ ECalModel *model),
+ gboolean *in,
+ GSList **save_list,
+ gpointer (*copy_fn) (gpointer data),
+ void (*free_fn) (gpointer data))
{
gboolean skip = FALSE;
const GSList *l;
@@ -2456,43 +2526,63 @@ process_event (ECalClientView *view, const GSList *objects, ECalModel *model,
}
static void
-client_view_objects_added_cb (ECalClientView *view, const GSList *objects, ECalModel *model)
+client_view_objects_added_cb (ECalClientView *view,
+ const GSList *objects,
+ ECalModel *model)
{
- process_event (view, objects, model,
- process_added, &model->priv->in_added, &model->priv->notify_added,
- (gpointer (*)(gpointer)) icalcomponent_new_clone, (void (*)(gpointer)) icalcomponent_free);
+ process_event (
+ view, objects, model, process_added,
+ &model->priv->in_added,
+ &model->priv->notify_added,
+ (gpointer (*)(gpointer)) icalcomponent_new_clone,
+ (void (*)(gpointer)) icalcomponent_free);
}
static void
-client_view_objects_modified_cb (ECalClientView *view, const GSList *objects, ECalModel *model)
+client_view_objects_modified_cb (ECalClientView *view,
+ const GSList *objects,
+ ECalModel *model)
{
- process_event (view, objects, model,
- process_modified, &model->priv->in_modified, &model->priv->notify_modified,
- (gpointer (*)(gpointer)) icalcomponent_new_clone, (void (*)(gpointer)) icalcomponent_free);
+ process_event (
+ view, objects, model, process_modified,
+ &model->priv->in_modified,
+ &model->priv->notify_modified,
+ (gpointer (*)(gpointer)) icalcomponent_new_clone,
+ (void (*)(gpointer)) icalcomponent_free);
}
static void
-client_view_objects_removed_cb (ECalClientView *view, const GSList *ids, ECalModel *model)
-{
- process_event (view, ids, model,
- process_removed, &model->priv->in_removed, &model->priv->notify_removed,
+client_view_objects_removed_cb (ECalClientView *view,
+ const GSList *ids,
+ ECalModel *model)
+{
+ process_event (
+ view, ids, model, process_removed,
+ &model->priv->in_removed,
+ &model->priv->notify_removed,
copy_comp_id, free_comp_id);
}
static void
-client_view_progress_cb (ECalClientView *view, gint percent, const gchar *message, gpointer user_data)
+client_view_progress_cb (ECalClientView *view,
+ gint percent,
+ const gchar *message,
+ gpointer user_data)
{
ECalModel *model = (ECalModel *) user_data;
ECalClient *client = e_cal_client_view_get_client (view);
g_return_if_fail (E_IS_CAL_MODEL (model));
- g_signal_emit (G_OBJECT (model), signals[CAL_VIEW_PROGRESS], 0, message,
- percent, e_cal_client_get_source_type (client));
+ g_signal_emit (
+ model, signals[CAL_VIEW_PROGRESS], 0, message,
+ percent, e_cal_client_get_source_type (client));
}
static void
-client_view_complete_cb (ECalClientView *view, const GError *error, gpointer user_data)
+client_view_complete_cb (ECalClientView *view,
+ const GError *error,
+ gpointer user_data)
{
ECalModel *model = (ECalModel *) user_data;
ECalClient *client = e_cal_client_view_get_client (view);
@@ -2524,7 +2614,9 @@ free_get_view_data (struct get_view_data *gvd)
static gboolean retry_get_view_timeout_cb (gpointer user_data);
static void
-get_view_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+get_view_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
struct get_view_data *gvd = user_data;
GError *error = NULL;
@@ -2590,7 +2682,8 @@ retry_get_view_timeout_cb (gpointer user_data)
}
static void
-update_e_cal_view_for_client (ECalModel *model, ECalModelClient *client_data)
+update_e_cal_view_for_client (ECalModel *model,
+ ECalModelClient *client_data)
{
ECalModelPrivate *priv;
struct get_view_data *gvd;
@@ -2633,7 +2726,9 @@ update_e_cal_view_for_client (ECalModel *model, ECalModelClient *client_data)
}
void
-e_cal_model_update_status_message (ECalModel *model, const gchar *message, gdouble percent)
+e_cal_model_update_status_message (ECalModel *model,
+ const gchar *message,
+ gdouble percent)
{
g_return_if_fail (model != NULL);
@@ -2641,7 +2736,8 @@ e_cal_model_update_status_message (ECalModel *model, const gchar *message, gdoub
}
static void
-backend_died_cb (ECalClient *client, gpointer user_data)
+backend_died_cb (ECalClient *client,
+ gpointer user_data)
{
ECalModel *model;
@@ -2769,7 +2865,9 @@ cal_model_retry_open_timeout_cb (gpointer user_data)
}
static ECalModelClient *
-add_new_client (ECalModel *model, ECalClient *client, gboolean do_query)
+add_new_client (ECalModel *model,
+ ECalClient *client,
+ gboolean do_query)
{
ECalModelPrivate *priv;
ECalModelClient *client_data;
@@ -2799,8 +2897,9 @@ add_new_client (ECalModel *model, ECalClient *client, gboolean do_query)
priv->clients = g_list_append (priv->clients, client_data);
- g_signal_connect (G_OBJECT (client_data->client), "backend_died",
- G_CALLBACK (backend_died_cb), model);
+ g_signal_connect (
+ client_data->client, "backend_died",
+ G_CALLBACK (backend_died_cb), model);
load:
if (e_client_is_opened (E_CLIENT (client))) {
@@ -2824,7 +2923,8 @@ add_new_client (ECalModel *model, ECalClient *client, gboolean do_query)
* e_cal_model_add_client
*/
void
-e_cal_model_add_client (ECalModel *model, ECalClient *client)
+e_cal_model_add_client (ECalModel *model,
+ ECalClient *client)
{
g_return_if_fail (E_IS_CAL_MODEL (model));
g_return_if_fail (E_IS_CAL_CLIENT (client));
@@ -2833,7 +2933,8 @@ e_cal_model_add_client (ECalModel *model, ECalClient *client)
}
static void
-remove_client_objects (ECalModel *model, ECalModelClient *client_data)
+remove_client_objects (ECalModel *model,
+ ECalModelClient *client_data)
{
gint i;
@@ -2864,7 +2965,8 @@ remove_client_objects (ECalModel *model, ECalModelClient *client_data)
}
static void
-remove_client (ECalModel *model, ECalModelClient *client_data)
+remove_client (ECalModel *model,
+ ECalModelClient *client_data)
{
/* FIXME We might not want to disconnect the open signal for the default client */
g_signal_handlers_disconnect_matched (client_data->client, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, model);
@@ -2898,7 +3000,8 @@ remove_client (ECalModel *model, ECalModelClient *client_data)
* e_cal_model_remove_client
*/
void
-e_cal_model_remove_client (ECalModel *model, ECalClient *client)
+e_cal_model_remove_client (ECalModel *model,
+ ECalClient *client)
{
ECalModelClient *client_data;
@@ -3029,7 +3132,7 @@ redo_queries (ECalModel *model)
}
/* clean up the current contents, which should be done
- always from the main thread, because of gtk calls during removal */
+ * always from the main thread, because of gtk calls during removal */
data.model = model;
data.eflag = e_flag_new ();
@@ -3053,7 +3156,9 @@ redo_queries (ECalModel *model)
}
void
-e_cal_model_get_time_range (ECalModel *model, time_t *start, time_t *end)
+e_cal_model_get_time_range (ECalModel *model,
+ time_t *start,
+ time_t *end)
{
ECalModelPrivate *priv;
@@ -3070,7 +3175,9 @@ e_cal_model_get_time_range (ECalModel *model, time_t *start, time_t *end)
}
void
-e_cal_model_set_time_range (ECalModel *model, time_t start, time_t end)
+e_cal_model_set_time_range (ECalModel *model,
+ time_t start,
+ time_t end)
{
ECalModelPrivate *priv;
@@ -3108,7 +3215,8 @@ e_cal_model_get_search_query (ECalModel *model)
* e_cal_model_set_query
*/
void
-e_cal_model_set_search_query (ECalModel *model, const gchar *sexp)
+e_cal_model_set_search_query (ECalModel *model,
+ const gchar *sexp)
{
ECalModelPrivate *priv;
@@ -3131,7 +3239,10 @@ e_cal_model_set_search_query (ECalModel *model, const gchar *sexp)
* e_cal_model_set_query
*/
void
-e_cal_model_set_search_query_with_time_range (ECalModel *model, const gchar *sexp, time_t start, time_t end)
+e_cal_model_set_search_query_with_time_range (ECalModel *model,
+ const gchar *sexp,
+ time_t start,
+ time_t end)
{
ECalModelPrivate *priv;
gboolean do_query = FALSE;
@@ -3164,7 +3275,8 @@ e_cal_model_set_search_query_with_time_range (ECalModel *model, const gchar *sex
* e_cal_model_create_component_with_defaults
*/
icalcomponent *
-e_cal_model_create_component_with_defaults (ECalModel *model, gboolean all_day)
+e_cal_model_create_component_with_defaults (ECalModel *model,
+ gboolean all_day)
{
ECalModelPrivate *priv;
ECalComponent *comp;
@@ -3222,7 +3334,8 @@ e_cal_model_create_component_with_defaults (ECalModel *model, gboolean all_day)
* e_cal_model_get_color_for_component
*/
const gchar *
-e_cal_model_get_color_for_component (ECalModel *model, ECalModelComponent *comp_data)
+e_cal_model_get_color_for_component (ECalModel *model,
+ ECalModelComponent *comp_data)
{
ECalModelClass *model_class;
const gchar *color = NULL;
@@ -3244,7 +3357,11 @@ e_cal_model_get_color_for_component (ECalModel *model, ECalModelComponent *comp_
* e_cal_model_get_rgb_color_for_component
*/
gboolean
-e_cal_model_get_rgb_color_for_component (ECalModel *model, ECalModelComponent *comp_data, double *red, double *green, double *blue)
+e_cal_model_get_rgb_color_for_component (ECalModel *model,
+ ECalModelComponent *comp_data,
+ gdouble *red,
+ gdouble *green,
+ gdouble *blue)
{
GdkColor gdk_color;
const gchar *color;
@@ -3269,7 +3386,8 @@ e_cal_model_get_rgb_color_for_component (ECalModel *model, ECalModelComponent *c
* e_cal_model_get_component_at
*/
ECalModelComponent *
-e_cal_model_get_component_at (ECalModel *model, gint row)
+e_cal_model_get_component_at (ECalModel *model,
+ gint row)
{
ECalModelPrivate *priv;
@@ -3283,7 +3401,8 @@ e_cal_model_get_component_at (ECalModel *model, gint row)
}
ECalModelComponent *
-e_cal_model_get_component_for_uid (ECalModel *model, const ECalComponentId *id)
+e_cal_model_get_component_for_uid (ECalModel *model,
+ const ECalComponentId *id)
{
ECalModelPrivate *priv;
@@ -3298,7 +3417,8 @@ e_cal_model_get_component_for_uid (ECalModel *model, const ECalComponentId *id)
* e_cal_model_date_value_to_string
*/
gchar *
-e_cal_model_date_value_to_string (ECalModel *model, gconstpointer value)
+e_cal_model_date_value_to_string (ECalModel *model,
+ gconstpointer value)
{
ECalModelPrivate *priv;
ECellDateEditValue *dv = (ECellDateEditValue *) value;
@@ -3339,11 +3459,11 @@ static ECellDateEditValue *
copy_ecdv (ECellDateEditValue *ecdv)
{
ECellDateEditValue *new_ecdv;
-
+ *
new_ecdv = g_new0 (ECellDateEditValue, 1);
new_ecdv->tt = ecdv ? ecdv->tt : icaltime_null_time ();
new_ecdv->zone = ecdv ? ecdv->zone : NULL;
-
+ *
return new_ecdv;
} */
@@ -3455,8 +3575,11 @@ e_cal_model_component_get_type (void)
* cb function is not called with cb_data, but with ECalModelGenerateInstancesData which contains cb_data
*/
void
-e_cal_model_generate_instances_sync (ECalModel *model, time_t start, time_t end,
- ECalRecurInstanceFn cb, gpointer cb_data)
+e_cal_model_generate_instances_sync (ECalModel *model,
+ time_t start,
+ time_t end,
+ ECalRecurInstanceFn cb,
+ gpointer cb_data)
{
ECalModelGenerateInstancesData mdata;
gint i, n;
@@ -3485,7 +3608,8 @@ e_cal_model_get_object_array (ECalModel *model)
}
void
-e_cal_model_set_instance_times (ECalModelComponent *comp_data, const icaltimezone *zone)
+e_cal_model_set_instance_times (ECalModelComponent *comp_data,
+ const icaltimezone *zone)
{
struct icaltimetype start_time, end_time;
icalcomponent_kind kind;
@@ -3506,9 +3630,9 @@ e_cal_model_set_instance_times (ECalModelComponent *comp_data, const icaltimezon
} else if (start_time.is_date && end_time.is_date &&
(icaltime_compare_date_only (start_time, end_time) == 0)) {
/* If both DTSTART and DTEND are DATE values, and they are the
- same day, we add 1 day to DTEND. This means that most
- events created with the old Evolution behavior will still
- work OK. */
+ * same day, we add 1 day to DTEND. This means that most
+ * events created with the old Evolution behavior will still
+ * work OK. */
icaltime_adjust (&end_time, 1, 0, 0, 0);
icalcomponent_set_dtend (comp_data->icalcomp, end_time);
}
@@ -3571,7 +3695,9 @@ e_cal_model_set_instance_times (ECalModelComponent *comp_data, const icaltimezon
* when user didn't fill a start date there.
**/
void
-e_cal_model_set_default_time_func (ECalModel *model, ECalModelDefaultTimeFunc func, gpointer user_data)
+e_cal_model_set_default_time_func (ECalModel *model,
+ ECalModelDefaultTimeFunc func,
+ gpointer user_data)
{
g_return_if_fail (E_IS_CAL_MODEL (model));
diff --git a/calendar/gui/e-cal-model.h b/calendar/gui/e-cal-model.h
index 33ffcff52d..a514c95ab2 100644
--- a/calendar/gui/e-cal-model.h
+++ b/calendar/gui/e-cal-model.h
@@ -73,7 +73,7 @@ G_BEGIN_DECLS
typedef enum {
/* If you add new items here or reorder them, you have to update the
- .etspec files for the tables using this model */
+ * .etspec files for the tables using this model */
E_CAL_MODEL_FIELD_CATEGORIES,
E_CAL_MODEL_FIELD_CLASSIFICATION,
E_CAL_MODEL_FIELD_COLOR, /* not a real field */
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 8f87026f65..82bbea2f79 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -509,7 +509,9 @@ calendar_view_cut_clipboard (ESelectable *selectable)
}
static void
-add_related_timezones (icalcomponent *des_icalcomp, icalcomponent *src_icalcomp, ECalClient *client)
+add_related_timezones (icalcomponent *des_icalcomp,
+ icalcomponent *src_icalcomp,
+ ECalClient *client)
{
icalproperty_kind look_in[] = {
ICAL_DTSTART_PROPERTY,
@@ -944,8 +946,12 @@ e_calendar_view_popup_event (ECalendarView *calendar_view,
}
void
-e_calendar_view_add_event (ECalendarView *cal_view, ECalClient *client, time_t dtstart,
- icaltimezone *default_zone, icalcomponent *icalcomp, gboolean in_top_canvas)
+e_calendar_view_add_event (ECalendarView *cal_view,
+ ECalClient *client,
+ time_t dtstart,
+ icaltimezone *default_zone,
+ icalcomponent *icalcomp,
+ gboolean in_top_canvas)
{
ECalComponent *comp;
struct icaltimetype itime, old_dtstart, old_dtend;
@@ -966,7 +972,7 @@ e_calendar_view_add_event (ECalendarView *cal_view, ECalClient *client, time_t d
tt_end = icaltime_as_timet (old_dtend);
ic_dur = icaldurationtype_from_int (tt_end - tt_start);
- if (icaldurationtype_as_int (ic_dur) > 60*60*24) {
+ if (icaldurationtype_as_int (ic_dur) > 60 *60 *24) {
/* This is a long event */
start_offset = old_dtstart.hour * 60 + old_dtstart.minute;
end_offset = old_dtstart.hour * 60 + old_dtend.minute;
@@ -985,7 +991,7 @@ e_calendar_view_add_event (ECalendarView *cal_view, ECalClient *client, time_t d
if (all_day_event) {
ic_dur = ic_oneday;
- } else if (icaldurationtype_as_int (ic_dur) >= 60*60*24
+ } else if (icaldurationtype_as_int (ic_dur) >= 60 *60 *24
&& !in_top_canvas) {
/* copy & paste from top canvas to main canvas */
gint time_divisions;
@@ -1076,7 +1082,8 @@ e_calendar_view_get_calendar (ECalendarView *cal_view)
}
void
-e_calendar_view_set_calendar (ECalendarView *cal_view, GnomeCalendar *calendar)
+e_calendar_view_set_calendar (ECalendarView *cal_view,
+ GnomeCalendar *calendar)
{
g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view));
@@ -1099,7 +1106,8 @@ e_calendar_view_get_timezone (ECalendarView *cal_view)
}
void
-e_calendar_view_set_timezone (ECalendarView *cal_view, icaltimezone *zone)
+e_calendar_view_set_timezone (ECalendarView *cal_view,
+ icaltimezone *zone)
{
icaltimezone *old_zone;
@@ -1398,9 +1406,10 @@ e_calendar_view_open_event (ECalendarView *cal_view)
*/
void
e_calendar_view_new_appointment_for (ECalendarView *cal_view,
- time_t dtstart, time_t dtend,
- gboolean all_day,
- gboolean meeting)
+ time_t dtstart,
+ time_t dtend,
+ gboolean all_day,
+ gboolean meeting)
{
ECalendarViewPrivate *priv;
struct icaltimetype itt;
@@ -1458,7 +1467,7 @@ e_calendar_view_new_appointment_for (ECalendarView *cal_view,
itt = icaltime_from_timet_with_zone (dtend, FALSE, e_cal_model_get_timezone (cal_view->priv->model));
if (all_day) {
/* We round it up to the end of the day, unless it is
- already set to midnight */
+ * already set to midnight */
if (itt.hour != 0 || itt.minute != 0 || itt.second != 0) {
icaltime_adjust (&itt, 1, 0, 0, 0);
}
@@ -1575,13 +1584,17 @@ e_calendar_view_new_appointment (ECalendarView *cal_view)
/* Ensures the calendar is selected */
static void
-object_created_cb (CompEditor *ce, ECalendarView *cal_view)
+object_created_cb (CompEditor *ce,
+ ECalendarView *cal_view)
{
e_calendar_view_emit_user_created (cal_view);
}
CompEditor *
-e_calendar_view_open_event_with_flags (ECalendarView *cal_view, ECalClient *client, icalcomponent *icalcomp, guint32 flags)
+e_calendar_view_open_event_with_flags (ECalendarView *cal_view,
+ ECalClient *client,
+ icalcomponent *icalcomp,
+ guint32 flags)
{
CompEditor *ce;
const gchar *uid;
@@ -1624,7 +1637,10 @@ e_calendar_view_open_event_with_flags (ECalendarView *cal_view, ECalClient *clie
* object.
*/
void
-e_calendar_view_edit_appointment (ECalendarView *cal_view, ECalClient *client, icalcomponent *icalcomp, EEditEventMode mode)
+e_calendar_view_edit_appointment (ECalendarView *cal_view,
+ ECalClient *client,
+ icalcomponent *icalcomp,
+ EEditEventMode mode)
{
guint32 flags = 0;
@@ -1647,10 +1663,10 @@ e_calendar_view_edit_appointment (ECalendarView *cal_view, ECalClient *client, i
void
e_calendar_view_modify_and_send (ECalComponent *comp,
- ECalClient *client,
- CalObjModType mod,
- GtkWindow *toplevel,
- gboolean new)
+ ECalClient *client,
+ CalObjModType mod,
+ GtkWindow *toplevel,
+ gboolean new)
{
gboolean only_new_attendees = FALSE;
GError *error = NULL;
@@ -1697,7 +1713,9 @@ e_calendar_view_modify_and_send (ECalComponent *comp,
}
static gboolean
-tooltip_grab (GtkWidget *tooltip, GdkEventKey *event, ECalendarView *view)
+tooltip_grab (GtkWidget *tooltip,
+ GdkEventKey *event,
+ ECalendarView *view)
{
GtkWidget *widget = (GtkWidget *) g_object_get_data (G_OBJECT (view), "tooltip-window");
@@ -1712,7 +1730,9 @@ tooltip_grab (GtkWidget *tooltip, GdkEventKey *event, ECalendarView *view)
}
static gchar *
-get_label (struct icaltimetype *tt, icaltimezone *f_zone, icaltimezone *t_zone)
+get_label (struct icaltimetype *tt,
+ icaltimezone *f_zone,
+ icaltimezone *t_zone)
{
struct tm tmp_tm;
@@ -1722,7 +1742,9 @@ get_label (struct icaltimetype *tt, icaltimezone *f_zone, icaltimezone *t_zone)
}
void
-e_calendar_view_move_tip (GtkWidget *widget, gint x, gint y)
+e_calendar_view_move_tip (GtkWidget *widget,
+ gint x,
+ gint y)
{
GtkAllocation allocation;
GtkRequisition requisition;
@@ -1768,7 +1790,8 @@ e_calendar_view_move_tip (GtkWidget *widget, gint x, gint y)
* Free returned pointer with g_free.
**/
gchar *
-e_calendar_view_get_attendees_status_info (ECalComponent *comp, ECalClient *client)
+e_calendar_view_get_attendees_status_info (ECalComponent *comp,
+ ECalClient *client)
{
struct _values {
icalparameter_partstat status;
@@ -1827,7 +1850,7 @@ e_calendar_view_get_attendees_status_info (ECalComponent *comp, ECalClient *clie
g_string_prepend (str, ": ");
/* To Translators: 'Status' here means the state of the attendees, the resulting string will be in a form:
- Status: Accepted: X Declined: Y ... */
+ * Status: Accepted: X Declined: Y ... */
g_string_prepend (str, _("Status"));
res = g_string_free (str, FALSE);
@@ -2016,13 +2039,13 @@ e_calendar_view_get_tooltips (const ECalendarViewEventData *data)
gtk_frame_set_shadow_type ((GtkFrame *) frame, GTK_SHADOW_IN);
gtk_window_set_type_hint (GTK_WINDOW (pevent->tooltip), GDK_WINDOW_TYPE_HINT_TOOLTIP);
- gtk_window_move ((GtkWindow *) pevent->tooltip, pevent->x +16, pevent->y+16);
+ gtk_window_move ((GtkWindow *) pevent->tooltip, pevent->x +16, pevent->y + 16);
gtk_container_add ((GtkContainer *) frame, box);
gtk_container_add ((GtkContainer *) pevent->tooltip, frame);
gtk_widget_show_all (pevent->tooltip);
- e_calendar_view_move_tip (pevent->tooltip, pevent->x +16, pevent->y+16);
+ e_calendar_view_move_tip (pevent->tooltip, pevent->x +16, pevent->y + 16);
window = gtk_widget_get_window (pevent->tooltip);
gdk_keyboard_grab (window, FALSE, GDK_CURRENT_TIME);
@@ -2036,7 +2059,8 @@ e_calendar_view_get_tooltips (const ECalendarViewEventData *data)
}
static gboolean
-icalcomp_contains_category (icalcomponent *icalcomp, const gchar *category)
+icalcomp_contains_category (icalcomponent *icalcomp,
+ const gchar *category)
{
icalproperty *property;
@@ -2065,7 +2089,9 @@ icalcomp_contains_category (icalcomponent *icalcomp, const gchar *category)
*/
const gchar *
-e_calendar_view_get_icalcomponent_summary (ECalClient *client, icalcomponent *icalcomp, gboolean *free_text)
+e_calendar_view_get_icalcomponent_summary (ECalClient *client,
+ icalcomponent *icalcomp,
+ gboolean *free_text)
{
const gchar *summary;
@@ -2108,9 +2134,12 @@ e_calendar_view_emit_user_created (ECalendarView *cal_view)
}
void
-draw_curved_rectangle (cairo_t *cr, double x0, double y0,
- gdouble rect_width, double rect_height,
- gdouble radius)
+draw_curved_rectangle (cairo_t *cr,
+ gdouble x0,
+ gdouble y0,
+ gdouble rect_width,
+ gdouble rect_height,
+ gdouble radius)
{
gdouble x1, y1;
@@ -2121,28 +2150,28 @@ draw_curved_rectangle (cairo_t *cr, double x0, double y0,
return;
if (rect_width / 2 < radius) {
if (rect_height / 2 < radius) {
- cairo_move_to (cr, x0, (y0 + y1)/2);
- cairo_curve_to (cr, x0 ,y0, x0, y0, (x0 + x1)/2, y0);
- cairo_curve_to (cr, x1, y0, x1, y0, x1, (y0 + y1)/2);
- cairo_curve_to (cr, x1, y1, x1, y1, (x1 + x0)/2, y1);
- cairo_curve_to (cr, x0, y1, x0, y1, x0, (y0 + y1)/2);
+ cairo_move_to (cr, x0, (y0 + y1) / 2);
+ cairo_curve_to (cr, x0 ,y0, x0, y0, (x0 + x1) / 2, y0);
+ cairo_curve_to (cr, x1, y0, x1, y0, x1, (y0 + y1) / 2);
+ cairo_curve_to (cr, x1, y1, x1, y1, (x1 + x0) / 2, y1);
+ cairo_curve_to (cr, x0, y1, x0, y1, x0, (y0 + y1) / 2);
} else {
cairo_move_to (cr, x0, y0 + radius);
- cairo_curve_to (cr, x0 ,y0, x0, y0, (x0 + x1)/2, y0);
+ cairo_curve_to (cr, x0 ,y0, x0, y0, (x0 + x1) / 2, y0);
cairo_curve_to (cr, x1, y0, x1, y0, x1, y0 + radius);
cairo_line_to (cr, x1 , y1 - radius);
- cairo_curve_to (cr, x1, y1, x1, y1, (x1 + x0)/2, y1);
+ cairo_curve_to (cr, x1, y1, x1, y1, (x1 + x0) / 2, y1);
cairo_curve_to (cr, x0, y1, x0, y1, x0, y1- radius);
}
} else {
if (rect_height / 2 < radius) {
- cairo_move_to (cr, x0, (y0 + y1)/2);
+ cairo_move_to (cr, x0, (y0 + y1) / 2);
cairo_curve_to (cr, x0 , y0, x0 , y0, x0 + radius, y0);
cairo_line_to (cr, x1 - radius, y0);
- cairo_curve_to (cr, x1, y0, x1, y0, x1, (y0 + y1)/2);
+ cairo_curve_to (cr, x1, y0, x1, y0, x1, (y0 + y1) / 2);
cairo_curve_to (cr, x1, y1, x1, y1, x1 - radius, y1);
cairo_line_to (cr, x0 + radius, y1);
- cairo_curve_to (cr, x0, y1, x0, y1, x0, (y0 + y1)/2);
+ cairo_curve_to (cr, x0, y1, x0, y1, x0, (y0 + y1) / 2);
} else {
cairo_move_to (cr, x0, y0 + radius);
cairo_curve_to (cr, x0 , y0, x0 , y0, x0 + radius, y0);
@@ -2158,7 +2187,7 @@ draw_curved_rectangle (cairo_t *cr, double x0, double y0,
}
/* returns either light or dark yellow, based on the base_background,
- which is the default background color */
+ * which is the default background color */
GdkColor
get_today_background (const GdkColor base_background)
{
@@ -2180,7 +2209,8 @@ get_today_background (const GdkColor base_background)
}
gboolean
-is_comp_data_valid_func (ECalendarViewEvent *event, const gchar *location)
+is_comp_data_valid_func (ECalendarViewEvent *event,
+ const gchar *location)
{
g_return_val_if_fail (location != NULL, FALSE);
@@ -2198,7 +2228,9 @@ is_comp_data_valid_func (ECalendarViewEvent *event, const gchar *location)
}
gboolean
-is_array_index_in_bounds_func (GArray *array, gint index, const gchar *location)
+is_array_index_in_bounds_func (GArray *array,
+ gint index,
+ const gchar *location)
{
g_return_val_if_fail (location != NULL, FALSE);
diff --git a/calendar/gui/e-cell-date-edit-text.c b/calendar/gui/e-cell-date-edit-text.c
index 57c2d855d8..61f6d9a3fd 100644
--- a/calendar/gui/e-cell-date-edit-text.c
+++ b/calendar/gui/e-cell-date-edit-text.c
@@ -120,9 +120,9 @@ cell_date_edit_text_get_text (ECellText *cell,
timezone = e_cell_date_edit_text_get_timezone (ecd);
/* Note that although the property may be in a different
- timezone, we convert it to the current timezone to display
- it in the table. If the user actually edits the value,
- it will be set to the current timezone. See set_value (). */
+ * timezone, we convert it to the current timezone to display
+ * it in the table. If the user actually edits the value,
+ * it will be set to the current timezone. See set_value (). */
tmp_tm = icaltimetype_to_tm_with_zone (&dv->tt, dv->zone, timezone);
return e_datetime_format_format_tm (
@@ -148,7 +148,7 @@ show_date_warning (ECellDateEditText *ecd)
t = time (NULL);
/* We are only using this as an example, so the timezone doesn't
- matter. */
+ * matter. */
tmp_tm = localtime (&t);
if (e_cell_date_edit_text_get_use_24_hour_format (ecd))
@@ -184,7 +184,7 @@ cell_date_edit_text_set_value (ECellText *cell,
gboolean is_date = TRUE;
/* Try to parse just a date first. If the value is only a date, we
- use a DATE value. */
+ * use a DATE value. */
status = e_time_parse_date (text, &tmp_tm);
if (status == E_TIME_PARSE_INVALID) {
is_date = FALSE;
@@ -212,7 +212,7 @@ cell_date_edit_text_set_value (ECellText *cell,
dv.tt.is_date = is_date;
/* FIXME: We assume it is being set to the current timezone.
- Is that OK? */
+ * Is that OK? */
if (is_date) {
dv.zone = NULL;
} else {
@@ -310,7 +310,7 @@ e_cell_date_edit_text_get_type (void)
*/
ECell *
e_cell_date_edit_text_new (const gchar *fontname,
- GtkJustification justify)
+ GtkJustification justify)
{
ECell *cell;
@@ -330,7 +330,7 @@ e_cell_date_edit_text_get_timezone (ECellDateEditText *ecd)
void
e_cell_date_edit_text_set_timezone (ECellDateEditText *ecd,
- icaltimezone *timezone)
+ icaltimezone *timezone)
{
g_return_if_fail (E_IS_CELL_DATE_EDIT_TEXT (ecd));
@@ -349,7 +349,7 @@ e_cell_date_edit_text_get_use_24_hour_format (ECellDateEditText *ecd)
void
e_cell_date_edit_text_set_use_24_hour_format (ECellDateEditText *ecd,
- gboolean use_24_hour)
+ gboolean use_24_hour)
{
g_return_if_fail (E_IS_CELL_DATE_EDIT_TEXT (ecd));
@@ -359,7 +359,9 @@ e_cell_date_edit_text_set_use_24_hour_format (ECellDateEditText *ecd,
}
gint
-e_cell_date_edit_compare_cb (gconstpointer a, gconstpointer b, gpointer cmp_cache)
+e_cell_date_edit_compare_cb (gconstpointer a,
+ gconstpointer b,
+ gpointer cmp_cache)
{
ECellDateEditValue *dv1 = (ECellDateEditValue *) a;
ECellDateEditValue *dv2 = (ECellDateEditValue *) b;
diff --git a/calendar/gui/e-date-time-list.c b/calendar/gui/e-date-time-list.c
index 404fac9c99..1342c0e5d7 100644
--- a/calendar/gui/e-date-time-list.c
+++ b/calendar/gui/e-date-time-list.c
@@ -108,7 +108,8 @@ all_rows_deleted (EDateTimeList *date_time_list)
}
static void
-row_deleted (EDateTimeList *date_time_list, gint n)
+row_deleted (EDateTimeList *date_time_list,
+ gint n)
{
GtkTreePath *path;
@@ -119,7 +120,8 @@ row_deleted (EDateTimeList *date_time_list, gint n)
}
static void
-row_added (EDateTimeList *date_time_list, gint n)
+row_added (EDateTimeList *date_time_list,
+ gint n)
{
GtkTreePath *path;
GtkTreeIter iter;
@@ -134,7 +136,8 @@ row_added (EDateTimeList *date_time_list, gint n)
}
static void
-row_updated (EDateTimeList *date_time_list, gint n)
+row_updated (EDateTimeList *date_time_list,
+ gint n)
{
GtkTreePath *path;
GtkTreeIter iter;
@@ -276,7 +279,7 @@ date_time_list_get_iter (GtkTreeModel *tree_model,
static GtkTreePath *
date_time_list_get_path (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
+ GtkTreeIter *iter)
{
EDateTimeList *date_time_list = (EDateTimeList *) tree_model;
GtkTreePath *retval;
@@ -372,7 +375,7 @@ date_time_list_iter_children (GtkTreeModel *tree_model,
static gboolean
date_time_list_iter_has_child (GtkTreeModel *tree_model,
- GtkTreeIter *iter)
+ GtkTreeIter *iter)
{
g_return_val_if_fail (IS_VALID_ITER (E_DATE_TIME_LIST (tree_model), iter), FALSE);
return FALSE;
@@ -483,7 +486,8 @@ e_date_time_list_new (void)
}
const ECalComponentDateTime *
-e_date_time_list_get_date_time (EDateTimeList *date_time_list, GtkTreeIter *iter)
+e_date_time_list_get_date_time (EDateTimeList *date_time_list,
+ GtkTreeIter *iter)
{
g_return_val_if_fail (IS_VALID_ITER (date_time_list, iter), NULL);
@@ -491,8 +495,9 @@ e_date_time_list_get_date_time (EDateTimeList *date_time_list, GtkTreeIter *iter
}
void
-e_date_time_list_set_date_time (EDateTimeList *date_time_list, GtkTreeIter *iter,
- const ECalComponentDateTime *datetime)
+e_date_time_list_set_date_time (EDateTimeList *date_time_list,
+ GtkTreeIter *iter,
+ const ECalComponentDateTime *datetime)
{
ECalComponentDateTime *datetime_old;
@@ -526,8 +531,9 @@ e_date_time_list_set_use_24_hour_format (EDateTimeList *date_time_list,
}
void
-e_date_time_list_append (EDateTimeList *date_time_list, GtkTreeIter *iter,
- const ECalComponentDateTime *datetime)
+e_date_time_list_append (EDateTimeList *date_time_list,
+ GtkTreeIter *iter,
+ const ECalComponentDateTime *datetime)
{
g_return_if_fail (datetime != NULL);
@@ -546,7 +552,8 @@ e_date_time_list_append (EDateTimeList *date_time_list, GtkTreeIter *iter,
}
void
-e_date_time_list_remove (EDateTimeList *date_time_list, GtkTreeIter *iter)
+e_date_time_list_remove (EDateTimeList *date_time_list,
+ GtkTreeIter *iter)
{
gint n;
diff --git a/calendar/gui/e-day-view-layout.c b/calendar/gui/e-day-view-layout.c
index a4cdece5c0..d1957b95e7 100644
--- a/calendar/gui/e-day-view-layout.c
+++ b/calendar/gui/e-day-view-layout.c
@@ -55,27 +55,27 @@ static void e_day_view_recalc_cols_per_row (gint rows,
guint16 *group_starts);
void
-e_day_view_layout_long_events (GArray *events,
- gint days_shown,
- time_t *day_starts,
- gint *rows_in_top_display)
+e_day_view_layout_long_events (GArray *events,
+ gint days_shown,
+ time_t *day_starts,
+ gint *rows_in_top_display)
{
EDayViewEvent *event;
gint event_num;
guint8 *grid;
/* This is a temporary 2-d grid which is used to place events.
- Each element is 0 if the position is empty, or 1 if occupied.
- We allocate the maximum size possible here, assuming that each
- event will need its own row. */
+ * Each element is 0 if the position is empty, or 1 if occupied.
+ * We allocate the maximum size possible here, assuming that each
+ * event will need its own row. */
grid = g_new0 (guint8, events->len * E_DAY_VIEW_MAX_DAYS);
/* Reset the number of rows in the top display to 0. It will be
- updated as events are layed out below. */
+ * updated as events are layed out below. */
*rows_in_top_display = 0;
/* Iterate over the events, finding which days they cover, and putting
- them in the first free row available. */
+ * them in the first free row available. */
for (event_num = 0; event_num < events->len; event_num++) {
event = &g_array_index (events, EDayViewEvent, event_num);
e_day_view_layout_long_event (event, grid,
@@ -89,10 +89,10 @@ e_day_view_layout_long_events (GArray *events,
static void
e_day_view_layout_long_event (EDayViewEvent *event,
- guint8 *grid,
- gint days_shown,
- time_t *day_starts,
- gint *rows_in_top_display)
+ guint8 *grid,
+ gint days_shown,
+ time_t *day_starts,
+ gint *rows_in_top_display)
{
gint start_day, end_day, free_row, day, row;
@@ -130,31 +130,31 @@ e_day_view_layout_long_event (EDayViewEvent *event,
/* returns maximum number of columns among all rows */
gint
-e_day_view_layout_day_events (GArray *events,
- gint rows,
- gint mins_per_row,
- guint8 *cols_per_row,
- gint max_cols)
+e_day_view_layout_day_events (GArray *events,
+ gint rows,
+ gint mins_per_row,
+ guint8 *cols_per_row,
+ gint max_cols)
{
EDayViewEvent *event;
gint row, event_num, res;
EBitArray **grid;
/* This is a temporary array which keeps track of rows which are
- connected. When an appointment spans multiple rows then the number
- of columns in each of these rows must be the same (i.e. the maximum
- of all of them). Each element in the array corresponds to one row
- and contains the index of the first row in the group of connected
- rows. */
+ * connected. When an appointment spans multiple rows then the number
+ * of columns in each of these rows must be the same (i.e. the maximum
+ * of all of them). Each element in the array corresponds to one row
+ * and contains the index of the first row in the group of connected
+ * rows. */
guint16 group_starts[12 * 24];
/* This is a temporary 2-d grid which is used to place events.
- Each element is 0 if the position is empty, or 1 if occupied. */
+ * Each element is 0 if the position is empty, or 1 if occupied. */
grid = g_new0 (EBitArray *, rows);
/* Reset the cols_per_row array, and initialize the connected rows so
- that all rows are not connected - each row is the start of a new
- group. */
+ * that all rows are not connected - each row is the start of a new
+ * group. */
for (row = 0; row < rows; row++) {
cols_per_row[row] = 0;
group_starts[row] = row;
@@ -164,9 +164,9 @@ e_day_view_layout_day_events (GArray *events,
}
/* Iterate over the events, finding which rows they cover, and putting
- them in the first free column available. Increment the number of
- events in each of the rows it covers, and make sure they are all
- in one group. */
+ * them in the first free column available. Increment the number of
+ * events in each of the rows it covers, and make sure they are all
+ * in one group. */
for (event_num = 0; event_num < events->len; event_num++) {
event = &g_array_index (events, EDayViewEvent, event_num);
@@ -178,7 +178,7 @@ e_day_view_layout_day_events (GArray *events,
e_day_view_recalc_cols_per_row (rows, cols_per_row, group_starts);
/* Iterate over the events again, trying to expand events horizontally
- if there is enough space. */
+ * if there is enough space. */
for (event_num = 0; event_num < events->len; event_num++) {
event = &g_array_index (events, EDayViewEvent, event_num);
e_day_view_expand_day_event (event, grid, cols_per_row,
@@ -197,16 +197,16 @@ e_day_view_layout_day_events (GArray *events,
}
/* Finds the first free position to place the event in.
- Increments the number of events in each of the rows it covers, and makes
- sure they are all in one group. */
+ * Increments the number of events in each of the rows it covers, and makes
+ * sure they are all in one group. */
static void
e_day_view_layout_day_event (EDayViewEvent *event,
- EBitArray **grid,
- guint16 *group_starts,
- guint8 *cols_per_row,
- gint rows,
- gint mins_per_row,
- gint max_cols)
+ EBitArray **grid,
+ guint16 *group_starts,
+ guint8 *cols_per_row,
+ gint rows,
+ gint mins_per_row,
+ gint max_cols)
{
gint start_row, end_row, free_col, col, row, group_start;
@@ -252,9 +252,9 @@ e_day_view_layout_day_event (EDayViewEvent *event,
group_start = group_starts[start_row];
/* Increment number of events in each of the rows the event covers.
- We use the cols_per_row array for this. It will be sorted out after
- all the events have been layed out. Also make sure all the rows that
- the event covers are in one group. */
+ * We use the cols_per_row array for this. It will be sorted out after
+ * all the events have been layed out. Also make sure all the rows that
+ * the event covers are in one group. */
for (row = start_row; row <= end_row; row++) {
/* resize the array if necessary */
if (e_bit_array_bit_count (grid[row]) <= free_col)
@@ -276,11 +276,11 @@ e_day_view_layout_day_event (EDayViewEvent *event,
}
/* For each group of rows, find the max number of events in all the
- rows, and set the number of cols in each of the rows to that. */
+ * rows, and set the number of cols in each of the rows to that. */
static void
-e_day_view_recalc_cols_per_row (gint rows,
- guint8 *cols_per_row,
- guint16 *group_starts)
+e_day_view_recalc_cols_per_row (gint rows,
+ guint8 *cols_per_row,
+ guint16 *group_starts)
{
gint start_row = 0, row, next_start_row, max_events;
@@ -301,9 +301,9 @@ e_day_view_recalc_cols_per_row (gint rows,
/* Expands the event horizontally to fill any free space. */
static void
e_day_view_expand_day_event (EDayViewEvent *event,
- EBitArray **grid,
- guint8 *cols_per_row,
- gint mins_per_row)
+ EBitArray **grid,
+ guint8 *cols_per_row,
+ gint mins_per_row)
{
gint start_row, end_row, col, row;
gboolean clashed;
@@ -333,11 +333,11 @@ e_day_view_expand_day_event (EDayViewEvent *event,
/* Find the start and end days for the event. */
gboolean
-e_day_view_find_long_event_days (EDayViewEvent *event,
- gint days_shown,
- time_t *day_starts,
- gint *start_day_return,
- gint *end_day_return)
+e_day_view_find_long_event_days (EDayViewEvent *event,
+ gint days_shown,
+ time_t *day_starts,
+ gint *start_day_return,
+ gint *end_day_return)
{
gint day, start_day, end_day;
diff --git a/calendar/gui/e-day-view-layout.h b/calendar/gui/e-day-view-layout.h
index c169a06b59..5dae66244b 100644
--- a/calendar/gui/e-day-view-layout.h
+++ b/calendar/gui/e-day-view-layout.h
@@ -29,7 +29,7 @@
G_BEGIN_DECLS
/* I've split these functions away from EDayView so we can use them for
- printing. */
+ * printing. */
void e_day_view_layout_long_events (GArray *events,
gint days_shown,
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c
index 98ce4ff335..c379f2aecb 100644
--- a/calendar/gui/e-day-view-main-item.c
+++ b/calendar/gui/e-day-view-main-item.c
@@ -52,7 +52,11 @@ enum {
static gpointer parent_class;
static gboolean
-can_draw_in_region (cairo_region_t *draw_region, gint x, gint y, gint width, gint height)
+can_draw_in_region (cairo_region_t *draw_region,
+ gint x,
+ gint y,
+ gint width,
+ gint height)
{
GdkRectangle rect;
@@ -212,7 +216,7 @@ day_view_main_item_draw_day_event (EDayViewMainItem *main_item,
time_divisions = e_calendar_view_get_time_divisions (cal_view);
/* If the event is currently being dragged, don't draw it. It will
- be drawn in the special drag items. */
+ * be drawn in the special drag items. */
if (day_view->drag_event_day == day && day_view->drag_event_num == event_num)
return;
@@ -241,10 +245,10 @@ day_view_main_item_draw_day_event (EDayViewMainItem *main_item,
return;
/* Fill in the event background. Note that for events in the first
- column of the day, we might not want to paint over the vertical bar,
- since that is used for multiple events. But then you can't see
- where the event in the first column finishes. The border is drawn
- along with the event using cairo*/
+ * column of the day, we might not want to paint over the vertical bar,
+ * since that is used for multiple events. But then you can't see
+ * where the event in the first column finishes. The border is drawn
+ * along with the event using cairo */
red = day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND].red;
green = day_view->colors[E_DAY_VIEW_COLOR_EVENT_BACKGROUND].green;
@@ -260,7 +264,7 @@ day_view_main_item_draw_day_event (EDayViewMainItem *main_item,
is_editing = day_view->editing_event_day == day && day_view->editing_event_num == event_num;
if (event->canvas_item)
- g_object_get (G_OBJECT (event->canvas_item), "x_offset", &text_x_offset, NULL);
+ g_object_get (event->canvas_item, "x_offset", &text_x_offset, NULL);
/* Draw shadow around the event when selected */
if (is_editing && (gtk_widget_has_focus (day_view->main_canvas))) {
@@ -432,7 +436,7 @@ day_view_main_item_draw_day_event (EDayViewMainItem *main_item,
draw_curved_rectangle (cr, x0, y0, rect_width,rect_height, radius);
cairo_set_line_width (cr, 2.);
- cairo_set_source_rgb (cr, red/cc, green/cc, blue/cc);
+ cairo_set_source_rgb (cr, red / cc, green / cc, blue / cc);
cairo_stroke (cr);
cairo_restore (cr);
@@ -468,19 +472,19 @@ day_view_main_item_draw_day_event (EDayViewMainItem *main_item,
pat = cairo_pattern_create_linear (item_x + E_DAY_VIEW_BAR_WIDTH + 1.75, item_y + 7.75,
item_x + E_DAY_VIEW_BAR_WIDTH + 1.75, item_y + item_h - 7.75);
if (!short_event) {
- cairo_pattern_add_color_stop_rgba (pat, 1, red/cc, green/cc, blue/cc, 0.8);
- cairo_pattern_add_color_stop_rgba (pat, 1/(date_fraction + (rect_height/18)), red/cc, green/cc, blue/cc, 0.8);
- cairo_pattern_add_color_stop_rgba (pat, 1/(date_fraction + (rect_height/18)), red/cc, green/cc, blue/cc, 0.4);
- cairo_pattern_add_color_stop_rgba (pat, 1, red/cc, green/cc, blue/cc, 0.8);
+ cairo_pattern_add_color_stop_rgba (pat, 1, red / cc, green / cc, blue / cc, 0.8);
+ cairo_pattern_add_color_stop_rgba (pat, 1 / (date_fraction + (rect_height / 18)), red / cc, green / cc, blue / cc, 0.8);
+ cairo_pattern_add_color_stop_rgba (pat, 1 / (date_fraction + (rect_height / 18)), red / cc, green / cc, blue / cc, 0.4);
+ cairo_pattern_add_color_stop_rgba (pat, 1, red / cc, green / cc, blue / cc, 0.8);
} else {
- cairo_pattern_add_color_stop_rgba (pat, 1, red/cc, green/cc, blue/cc, 0.8);
- cairo_pattern_add_color_stop_rgba (pat, 0, red/cc, green/cc, blue/cc, 0.4);
+ cairo_pattern_add_color_stop_rgba (pat, 1, red / cc, green / cc, blue / cc, 0.8);
+ cairo_pattern_add_color_stop_rgba (pat, 0, red / cc, green / cc, blue / cc, 0.4);
}
cairo_set_source (cr, pat);
cairo_fill_preserve (cr);
cairo_pattern_destroy (pat);
- cairo_set_source_rgba (cr, red/cc, green/cc, blue/cc, 0.2);
+ cairo_set_source_rgba (cr, red / cc, green / cc, blue / cc, 0.2);
cairo_set_line_width (cr, 0.5);
cairo_stroke (cr);
cairo_restore (cr);
@@ -499,7 +503,7 @@ day_view_main_item_draw_day_event (EDayViewMainItem *main_item,
&day_view->colors[E_DAY_VIEW_COLOR_EVENT_VBAR]);
/* Draw the vertical colored bar showing when the appointment
- begins & ends. */
+ * begins & ends. */
bar_y1 = event->start_minute * day_view->row_height / time_divisions - y;
bar_y2 = event->end_minute * day_view->row_height / time_divisions - y;
@@ -546,7 +550,7 @@ day_view_main_item_draw_day_event (EDayViewMainItem *main_item,
end_resize_suffix);
}
cairo_set_font_size (cr, 14);
- if ((red/cc > 0.7) || (green/cc > 0.7) || (blue/cc > 0.7 ))
+ if ((red / cc > 0.7) || (green / cc > 0.7) || (blue / cc > 0.7 ))
cairo_set_source_rgb (cr, 0, 0, 0);
else
cairo_set_source_rgb (cr, 1, 1, 1);
@@ -570,9 +574,9 @@ day_view_main_item_draw_day_event (EDayViewMainItem *main_item,
cairo_save (cr);
pat = cairo_pattern_create_linear (item_x + E_DAY_VIEW_BAR_WIDTH, item_y + 1,
item_x + E_DAY_VIEW_BAR_WIDTH, item_y + item_h - 1);
- cairo_pattern_add_color_stop_rgba (pat, 1, red/cc, green/cc, blue/cc, 0.7);
- cairo_pattern_add_color_stop_rgba (pat, 0.5, red/cc, green/cc, blue/cc, 0.7);
- cairo_pattern_add_color_stop_rgba (pat, 0, red/cc, green/cc, blue/cc, 0.2);
+ cairo_pattern_add_color_stop_rgba (pat, 1, red / cc, green / cc, blue / cc, 0.7);
+ cairo_pattern_add_color_stop_rgba (pat, 0.5, red / cc, green / cc, blue / cc, 0.7);
+ cairo_pattern_add_color_stop_rgba (pat, 0, red / cc, green / cc, blue / cc, 0.2);
cairo_rectangle (cr, item_x + 1, bar_y1,
E_DAY_VIEW_BAR_WIDTH - 2, bar_y2 - bar_y1);
@@ -623,7 +627,7 @@ day_view_main_item_draw_day_event (EDayViewMainItem *main_item,
num_icons++;
}
/* If the DTSTART or DTEND are in a different timezone to our current
- timezone, we display the timezone icon. */
+ * timezone, we display the timezone icon. */
if (event->different_timezone) {
draw_timezone_icon = TRUE;
num_icons++;
@@ -780,7 +784,7 @@ day_view_main_item_draw_day_event (EDayViewMainItem *main_item,
cairo_move_to (cr, item_x + E_DAY_VIEW_BAR_WIDTH + 10, item_y + 13);
else
cairo_move_to (cr, icon_x, item_y + 13);
- if ((red/cc > 0.7) || (green/cc > 0.7) || (blue/cc > 0.7 ))
+ if ((red / cc > 0.7) || (green / cc > 0.7) || (blue / cc > 0.7 ))
cairo_set_source_rgb (cr, 0, 0, 0);
else
cairo_set_source_rgb (cr, 1, 1, 1);
@@ -849,7 +853,7 @@ day_view_main_item_draw_events_in_vbars (EDayViewMainItem *main_item,
continue;
/* We can skip the events in the first column since they will
- draw over this anyway. */
+ * draw over this anyway. */
if (event->num_columns > 0 && event->start_row_or_col == 0) {
continue;
}
@@ -936,8 +940,8 @@ day_view_main_item_dispose (GObject *object)
static void
day_view_main_item_update (GnomeCanvasItem *item,
- const cairo_matrix_t *i2c,
- gint flags)
+ const cairo_matrix_t *i2c,
+ gint flags)
{
GnomeCanvasItemClass *canvas_item_class;
@@ -1155,12 +1159,12 @@ day_view_main_item_draw (GnomeCanvasItem *canvas_item,
}
/* Fill in the vertical bars corresponding to the busy times from the
- long events. */
+ * long events. */
day_view_main_item_draw_long_events_in_vbars (
main_item, cr, x, y, width, height, draw_region);
/* Draw the event borders and backgrounds, and the vertical bars
- down the left edges. */
+ * down the left edges. */
for (day = 0; day < day_view->days_shown; day++)
day_view_main_item_draw_day_events (
main_item, cr, x, y,
diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c
index e65dc4d617..928a91bbfb 100644
--- a/calendar/gui/e-day-view-time-item.c
+++ b/calendar/gui/e-day-view-time-item.c
@@ -35,17 +35,17 @@
#include <libedataserver/e-data-server-util.h>
/* The spacing between items in the time column. GRID_X_PAD is the space down
- either side of the column, i.e. outside the main horizontal grid lines.
- HOUR_L_PAD & HOUR_R_PAD are the spaces on the left & right side of the
- big hour number (this is inside the horizontal grid lines).
- MIN_X_PAD is the spacing either side of the minute number. The smaller
- horizontal grid lines match with this.
- 60_MIN_X_PAD is the space either side of the HH:MM display used when
- we are displaying 60 mins per row (inside the main grid lines).
- LARGE_HOUR_Y_PAD is the offset of the large hour string from the top of the
- row.
- SMALL_FONT_Y_PAD is the offset of the small time/minute string from the top
- of the row. */
+ * either side of the column, i.e. outside the main horizontal grid lines.
+ * HOUR_L_PAD & HOUR_R_PAD are the spaces on the left & right side of the
+ * big hour number (this is inside the horizontal grid lines).
+ * MIN_X_PAD is the spacing either side of the minute number. The smaller
+ * horizontal grid lines match with this.
+ * 60_MIN_X_PAD is the space either side of the HH:MM display used when
+ * we are displaying 60 mins per row (inside the main grid lines).
+ * LARGE_HOUR_Y_PAD is the offset of the large hour string from the top of the
+ * row.
+ * SMALL_FONT_Y_PAD is the offset of the small time/minute string from the top
+ * of the row. */
#define E_DVTMI_TIME_GRID_X_PAD 4
#define E_DVTMI_HOUR_L_PAD 4
#define E_DVTMI_HOUR_R_PAD 2
@@ -272,8 +272,8 @@ e_day_view_time_item_get_type (void)
static void
e_day_view_time_item_update (GnomeCanvasItem *item,
- const cairo_matrix_t *i2c,
- gint flags)
+ const cairo_matrix_t *i2c,
+ gint flags)
{
if (GNOME_CANVAS_ITEM_CLASS (parent_class)->update)
(* GNOME_CANVAS_ITEM_CLASS (parent_class)->update) (item, i2c, flags);
@@ -348,11 +348,11 @@ edvti_draw_zone (GnomeCanvasItem *canvas_item,
if (time_divisions == 60) {
/* The right edge of the complete time string in 60-min
- divisions, e.g. "14:00" or "2 pm". */
+ * divisions, e.g. "14:00" or "2 pm". */
minute_x2 = long_line_x2 - E_DVTMI_60_MIN_X_PAD;
/* These aren't used for 60-minute divisions, but we initialize
- them to keep gcc happy. */
+ * them to keep gcc happy. */
short_line_x1 = 0;
large_hour_x2 = 0;
} else {
@@ -363,7 +363,7 @@ edvti_draw_zone (GnomeCanvasItem *canvas_item,
day_view->max_minute_width);
/* The start of the short horizontal line between the periods
- within each hour. */
+ * within each hour. */
short_line_x1 = long_line_x2 - E_DVTMI_MIN_X_PAD * 2
- max_minute_or_suffix_width;
@@ -434,8 +434,8 @@ edvti_draw_zone (GnomeCanvasItem *canvas_item,
small_font_y_offset = E_DVTMI_SMALL_FONT_Y_PAD;
/* Calculate the minimum y position of the first row we need to draw.
- This is normally one row height above the 0 position, but if we
- are using the large font we may have to go back a bit further. */
+ * This is normally one row height above the 0 position, but if we
+ * are using the large font we may have to go back a bit further. */
start_y = 0 - MAX (day_view->row_height,
(pango_font_metrics_get_ascent (large_font_metrics) +
pango_font_metrics_get_descent (large_font_metrics)) / PANGO_SCALE +
@@ -484,7 +484,7 @@ edvti_draw_zone (GnomeCanvasItem *canvas_item,
}
/* Step through each row, drawing the times and the horizontal lines
- between them. */
+ * between them. */
for (row = 0, row_y = 0 - y;
row < day_view->rows && row_y < height;
row++, row_y += day_view->row_height) {
@@ -496,7 +496,7 @@ edvti_draw_zone (GnomeCanvasItem *canvas_item,
midnight_day && midnight_month;
/* If the row is above the first row we want to draw just
- increment the time and skip to the next row. */
+ * increment the time and skip to the next row. */
if (row_y < start_y) {
e_day_view_time_item_increment_time (
&hour, &minute, time_divisions);
@@ -504,15 +504,15 @@ edvti_draw_zone (GnomeCanvasItem *canvas_item,
}
/* Calculate the actual hour number to display. For 12-hour
- format we convert 0-23 to 12-11am/12-11pm. */
+ * format we convert 0-23 to 12-11am / 12 - 11pm. */
e_day_view_convert_time_to_display (day_view, hour,
&display_hour,
&suffix, &suffix_width);
if (time_divisions == 60) {
/* 60 minute intervals - draw a long horizontal line
- between hours and display as one long string,
- e.g. "14:00" or "2 pm". */
+ * between hours and display as one long string,
+ * e.g. "14:00" or "2 pm". */
cairo_save (cr);
gdk_cairo_set_source_color (cr, &dark);
cairo_save (cr);
@@ -555,8 +555,8 @@ edvti_draw_zone (GnomeCanvasItem *canvas_item,
if (minute == 0) {
/* On the hour - draw a long horizontal line
- before the hour and display the hour in the
- large font. */
+ * before the hour and display the hour in the
+ * large font. */
cairo_save (cr);
gdk_cairo_set_source_color (cr, &dark);
@@ -591,7 +591,7 @@ edvti_draw_zone (GnomeCanvasItem *canvas_item,
g_object_unref (layout);
} else {
/* Within the hour - draw a short line before
- the time. */
+ * the time. */
cairo_save (cr);
gdk_cairo_set_source_color (cr, &dark);
cairo_set_line_width (cr, 0.7);
@@ -602,11 +602,11 @@ edvti_draw_zone (GnomeCanvasItem *canvas_item,
}
/* Normally we display the minute in each
- interval, but when using 30-minute intervals
- we don't display the '30'. */
+ * interval, but when using 30-minute intervals
+ * we don't display the '30'. */
if (time_divisions != 30 || minute != 30) {
/* In 12-hour format we display 'am' or 'pm'
- instead of '00'. */
+ * instead of '00'. */
if (show_midnight_date)
strcpy (buffer, midnight_month);
else if (minute == 0
@@ -671,32 +671,35 @@ e_day_view_time_item_draw (GnomeCanvasItem *canvas_item,
}
/* Increment the time by the 5/10/15/30/60 minute interval.
- Note that time_divisions is never > 60, so we never have to
- worry about adding more than 60 minutes. */
+ * Note that time_divisions is never > 60, so we never have to
+ * worry about adding more than 60 minutes. */
static void
-e_day_view_time_item_increment_time (gint *hour,
- gint *minute,
- gint time_divisions)
+e_day_view_time_item_increment_time (gint *hour,
+ gint *minute,
+ gint time_divisions)
{
*minute += time_divisions;
if (*minute >= 60) {
*minute -= 60;
/* Currently we never wrap around to the next day, but
- we may do if we display extra timezones. */
+ * we may do if we display extra timezones. */
*hour = (*hour + 1) % 24;
}
}
static GnomeCanvasItem *
-e_day_view_time_item_point (GnomeCanvasItem *item, double x, double y,
- gint cx, gint cy)
+e_day_view_time_item_point (GnomeCanvasItem *item,
+ gdouble x,
+ gdouble y,
+ gint cx,
+ gint cy)
{
return item;
}
static gint
e_day_view_time_item_event (GnomeCanvasItem *item,
- GdkEvent *event)
+ GdkEvent *event)
{
EDayViewTimeItem *time_item;
@@ -885,7 +888,7 @@ e_day_view_time_item_show_popup_menu (EDayViewTimeItem *time_item,
static void
e_day_view_time_item_on_set_divisions (GtkWidget *item,
- EDayViewTimeItem *time_item)
+ EDayViewTimeItem *time_item)
{
EDayView *day_view;
ECalendarView *cal_view;
@@ -905,7 +908,7 @@ e_day_view_time_item_on_set_divisions (GtkWidget *item,
static void
e_day_view_time_item_on_button_press (EDayViewTimeItem *time_item,
- GdkEvent *event)
+ GdkEvent *event)
{
GdkWindow *window;
EDayView *day_view;
@@ -939,7 +942,7 @@ e_day_view_time_item_on_button_press (EDayViewTimeItem *time_item,
static void
e_day_view_time_item_on_button_release (EDayViewTimeItem *time_item,
- GdkEvent *event)
+ GdkEvent *event)
{
EDayView *day_view;
@@ -957,7 +960,7 @@ e_day_view_time_item_on_button_release (EDayViewTimeItem *time_item,
static void
e_day_view_time_item_on_motion_notify (EDayViewTimeItem *time_item,
- GdkEvent *event)
+ GdkEvent *event)
{
EDayView *day_view;
GnomeCanvas *canvas;
@@ -986,7 +989,7 @@ e_day_view_time_item_on_motion_notify (EDayViewTimeItem *time_item,
/* Returns the row corresponding to the y position, or -1. */
static gint
e_day_view_time_item_convert_position_to_row (EDayViewTimeItem *time_item,
- gint y)
+ gint y)
{
EDayView *day_view;
gint row;
@@ -1028,8 +1031,8 @@ e_day_view_time_item_set_day_view (EDayViewTimeItem *time_item,
}
/* Returns the minimum width needed for the column, by adding up all the
- maximum widths of the strings. The string widths are all calculated in
- the style_set handlers of EDayView and EDayViewTimeCanvas. */
+ * maximum widths of the strings. The string widths are all calculated in
+ * the style_set handlers of EDayView and EDayViewTimeCanvas. */
gint
e_day_view_time_item_get_column_width (EDayViewTimeItem *time_item)
{
@@ -1066,8 +1069,8 @@ e_day_view_time_item_get_column_width (EDayViewTimeItem *time_item)
}
/* Calculate the width of each time column, using the maximum of the
- default format with large hour numbers, and the 60-min divisions
- format which uses small text. */
+ * default format with large hour numbers, and the 60-min divisions
+ * format which uses small text. */
max_suffix_width = MAX (day_view->am_string_width,
day_view->pm_string_width);
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c
index 201d10394b..9b22fbe339 100644
--- a/calendar/gui/e-day-view-top-item.c
+++ b/calendar/gui/e-day-view-top-item.c
@@ -53,10 +53,10 @@ enum {
static gpointer parent_class;
/* This draws a little triangle to indicate that an event extends past
- the days visible on screen. */
+ * the days visible on screen. */
static void
day_view_top_item_draw_triangle (EDayViewTopItem *top_item,
- cairo_t *cr,
+ cairo_t *cr,
gint x,
gint y,
gint w,
@@ -79,7 +79,7 @@ day_view_top_item_draw_triangle (EDayViewTopItem *top_item,
points[2].y = y + h - 1;
/* If the height is odd we can use the same central point for both
- lines. If it is even we use different end-points. */
+ * lines. If it is even we use different end-points. */
c1 = c2 = y + (h / 2);
if (h % 2 == 0)
c1--;
@@ -128,7 +128,7 @@ day_view_top_item_draw_triangle (EDayViewTopItem *top_item,
static void
day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
gint event_num,
- cairo_t *cr,
+ cairo_t *cr,
gint x,
gint y,
gint width,
@@ -159,7 +159,7 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
model = e_calendar_view_get_model (E_CALENDAR_VIEW (day_view));
/* If the event is currently being dragged, don't draw it. It will
- be drawn in the special drag items. */
+ * be drawn in the special drag items. */
if (day_view->drag_event_day == E_DAY_VIEW_LONG_EVENT
&& day_view->drag_event_num == event_num)
return;
@@ -225,7 +225,7 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
draw_curved_rectangle (cr, x0, y0, rect_width, rect_height, radius);
- cairo_set_source_rgb (cr, red/cc, green/cc, blue/cc);
+ cairo_set_source_rgb (cr, red / cc, green / cc, blue / cc);
cairo_set_line_width (cr, 1.5);
cairo_stroke (cr);
cairo_restore (cr);
@@ -245,13 +245,13 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
pat = cairo_pattern_create_linear (item_x - x + 5.5, item_y + 2.5 - y,
item_x - x + 5, item_y - y + item_h + 7.5);
- cairo_pattern_add_color_stop_rgba (pat, 1, red/cc, green/cc, blue/cc, 0.8);
- cairo_pattern_add_color_stop_rgba (pat, 0, red/cc, green/cc, blue/cc, 0.4);
+ cairo_pattern_add_color_stop_rgba (pat, 1, red / cc, green / cc, blue / cc, 0.8);
+ cairo_pattern_add_color_stop_rgba (pat, 0, red / cc, green / cc, blue / cc, 0.4);
cairo_set_source (cr, pat);
cairo_fill_preserve (cr);
cairo_pattern_destroy (pat);
- cairo_set_source_rgba (cr, red/cc, green/cc, blue/cc, 0);
+ cairo_set_source_rgba (cr, red / cc, green / cc, blue / cc, 0);
cairo_set_line_width (cr, 0.5);
cairo_stroke (cr);
cairo_restore (cr);
@@ -287,7 +287,7 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
}
/* If we are editing the event we don't show the icons or the start
- & end times. */
+ * & end times. */
if (day_view->editing_event_day == E_DAY_VIEW_LONG_EVENT
&& day_view->editing_event_num == event_num) {
g_object_unref (comp);
@@ -295,8 +295,8 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
}
/* Determine the position of the label, so we know where to place the
- icons. Note that since the top canvas never scrolls we don't need
- to take the scroll offset into account. It will always be 0. */
+ * icons. Note that since the top canvas never scrolls we don't need
+ * to take the scroll offset into account. It will always be 0. */
text_x = event->canvas_item->x1;
/* Draw the start & end times, if necessary. */
@@ -312,7 +312,7 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
hour = offset / 60;
minute = offset % 60;
/* Calculate the actual hour number to display. For 12-hour
- format we convert 0-23 to 12-11am/12-11pm. */
+ * format we convert 0-23 to 12-11am/12-11pm. */
e_day_view_convert_time_to_display (day_view, hour,
&display_hour,
&suffix, &suffix_width);
@@ -658,7 +658,7 @@ day_view_top_item_draw (GnomeCanvasItem *canvas_item,
if (show_dates) {
/* Draw the date. Set a clipping rectangle so we don't draw over the
- next day. */
+ * next day. */
for (day = 0; day < day_view->days_shown; day++) {
e_day_view_top_item_get_day_label (day_view, day, buffer, sizeof (buffer));
clip_rect.x = day_view->day_offsets[day] - x;
@@ -844,15 +844,15 @@ e_day_view_top_item_get_day_label (EDayView *day_view,
if (day_view->date_format == E_DAY_VIEW_DATE_FULL)
/* strftime format %A = full weekday name, %d = day of month,
- %B = full month name. Don't use any other specifiers. */
+ * %B = full month name. Don't use any other specifiers. */
format = _("%A %d %B");
else if (day_view->date_format == E_DAY_VIEW_DATE_ABBREVIATED)
/* strftime format %a = abbreviated weekday name, %d = day of month,
- %b = abbreviated month name. Don't use any other specifiers. */
+ * %b = abbreviated month name. Don't use any other specifiers. */
format = _("%a %d %b");
else if (day_view->date_format == E_DAY_VIEW_DATE_NO_WEEKDAY)
/* strftime format %d = day of month, %b = abbreviated month name.
- Don't use any other specifiers. */
+ * Don't use any other specifiers. */
format = _("%d %b");
else
format = "%d";
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 11378cc25a..efad7dbc6f 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -76,23 +76,23 @@
#define E_DAY_VIEW_AUTO_SCROLL_DELAY 5
/* The number of pixels the mouse has to be moved with the button down before
- we start a drag. */
+ * we start a drag. */
#define E_DAY_VIEW_DRAG_START_OFFSET 4
/* The amount we scroll the main canvas when the Page Up/Down keys are pressed,
- as a fraction of the page size. */
+ * as a fraction of the page size. */
#define E_DAY_VIEW_PAGE_STEP 0.5
/* The amount we scroll the main canvas when the mouse wheel buttons are
- pressed, as a fraction of the page size. */
+ * pressed, as a fraction of the page size. */
#define E_DAY_VIEW_WHEEL_MOUSE_STEP_SIZE 0.25
/* The timeout before we do a layout, so we don't do a layout for each event
- we get from the server. */
+ * we get from the server. */
#define E_DAY_VIEW_LAYOUT_TIMEOUT 100
/* How many rows can be shown at a top_canvas; there will be always + 2 for
- caption item and DnD space */
+ * caption item and DnD space */
#define E_DAY_VIEW_MAX_ROWS_AT_TOP 6
typedef struct {
@@ -449,12 +449,12 @@ day_view_notify_time_divisions_cb (EDayView *day_view)
day_view->need_layout[day] = TRUE;
/* We need to update all the day event labels since the start & end
- times may or may not be on row boundaries any more. */
+ * times may or may not be on row boundaries any more. */
e_day_view_foreach_event (day_view,
e_day_view_set_show_times_cb, NULL);
/* We must layout the events before updating the scroll region, since
- that will result in a redraw which would crash otherwise. */
+ * that will result in a redraw which would crash otherwise. */
e_day_view_check_layout (day_view);
gtk_widget_queue_draw (day_view->time_canvas);
gtk_widget_queue_draw (day_view->main_canvas);
@@ -664,7 +664,10 @@ e_day_view_class_init (EDayViewClass *class)
}
static void
-time_range_changed_cb (ECalModel *model, time_t start_time, time_t end_time, gpointer user_data)
+time_range_changed_cb (ECalModel *model,
+ time_t start_time,
+ time_t end_time,
+ gpointer user_data)
{
EDayView *day_view = E_DAY_VIEW (user_data);
EDayViewTimeItem *eti;
@@ -673,9 +676,9 @@ time_range_changed_cb (ECalModel *model, time_t start_time, time_t end_time, gpo
g_return_if_fail (E_IS_DAY_VIEW (day_view));
/* Calculate the first day that should be shown, based on start_time
- and the days_shown setting. If we are showing 1 day it is just the
- start of the day given by start_time, otherwise it is the previous
- work-week start day. */
+ * and the days_shown setting. If we are showing 1 day it is just the
+ * start of the day given by start_time, otherwise it is the previous
+ * work-week start day. */
if (!day_view->work_week_view) {
lower = time_day_begin_with_zone (start_time, e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
} else {
@@ -706,7 +709,8 @@ time_range_changed_cb (ECalModel *model, time_t start_time, time_t end_time, gpo
}
static void
-process_component (EDayView *day_view, ECalModelComponent *comp_data)
+process_component (EDayView *day_view,
+ ECalModelComponent *comp_data)
{
const gchar *uid;
gchar *rid = NULL;
@@ -742,7 +746,8 @@ process_component (EDayView *day_view, ECalModelComponent *comp_data)
}
static void
-update_row (EDayView *day_view, gint row)
+update_row (EDayView *day_view,
+ gint row)
{
ECalModelComponent *comp_data;
ECalModel *model;
@@ -778,7 +783,9 @@ update_row (EDayView *day_view, gint row)
}
static void
-model_row_changed_cb (ETableModel *etm, gint row, gpointer user_data)
+model_row_changed_cb (ETableModel *etm,
+ gint row,
+ gpointer user_data)
{
EDayView *day_view = E_DAY_VIEW (user_data);
@@ -792,7 +799,10 @@ model_row_changed_cb (ETableModel *etm, gint row, gpointer user_data)
}
static void
-model_cell_changed_cb (ETableModel *etm, gint col, gint row, gpointer user_data)
+model_cell_changed_cb (ETableModel *etm,
+ gint col,
+ gint row,
+ gpointer user_data)
{
EDayView *day_view = E_DAY_VIEW (user_data);
@@ -806,7 +816,10 @@ model_cell_changed_cb (ETableModel *etm, gint col, gint row, gpointer user_data)
}
static void
-model_rows_inserted_cb (ETableModel *etm, gint row, gint count, gpointer user_data)
+model_rows_inserted_cb (ETableModel *etm,
+ gint row,
+ gint count,
+ gpointer user_data)
{
EDayView *day_view = E_DAY_VIEW (user_data);
ECalModel *model;
@@ -839,7 +852,9 @@ model_rows_inserted_cb (ETableModel *etm, gint row, gint count, gpointer user_da
}
static void
-model_comps_deleted_cb (ETableModel *etm, gpointer data, gpointer user_data)
+model_comps_deleted_cb (ETableModel *etm,
+ gpointer data,
+ gpointer user_data)
{
EDayView *day_view = E_DAY_VIEW (user_data);
GSList *l, *list = data;
@@ -879,8 +894,10 @@ model_comps_deleted_cb (ETableModel *etm, gpointer data, gpointer user_data)
}
static void
-timezone_changed_cb (ECalModel *cal_model, icaltimezone *old_zone,
- icaltimezone *new_zone, gpointer user_data)
+timezone_changed_cb (ECalModel *cal_model,
+ icaltimezone *old_zone,
+ icaltimezone *new_zone,
+ gpointer user_data)
{
struct icaltimetype tt;
time_t lower;
@@ -900,7 +917,7 @@ timezone_changed_cb (ECalModel *cal_model, icaltimezone *old_zone,
return;
/* Recalculate the new start of the first day. We just use exactly
- the same time, but with the new timezone. */
+ * the same time, but with the new timezone. */
tt = icaltime_from_timet_with_zone (day_view->lower, FALSE,
old_zone);
@@ -948,8 +965,8 @@ e_day_view_init (EDayView *day_view)
day_view->rows_in_top_display = 0;
/* Note that these don't work yet. It would need a few fixes to the
- way event->start_minute and event->end_minute are used, and there
- may be problems with events that go outside the visible times. */
+ * way event->start_minute and event->end_minute are used, and there
+ * may be problems with events that go outside the visible times. */
day_view->first_hour_shown = 0;
day_view->first_minute_shown = 0;
day_view->last_hour_shown = 24;
@@ -1236,28 +1253,35 @@ e_day_view_init (EDayView *day_view)
}
static void
-init_model (EDayView *day_view, ECalModel *model)
+init_model (EDayView *day_view,
+ ECalModel *model)
{
/* connect to ECalModel's signals */
- g_signal_connect (G_OBJECT (model), "time_range_changed",
- G_CALLBACK (time_range_changed_cb), day_view);
- g_signal_connect (G_OBJECT (model), "model_row_changed",
- G_CALLBACK (model_row_changed_cb), day_view);
- g_signal_connect (G_OBJECT (model), "model_cell_changed",
- G_CALLBACK (model_cell_changed_cb), day_view);
- g_signal_connect (G_OBJECT (model), "model_rows_inserted",
- G_CALLBACK (model_rows_inserted_cb), day_view);
- g_signal_connect (G_OBJECT (model), "comps_deleted",
- G_CALLBACK (model_comps_deleted_cb), day_view);
- g_signal_connect (G_OBJECT (model), "timezone_changed",
- G_CALLBACK (timezone_changed_cb), day_view);
+ g_signal_connect (
+ model, "time_range_changed",
+ G_CALLBACK (time_range_changed_cb), day_view);
+ g_signal_connect (
+ model, "model_row_changed",
+ G_CALLBACK (model_row_changed_cb), day_view);
+ g_signal_connect (
+ model, "model_cell_changed",
+ G_CALLBACK (model_cell_changed_cb), day_view);
+ g_signal_connect (
+ model, "model_rows_inserted",
+ G_CALLBACK (model_rows_inserted_cb), day_view);
+ g_signal_connect (
+ model, "comps_deleted",
+ G_CALLBACK (model_comps_deleted_cb), day_view);
+ g_signal_connect (
+ model, "timezone_changed",
+ G_CALLBACK (timezone_changed_cb), day_view);
}
/* Turn off the background of the canvas windows. This reduces flicker
- considerably when scrolling. (Why isn't it in GnomeCanvas?). */
+ * considerably when scrolling. (Why isn't it in GnomeCanvas?). */
static void
e_day_view_on_canvas_realized (GtkWidget *widget,
- EDayView *day_view)
+ EDayView *day_view)
{
GdkWindow *window;
@@ -1379,7 +1403,8 @@ e_day_view_realize (GtkWidget *widget)
}
static void
-e_day_view_set_colors (EDayView *day_view, GtkWidget *widget)
+e_day_view_set_colors (EDayView *day_view,
+ GtkWidget *widget)
{
GtkStyle *style;
@@ -1425,7 +1450,9 @@ e_day_view_unrealize (GtkWidget *widget)
}
static GdkColor
-e_day_view_get_text_color (EDayView *day_view, EDayViewEvent *event, GtkWidget *widget)
+e_day_view_get_text_color (EDayView *day_view,
+ EDayViewEvent *event,
+ GtkWidget *widget)
{
GtkStyle *style;
GdkColor bg_color;
@@ -1445,21 +1472,22 @@ e_day_view_get_text_color (EDayView *day_view, EDayViewEvent *event, GtkWidget *
style = gtk_widget_get_style (widget);
- if ((red/cc > 0.7) || (green/cc > 0.7) || (blue/cc > 0.7 ))
+ if ((red / cc > 0.7) || (green / cc > 0.7) || (blue / cc > 0.7 ))
return style->black;
else
return style->white;
}
static void
-e_day_view_update_top_scroll (EDayView *day_view, gboolean scroll_to_top)
+e_day_view_update_top_scroll (EDayView *day_view,
+ gboolean scroll_to_top)
{
GtkAllocation allocation;
gint top_rows, top_canvas_height;
gdouble old_x2, old_y2, new_x2, new_y2;
/* Set the height of the top canvas based on the row height and the
- number of rows needed (min 1 + 1 for the dates + 1 space for DnD).*/
+ * number of rows needed (min 1 + 1 for the dates + 1 space for DnD).*/
top_rows = MAX (1, day_view->rows_in_top_display);
top_canvas_height = (top_rows + 1) * day_view->top_row_height;
if (top_rows <= E_DAY_VIEW_MAX_ROWS_AT_TOP) {
@@ -1494,7 +1522,7 @@ e_day_view_update_top_scroll (EDayView *day_view, gboolean scroll_to_top)
static void
e_day_view_style_set (GtkWidget *widget,
- GtkStyle *previous_style)
+ GtkStyle *previous_style)
{
EDayView *day_view;
gint hour;
@@ -1699,7 +1727,7 @@ e_day_view_recalc_main_canvas_size (EDayView *day_view)
e_day_view_recalc_cell_sizes (day_view);
/* Scroll to the start of the working day, if this is the initial
- allocation. */
+ * allocation. */
if (day_view->scroll_to_work_day) {
scroll_y = e_day_view_convert_time_to_position (
day_view, work_day_start_hour, work_day_start_minute);
@@ -1709,7 +1737,7 @@ e_day_view_recalc_main_canvas_size (EDayView *day_view)
}
/* Flag that we need to reshape the events. Note that changes in height
- don't matter, since the rows are always the same height. */
+ * don't matter, since the rows are always the same height. */
if (need_reshape) {
day_view->long_events_need_reshape = TRUE;
for (day = 0; day < E_DAY_VIEW_MAX_DAYS; day++)
@@ -1721,21 +1749,19 @@ e_day_view_recalc_main_canvas_size (EDayView *day_view)
/* This recalculates the sizes of each column. */
static void
-e_day_view_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
+e_day_view_size_allocate (GtkWidget *widget,
+ GtkAllocation *allocation)
{
-#if 0
- g_print ("In e_day_view_size_allocate\n");
-#endif
(*GTK_WIDGET_CLASS (e_day_view_parent_class)->size_allocate) (widget, allocation);
e_day_view_recalc_main_canvas_size (E_DAY_VIEW (widget));
}
static void
-e_day_view_recalc_cell_sizes (EDayView *day_view)
+e_day_view_recalc_cell_sizes (EDayView *day_view)
{
/* An array of dates, one for each month in the year 2000. They must
- all be Sundays. */
+ * all be Sundays. */
static const gint days[12] = { 23, 20, 19, 23, 21, 18,
23, 20, 17, 22, 19, 24 };
gfloat width, offset;
@@ -1756,8 +1782,8 @@ e_day_view_recalc_cell_sizes (EDayView *day_view)
layout = pango_layout_new (pango_context);
/* Calculate the column sizes, using floating point so that pixels
- get divided evenly. Note that we use one more element than the
- number of columns, to make it easy to get the column widths. */
+ * get divided evenly. Note that we use one more element than the
+ * number of columns, to make it easy to get the column widths. */
width = allocation.width;
if (day_view->days_shown == 1)
width = MAX (width, day_view->max_cols * (E_DAY_VIEW_MIN_DAY_COL_WIDTH + E_DAY_VIEW_GAP_WIDTH) - E_DAY_VIEW_MIN_DAY_COL_WIDTH - 1);
@@ -1774,9 +1800,9 @@ e_day_view_recalc_cell_sizes (EDayView *day_view)
}
/* Determine which date format to use, based on the column widths.
- We want to check the widths using the longest full or abbreviated
- month name and the longest full or abbreviated weekday name, as
- appropriate. */
+ * We want to check the widths using the longest full or abbreviated
+ * month name and the longest full or abbreviated weekday name, as
+ * appropriate. */
max_width = day_view->day_widths[0];
memset (&date_tm, 0, sizeof (date_tm));
@@ -1789,7 +1815,7 @@ e_day_view_recalc_cell_sizes (EDayView *day_view)
date_tm.tm_wday = day_view->longest_weekday_name;
date_tm.tm_isdst = -1;
/* strftime format %A = full weekday name, %d = day of month,
- %B = full month name. Don't use any other specifiers. */
+ * %B = full month name. Don't use any other specifiers. */
e_utf8_strftime (buffer, sizeof (buffer), _("%A %d %B"), &date_tm);
pango_layout_set_text (layout, buffer, -1);
pango_layout_get_pixel_size (layout, &pango_width, NULL);
@@ -1806,7 +1832,7 @@ e_day_view_recalc_cell_sizes (EDayView *day_view)
date_tm.tm_wday = day_view->longest_abbreviated_weekday_name;
date_tm.tm_isdst = -1;
/* strftime format %a = abbreviated weekday name, %d = day of month,
- %b = abbreviated month name. Don't use any other specifiers. */
+ * %b = abbreviated month name. Don't use any other specifiers. */
e_utf8_strftime (buffer, sizeof (buffer), _("%a %d %b"), &date_tm);
pango_layout_set_text (layout, buffer, -1);
pango_layout_get_pixel_size (layout, &pango_width, NULL);
@@ -1822,7 +1848,7 @@ e_day_view_recalc_cell_sizes (EDayView *day_view)
date_tm.tm_wday = 0;
date_tm.tm_isdst = -1;
/* strftime format %d = day of month, %b = abbreviated month name.
- Don't use any other specifiers. */
+ * Don't use any other specifiers. */
e_utf8_strftime (buffer, sizeof (buffer), _("%d %b"), &date_tm);
pango_layout_set_text (layout, buffer, -1);
pango_layout_get_pixel_size (layout, &pango_width, NULL);
@@ -1837,7 +1863,8 @@ exit:
}
static gint
-e_day_view_focus_in (GtkWidget *widget, GdkEventFocus *event)
+e_day_view_focus_in (GtkWidget *widget,
+ GdkEventFocus *event)
{
EDayView *day_view;
@@ -1863,7 +1890,7 @@ e_day_view_focus_in (GtkWidget *widget, GdkEventFocus *event)
if (e_calendar_view_get_visible_time_range (E_CALENDAR_VIEW (day_view), &my_start, &my_end) &&
model_start == my_start && model_end == my_end) {
/* update only when the same time range is set in a view and in a model;
- otherwise time range change invokes also query update */
+ * otherwise time range change invokes also query update */
e_day_view_recalc_day_starts (day_view, day_view->lower);
e_day_view_update_query (day_view);
}
@@ -1876,7 +1903,8 @@ e_day_view_focus_in (GtkWidget *widget, GdkEventFocus *event)
}
static gint
-e_day_view_focus_out (GtkWidget *widget, GdkEventFocus *event)
+e_day_view_focus_out (GtkWidget *widget,
+ GdkEventFocus *event)
{
EDayView *day_view;
@@ -1899,13 +1927,13 @@ e_day_view_focus_out (GtkWidget *widget, GdkEventFocus *event)
}
/* This calls a given function for each event instance (in both views).
- If the callback returns FALSE the iteration is stopped.
- Note that it is safe for the callback to remove the event (since we
- step backwards through the arrays). */
+ * If the callback returns FALSE the iteration is stopped.
+ * Note that it is safe for the callback to remove the event (since we
+ * step backwards through the arrays). */
static void
-e_day_view_foreach_event (EDayView *day_view,
- EDayViewForeachEventCallback callback,
- gpointer data)
+e_day_view_foreach_event (EDayView *day_view,
+ EDayViewForeachEventCallback callback,
+ gpointer data)
{
gint day, event_num;
@@ -1928,14 +1956,14 @@ e_day_view_foreach_event (EDayView *day_view,
}
/* This calls a given function for each event instance that matches the given
- uid. If the callback returns FALSE the iteration is stopped.
- Note that it is safe for the callback to remove the event (since we
- step backwards through the arrays). */
+ * uid. If the callback returns FALSE the iteration is stopped.
+ * Note that it is safe for the callback to remove the event (since we
+ * step backwards through the arrays). */
static void
e_day_view_foreach_event_with_uid (EDayView *day_view,
- const gchar *uid,
- EDayViewForeachEventCallback callback,
- gpointer data)
+ const gchar *uid,
+ EDayViewForeachEventCallback callback,
+ gpointer data)
{
EDayViewEvent *event;
gint day, event_num;
@@ -1978,9 +2006,9 @@ e_day_view_foreach_event_with_uid (EDayView *day_view,
static gboolean
e_day_view_remove_event_cb (EDayView *day_view,
- gint day,
- gint event_num,
- gpointer data)
+ gint day,
+ gint event_num,
+ gpointer data)
{
EDayViewEvent *event;
@@ -2007,7 +2035,7 @@ e_day_view_remove_event_cb (EDayView *day_view,
return TRUE;
/* If we were editing this event, set editing_event_day to -1 so
- on_editing_stopped doesn't try to update the event. */
+ * on_editing_stopped doesn't try to update the event. */
if (day_view->editing_event_num == event_num && day_view->editing_event_day == day) {
day_view->editing_event_num = -1;
day_view->editing_event_day = -1;
@@ -2064,8 +2092,8 @@ set_text_as_bold (EDayViewEvent *event)
}
/* The attendee has not yet accepted the meeting, display the summary as bolded.
- If the attendee is not present, it might have come through a mailing list.
- In that case, we never show the meeting as bold even if it is unaccepted. */
+ * If the attendee is not present, it might have come through a mailing list.
+ * In that case, we never show the meeting as bold even if it is unaccepted. */
if (at && (at->status == ICAL_PARTSTAT_NEEDSACTION))
gnome_canvas_item_set (event->canvas_item, "bold", TRUE, NULL);
@@ -2075,11 +2103,11 @@ set_text_as_bold (EDayViewEvent *event)
}
/* This updates the text shown for an event. If the event start or end do not
- lie on a row boundary, the time is displayed before the summary. */
+ * lie on a row boundary, the time is displayed before the summary. */
static void
e_day_view_update_event_label (EDayView *day_view,
- gint day,
- gint event_num)
+ gint day,
+ gint event_num)
{
EDayViewEvent *event;
ECalendarView *cal_view;
@@ -2147,7 +2175,7 @@ e_day_view_update_event_label (EDayView *day_view,
static void
e_day_view_update_long_event_label (EDayView *day_view,
- gint event_num)
+ gint event_num)
{
EDayViewEvent *event;
const gchar *summary;
@@ -2178,13 +2206,13 @@ e_day_view_update_long_event_label (EDayView *day_view,
}
/* Finds the day and index of the event with the given canvas item.
- If is is a long event, -1 is returned as the day.
- Returns TRUE if the event was found. */
+ * If is is a long event, -1 is returned as the day.
+ * Returns TRUE if the event was found. */
gboolean
e_day_view_find_event_from_item (EDayView *day_view,
- GnomeCanvasItem *item,
- gint *day_return,
- gint *event_num_return)
+ GnomeCanvasItem *item,
+ gint *day_return,
+ gint *event_num_return)
{
EDayViewEvent *event;
gint day, event_num;
@@ -2217,19 +2245,19 @@ e_day_view_find_event_from_item (EDayView *day_view,
}
/* Finds the day and index of the event with the given uid.
- If is is a long event, E_DAY_VIEW_LONG_EVENT is returned as the day.
- Returns TRUE if an event with the uid was found.
- Note that for recurring events there may be several EDayViewEvents, one
- for each instance, all with the same iCalObject and uid. So only use this
- function if you know the event doesn't recur or you are just checking to
- see if any events with the uid exist. */
+ * If is is a long event, E_DAY_VIEW_LONG_EVENT is returned as the day.
+ * Returns TRUE if an event with the uid was found.
+ * Note that for recurring events there may be several EDayViewEvents, one
+ * for each instance, all with the same iCalObject and uid. So only use this
+ * function if you know the event doesn't recur or you are just checking to
+ * see if any events with the uid exist. */
static gboolean
e_day_view_find_event_from_uid (EDayView *day_view,
- ECalClient *client,
- const gchar *uid,
- const gchar *rid,
- gint *day_return,
- gint *event_num_return)
+ ECalClient *client,
+ const gchar *uid,
+ const gchar *rid,
+ gint *day_return,
+ gint *event_num_return)
{
EDayViewEvent *event;
gint day, event_num;
@@ -2294,9 +2322,9 @@ e_day_view_find_event_from_uid (EDayView *day_view,
}
static void
-e_day_view_set_selected_time_range_in_top_visible (EDayView *day_view,
- time_t start_time,
- time_t end_time)
+e_day_view_set_selected_time_range_in_top_visible (EDayView *day_view,
+ time_t start_time,
+ time_t end_time)
{
gint start_row, start_col, end_row, end_col;
gboolean need_redraw = FALSE, start_in_grid, end_in_grid;
@@ -2342,9 +2370,9 @@ e_day_view_set_selected_time_range_in_top_visible (EDayView *day_view,
}
static void
-e_day_view_set_selected_time_range_visible (EDayView *day_view,
- time_t start_time,
- time_t end_time)
+e_day_view_set_selected_time_range_visible (EDayView *day_view,
+ time_t start_time,
+ time_t end_time)
{
ECalModel *model;
gint work_day_start_hour;
@@ -2369,8 +2397,8 @@ e_day_view_set_selected_time_range_visible (EDayView *day_view,
&end_row);
/* If either of the times isn't in the grid, or the selection covers
- an entire day, we set the selection to 1 row from the start of the
- working day, in the day corresponding to the start time. */
+ * an entire day, we set the selection to 1 row from the start of the
+ * working day, in the day corresponding to the start time. */
if (!start_in_grid || !end_in_grid
|| (start_row == 0 && end_row == day_view->rows - 1)) {
end_col = start_col;
@@ -2406,8 +2434,8 @@ e_day_view_set_selected_time_range_visible (EDayView *day_view,
/* Finds the start of the working week which includes the given time. */
static time_t
-e_day_view_find_work_week_start (EDayView *day_view,
- time_t start_time)
+e_day_view_find_work_week_start (EDayView *day_view,
+ time_t start_time)
{
GDate date;
ECalModel *model;
@@ -2422,14 +2450,14 @@ e_day_view_find_work_week_start (EDayView *day_view,
time_to_gdate_with_zone (&date, start_time, e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
/* The start of the work-week is the first working day after the
- week start day. */
+ * week start day. */
/* Get the weekday corresponding to start_time, 0 (Sun) to 6 (Sat). */
weekday = g_date_get_weekday (&date) % 7;
/* Calculate the first working day of the week, 0 (Sun) to 6 (Sat).
- It will automatically default to the week start day if no days
- are set as working days. */
+ * It will automatically default to the week start day if no days
+ * are set as working days. */
day = (week_start_day + 1) % 7;
for (i = 0; i < 7; i++) {
if (day_view->working_days & (1 << day))
@@ -2454,12 +2482,12 @@ e_day_view_find_work_week_start (EDayView *day_view,
}
/* This sets the selected time range. If the start_time & end_time are not equal
- and are both visible in the view, then the selection is set to those times,
- otherwise it is set to 1 hour from the start of the working day. */
+ * and are both visible in the view, then the selection is set to those times,
+ * otherwise it is set to 1 hour from the start of the working day. */
static void
-e_day_view_set_selected_time_range (ECalendarView *cal_view,
- time_t start_time,
- time_t end_time)
+e_day_view_set_selected_time_range (ECalendarView *cal_view,
+ time_t start_time,
+ time_t end_time)
{
ECalModel *model;
EDayView *day_view;
@@ -2484,8 +2512,8 @@ e_day_view_set_selected_time_range (ECalendarView *cal_view,
&end_row);
/* If either of the times isn't in the grid, or the selection covers
- an entire day, we set the selection to 1 row from the start of the
- working day, in the day corresponding to the start time. */
+ * an entire day, we set the selection to 1 row from the start of the
+ * working day, in the day corresponding to the start time. */
if (!start_in_grid || !end_in_grid
|| (start_row == 0 && end_row == day_view->rows - 1)) {
end_col = start_col;
@@ -2521,7 +2549,9 @@ e_day_view_set_selected_time_range (ECalendarView *cal_view,
/* Returns the selected time range. */
static gboolean
-e_day_view_get_selected_time_range (ECalendarView *cal_view, time_t *start_time, time_t *end_time)
+e_day_view_get_selected_time_range (ECalendarView *cal_view,
+ time_t *start_time,
+ time_t *end_time)
{
gint start_col, start_row, end_col, end_row;
time_t start, end;
@@ -2540,7 +2570,7 @@ e_day_view_get_selected_time_range (ECalendarView *cal_view, time_t *start_time,
}
/* Check if the selection is only in the top canvas, in which case
- we can simply use the day_starts array. */
+ * we can simply use the day_starts array. */
if (day_view->selection_in_top_canvas) {
start = day_view->day_starts[start_col];
end = day_view->day_starts[end_col + 1];
@@ -2561,9 +2591,9 @@ e_day_view_get_selected_time_range (ECalendarView *cal_view, time_t *start_time,
/* Gets the visible time range. Returns FALSE if no time range has been set. */
static gboolean
-e_day_view_get_visible_time_range (ECalendarView *cal_view,
- time_t *start_time,
- time_t *end_time)
+e_day_view_get_visible_time_range (ECalendarView *cal_view,
+ time_t *start_time,
+ time_t *end_time)
{
EDayView *day_view = E_DAY_VIEW (cal_view);
@@ -2579,7 +2609,7 @@ e_day_view_get_visible_time_range (ECalendarView *cal_view,
static void
e_day_view_recalc_day_starts (EDayView *day_view,
- time_t start_time)
+ time_t start_time)
{
gint day;
gchar *str;
@@ -2612,9 +2642,9 @@ e_day_view_recalc_day_starts (EDayView *day_view,
}
/* Whether we are displaying a work-week, in which case the display always
- starts on the first day of the working week. */
+ * starts on the first day of the working week. */
gboolean
-e_day_view_get_work_week_view (EDayView *day_view)
+e_day_view_get_work_week_view (EDayView *day_view)
{
g_return_val_if_fail (E_IS_DAY_VIEW (day_view), FALSE);
@@ -2622,8 +2652,8 @@ e_day_view_get_work_week_view (EDayView *day_view)
}
void
-e_day_view_set_work_week_view (EDayView *day_view,
- gboolean work_week_view)
+e_day_view_set_work_week_view (EDayView *day_view,
+ gboolean work_week_view)
{
g_return_if_fail (E_IS_DAY_VIEW (day_view));
@@ -2637,7 +2667,7 @@ e_day_view_set_work_week_view (EDayView *day_view,
}
gint
-e_day_view_get_days_shown (EDayView *day_view)
+e_day_view_get_days_shown (EDayView *day_view)
{
g_return_val_if_fail (E_IS_DAY_VIEW (day_view), -1);
@@ -2645,8 +2675,8 @@ e_day_view_get_days_shown (EDayView *day_view)
}
void
-e_day_view_set_days_shown (EDayView *day_view,
- gint days_shown)
+e_day_view_set_days_shown (EDayView *day_view,
+ gint days_shown)
{
g_return_if_fail (E_IS_DAY_VIEW (day_view));
g_return_if_fail (days_shown >= 1);
@@ -2668,7 +2698,7 @@ e_day_view_set_days_shown (EDayView *day_view,
}
/* This specifies the working days in the week. The value is a bitwise
- combination of day flags. Defaults to Mon-Fri. */
+ * combination of day flags. Defaults to Mon-Fri. */
EDayViewDays
e_day_view_get_working_days (EDayView *day_view)
{
@@ -2692,14 +2722,14 @@ e_day_view_set_working_days (EDayView *day_view,
e_day_view_recalc_work_week (day_view);
/* We have to do this, as the new working days may have no effect on
- the days shown, but we still want the background color to change. */
+ * the days shown, but we still want the background color to change. */
gtk_widget_queue_draw (day_view->main_canvas);
g_object_notify (G_OBJECT (day_view), "working-days");
}
static void
-e_day_view_recalc_work_week_days_shown (EDayView *day_view)
+e_day_view_recalc_work_week_days_shown (EDayView *day_view)
{
ECalModel *model;
gint week_start_day;
@@ -2728,7 +2758,7 @@ e_day_view_recalc_work_week_days_shown (EDayView *day_view)
last_day = (last_day + 6) % 7;
}
/* Now calculate the days we need to show to include all the
- working days in the week. Add 1 to make it inclusive. */
+ * working days in the week. Add 1 to make it inclusive. */
days_shown = (last_day + 7 - first_day) % 7 + 1;
} else {
/* If no working days are set, just use 7. */
@@ -2814,7 +2844,7 @@ e_day_view_marcus_bains_set_time_bar_color (EDayView *day_view,
/* Whether we display event end times in the main canvas. */
gboolean
-e_day_view_get_show_event_end_times (EDayView *day_view)
+e_day_view_get_show_event_end_times (EDayView *day_view)
{
g_return_val_if_fail (E_IS_DAY_VIEW (day_view), TRUE);
@@ -2822,8 +2852,8 @@ e_day_view_get_show_event_end_times (EDayView *day_view)
}
void
-e_day_view_set_show_event_end_times (EDayView *day_view,
- gboolean show)
+e_day_view_set_show_event_end_times (EDayView *day_view,
+ gboolean show)
{
g_return_if_fail (E_IS_DAY_VIEW (day_view));
@@ -2836,10 +2866,10 @@ e_day_view_set_show_event_end_times (EDayView *day_view,
/* This is a callback used to update all day event labels. */
static gboolean
-e_day_view_set_show_times_cb (EDayView *day_view,
- gint day,
- gint event_num,
- gpointer data)
+e_day_view_set_show_times_cb (EDayView *day_view,
+ gint day,
+ gint event_num,
+ gpointer data)
{
if (day != E_DAY_VIEW_LONG_EVENT) {
e_day_view_update_event_label (day_view, day, event_num);
@@ -2849,7 +2879,7 @@ e_day_view_set_show_times_cb (EDayView *day_view,
}
static void
-e_day_view_recalc_work_week (EDayView *day_view)
+e_day_view_recalc_work_week (EDayView *day_view)
{
time_t lower;
@@ -2890,7 +2920,7 @@ e_day_view_update_scroll_regions (EDayView *day_view)
day_view->time_canvas, &time_canvas_allocation);
/* Set the scroll region of the time canvas to its allocated width,
- but with the height the same as the main canvas. */
+ * but with the height the same as the main canvas. */
gnome_canvas_get_scroll_region (
GNOME_CANVAS (day_view->time_canvas),
NULL, NULL, &old_x2, &old_y2);
@@ -2902,7 +2932,7 @@ e_day_view_update_scroll_regions (EDayView *day_view)
0, 0, new_x2, new_y2);
/* Set the scroll region of the main canvas to its allocated width,
- but with the height depending on the number of rows needed. */
+ * but with the height depending on the number of rows needed. */
gnome_canvas_get_scroll_region (
GNOME_CANVAS (day_view->main_canvas),
NULL, NULL, &old_x2, &old_y2);
@@ -2926,9 +2956,9 @@ e_day_view_update_scroll_regions (EDayView *day_view)
}
/* This recalculates the number of rows to display, based on the time range
- shown and the minutes per row. */
+ * shown and the minutes per row. */
static void
-e_day_view_recalc_num_rows (EDayView *day_view)
+e_day_view_recalc_num_rows (EDayView *day_view)
{
ECalendarView *cal_view;
gint time_divisions;
@@ -2945,12 +2975,12 @@ e_day_view_recalc_num_rows (EDayView *day_view)
}
/* Converts an hour and minute to a row in the canvas. Note that if we aren't
- showing all 24 hours of the day, the returned row may be negative or
- greater than day_view->rows. */
+ * showing all 24 hours of the day, the returned row may be negative or
+ * greater than day_view->rows. */
gint
-e_day_view_convert_time_to_row (EDayView *day_view,
- gint hour,
- gint minute)
+e_day_view_convert_time_to_row (EDayView *day_view,
+ gint hour,
+ gint minute)
{
ECalendarView *cal_view;
gint time_divisions;
@@ -2971,9 +3001,9 @@ e_day_view_convert_time_to_row (EDayView *day_view,
/* Converts an hour and minute to a y coordinate in the canvas. */
gint
-e_day_view_convert_time_to_position (EDayView *day_view,
- gint hour,
- gint minute)
+e_day_view_convert_time_to_position (EDayView *day_view,
+ gint hour,
+ gint minute)
{
ECalendarView *cal_view;
gint time_divisions;
@@ -2992,8 +3022,8 @@ e_day_view_convert_time_to_position (EDayView *day_view,
static gboolean
e_day_view_on_top_canvas_button_press (GtkWidget *widget,
- GdkEventButton *event,
- EDayView *day_view)
+ GdkEventButton *event,
+ EDayView *day_view)
{
gint event_x, event_y, day, event_num;
ECalendarViewPosition pos;
@@ -3010,9 +3040,9 @@ e_day_view_on_top_canvas_button_press (GtkWidget *widget,
day_view->drag_event_num = -1;
/* Convert the coords to the main canvas window, or return if the
- window is not found. */
+ * window is not found. */
if (!e_day_view_convert_event_coords (
- day_view, (GdkEvent*) event, window, &event_x, &event_y))
+ day_view, (GdkEvent *) event, window, &event_x, &event_y))
return FALSE;
pos = e_day_view_convert_position_in_top_canvas (day_view,
@@ -3076,10 +3106,10 @@ e_day_view_on_top_canvas_button_press (GtkWidget *widget,
static gboolean
e_day_view_convert_event_coords (EDayView *day_view,
- GdkEvent *event,
- GdkWindow *window,
- gint *x_return,
- gint *y_return)
+ GdkEvent *event,
+ GdkWindow *window,
+ gint *x_return,
+ gint *y_return)
{
gint event_x, event_y, win_x, win_y;
GdkWindow *event_window;;
@@ -3126,8 +3156,8 @@ e_day_view_convert_event_coords (EDayView *day_view,
static gboolean
e_day_view_on_main_canvas_button_press (GtkWidget *widget,
- GdkEventButton *event,
- EDayView *day_view)
+ GdkEventButton *event,
+ EDayView *day_view)
{
gint event_x, event_y, row, day, event_num;
ECalendarViewPosition pos;
@@ -3148,9 +3178,9 @@ e_day_view_on_main_canvas_button_press (GtkWidget *widget,
day_view->drag_event_num = -1;
/* Convert the coords to the main canvas window, or return if the
- window is not found. */
+ * window is not found. */
if (!e_day_view_convert_event_coords (
- day_view, (GdkEvent*) event, window, &event_x, &event_y))
+ day_view, (GdkEvent *) event, window, &event_x, &event_y))
return FALSE;
/* Find out where the mouse is. */
@@ -3218,8 +3248,8 @@ e_day_view_on_main_canvas_button_press (GtkWidget *widget,
static gboolean
e_day_view_on_main_canvas_scroll (GtkWidget *widget,
- GdkEventScroll *scroll,
- EDayView *day_view)
+ GdkEventScroll *scroll,
+ EDayView *day_view)
{
switch (scroll->direction) {
case GDK_SCROLL_UP:
@@ -3237,8 +3267,8 @@ e_day_view_on_main_canvas_scroll (GtkWidget *widget,
static gboolean
e_day_view_on_top_canvas_scroll (GtkWidget *widget,
- GdkEventScroll *scroll,
- EDayView *day_view)
+ GdkEventScroll *scroll,
+ EDayView *day_view)
{
switch (scroll->direction) {
case GDK_SCROLL_UP:
@@ -3253,9 +3283,9 @@ e_day_view_on_top_canvas_scroll (GtkWidget *widget,
}
static gboolean
-e_day_view_on_time_canvas_scroll (GtkWidget *widget,
- GdkEventScroll *scroll,
- EDayView *day_view)
+e_day_view_on_time_canvas_scroll (GtkWidget *widget,
+ GdkEventScroll *scroll,
+ EDayView *day_view)
{
GtkWidget *tool_window = g_object_get_data ((GObject *)day_view, "tooltip-window");
@@ -3277,12 +3307,12 @@ e_day_view_on_time_canvas_scroll (GtkWidget *widget,
}
static gboolean
-e_day_view_on_long_event_button_press (EDayView *day_view,
- gint event_num,
- GdkEventButton *event,
- ECalendarViewPosition pos,
- gint event_x,
- gint event_y)
+e_day_view_on_long_event_button_press (EDayView *day_view,
+ gint event_num,
+ GdkEventButton *event,
+ ECalendarViewPosition pos,
+ gint event_x,
+ gint event_y)
{
if (event->button == 1) {
if (event->type == GDK_BUTTON_PRESS) {
@@ -3316,13 +3346,13 @@ e_day_view_on_long_event_button_press (EDayView *day_view,
}
static gboolean
-e_day_view_on_event_button_press (EDayView *day_view,
- gint day,
- gint event_num,
- GdkEventButton *event,
- ECalendarViewPosition pos,
- gint event_x,
- gint event_y)
+e_day_view_on_event_button_press (EDayView *day_view,
+ gint day,
+ gint event_num,
+ GdkEventButton *event,
+ ECalendarViewPosition pos,
+ gint event_x,
+ gint event_y)
{
if (event->button == 1) {
if (event->type == GDK_BUTTON_PRESS) {
@@ -3357,11 +3387,11 @@ e_day_view_on_event_button_press (EDayView *day_view,
static void
e_day_view_on_long_event_click (EDayView *day_view,
- gint event_num,
- GdkEventButton *bevent,
- ECalendarViewPosition pos,
- gint event_x,
- gint event_y)
+ gint event_num,
+ GdkEventButton *bevent,
+ ECalendarViewPosition pos,
+ gint event_x,
+ gint event_y)
{
EDayViewEvent *event;
GtkLayout *layout;
@@ -3381,7 +3411,7 @@ e_day_view_on_long_event_click (EDayView *day_view,
/* Ignore clicks on the EText while editing. */
if (pos == E_CALENDAR_VIEW_POS_EVENT
&& E_TEXT (event->canvas_item)->editing) {
- GNOME_CANVAS_ITEM_GET_CLASS (event->canvas_item)->event (event->canvas_item, (GdkEvent*) bevent);
+ GNOME_CANVAS_ITEM_GET_CLASS (event->canvas_item)->event (event->canvas_item, (GdkEvent *) bevent);
return;
}
@@ -3396,7 +3426,7 @@ e_day_view_on_long_event_click (EDayView *day_view,
return;
/* Grab the keyboard focus, so the event being edited is saved
- and we can use the Escape key to abort the resize. */
+ * and we can use the Escape key to abort the resize. */
if (!gtk_widget_has_focus (GTK_WIDGET (day_view)))
gtk_widget_grab_focus (GTK_WIDGET (day_view));
@@ -3422,7 +3452,7 @@ e_day_view_on_long_event_click (EDayView *day_view,
&item_x, &item_y,
&item_w, &item_h)) {
/* Remember the item clicked and the mouse position,
- so we can start a drag if the mouse moves. */
+ * so we can start a drag if the mouse moves. */
day_view->pressed_event_day = E_DAY_VIEW_LONG_EVENT;
day_view->pressed_event_num = event_num;
@@ -3438,12 +3468,12 @@ e_day_view_on_long_event_click (EDayView *day_view,
static void
e_day_view_on_event_click (EDayView *day_view,
- gint day,
- gint event_num,
- GdkEventButton *bevent,
- ECalendarViewPosition pos,
- gint event_x,
- gint event_y)
+ gint day,
+ gint event_num,
+ GdkEventButton *bevent,
+ ECalendarViewPosition pos,
+ gint event_x,
+ gint event_y)
{
EDayViewEvent *event;
ECalendarView *cal_view;
@@ -3467,7 +3497,7 @@ e_day_view_on_event_click (EDayView *day_view,
/* Ignore clicks on the EText while editing. */
if (pos == E_CALENDAR_VIEW_POS_EVENT
&& E_TEXT (event->canvas_item)->editing) {
- GNOME_CANVAS_ITEM_GET_CLASS (event->canvas_item)->event (event->canvas_item, (GdkEvent*) bevent);
+ GNOME_CANVAS_ITEM_GET_CLASS (event->canvas_item)->event (event->canvas_item, (GdkEvent *) bevent);
return;
}
@@ -3480,7 +3510,7 @@ e_day_view_on_event_click (EDayView *day_view,
}
/* Grab the keyboard focus, so the event being edited is saved
- and we can use the Escape key to abort the resize. */
+ * and we can use the Escape key to abort the resize. */
if (!gtk_widget_has_focus (GTK_WIDGET (day_view)))
gtk_widget_grab_focus (GTK_WIDGET (day_view));
@@ -3511,7 +3541,7 @@ e_day_view_on_event_click (EDayView *day_view,
} else {
/* Remember the item clicked and the mouse position,
- so we can start a drag if the mouse moves. */
+ * so we can start a drag if the mouse moves. */
day_view->pressed_event_day = day;
day_view->pressed_event_num = event_num;
@@ -3529,8 +3559,8 @@ e_day_view_on_event_click (EDayView *day_view,
static void
e_day_view_on_event_double_click (EDayView *day_view,
- gint day,
- gint event_num)
+ gint day,
+ gint event_num)
{
EDayViewEvent *event;
@@ -3556,9 +3586,9 @@ e_day_view_on_event_double_click (EDayView *day_view,
static void
e_day_view_show_popup_menu (EDayView *day_view,
- GdkEventButton *event,
- gint day,
- gint event_num)
+ GdkEventButton *event,
+ gint day,
+ gint event_num)
{
day_view->popup_event_day = day;
day_view->popup_event_num = event_num;
@@ -3660,17 +3690,17 @@ e_day_view_update_query (EDayView *day_view)
static void
e_day_view_on_event_right_click (EDayView *day_view,
- GdkEventButton *bevent,
- gint day,
- gint event_num)
+ GdkEventButton *bevent,
+ gint day,
+ gint event_num)
{
e_day_view_show_popup_menu (day_view, bevent, day, event_num);
}
static gboolean
e_day_view_on_top_canvas_button_release (GtkWidget *widget,
- GdkEventButton *event,
- EDayView *day_view)
+ GdkEventButton *event,
+ EDayView *day_view)
{
if (day_view->selection_is_being_dragged) {
gdk_pointer_ungrab (event->time);
@@ -3692,8 +3722,8 @@ e_day_view_on_top_canvas_button_release (GtkWidget *widget,
static gboolean
e_day_view_on_main_canvas_button_release (GtkWidget *widget,
- GdkEventButton *event,
- EDayView *day_view)
+ GdkEventButton *event,
+ EDayView *day_view)
{
#if 0
g_print ("In e_day_view_on_main_canvas_button_release\n");
@@ -3742,8 +3772,8 @@ e_day_view_update_calendar_selection_time (EDayView *day_view)
static gboolean
e_day_view_on_top_canvas_motion (GtkWidget *widget,
- GdkEventMotion *mevent,
- EDayView *day_view)
+ GdkEventMotion *mevent,
+ EDayView *day_view)
{
EDayViewEvent *event = NULL;
ECalendarViewPosition pos;
@@ -3759,9 +3789,9 @@ e_day_view_on_top_canvas_motion (GtkWidget *widget,
window = gtk_layout_get_bin_window (GTK_LAYOUT (widget));
/* Convert the coords to the main canvas window, or return if the
- window is not found. */
+ * window is not found. */
if (!e_day_view_convert_event_coords (
- day_view, (GdkEvent*) mevent, window, &event_x, &event_y))
+ day_view, (GdkEvent *) mevent, window, &event_x, &event_y))
return FALSE;
canvas_x = event_x;
@@ -3818,7 +3848,7 @@ e_day_view_on_top_canvas_motion (GtkWidget *widget,
e_target_list_add_calendar_targets (target_list, 0);
gtk_drag_begin (widget, target_list,
GDK_ACTION_COPY | GDK_ACTION_MOVE,
- 1, (GdkEvent*) mevent);
+ 1, (GdkEvent *) mevent);
gtk_target_list_unref (target_list);
}
} else {
@@ -3847,7 +3877,7 @@ e_day_view_on_top_canvas_motion (GtkWidget *widget,
}
if (event && E_IS_TEXT (event->canvas_item) && E_TEXT (event->canvas_item)->editing) {
- GNOME_CANVAS_ITEM_GET_CLASS (event->canvas_item)->event (event->canvas_item, (GdkEvent*) mevent);
+ GNOME_CANVAS_ITEM_GET_CLASS (event->canvas_item)->event (event->canvas_item, (GdkEvent *) mevent);
}
}
@@ -3856,8 +3886,8 @@ e_day_view_on_top_canvas_motion (GtkWidget *widget,
static gboolean
e_day_view_on_main_canvas_motion (GtkWidget *widget,
- GdkEventMotion *mevent,
- EDayView *day_view)
+ GdkEventMotion *mevent,
+ EDayView *day_view)
{
EDayViewEvent *event = NULL;
ECalendarViewPosition pos;
@@ -3873,9 +3903,9 @@ e_day_view_on_main_canvas_motion (GtkWidget *widget,
window = gtk_layout_get_bin_window (GTK_LAYOUT (widget));
/* Convert the coords to the main canvas window, or return if the
- window is not found. */
+ * window is not found. */
if (!e_day_view_convert_event_coords (
- day_view, (GdkEvent*) mevent, window, &event_x, &event_y))
+ day_view, (GdkEvent *) mevent, window, &event_x, &event_y))
return FALSE;
canvas_x = event_x;
@@ -3930,7 +3960,7 @@ e_day_view_on_main_canvas_motion (GtkWidget *widget,
e_target_list_add_calendar_targets (target_list, 0);
gtk_drag_begin (widget, target_list,
GDK_ACTION_COPY | GDK_ACTION_MOVE,
- 1, (GdkEvent*) mevent);
+ 1, (GdkEvent *) mevent);
gtk_target_list_unref (target_list);
}
} else {
@@ -3963,7 +3993,7 @@ e_day_view_on_main_canvas_motion (GtkWidget *widget,
}
if (event && E_IS_TEXT (event->canvas_item) && E_TEXT (event->canvas_item)->editing) {
- GNOME_CANVAS_ITEM_GET_CLASS (event->canvas_item)->event (event->canvas_item, (GdkEvent*) mevent);
+ GNOME_CANVAS_ITEM_GET_CLASS (event->canvas_item)->event (event->canvas_item, (GdkEvent *) mevent);
}
}
@@ -3971,12 +4001,12 @@ e_day_view_on_main_canvas_motion (GtkWidget *widget,
}
/* This sets the selection to a single cell. If day is -1 then the current
- start day is reused. If row is -1 then the selection is in the top canvas.
+ * start day is reused. If row is -1 then the selection is in the top canvas.
*/
void
e_day_view_start_selection (EDayView *day_view,
- gint day,
- gint row)
+ gint day,
+ gint row)
{
if (day == -1) {
day = day_view->selection_start_day;
@@ -4000,11 +4030,11 @@ e_day_view_start_selection (EDayView *day_view,
}
/* Updates the selection during a drag. If day is -1 the selection day is
- unchanged. */
+ * unchanged. */
void
e_day_view_update_selection (EDayView *day_view,
- gint day,
- gint row)
+ gint day,
+ gint row)
{
gboolean need_redraw = FALSE;
@@ -4075,7 +4105,7 @@ e_day_view_finish_selection (EDayView *day_view)
static void
e_day_view_update_long_event_resize (EDayView *day_view,
- gint day)
+ gint day)
{
gint event_num;
gboolean need_reshape = FALSE;
@@ -4110,7 +4140,7 @@ e_day_view_update_long_event_resize (EDayView *day_view,
static void
e_day_view_update_resize (EDayView *day_view,
- gint row)
+ gint row)
{
/* Same thing again? */
EDayViewEvent *event;
@@ -4161,7 +4191,7 @@ e_day_view_update_resize (EDayView *day_view,
}
/* This converts the resize start or end row back to a time and updates the
- event. */
+ * event. */
static void
e_day_view_finish_long_event_resize (EDayView *day_view)
{
@@ -4190,8 +4220,8 @@ e_day_view_finish_long_event_resize (EDayView *day_view)
client = event->comp_data->client;
/* We use a temporary copy of the comp since we don't want to
- change the original comp here. Otherwise we would not detect that
- the event's time had changed in the "update_event" callback. */
+ * change the original comp here. Otherwise we would not detect that
+ * the event's time had changed in the "update_event" callback. */
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
@@ -4276,7 +4306,7 @@ e_day_view_finish_long_event_resize (EDayView *day_view)
}
/* This converts the resize start or end row back to a time and updates the
- event. */
+ * event. */
static void
e_day_view_finish_resize (EDayView *day_view)
{
@@ -4308,8 +4338,8 @@ e_day_view_finish_resize (EDayView *day_view)
client = event->comp_data->client;
/* We use a temporary shallow copy of the ico since we don't want to
- change the original ico here. Otherwise we would not detect that
- the event's time had changed in the "update_event" callback. */
+ * change the original ico here. Otherwise we would not detect that
+ * the event's time had changed in the "update_event" callback. */
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
@@ -4443,7 +4473,7 @@ e_day_view_free_events (EDayView *day_view)
static void
e_day_view_free_event_array (EDayView *day_view,
- GArray *array)
+ GArray *array)
{
EDayViewEvent *event;
gint event_num;
@@ -4463,9 +4493,9 @@ e_day_view_free_event_array (EDayView *day_view,
/* This adds one event to the view, adding it to the appropriate array. */
static gboolean
e_day_view_add_event (ECalComponent *comp,
- time_t start,
- time_t end,
- gpointer data)
+ time_t start,
+ time_t end,
+ gpointer data)
{
EDayViewEvent event;
@@ -4513,7 +4543,7 @@ e_day_view_add_event (ECalComponent *comp,
event.comp_data->instance_end = end;
/* Calculate the start & end minute, relative to the top of the
- display. */
+ * display. */
offset = add_event_data->day_view->first_hour_shown * 60
+ add_event_data->day_view->first_minute_shown;
event.start_minute = start_tt.hour * 60 + start_tt.minute - offset;
@@ -4539,12 +4569,12 @@ e_day_view_add_event (ECalComponent *comp,
&& end <= add_event_data->day_view->day_starts[day + 1]) {
/* Special case for when the appointment ends at
- midnight, i.e. the start of the next day. */
+ * midnight, i.e. the start of the next day. */
if (end == add_event_data->day_view->day_starts[day + 1]) {
/* If the event last the entire day, then we
- skip it here so it gets added to the top
- canvas. */
+ * skip it here so it gets added to the top
+ * canvas. */
if (start == add_event_data->day_view->day_starts[day])
break;
@@ -4559,7 +4589,7 @@ e_day_view_add_event (ECalComponent *comp,
}
/* The event wasn't within one day so it must be a long event,
- i.e. shown in the top canvas. */
+ * i.e. shown in the top canvas. */
g_array_append_val (add_event_data->day_view->long_events, event);
add_event_data->day_view->long_events_sorted = FALSE;
add_event_data->day_view->long_events_need_layout = TRUE;
@@ -4567,7 +4597,7 @@ e_day_view_add_event (ECalComponent *comp,
}
/* This lays out the short (less than 1 day) events in the columns.
- Any long events are simply skipped. */
+ * Any long events are simply skipped. */
void
e_day_view_check_layout (EDayView *day_view)
{
@@ -4666,7 +4696,7 @@ e_day_view_reshape_long_events (EDayView *day_view)
static void
e_day_view_reshape_long_event (EDayView *day_view,
- gint event_num)
+ gint event_num)
{
EDayViewEvent *event;
gint start_day, end_day, item_x, item_y, item_w, item_h;
@@ -4705,7 +4735,7 @@ e_day_view_reshape_long_event (EDayView *day_view,
item_h -= (E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT + E_DAY_VIEW_LONG_EVENT_Y_PAD) * 2;
/* We don't show the icons while resizing, since we'd have to
- draw them on top of the resize rect. Nor when editing. */
+ * draw them on top of the resize rect. Nor when editing. */
num_icons = 0;
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
@@ -4770,9 +4800,9 @@ e_day_view_reshape_long_event (EDayView *day_view,
}
/* Calculate its position. We first calculate the ideal position which
- is centered with the icons. We then make sure we haven't gone off
- the left edge of the available space. Finally we make sure we don't
- go off the right edge. */
+ * is centered with the icons. We then make sure we haven't gone off
+ * the left edge of the available space. Finally we make sure we don't
+ * go off the right edge. */
icons_width = (E_DAY_VIEW_ICON_WIDTH + E_DAY_VIEW_ICON_X_PAD)
* num_icons + E_DAY_VIEW_LONG_EVENT_ICON_R_PAD;
time_width = e_day_view_get_time_string_width (day_view);
@@ -4782,7 +4812,7 @@ e_day_view_reshape_long_event (EDayView *day_view,
text_w = item_w;
} else {
/* Get the requested size of the label. */
- g_object_get (G_OBJECT (event->canvas_item), "text", &text, NULL);
+ g_object_get (event->canvas_item, "text", &text, NULL);
text_width = 0;
if (text) {
end_of_line = strchr (text, '\n');
@@ -4828,10 +4858,10 @@ e_day_view_reshape_long_event (EDayView *day_view,
}
/* This creates or updates the sizes of the canvas items for one day of the
- main canvas. */
+ * main canvas. */
static void
e_day_view_reshape_day_events (EDayView *day_view,
- gint day)
+ gint day)
{
gint event_num;
@@ -4863,8 +4893,8 @@ e_day_view_reshape_day_events (EDayView *day_view,
static void
e_day_view_reshape_day_event (EDayView *day_view,
- gint day,
- gint event_num)
+ gint day,
+ gint event_num)
{
EDayViewEvent *event;
gint item_x, item_y, item_w, item_h;
@@ -4891,7 +4921,7 @@ e_day_view_reshape_day_event (EDayView *day_view,
item_h -= (E_DAY_VIEW_EVENT_BORDER_HEIGHT + E_DAY_VIEW_EVENT_Y_PAD) * 2;
/* We don't show the icons while resizing, since we'd have to
- draw them on top of the resize rect. */
+ * draw them on top of the resize rect. */
icons_offset = 0;
num_icons = 0;
if (is_comp_data_valid (event) && (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_NONE
@@ -4967,7 +4997,7 @@ e_day_view_reshape_day_event (EDayView *day_view,
}
/* This creates or resizes the horizontal bars used to resize events in the
- main canvas. */
+ * main canvas. */
static void
e_day_view_reshape_main_canvas_resize_bars (EDayView *day_view)
{
@@ -4979,10 +5009,10 @@ e_day_view_reshape_main_canvas_resize_bars (EDayView *day_view)
event_num = day_view->resize_bars_event_num;
/* If we're not editing an event, or the event is not shown,
- hide the resize bars. */
+ * hide the resize bars. */
if (day != -1 && day == day_view->drag_event_day
&& event_num == day_view->drag_event_num) {
- g_object_get (G_OBJECT (day_view->drag_rect_item),
+ g_object_get (day_view->drag_rect_item,
"x1", &x,
"y1", &y,
"x2", &w,
@@ -5034,12 +5064,12 @@ e_day_view_ensure_events_sorted (EDayView *day_view)
gint
e_day_view_event_sort_func (gconstpointer arg1,
- gconstpointer arg2)
+ gconstpointer arg2)
{
EDayViewEvent *event1, *event2;
- event1 = (EDayViewEvent*) arg1;
- event2 = (EDayViewEvent*) arg2;
+ event1 = (EDayViewEvent *) arg1;
+ event2 = (EDayViewEvent *) arg2;
if (event1->start < event2->start)
return -1;
@@ -5055,7 +5085,8 @@ e_day_view_event_sort_func (gconstpointer arg1,
}
static gboolean
-e_day_view_add_new_event_in_selected_range (EDayView *day_view, GdkEventKey *key_event)
+e_day_view_add_new_event_in_selected_range (EDayView *day_view,
+ GdkEventKey *key_event)
{
icalcomponent *icalcomp;
ECalClient *client;
@@ -5115,7 +5146,7 @@ e_day_view_add_new_event_in_selected_range (EDayView *day_view, GdkEventKey *key
comp, e_calendar_view_get_default_category (E_CALENDAR_VIEW (day_view)));
/* We add the event locally and start editing it. We don't send it
- to the server until the user finishes editing it. */
+ * to the server until the user finishes editing it. */
add_event_data.day_view = day_view;
add_event_data.comp_data = NULL;
e_day_view_add_event (comp, dtstart, dtend, &add_event_data);
@@ -5136,7 +5167,8 @@ e_day_view_add_new_event_in_selected_range (EDayView *day_view, GdkEventKey *key
}
static gboolean
-e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
+e_day_view_do_key_press (GtkWidget *widget,
+ GdkEventKey *event)
{
EDayView *day_view;
guint keyval;
@@ -5258,7 +5290,7 @@ e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
return FALSE;
/* We only want to start an edit with a return key or a simple
- character. */
+ * character. */
if ((keyval != GDK_KEY_Return) &&
(((keyval >= 0x20) && (keyval <= 0xFF)
&& (event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK)))
@@ -5271,7 +5303,8 @@ e_day_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
}
static gboolean
-e_day_view_key_press (GtkWidget *widget, GdkEventKey *event)
+e_day_view_key_press (GtkWidget *widget,
+ GdkEventKey *event)
{
gboolean handled = FALSE;
handled = e_day_view_do_key_press (widget, event);
@@ -5330,7 +5363,7 @@ e_day_view_goto_end_of_work_day (EDayView *day_view)
else
day_view->selection_start_row =
e_day_view_convert_time_to_row (
- day_view, work_day_end_hour-1, work_day_end_minute+30);
+ day_view, work_day_end_hour - 1, work_day_end_minute + 30);
day_view->selection_end_row = day_view->selection_start_row;
e_day_view_ensure_rows_visible (day_view,
@@ -5403,7 +5436,7 @@ e_day_view_change_duration_to_end_of_work_day (EDayView *day_view)
gint work_end_row,selection_start_row;
work_end_row = e_day_view_convert_time_to_row (
- day_view, work_day_end_hour-1, work_day_end_minute+30);
+ day_view, work_day_end_hour - 1, work_day_end_minute + 30);
selection_start_row = day_view->selection_start_row;
if (selection_start_row <= work_end_row)
day_view->selection_end_row = work_end_row;
@@ -5425,7 +5458,8 @@ e_day_view_change_duration_to_end_of_work_day (EDayView *day_view)
}
static void
-e_day_view_cursor_key_up_shifted (EDayView *day_view, GdkEventKey *event)
+e_day_view_cursor_key_up_shifted (EDayView *day_view,
+ GdkEventKey *event)
{
gint *row;
@@ -5454,7 +5488,8 @@ e_day_view_cursor_key_up_shifted (EDayView *day_view, GdkEventKey *event)
}
static gboolean
-e_day_view_focus (GtkWidget *widget, GtkDirectionType direction)
+e_day_view_focus (GtkWidget *widget,
+ GtkDirectionType direction)
{
EDayView *day_view;
gint new_day;
@@ -5505,9 +5540,12 @@ e_day_view_focus (GtkWidget *widget, GtkDirectionType direction)
* Return value: %TRUE, if a event found.
**/
static gboolean
-e_day_view_get_extreme_event (EDayView *day_view, gint start_day,
- gint end_day, gboolean first,
- gint *day_out, gint *event_num_out)
+e_day_view_get_extreme_event (EDayView *day_view,
+ gint start_day,
+ gint end_day,
+ gboolean first,
+ gint *day_out,
+ gint *event_num_out)
{
gint loop_day;
@@ -5553,8 +5591,10 @@ e_day_view_get_extreme_event (EDayView *day_view, gint start_day,
* Return value: %TRUE, if a event found.
**/
static gboolean
-e_day_view_get_extreme_long_event (EDayView *day_view, gboolean first,
- gint *day_out, gint *event_num_out)
+e_day_view_get_extreme_long_event (EDayView *day_view,
+ gboolean first,
+ gint *day_out,
+ gint *event_num_out)
{
g_return_val_if_fail (day_view != NULL, FALSE);
g_return_val_if_fail (day_out && event_num_out, FALSE);
@@ -5589,8 +5629,10 @@ e_day_view_get_extreme_long_event (EDayView *day_view, gboolean first,
* Return value: %TRUE, if a event found.
**/
static gboolean
-e_day_view_get_next_tab_event (EDayView *day_view, GtkDirectionType direction,
- gint *day_out, gint *event_num_out)
+e_day_view_get_next_tab_event (EDayView *day_view,
+ GtkDirectionType direction,
+ gint *day_out,
+ gint *event_num_out)
{
gint new_day;
gint new_event_num;
@@ -5707,7 +5749,8 @@ e_day_view_get_next_tab_event (EDayView *day_view, GtkDirectionType direction,
}
static void
-e_day_view_cursor_key_down_shifted (EDayView *day_view, GdkEventKey *event)
+e_day_view_cursor_key_down_shifted (EDayView *day_view,
+ GdkEventKey *event)
{
gint *row;
@@ -5736,7 +5779,8 @@ e_day_view_cursor_key_down_shifted (EDayView *day_view, GdkEventKey *event)
}
static void
-e_day_view_cursor_key_left_shifted (EDayView *day_view, GdkEventKey *event)
+e_day_view_cursor_key_left_shifted (EDayView *day_view,
+ GdkEventKey *event)
{
gint *day;
@@ -5760,7 +5804,8 @@ e_day_view_cursor_key_left_shifted (EDayView *day_view, GdkEventKey *event)
}
static void
-e_day_view_cursor_key_right_shifted (EDayView *day_view, GdkEventKey *event)
+e_day_view_cursor_key_right_shifted (EDayView *day_view,
+ GdkEventKey *event)
{
gint *day;
@@ -5784,7 +5829,8 @@ e_day_view_cursor_key_right_shifted (EDayView *day_view, GdkEventKey *event)
}
static void
-e_day_view_cursor_key_up (EDayView *day_view, GdkEventKey *event)
+e_day_view_cursor_key_up (EDayView *day_view,
+ GdkEventKey *event)
{
if (day_view->selection_start_day == -1) {
day_view->selection_start_day = 0;
@@ -5816,7 +5862,8 @@ e_day_view_cursor_key_up (EDayView *day_view, GdkEventKey *event)
}
static void
-e_day_view_cursor_key_down (EDayView *day_view, GdkEventKey *event)
+e_day_view_cursor_key_down (EDayView *day_view,
+ GdkEventKey *event)
{
if (day_view->selection_start_day == -1) {
day_view->selection_start_day = 0;
@@ -5848,7 +5895,8 @@ e_day_view_cursor_key_down (EDayView *day_view, GdkEventKey *event)
}
static void
-e_day_view_cursor_key_left (EDayView *day_view, GdkEventKey *event)
+e_day_view_cursor_key_left (EDayView *day_view,
+ GdkEventKey *event)
{
if (day_view->selection_start_day == 0) {
gnome_calendar_previous (e_calendar_view_get_calendar (E_CALENDAR_VIEW (day_view)));
@@ -5866,7 +5914,8 @@ e_day_view_cursor_key_left (EDayView *day_view, GdkEventKey *event)
}
static void
-e_day_view_cursor_key_right (EDayView *day_view, GdkEventKey *event)
+e_day_view_cursor_key_right (EDayView *day_view,
+ GdkEventKey *event)
{
if (day_view->selection_end_day == day_view->days_shown - 1) {
gnome_calendar_next (e_calendar_view_get_calendar (E_CALENDAR_VIEW (day_view)));
@@ -5884,12 +5933,12 @@ e_day_view_cursor_key_right (EDayView *day_view, GdkEventKey *event)
}
/* Scrolls the main canvas up or down. The pages_to_scroll argument
- is multiplied with the adjustment's page size and added to the adjustment's
- value, while ensuring we stay within the bounds. A positive value will
- scroll the canvas down and a negative value will scroll it up. */
+ * is multiplied with the adjustment's page size and added to the adjustment's
+ * value, while ensuring we stay within the bounds. A positive value will
+ * scroll the canvas down and a negative value will scroll it up. */
static void
-e_day_view_scroll (EDayView *day_view,
- gfloat pages_to_scroll)
+e_day_view_scroll (EDayView *day_view,
+ gfloat pages_to_scroll)
{
GtkAdjustment *adjustment;
GtkScrollable *scrollable;
@@ -5913,8 +5962,8 @@ e_day_view_scroll (EDayView *day_view,
}
static void
-e_day_view_top_scroll (EDayView *day_view,
- gfloat pages_to_scroll)
+e_day_view_top_scroll (EDayView *day_view,
+ gfloat pages_to_scroll)
{
GtkAdjustment *adjustment;
GtkScrollable *scrollable;
@@ -5939,8 +5988,8 @@ e_day_view_top_scroll (EDayView *day_view,
void
e_day_view_ensure_rows_visible (EDayView *day_view,
- gint start_row,
- gint end_row)
+ gint start_row,
+ gint end_row)
{
GtkAdjustment *adjustment;
GtkScrollable *scrollable;
@@ -5968,9 +6017,9 @@ e_day_view_ensure_rows_visible (EDayView *day_view,
static void
e_day_view_start_editing_event (EDayView *day_view,
- gint day,
- gint event_num,
- GdkEventKey *key_event)
+ gint day,
+ gint event_num,
+ GdkEventKey *key_event)
{
EDayViewEvent *event;
ETextEventProcessor *event_processor = NULL;
@@ -6010,9 +6059,9 @@ e_day_view_start_editing_event (EDayView *day_view,
return;
/* We must grab the focus before setting the initial text, since
- grabbing the focus will result in a call to
- e_day_view_on_editing_started (), which will reset the text to get
- rid of the start and end times. */
+ * grabbing the focus will result in a call to
+ * e_day_view_on_editing_started (), which will reset the text to get
+ * rid of the start and end times. */
e_canvas_item_grab_focus (event->canvas_item, TRUE);
if (key_event) {
@@ -6032,7 +6081,7 @@ e_day_view_start_editing_event (EDayView *day_view,
}
/* Try to move the cursor to the end of the text. */
- g_object_get (G_OBJECT (event->canvas_item),
+ g_object_get (event->canvas_item,
"event_processor", &event_processor,
NULL);
if (event_processor) {
@@ -6044,7 +6093,7 @@ e_day_view_start_editing_event (EDayView *day_view,
}
/* This stops the current edit. If accept is TRUE the event summary is updated,
- else the edit is cancelled. */
+ * else the edit is cancelled. */
static void
e_day_view_stop_editing_event (EDayView *day_view)
{
@@ -6091,7 +6140,7 @@ cancel_editing (EDayView *day_view)
/* Reset the text to what was in the component */
summary = icalcomponent_get_summary (event->comp_data->icalcomp);
- g_object_set (G_OBJECT (event->canvas_item),
+ g_object_set (event->canvas_item,
"text", summary ? summary : "",
NULL);
@@ -6100,7 +6149,9 @@ cancel_editing (EDayView *day_view)
}
static EDayViewEvent *
-tooltip_get_view_event (EDayView *day_view, gint day, gint event_num)
+tooltip_get_view_event (EDayView *day_view,
+ gint day,
+ gint event_num)
{
EDayViewEvent *pevent;
@@ -6122,7 +6173,8 @@ tooltip_get_view_event (EDayView *day_view, gint day, gint event_num)
}
static void
-tooltip_destroy (EDayView *day_view, GnomeCanvasItem *item)
+tooltip_destroy (EDayView *day_view,
+ GnomeCanvasItem *item)
{
EDayViewEvent *pevent;
gint event_num = GPOINTER_TO_INT(g_object_get_data ((GObject *)item, "event-num"));
@@ -6146,8 +6198,8 @@ tooltip_destroy (EDayView *day_view, GnomeCanvasItem *item)
static gboolean
e_day_view_on_text_item_event (GnomeCanvasItem *item,
- GdkEvent *event,
- EDayView *day_view)
+ GdkEvent *event,
+ EDayView *day_view)
{
switch (event->type) {
case GDK_KEY_PRESS:
@@ -6156,11 +6208,11 @@ e_day_view_on_text_item_event (GnomeCanvasItem *item,
day_view->resize_event_num = -1;
/* We set the keyboard focus to the EDayView, so the
- EText item loses it and stops the edit. */
+ * EText item loses it and stops the edit. */
gtk_widget_grab_focus (GTK_WIDGET (day_view));
/* Stop the signal last or we will also stop any
- other events getting to the EText item. */
+ * other events getting to the EText item. */
g_signal_stop_emission_by_name (item, "event");
return TRUE;
} else if (event->key.keyval == GDK_KEY_Escape) {
@@ -6229,11 +6281,11 @@ e_day_view_on_text_item_event (GnomeCanvasItem *item,
break;
/* Convert the coords to the main canvas window, or return if the
- window is not found. */
+ * window is not found. */
layout = GTK_LAYOUT (day_view->main_canvas);
window = gtk_layout_get_bin_window (layout);
if (!e_day_view_convert_event_coords (
- day_view, (GdkEvent*) event,
+ day_view, (GdkEvent *) event,
window, &event_x, &event_y)) {
main_canvas = FALSE;
@@ -6241,7 +6293,7 @@ e_day_view_on_text_item_event (GnomeCanvasItem *item,
layout = GTK_LAYOUT (day_view->top_canvas);
window = gtk_layout_get_bin_window (layout);
if (!e_day_view_convert_event_coords (
- day_view, (GdkEvent*) event,
+ day_view, (GdkEvent *) event,
window, &event_x, &event_y)) {
return FALSE;
}
@@ -6265,7 +6317,7 @@ e_day_view_on_text_item_event (GnomeCanvasItem *item,
break;
/* even when returns position inside, or other, then the day and/or event_num
- can be unknown, thus check for this here, otherwise it will crash later */
+ * can be unknown, thus check for this here, otherwise it will crash later */
if (day == -1 || event_num == -1)
break;
@@ -6305,7 +6357,7 @@ e_day_view_on_text_item_event (GnomeCanvasItem *item,
pevent->tooltip = (GtkWidget *)g_object_get_data (G_OBJECT (day_view), "tooltip-window");
if (pevent->tooltip) {
- e_calendar_view_move_tip (pevent->tooltip, pevent->x+16, pevent->y+16);
+ e_calendar_view_move_tip (pevent->tooltip, pevent->x + 16, pevent->y + 16);
}
return TRUE;
@@ -6403,7 +6455,9 @@ e_day_view_event_move (ECalendarView *cal_view,
}
static void
-e_day_view_change_event_time (EDayView *day_view, time_t start_dt, time_t end_dt)
+e_day_view_change_event_time (EDayView *day_view,
+ time_t start_dt,
+ time_t end_dt)
{
EDayViewEvent *event;
gint day, event_num;
@@ -6429,8 +6483,8 @@ e_day_view_change_event_time (EDayView *day_view, time_t start_dt, time_t end_dt
client = event->comp_data->client;
/* We use a temporary shallow copy of the ico since we don't want to
- change the original ico here. Otherwise we would not detect that
- the event's time had changed in the "update_event" callback. */
+ * change the original ico here. Otherwise we would not detect that
+ * the event's time had changed in the "update_event" callback. */
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
@@ -6441,7 +6495,7 @@ e_day_view_change_event_time (EDayView *day_view, time_t start_dt, time_t end_dt
date.value = &itt;
/* FIXME: Should probably keep the timezone of the original start
- and end times. */
+ * and end times. */
date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
*date.value = icaltime_from_timet_with_zone (start_dt, FALSE,
@@ -6569,7 +6623,7 @@ e_day_view_change_event_end_time_down (EDayView *day_view)
static void
e_day_view_on_editing_started (EDayView *day_view,
- GnomeCanvasItem *item)
+ GnomeCanvasItem *item)
{
GtkAllocation allocation;
gint day, event_num;
@@ -6584,9 +6638,9 @@ e_day_view_on_editing_started (EDayView *day_view,
#endif
/* FIXME: This is a temporary workaround for a bug which seems to stop
- us getting focus_out signals. It is not a complete fix since if we
- don't get focus_out signals we don't save the appointment text so
- this may be lost. */
+ * us getting focus_out signals. It is not a complete fix since if we
+ * don't get focus_out signals we don't save the appointment text so
+ * this may be lost. */
if (day_view->editing_event_day == day
&& day_view->editing_event_num == event_num)
return;
@@ -6630,7 +6684,7 @@ e_day_view_on_editing_started (EDayView *day_view,
static void
e_day_view_on_editing_stopped (EDayView *day_view,
- GnomeCanvasItem *item)
+ GnomeCanvasItem *item)
{
gint day, event_num;
EDayViewEvent *event;
@@ -6641,8 +6695,8 @@ e_day_view_on_editing_stopped (EDayView *day_view,
gboolean on_server;
/* Note: the item we are passed here isn't reliable, so we just stop
- the edit of whatever item was being edited. We also receive this
- event twice for some reason. */
+ * the edit of whatever item was being edited. We also receive this
+ * event twice for some reason. */
day = day_view->editing_event_day;
event_num = day_view->editing_event_num;
@@ -6681,7 +6735,7 @@ e_day_view_on_editing_stopped (EDayView *day_view,
day_view->resize_bars_event_num = -1;
g_object_set (event->canvas_item, "handle_popup", FALSE, NULL);
- g_object_get (G_OBJECT (event->canvas_item),
+ g_object_get (event->canvas_item,
"text", &text,
NULL);
g_return_if_fail (text != NULL);
@@ -6822,12 +6876,12 @@ e_day_view_on_editing_stopped (EDayView *day_view,
}
/* FIXME: It is possible that we may produce an invalid time due to daylight
- saving times (i.e. when clocks go forward there is a range of time which
- is not valid). I don't know the best way to handle daylight saving time. */
+ * saving times (i.e. when clocks go forward there is a range of time which
+ * is not valid). I don't know the best way to handle daylight saving time. */
static time_t
e_day_view_convert_grid_position_to_time (EDayView *day_view,
- gint col,
- gint row)
+ gint col,
+ gint row)
{
ECalendarView *cal_view;
gint time_divisions;
@@ -6844,7 +6898,7 @@ e_day_view_convert_grid_position_to_time (EDayView *day_view,
+ row * time_divisions;
/* A special case for midnight, where we can use the start of the
- next day. */
+ * next day. */
if (minutes == 60 * 24)
return day_view->day_starts[col + 1];
@@ -6861,9 +6915,9 @@ e_day_view_convert_grid_position_to_time (EDayView *day_view,
static gboolean
e_day_view_convert_time_to_grid_position (EDayView *day_view,
- time_t time,
- gint *col,
- gint *row)
+ time_t time,
+ gint *col,
+ gint *row)
{
ECalendarView *cal_view;
struct icaltimetype tt;
@@ -6887,8 +6941,8 @@ e_day_view_convert_time_to_grid_position (EDayView *day_view,
}
/* To find the row we need to convert the time to an icaltimetype,
- calculate the offset in minutes from the top of the display and
- divide it by the mins per row setting. */
+ * calculate the offset in minutes from the top of the display and
+ * divide it by the mins per row setting. */
tt = icaltime_from_timet_with_zone (time, FALSE, e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
minutes = tt.hour * 60 + tt.minute;
@@ -6903,11 +6957,11 @@ e_day_view_convert_time_to_grid_position (EDayView *day_view,
}
/* This starts or stops auto-scrolling when dragging a selection or resizing
- an event. */
+ * an event. */
void
e_day_view_check_auto_scroll (EDayView *day_view,
- gint event_x,
- gint event_y)
+ gint event_x,
+ gint event_y)
{
GtkAllocation allocation;
gint scroll_x, scroll_y;
@@ -6933,7 +6987,7 @@ e_day_view_check_auto_scroll (EDayView *day_view,
static void
e_day_view_start_auto_scroll (EDayView *day_view,
- gboolean scroll_up)
+ gboolean scroll_up)
{
if (day_view->auto_scroll_timeout_id == 0) {
day_view->auto_scroll_timeout_id = g_timeout_add (E_DAY_VIEW_AUTO_SCROLL_TIMEOUT, e_day_view_auto_scroll_handler, day_view);
@@ -6993,7 +7047,7 @@ e_day_view_auto_scroll_handler (gpointer data)
if (new_scroll_y != scroll_y) {
/* NOTE: This reduces flicker, but only works if we don't use
- canvas items which have X windows. */
+ * canvas items which have X windows. */
gnome_canvas_scroll_to (GNOME_CANVAS (day_view->main_canvas),
scroll_x, new_scroll_y);
}
@@ -7002,8 +7056,8 @@ e_day_view_auto_scroll_handler (gpointer data)
canvas_y = day_view->last_mouse_y + new_scroll_y;
/* The last_mouse_x position is set to -1 when we are selecting using
- the time column. In this case we set canvas_x to 0 and we ignore
- the resulting day. */
+ * the time column. In this case we set canvas_x to 0 and we ignore
+ * the resulting day. */
if (day_view->last_mouse_x == -1)
canvas_x = 0;
@@ -7031,10 +7085,10 @@ e_day_view_auto_scroll_handler (gpointer data)
gboolean
e_day_view_get_event_rows (EDayView *day_view,
- gint day,
- gint event_num,
- gint *start_row_out,
- gint *end_row_out)
+ gint day,
+ gint event_num,
+ gint *start_row_out,
+ gint *end_row_out)
{
ECalendarView *cal_view;
EDayViewEvent *event;
@@ -7065,12 +7119,12 @@ e_day_view_get_event_rows (EDayView *day_view,
gboolean
e_day_view_get_event_position (EDayView *day_view,
- gint day,
- gint event_num,
- gint *item_x,
- gint *item_y,
- gint *item_w,
- gint *item_h)
+ gint day,
+ gint event_num,
+ gint *item_x,
+ gint *item_y,
+ gint *item_w,
+ gint *item_h)
{
EDayViewEvent *event;
gint start_row, end_row, cols_in_row, start_col, num_columns;
@@ -7114,21 +7168,21 @@ e_day_view_get_event_position (EDayView *day_view,
*item_h = (end_row - start_row + 1) * day_view->row_height;
#else
/* This makes the event end on the grid line of the next row,
- which maybe looks nicer if you have 2 events on consecutive rows. */
+ * which maybe looks nicer if you have 2 events on consecutive rows. */
*item_h = (end_row - start_row + 1) * day_view->row_height + 1;
#endif
return TRUE;
}
gboolean
-e_day_view_get_long_event_position (EDayView *day_view,
- gint event_num,
- gint *start_day,
- gint *end_day,
- gint *item_x,
- gint *item_y,
- gint *item_w,
- gint *item_h)
+e_day_view_get_long_event_position (EDayView *day_view,
+ gint event_num,
+ gint *start_day,
+ gint *end_day,
+ gint *item_x,
+ gint *item_y,
+ gint *item_w,
+ gint *item_h)
{
EDayViewEvent *event;
@@ -7173,14 +7227,14 @@ e_day_view_get_long_event_position (EDayView *day_view,
}
/* Converts a position within the entire top canvas to a day & event and
- a place within the event if appropriate. If event_num_return is NULL, it
- simply returns the grid position without trying to find the event. */
+ * a place within the event if appropriate. If event_num_return is NULL, it
+ * simply returns the grid position without trying to find the event. */
static ECalendarViewPosition
e_day_view_convert_position_in_top_canvas (EDayView *day_view,
- gint x,
- gint y,
- gint *day_return,
- gint *event_num_return)
+ gint x,
+ gint y,
+ gint *day_return,
+ gint *event_num_return)
{
EDayViewEvent *event;
gint day, row, col;
@@ -7248,15 +7302,15 @@ e_day_view_convert_position_in_top_canvas (EDayView *day_view,
}
/* Converts a position within the entire main canvas to a day, row, event and
- a place within the event if appropriate. If event_num_return is NULL, it
- simply returns the grid position without trying to find the event. */
+ * a place within the event if appropriate. If event_num_return is NULL, it
+ * simply returns the grid position without trying to find the event. */
static ECalendarViewPosition
e_day_view_convert_position_in_main_canvas (EDayView *day_view,
- gint x,
- gint y,
- gint *day_return,
- gint *row_return,
- gint *event_num_return)
+ gint x,
+ gint y,
+ gint *day_return,
+ gint *row_return,
+ gint *event_num_return)
{
gint day, row, col, event_num;
gint item_x, item_y, item_w, item_h;
@@ -7271,7 +7325,7 @@ e_day_view_convert_position_in_main_canvas (EDayView *day_view,
*event_num_return = -1;
/* Check the position is inside the canvas, and determine the day
- and row. */
+ * and row. */
if (x < 0 || y < 0)
return E_CALENDAR_VIEW_POS_OUTSIDE;
@@ -7297,7 +7351,7 @@ e_day_view_convert_position_in_main_canvas (EDayView *day_view,
return E_CALENDAR_VIEW_POS_NONE;
/* Check the selected item first, since the horizontal resizing bars
- may be above other events. */
+ * may be above other events. */
if (day_view->resize_bars_event_day == day) {
if (e_day_view_get_event_position (day_view, day,
day_view->resize_bars_event_num,
@@ -7348,12 +7402,12 @@ e_day_view_convert_position_in_main_canvas (EDayView *day_view,
}
static gboolean
-e_day_view_on_top_canvas_drag_motion (GtkWidget *widget,
- GdkDragContext *context,
- gint x,
- gint y,
- guint time,
- EDayView *day_view)
+e_day_view_on_top_canvas_drag_motion (GtkWidget *widget,
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ guint time,
+ EDayView *day_view)
{
gint scroll_x, scroll_y;
@@ -7374,7 +7428,7 @@ e_day_view_reshape_top_canvas_drag_item (EDayView *day_view)
gint x, y, day;
/* Calculate the day & start row of the event being dragged, using
- the current mouse position. */
+ * the current mouse position. */
x = day_view->drag_event_x;
y = day_view->drag_event_y;
pos = e_day_view_convert_position_in_top_canvas (day_view, x, y,
@@ -7392,7 +7446,7 @@ e_day_view_reshape_top_canvas_drag_item (EDayView *day_view)
static void
e_day_view_update_top_canvas_drag (EDayView *day_view,
- gint day)
+ gint day)
{
EDayViewEvent *event = NULL;
gint row, num_days, start_day, end_day;
@@ -7400,7 +7454,7 @@ e_day_view_update_top_canvas_drag (EDayView *day_view,
gchar *text;
/* Calculate the event's position. If the event is in the same
- position we started in, we use the same columns. */
+ * position we started in, we use the same columns. */
row = day_view->rows_in_top_display + 1;
num_days = 1;
@@ -7467,8 +7521,8 @@ e_day_view_update_top_canvas_drag (EDayView *day_view,
}
/* Set the text, if necessary. We don't want to set the text every
- time it moves, so we check if it is currently invisible and only
- set the text then. */
+ * time it moves, so we check if it is currently invisible and only
+ * set the text then. */
if (!(day_view->drag_long_event_item->flags & GNOME_CANVAS_ITEM_VISIBLE)) {
const gchar *summary;
@@ -7490,12 +7544,12 @@ e_day_view_update_top_canvas_drag (EDayView *day_view,
}
static gboolean
-e_day_view_on_main_canvas_drag_motion (GtkWidget *widget,
- GdkDragContext *context,
- gint x,
- gint y,
- guint time,
- EDayView *day_view)
+e_day_view_on_main_canvas_drag_motion (GtkWidget *widget,
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ guint time,
+ EDayView *day_view)
{
gint scroll_x, scroll_y;
@@ -7520,7 +7574,7 @@ e_day_view_reshape_main_canvas_drag_item (EDayView *day_view)
gint x, y, day, row;
/* Calculate the day & start row of the event being dragged, using
- the current mouse position. */
+ * the current mouse position. */
x = day_view->drag_event_x;
y = day_view->drag_event_y;
pos = e_day_view_convert_position_in_main_canvas (day_view, x, y,
@@ -7539,8 +7593,8 @@ e_day_view_reshape_main_canvas_drag_item (EDayView *day_view)
static void
e_day_view_update_main_canvas_drag (EDayView *day_view,
- gint row,
- gint day)
+ gint row,
+ gint day)
{
EDayViewEvent *event = NULL;
ECalendarView *cal_view;
@@ -7562,7 +7616,7 @@ e_day_view_update_main_canvas_drag (EDayView *day_view,
day_view->drag_last_row = row;
/* Calculate the event's position. If the event is in the same
- position we started in, we use the same columns. */
+ * position we started in, we use the same columns. */
cols_in_row = 1;
start_row = 0;
start_col = 0;
@@ -7637,8 +7691,8 @@ e_day_view_update_main_canvas_drag (EDayView *day_view,
}
/* Set the text, if necessary. We don't want to set the text every
- time it moves, so we check if it is currently invisible and only
- set the text then. */
+ * time it moves, so we check if it is currently invisible and only
+ * set the text then. */
if (!(day_view->drag_item->flags & GNOME_CANVAS_ITEM_VISIBLE)) {
const gchar *summary;
@@ -7660,10 +7714,10 @@ e_day_view_update_main_canvas_drag (EDayView *day_view,
}
static void
-e_day_view_on_top_canvas_drag_leave (GtkWidget *widget,
- GdkDragContext *context,
- guint time,
- EDayView *day_view)
+e_day_view_on_top_canvas_drag_leave (GtkWidget *widget,
+ GdkDragContext *context,
+ guint time,
+ EDayView *day_view)
{
day_view->drag_last_day = -1;
@@ -7672,10 +7726,10 @@ e_day_view_on_top_canvas_drag_leave (GtkWidget *widget,
}
static void
-e_day_view_on_main_canvas_drag_leave (GtkWidget *widget,
- GdkDragContext *context,
- guint time,
- EDayView *day_view)
+e_day_view_on_main_canvas_drag_leave (GtkWidget *widget,
+ GdkDragContext *context,
+ guint time,
+ EDayView *day_view)
{
day_view->drag_last_day = -1;
@@ -7692,9 +7746,9 @@ e_day_view_on_main_canvas_drag_leave (GtkWidget *widget,
}
static void
-e_day_view_on_drag_begin (GtkWidget *widget,
- GdkDragContext *context,
- EDayView *day_view)
+e_day_view_on_drag_begin (GtkWidget *widget,
+ GdkDragContext *context,
+ EDayView *day_view)
{
EDayViewEvent *event;
gint day, event_num;
@@ -7721,14 +7775,14 @@ e_day_view_on_drag_begin (GtkWidget *widget,
}
/* Hide the text item, since it will be shown in the special drag
- items. */
+ * items. */
gnome_canvas_item_hide (event->canvas_item);
}
static void
-e_day_view_on_drag_end (GtkWidget *widget,
- GdkDragContext *context,
- EDayView *day_view)
+e_day_view_on_drag_end (GtkWidget *widget,
+ GdkDragContext *context,
+ EDayView *day_view)
{
EDayViewEvent *event;
gint day, event_num;
@@ -7737,7 +7791,7 @@ e_day_view_on_drag_end (GtkWidget *widget,
event_num = day_view->drag_event_num;
/* If the calendar has already been updated in drag_data_received()
- we just return. */
+ * we just return. */
if (day == -1 || event_num == -1)
return;
@@ -7765,12 +7819,12 @@ e_day_view_on_drag_end (GtkWidget *widget,
}
static void
-e_day_view_on_drag_data_get (GtkWidget *widget,
- GdkDragContext *context,
- GtkSelectionData *selection_data,
- guint info,
- guint time,
- EDayView *day_view)
+e_day_view_on_drag_data_get (GtkWidget *widget,
+ GdkDragContext *context,
+ GtkSelectionData *selection_data,
+ guint info,
+ guint time,
+ EDayView *day_view)
{
EDayViewEvent *event;
icalcomponent *vcal;
@@ -7831,16 +7885,16 @@ e_day_view_on_drag_data_get (GtkWidget *widget,
}
static void
-e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
- GdkDragContext *context,
- gint x,
- gint y,
- GtkSelectionData *selection_data,
- guint info,
- guint time,
- EDayView *day_view)
-{
- EDayViewEvent *event=NULL;
+e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ GtkSelectionData *selection_data,
+ guint info,
+ guint time,
+ EDayView *day_view)
+{
+ EDayViewEvent *event = NULL;
ECalendarViewPosition pos;
gint day, start_day, end_day, num_days;
gint start_offset, end_offset;
@@ -7923,9 +7977,9 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
client = event->comp_data->client;
/* We clone the event since we don't want to change
- the original comp here.
- Otherwise we would not detect that the event's time
- had changed in the "update_event" callback. */
+ * the original comp here.
+ * Otherwise we would not detect that the event's time
+ * had changed in the "update_event" callback. */
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
@@ -7950,7 +8004,7 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
date.tzid = NULL;
} else {
/* FIXME: Should probably keep the timezone of
- the original start and end times. */
+ * the original start and end times. */
date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
}
cal_comp_set_dtstart_with_oldzone (client, comp, &date);
@@ -7966,7 +8020,7 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
date.tzid = NULL;
} else {
/* FIXME: Should probably keep the timezone of
- the original start and end times. */
+ * the original start and end times. */
date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (day_view)));
}
cal_comp_set_dtend_with_oldzone (client, comp, &date);
@@ -7977,7 +8031,7 @@ e_day_view_on_top_canvas_drag_data_received (GtkWidget *widget,
day_view->drag_event_day = -1;
/* Show the text item again, just in case it hasn't
- moved. If we don't do this it may not appear. */
+ * moved. If we don't do this it may not appear. */
if (event->canvas_item)
gnome_canvas_item_show (event->canvas_item);
@@ -8075,14 +8129,14 @@ error:
}
static void
-e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
- GdkDragContext *context,
- gint x,
- gint y,
- GtkSelectionData *selection_data,
- guint info,
- guint time,
- EDayView *day_view)
+e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
+ GdkDragContext *context,
+ gint x,
+ gint y,
+ GtkSelectionData *selection_data,
+ guint info,
+ guint time,
+ EDayView *day_view)
{
ECalendarView *cal_view;
EDayViewEvent *event = NULL;
@@ -8174,9 +8228,9 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
client = event->comp_data->client;
/* We use a temporary shallow copy of comp since we
- don't want to change the original comp here.
- Otherwise we would not detect that the event's time
- had changed in the "update_event" callback. */
+ * don't want to change the original comp here.
+ * Otherwise we would not detect that the event's time
+ * had changed in the "update_event" callback. */
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
@@ -8204,7 +8258,7 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
day_view->drag_event_day = -1;
/* Show the text item again, just in case it hasn't
- moved. If we don't do this it may not appear. */
+ * moved. If we don't do this it may not appear. */
if (event->canvas_item)
gnome_canvas_item_show (event->canvas_item);
@@ -8302,20 +8356,20 @@ error:
}
/* Converts an hour from 0-23 to the preferred time format, and returns the
- suffix to add and the width of it in the normal font. */
+ * suffix to add and the width of it in the normal font. */
void
-e_day_view_convert_time_to_display (EDayView *day_view,
- gint hour,
- gint *display_hour,
- const gchar **suffix,
- gint *suffix_width)
+e_day_view_convert_time_to_display (EDayView *day_view,
+ gint hour,
+ gint *display_hour,
+ const gchar **suffix,
+ gint *suffix_width)
{
ECalModel *model;
model = e_calendar_view_get_model (E_CALENDAR_VIEW (day_view));
/* Calculate the actual hour number to display. For 12-hour
- format we convert 0-23 to 12-11am/12-11pm. */
+ * format we convert 0-23 to 12-11am/12-11pm. */
*display_hour = hour;
if (e_cal_model_get_use_24_hour_format (model)) {
*suffix = "";
@@ -8337,7 +8391,7 @@ e_day_view_convert_time_to_display (EDayView *day_view,
}
gint
-e_day_view_get_time_string_width (EDayView *day_view)
+e_day_view_get_time_string_width (EDayView *day_view)
{
ECalModel *model;
gint time_width;
diff --git a/calendar/gui/e-day-view.h b/calendar/gui/e-day-view.h
index ae1cf79d56..9f43a1ad78 100644
--- a/calendar/gui/e-day-view.h
+++ b/calendar/gui/e-day-view.h
@@ -38,31 +38,31 @@ G_BEGIN_DECLS
*/
/* The maximum number of days shown. We use the week view for anything more
- than about 9 days. */
+ * than about 9 days. */
#define E_DAY_VIEW_MAX_DAYS 10
/* This is used as a special code to signify a long event instead of the day
- of a normal event. */
+ * of a normal event. */
#define E_DAY_VIEW_LONG_EVENT E_DAY_VIEW_MAX_DAYS
/* The maximum number of columns of appointments within a day in multi-day
- view. */
+ * view. */
#define E_DAY_VIEW_MULTI_DAY_MAX_COLUMNS 6
/* minimum width of the event in one-day view in pixels */
#define E_DAY_VIEW_MIN_DAY_COL_WIDTH 60
/* The width of the gap between appointments. This should be at least
- E_DAY_VIEW_BAR_WIDTH, since in the top canvas we use this space to draw
- the triangle to represent continuing events. */
+ * E_DAY_VIEW_BAR_WIDTH, since in the top canvas we use this space to draw
+ * the triangle to represent continuing events. */
#define E_DAY_VIEW_GAP_WIDTH 7
/* The width of the bars down the left of each column and appointment.
- This includes the borders on each side of it. */
+ * This includes the borders on each side of it. */
#define E_DAY_VIEW_BAR_WIDTH 7
/* The height of the horizontal bar above & beneath the selected event.
- This includes the borders on the top and bottom. */
+ * This includes the borders on the top and bottom. */
#define E_DAY_VIEW_BAR_HEIGHT 6
/* The size of the reminder & recurrence icons, and padding around them. */
@@ -97,8 +97,8 @@ G_BEGIN_DECLS
#define E_DAY_VIEW_TOP_CANVAS_Y_GAP 2
/* These are used to get/set the working days in the week. The bit-flags are
- combined together. The bits must be from 0 (Sun) to 6 (Sat) to match the
- day values used by localtime etc. */
+ * combined together. The bits must be from 0 (Sun) to 6 (Sat) to match the
+ * day values used by localtime etc. */
typedef enum
{
E_DAY_VIEW_SUNDAY = 1 << 0,
@@ -111,7 +111,7 @@ typedef enum
} EDayViewDays;
/* These are used to specify the type of an appointment. They match those
- used in EMeetingTimeSelector. */
+ * used in EMeetingTimeSelector. */
typedef enum
{
E_DAY_VIEW_BUSY_TENTATIVE = 0,
@@ -122,10 +122,10 @@ typedef enum
} EDayViewBusyType;
/* This is used to specify the format used when displaying the dates.
- The full format is like 'Thursday 12 September'. The abbreviated format is
- like 'Thu 12 Sep'. The no weekday format is like '12 Sep'. The short format
- is like '12'. The actual format used is determined in
- e_day_view_recalc_cell_sizes (), once we know the font being used. */
+ * The full format is like 'Thursday 12 September'. The abbreviated format is
+ * like 'Thu 12 Sep'. The no weekday format is like '12 Sep'. The short format
+ * is like '12'. The actual format used is determined in
+ * e_day_view_recalc_cell_sizes (), once we know the font being used. */
typedef enum
{
E_DAY_VIEW_DATE_FULL,
@@ -172,14 +172,14 @@ struct _EDayViewEvent {
E_CALENDAR_VIEW_EVENT_FIELDS
/* For events in the main canvas, this contains the start column.
- For long events in the top canvas, this is its row. */
+ * For long events in the top canvas, this is its row. */
guint8 start_row_or_col;
/* For events in the main canvas, this is the number of columns that
- it covers. For long events this is set to 1 if the event is shown.
- For both types of events this is set to 0 if the event is not shown,
- i.e. it couldn't fit into the display. Currently long events are
- always shown as we just increase the height of the top canvas. */
+ * it covers. For long events this is set to 1 if the event is shown.
+ * For both types of events this is set to 0 if the event is not shown,
+ * i.e. it couldn't fit into the display. Currently long events are
+ * always shown as we just increase the height of the top canvas. */
guint8 num_columns;
};
@@ -243,8 +243,8 @@ struct _EDayView {
gboolean work_week_view;
/* The number of days we are showing. Usually 1 or 5, but can be up
- to E_DAY_VIEW_MAX_DAYS, e.g. when the user selects a range of
- days in the date navigator. */
+ * to E_DAY_VIEW_MAX_DAYS, e.g. when the user selects a range of
+ * days in the date navigator. */
gint days_shown;
/* The start of each day & an extra element to hold the last time. */
@@ -255,8 +255,8 @@ struct _EDayView {
GArray *events[E_DAY_VIEW_MAX_DAYS];
/* These are set to FALSE whenever an event in the corresponding array
- is changed. Any function that needs the events sorted calls
- e_day_view_ensure_events_sorted (). */
+ * is changed. Any function that needs the events sorted calls
+ * e_day_view_ensure_events_sorted (). */
gboolean long_events_sorted;
gboolean events_sorted[E_DAY_VIEW_MAX_DAYS];
@@ -265,7 +265,7 @@ struct _EDayView {
gboolean need_layout[E_DAY_VIEW_MAX_DAYS];
/* This is TRUE if we need to reshape the canvas items, but a full
- layout is not necessary. */
+ * layout is not necessary. */
gboolean long_events_need_reshape;
gboolean need_reshape[E_DAY_VIEW_MAX_DAYS];
@@ -273,7 +273,7 @@ struct _EDayView {
gint layout_timeout_id;
/* The number of rows needed, depending on the times shown and the
- minutes per row. */
+ * minutes per row. */
gint rows;
/* The height of each row. */
@@ -286,7 +286,7 @@ struct _EDayView {
gint top_row_height;
/* The first and last times shown in the display. The last time isn't
- included in the range. Default is 0:00-24:00 */
+ * included in the range. Default is 0:00-24:00 */
gint first_hour_shown;
gint first_minute_shown;
gint last_hour_shown;
@@ -304,17 +304,17 @@ struct _EDayView {
gboolean show_event_end_times;
/* This is set to TRUE when the widget is created, so it scrolls to
- the start of the working day when first shown. */
+ * the start of the working day when first shown. */
gboolean scroll_to_work_day;
/* This is the width & offset of each of the day columns in the
- display. */
+ * display. */
gint day_widths[E_DAY_VIEW_MAX_DAYS];
gint day_offsets[E_DAY_VIEW_MAX_DAYS + 1];
/* An array holding the number of columns in each row, in each day.
- Note that there are a maximum of 12 * 24 rows (when a row is 5 mins)
- but we don't always have that many rows. */
+ * Note that there are a maximum of 12 * 24 rows (when a row is 5 mins)
+ * but we don't always have that many rows. */
guint8 cols_per_row[E_DAY_VIEW_MAX_DAYS][12 * 24];
/* The maximum number of columns from all rows in cols_per_row */
gint max_cols;
@@ -330,14 +330,14 @@ struct _EDayView {
EDayViewDateFormat date_format;
/* These are the longest month & weekday names in the current font.
- Months are 0 to 11. Weekdays are 0 (Sun) to 6 (Sat). */
+ * Months are 0 to 11. Weekdays are 0 (Sun) to 6 (Sat). */
gint longest_month_name;
gint longest_abbreviated_month_name;
gint longest_weekday_name;
gint longest_abbreviated_weekday_name;
/* The large font used to display the hours. I don't think we need a
- fontset since we only display numbers. */
+ * fontset since we only display numbers. */
PangoFontDescription *large_font_desc;
PangoFontDescription *small_font_desc;
@@ -375,7 +375,7 @@ struct _EDayView {
gint editing_event_num;
/* This is a GnomeCanvasRect which is placed around an item while it
- is being resized, so we can raise it above all other EText items. */
+ * is being resized, so we can raise it above all other EText items. */
GnomeCanvasItem *resize_long_event_rect_item;
GnomeCanvasItem *resize_rect_item;
GnomeCanvasItem *resize_bar_item;
@@ -385,26 +385,26 @@ struct _EDayView {
gint popup_event_num;
/* The currently selected region. If selection_start_day is -1 there is
- no current selection. If start_row or end_row is -1 then the
- selection is in the top canvas. */
+ * no current selection. If start_row or end_row is -1 then the
+ * selection is in the top canvas. */
gint selection_start_day;
gint selection_end_day;
gint selection_start_row;
gint selection_end_row;
/* This is TRUE if the selection is currently being dragged using the
- mouse. */
+ * mouse. */
gboolean selection_is_being_dragged;
/* This specifies which end of the selection is being dragged. */
EDayViewDragPosition selection_drag_pos;
/* This is TRUE if the selection is in the top canvas only (i.e. if the
- last motion event was in the top canvas). */
+ * last motion event was in the top canvas). */
gboolean selection_in_top_canvas;
/* The last mouse position, relative to the main canvas window.
- Used when auto-scrolling to update the selection. */
+ * Used when auto-scrolling to update the selection. */
gint last_mouse_x;
gint last_mouse_y;
@@ -428,13 +428,13 @@ struct _EDayView {
gchar *last_edited_comp_string;
/* This is the event the mouse button was pressed on. If the button
- is released we start editing it, but if the mouse is dragged we set
- this to -1. */
+ * is released we start editing it, but if the mouse is dragged we set
+ * this to -1. */
gint pressed_event_day;
gint pressed_event_num;
/* These are used when dragging events. If drag_event_day is not -1 we
- know that we are dragging one of the EDayView events around. */
+ * know that we are dragging one of the EDayView events around. */
gint drag_event_day;
gint drag_event_num;
@@ -443,16 +443,16 @@ struct _EDayView {
gint drag_event_y;
/* The offset of the mouse from the top of the event, in rows.
- In the top canvas this is the offset from the left, in days. */
+ * In the top canvas this is the offset from the left, in days. */
gint drag_event_offset;
/* The last day & row dragged to, so we know when we need to update
- the dragged event's position. */
+ * the dragged event's position. */
gint drag_last_day;
gint drag_last_row;
/* This is a GnomeCanvasRect which is placed around an item while it
- is being resized, so we can raise it above all other EText items. */
+ * is being resized, so we can raise it above all other EText items. */
GnomeCanvasItem *drag_long_event_rect_item;
GnomeCanvasItem *drag_long_event_item;
GnomeCanvasItem *drag_rect_item;
@@ -466,7 +466,7 @@ struct _EDayView {
gint pm_string_width;
/* remember last selected interval when click and restore on double click,
- if we double clicked inside that interval. */
+ * if we double clicked inside that interval. */
guint32 bc_event_time;
time_t before_click_dtstart;
time_t before_click_dtend;
@@ -483,25 +483,25 @@ GType e_day_view_get_type (void);
ECalendarView * e_day_view_new (ECalModel *model);
/* Whether we are displaying a work-week, in which case the display always
- starts on the first day of the working week. */
+ * starts on the first day of the working week. */
gboolean e_day_view_get_work_week_view (EDayView *day_view);
void e_day_view_set_work_week_view (EDayView *day_view,
gboolean work_week_view);
/* The number of days shown in the EDayView, from 1 to 7. This is normally
- either 1 or 5 (for the Work-Week view). */
+ * either 1 or 5 (for the Work-Week view). */
gint e_day_view_get_days_shown (EDayView *day_view);
void e_day_view_set_days_shown (EDayView *day_view,
gint days_shown);
/* This specifies the working days in the week. The value is a bitwise
- combination of day flags. Defaults to Mon-Fri. */
+ * combination of day flags. Defaults to Mon-Fri. */
EDayViewDays e_day_view_get_working_days (EDayView *day_view);
void e_day_view_set_working_days (EDayView *day_view,
EDayViewDays days);
/* Whether we display the Marcus Bains Line in the main canvas and time
- canvas. */
+ * canvas. */
void e_day_view_marcus_bains_update (EDayView *day_view);
gboolean e_day_view_marcus_bains_get_show_line (EDayView *day_view);
void e_day_view_marcus_bains_set_show_line (EDayView *day_view,
diff --git a/calendar/gui/e-meeting-attendee.c b/calendar/gui/e-meeting-attendee.c
index 5b101a5d61..e783195ec1 100644
--- a/calendar/gui/e-meeting-attendee.c
+++ b/calendar/gui/e-meeting-attendee.c
@@ -250,7 +250,8 @@ e_meeting_attendee_get_fburi (EMeetingAttendee *ia)
}
void
-e_meeting_attendee_set_fburi (EMeetingAttendee *ia, gchar *fburi)
+e_meeting_attendee_set_fburi (EMeetingAttendee *ia,
+ gchar *fburi)
{
EMeetingAttendeePrivate *priv;
@@ -275,7 +276,8 @@ e_meeting_attendee_get_address (EMeetingAttendee *ia)
}
void
-e_meeting_attendee_set_address (EMeetingAttendee *ia, gchar *address)
+e_meeting_attendee_set_address (EMeetingAttendee *ia,
+ gchar *address)
{
EMeetingAttendeePrivate *priv;
@@ -310,7 +312,8 @@ e_meeting_attendee_get_member (EMeetingAttendee *ia)
}
void
-e_meeting_attendee_set_member (EMeetingAttendee *ia, gchar *member)
+e_meeting_attendee_set_member (EMeetingAttendee *ia,
+ gchar *member)
{
EMeetingAttendeePrivate *priv;
@@ -345,7 +348,8 @@ e_meeting_attendee_get_cutype (EMeetingAttendee *ia)
}
void
-e_meeting_attendee_set_cutype (EMeetingAttendee *ia, icalparameter_cutype cutype)
+e_meeting_attendee_set_cutype (EMeetingAttendee *ia,
+ icalparameter_cutype cutype)
{
EMeetingAttendeePrivate *priv;
@@ -367,7 +371,8 @@ e_meeting_attendee_get_role (EMeetingAttendee *ia)
}
void
-e_meeting_attendee_set_role (EMeetingAttendee *ia, icalparameter_role role)
+e_meeting_attendee_set_role (EMeetingAttendee *ia,
+ icalparameter_role role)
{
EMeetingAttendeePrivate *priv;
@@ -389,7 +394,8 @@ e_meeting_attendee_get_rsvp (EMeetingAttendee *ia)
}
void
-e_meeting_attendee_set_rsvp (EMeetingAttendee *ia, gboolean rsvp)
+e_meeting_attendee_set_rsvp (EMeetingAttendee *ia,
+ gboolean rsvp)
{
EMeetingAttendeePrivate *priv;
@@ -411,7 +417,8 @@ e_meeting_attendee_get_delto (EMeetingAttendee *ia)
}
void
-e_meeting_attendee_set_delto (EMeetingAttendee *ia, gchar *delto)
+e_meeting_attendee_set_delto (EMeetingAttendee *ia,
+ gchar *delto)
{
EMeetingAttendeePrivate *priv;
@@ -446,7 +453,8 @@ e_meeting_attendee_get_delfrom (EMeetingAttendee *ia)
}
void
-e_meeting_attendee_set_delfrom (EMeetingAttendee *ia, gchar *delfrom)
+e_meeting_attendee_set_delfrom (EMeetingAttendee *ia,
+ gchar *delfrom)
{
EMeetingAttendeePrivate *priv;
@@ -481,7 +489,8 @@ e_meeting_attendee_get_status (EMeetingAttendee *ia)
}
void
-e_meeting_attendee_set_status (EMeetingAttendee *ia, icalparameter_partstat status)
+e_meeting_attendee_set_status (EMeetingAttendee *ia,
+ icalparameter_partstat status)
{
EMeetingAttendeePrivate *priv;
@@ -503,7 +512,8 @@ e_meeting_attendee_get_sentby (EMeetingAttendee *ia)
}
void
-e_meeting_attendee_set_sentby (EMeetingAttendee *ia, gchar *sentby)
+e_meeting_attendee_set_sentby (EMeetingAttendee *ia,
+ gchar *sentby)
{
EMeetingAttendeePrivate *priv;
@@ -538,7 +548,8 @@ e_meeting_attendee_get_cn (EMeetingAttendee *ia)
}
void
-e_meeting_attendee_set_cn (EMeetingAttendee *ia, gchar *cn)
+e_meeting_attendee_set_cn (EMeetingAttendee *ia,
+ gchar *cn)
{
EMeetingAttendeePrivate *priv;
@@ -573,7 +584,8 @@ e_meeting_attendee_get_language (EMeetingAttendee *ia)
}
void
-e_meeting_attendee_set_language (EMeetingAttendee *ia, gchar *language)
+e_meeting_attendee_set_language (EMeetingAttendee *ia,
+ gchar *language)
{
EMeetingAttendeePrivate *priv;
@@ -644,7 +656,7 @@ e_meeting_attendee_set_edit_level (EMeetingAttendee *ia,
static gint
compare_times (EMeetingTime *time1,
- EMeetingTime *time2)
+ EMeetingTime *time2)
{
gint day_comparison;
@@ -669,7 +681,7 @@ compare_times (EMeetingTime *time1,
static gint
compare_period_starts (gconstpointer arg1,
- gconstpointer arg2)
+ gconstpointer arg2)
{
EMeetingFreeBusyPeriod *period1, *period2;
@@ -730,7 +742,8 @@ e_meeting_attendee_get_busy_periods (EMeetingAttendee *ia)
}
gint
-e_meeting_attendee_find_first_busy_period (EMeetingAttendee *ia, GDate *date)
+e_meeting_attendee_find_first_busy_period (EMeetingAttendee *ia,
+ GDate *date)
{
EMeetingAttendeePrivate *priv;
EMeetingFreeBusyPeriod *period;
@@ -743,7 +756,7 @@ e_meeting_attendee_find_first_busy_period (EMeetingAttendee *ia, GDate *date)
ensure_periods_sorted (ia);
/* Calculate the first day which could have a busy period which
- continues onto our given date. */
+ * continues onto our given date. */
tmp_date = *date;
g_date_subtract_days (&tmp_date, priv->longest_period_in_days);
@@ -771,7 +784,7 @@ e_meeting_attendee_find_first_busy_period (EMeetingAttendee *ia, GDate *date)
}
/* There may be several busy periods on the same day so we step
- backwards to the first one. */
+ * backwards to the first one. */
if (cmp == 0) {
while (middle > 0) {
period = &g_array_index (priv->busy_periods,
@@ -782,8 +795,8 @@ e_meeting_attendee_find_first_busy_period (EMeetingAttendee *ia, GDate *date)
}
} else if (cmp > 0) {
/* This means we couldn't find a period on the given day, and
- the last one we looked at was before it, so if there are
- any more periods after this one we return it. */
+ * the last one we looked at was before it, so if there are
+ * any more periods after this one we return it. */
middle++;
if (priv->busy_periods->len <= middle)
return -1;
@@ -794,17 +807,17 @@ e_meeting_attendee_find_first_busy_period (EMeetingAttendee *ia, GDate *date)
gboolean
e_meeting_attendee_add_busy_period (EMeetingAttendee *ia,
- gint start_year,
- gint start_month,
- gint start_day,
- gint start_hour,
- gint start_minute,
- gint end_year,
- gint end_month,
- gint end_day,
- gint end_hour,
- gint end_minute,
- EMeetingFreeBusyType busy_type)
+ gint start_year,
+ gint start_month,
+ gint start_day,
+ gint start_hour,
+ gint start_minute,
+ gint end_year,
+ gint end_month,
+ gint end_day,
+ gint end_hour,
+ gint end_minute,
+ EMeetingFreeBusyType busy_type)
{
EMeetingAttendeePrivate *priv;
EMeetingFreeBusyPeriod period;
@@ -944,11 +957,11 @@ e_meeting_attendee_get_end_busy_range (EMeetingAttendee *ia)
gboolean
e_meeting_attendee_set_start_busy_range (EMeetingAttendee *ia,
- gint start_year,
- gint start_month,
- gint start_day,
- gint start_hour,
- gint start_minute)
+ gint start_year,
+ gint start_month,
+ gint start_day,
+ gint start_hour,
+ gint start_minute)
{
EMeetingAttendeePrivate *priv;
@@ -977,11 +990,11 @@ e_meeting_attendee_set_start_busy_range (EMeetingAttendee *ia,
gboolean
e_meeting_attendee_set_end_busy_range (EMeetingAttendee *ia,
- gint end_year,
- gint end_month,
- gint end_day,
- gint end_hour,
- gint end_minute)
+ gint end_year,
+ gint end_month,
+ gint end_day,
+ gint end_hour,
+ gint end_minute)
{
EMeetingAttendeePrivate *priv;
diff --git a/calendar/gui/e-meeting-attendee.h b/calendar/gui/e-meeting-attendee.h
index 145e28c59b..bc2eaa046b 100644
--- a/calendar/gui/e-meeting-attendee.h
+++ b/calendar/gui/e-meeting-attendee.h
@@ -42,9 +42,9 @@ typedef struct _EMeetingAttendeePrivate EMeetingAttendeePrivate;
typedef struct _EMeetingAttendeeClass EMeetingAttendeeClass;
/* These specify the type of attendee. Either a person or a resource (e.g. a
- meeting room). These are used for the Autopick options, where the user can
- ask for a time when, for example, all people and one resource are free.
- The default is E_MEETING_ATTENDEE_REQUIRED_PERSON. */
+ * meeting room). These are used for the Autopick options, where the user can
+ * ask for a time when, for example, all people and one resource are free.
+ * The default is E_MEETING_ATTENDEE_REQUIRED_PERSON. */
typedef enum
{
E_MEETING_ATTENDEE_REQUIRED_PERSON,
diff --git a/calendar/gui/e-meeting-list-view.c b/calendar/gui/e-meeting-list-view.c
index 5283b5e385..c27697b40f 100644
--- a/calendar/gui/e-meeting-list-view.c
+++ b/calendar/gui/e-meeting-list-view.c
@@ -119,7 +119,8 @@ e_meeting_list_view_class_init (EMeetingListViewClass *klass)
}
static void
-add_section (ENameSelector *name_selector, const gchar *name)
+add_section (ENameSelector *name_selector,
+ const gchar *name)
{
ENameSelectorModel *name_selector_model;
@@ -219,7 +220,10 @@ get_status_strings (void)
}
static void
-value_edited (GtkTreeView *view, gint col, const gchar *path, const gchar *text)
+value_edited (GtkTreeView *view,
+ gint col,
+ const gchar *path,
+ const gchar *text)
{
EMeetingStore *model = E_MEETING_STORE (gtk_tree_view_get_model (view));
GtkTreePath *treepath = gtk_tree_path_new_from_string (path);
@@ -247,7 +251,8 @@ get_index_from_role (icalparameter_role role)
}
void
-e_meeting_list_view_add_attendee_to_name_selector (EMeetingListView *view, EMeetingAttendee *ma)
+e_meeting_list_view_add_attendee_to_name_selector (EMeetingListView *view,
+ EMeetingAttendee *ma)
{
EDestinationStore *destination_store;
ENameSelectorModel *name_selector_model;
@@ -269,7 +274,8 @@ e_meeting_list_view_add_attendee_to_name_selector (EMeetingListView *view, EMeet
}
void
-e_meeting_list_view_remove_attendee_from_name_selector (EMeetingListView *view, EMeetingAttendee *ma)
+e_meeting_list_view_remove_attendee_from_name_selector (EMeetingListView *view,
+ EMeetingAttendee *ma)
{
GList *destinations, *l;
EDestinationStore *destination_store;
@@ -359,7 +365,11 @@ e_meeting_list_view_remove_all_attendees_from_name_selector (EMeetingListView *v
}
static void
-attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, GList *addresses, GList *names, GtkTreeView *view)
+attendee_edited_cb (GtkCellRenderer *renderer,
+ const gchar *path,
+ GList *addresses,
+ GList *names,
+ GtkTreeView *view)
{
EMeetingStore *model = E_MEETING_STORE (gtk_tree_view_get_model (view));
GtkTreePath *treepath = gtk_tree_path_new_from_string (path);
@@ -458,7 +468,8 @@ attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, GList *address
}
static void
-attendee_editing_canceled_cb (GtkCellRenderer *renderer, GtkTreeView *view)
+attendee_editing_canceled_cb (GtkCellRenderer *renderer,
+ GtkTreeView *view)
{
EMeetingStore *model = E_MEETING_STORE (gtk_tree_view_get_model (view));
GtkTreePath *path;
@@ -481,13 +492,19 @@ attendee_editing_canceled_cb (GtkCellRenderer *renderer, GtkTreeView *view)
}
static void
-type_edited_cb (GtkCellRenderer *renderer, const gchar *path, const gchar *text, GtkTreeView *view)
+type_edited_cb (GtkCellRenderer *renderer,
+ const gchar *path,
+ const gchar *text,
+ GtkTreeView *view)
{
value_edited (view, E_MEETING_STORE_TYPE_COL, path, text);
}
static void
-role_edited_cb (GtkCellRenderer *renderer, const gchar *path, const gchar *text, GtkTreeView *view)
+role_edited_cb (GtkCellRenderer *renderer,
+ const gchar *path,
+ const gchar *text,
+ GtkTreeView *view)
{
/* This is a little more complex than the other callbacks because
* we also need to update the "Required Participants" dialog. */
@@ -506,28 +523,36 @@ role_edited_cb (GtkCellRenderer *renderer, const gchar *path, const gchar *text,
}
static void
-rsvp_edited_cb (GtkCellRenderer *renderer, const gchar *path, const gchar *text, GtkTreeView *view)
+rsvp_edited_cb (GtkCellRenderer *renderer,
+ const gchar *path,
+ const gchar *text,
+ GtkTreeView *view)
{
value_edited (view, E_MEETING_STORE_RSVP_COL, path, text);
}
static void
-status_edited_cb (GtkCellRenderer *renderer, const gchar *path, const gchar *text, GtkTreeView *view)
+status_edited_cb (GtkCellRenderer *renderer,
+ const gchar *path,
+ const gchar *text,
+ GtkTreeView *view)
{
value_edited (view, E_MEETING_STORE_STATUS_COL, path, text);
}
static void
-ense_update (GtkWidget *w, gpointer data1, gpointer user_data)
+ense_update (GtkWidget *w,
+ gpointer data1,
+ gpointer user_data)
{
gtk_cell_editable_editing_done ((GtkCellEditable *) w);
}
static void
editing_started_cb (GtkCellRenderer *renderer,
- GtkCellEditable *editable,
- gchar *path,
- gpointer user_data)
+ GtkCellEditable *editable,
+ gchar *path,
+ gpointer user_data)
{
g_signal_connect (editable, "updated", G_CALLBACK(ense_update), NULL);
}
@@ -548,7 +573,7 @@ build_table (EMeetingListView *lview)
gtk_tree_view_set_rules_hint (view, TRUE);
renderer = e_select_names_renderer_new ();
- g_object_set (G_OBJECT (renderer), "editable", TRUE, NULL);
+ g_object_set (renderer, "editable", TRUE, NULL);
/* The extra space is just a hack to occupy more space for Attendee */
pos = gtk_tree_view_insert_column_with_attributes (view, -1, _("Attendee "), renderer,
"text", E_MEETING_STORE_ATTENDEE_COL,
@@ -621,82 +646,95 @@ build_table (EMeetingListView *lview)
}
static void
-change_edit_cols_for_user (gpointer key, gpointer value, gpointer user_data)
-{
- GtkCellRenderer *renderer = (GtkCellRenderer *) value;
- gint key_val = GPOINTER_TO_INT (key);
- switch (key_val)
- {
- case E_MEETING_STORE_ATTENDEE_COL:
- g_object_set (G_OBJECT (renderer), "editable", FALSE, NULL);
- break;
- case E_MEETING_STORE_ROLE_COL:
- g_object_set (G_OBJECT (renderer), "editable", FALSE, NULL);
- break;
- case E_MEETING_STORE_TYPE_COL:
- g_object_set (G_OBJECT (renderer), "editable", FALSE, NULL);
- break;
- case E_MEETING_STORE_RSVP_COL:
- g_object_set (G_OBJECT (renderer), "editable", TRUE, NULL);
- break;
- case E_MEETING_STORE_STATUS_COL:
- g_object_set (G_OBJECT (renderer), "editable", TRUE, NULL);
- break;
- }
+change_edit_cols_for_user (gpointer key,
+ gpointer value,
+ gpointer user_data)
+{
+ GtkCellRenderer *renderer = (GtkCellRenderer *) value;
+ gint key_val = GPOINTER_TO_INT (key);
+
+ switch (key_val) {
+ case E_MEETING_STORE_ATTENDEE_COL:
+ g_object_set (renderer, "editable", FALSE, NULL);
+ break;
+ case E_MEETING_STORE_ROLE_COL:
+ g_object_set (renderer, "editable", FALSE, NULL);
+ break;
+ case E_MEETING_STORE_TYPE_COL:
+ g_object_set (renderer, "editable", FALSE, NULL);
+ break;
+ case E_MEETING_STORE_RSVP_COL:
+ g_object_set (renderer, "editable", TRUE, NULL);
+ break;
+ case E_MEETING_STORE_STATUS_COL:
+ g_object_set (renderer, "editable", TRUE, NULL);
+ break;
+ }
}
static void
-change_edit_cols_for_organizer (gpointer key, gpointer value, gpointer user_data)
+change_edit_cols_for_organizer (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
- GtkCellRenderer *renderer = (GtkCellRenderer *) value;
- guint edit_level = GPOINTER_TO_INT (user_data);
- g_object_set (G_OBJECT (renderer), "editable", GINT_TO_POINTER (edit_level), NULL);
+ GtkCellRenderer *renderer = (GtkCellRenderer *) value;
+ guint edit_level = GPOINTER_TO_INT (user_data);
+
+ g_object_set (renderer, "editable", GINT_TO_POINTER (edit_level), NULL);
}
static void
-row_activated_cb (GtkTreeSelection *selection, EMeetingListView *view)
-{
- EMeetingAttendee *existing_attendee;
- EMeetingListViewPrivate *priv;
- gint row;
- EMeetingAttendeeEditLevel el;
- gint edit_level;
- GtkTreeModel *model;
- GtkTreePath *path = NULL;
- GList *paths=NULL;
-
- priv = view->priv;
-
- if (!(paths = gtk_tree_selection_get_selected_rows (selection, &model)))
- return;
- if (g_list_length (paths) > 1)
- return;
- path = g_list_nth_data (paths, 0);
- if (!path)
- return;
-
- row = gtk_tree_path_get_indices (path)[0];
- existing_attendee = e_meeting_store_find_attendee_at_row (priv->store, row);
- el = e_meeting_attendee_get_edit_level (existing_attendee);
-
- switch (el)
- {
- case E_MEETING_ATTENDEE_EDIT_NONE:
- edit_level = FALSE;
- g_hash_table_foreach (priv->renderers, change_edit_cols_for_organizer, GINT_TO_POINTER (edit_level));
- break;
-
- case E_MEETING_ATTENDEE_EDIT_FULL:
- edit_level = TRUE;
- g_hash_table_foreach (priv->renderers, change_edit_cols_for_organizer, GINT_TO_POINTER (edit_level));
- break;
-
- case E_MEETING_ATTENDEE_EDIT_STATUS:
- edit_level = FALSE;
- g_hash_table_foreach (priv->renderers, change_edit_cols_for_user, GINT_TO_POINTER (edit_level));
- break;
- }
+row_activated_cb (GtkTreeSelection *selection,
+ EMeetingListView *view)
+{
+ EMeetingAttendee *existing_attendee;
+ EMeetingListViewPrivate *priv;
+ gint row;
+ EMeetingAttendeeEditLevel el;
+ gint edit_level;
+ GtkTreeModel *model;
+ GtkTreePath *path = NULL;
+ GList *paths = NULL;
+ priv = view->priv;
+
+ if (!(paths = gtk_tree_selection_get_selected_rows (selection, &model)))
+ return;
+ if (g_list_length (paths) > 1)
+ return;
+ path = g_list_nth_data (paths, 0);
+ if (!path)
+ return;
+
+ row = gtk_tree_path_get_indices (path)[0];
+ existing_attendee = e_meeting_store_find_attendee_at_row (priv->store, row);
+ el = e_meeting_attendee_get_edit_level (existing_attendee);
+
+ switch (el) {
+ case E_MEETING_ATTENDEE_EDIT_NONE:
+ edit_level = FALSE;
+ g_hash_table_foreach (
+ priv->renderers,
+ change_edit_cols_for_organizer,
+ GINT_TO_POINTER (edit_level));
+ break;
+
+ case E_MEETING_ATTENDEE_EDIT_FULL:
+ edit_level = TRUE;
+ g_hash_table_foreach (
+ priv->renderers,
+ change_edit_cols_for_organizer,
+ GINT_TO_POINTER (edit_level));
+ break;
+
+ case E_MEETING_ATTENDEE_EDIT_STATUS:
+ edit_level = FALSE;
+ g_hash_table_foreach (
+ priv->renderers,
+ change_edit_cols_for_user,
+ GINT_TO_POINTER (edit_level));
+ break;
+ }
}
EMeetingListView *
@@ -717,7 +755,9 @@ e_meeting_list_view_new (EMeetingStore *store)
}
void
-e_meeting_list_view_column_set_visible (EMeetingListView *view, EMeetingStoreColumns column, gboolean visible)
+e_meeting_list_view_column_set_visible (EMeetingListView *view,
+ EMeetingStoreColumns column,
+ gboolean visible)
{
GList *cols, *l;
@@ -735,7 +775,8 @@ e_meeting_list_view_column_set_visible (EMeetingListView *view, EMeetingStoreCol
}
void
-e_meeting_list_view_edit (EMeetingListView *emlv, EMeetingAttendee *attendee)
+e_meeting_list_view_edit (EMeetingListView *emlv,
+ EMeetingAttendee *attendee)
{
EMeetingListViewPrivate *priv;
GtkTreePath *path;
@@ -758,7 +799,10 @@ e_meeting_list_view_edit (EMeetingListView *emlv, EMeetingAttendee *attendee)
}
static void
-process_section (EMeetingListView *view, GList *destinations, icalparameter_role role, GSList **la)
+process_section (EMeetingListView *view,
+ GList *destinations,
+ icalparameter_role role,
+ GSList **la)
{
EMeetingListViewPrivate *priv;
GList *l;
@@ -877,7 +921,8 @@ process_section (EMeetingListView *view, GList *destinations, icalparameter_role
}
static void
-add_to_list (gpointer data, gpointer u_data)
+add_to_list (gpointer data,
+ gpointer u_data)
{
GSList **user_data = u_data;
@@ -885,7 +930,9 @@ add_to_list (gpointer data, gpointer u_data)
}
static void
-name_selector_dialog_close_cb (ENameSelectorDialog *dialog, gint response, gpointer data)
+name_selector_dialog_close_cb (ENameSelectorDialog *dialog,
+ gint response,
+ gpointer data)
{
EMeetingListView *view = E_MEETING_LIST_VIEW (data);
ENameSelectorModel *name_selector_model;
@@ -945,7 +992,8 @@ e_meeting_list_view_invite_others_dialog (EMeetingListView *view)
}
void
-e_meeting_list_view_set_editable (EMeetingListView *lview, gboolean set)
+e_meeting_list_view_set_editable (EMeetingListView *lview,
+ gboolean set)
{
EMeetingListViewPrivate *priv = lview->priv;
@@ -968,7 +1016,8 @@ e_meeting_list_view_get_name_selector (EMeetingListView *lview)
}
void
-e_meeting_list_view_set_name_selector (EMeetingListView *lview, ENameSelector *name_selector)
+e_meeting_list_view_set_name_selector (EMeetingListView *lview,
+ ENameSelector *name_selector)
{
EMeetingListViewPrivate *priv;
diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c
index 5a9176a094..51ce798a8b 100644
--- a/calendar/gui/e-meeting-store.c
+++ b/calendar/gui/e-meeting-store.c
@@ -252,7 +252,8 @@ get_n_columns (GtkTreeModel *model)
}
static GType
-get_column_type (GtkTreeModel *model, gint col)
+get_column_type (GtkTreeModel *model,
+ gint col)
{
g_return_val_if_fail (E_IS_MEETING_STORE (model), G_TYPE_INVALID);
@@ -277,7 +278,9 @@ get_column_type (GtkTreeModel *model, gint col)
}
static gboolean
-get_iter (GtkTreeModel *model, GtkTreeIter *iter, GtkTreePath *path)
+get_iter (GtkTreeModel *model,
+ GtkTreeIter *iter,
+ GtkTreePath *path)
{
gint row;
@@ -296,7 +299,8 @@ get_iter (GtkTreeModel *model, GtkTreeIter *iter, GtkTreePath *path)
}
static GtkTreePath *
-get_path (GtkTreeModel *model, GtkTreeIter *iter)
+get_path (GtkTreeModel *model,
+ GtkTreeIter *iter)
{
gint row;
GtkTreePath *result;
@@ -314,7 +318,10 @@ get_path (GtkTreeModel *model, GtkTreeIter *iter)
}
static void
-get_value (GtkTreeModel *model, GtkTreeIter *iter, gint col, GValue *value)
+get_value (GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gint col,
+ GValue *value)
{
EMeetingStore *store;
EMeetingAttendee *attendee;
@@ -410,7 +417,8 @@ get_value (GtkTreeModel *model, GtkTreeIter *iter, gint col, GValue *value)
}
static gboolean
-iter_next (GtkTreeModel *model, GtkTreeIter *iter)
+iter_next (GtkTreeModel *model,
+ GtkTreeIter *iter)
{
gint row;
@@ -424,7 +432,9 @@ iter_next (GtkTreeModel *model, GtkTreeIter *iter)
}
static gboolean
-iter_children (GtkTreeModel *model, GtkTreeIter *iter, GtkTreeIter *parent)
+iter_children (GtkTreeModel *model,
+ GtkTreeIter *iter,
+ GtkTreeIter *parent)
{
EMeetingStore *store;
@@ -442,13 +452,15 @@ iter_children (GtkTreeModel *model, GtkTreeIter *iter, GtkTreeIter *parent)
}
static gboolean
-iter_has_child (GtkTreeModel *model, GtkTreeIter *iter)
+iter_has_child (GtkTreeModel *model,
+ GtkTreeIter *iter)
{
return FALSE;
}
static gint
-iter_n_children (GtkTreeModel *model, GtkTreeIter *iter)
+iter_n_children (GtkTreeModel *model,
+ GtkTreeIter *iter)
{
g_return_val_if_fail (E_IS_MEETING_STORE (model), -1);
@@ -461,7 +473,10 @@ iter_n_children (GtkTreeModel *model, GtkTreeIter *iter)
}
static gboolean
-iter_nth_child (GtkTreeModel *model, GtkTreeIter *iter, GtkTreeIter *parent, gint n)
+iter_nth_child (GtkTreeModel *model,
+ GtkTreeIter *iter,
+ GtkTreeIter *parent,
+ gint n)
{
EMeetingStore *store;
@@ -479,7 +494,9 @@ iter_nth_child (GtkTreeModel *model, GtkTreeIter *iter, GtkTreeIter *parent, gin
}
static gboolean
-iter_parent (GtkTreeModel *model, GtkTreeIter *iter, GtkTreeIter *child)
+iter_parent (GtkTreeModel *model,
+ GtkTreeIter *iter,
+ GtkTreeIter *child)
{
return FALSE;
}
@@ -502,7 +519,10 @@ ems_tree_model_init (GtkTreeModelIface *iface)
}
void
-e_meeting_store_set_value (EMeetingStore *store, gint row, gint col, const gchar *val)
+e_meeting_store_set_value (EMeetingStore *store,
+ gint row,
+ gint col,
+ const gchar *val)
{
icalparameter_cutype type;
EMeetingAttendee *attendee = g_ptr_array_index (store->priv->attendees, row);
@@ -555,7 +575,9 @@ struct FindAttendeeData
};
static void
-find_attendee_cb (gpointer key, gpointer value, gpointer user_data)
+find_attendee_cb (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
EMeetingStoreQueueData *qdata = value;
struct FindAttendeeData *fad = user_data;
@@ -568,7 +590,8 @@ find_attendee_cb (gpointer key, gpointer value, gpointer user_data)
}
static void
-refresh_queue_remove (EMeetingStore *store, EMeetingAttendee *attendee)
+refresh_queue_remove (EMeetingStore *store,
+ EMeetingAttendee *attendee)
{
EMeetingStorePrivate *priv;
EMeetingStoreQueueData *qdata;
@@ -964,7 +987,8 @@ e_meeting_store_set_week_start_day (EMeetingStore *store,
}
static void
-attendee_changed_cb (EMeetingAttendee *attendee, gpointer data)
+attendee_changed_cb (EMeetingAttendee *attendee,
+ gpointer data)
{
EMeetingStore *store = E_MEETING_STORE (data);
GtkTreePath *path;
@@ -989,7 +1013,8 @@ attendee_changed_cb (EMeetingAttendee *attendee, gpointer data)
}
void
-e_meeting_store_add_attendee (EMeetingStore *store, EMeetingAttendee *attendee)
+e_meeting_store_add_attendee (EMeetingStore *store,
+ EMeetingAttendee *attendee)
{
GtkTreePath *path;
GtkTreeIter iter;
@@ -1045,7 +1070,8 @@ e_meeting_store_add_attendee_with_defaults (EMeetingStore *store)
}
void
-e_meeting_store_remove_attendee (EMeetingStore *store, EMeetingAttendee *attendee)
+e_meeting_store_remove_attendee (EMeetingStore *store,
+ EMeetingAttendee *attendee)
{
gint i, row = -1;
GtkTreePath *path;
@@ -1170,7 +1196,8 @@ e_meeting_store_find_attendee (EMeetingStore *store,
}
EMeetingAttendee *
-e_meeting_store_find_attendee_at_row (EMeetingStore *store, gint row)
+e_meeting_store_find_attendee_at_row (EMeetingStore *store,
+ gint row)
{
g_return_val_if_fail (E_IS_MEETING_STORE (store), NULL);
g_return_val_if_fail (ROW_VALID (store, row), NULL);
@@ -1179,7 +1206,8 @@ e_meeting_store_find_attendee_at_row (EMeetingStore *store, gint row)
}
GtkTreePath *
-e_meeting_store_find_attendee_path (EMeetingStore *store, EMeetingAttendee *attendee)
+e_meeting_store_find_attendee_path (EMeetingStore *store,
+ EMeetingAttendee *attendee)
{
GtkTreePath *path;
gint row = -1, i;
@@ -1217,7 +1245,8 @@ e_meeting_store_get_attendees (EMeetingStore *store)
}
static icaltimezone *
-find_zone (icalproperty *ip, icalcomponent *tz_top_level)
+find_zone (icalproperty *ip,
+ icalcomponent *tz_top_level)
{
icalparameter *param;
icalcomponent *sub_comp;
@@ -1284,9 +1313,9 @@ process_callbacks (EMeetingStoreQueueData *qdata)
static void
process_free_busy_comp (EMeetingAttendee *attendee,
- icalcomponent *fb_comp,
- icaltimezone *zone,
- icalcomponent *tz_top_level)
+ icalcomponent *fb_comp,
+ icaltimezone *zone,
+ icalcomponent *tz_top_level)
{
icalproperty *ip;
@@ -1385,7 +1414,8 @@ process_free_busy_comp (EMeetingAttendee *attendee,
}
static void
-process_free_busy (EMeetingStoreQueueData *qdata, gchar *text)
+process_free_busy (EMeetingStoreQueueData *qdata,
+ gchar *text)
{
EMeetingStore *store = qdata->store;
EMeetingStorePrivate *priv;
@@ -1439,7 +1469,9 @@ process_free_busy (EMeetingStoreQueueData *qdata, gchar *text)
* In the returned newly allocated string.
*/
static gchar *
-replace_string (gchar *string, const gchar *from_value, gchar *to_value)
+replace_string (gchar *string,
+ const gchar *from_value,
+ gchar *to_value)
{
gchar *replaced;
gchar **split_uri;
@@ -1673,11 +1705,12 @@ refresh_busy_periods (gpointer data)
}
static void
-refresh_queue_add (EMeetingStore *store, gint row,
- EMeetingTime *start,
- EMeetingTime *end,
- EMeetingStoreRefreshCallback call_back,
- gpointer data)
+refresh_queue_add (EMeetingStore *store,
+ gint row,
+ EMeetingTime *start,
+ EMeetingTime *end,
+ EMeetingStoreRefreshCallback call_back,
+ gpointer data)
{
EMeetingStorePrivate *priv;
EMeetingAttendee *attendee;
@@ -1744,7 +1777,9 @@ refresh_queue_add (EMeetingStore *store, gint row,
}
static void
-async_read (GObject *source_object, GAsyncResult *res, gpointer data)
+async_read (GObject *source_object,
+ GAsyncResult *result,
+ gpointer data)
{
EMeetingStoreQueueData *qdata = data;
GError *error = NULL;
@@ -1756,7 +1791,7 @@ async_read (GObject *source_object, GAsyncResult *res, gpointer data)
istream = G_INPUT_STREAM (source_object);
- read = g_input_stream_read_finish (istream, res, &error);
+ read = g_input_stream_read_finish (istream, result, &error);
if (error || read < 0) {
g_warning ("Read finish failed: %s", error ? error->message : "Unknown error");
@@ -1874,7 +1909,8 @@ soup_authenticate (SoupSession *session,
}
static void
-redirect_handler (SoupMessage *msg, gpointer user_data)
+redirect_handler (SoupMessage *msg,
+ gpointer user_data)
{
if (SOUP_STATUS_IS_REDIRECTION (msg->status_code)) {
SoupSession *soup_session = user_data;
@@ -1901,7 +1937,9 @@ redirect_handler (SoupMessage *msg, gpointer user_data)
}
static void
-soup_msg_ready_cb (SoupSession *session, SoupMessage *msg, gpointer user_data)
+soup_msg_ready_cb (SoupSession *session,
+ SoupMessage *msg,
+ gpointer user_data)
{
EMeetingStoreQueueData *qdata = user_data;
@@ -1926,7 +1964,8 @@ soup_msg_ready_cb (SoupSession *session, SoupMessage *msg, gpointer user_data)
}
static void
-download_with_libsoup (const gchar *uri, EMeetingStoreQueueData *qdata)
+download_with_libsoup (const gchar *uri,
+ EMeetingStoreQueueData *qdata)
{
SoupSession *session;
SoupMessage *msg;
@@ -1968,7 +2007,8 @@ download_with_libsoup (const gchar *uri, EMeetingStoreQueueData *qdata)
}
static void
-start_async_read (const gchar *uri, gpointer data)
+start_async_read (const gchar *uri,
+ gpointer data)
{
EMeetingStoreQueueData *qdata = data;
GError *error = NULL;
@@ -2011,10 +2051,10 @@ start_async_read (const gchar *uri, gpointer data)
void
e_meeting_store_refresh_all_busy_periods (EMeetingStore *store,
- EMeetingTime *start,
- EMeetingTime *end,
- EMeetingStoreRefreshCallback call_back,
- gpointer data)
+ EMeetingTime *start,
+ EMeetingTime *end,
+ EMeetingStoreRefreshCallback call_back,
+ gpointer data)
{
gint i;
@@ -2026,11 +2066,11 @@ e_meeting_store_refresh_all_busy_periods (EMeetingStore *store,
void
e_meeting_store_refresh_busy_periods (EMeetingStore *store,
- gint row,
- EMeetingTime *start,
- EMeetingTime *end,
- EMeetingStoreRefreshCallback call_back,
- gpointer data)
+ gint row,
+ EMeetingTime *start,
+ EMeetingTime *end,
+ EMeetingStoreRefreshCallback call_back,
+ gpointer data)
{
g_return_if_fail (E_IS_MEETING_STORE (store));
diff --git a/calendar/gui/e-meeting-time-sel-item.c b/calendar/gui/e-meeting-time-sel-item.c
index 01572ce359..35f3a7d743 100644
--- a/calendar/gui/e-meeting-time-sel-item.c
+++ b/calendar/gui/e-meeting-time-sel-item.c
@@ -34,9 +34,9 @@
#include "e-meeting-time-sel.h"
/* Initially the grid lines were drawn at the bottom of cells, but this didn't
- line up well with the GtkEntry widgets, which in the default theme draw a
- black shadow line across the top. So I've switched our code to draw the
- lines across the top of cells. */
+ * line up well with the GtkEntry widgets, which in the default theme draw a
+ * black shadow line across the top. So I've switched our code to draw the
+ * lines across the top of cells. */
#define E_MEETING_TIME_SELECTOR_DRAW_GRID_LINES_AT_BOTTOM 0
static void e_meeting_time_selector_item_dispose (GObject *object);
@@ -183,7 +183,9 @@ e_meeting_time_selector_item_set_property (GObject *object,
}
static void
-e_meeting_time_selector_item_update (GnomeCanvasItem *item, const cairo_matrix_t *i2c, gint flags)
+e_meeting_time_selector_item_update (GnomeCanvasItem *item,
+ const cairo_matrix_t *i2c,
+ gint flags)
{
if (GNOME_CANVAS_ITEM_CLASS (e_meeting_time_selector_item_parent_class)->update)
(* GNOME_CANVAS_ITEM_CLASS (e_meeting_time_selector_item_parent_class)->update) (item, i2c, flags);
@@ -200,8 +202,12 @@ e_meeting_time_selector_item_update (GnomeCanvasItem *item, const cairo_matrix_t
*/
static void
-draw_strikeout_box (EMeetingTimeSelectorItem *mts_item, cairo_t *cr,
- gint x, gint y, gint width, gint height)
+draw_strikeout_box (EMeetingTimeSelectorItem *mts_item,
+ cairo_t *cr,
+ gint x,
+ gint y,
+ gint width,
+ gint height)
{
GnomeCanvas *canvas = GNOME_CANVAS_ITEM (mts_item)->canvas;
EMeetingTimeSelector *mts = mts_item->mts;
@@ -219,7 +225,12 @@ draw_strikeout_box (EMeetingTimeSelectorItem *mts_item, cairo_t *cr,
}
static void
-e_meeting_time_selector_item_draw (GnomeCanvasItem *item, cairo_t *cr, gint x, gint y, gint width, gint height)
+e_meeting_time_selector_item_draw (GnomeCanvasItem *item,
+ cairo_t *cr,
+ gint x,
+ gint y,
+ gint width,
+ gint height)
{
EMeetingTimeSelector *mts;
EMeetingTimeSelectorItem *mts_item;
@@ -278,7 +289,7 @@ e_meeting_time_selector_item_draw (GnomeCanvasItem *item, cairo_t *cr, gint x, g
}
/* For the main display draw the no-info pattern background for attendee's
- that have no calendar information. */
+ * that have no calendar information. */
if (!is_display_top) {
gdk_cairo_set_source_color (cr, &mts->grid_color);
row = y / mts->row_height;
@@ -317,8 +328,8 @@ e_meeting_time_selector_item_draw (GnomeCanvasItem *item, cairo_t *cr, gint x, g
current_date = date;
for (;;) {
/* Currently we use the same GnomeCanvasItem class for the
- top display and the main display. We may use separate
- classes in future if necessary. */
+ * top display and the main display. We may use separate
+ * classes in future if necessary. */
if (is_display_top)
e_meeting_time_selector_item_paint_day_top (mts_item, cr, &current_date, day_x, y, width, height);
else
@@ -369,9 +380,12 @@ e_meeting_time_selector_item_draw (GnomeCanvasItem *item, cairo_t *cr, gint x, g
static void
e_meeting_time_selector_item_paint_day_top (EMeetingTimeSelectorItem *mts_item,
- cairo_t *cr, GDate *date,
- gint x, gint scroll_y,
- gint width, gint height)
+ cairo_t *cr,
+ GDate *date,
+ gint x,
+ gint scroll_y,
+ gint width,
+ gint height)
{
EMeetingTimeSelector *mts;
gint y, grid_x;
@@ -424,18 +438,18 @@ e_meeting_time_selector_item_paint_day_top (EMeetingTimeSelectorItem *mts_item,
cairo_stroke (cr);
/* Draw the date. Set a clipping rectangle so we don't draw over the
- next day. */
+ * next day. */
if (mts->date_format == E_MEETING_TIME_SELECTOR_DATE_FULL)
/* This is a strftime() format string %A = full weekday name,
- %B = full month name, %d = month day, %Y = full year. */
+ * %B = full month name, %d = month day, %Y = full year. */
format = _("%A, %B %d, %Y");
else if (mts->date_format == E_MEETING_TIME_SELECTOR_DATE_ABBREVIATED_DAY)
/* This is a strftime() format string %a = abbreviated weekday
- name, %m = month number, %d = month day, %Y = full year. */
+ * name, %m = month number, %d = month day, %Y = full year. */
format = _("%a %m/%d/%Y");
else
/* This is a strftime() format string %m = month number,
- %d = month day, %Y = full year. */
+ * %d = month day, %Y = full year. */
format = _("%m/%d/%Y");
g_date_strftime (buffer, sizeof (buffer), format, date);
@@ -473,10 +487,16 @@ e_meeting_time_selector_item_paint_day_top (EMeetingTimeSelectorItem *mts_item,
}
/* This paints the colored bars representing busy periods for the combined
- list of attendees. For now we just paint the bars for each attendee of
- each other. If we want to speed it up we could optimise it later. */
+ * list of attendees. For now we just paint the bars for each attendee of
+ * each other. If we want to speed it up we could optimise it later. */
static void
-e_meeting_time_selector_item_paint_all_attendees_busy_periods (EMeetingTimeSelectorItem *mts_item, cairo_t *cr, GDate *date, gint x, gint scroll_y, gint width, gint height)
+e_meeting_time_selector_item_paint_all_attendees_busy_periods (EMeetingTimeSelectorItem *mts_item,
+ cairo_t *cr,
+ GDate *date,
+ gint x,
+ gint scroll_y,
+ gint width,
+ gint height)
{
EMeetingTimeSelector *mts;
EMeetingFreeBusyType busy_type;
@@ -509,9 +529,12 @@ e_meeting_time_selector_item_paint_all_attendees_busy_periods (EMeetingTimeSelec
static void
e_meeting_time_selector_item_paint_day (EMeetingTimeSelectorItem *mts_item,
- cairo_t *cr, GDate *date,
- gint x, gint scroll_y,
- gint width, gint height)
+ cairo_t *cr,
+ GDate *date,
+ gint x,
+ gint scroll_y,
+ gint width,
+ gint height)
{
EMeetingTimeSelector *mts;
gint grid_x, grid_y, attendee_index, unused_y;
@@ -522,7 +545,7 @@ e_meeting_time_selector_item_paint_day (EMeetingTimeSelectorItem *mts_item,
mts = mts_item->mts;
/* Draw the grid lines. The grid lines around unused rows are drawn in
- a different color. */
+ * a different color. */
/* Draw the horizontal grid lines. */
attendee_index = scroll_y / mts->row_height;
@@ -585,9 +608,15 @@ e_meeting_time_selector_item_paint_day (EMeetingTimeSelectorItem *mts_item,
}
/* This paints the colored bars representing busy periods for the individual
- attendees. */
+ * attendees. */
static void
-e_meeting_time_selector_item_paint_busy_periods (EMeetingTimeSelectorItem *mts_item, cairo_t *cr, GDate *date, gint x, gint scroll_y, gint width, gint height)
+e_meeting_time_selector_item_paint_busy_periods (EMeetingTimeSelectorItem *mts_item,
+ cairo_t *cr,
+ GDate *date,
+ gint x,
+ gint scroll_y,
+ gint width,
+ gint height)
{
EMeetingTimeSelector *mts;
EMeetingFreeBusyType busy_type;
@@ -608,8 +637,8 @@ e_meeting_time_selector_item_paint_busy_periods (EMeetingTimeSelectorItem *mts_i
first_period = e_meeting_time_selector_item_find_first_busy_period (mts_item, date, row);
if (first_period != -1) {
/* Paint the different types of busy periods, in
- reverse order of precedence, so the highest
- precedences are displayed. */
+ * reverse order of precedence, so the highest
+ * precedences are displayed. */
for (busy_type = 0;
busy_type < E_MEETING_FREE_BUSY_LAST;
busy_type++) {
@@ -623,11 +652,13 @@ e_meeting_time_selector_item_paint_busy_periods (EMeetingTimeSelectorItem *mts_i
}
/* This subtracts the attendees longest_period_in_days from the given date,
- and does a binary search of the attendee's busy periods array to find the
- first one which could possible end on the given day or later.
- If none are found it returns -1. */
+ * and does a binary search of the attendee's busy periods array to find the
+ * first one which could possible end on the given day or later.
+ * If none are found it returns -1. */
static gint
-e_meeting_time_selector_item_find_first_busy_period (EMeetingTimeSelectorItem *mts_item, GDate *date, gint row)
+e_meeting_time_selector_item_find_first_busy_period (EMeetingTimeSelectorItem *mts_item,
+ GDate *date,
+ gint row)
{
EMeetingTimeSelector *mts;
EMeetingAttendee *ia;
@@ -644,7 +675,7 @@ e_meeting_time_selector_item_find_first_busy_period (EMeetingTimeSelectorItem *m
return -1;
/* Check if the period starts after the end of the current canvas
- scroll area. */
+ * scroll area. */
busy_periods = e_meeting_attendee_get_busy_periods (ia);
period = &g_array_index (busy_periods, EMeetingFreeBusyPeriod, period_num);
if (g_date_compare (&mts->last_date_shown, &period->start.date) < 0)
@@ -654,10 +685,17 @@ e_meeting_time_selector_item_find_first_busy_period (EMeetingTimeSelectorItem *m
}
/* This paints the visible busy periods for one attendee which are of a certain
- busy type, e.g out of office. It is passed the index of the first visible
- busy period of the attendee and continues until it runs off the screen. */
+ * busy type, e.g out of office. It is passed the index of the first visible
+ * busy period of the attendee and continues until it runs off the screen. */
static void
-e_meeting_time_selector_item_paint_attendee_busy_periods (EMeetingTimeSelectorItem *mts_item, cairo_t *cr, gint x, gint y, gint width, gint row, gint first_period, EMeetingFreeBusyType busy_type)
+e_meeting_time_selector_item_paint_attendee_busy_periods (EMeetingTimeSelectorItem *mts_item,
+ cairo_t *cr,
+ gint x,
+ gint y,
+ gint width,
+ gint row,
+ gint first_period,
+ EMeetingFreeBusyType busy_type)
{
EMeetingTimeSelector *mts;
EMeetingAttendee *ia;
@@ -681,7 +719,7 @@ e_meeting_time_selector_item_paint_attendee_busy_periods (EMeetingTimeSelectorIt
/* Convert the period start and end times to x coordinates. */
x1 = e_meeting_time_selector_calculate_time_position (mts, &period->start);
/* If the period is off the right of the area being drawn, we
- are finished. */
+ * are finished. */
if (x1 >= x + width)
return;
@@ -691,10 +729,10 @@ e_meeting_time_selector_item_paint_attendee_busy_periods (EMeetingTimeSelectorIt
continue;
/* We paint from x1 to x2 - 1, so that for example a time
- from 5:00-6:00 is distinct from 6:00-7:00.
- We never finish on a grid line separating days, and we only
- ever paint on a normal vertical grid line if the period is
- only 1 pixel wide. */
+ * from 5:00-6:00 is distinct from 6:00-7:00.
+ * We never finish on a grid line separating days, and we only
+ * ever paint on a normal vertical grid line if the period is
+ * only 1 pixel wide. */
x2_within_day = x2 % mts->day_width;
if (x2_within_day == 0) {
x2 -= 2;
@@ -707,8 +745,8 @@ e_meeting_time_selector_item_paint_attendee_busy_periods (EMeetingTimeSelectorIt
}
/* Paint the rectangle. We leave a gap of 2 pixels at the
- top and bottom, remembering that the grid is painted along
- the top/bottom line of each row. */
+ * top and bottom, remembering that the grid is painted along
+ * the top/bottom line of each row. */
if (x2 - x1 > 0) {
#if E_MEETING_TIME_SELECTOR_DRAW_GRID_LINES_AT_BOTTOM
cairo_rectangle (cr, x1 - x, y + 2,
@@ -727,14 +765,18 @@ e_meeting_time_selector_item_paint_attendee_busy_periods (EMeetingTimeSelectorIt
*/
static GnomeCanvasItem *
-e_meeting_time_selector_item_point (GnomeCanvasItem *item, double x, double y,
- gint cx, gint cy)
+e_meeting_time_selector_item_point (GnomeCanvasItem *item,
+ gdouble x,
+ gdouble y,
+ gint cx,
+ gint cy)
{
return item;
}
static gint
-e_meeting_time_selector_item_event (GnomeCanvasItem *item, GdkEvent *event)
+e_meeting_time_selector_item_event (GnomeCanvasItem *item,
+ GdkEvent *event)
{
EMeetingTimeSelectorItem *mts_item;
@@ -758,13 +800,13 @@ e_meeting_time_selector_item_event (GnomeCanvasItem *item, GdkEvent *event)
}
/* This handles all button press events for the item. If the cursor is over
- one of the meeting time vertical bars we start a drag. If not we set the
- meeting time to the nearest half-hour interval.
- Note that GnomeCanvas converts the event coords to world coords,
- i.e. relative to the entire canvas scroll area. */
+ * one of the meeting time vertical bars we start a drag. If not we set the
+ * meeting time to the nearest half-hour interval.
+ * Note that GnomeCanvas converts the event coords to world coords,
+ * i.e. relative to the entire canvas scroll area. */
static gint
e_meeting_time_selector_item_button_press (EMeetingTimeSelectorItem *mts_item,
- GdkEvent *event)
+ GdkEvent *event)
{
EMeetingTimeSelector *mts;
EMeetingTime start_time, end_time;
@@ -784,7 +826,7 @@ e_meeting_time_selector_item_button_press (EMeetingTimeSelectorItem *mts_item,
GDK_POINTER_MOTION_MASK
| GDK_BUTTON_RELEASE_MASK,
mts_item->resize_cursor,
- event->button.time) == 0 /*Success*/) {
+ event->button.time) == 0 /*Success */) {
mts->dragging_position = position;
return TRUE;
}
@@ -796,7 +838,7 @@ e_meeting_time_selector_item_button_press (EMeetingTimeSelectorItem *mts_item,
end_date = &end_time.date;
/* Find the nearest half-hour or hour interval, depending on whether
- zoomed_out is set. */
+ * zoomed_out is set. */
if (!mts->all_day) {
gint astart_year, astart_month, astart_day, astart_hour, astart_minute;
gint aend_year, aend_month, aend_day, aend_hour, aend_minute;
@@ -869,10 +911,10 @@ e_meeting_time_selector_item_button_press (EMeetingTimeSelectorItem *mts_item,
}
/* This handles all button release events for the item. If we were dragging,
- we finish the drag. */
+ * we finish the drag. */
static gint
e_meeting_time_selector_item_button_release (EMeetingTimeSelectorItem *mts_item,
- GdkEvent *event)
+ GdkEvent *event)
{
EMeetingTimeSelector *mts;
@@ -890,12 +932,12 @@ e_meeting_time_selector_item_button_release (EMeetingTimeSelectorItem *mts_item,
}
/* This handles all motion notify events for the item. If button1 is pressed
- we check if a drag is in progress. If not, we set the cursor if we are over
- the meeting time vertical bars. Note that GnomeCanvas doesn't use motion
- hints, which may affect performance. */
+ * we check if a drag is in progress. If not, we set the cursor if we are over
+ * the meeting time vertical bars. Note that GnomeCanvas doesn't use motion
+ * hints, which may affect performance. */
static gint
e_meeting_time_selector_item_motion_notify (EMeetingTimeSelectorItem *mts_item,
- GdkEvent *event)
+ GdkEvent *event)
{
EMeetingTimeSelector *mts;
EMeetingTimeSelectorPosition position;
@@ -940,7 +982,8 @@ e_meeting_time_selector_item_motion_notify (EMeetingTimeSelectorItem *mts_item,
static EMeetingTimeSelectorPosition
e_meeting_time_selector_item_get_drag_position (EMeetingTimeSelectorItem *mts_item,
- gint x, gint y)
+ gint x,
+ gint y)
{
EMeetingTimeSelector *mts;
gboolean is_display_top;
@@ -967,11 +1010,11 @@ e_meeting_time_selector_item_get_drag_position (EMeetingTimeSelectorItem *mts_it
static gboolean
e_meeting_time_selector_item_calculate_busy_range (EMeetingTimeSelector *mts,
- gint row,
- gint x,
- gint width,
- gint *start_x,
- gint *end_x)
+ gint row,
+ gint x,
+ gint width,
+ gint *start_x,
+ gint *end_x)
{
EMeetingAttendee *ia;
EMeetingTime busy_periods_start;
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index ebe9bd05c0..9afdfd7a22 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -74,7 +74,7 @@ const gchar *EMeetingTimeSelectorHours12[24] = {
#define E_MEETING_TIME_SELECTOR_FB_DAYS_AFTER 28
/* This is the number of pixels between the mouse has to move before the
- scroll speed is incremented. */
+ * scroll speed is incremented. */
#define E_MEETING_TIME_SELECTOR_SCROLL_INCREMENT_WIDTH 10
/* This is the maximum scrolling speed. */
@@ -150,22 +150,22 @@ static void e_meeting_time_selector_on_next_button_clicked (GtkWidget *button,
EMeetingTimeSelector *mts);
static void e_meeting_time_selector_autopick (EMeetingTimeSelector *mts,
gboolean forward);
-static void e_meeting_time_selector_calculate_time_difference (EMeetingTime*start,
- EMeetingTime*end,
+static void e_meeting_time_selector_calculate_time_difference (EMeetingTime *start,
+ EMeetingTime *end,
gint *days,
gint *hours,
gint *minutes);
static void e_meeting_time_selector_find_nearest_interval (EMeetingTimeSelector *mts,
- EMeetingTime*start_time,
- EMeetingTime*end_time,
+ EMeetingTime *start_time,
+ EMeetingTime *end_time,
gint days, gint hours, gint mins);
static void e_meeting_time_selector_find_nearest_interval_backward (EMeetingTimeSelector *mts,
EMeetingTime *start_time,
EMeetingTime *end_time,
gint days, gint hours, gint mins);
-static void e_meeting_time_selector_adjust_time (EMeetingTime*mtstime,
+static void e_meeting_time_selector_adjust_time (EMeetingTime *mtstime,
gint days, gint hours, gint minutes);
-static EMeetingFreeBusyPeriod* e_meeting_time_selector_find_time_clash (EMeetingTimeSelector *mts,
+static EMeetingFreeBusyPeriod * e_meeting_time_selector_find_time_clash (EMeetingTimeSelector *mts,
EMeetingAttendee *attendee,
EMeetingTime *start_time,
EMeetingTime *end_time);
@@ -175,7 +175,7 @@ static void e_meeting_time_selector_recalc_date_format (EMeetingTimeSelector *mt
static void e_meeting_time_selector_save_position (EMeetingTimeSelector *mts,
EMeetingTime *mtstime);
static void e_meeting_time_selector_restore_position (EMeetingTimeSelector *mts,
- EMeetingTime*mtstime);
+ EMeetingTime *mtstime);
static void e_meeting_time_selector_on_start_time_changed (GtkWidget *widget,
EMeetingTimeSelector *mts);
static void e_meeting_time_selector_on_end_time_changed (GtkWidget *widget,
@@ -298,7 +298,7 @@ meeting_time_selector_dispose (GObject *object)
}
static void
-e_meeting_time_selector_class_init (EMeetingTimeSelectorClass * class)
+e_meeting_time_selector_class_init (EMeetingTimeSelectorClass *class)
{
GObjectClass *object_class;
GtkWidgetClass *widget_class;
@@ -359,7 +359,7 @@ e_meeting_time_selector_class_init (EMeetingTimeSelectorClass * class)
}
static void
-e_meeting_time_selector_init (EMeetingTimeSelector * mts)
+e_meeting_time_selector_init (EMeetingTimeSelector *mts)
{
mts->priv = G_TYPE_INSTANCE_GET_PRIVATE (
mts, E_TYPE_MEETING_TIME_SELECTOR,
@@ -387,7 +387,8 @@ e_meeting_time_selector_init (EMeetingTimeSelector * mts)
}
void
-e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *ems)
+e_meeting_time_selector_construct (EMeetingTimeSelector *mts,
+ EMeetingStore *ems)
{
GtkWidget *hbox, *vbox, *separator, *label, *table, *sw;
GtkWidget *alignment, *child_hbox, *arrow, *menuitem;
@@ -401,7 +402,7 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em
AtkObject *a11y_label, *a11y_date_edit;
/* The default meeting time is the nearest half-hour interval in the
- future, in working hours. */
+ * future, in working hours. */
meeting_start_time = time (NULL);
g_date_clear (&mts->meeting_start_time.date, 1);
g_date_set_time_t (&mts->meeting_start_time.date, meeting_start_time);
@@ -859,11 +860,12 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em
}
/* This adds a color to the color key beneath the main display. If color is
- NULL, it displays the No Info pattern instead. */
+ * NULL, it displays the No Info pattern instead. */
static void
-e_meeting_time_selector_add_key_color (EMeetingTimeSelector * mts,
- GtkWidget *hbox,
- gchar *label_text, GdkColor *color)
+e_meeting_time_selector_add_key_color (EMeetingTimeSelector *mts,
+ GtkWidget *hbox,
+ gchar *label_text,
+ GdkColor *color)
{
GtkWidget *child_hbox, *darea, *label;
@@ -888,7 +890,9 @@ e_meeting_time_selector_add_key_color (EMeetingTimeSelector * mts,
}
static gint
-e_meeting_time_selector_draw_key_color (GtkWidget *darea, cairo_t *cr, GdkColor *color)
+e_meeting_time_selector_draw_key_color (GtkWidget *darea,
+ cairo_t *cr,
+ GdkColor *color)
{
EMeetingTimeSelector * mts;
GtkAllocation allocation;
@@ -918,8 +922,9 @@ e_meeting_time_selector_draw_key_color (GtkWidget *darea, cairo_t *cr, GdkColor
}
static void
-e_meeting_time_selector_alloc_named_color (EMeetingTimeSelector * mts,
- const gchar *name, GdkColor *c)
+e_meeting_time_selector_alloc_named_color (EMeetingTimeSelector *mts,
+ const gchar *name,
+ GdkColor *c)
{
g_return_if_fail (name != NULL);
g_return_if_fail (c != NULL);
@@ -930,7 +935,7 @@ e_meeting_time_selector_alloc_named_color (EMeetingTimeSelector * mts,
static void
e_meeting_time_selector_options_menu_detacher (GtkWidget *widget,
- GtkMenu *menu)
+ GtkMenu *menu)
{
EMeetingTimeSelector *mts;
@@ -938,14 +943,14 @@ e_meeting_time_selector_options_menu_detacher (GtkWidget *widget,
g_return_if_fail (E_IS_MEETING_TIME_SELECTOR (widget));
mts = E_MEETING_TIME_SELECTOR (widget);
- g_return_if_fail (mts->options_menu == (GtkWidget*) menu);
+ g_return_if_fail (mts->options_menu == (GtkWidget *) menu);
mts->options_menu = NULL;
}
static void
e_meeting_time_selector_autopick_menu_detacher (GtkWidget *widget,
- GtkMenu *menu)
+ GtkMenu *menu)
{
EMeetingTimeSelector *mts;
@@ -953,7 +958,7 @@ e_meeting_time_selector_autopick_menu_detacher (GtkWidget *widget,
g_return_if_fail (E_IS_MEETING_TIME_SELECTOR (widget));
mts = E_MEETING_TIME_SELECTOR (widget);
- g_return_if_fail (mts->autopick_menu == (GtkWidget*) menu);
+ g_return_if_fail (mts->autopick_menu == (GtkWidget *) menu);
mts->autopick_menu = NULL;
}
@@ -1149,12 +1154,12 @@ style_change_idle_func (EMeetingTimeSelector *mts)
* FIXME: I can't find a way to get the treeview header heights
* other than the below but it isn't nice to realize that widget here
*
-
+ *
gtk_widget_realize (mts->list_view);
gdk_window_get_position (gtk_tree_view_get_bin_window (GTK_TREE_VIEW (mts->list_view)),
NULL, &maxheight);
gtk_widget_set_size_request (mts->attendees_vbox_spacer, 1, mts->row_height * 3 - maxheight);
-
+ *
*/
gtk_widget_set_size_request (mts->attendees_vbox_spacer, 1, mts->row_height * 2 - 6);
@@ -1177,7 +1182,7 @@ style_change_idle_func (EMeetingTimeSelector *mts)
static void
e_meeting_time_selector_style_set (GtkWidget *widget,
- GtkStyle *previous_style)
+ GtkStyle *previous_style)
{
EMeetingTimeSelector *mts = E_MEETING_TIME_SELECTOR (widget);
@@ -1191,7 +1196,8 @@ e_meeting_time_selector_style_set (GtkWidget *widget,
/* This draws a shadow around the top display and main display. */
static gint
-e_meeting_time_selector_draw (GtkWidget *widget, cairo_t *cr)
+e_meeting_time_selector_draw (GtkWidget *widget,
+ cairo_t *cr)
{
EMeetingTimeSelector *mts;
@@ -1206,7 +1212,8 @@ e_meeting_time_selector_draw (GtkWidget *widget, cairo_t *cr)
}
static void
-e_meeting_time_selector_draw_shadow (EMeetingTimeSelector *mts, cairo_t *cr)
+e_meeting_time_selector_draw_shadow (EMeetingTimeSelector *mts,
+ cairo_t *cr)
{
GtkAllocation allocation;
GtkStyle *style;
@@ -1233,7 +1240,7 @@ e_meeting_time_selector_draw_shadow (EMeetingTimeSelector *mts, cairo_t *cr)
/* When the main canvas scrolls, we scroll the other canvases. */
static void
e_meeting_time_selector_hadjustment_changed (GtkAdjustment *adjustment,
- EMeetingTimeSelector *mts)
+ EMeetingTimeSelector *mts)
{
GtkAdjustment *hadjustment;
GtkScrollable *scrollable;
@@ -1248,7 +1255,7 @@ e_meeting_time_selector_hadjustment_changed (GtkAdjustment *adjustment,
static void
e_meeting_time_selector_vadjustment_changed (GtkAdjustment *adjustment,
- EMeetingTimeSelector *mts)
+ EMeetingTimeSelector *mts)
{
GtkAdjustment *vadjustment;
GtkTreeView *tree_view;
@@ -1263,16 +1270,16 @@ e_meeting_time_selector_vadjustment_changed (GtkAdjustment *adjustment,
void
e_meeting_time_selector_get_meeting_time (EMeetingTimeSelector *mts,
- gint *start_year,
- gint *start_month,
- gint *start_day,
- gint *start_hour,
- gint *start_minute,
- gint *end_year,
- gint *end_month,
- gint *end_day,
- gint *end_hour,
- gint *end_minute)
+ gint *start_year,
+ gint *start_month,
+ gint *start_day,
+ gint *start_hour,
+ gint *start_minute,
+ gint *end_year,
+ gint *end_month,
+ gint *end_day,
+ gint *end_hour,
+ gint *end_minute)
{
*start_year = g_date_get_year (&mts->meeting_start_time.date);
*start_month = g_date_get_month (&mts->meeting_start_time.date);
@@ -1289,16 +1296,16 @@ e_meeting_time_selector_get_meeting_time (EMeetingTimeSelector *mts,
gboolean
e_meeting_time_selector_set_meeting_time (EMeetingTimeSelector *mts,
- gint start_year,
- gint start_month,
- gint start_day,
- gint start_hour,
- gint start_minute,
- gint end_year,
- gint end_month,
- gint end_day,
- gint end_hour,
- gint end_minute)
+ gint start_year,
+ gint start_month,
+ gint start_day,
+ gint start_hour,
+ gint start_minute,
+ gint end_year,
+ gint end_month,
+ gint end_day,
+ gint end_hour,
+ gint end_minute)
{
g_return_val_if_fail (E_IS_MEETING_TIME_SELECTOR (mts), FALSE);
@@ -1336,7 +1343,7 @@ e_meeting_time_selector_set_meeting_time (EMeetingTimeSelector *mts,
void
e_meeting_time_selector_set_all_day (EMeetingTimeSelector *mts,
- gboolean all_day)
+ gboolean all_day)
{
EMeetingTime saved_time;
@@ -1358,7 +1365,7 @@ e_meeting_time_selector_set_all_day (EMeetingTimeSelector *mts,
void
e_meeting_time_selector_set_working_hours_only (EMeetingTimeSelector *mts,
- gboolean working_hours_only)
+ gboolean working_hours_only)
{
EMeetingTime saved_time;
@@ -1380,10 +1387,10 @@ e_meeting_time_selector_set_working_hours_only (EMeetingTimeSelector *mts,
void
e_meeting_time_selector_set_working_hours (EMeetingTimeSelector *mts,
- gint day_start_hour,
- gint day_start_minute,
- gint day_end_hour,
- gint day_end_minute)
+ gint day_start_hour,
+ gint day_start_minute,
+ gint day_end_hour,
+ gint day_end_minute)
{
EMeetingTime saved_time;
@@ -1418,7 +1425,7 @@ e_meeting_time_selector_set_working_hours (EMeetingTimeSelector *mts,
void
e_meeting_time_selector_set_zoomed_out (EMeetingTimeSelector *mts,
- gboolean zoomed_out)
+ gboolean zoomed_out)
{
EMeetingTime saved_time;
@@ -1469,7 +1476,9 @@ e_meeting_time_selector_refresh_cb (gpointer data)
}
void
-e_meeting_time_selector_refresh_free_busy (EMeetingTimeSelector *mts, gint row, gboolean all)
+e_meeting_time_selector_refresh_free_busy (EMeetingTimeSelector *mts,
+ gint row,
+ gboolean all)
{
EMeetingTime start, end;
@@ -1547,7 +1556,7 @@ e_meeting_time_selector_get_autopick_option (EMeetingTimeSelector *mts)
void
e_meeting_time_selector_set_autopick_option (EMeetingTimeSelector *mts,
- EMeetingTimeSelectorAutopickOption autopick_option)
+ EMeetingTimeSelectorAutopickOption autopick_option)
{
g_return_if_fail (E_IS_MEETING_TIME_SELECTOR (mts));
@@ -1566,26 +1575,10 @@ e_meeting_time_selector_set_autopick_option (EMeetingTimeSelector *mts,
break;
}
}
-#if 0
-void
-e_meeting_time_selector_attendee_set_send_meeting_to (EMeetingTimeSelector *mts,
- gint row,
- gboolean send_meeting_to)
-{
- EMeetingTimeSelectorAttendee *attendee;
-
- g_return_if_fail (E_IS_MEETING_TIME_SELECTOR (mts));
- g_return_if_fail (row >= 0);
- g_return_if_fail (row < mts->attendees->len);
-
- attendee = &g_array_index (mts->attendees,
- EMeetingTimeSelectorAttendee, row);
- attendee->send_meeting_to = send_meeting_to;
-}
-#endif
void
-e_meeting_time_selector_set_read_only (EMeetingTimeSelector *mts, gboolean read_only)
+e_meeting_time_selector_set_read_only (EMeetingTimeSelector *mts,
+ gboolean read_only)
{
g_return_if_fail (E_IS_MEETING_TIME_SELECTOR (mts));
@@ -1651,9 +1644,9 @@ e_meeting_time_selector_dump (EMeetingTimeSelector *mts)
}
/* This formats a EMeetingTimein a string and returns it.
- Note that it uses a static buffer. */
+ * Note that it uses a static buffer. */
gchar *
-e_meeting_time_selector_dump_time (EMeetingTime*mtstime)
+e_meeting_time_selector_dump_time (EMeetingTime *mtstime)
{
static gchar buffer[128];
@@ -1670,7 +1663,7 @@ e_meeting_time_selector_dump_time (EMeetingTime*mtstime)
}
/* This formats a GDate in a string and returns it.
- Note that it uses a static buffer. */
+ * Note that it uses a static buffer. */
gchar *
e_meeting_time_selector_dump_date (GDate *date)
{
@@ -1685,14 +1678,14 @@ e_meeting_time_selector_dump_date (GDate *date)
static void
e_meeting_time_selector_on_invite_others_button_clicked (GtkWidget *button,
- EMeetingTimeSelector *mts)
+ EMeetingTimeSelector *mts)
{
e_meeting_list_view_invite_others_dialog (mts->list_view);
}
static void
e_meeting_time_selector_on_options_button_clicked (GtkWidget *button,
- EMeetingTimeSelector *mts)
+ EMeetingTimeSelector *mts)
{
gtk_menu_popup (GTK_MENU (mts->options_menu), NULL, NULL,
e_meeting_time_selector_options_menu_position_callback,
@@ -1701,10 +1694,10 @@ e_meeting_time_selector_on_options_button_clicked (GtkWidget *button,
static void
e_meeting_time_selector_options_menu_position_callback (GtkMenu *menu,
- gint *x,
- gint *y,
- gboolean *push_in,
- gpointer user_data)
+ gint *x,
+ gint *y,
+ gboolean *push_in,
+ gpointer user_data)
{
EMeetingTimeSelector *mts;
GtkRequisition menu_requisition;
@@ -1733,10 +1726,10 @@ e_meeting_time_selector_options_menu_position_callback (GtkMenu *menu,
static void
e_meeting_time_selector_on_update_free_busy (GtkWidget *button,
- EMeetingTimeSelector *mts)
+ EMeetingTimeSelector *mts)
{
/* Make sure the menu pops down, which doesn't happen by default if
- keyboard accelerators are used. */
+ * keyboard accelerators are used. */
if (gtk_widget_get_visible (mts->options_menu))
gtk_menu_popdown (GTK_MENU (mts->options_menu));
@@ -1745,7 +1738,7 @@ e_meeting_time_selector_on_update_free_busy (GtkWidget *button,
static void
e_meeting_time_selector_on_autopick_button_clicked (GtkWidget *button,
- EMeetingTimeSelector *mts)
+ EMeetingTimeSelector *mts)
{
gtk_menu_popup (GTK_MENU (mts->autopick_menu), NULL, NULL,
e_meeting_time_selector_autopick_menu_position_callback,
@@ -1754,10 +1747,10 @@ e_meeting_time_selector_on_autopick_button_clicked (GtkWidget *button,
static void
e_meeting_time_selector_autopick_menu_position_callback (GtkMenu *menu,
- gint *x,
- gint *y,
- gboolean *push_in,
- gpointer user_data)
+ gint *x,
+ gint *y,
+ gboolean *push_in,
+ gpointer user_data)
{
EMeetingTimeSelector *mts;
GtkRequisition menu_requisition;
@@ -1786,33 +1779,33 @@ e_meeting_time_selector_autopick_menu_position_callback (GtkMenu *menu,
static void
e_meeting_time_selector_on_autopick_option_toggled (GtkWidget *button,
- EMeetingTimeSelector *mts)
+ EMeetingTimeSelector *mts)
{
/* Make sure the menu pops down, which doesn't happen by default if
- keyboard accelerators are used. */
+ * keyboard accelerators are used. */
if (gtk_widget_get_visible (mts->autopick_menu))
gtk_menu_popdown (GTK_MENU (mts->autopick_menu));
}
static void
e_meeting_time_selector_on_prev_button_clicked (GtkWidget *button,
- EMeetingTimeSelector *mts)
+ EMeetingTimeSelector *mts)
{
e_meeting_time_selector_autopick (mts, FALSE);
}
static void
e_meeting_time_selector_on_next_button_clicked (GtkWidget *button,
- EMeetingTimeSelector *mts)
+ EMeetingTimeSelector *mts)
{
e_meeting_time_selector_autopick (mts, TRUE);
}
/* This tries to find the previous or next meeting time for which all
- attendees will be available. */
+ * attendees will be available. */
static void
e_meeting_time_selector_autopick (EMeetingTimeSelector *mts,
- gboolean forward)
+ gboolean forward)
{
EMeetingTime start_time, end_time, *resource_free;
EMeetingAttendee *attendee;
@@ -1833,7 +1826,7 @@ e_meeting_time_selector_autopick (EMeetingTimeSelector *mts,
e_meeting_time_selector_find_nearest_interval_backward (mts, &start_time, &end_time, duration_days, duration_hours, duration_minutes);
/* Determine if we can skip optional people and if we only need one
- resource based on the autopick option. */
+ * resource based on the autopick option. */
autopick_option = e_meeting_time_selector_get_autopick_option (mts);
if (autopick_option == E_MEETING_TIME_SELECTOR_REQUIRED_PEOPLE
|| autopick_option == E_MEETING_TIME_SELECTOR_REQUIRED_PEOPLE_AND_ONE_RESOURCE)
@@ -1843,14 +1836,14 @@ e_meeting_time_selector_autopick (EMeetingTimeSelector *mts,
need_one_resource = TRUE;
/* Keep moving forward or backward until we find a possible meeting
- time. */
+ * time. */
for (;;) {
meeting_time_ok = TRUE;
found_resource = FALSE;
resource_free = NULL;
/* Step through each attendee, checking if the meeting time
- intersects one of the attendees busy periods. */
+ * intersects one of the attendees busy periods. */
for (row = 0; row < e_meeting_store_count_actual_attendees (mts->model); row++) {
attendee = e_meeting_store_find_attendee_at_row (mts->model, row);
@@ -1863,9 +1856,9 @@ e_meeting_time_selector_autopick (EMeetingTimeSelector *mts,
if (need_one_resource && e_meeting_attendee_get_atype (attendee) == E_MEETING_ATTENDEE_RESOURCE) {
if (period) {
/* We want to remember the closest
- prev/next time that one resource is
- available, in case we don't find any
- free resources. */
+ * prev/next time that one resource is
+ * available, in case we don't find any
+ * free resources. */
if (forward) {
if (!resource_free || e_meeting_time_compare_times (resource_free, &period->end) > 0)
resource_free = &period->end;
@@ -1891,9 +1884,9 @@ e_meeting_time_selector_autopick (EMeetingTimeSelector *mts,
}
/* Check that we found one resource if necessary. If not, skip
- to the closest time that a resource is free. Note that if
- there are no resources, resource_free will never get set,
- so we assume the meeting time is OK. */
+ * to the closest time that a resource is free. Note that if
+ * there are no resources, resource_free will never get set,
+ * so we assume the meeting time is OK. */
if (meeting_time_ok && need_one_resource && !found_resource
&& resource_free) {
if (forward) {
@@ -1933,11 +1926,11 @@ e_meeting_time_selector_autopick (EMeetingTimeSelector *mts,
}
static void
-e_meeting_time_selector_calculate_time_difference (EMeetingTime*start,
- EMeetingTime*end,
- gint *days,
- gint *hours,
- gint *minutes)
+e_meeting_time_selector_calculate_time_difference (EMeetingTime *start,
+ EMeetingTime *end,
+ gint *days,
+ gint *hours,
+ gint *minutes)
{
*days = g_date_get_julian (&end->date) - g_date_get_julian (&start->date);
*hours = end->hour - start->hour;
@@ -1953,12 +1946,14 @@ e_meeting_time_selector_calculate_time_difference (EMeetingTime*start,
}
/* This moves the given time forward to the next suitable start of a meeting.
- If zoomed_out is set, this means every hour. If not every half-hour. */
+ * If zoomed_out is set, this means every hour. If not every half-hour. */
static void
e_meeting_time_selector_find_nearest_interval (EMeetingTimeSelector *mts,
- EMeetingTime*start_time,
- EMeetingTime*end_time,
- gint days, gint hours, gint mins)
+ EMeetingTime *start_time,
+ EMeetingTime *end_time,
+ gint days,
+ gint hours,
+ gint mins)
{
gint minutes_shown;
gboolean set_to_start_of_working_day = FALSE;
@@ -1982,7 +1977,7 @@ e_meeting_time_selector_find_nearest_interval (EMeetingTimeSelector *mts,
e_meeting_time_selector_adjust_time (end_time, days, hours, mins);
/* Check if the interval is less than a day as seen in the display.
- If it isn't we don't worry about the working day. */
+ * If it isn't we don't worry about the working day. */
if (!mts->working_hours_only || days > 0)
return;
minutes_shown = (mts->day_end_hour - mts->day_start_hour) * 60;
@@ -1991,8 +1986,8 @@ e_meeting_time_selector_find_nearest_interval (EMeetingTimeSelector *mts,
return;
/* If the meeting time finishes past the end of the working day, move
- onto the start of the next working day. If the meeting time starts
- before the working day, move it on as well. */
+ * onto the start of the next working day. If the meeting time starts
+ * before the working day, move it on as well. */
if (start_time->hour > mts->day_end_hour
|| (start_time->hour == mts->day_end_hour
&& start_time->minute > mts->day_end_minute)
@@ -2029,12 +2024,14 @@ e_meeting_time_selector_find_nearest_interval (EMeetingTimeSelector *mts,
}
/* This moves the given time backward to the next suitable start of a meeting.
- If zoomed_out is set, this means every hour. If not every half-hour. */
+ * If zoomed_out is set, this means every hour. If not every half-hour. */
static void
e_meeting_time_selector_find_nearest_interval_backward (EMeetingTimeSelector *mts,
- EMeetingTime*start_time,
- EMeetingTime*end_time,
- gint days, gint hours, gint mins)
+ EMeetingTime *start_time,
+ EMeetingTime *end_time,
+ gint days,
+ gint hours,
+ gint mins)
{
gint new_hour, minutes_shown;
gboolean set_to_end_of_working_day = FALSE;
@@ -2069,7 +2066,7 @@ e_meeting_time_selector_find_nearest_interval_backward (EMeetingTimeSelector *mt
e_meeting_time_selector_adjust_time (end_time, days, hours, mins);
/* Check if the interval is less than a day as seen in the display.
- If it isn't we don't worry about the working day. */
+ * If it isn't we don't worry about the working day. */
if (!mts->working_hours_only || days > 0)
return;
minutes_shown = (mts->day_end_hour - mts->day_start_hour) * 60;
@@ -2078,9 +2075,9 @@ e_meeting_time_selector_find_nearest_interval_backward (EMeetingTimeSelector *mt
return;
/* If the meeting time finishes past the end of the working day, move
- back to the end of the working day. If the meeting time starts
- before the working day, move it back to the end of the previous
- working day. */
+ * back to the end of the working day. If the meeting time starts
+ * before the working day, move it back to the end of the previous
+ * working day. */
if (start_time->hour > mts->day_end_hour
|| (start_time->hour == mts->day_end_hour
&& start_time->minute > mts->day_end_minute)
@@ -2113,17 +2110,19 @@ e_meeting_time_selector_find_nearest_interval_backward (EMeetingTimeSelector *mt
}
/* This adds on the given days, hours & minutes to a EMeetingTimeSelectorTime.
- It is used to calculate the end of a period given a start & duration.
- Days, hours & minutes can be negative, to move backwards, but they should
- be within normal ranges, e.g. hours should be between -23 and 23. */
+ * It is used to calculate the end of a period given a start & duration.
+ * Days, hours & minutes can be negative, to move backwards, but they should
+ * be within normal ranges, e.g. hours should be between -23 and 23. */
static void
-e_meeting_time_selector_adjust_time (EMeetingTime*mtstime,
- gint days, gint hours, gint minutes)
+e_meeting_time_selector_adjust_time (EMeetingTime *mtstime,
+ gint days,
+ gint hours,
+ gint minutes)
{
gint new_hours, new_minutes;
/* We have to handle negative values for hous and minutes here, since
- EMeetingTimeuses guint8s to store them. */
+ * EMeetingTimeuses guint8s to store them. */
new_minutes = mtstime->minute + minutes;
if (new_minutes < 0) {
new_minutes += 60;
@@ -2144,12 +2143,12 @@ e_meeting_time_selector_adjust_time (EMeetingTime*mtstime,
}
/* This looks for any busy period of the given attendee which clashes with
- the start and end time. It uses a binary search. */
+ * the start and end time. It uses a binary search. */
static EMeetingFreeBusyPeriod *
e_meeting_time_selector_find_time_clash (EMeetingTimeSelector *mts,
- EMeetingAttendee *attendee,
- EMeetingTime*start_time,
- EMeetingTime*end_time)
+ EMeetingAttendee *attendee,
+ EMeetingTime *start_time,
+ EMeetingTime *end_time)
{
EMeetingFreeBusyPeriod *period;
const GArray *busy_periods;
@@ -2162,19 +2161,19 @@ e_meeting_time_selector_find_time_clash (EMeetingTimeSelector *mts,
return NULL;
/* Step forward through the busy periods until we find a clash or we
- go past the end_time. */
+ * go past the end_time. */
while (period_num < busy_periods->len) {
period = &g_array_index (busy_periods, EMeetingFreeBusyPeriod, period_num);
/* If the period starts at or after the end time, there is no
- clash and we are finished. The busy periods are sorted by
- their start times, so all the rest will be later. */
+ * clash and we are finished. The busy periods are sorted by
+ * their start times, so all the rest will be later. */
if (e_meeting_time_compare_times (&period->start, end_time) >= 0)
return NULL;
/* If the period ends after the start time, we have found a
- clash. From the above test we already know the busy period
- isn't completely after the meeting time. */
+ * clash. From the above test we already know the busy period
+ * isn't completely after the meeting time. */
if (e_meeting_time_compare_times (&period->end, start_time) > 0)
return period;
@@ -2186,12 +2185,12 @@ e_meeting_time_selector_find_time_clash (EMeetingTimeSelector *mts,
static void
e_meeting_time_selector_on_zoomed_out_toggled (GtkCheckMenuItem *menuitem,
- EMeetingTimeSelector *mts)
+ EMeetingTimeSelector *mts)
{
gboolean active;
/* Make sure the menu pops down, which doesn't happen by default if
- keyboard accelerators are used. */
+ * keyboard accelerators are used. */
if (gtk_widget_get_visible (mts->options_menu))
gtk_menu_popdown (GTK_MENU (mts->options_menu));
@@ -2202,12 +2201,12 @@ e_meeting_time_selector_on_zoomed_out_toggled (GtkCheckMenuItem *menuitem,
static void
e_meeting_time_selector_on_working_hours_toggled (GtkCheckMenuItem *menuitem,
- EMeetingTimeSelector *mts)
+ EMeetingTimeSelector *mts)
{
gboolean active;
/* Make sure the menu pops down, which doesn't happen by default if
- keyboard accelerators are used. */
+ * keyboard accelerators are used. */
if (gtk_widget_get_visible (mts->options_menu))
gtk_menu_popdown (GTK_MENU (mts->options_menu));
@@ -2257,7 +2256,7 @@ e_meeting_time_selector_recalc_grid (EMeetingTimeSelector *mts)
/* This saves the first visible time in the given EMeetingTimeSelectorTime. */
static void
e_meeting_time_selector_save_position (EMeetingTimeSelector *mts,
- EMeetingTime*mtstime)
+ EMeetingTime *mtstime)
{
gint scroll_x, scroll_y;
@@ -2269,7 +2268,7 @@ e_meeting_time_selector_save_position (EMeetingTimeSelector *mts,
/* This restores a saved position. */
static void
e_meeting_time_selector_restore_position (EMeetingTimeSelector *mts,
- EMeetingTime*mtstime)
+ EMeetingTime *mtstime)
{
gint scroll_x, scroll_y, new_scroll_x;
@@ -2282,13 +2281,13 @@ e_meeting_time_selector_restore_position (EMeetingTimeSelector *mts,
}
/* This returns the x pixel coords of the meeting time in the entire scroll
- region. It recalculates them if they have been marked as invalid.
- If it returns FALSE then no meeting time is set or the meeting time is
- not visible in the current scroll area. */
+ * region. It recalculates them if they have been marked as invalid.
+ * If it returns FALSE then no meeting time is set or the meeting time is
+ * not visible in the current scroll area. */
gboolean
e_meeting_time_selector_get_meeting_time_positions (EMeetingTimeSelector *mts,
- gint *start_x,
- gint *end_x)
+ gint *start_x,
+ gint *end_x)
{
if (mts->meeting_positions_valid) {
if (mts->meeting_positions_in_scroll_area) {
@@ -2317,12 +2316,12 @@ e_meeting_time_selector_get_meeting_time_positions (EMeetingTimeSelector *mts,
}
/* This recalculates the date format to used, by computing the width of the
- longest date strings in the widget's font and seeing if they fit. */
+ * longest date strings in the widget's font and seeing if they fit. */
static void
e_meeting_time_selector_recalc_date_format (EMeetingTimeSelector *mts)
{
/* An array of dates, one for each month in the year 2000. They must
- all be Sundays. */
+ * all be Sundays. */
static const gint days[12] = { 23, 20, 19, 23, 21, 18,
23, 20, 17, 22, 19, 24 };
GDate date;
@@ -2341,7 +2340,7 @@ e_meeting_time_selector_recalc_date_format (EMeetingTimeSelector *mts)
max_date_width = mts->day_width - 2;
/* Find the biggest full weekday name. We start on a particular
- Monday and go through seven days. */
+ * Monday and go through seven days. */
g_date_clear (&date, 1);
g_date_set_dmy (&date, 3, 1, 2000); /* Monday 3rd Jan 2000. */
longest_weekday_width = 0;
@@ -2370,13 +2369,13 @@ e_meeting_time_selector_recalc_date_format (EMeetingTimeSelector *mts)
}
/* See if we can use the full date. We want to use a date with a
- month day > 20 and also the longest weekday. We use a
- pre-calculated array of days for each month and add on the
- weekday (which is 1 (Mon) to 7 (Sun). */
+ * month day > 20 and also the longest weekday. We use a
+ * pre-calculated array of days for each month and add on the
+ * weekday (which is 1 (Mon) to 7 (Sun). */
g_date_set_dmy (&date, days[longest_month - 1] + longest_weekday,
longest_month, 2000);
/* This is a strftime() format string %A = full weekday name,
- %B = full month name, %d = month day, %Y = full year. */
+ * %B = full month name, %d = month day, %Y = full year. */
g_date_strftime (buffer, sizeof (buffer), _("%A, %B %d, %Y"), &date);
#if 0
@@ -2407,7 +2406,7 @@ e_meeting_time_selector_recalc_date_format (EMeetingTimeSelector *mts)
g_date_set_dmy (&date, days[longest_month - 1] + longest_weekday,
longest_month, 2000);
/* This is a strftime() format string %a = abbreviated weekday name,
- %m = month number, %d = month day, %Y = full year. */
+ * %m = month number, %d = month day, %Y = full year. */
g_date_strftime (buffer, sizeof (buffer), _("%a %m/%d/%Y"), &date);
#if 0
@@ -2426,10 +2425,10 @@ e_meeting_time_selector_recalc_date_format (EMeetingTimeSelector *mts)
}
/* Turn off the background of the canvas windows. This reduces flicker
- considerably when scrolling. (Why isn't it in GnomeCanvas?). */
+ * considerably when scrolling. (Why isn't it in GnomeCanvas?). */
static void
e_meeting_time_selector_on_canvas_realized (GtkWidget *widget,
- EMeetingTimeSelector *mts)
+ EMeetingTimeSelector *mts)
{
GdkWindow *window;
@@ -2438,12 +2437,12 @@ e_meeting_time_selector_on_canvas_realized (GtkWidget *widget,
}
/* This is called when the meeting start time GnomeDateEdit is changed,
- either via the "date_changed". "time_changed" or "activate" signals on one
- of the GtkEntry widgets. So don't use the widget parameter since it may be
- one of the child GtkEntry widgets. */
+ * either via the "date_changed". "time_changed" or "activate" signals on one
+ * of the GtkEntry widgets. So don't use the widget parameter since it may be
+ * one of the child GtkEntry widgets. */
static void
e_meeting_time_selector_on_start_time_changed (GtkWidget *widget,
- EMeetingTimeSelector *mts)
+ EMeetingTimeSelector *mts)
{
gint duration_days, duration_hours, duration_minutes;
EMeetingTime mtstime;
@@ -2484,12 +2483,12 @@ e_meeting_time_selector_on_start_time_changed (GtkWidget *widget,
}
/* This is called when the meeting end time GnomeDateEdit is changed,
- either via the "date_changed", "time_changed" or "activate" signals on one
- of the GtkEntry widgets. So don't use the widget parameter since it may be
- one of the child GtkEntry widgets. */
+ * either via the "date_changed", "time_changed" or "activate" signals on one
+ * of the GtkEntry widgets. So don't use the widget parameter since it may be
+ * one of the child GtkEntry widgets. */
static void
e_meeting_time_selector_on_end_time_changed (GtkWidget *widget,
- EMeetingTimeSelector *mts)
+ EMeetingTimeSelector *mts)
{
EMeetingTime mtstime;
gint hour = 0, minute = 0;
@@ -2517,7 +2516,7 @@ e_meeting_time_selector_on_end_time_changed (GtkWidget *widget,
/* If the start time is after the end time, set it to the same time. */
if (e_meeting_time_compare_times (&mtstime, &mts->meeting_start_time) <= 0) {
/* We set it first, before updating the widget, so the signal
- handler will just return. */
+ * handler will just return. */
mts->meeting_start_time = mtstime;
if (mts->all_day)
g_date_subtract_days (&mts->meeting_start_time.date, 1);
@@ -2533,7 +2532,7 @@ e_meeting_time_selector_on_end_time_changed (GtkWidget *widget,
}
/* This updates the ranges shown in the GnomeDateEdit popup menus, according
- to working_hours_only etc. */
+ * to working_hours_only etc. */
static void
e_meeting_time_selector_update_date_popup_menus (EMeetingTimeSelector *mts)
{
@@ -2557,8 +2556,8 @@ e_meeting_time_selector_update_date_popup_menus (EMeetingTimeSelector *mts)
static void
e_meeting_time_selector_on_canvas_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation,
- EMeetingTimeSelector *mts)
+ GtkAllocation *allocation,
+ EMeetingTimeSelector *mts)
{
e_meeting_time_selector_update_main_canvas_scroll_region (mts);
@@ -2566,7 +2565,9 @@ e_meeting_time_selector_on_canvas_size_allocate (GtkWidget *widget,
}
static gboolean
-e_meeting_time_selector_on_canvas_scroll_event (GtkWidget *widget, GdkEventScroll *event, EMeetingTimeSelector *mts)
+e_meeting_time_selector_on_canvas_scroll_event (GtkWidget *widget,
+ GdkEventScroll *event,
+ EMeetingTimeSelector *mts)
{
gboolean return_val = FALSE;
@@ -2577,8 +2578,8 @@ e_meeting_time_selector_on_canvas_scroll_event (GtkWidget *widget, GdkEventScrol
}
/* This updates the canvas scroll regions according to the number of attendees.
- If the total height needed is less than the height of the canvas, we must
- use the height of the canvas, or it causes problems. */
+ * If the total height needed is less than the height of the canvas, we must
+ * use the height of the canvas, or it causes problems. */
static void
e_meeting_time_selector_update_main_canvas_scroll_region (EMeetingTimeSelector *mts)
{
@@ -2596,13 +2597,13 @@ e_meeting_time_selector_update_main_canvas_scroll_region (EMeetingTimeSelector *
}
/* This changes the meeting time based on the given x coordinate and whether
- we are dragging the start or end bar. It returns the new position, which
- will be swapped if the start bar is dragged past the end bar or vice versa.
- It make sure the meeting time is never dragged outside the visible canvas
- area. */
+ * we are dragging the start or end bar. It returns the new position, which
+ * will be swapped if the start bar is dragged past the end bar or vice versa.
+ * It make sure the meeting time is never dragged outside the visible canvas
+ * area. */
void
e_meeting_time_selector_drag_meeting_time (EMeetingTimeSelector *mts,
- gint x)
+ gint x)
{
EMeetingTime first_time, last_time, drag_time, *time_to_set;
gint scroll_x, scroll_y, canvas_width;
@@ -2635,7 +2636,7 @@ e_meeting_time_selector_drag_meeting_time (EMeetingTimeSelector *mts,
}
/* Calculate the minimum & maximum times we can use, based on the
- scroll offsets and whether zoomed_out is set. */
+ * scroll offsets and whether zoomed_out is set. */
e_meeting_time_selector_calculate_time (mts, scroll_x, &first_time);
e_meeting_time_selector_calculate_time (mts, scroll_x + canvas_width - 1,
&last_time);
@@ -2665,7 +2666,7 @@ e_meeting_time_selector_drag_meeting_time (EMeetingTimeSelector *mts,
e_meeting_time_selector_calculate_time (mts, x, &drag_time);
/* Calculate the nearest half-hour or hour, depending on whether
- zoomed_out is set. */
+ * zoomed_out is set. */
if (!mts->all_day) {
if (mts->zoomed_out) {
if (drag_time.minute > 30)
@@ -2749,8 +2750,8 @@ e_meeting_time_selector_drag_meeting_time (EMeetingTimeSelector *mts,
}
/* This is the timeout function which handles auto-scrolling when the user is
- dragging one of the meeting time vertical bars outside the left or right
- edge of the canvas. */
+ * dragging one of the meeting time vertical bars outside the left or right
+ * edge of the canvas. */
static gboolean
e_meeting_time_selector_timeout_handler (gpointer data)
{
@@ -2797,7 +2798,7 @@ e_meeting_time_selector_timeout_handler (gpointer data)
scroll_x = CLAMP (scroll_x, 0, max_scroll_x);
/* Calculate the minimum or maximum visible time in the canvas, which
- we will now set the dragged time to. */
+ * we will now set the dragged time to. */
if (scroll_offset > 0) {
e_meeting_time_selector_calculate_time (mts,
scroll_x + canvas_width - 1,
@@ -2890,9 +2891,9 @@ e_meeting_time_selector_timeout_handler (gpointer data)
scroll:
/* Redraw the canvases. We freeze and thaw the layouts so that they
- get redrawn completely. Otherwise the pixels get scrolled left or
- right which is not good for us (since our vertical bars have been
- moved) and causes flicker. */
+ * get redrawn completely. Otherwise the pixels get scrolled left or
+ * right which is not good for us (since our vertical bars have been
+ * moved) and causes flicker. */
gnome_canvas_scroll_to (GNOME_CANVAS (mts->display_main),
scroll_x, scroll_y);
gnome_canvas_scroll_to (GNOME_CANVAS (mts->display_top),
@@ -2943,7 +2944,7 @@ e_meeting_time_selector_update_end_date_edit (EMeetingTimeSelector *mts)
}
/* This ensures that the meeting time is shown on screen, by scrolling the
- canvas and possibly by changing the range of dates shown in the canvas. */
+ * canvas and possibly by changing the range of dates shown in the canvas. */
static void
e_meeting_time_selector_ensure_meeting_time_shown (EMeetingTimeSelector *mts)
{
@@ -2983,7 +2984,7 @@ e_meeting_time_selector_ensure_meeting_time_shown (EMeetingTimeSelector *mts)
}
/* This updates the range of dates shown in the canvas, to make sure that the
- currently selected meeting time is in the range. */
+ * currently selected meeting time is in the range. */
static void
e_meeting_time_selector_update_dates_shown (EMeetingTimeSelector *mts)
{
@@ -2997,10 +2998,10 @@ e_meeting_time_selector_update_dates_shown (EMeetingTimeSelector *mts)
}
/* This checks if the time's hour is over 24 or its minute is over 60 and if
- so it updates the day/hour appropriately. Note that hours and minutes are
- stored in guint8's so they can't overflow by much. */
+ * so it updates the day/hour appropriately. Note that hours and minutes are
+ * stored in guint8's so they can't overflow by much. */
void
-e_meeting_time_selector_fix_time_overflows (EMeetingTime*mtstime)
+e_meeting_time_selector_fix_time_overflows (EMeetingTime *mtstime)
{
gint hours_to_add, days_to_add;
@@ -3023,16 +3024,16 @@ e_meeting_time_selector_fix_time_overflows (EMeetingTime*mtstime)
*/
/* This takes an x pixel coordinate within the entire canvas scroll region and
- returns the date in which it falls. If day_position is not NULL it also
- returns the x coordinate within the date, relative to the visible part of
- the canvas. It is used when painting the days in the item_draw function.
- Note that it must handle negative x coordinates in case we are dragging off
- the edge of the canvas. */
+ * returns the date in which it falls. If day_position is not NULL it also
+ * returns the x coordinate within the date, relative to the visible part of
+ * the canvas. It is used when painting the days in the item_draw function.
+ * Note that it must handle negative x coordinates in case we are dragging off
+ * the edge of the canvas. */
void
e_meeting_time_selector_calculate_day_and_position (EMeetingTimeSelector *mts,
- gint x,
- GDate *date,
- gint *day_position)
+ gint x,
+ GDate *date,
+ gint *day_position)
{
gint days_from_first_shown;
@@ -3052,9 +3053,12 @@ e_meeting_time_selector_calculate_day_and_position (EMeetingTimeSelector *mts,
}
/* This takes an x pixel coordinate within a day, and converts it to hours
- and minutes, depending on working_hours_only and zoomed_out. */
+ * and minutes, depending on working_hours_only and zoomed_out. */
void
-e_meeting_time_selector_convert_day_position_to_hours_and_mins (EMeetingTimeSelector *mts, gint day_position, guint8 *hours, guint8 *minutes)
+e_meeting_time_selector_convert_day_position_to_hours_and_mins (EMeetingTimeSelector *mts,
+ gint day_position,
+ guint8 *hours,
+ guint8 *minutes)
{
if (mts->zoomed_out)
day_position *= 3;
@@ -3068,14 +3072,14 @@ e_meeting_time_selector_convert_day_position_to_hours_and_mins (EMeetingTimeSele
}
/* This takes an x pixel coordinate within the entire canvas scroll region and
- returns the time in which it falls. Note that it won't be extremely
- accurate since hours may only be a few pixels wide in the display.
- With zoomed_out set each pixel may represent 5 minutes or more, depending
- on how small the font is. */
+ * returns the time in which it falls. Note that it won't be extremely
+ * accurate since hours may only be a few pixels wide in the display.
+ * With zoomed_out set each pixel may represent 5 minutes or more, depending
+ * on how small the font is. */
void
e_meeting_time_selector_calculate_time (EMeetingTimeSelector *mts,
- gint x,
- EMeetingTime*time)
+ gint x,
+ EMeetingTime *time)
{
gint day_position;
@@ -3093,23 +3097,23 @@ e_meeting_time_selector_calculate_time (EMeetingTimeSelector *mts,
}
/* This takes a EMeetingTime and calculates the x pixel coordinate
- within the entire canvas scroll region. It is used to draw the selected
- meeting time and all the busy periods. */
+ * within the entire canvas scroll region. It is used to draw the selected
+ * meeting time and all the busy periods. */
gint
e_meeting_time_selector_calculate_time_position (EMeetingTimeSelector *mts,
- EMeetingTime *mtstime)
+ EMeetingTime *mtstime)
{
gint x, date_offset, day_offset;
/* Calculate the number of days since the first date shown in the
- entire canvas scroll region. */
+ * entire canvas scroll region. */
date_offset = g_date_get_julian (&mtstime->date) - g_date_get_julian (&mts->first_date_shown);
/* Calculate the x pixel coordinate of the start of the day. */
x = date_offset * mts->day_width;
/* Add on the hours and minutes, depending on whether zoomed_out and
- working_hours_only are set. */
+ * working_hours_only are set. */
day_offset = (mtstime->hour - mts->first_hour_shown) * 60
+ mtstime->minute;
/* The day width includes an extra vertical grid line so subtract 1. */
@@ -3123,7 +3127,10 @@ e_meeting_time_selector_calculate_time_position (EMeetingTimeSelector *mts,
}
static void
-row_inserted_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
+row_inserted_cb (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer data)
{
EMeetingTimeSelector *mts = E_MEETING_TIME_SELECTOR (data);
gint row = gtk_tree_path_get_indices (path)[0];
@@ -3139,7 +3146,10 @@ row_inserted_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpoi
}
static void
-row_changed_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
+row_changed_cb (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer data)
{
EMeetingTimeSelector *mts = E_MEETING_TIME_SELECTOR (data);
gint row = gtk_tree_path_get_indices (path)[0];
@@ -3149,7 +3159,9 @@ row_changed_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpoin
}
static void
-row_deleted_cb (GtkTreeModel *model, GtkTreePath *path, gpointer data)
+row_deleted_cb (GtkTreeModel *model,
+ GtkTreePath *path,
+ gpointer data)
{
EMeetingTimeSelector *mts = E_MEETING_TIME_SELECTOR (data);
diff --git a/calendar/gui/e-meeting-time-sel.h b/calendar/gui/e-meeting-time-sel.h
index 051901c0ee..7f45242006 100644
--- a/calendar/gui/e-meeting-time-sel.h
+++ b/calendar/gui/e-meeting-time-sel.h
@@ -68,10 +68,10 @@
G_BEGIN_DECLS
/* This is used to specify the format used when displaying the dates.
- The full format is like 'Sunday, September 12, 1999'. The abbreviated format
- is like 'Sun 12/9/99'. The short format is like '12/9/99'. The actual
- format used is determined in e_meeting_time_selector_style_set (), once we
- know the font being used. */
+ * The full format is like 'Sunday, September 12, 1999'. The abbreviated format
+ * is like 'Sun 12/9/99'. The short format is like '12/9/99'. The actual
+ * format used is determined in e_meeting_time_selector_style_set (), once we
+ * know the font being used. */
typedef enum
{
E_MEETING_TIME_SELECTOR_DATE_FULL,
@@ -80,7 +80,7 @@ typedef enum
} EMeetingTimeSelectorDateFormat;
/* This is used to specify a position regarding the vertical bars around the
- current meeting time, so we know which one is being dragged. */
+ * current meeting time, so we know which one is being dragged. */
typedef enum
{
E_MEETING_TIME_SELECTOR_POS_NONE,
@@ -89,7 +89,7 @@ typedef enum
} EMeetingTimeSelectorPosition;
/* This is used to specify the autopick option, which determines how we choose
- the previous/next appropriate meeting time. */
+ * the previous/next appropriate meeting time. */
typedef enum
{
E_MEETING_TIME_SELECTOR_ALL_PEOPLE_AND_RESOURCES,
@@ -109,7 +109,7 @@ typedef struct _EMeetingTimeSelectorPrivate EMeetingTimeSelectorPrivate;
struct _EMeetingTimeSelector {
/* We subclass a GtkTable which makes it easy to add extra widgets
- if neccesary. */
+ * if neccesary. */
GtkTable table;
EMeetingTimeSelectorPrivate *priv;
@@ -119,12 +119,12 @@ struct _EMeetingTimeSelector {
*/
/* This contains our keyboard accelerators, which need to be added to
- the toplevel window. */
+ * the toplevel window. */
GtkAccelGroup *accel_group;
/* The vbox in the top-left corner, containing the 'All Attendees'
- title bar packed at the end. Extra widgets can be added here
- with PACK_START if necessary. */
+ * title bar packed at the end. Extra widgets can be added here
+ * with PACK_START if necessary. */
GtkWidget *attendees_vbox;
GtkWidget *attendees_vbox_spacer;
@@ -133,13 +133,13 @@ struct _EMeetingTimeSelector {
EMeetingListView *list_view;
/* The canvas displaying the dates, times, and the summary
- 'All Attendees' free/busy display. */
+ * 'All Attendees' free/busy display. */
GtkWidget *display_top;
GnomeCanvasItem *item_top;
/* The canvas containing the free/busy displays of individual
- attendees. This is separate from display_top since it also scrolls
- vertically. */
+ * attendees. This is separate from display_top since it also scrolls
+ * vertically. */
GtkWidget *display_main;
GnomeCanvasItem *item_main;
@@ -197,7 +197,7 @@ struct _EMeetingTimeSelector {
gboolean all_day;
/* If this is TRUE we only show hours between day_start_hour and
- day_end_hour, defaults to TRUE (9am-6pm). */
+ * day_end_hour, defaults to TRUE (9am-6pm). */
gboolean working_hours_only;
gint day_start_hour;
gint day_start_minute;
@@ -205,7 +205,7 @@ struct _EMeetingTimeSelector {
gint day_end_minute;
/* If TRUE, view is compressed, with one cell for every 3 hours rather
- than every hour. Defaults to FALSE. */
+ * than every hour. Defaults to FALSE. */
gboolean zoomed_out;
/*
@@ -213,7 +213,7 @@ struct _EMeetingTimeSelector {
*/
/* These are the first & last dates shown in the current scroll area.
- We show E_MEETING_TIME_SELECTOR_DAYS_SHOWN days at a time. */
+ * We show E_MEETING_TIME_SELECTOR_DAYS_SHOWN days at a time. */
GDate first_date_shown;
GDate last_date_shown;
@@ -222,25 +222,25 @@ struct _EMeetingTimeSelector {
EMeetingTime meeting_end_time;
/* These are the x pixel coordinates in the entire scroll region of
- the start and end times. Set to meeting_positions_valid to FALSE to
- invalidate. They will then be recomputed when needed. Always access
- with e_meeting_time_selector_get_meeting_time_positions (). */
+ * the start and end times. Set to meeting_positions_valid to FALSE to
+ * invalidate. They will then be recomputed when needed. Always access
+ * with e_meeting_time_selector_get_meeting_time_positions (). */
gint meeting_positions_valid;
gint meeting_positions_in_scroll_area;
gint meeting_start_x;
gint meeting_end_x;
/* These are the width and height of the cells, including the grid
- lines which are displayed on the right and top or bottom of cells.*/
+ * lines which are displayed on the right and top or bottom of cells.*/
gint row_height;
gint col_width;
/* This is the width of a day in the display, which depends on
- col_width, working_hours_only and zoomed_out. */
+ * col_width, working_hours_only and zoomed_out. */
gint day_width;
/* These are the first and last hour of each day we display, depending
- on working_hours_only and zoomed_out. */
+ * on working_hours_only and zoomed_out. */
gint first_hour_shown;
gint last_hour_shown;
@@ -248,12 +248,12 @@ struct _EMeetingTimeSelector {
guint auto_scroll_timeout_id;
/* This specifies if we are dragging one of the vertical bars around
- the meeting time. */
+ * the meeting time. */
EMeetingTimeSelectorPosition dragging_position;
/* The last x coordinate of the mouse, relative to either the left or
- right edge of the canvas. Used in the auto_scroll_timeout function
- to determine which way to scroll and how fast. */
+ * right edge of the canvas. Used in the auto_scroll_timeout function
+ * to determine which way to scroll and how fast. */
gint last_drag_x;
/* This is used to determine the delay between scrolls. */
@@ -300,9 +300,9 @@ void e_meeting_time_selector_set_week_start_day
gint week_start_day);
/* This returns the currently selected meeting time.
- Note that months are 1-12 and days are 1-31. The start time is guaranteed to
- be before or equal to the end time. You may want to check if they are equal
- if that if it is a problem. */
+ * Note that months are 1-12 and days are 1-31. The start time is guaranteed to
+ * be before or equal to the end time. You may want to check if they are equal
+ * if that if it is a problem. */
void e_meeting_time_selector_get_meeting_time
(EMeetingTimeSelector *mts,
gint *start_year,
@@ -389,8 +389,8 @@ gboolean e_meeting_time_selector_attendee_add_busy_period
*/
/* This returns the x pixel coordinates of the meeting start and end times,
- in the entire canvas scroll area. If it returns FALSE, then the meeting
- time isn't in the current scroll area (which shouldn't really happen). */
+ * in the entire canvas scroll area. If it returns FALSE, then the meeting
+ * time isn't in the current scroll area (which shouldn't really happen). */
gboolean e_meeting_time_selector_get_meeting_time_positions
(EMeetingTimeSelector *mts,
gint *start_x,
@@ -404,7 +404,7 @@ void e_meeting_time_selector_remove_timeout
(EMeetingTimeSelector *mts);
void e_meeting_time_selector_fix_time_overflows
- (EMeetingTime*mtstime);
+ (EMeetingTime *mtstime);
void e_meeting_time_selector_calculate_day_and_position
(EMeetingTimeSelector *mts,
@@ -419,7 +419,7 @@ void e_meeting_time_selector_convert_day_position_to_hours_and_mins
void e_meeting_time_selector_calculate_time
(EMeetingTimeSelector *mts,
gint x,
- EMeetingTime*time);
+ EMeetingTime *time);
gint e_meeting_time_selector_calculate_time_position
(EMeetingTimeSelector *mts,
EMeetingTime *mtstime);
diff --git a/calendar/gui/e-meeting-types.h b/calendar/gui/e-meeting-types.h
index 6e7115cad9..50964f1619 100644
--- a/calendar/gui/e-meeting-types.h
+++ b/calendar/gui/e-meeting-types.h
@@ -34,10 +34,10 @@ typedef struct _EMeetingTime EMeetingTime;
typedef struct _EMeetingFreeBusyPeriod EMeetingFreeBusyPeriod;
/* These are used to specify whether an attendee is free or busy at a
- particular time. We'll probably replace this with a global calendar type.
- These should be ordered in increasing order of preference. Higher precedence
- busy periods will be painted over lower precedence ones. These are also
- used as for loop counters, so they should start at 0 and be ordered. */
+ * particular time. We'll probably replace this with a global calendar type.
+ * These should be ordered in increasing order of preference. Higher precedence
+ * busy periods will be painted over lower precedence ones. These are also
+ * used as for loop counters, so they should start at 0 and be ordered. */
typedef enum
{
E_MEETING_FREE_BUSY_TENTATIVE = 0,
@@ -49,7 +49,7 @@ typedef enum
} EMeetingFreeBusyType;
/* This is our representation of a time. We use a GDate to store the day,
- and guint8s for the hours and minutes. */
+ * and guint8s for the hours and minutes. */
struct _EMeetingTime
{
GDate date;
diff --git a/calendar/gui/e-meeting-utils.c b/calendar/gui/e-meeting-utils.c
index ac11881bf4..369e819fc3 100644
--- a/calendar/gui/e-meeting-utils.c
+++ b/calendar/gui/e-meeting-utils.c
@@ -28,8 +28,8 @@
#include "e-meeting-utils.h"
gint
-e_meeting_time_compare_times (EMeetingTime*time1,
- EMeetingTime*time2)
+e_meeting_time_compare_times (EMeetingTime *time1,
+ EMeetingTime *time2)
{
gint day_comparison;
diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c
index d8388d066b..872408c8da 100644
--- a/calendar/gui/e-memo-table.c
+++ b/calendar/gui/e-memo-table.c
@@ -121,8 +121,8 @@ memo_table_emit_status_message (EMemoTable *memo_table,
}
/* Returns the current time, for the ECellDateEdit items.
- FIXME: Should probably use the timezone of the item rather than the
- current timezone, though that may be difficult to get from here. */
+ * FIXME: Should probably use the timezone of the item rather than the
+ * current timezone, though that may be difficult to get from here. */
static struct tm
memo_table_get_current_time (ECellDateEdit *ecde,
gpointer user_data)
@@ -765,7 +765,8 @@ memo_table_cut_clipboard (ESelectable *selectable)
/* Helper for memo_table_copy_clipboard() */
static void
-copy_row_cb (gint model_row, gpointer data)
+copy_row_cb (gint model_row,
+ gpointer data)
{
EMemoTable *memo_table;
ECalModelComponent *comp_data;
@@ -976,7 +977,8 @@ memo_table_paste_clipboard (ESelectable *selectable)
* gint pointed to by the closure data.
*/
static void
-get_selected_row_cb (gint model_row, gpointer data)
+get_selected_row_cb (gint model_row,
+ gpointer data)
{
gint *row;
@@ -1261,7 +1263,8 @@ struct get_selected_uids_closure {
/* Used from e_table_selected_row_foreach(), builds a list of the selected UIDs */
static void
-add_uid_cb (gint model_row, gpointer data)
+add_uid_cb (gint model_row,
+ gpointer data)
{
struct get_selected_uids_closure *closure;
ECalModelComponent *comp_data;
diff --git a/calendar/gui/e-select-names-editable.c b/calendar/gui/e-select-names-editable.c
index 6b541e170a..040993595a 100644
--- a/calendar/gui/e-select-names-editable.c
+++ b/calendar/gui/e-select-names-editable.c
@@ -158,7 +158,7 @@ e_select_names_editable_get_emails (ESelectNamesEditable *esne)
if (e_destination_get_contact (destination) &&
e_contact_get (e_destination_get_contact (destination), E_CONTACT_IS_LIST)) {
/* If its a contact_list which is not expanded, it wont have a email id,
- so we can use the name as the email id */
+ * so we can use the name as the email id */
result = g_list_append (result, g_strdup (e_destination_get_name (destination)));
} else
@@ -227,7 +227,9 @@ e_select_names_editable_get_names (ESelectNamesEditable *esne)
}
void
-e_select_names_editable_set_address (ESelectNamesEditable *esne, const gchar *name, const gchar *email)
+e_select_names_editable_set_address (ESelectNamesEditable *esne,
+ const gchar *name,
+ const gchar *email)
{
EDestinationStore *destination_store;
GList *destinations;
diff --git a/calendar/gui/e-select-names-renderer.c b/calendar/gui/e-select-names-renderer.c
index 3e92636b4b..e5326c108f 100644
--- a/calendar/gui/e-select-names-renderer.c
+++ b/calendar/gui/e-select-names-renderer.c
@@ -53,7 +53,8 @@ static gint signals[LAST_SIGNAL];
G_DEFINE_TYPE (ESelectNamesRenderer, e_select_names_renderer, GTK_TYPE_CELL_RENDERER_TEXT)
static void
-e_select_names_renderer_editing_done (GtkCellEditable *editable, ESelectNamesRenderer *cell)
+e_select_names_renderer_editing_done (GtkCellEditable *editable,
+ ESelectNamesRenderer *cell)
{
GList *addresses = NULL, *names = NULL, *a, *n;
gboolean editing_canceled;
@@ -101,8 +102,13 @@ e_select_names_renderer_editing_done (GtkCellEditable *editable, ESelectNamesRen
}
static GtkCellEditable *
-e_select_names_renderer_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, const gchar *path,
- const GdkRectangle *bg_area, const GdkRectangle *cell_area, GtkCellRendererState flags)
+e_select_names_renderer_start_editing (GtkCellRenderer *cell,
+ GdkEvent *event,
+ GtkWidget *widget,
+ const gchar *path,
+ const GdkRectangle *bg_area,
+ const GdkRectangle *cell_area,
+ GtkCellRendererState flags)
{
ESelectNamesRenderer *sn_cell = E_SELECT_NAMES_RENDERER (cell);
GtkCellRendererText *text_cell = GTK_CELL_RENDERER_TEXT (cell);
@@ -128,7 +134,7 @@ e_select_names_renderer_start_editing (GtkCellRenderer *cell, GdkEvent *event, G
g_signal_connect (editable, "editing_done", G_CALLBACK (e_select_names_renderer_editing_done), sn_cell);
/* Removed focus-out-event. focus out event already listen by base class.
- We don't need to listen for the focus out event any more */
+ * We don't need to listen for the focus out event any more */
sn_cell->priv->editable = g_object_ref (editable);
sn_cell->priv->path = g_strdup (path);
@@ -137,11 +143,14 @@ e_select_names_renderer_start_editing (GtkCellRenderer *cell, GdkEvent *event, G
}
static void
-e_select_names_renderer_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+e_select_names_renderer_get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *pspec)
{
ESelectNamesRenderer *esnr = E_SELECT_NAMES_RENDERER (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_NAME:
g_value_set_string (value, esnr->priv->name);
break;
@@ -154,11 +163,14 @@ e_select_names_renderer_get_property (GObject *object, guint prop_id, GValue *va
}
static void
-e_select_names_renderer_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
+e_select_names_renderer_set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
ESelectNamesRenderer *esnr = E_SELECT_NAMES_RENDERER (object);
- switch (prop_id) {
+ switch (property_id) {
case PROP_NAME:
g_free (esnr->priv->name);
esnr->priv->name = g_strdup (g_value_get_string (value));
diff --git a/calendar/gui/e-task-table.c b/calendar/gui/e-task-table.c
index 9125206196..ec49cd1478 100644
--- a/calendar/gui/e-task-table.c
+++ b/calendar/gui/e-task-table.c
@@ -128,7 +128,9 @@ task_table_emit_status_message (ETaskTable *task_table,
}
static gint
-task_table_percent_compare_cb (gconstpointer a, gconstpointer b, gpointer cmp_cache)
+task_table_percent_compare_cb (gconstpointer a,
+ gconstpointer b,
+ gpointer cmp_cache)
{
gint percent1 = GPOINTER_TO_INT (a);
gint percent2 = GPOINTER_TO_INT (b);
@@ -137,7 +139,9 @@ task_table_percent_compare_cb (gconstpointer a, gconstpointer b, gpointer cmp_ca
}
static gint
-task_table_priority_compare_cb (gconstpointer a, gconstpointer b, gpointer cmp_cache)
+task_table_priority_compare_cb (gconstpointer a,
+ gconstpointer b,
+ gpointer cmp_cache)
{
gint priority1, priority2;
@@ -155,7 +159,8 @@ task_table_priority_compare_cb (gconstpointer a, gconstpointer b, gpointer cmp_c
}
static const gchar *
-get_cache_str (gpointer cmp_cache, const gchar *str)
+get_cache_str (gpointer cmp_cache,
+ const gchar *str)
{
const gchar *value;
@@ -175,7 +180,9 @@ get_cache_str (gpointer cmp_cache, const gchar *str)
}
static gboolean
-same_cache_string (gpointer cmp_cache, const gchar *str_a, const gchar *str_b)
+same_cache_string (gpointer cmp_cache,
+ const gchar *str_a,
+ const gchar *str_b)
{
if (!cmp_cache)
return g_utf8_collate (str_a, str_b) == 0;
@@ -189,7 +196,9 @@ same_cache_string (gpointer cmp_cache, const gchar *str_a, const gchar *str_b)
}
static gint
-task_table_status_compare_cb (gconstpointer a, gconstpointer b, gpointer cmp_cache)
+task_table_status_compare_cb (gconstpointer a,
+ gconstpointer b,
+ gpointer cmp_cache)
{
const gchar *string_a = a;
const gchar *string_b = b;
@@ -502,7 +511,7 @@ task_table_constructed (GObject *object)
/* Priority field. */
cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
- g_object_set (G_OBJECT (cell),
+ g_object_set (cell,
"strikeout_column", E_CAL_MODEL_TASKS_FIELD_STRIKEOUT,
"bold_column", E_CAL_MODEL_TASKS_FIELD_OVERDUE,
"bg_color_column", E_CAL_MODEL_FIELD_COLOR,
@@ -527,7 +536,7 @@ task_table_constructed (GObject *object)
/* Percent field. */
cell = e_cell_percent_new (NULL, GTK_JUSTIFY_LEFT);
- g_object_set (G_OBJECT (cell),
+ g_object_set (cell,
"strikeout_column", E_CAL_MODEL_TASKS_FIELD_STRIKEOUT,
"bold_column", E_CAL_MODEL_TASKS_FIELD_OVERDUE,
"bg_color_column", E_CAL_MODEL_FIELD_COLOR,
@@ -540,8 +549,8 @@ task_table_constructed (GObject *object)
strings = NULL;
for (percent = 0; percent <= 100; percent += 10) {
/* Translators: "%d%%" is the percentage of a task done.
- %d is the actual value, %% is replaced with a percent sign.
- Result values will be 0%, 10%, 20%, ... 100%
+ * %d is the actual value, %% is replaced with a percent sign.
+ * Result values will be 0%, 10%, 20%, ... 100%
*/
strings = g_list_append (strings, g_strdup_printf (_("%d%%"), percent));
}
@@ -556,7 +565,7 @@ task_table_constructed (GObject *object)
/* Transparency field. */
cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
- g_object_set (G_OBJECT (cell),
+ g_object_set (cell,
"strikeout_column", E_CAL_MODEL_TASKS_FIELD_STRIKEOUT,
"bold_column", E_CAL_MODEL_TASKS_FIELD_OVERDUE,
"bg_color_column", E_CAL_MODEL_FIELD_COLOR,
@@ -579,7 +588,7 @@ task_table_constructed (GObject *object)
/* Status field. */
cell = e_cell_text_new (NULL, GTK_JUSTIFY_LEFT);
- g_object_set (G_OBJECT (cell),
+ g_object_set (cell,
"strikeout_column", E_CAL_MODEL_TASKS_FIELD_STRIKEOUT,
"bold_column", E_CAL_MODEL_TASKS_FIELD_OVERDUE,
"bg_color_column", E_CAL_MODEL_FIELD_COLOR,
@@ -998,7 +1007,8 @@ task_table_cut_clipboard (ESelectable *selectable)
/* Helper for task_table_copy_clipboard() */
static void
-copy_row_cb (gint model_row, gpointer data)
+copy_row_cb (gint model_row,
+ gpointer data)
{
ETaskTable *task_table;
ECalModelComponent *comp_data;
@@ -1209,7 +1219,8 @@ task_table_paste_clipboard (ESelectable *selectable)
* gint pointed to by the closure data.
*/
static void
-get_selected_row_cb (gint model_row, gpointer data)
+get_selected_row_cb (gint model_row,
+ gpointer data)
{
gint *row;
@@ -1240,7 +1251,8 @@ get_selected_comp (ETaskTable *task_table)
}
static void
-add_retract_data (ECalComponent *comp, const gchar *retract_comment)
+add_retract_data (ECalComponent *comp,
+ const gchar *retract_comment)
{
icalcomponent *icalcomp = NULL;
icalproperty *icalprop = NULL;
@@ -1255,7 +1267,8 @@ add_retract_data (ECalComponent *comp, const gchar *retract_comment)
}
static gboolean
-check_for_retract (ECalComponent *comp, ECalClient *client)
+check_for_retract (ECalComponent *comp,
+ ECalClient *client)
{
ECalComponentOrganizer org;
gchar *email = NULL;
@@ -1567,7 +1580,8 @@ struct get_selected_uids_closure {
/* Used from e_table_selected_row_foreach(), builds a list of the selected UIDs */
static void
-add_uid_cb (gint model_row, gpointer data)
+add_uid_cb (gint model_row,
+ gpointer data)
{
struct get_selected_uids_closure *closure = data;
ECalModelComponent *comp_data;
@@ -1748,10 +1762,11 @@ show_completed_rows (ECalModel *model,
}
/* Returns the current time, for the ECellDateEdit items.
- FIXME: Should probably use the timezone of the item rather than the
- current timezone, though that may be difficult to get from here. */
+ * FIXME: Should probably use the timezone of the item rather than the
+ * current timezone, though that may be difficult to get from here. */
static struct tm
-e_task_table_get_current_time (ECellDateEdit *ecde, gpointer data)
+e_task_table_get_current_time (ECellDateEdit *ecde,
+ gpointer data)
{
ETaskTable *task_table = data;
ECalModel *model;
diff --git a/calendar/gui/e-timezone-entry.c b/calendar/gui/e-timezone-entry.c
index 3318e666db..a3288b1115 100644
--- a/calendar/gui/e-timezone-entry.c
+++ b/calendar/gui/e-timezone-entry.c
@@ -38,14 +38,14 @@
struct _ETimezoneEntryPrivate {
/* The current timezone, set in e_timezone_entry_set_timezone()
- or from the timezone dialog. Note that we don't copy it or
- use a ref count - we assume it is never destroyed for the
- lifetime of this widget. */
+ * or from the timezone dialog. Note that we don't copy it or
+ * use a ref count - we assume it is never destroyed for the
+ * lifetime of this widget. */
icaltimezone *timezone;
/* This can be set to the default timezone. If the current timezone
- setting in the ETimezoneEntry matches this, then the entry field
- is hidden. This makes the user interface simpler. */
+ * setting in the ETimezoneEntry matches this, then the entry field
+ * is hidden. This makes the user interface simpler. */
icaltimezone *default_zone;
GtkWidget *entry;
@@ -85,8 +85,8 @@ timezone_entry_update_entry (ETimezoneEntry *timezone_entry)
display_name = icaltimezone_get_display_name (timezone);
/* We check if it is one of our builtin timezone
- names, in which case we call gettext to translate
- it. If it isn't a builtin timezone name, we don't. */
+ * names, in which case we call gettext to translate
+ * it. If it isn't a builtin timezone name, we don't. */
if (icaltimezone_get_builtin_timezone (display_name))
display_name = _(display_name);
} else
@@ -150,7 +150,7 @@ timezone_entry_add_relation (ETimezoneEntry *timezone_entry)
}
/* The arrow button beside the date field has been clicked, so we show the
- popup with the ECalendar in. */
+ * popup with the ECalendar in. */
static void
timezone_entry_button_clicked_cb (ETimezoneEntry *timezone_entry)
{
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index 917d7de46d..8aa50a99e2 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -217,7 +217,7 @@ week_view_event_item_button_press (EWeekViewEventItem *event_item,
return FALSE;
/* Remember the item clicked and the mouse position,
- so we can start a drag if the mouse moves. */
+ * so we can start a drag if the mouse moves. */
week_view->drag_event_x = bevent->button.x;
week_view->drag_event_y = bevent->button.y;
@@ -239,7 +239,7 @@ week_view_event_item_button_press (EWeekViewEventItem *event_item,
week_view, event->start, event->end);
e_week_view_show_popup_menu (
- week_view, (GdkEventButton*) bevent,
+ week_view, (GdkEventButton *) bevent,
event_item->priv->event_num);
g_signal_stop_emission_by_name (
item->canvas, "button_press_event");
@@ -500,7 +500,7 @@ week_view_event_item_draw_icons (EWeekViewEventItem *event_item,
}
/* This draws a little triangle to indicate that an event extends past
- the days visible on screen. */
+ * the days visible on screen. */
static void
week_view_event_item_draw_triangle (EWeekViewEventItem *event_item,
cairo_t *cr,
@@ -574,7 +574,7 @@ week_view_event_item_draw_triangle (EWeekViewEventItem *event_item,
cr, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BORDER]);
/* If the height is odd we can use the same central point for both
- lines. If it is even we use different end-points. */
+ * lines. If it is even we use different end-points. */
c1 = c2 = y + (h / 2);
if (h % 2 == 0)
c1--;
@@ -811,7 +811,7 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item,
cairo_save (cr);
draw_curved_rectangle (cr, cx0, cy0, rect_width, rect_height, radius);
cairo_set_line_width (cr, 2.0);
- cairo_set_source_rgb (cr, red/cc, green/cc, blue/cc);
+ cairo_set_source_rgb (cr, red / cc, green / cc, blue / cc);
cairo_stroke (cr);
cairo_restore (cr);
}
@@ -833,13 +833,13 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item,
pat = cairo_pattern_create_linear (
rect_x + 2, y1 + 1, rect_x + 2, y2 - 7.25);
cairo_pattern_add_color_stop_rgba (
- pat, 1, red/cc, green/cc, blue/cc, 0.8);
+ pat, 1, red / cc, green / cc, blue / cc, 0.8);
cairo_pattern_add_color_stop_rgba (
- pat, 0, red/cc, green/cc, blue/cc, 0.4);
+ pat, 0, red / cc, green / cc, blue / cc, 0.4);
cairo_set_source (cr, pat);
cairo_fill_preserve (cr);
cairo_pattern_destroy (pat);
- cairo_set_source_rgba (cr, red/cc, green/cc, blue/cc, 0.2);
+ cairo_set_source_rgba (cr, red / cc, green / cc, blue / cc, 0.2);
cairo_set_line_width (cr, 0.5);
cairo_stroke (cr);
cairo_restore (cr);
@@ -900,9 +900,9 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item,
- E_WEEK_VIEW_EVENT_R_PAD + 1;
/* Draw the triangles at the start & end, if needed.
- They also use the first few pixels at the edge of the
- event so we update rect_x & rect_w so we don't draw over
- them. */
+ * They also use the first few pixels at the edge of the
+ * event so we update rect_x & rect_w so we don't draw over
+ * them. */
if (event->start < week_view->day_starts[span->start_day]) {
draw_start_triangle = TRUE;
rect_x += 2;
@@ -928,7 +928,7 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item,
cairo_save (cr);
draw_curved_rectangle (cr, cx0, cy0, rect_width, rect_height, radius);
cairo_set_line_width (cr, 2.0);
- cairo_set_source_rgb (cr, red/cc, green/cc, blue/cc);
+ cairo_set_source_rgb (cr, red / cc, green / cc, blue / cc);
cairo_stroke (cr);
cairo_restore (cr);
}
@@ -950,13 +950,13 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item,
pat = cairo_pattern_create_linear (
rect_x + 2, y1 + 1, rect_x + 2, y2 - 7.25);
cairo_pattern_add_color_stop_rgba (
- pat, 1, red/cc, green/cc, blue/cc, 0.8);
+ pat, 1, red / cc, green / cc, blue / cc, 0.8);
cairo_pattern_add_color_stop_rgba (
- pat, 0, red/cc, green/cc, blue/cc, 0.4);
+ pat, 0, red / cc, green / cc, blue / cc, 0.4);
cairo_set_source (cr, pat);
cairo_fill_preserve (cr);
cairo_pattern_destroy (pat);
- cairo_set_source_rgba (cr, red/cc, green/cc, blue/cc, 0.2);
+ cairo_set_source_rgba (cr, red / cc, green / cc, blue / cc, 0.2);
cairo_set_line_width (cr, 0.5);
cairo_stroke (cr);
cairo_restore (cr);
@@ -1009,12 +1009,12 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item,
editing_span = TRUE;
/* Draw the start & end times, if they are not on day
- boundaries. The start time would always be shown if it was
- needed, though it may be clipped as the window shrinks.
- The end time is only displayed if there is enough room.
- We calculate the minimum position for the end time, which
- depends on whether the start time is displayed. If the end
- time doesn't fit, then we don't draw it. */
+ * boundaries. The start time would always be shown if it was
+ * needed, though it may be clipped as the window shrinks.
+ * The end time is only displayed if there is enough room.
+ * We calculate the minimum position for the end time, which
+ * depends on whether the start time is displayed. If the end
+ * time doesn't fit, then we don't draw it. */
min_end_time_x = x1 + E_WEEK_VIEW_EVENT_L_PAD
+ E_WEEK_VIEW_EVENT_BORDER_WIDTH
+ E_WEEK_VIEW_EVENT_EDGE_X_PAD;
@@ -1040,7 +1040,7 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item,
cairo_restore (cr);
/* We don't want the end time to be drawn over the
- start time, so we increase the minimum position. */
+ * start time, so we increase the minimum position. */
min_end_time_x += time_width
+ E_WEEK_VIEW_EVENT_TIME_X_PAD;
}
@@ -1059,7 +1059,7 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item,
- time_width;
/* Draw the end time, if the position is greater than
- the minimum calculated above. */
+ * the minimum calculated above. */
if (time_x >= min_end_time_x) {
week_view_draw_time (
week_view, cr, time_x,
diff --git a/calendar/gui/e-week-view-layout.c b/calendar/gui/e-week-view-layout.c
index 0b776adcfa..b2fc7ca158 100644
--- a/calendar/gui/e-week-view-layout.c
+++ b/calendar/gui/e-week-view-layout.c
@@ -47,15 +47,15 @@ static gint e_week_view_find_span_end (gboolean multi_week_view,
gint display_start_day,
gint day);
-GArray*
-e_week_view_layout_events (GArray *events,
- GArray *old_spans,
- gboolean multi_week_view,
- gint weeks_shown,
- gboolean compress_weekend,
- gint start_weekday,
- time_t *day_starts,
- gint *rows_per_day)
+GArray *
+e_week_view_layout_events (GArray *events,
+ GArray *old_spans,
+ gboolean multi_week_view,
+ gint weeks_shown,
+ gboolean compress_weekend,
+ gint start_weekday,
+ time_t *day_starts,
+ gint *rows_per_day)
{
EWeekViewEvent *event;
EWeekViewEventSpan *span;
@@ -64,9 +64,9 @@ e_week_view_layout_events (GArray *events,
GArray *spans;
/* This is a temporary 2-d grid which is used to place events.
- Each element is 0 if the position is empty, or 1 if occupied.
- We allocate the maximum size possible here, assuming that each
- event will need its own row. */
+ * Each element is 0 if the position is empty, or 1 if occupied.
+ * We allocate the maximum size possible here, assuming that each
+ * event will need its own row. */
grid = g_new0 (guint8, E_WEEK_VIEW_MAX_ROWS_PER_CELL * 7
* E_WEEK_VIEW_MAX_WEEKS);
@@ -80,7 +80,7 @@ e_week_view_layout_events (GArray *events,
}
/* Iterate over the events, finding which weeks they cover, and putting
- them in the first free row available. */
+ * them in the first free row available. */
for (event_num = 0; event_num < events->len; event_num++) {
event = &g_array_index (events, EWeekViewEvent, event_num);
e_week_view_layout_event (event, grid, spans, old_spans,
@@ -110,16 +110,16 @@ e_week_view_layout_events (GArray *events,
}
static void
-e_week_view_layout_event (EWeekViewEvent *event,
- guint8 *grid,
- GArray *spans,
- GArray *old_spans,
- gboolean multi_week_view,
- gint weeks_shown,
- gboolean compress_weekend,
- gint start_weekday,
- time_t *day_starts,
- gint *rows_per_day)
+e_week_view_layout_event (EWeekViewEvent *event,
+ guint8 *grid,
+ GArray *spans,
+ GArray *old_spans,
+ gboolean multi_week_view,
+ gint weeks_shown,
+ gboolean compress_weekend,
+ gint start_weekday,
+ time_t *day_starts,
+ gint *rows_per_day)
{
gint start_day, end_day, span_start_day, span_end_day, rows_per_cell;
gint free_row, row, day, span_num, spans_index, num_spans, days_shown;
@@ -139,7 +139,7 @@ e_week_view_layout_event (EWeekViewEvent *event,
#endif
/* Iterate through each of the spans of the event, where each span
- is a sequence of 1 or more days displayed next to each other. */
+ * is a sequence of 1 or more days displayed next to each other. */
span_start_day = start_day;
rows_per_cell = E_WEEK_VIEW_MAX_ROWS_PER_CELL;
span_num = 0;
@@ -156,7 +156,7 @@ e_week_view_layout_event (EWeekViewEvent *event,
span_end_day);
#endif
/* Try each row until we find a free one or we fall off the
- bottom of the available rows. */
+ * bottom of the available rows. */
row = 0;
free_row = -1;
while (free_row == -1 && row < rows_per_cell) {
@@ -184,7 +184,7 @@ e_week_view_layout_event (EWeekViewEvent *event,
span_start_day, span_end_day, free_row);
#endif
/* Add the span to the array, and try to reuse any
- canvas items from the old spans. */
+ * canvas items from the old spans. */
span.start_day = span_start_day;
span.num_days = span_end_day - span_start_day + 1;
span.row = free_row;
@@ -214,14 +214,14 @@ e_week_view_layout_event (EWeekViewEvent *event,
}
/* Finds the day containing the given time.
- If include_midnight_in_prev_day is TRUE then if the time exactly
- matches the start of a day the previous day is returned. This is useful
- when calculating the end day of an event. */
+ * If include_midnight_in_prev_day is TRUE then if the time exactly
+ * matches the start of a day the previous day is returned. This is useful
+ * when calculating the end day of an event. */
static gint
-e_week_view_find_day (time_t time_to_find,
- gboolean include_midnight_in_prev_day,
- gint days_shown,
- time_t *day_starts)
+e_week_view_find_day (time_t time_to_find,
+ gboolean include_midnight_in_prev_day,
+ gint days_shown,
+ time_t *day_starts)
{
gint day;
@@ -243,16 +243,16 @@ e_week_view_find_day (time_t time_to_find,
}
/* This returns the last possible day in the same span as the given day.
- A span is all the days which are displayed next to each other from left to
- right. In the week view all spans are only 1 day, since Tuesday is below
- Monday rather than beside it etc. In the month view, if the weekends are not
- compressed then each week is a span, otherwise we have to break a span up
- on Saturday, use a separate span for Sunday, and start again on Monday. */
+ * A span is all the days which are displayed next to each other from left to
+ * right. In the week view all spans are only 1 day, since Tuesday is below
+ * Monday rather than beside it etc. In the month view, if the weekends are not
+ * compressed then each week is a span, otherwise we have to break a span up
+ * on Saturday, use a separate span for Sunday, and start again on Monday. */
static gint
-e_week_view_find_span_end (gboolean multi_week_view,
- gboolean compress_weekend,
- gint display_start_day,
- gint day)
+e_week_view_find_span_end (gboolean multi_week_view,
+ gboolean compress_weekend,
+ gint display_start_day,
+ gint day)
{
gint week, col, sat_col, end_col;
@@ -264,7 +264,7 @@ e_week_view_find_span_end (gboolean multi_week_view,
end_col = 6;
/* If the weekend is compressed we must end any spans on
- Saturday and Sunday. */
+ * Saturday and Sunday. */
if (compress_weekend) {
sat_col = (5 + 7 - display_start_day) % 7;
if (col <= sat_col)
@@ -280,14 +280,14 @@ e_week_view_find_span_end (gboolean multi_week_view,
}
void
-e_week_view_layout_get_day_position (gint day,
- gboolean multi_week_view,
- gint weeks_shown,
- gint display_start_day,
- gboolean compress_weekend,
- gint *day_x,
- gint *day_y,
- gint *rows)
+e_week_view_layout_get_day_position (gint day,
+ gboolean multi_week_view,
+ gint weeks_shown,
+ gint display_start_day,
+ gboolean compress_weekend,
+ gint *day_x,
+ gint *day_y,
+ gint *rows)
{
gint week, day_of_week, col, weekend_col;
@@ -302,8 +302,8 @@ e_week_view_layout_get_day_position (gint day,
day_of_week = (display_start_day + day) % 7;
if (compress_weekend && day_of_week >= 5) {
/* In the compressed view Saturday is above Sunday and
- both have just one row as opposed to 2 for all the
- other days. */
+ * both have just one row as opposed to 2 for all the
+ * other days. */
if (day_of_week == 5) {
*day_y = week * 2;
*rows = 1;
@@ -316,10 +316,10 @@ e_week_view_layout_get_day_position (gint day,
*day_x = col;
} else {
/* If the weekend is compressed and the day is after
- the weekend we have to move back a column. */
+ * the weekend we have to move back a column. */
if (compress_weekend) {
/* Calculate where the weekend column is.
- Note that 5 is Saturday. */
+ * Note that 5 is Saturday. */
weekend_col = (5 + 7 - display_start_day) % 7;
if (col > weekend_col)
col--;
@@ -412,20 +412,20 @@ e_week_view_layout_get_day_position (gint day,
}
/* Returns TRUE if the event span is visible or FALSE if it isn't.
- It also returns the number of days of the span that are visible.
- Usually this can easily be determined by the start & end days and row of
- the span, which are set in e_week_view_layout_event (). Though we need a
- special case for the weekends when they are compressed, since the span may
- not fit. */
+ * It also returns the number of days of the span that are visible.
+ * Usually this can easily be determined by the start & end days and row of
+ * the span, which are set in e_week_view_layout_event (). Though we need a
+ * special case for the weekends when they are compressed, since the span may
+ * not fit. */
gboolean
-e_week_view_layout_get_span_position (EWeekViewEvent *event,
- EWeekViewEventSpan *span,
- gint rows_per_cell,
- gint rows_per_compressed_cell,
- gint display_start_day,
- gboolean multi_week_view,
- gboolean compress_weekend,
- gint *span_num_days)
+e_week_view_layout_get_span_position (EWeekViewEvent *event,
+ EWeekViewEventSpan *span,
+ gint rows_per_cell,
+ gint rows_per_compressed_cell,
+ gint display_start_day,
+ gboolean multi_week_view,
+ gboolean compress_weekend,
+ gint *span_num_days)
{
gint end_day_of_week;
@@ -440,9 +440,9 @@ e_week_view_layout_get_span_position (EWeekViewEvent *event,
if (multi_week_view) {
if (compress_weekend) {
/* If it ends on a Saturday and is 1 day glong
- we skip it, else we shorten it. If it ends
- on a Sunday it must be 1 day long and we
- skip it. */
+ * we skip it, else we shorten it. If it ends
+ * on a Sunday it must be 1 day long and we
+ * skip it. */
if (end_day_of_week == 5) { /* Sat */
if (*span_num_days == 1) {
return FALSE;
diff --git a/calendar/gui/e-week-view-layout.h b/calendar/gui/e-week-view-layout.h
index 98bf1ccb3a..5f1e2870d4 100644
--- a/calendar/gui/e-week-view-layout.h
+++ b/calendar/gui/e-week-view-layout.h
@@ -29,9 +29,9 @@
G_BEGIN_DECLS
/* I've split these functions away from EWeekView so we can use them for
- printing. */
+ * printing. */
-GArray* e_week_view_layout_events (GArray *events,
+GArray * e_week_view_layout_events (GArray *events,
GArray *old_spans,
gboolean multi_week_view,
gint weeks_shown,
@@ -41,8 +41,8 @@ GArray* e_week_view_layout_events (GArray *events,
gint *rows_per_day);
/* Returns which 'cell' in the table the day appears in. Note that most days
- have a height of 2 rows, but Sat/Sun are sometimes compressed so they have
- a height of only 1 row. */
+ * have a height of 2 rows, but Sat/Sun are sometimes compressed so they have
+ * a height of only 1 row. */
void e_week_view_layout_get_day_position (gint day,
gboolean multi_week_view,
gint weeks_shown,
diff --git a/calendar/gui/e-week-view-main-item.c b/calendar/gui/e-week-view-main-item.c
index 03cf3b56d4..bca3343b67 100644
--- a/calendar/gui/e-week-view-main-item.c
+++ b/calendar/gui/e-week-view-main-item.c
@@ -121,10 +121,10 @@ week_view_main_item_draw_day (EWeekViewMainItem *main_item,
working_days = calendar_config_get_working_days ();
/* Draw the background of the day. In the month view odd months are
- one color and even months another, so you can easily see when each
- month starts (defaults are white for odd - January, March, ... and
- light gray for even). In the week view the background is always the
- same color, the color used for the odd months in the month view. */
+ * one color and even months another, so you can easily see when each
+ * month starts (defaults are white for odd - January, March, ... and
+ * light gray for even). In the week view the background is always the
+ * same color, the color used for the odd months in the month view. */
if (today)
bg_color = &week_view->colors[E_WEEK_VIEW_COLOR_TODAY_BACKGROUND];
else if ((working_days & day_of_week) == 0)
@@ -141,8 +141,8 @@ week_view_main_item_draw_day (EWeekViewMainItem *main_item,
cairo_restore (cr);
/* Draw the lines on the right and bottom of the cell. The canvas is
- sized so that the lines on the right & bottom edges will be off the
- edge of the canvas, so we don't have to worry about them. */
+ * sized so that the lines on the right & bottom edges will be off the
+ * edge of the canvas, so we don't have to worry about them. */
right_edge = x + width - 1;
bottom_edge = y + height - 1;
@@ -188,10 +188,10 @@ week_view_main_item_draw_day (EWeekViewMainItem *main_item,
cairo_restore (cr);
/* Display the date in the top of the cell.
- In the week view, display the long format "10 January" in all cells,
- or abbreviate it to "10 Jan" or "10" if that doesn't fit.
- In the month view, only use the long format for the first cell and
- the 1st of each month, otherwise use "10". */
+ * In the week view, display the long format "10 January" in all cells,
+ * or abbreviate it to "10 Jan" or "10" if that doesn't fit.
+ * In the month view, only use the long format for the first cell and
+ * the 1st of each month, otherwise use "10". */
show_day_name = FALSE;
show_month_name = FALSE;
if (!week_view->multi_week_view) {
@@ -209,32 +209,32 @@ week_view_main_item_draw_day (EWeekViewMainItem *main_item,
+ week_view->space_width * 2
+ week_view->month_widths[month - 1] < max_width)
/* strftime format %A = full weekday name, %d = day of
- month, %B = full month name. You can change the
- order but don't change the specifiers or add
- anything. */
+ * month, %B = full month name. You can change the
+ * order but don't change the specifiers or add
+ * anything. */
format_string = _("%A %d %B");
else if (week_view->max_abbr_day_width
+ week_view->digit_width * 2
+ week_view->space_width * 2
+ week_view->abbr_month_widths[month - 1] < max_width)
/* strftime format %a = abbreviated weekday name,
- %d = day of month, %b = abbreviated month name.
- You can change the order but don't change the
- specifiers or add anything. */
+ * %d = day of month, %b = abbreviated month name.
+ * You can change the order but don't change the
+ * specifiers or add anything. */
format_string = _("%a %d %b");
}
if (!format_string && show_month_name) {
if (week_view->digit_width * 2 + week_view->space_width
+ week_view->month_widths[month - 1] < max_width)
/* strftime format %d = day of month, %B = full
- month name. You can change the order but don't
- change the specifiers or add anything. */
+ * month name. You can change the order but don't
+ * change the specifiers or add anything. */
format_string = _("%d %B");
else if (week_view->digit_width * 2 + week_view->space_width
+ week_view->abbr_month_widths[month - 1] < max_width)
/* strftime format %d = day of month, %b = abbreviated
- month name. You can change the order but don't
- change the specifiers or add anything. */
+ * month name. You can change the order but don't
+ * change the specifiers or add anything. */
format_string = _("%d %b");
}
diff --git a/calendar/gui/e-week-view-titles-item.c b/calendar/gui/e-week-view-titles-item.c
index f808e693b1..66f9930534 100644
--- a/calendar/gui/e-week-view-titles-item.c
+++ b/calendar/gui/e-week-view-titles-item.c
@@ -157,11 +157,11 @@ week_view_titles_item_draw (GnomeCanvasItem *canvas_item,
abbreviated = (week_view->max_day_width + 2 >= col_width);
/* Shift right one pixel to account for the shadow around the main
- canvas. */
+ * canvas. */
x--;
/* Draw the date. Set a clipping rectangle so we don't draw over the
- next day. */
+ * next day. */
weekday = week_view->display_start_day;
for (col = 0; col < week_view->columns; col++) {
if (weekday == 5 && week_view->compress_weekend)
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 2385b9f189..a98ff42776 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -75,7 +75,7 @@
#define E_WEEK_VIEW_JUMP_BUTTON_NO_FOCUS -1
/* The timeout before we do a layout, so we don't do a layout for each event
- we get from the server. */
+ * we get from the server. */
#define E_WEEK_VIEW_LAYOUT_TIMEOUT 100
typedef struct {
@@ -236,7 +236,8 @@ week_view_process_component (EWeekView *week_view,
}
static void
-week_view_update_row (EWeekView *week_view, gint row)
+week_view_update_row (EWeekView *week_view,
+ gint row)
{
ECalModelComponent *comp_data;
ECalModel *model;
@@ -384,11 +385,11 @@ week_view_time_range_changed_cb (EWeekView *week_view,
week_start_offset = (weekday + 7 - week_view->display_start_day) % 7;
/* Set the day_offset to the result, so we move back to the
- start of the week. */
+ * start of the week. */
day_offset = week_start_offset;
/* Calculate the base date, i.e. the first day shown when the
- scrollbar adjustment value is 0. */
+ * scrollbar adjustment value is 0. */
base_date = date;
g_date_subtract_days (&base_date, day_offset);
@@ -411,8 +412,8 @@ week_view_time_range_changed_cb (EWeekView *week_view,
}
/* Reset the adjustment value to 0 if the base address has changed.
- Note that we do this after updating first_day_shown so that our
- signal handler will not try to reload the events. */
+ * Note that we do this after updating first_day_shown so that our
+ * signal handler will not try to reload the events. */
if (update_adjustment_value) {
GtkRange *range;
GtkAdjustment *adjustment;
@@ -460,7 +461,7 @@ timezone_changed_cb (ECalModel *cal_model,
return;
/* Recalculate the new start of the first week. We just use exactly
- the same time, but with the new timezone. */
+ * the same time, but with the new timezone. */
tt.year = g_date_get_year (&week_view->first_day_shown);
tt.month = g_date_get_month (&week_view->first_day_shown);
tt.day = g_date_get_day (&week_view->first_day_shown);
@@ -854,8 +855,10 @@ e_week_view_new (ECalModel *model)
view = g_object_new (E_TYPE_WEEK_VIEW, "model", model, NULL);
- g_signal_connect (G_OBJECT (model), "timezone_changed",
- G_CALLBACK (timezone_changed_cb), view);
+ g_signal_connect (
+ model, "timezone_changed",
+ G_CALLBACK (timezone_changed_cb), view);
+
return view;
}
@@ -923,7 +926,8 @@ e_week_view_realize (GtkWidget *widget)
}
static GdkColor
-color_inc (GdkColor c, gint amount)
+color_inc (GdkColor c,
+ gint amount)
{
#define dec(x) \
if (x + amount >= 0 \
@@ -944,7 +948,8 @@ color_inc (GdkColor c, gint amount)
}
static void
-e_week_view_set_colors (EWeekView *week_view, GtkWidget *widget)
+e_week_view_set_colors (EWeekView *week_view,
+ GtkWidget *widget)
{
GtkStyle *style;
@@ -988,7 +993,8 @@ e_week_view_unrealize (GtkWidget *widget)
}
static gint
-get_string_width (PangoLayout *layout, const gchar *string)
+get_string_width (PangoLayout *layout,
+ const gchar *string)
{
gint width;
@@ -1022,7 +1028,9 @@ get_digit_width (PangoLayout *layout)
}
static GdkColor
-e_week_view_get_text_color (EWeekView *week_view, EWeekViewEvent *event, GtkWidget *widget)
+e_week_view_get_text_color (EWeekView *week_view,
+ EWeekViewEvent *event,
+ GtkWidget *widget)
{
GtkStyle *style;
GdkColor bg_color;
@@ -1042,7 +1050,7 @@ e_week_view_get_text_color (EWeekView *week_view, EWeekViewEvent *event, GtkWidg
style = gtk_widget_get_style (widget);
- if ((red/cc > 0.7) || (green/cc > 0.7) || (blue/cc > 0.7 ))
+ if ((red / cc > 0.7) || (green / cc > 0.7) || (blue / cc > 0.7 ))
return style->black;
else
return style->white;
@@ -1050,7 +1058,7 @@ e_week_view_get_text_color (EWeekView *week_view, EWeekViewEvent *event, GtkWidg
static void
e_week_view_style_set (GtkWidget *widget,
- GtkStyle *previous_style)
+ GtkStyle *previous_style)
{
EWeekView *week_view;
GtkStyle *style;
@@ -1099,7 +1107,7 @@ e_week_view_style_set (GtkWidget *widget,
week_view->row_height = MAX (week_view->row_height, E_WEEK_VIEW_ICON_HEIGHT + E_WEEK_VIEW_ICON_Y_PAD + E_WEEK_VIEW_EVENT_BORDER_HEIGHT * 2);
/* Check that the small font is smaller than the default font.
- If it isn't, we won't use it. */
+ * If it isn't, we won't use it. */
if (week_view->small_font_desc) {
if (PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics)) +
PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics))
@@ -1114,7 +1122,7 @@ e_week_view_style_set (GtkWidget *widget,
PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics)) + 5);
/* Save the sizes of various strings in the font, so we can quickly
- decide which date formats to use. */
+ * decide which date formats to use. */
max_day_width = 0;
max_abbr_day_width = 0;
@@ -1169,7 +1177,8 @@ e_week_view_style_set (GtkWidget *widget,
/* This recalculates the sizes of each column. */
static void
-e_week_view_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
+e_week_view_size_allocate (GtkWidget *widget,
+ GtkAllocation *allocation)
{
EWeekView *week_view;
GtkAllocation canvas_allocation;
@@ -1195,7 +1204,7 @@ e_week_view_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
0, 0, new_x2, new_y2);
/* Set the scroll region of the main canvas to its allocated width,
- but with the height depending on the number of rows needed. */
+ * but with the height depending on the number of rows needed. */
gnome_canvas_get_scroll_region (
GNOME_CANVAS (week_view->main_canvas),
NULL, NULL, &old_x2, &old_y2);
@@ -1239,10 +1248,10 @@ e_week_view_recalc_cell_sizes (EWeekView *week_view)
gtk_widget_get_allocation (week_view->main_canvas, &allocation);
/* Calculate the column sizes, using floating point so that pixels
- get divided evenly. Note that we use one more element than the
- number of columns, to make it easy to get the column widths.
- We also add one to the width so that the right border of the last
- column is off the edge of the displayed area. */
+ * get divided evenly. Note that we use one more element than the
+ * number of columns, to make it easy to get the column widths.
+ * We also add one to the width so that the right border of the last
+ * column is off the edge of the displayed area. */
canvas_width = allocation.width + 1;
canvas_width /= week_view->columns;
offset = 0;
@@ -1286,7 +1295,7 @@ e_week_view_recalc_cell_sizes (EWeekView *week_view)
pango_context_get_language (pango_context));
/* Calculate the number of rows of events in each cell, for the large
- cells and the compressed weekend cells. */
+ * cells and the compressed weekend cells. */
if (week_view->multi_week_view) {
week_view->events_y_offset = E_WEEK_VIEW_DATE_T_PAD +
+ PANGO_PIXELS (pango_font_metrics_get_ascent (font_metrics))
@@ -1313,7 +1322,7 @@ e_week_view_recalc_cell_sizes (EWeekView *week_view)
E_WEEK_VIEW_MAX_ROWS_PER_CELL);
/* Determine which time format to use, based on the width of the cells.
- We only allow the time to take up about half of the width. */
+ * We only allow the time to take up about half of the width. */
width = week_view->col_widths[0];
time_width = e_week_view_get_time_string_width (week_view);
@@ -1337,7 +1346,8 @@ e_week_view_recalc_cell_sizes (EWeekView *week_view)
}
static gint
-e_week_view_focus_in (GtkWidget *widget, GdkEventFocus *event)
+e_week_view_focus_in (GtkWidget *widget,
+ GdkEventFocus *event)
{
EWeekView *week_view;
@@ -1363,7 +1373,7 @@ e_week_view_focus_in (GtkWidget *widget, GdkEventFocus *event)
if (e_calendar_view_get_visible_time_range (E_CALENDAR_VIEW (week_view), &my_start, &my_end) &&
model_start == my_start && model_end == my_end) {
/* update only when the same time range is set in a view and in a model;
- otherwise time range change invokes also query update */
+ * otherwise time range change invokes also query update */
e_week_view_update_query (week_view);
}
}
@@ -1374,7 +1384,8 @@ e_week_view_focus_in (GtkWidget *widget, GdkEventFocus *event)
}
static gint
-e_week_view_focus_out (GtkWidget *widget, GdkEventFocus *event)
+e_week_view_focus_out (GtkWidget *widget,
+ GdkEventFocus *event)
{
EWeekView *week_view;
@@ -1406,11 +1417,11 @@ e_week_view_focus_out (GtkWidget *widget, GdkEventFocus *event)
**/
static gboolean
e_week_view_get_next_tab_event (EWeekView *week_view,
- GtkDirectionType direction,
- gint current_event_num,
- gint current_span_num,
- gint *next_event_num,
- gint *next_span_num)
+ GtkDirectionType direction,
+ gint current_event_num,
+ gint current_span_num,
+ gint *next_event_num,
+ gint *next_span_num)
{
gint event_num;
@@ -1453,7 +1464,8 @@ e_week_view_get_next_tab_event (EWeekView *week_view,
}
static gboolean
-e_week_view_focus (GtkWidget *widget, GtkDirectionType direction)
+e_week_view_focus (GtkWidget *widget,
+ GtkDirectionType direction)
{
EWeekView *week_view;
gint new_event_num;
@@ -1600,12 +1612,12 @@ e_week_view_update_query (EWeekView *week_view)
}
/* This sets the selected time range. The EWeekView will show the corresponding
- month and the days between start_time and end_time will be selected.
- To select a single day, use the same value for start_time & end_time. */
+ * month and the days between start_time and end_time will be selected.
+ * To select a single day, use the same value for start_time & end_time. */
static void
-e_week_view_set_selected_time_range (ECalendarView *cal_view,
- time_t start_time,
- time_t end_time)
+e_week_view_set_selected_time_range (ECalendarView *cal_view,
+ time_t start_time,
+ time_t end_time)
{
GDate date, end_date;
gint num_days;
@@ -1644,8 +1656,8 @@ e_week_view_set_selected_time_range (ECalendarView *cal_view,
num_days);
/* Reset the adjustment value to 0 if the base address has changed.
- Note that we do this after updating first_day_shown so that our
- signal handler will not try to reload the events. */
+ * Note that we do this after updating first_day_shown so that our
+ * signal handler will not try to reload the events. */
if (update_adjustment_value) {
GtkRange *range;
GtkAdjustment *adjustment;
@@ -1659,9 +1671,9 @@ e_week_view_set_selected_time_range (ECalendarView *cal_view,
}
void
-e_week_view_set_selected_time_range_visible (EWeekView *week_view,
- time_t start_time,
- time_t end_time)
+e_week_view_set_selected_time_range_visible (EWeekView *week_view,
+ time_t start_time,
+ time_t end_time)
{
GDate date, end_date;
gint num_days;
@@ -1697,9 +1709,9 @@ e_week_view_set_selected_time_range_visible (EWeekView *week_view,
/* Returns the selected time range. */
static gboolean
-e_week_view_get_selected_time_range (ECalendarView *cal_view,
- time_t *start_time,
- time_t *end_time)
+e_week_view_get_selected_time_range (ECalendarView *cal_view,
+ time_t *start_time,
+ time_t *end_time)
{
gint start_day, end_day;
EWeekView *week_view = E_WEEK_VIEW (cal_view);
@@ -1723,9 +1735,9 @@ e_week_view_get_selected_time_range (ECalendarView *cal_view,
/* Gets the visible time range. Returns FALSE if no time range has been set. */
static gboolean
-e_week_view_get_visible_time_range (ECalendarView *cal_view,
- time_t *start_time,
- time_t *end_time)
+e_week_view_get_visible_time_range (ECalendarView *cal_view,
+ time_t *start_time,
+ time_t *end_time)
{
gint num_days;
EWeekView *week_view = E_WEEK_VIEW (cal_view);
@@ -1743,17 +1755,17 @@ e_week_view_get_visible_time_range (ECalendarView *cal_view,
/* Note that the returned date may be invalid if no date has been set yet. */
void
-e_week_view_get_first_day_shown (EWeekView *week_view,
- GDate *date)
+e_week_view_get_first_day_shown (EWeekView *week_view,
+ GDate *date)
{
*date = week_view->first_day_shown;
}
/* This sets the first day shown in the view. It will be rounded down to the
- nearest week. */
+ * nearest week. */
void
-e_week_view_set_first_day_shown (EWeekView *week_view,
- GDate *date)
+e_week_view_set_first_day_shown (EWeekView *week_view,
+ GDate *date)
{
GDate base_date;
gint weekday, day_offset, num_days;
@@ -1781,7 +1793,7 @@ e_week_view_set_first_day_shown (EWeekView *week_view,
day_offset = (weekday + 7 - week_view->display_start_day) % 7;
/* Calculate the base date, i.e. the first day shown when the
- scrollbar adjustment value is 0. */
+ * scrollbar adjustment value is 0. */
base_date = *date;
g_date_subtract_days (&base_date, day_offset);
@@ -1809,7 +1821,7 @@ e_week_view_set_first_day_shown (EWeekView *week_view,
}
/* Try to keep the previous selection, but if it is no longer shown
- just select the first day. */
+ * just select the first day. */
if (week_view->selection_start_day != -1) {
week_view->selection_start_day = old_selection_start_julian
- g_date_get_julian (&base_date);
@@ -1829,8 +1841,8 @@ e_week_view_set_first_day_shown (EWeekView *week_view,
}
/* Reset the adjustment value to 0 if the base address has changed.
- Note that we do this after updating first_day_shown so that our
- signal handler will not try to reload the events. */
+ * Note that we do this after updating first_day_shown so that our
+ * signal handler will not try to reload the events. */
if (update_adjustment_value) {
GtkRange *range;
GtkAdjustment *adjustment;
@@ -1847,7 +1859,7 @@ e_week_view_set_first_day_shown (EWeekView *week_view,
/* Recalculates the time_t corresponding to the start of each day. */
static void
e_week_view_recalc_day_starts (EWeekView *week_view,
- time_t lower)
+ time_t lower)
{
gint num_days, day;
time_t tmp_time;
@@ -1864,7 +1876,10 @@ e_week_view_recalc_day_starts (EWeekView *week_view,
}
static void
-month_scrol_by_week_changed_cb (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data)
+month_scrol_by_week_changed_cb (GConfClient *client,
+ guint cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
{
EWeekView *week_view = user_data;
@@ -1878,7 +1893,7 @@ month_scrol_by_week_changed_cb (GConfClient *client, guint cnxn_id, GConfEntry *
}
gboolean
-e_week_view_get_multi_week_view (EWeekView *week_view)
+e_week_view_get_multi_week_view (EWeekView *week_view)
{
g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), FALSE);
@@ -1886,8 +1901,8 @@ e_week_view_get_multi_week_view (EWeekView *week_view)
}
void
-e_week_view_set_multi_week_view (EWeekView *week_view,
- gboolean multi_week_view)
+e_week_view_set_multi_week_view (EWeekView *week_view,
+ gboolean multi_week_view)
{
GtkRange *range;
GtkAdjustment *adjustment;
@@ -1946,7 +1961,8 @@ e_week_view_get_update_base_date (EWeekView *week_view)
}
void
-e_week_view_set_update_base_date (EWeekView *week_view, gboolean update_base_date)
+e_week_view_set_update_base_date (EWeekView *week_view,
+ gboolean update_base_date)
{
g_return_if_fail (E_IS_WEEK_VIEW (week_view));
@@ -1954,7 +1970,7 @@ e_week_view_set_update_base_date (EWeekView *week_view, gboolean update_base_dat
}
gint
-e_week_view_get_weeks_shown (EWeekView *week_view)
+e_week_view_get_weeks_shown (EWeekView *week_view)
{
g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), 1);
@@ -1962,8 +1978,8 @@ e_week_view_get_weeks_shown (EWeekView *week_view)
}
void
-e_week_view_set_weeks_shown (EWeekView *week_view,
- gint weeks_shown)
+e_week_view_set_weeks_shown (EWeekView *week_view,
+ gint weeks_shown)
{
GtkRange *range;
GtkAdjustment *adjustment;
@@ -2031,8 +2047,8 @@ e_week_view_set_compress_weekend (EWeekView *week_view,
need_reload = e_week_view_recalc_display_start_day (week_view);
/* If the display_start_day has changed we need to recalculate the
- date range shown and reload all events, otherwise we only need to
- do a reshape. */
+ * date range shown and reload all events, otherwise we only need to
+ * do a reshape. */
if (need_reload) {
/* Recalculate the days shown and reload if necessary. */
if (g_date_valid (&week_view->first_day_shown))
@@ -2078,7 +2094,7 @@ e_week_view_set_show_event_end_times (EWeekView *week_view,
}
static gboolean
-e_week_view_recalc_display_start_day (EWeekView *week_view)
+e_week_view_recalc_display_start_day (EWeekView *week_view)
{
ECalModel *model;
gint week_start_day;
@@ -2088,8 +2104,8 @@ e_week_view_recalc_display_start_day (EWeekView *week_view)
week_start_day = e_cal_model_get_week_start_day (model);
/* The display start day defaults to week_start_day, but we have
- to use Saturday if the weekend is compressed and week_start_day
- is Sunday. */
+ * to use Saturday if the weekend is compressed and week_start_day
+ * is Sunday. */
display_start_day = week_start_day;
if (display_start_day == 6
@@ -2106,7 +2122,8 @@ e_week_view_recalc_display_start_day (EWeekView *week_view)
/* Checks if the users participation status is NEEDS-ACTION and shows the summary as bold text */
static void
-set_text_as_bold (EWeekViewEvent *event, EWeekViewEventSpan *span)
+set_text_as_bold (EWeekViewEvent *event,
+ EWeekViewEventSpan *span)
{
ECalComponent *comp;
GSList *attendees = NULL, *l;
@@ -2131,8 +2148,8 @@ set_text_as_bold (EWeekViewEvent *event, EWeekViewEventSpan *span)
}
/* The attendee has not yet accepted the meeting, display the summary as bolded.
- If the attendee is not present, it might have come through a mailing list.
- In that case, we never show the meeting as bold even if it is unaccepted. */
+ * If the attendee is not present, it might have come through a mailing list.
+ * In that case, we never show the meeting as bold even if it is unaccepted. */
if (at && (at->status == ICAL_PARTSTAT_NEEDSACTION))
gnome_canvas_item_set (span->text_item, "bold", TRUE, NULL);
@@ -2142,13 +2159,13 @@ set_text_as_bold (EWeekViewEvent *event, EWeekViewEventSpan *span)
}
/* This calls a given function for each event instance that matches the given
- uid. Note that it is safe for the callback to remove the event (since we
- step backwards through the arrays). */
+ * uid. Note that it is safe for the callback to remove the event (since we
+ * step backwards through the arrays). */
static void
e_week_view_foreach_event_with_uid (EWeekView *week_view,
- const gchar *uid,
- EWeekViewForeachEventCallback callback,
- gpointer data)
+ const gchar *uid,
+ EWeekViewForeachEventCallback callback,
+ gpointer data)
{
EWeekViewEvent *event;
gint event_num;
@@ -2174,8 +2191,8 @@ e_week_view_foreach_event_with_uid (EWeekView *week_view,
static gboolean
e_week_view_remove_event_cb (EWeekView *week_view,
- gint event_num,
- gpointer data)
+ gint event_num,
+ gpointer data)
{
EWeekViewEvent *event;
EWeekViewEventSpan *span;
@@ -2189,7 +2206,7 @@ e_week_view_remove_event_cb (EWeekView *week_view,
return TRUE;
/* If we were editing this event, set editing_event_num to -1 so
- on_editing_stopped doesn't try to update the event. */
+ * on_editing_stopped doesn't try to update the event. */
if (week_view->editing_event_num == event_num)
week_view->editing_event_num = -1;
@@ -2202,7 +2219,7 @@ e_week_view_remove_event_cb (EWeekView *week_view,
if (week_view->spans) {
/* We leave the span elements in the array, but set the canvas item
- pointers to NULL. */
+ * pointers to NULL. */
for (span_num = 0; span_num < event->num_spans; span_num++) {
if (!is_array_index_in_bounds (week_view->spans, event->spans_index + span_num))
break;
@@ -2246,12 +2263,12 @@ e_week_view_remove_event_cb (EWeekView *week_view,
}
void
-e_week_view_get_day_position (EWeekView *week_view,
- gint day,
- gint *day_x,
- gint *day_y,
- gint *day_w,
- gint *day_h)
+e_week_view_get_day_position (EWeekView *week_view,
+ gint day,
+ gint *day_x,
+ gint *day_y,
+ gint *day_w,
+ gint *day_h)
{
gint cell_x, cell_y, cell_h;
@@ -2276,20 +2293,20 @@ e_week_view_get_day_position (EWeekView *week_view,
}
/* Returns the bounding box for a span of an event. Usually this can easily
- be determined by the start & end days and row of the span, which are set in
- e_week_view_layout_event (). Though we need a special case for the weekends
- when they are compressed, since the span may not fit.
- The bounding box includes the entire width of the days in the view (but
- not the vertical line down the right of the last day), though the displayed
- event doesn't normally extend to the edges of the day.
- It returns FALSE if the span isn't visible. */
+ * be determined by the start & end days and row of the span, which are set in
+ * e_week_view_layout_event (). Though we need a special case for the weekends
+ * when they are compressed, since the span may not fit.
+ * The bounding box includes the entire width of the days in the view (but
+ * not the vertical line down the right of the last day), though the displayed
+ * event doesn't normally extend to the edges of the day.
+ * It returns FALSE if the span isn't visible. */
gboolean
-e_week_view_get_span_position (EWeekView *week_view,
- gint event_num,
- gint span_num,
- gint *span_x,
- gint *span_y,
- gint *span_w)
+e_week_view_get_span_position (EWeekView *week_view,
+ gint event_num,
+ gint span_num,
+ gint *span_x,
+ gint *span_y,
+ gint *span_w)
{
EWeekViewEvent *event;
EWeekViewEventSpan *span;
@@ -2340,7 +2357,8 @@ e_week_view_get_span_position (EWeekView *week_view,
}
static gboolean
-ewv_pass_gdkevent_to_etext (EWeekView *week_view, GdkEvent *gevent)
+ewv_pass_gdkevent_to_etext (EWeekView *week_view,
+ GdkEvent *gevent)
{
g_return_val_if_fail (week_view != NULL, FALSE);
g_return_val_if_fail (gevent != NULL, FALSE);
@@ -2370,8 +2388,8 @@ ewv_pass_gdkevent_to_etext (EWeekView *week_view, GdkEvent *gevent)
static gboolean
e_week_view_on_button_press (GtkWidget *widget,
- GdkEventButton *event,
- EWeekView *week_view)
+ GdkEventButton *event,
+ EWeekView *week_view)
{
gint x, y, day;
@@ -2453,8 +2471,8 @@ e_week_view_on_button_press (GtkWidget *widget,
static gboolean
e_week_view_on_button_release (GtkWidget *widget,
- GdkEventButton *event,
- EWeekView *week_view)
+ GdkEventButton *event,
+ EWeekView *week_view)
{
#if 0
g_print ("In e_week_view_on_button_release\n");
@@ -2472,8 +2490,8 @@ e_week_view_on_button_release (GtkWidget *widget,
static gboolean
e_week_view_on_scroll (GtkWidget *widget,
- GdkEventScroll *scroll,
- EWeekView *week_view)
+ GdkEventScroll *scroll,
+ EWeekView *week_view)
{
GtkRange *range;
GtkAdjustment *adjustment;
@@ -2525,8 +2543,8 @@ e_week_view_on_scroll (GtkWidget *widget,
static gboolean
e_week_view_on_motion (GtkWidget *widget,
- GdkEventMotion *mevent,
- EWeekView *week_view)
+ GdkEventMotion *mevent,
+ EWeekView *week_view)
{
gint x, y, day;
@@ -2552,11 +2570,11 @@ e_week_view_on_motion (GtkWidget *widget,
}
/* Converts a position in the canvas window to a day offset from the first
- day displayed. Returns -1 if the position is outside the grid. */
+ * day displayed. Returns -1 if the position is outside the grid. */
static gint
e_week_view_convert_position_to_day (EWeekView *week_view,
- gint x,
- gint y)
+ gint x,
+ gint y)
{
gint col, row, grid_x = -1, grid_y = -1, week, day;
gint weekend_col;
@@ -2612,7 +2630,7 @@ e_week_view_convert_position_to_day (EWeekView *week_view,
static void
e_week_view_update_selection (EWeekView *week_view,
- gint day)
+ gint day)
{
gint tmp_day;
gboolean need_redraw = FALSE;
@@ -2704,10 +2722,10 @@ e_week_view_free_events (EWeekView *week_view)
/* This adds one event to the view, adding it to the appropriate array. */
static gboolean
e_week_view_add_event (ECalComponent *comp,
- time_t start,
- time_t end,
- gboolean prepend,
- gpointer data)
+ time_t start,
+ time_t end,
+ gboolean prepend,
+ gpointer data)
{
AddEventData *add_event_data;
@@ -2823,12 +2841,12 @@ e_week_view_ensure_events_sorted (EWeekView *week_view)
gint
e_week_view_event_sort_func (gconstpointer arg1,
- gconstpointer arg2)
+ gconstpointer arg2)
{
EWeekViewEvent *event1, *event2;
- event1 = (EWeekViewEvent*) arg1;
- event2 = (EWeekViewEvent*) arg2;
+ event1 = (EWeekViewEvent *) arg1;
+ event2 = (EWeekViewEvent *) arg2;
if (event1->start < event2->start)
return -1;
@@ -2919,7 +2937,9 @@ e_week_view_reshape_events (EWeekView *week_view)
}
static EWeekViewEvent *
-tooltip_get_view_event (EWeekView *week_view, gint day, gint event_num)
+tooltip_get_view_event (EWeekView *week_view,
+ gint day,
+ gint event_num)
{
EWeekViewEvent *pevent;
@@ -2932,7 +2952,8 @@ tooltip_get_view_event (EWeekView *week_view, gint day, gint event_num)
}
static void
-tooltip_destroy (EWeekView *week_view, GnomeCanvasItem *item)
+tooltip_destroy (EWeekView *week_view,
+ GnomeCanvasItem *item)
{
gint event_num = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "event-num"));
EWeekViewEvent *pevent;
@@ -2957,8 +2978,8 @@ tooltip_destroy (EWeekView *week_view, GnomeCanvasItem *item)
static gboolean
tooltip_event_cb (GnomeCanvasItem *item,
- GdkEvent *event,
- EWeekView *view)
+ GdkEvent *event,
+ EWeekView *view)
{
gint event_num = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "event-num"));
EWeekViewEvent *pevent;
@@ -2996,7 +3017,7 @@ tooltip_event_cb (GnomeCanvasItem *item,
pevent->tooltip = (GtkWidget *)g_object_get_data (G_OBJECT (view), "tooltip-window");
if (pevent->tooltip) {
- e_calendar_view_move_tip (pevent->tooltip, pevent->x+16, pevent->y+16);
+ e_calendar_view_move_tip (pevent->tooltip, pevent->x + 16, pevent->y + 16);
}
return TRUE;
@@ -3010,7 +3031,9 @@ tooltip_event_cb (GnomeCanvasItem *item,
}
static const gchar *
-get_comp_summary (ECalClient *client, icalcomponent *icalcomp, gboolean *free_text)
+get_comp_summary (ECalClient *client,
+ icalcomponent *icalcomp,
+ gboolean *free_text)
{
const gchar *my_summary, *location;
const gchar *summary;
@@ -3037,8 +3060,8 @@ get_comp_summary (ECalClient *client, icalcomponent *icalcomp, gboolean *free_te
static void
e_week_view_reshape_event_span (EWeekView *week_view,
- gint event_num,
- gint span_num)
+ gint event_num,
+ gint span_num)
{
EWeekViewEvent *event;
EWeekViewEventSpan *span;
@@ -3074,7 +3097,7 @@ e_week_view_reshape_event_span (EWeekView *week_view,
one_day_event = e_week_view_is_one_day_event (week_view, event_num);
/* If the span will not be visible destroy the canvas items and
- return. */
+ * return. */
if (!e_week_view_get_span_position (week_view, event_num, span_num,
&span_x, &span_y, &span_w)) {
if (span->background_item)
@@ -3096,7 +3119,7 @@ e_week_view_reshape_event_span (EWeekView *week_view,
layout = pango_layout_new (pango_context);
/* If we are editing a long event we don't show the icons and the EText
- item uses the maximum width available. */
+ * item uses the maximum width available. */
if (!one_day_event && week_view->editing_event_num == event_num
&& week_view->editing_span_num == span_num) {
show_icons = FALSE;
@@ -3178,11 +3201,11 @@ e_week_view_reshape_event_span (EWeekView *week_view,
}
/* Calculate the position of the text item.
- For events < 1 day it starts after the times & icons and ends at the
- right edge of the span.
- For events >= 1 day we need to determine whether times are shown at
- the start and end of the span, then try to center the text item with
- the icons in the middle, but making sure we don't go over the times.
+ * For events < 1 day it starts after the times & icons and ends at the
+ * right edge of the span.
+ * For events >= 1 day we need to determine whether times are shown at
+ * the start and end of the span, then try to center the text item with
+ * the icons in the middle, but making sure we don't go over the times.
*/
/* Calculate the space necessary to display a time, e.g. "13:00". */
@@ -3202,16 +3225,16 @@ e_week_view_reshape_event_span (EWeekView *week_view,
if (one_day_event) {
/* Note that 1-day events don't have a border. Although we
- still use the border height to position the events
- vertically so they still line up neatly (see above),
- we don't use the border width or edge padding at all. */
+ * still use the border height to position the events
+ * vertically so they still line up neatly (see above),
+ * we don't use the border width or edge padding at all. */
text_x = span_x + E_WEEK_VIEW_EVENT_L_PAD;
switch (week_view->time_format) {
case E_WEEK_VIEW_TIME_BOTH_SMALL_MIN:
case E_WEEK_VIEW_TIME_BOTH:
/* These have 2 time strings with a small space between
- them and some space before the EText item. */
+ * them and some space before the EText item. */
text_x += time_width * 2
+ E_WEEK_VIEW_EVENT_TIME_SPACING
+ E_WEEK_VIEW_EVENT_TIME_X_PAD;
@@ -3219,7 +3242,7 @@ e_week_view_reshape_event_span (EWeekView *week_view,
case E_WEEK_VIEW_TIME_START_SMALL_MIN:
case E_WEEK_VIEW_TIME_START:
/* These have just 1 time string with some space
- before the EText item. */
+ * before the EText item. */
text_x += time_width + E_WEEK_VIEW_EVENT_TIME_X_PAD;
break;
case E_WEEK_VIEW_TIME_NONE:
@@ -3230,13 +3253,13 @@ e_week_view_reshape_event_span (EWeekView *week_view,
text_x += icons_width;
/* The width of the EText item extends right to the edge of the
- event, just inside the border. */
+ * event, just inside the border. */
text_w = span_x + span_w - E_WEEK_VIEW_EVENT_R_PAD - text_x;
} else {
if (use_max_width) {
/* When we are editing the event we use all the
- available width. */
+ * available width. */
text_x = span_x + E_WEEK_VIEW_EVENT_L_PAD
+ E_WEEK_VIEW_EVENT_BORDER_WIDTH
+ E_WEEK_VIEW_EVENT_EDGE_X_PAD;
@@ -3246,13 +3269,13 @@ e_week_view_reshape_event_span (EWeekView *week_view,
} else {
text = NULL;
/* Get the width of the text of the event. This is a
- bit of a hack. It would be better if EText could
- tell us this. */
- g_object_get (G_OBJECT (span->text_item), "text", &text, NULL);
+ * bit of a hack. It would be better if EText could
+ * tell us this. */
+ g_object_get (span->text_item, "text", &text, NULL);
text_width = 0;
if (text) {
/* It should only have one line of text in it.
- I'm not sure we need this any more. */
+ * I'm not sure we need this any more. */
end_of_line = strchr (text, '\n');
if (end_of_line)
line_len = end_of_line - text;
@@ -3265,28 +3288,28 @@ e_week_view_reshape_event_span (EWeekView *week_view,
}
/* Add on the width of the icons and find the default
- position, which centers the icons + text. */
+ * position, which centers the icons + text. */
width = text_width + icons_width;
text_x = span_x + (span_w - width) / 2;
/* Now calculate the left-most valid position, and make
- sure we don't go to the left of that. */
+ * sure we don't go to the left of that. */
min_text_x = span_x + E_WEEK_VIEW_EVENT_L_PAD
+ E_WEEK_VIEW_EVENT_BORDER_WIDTH
+ E_WEEK_VIEW_EVENT_EDGE_X_PAD;
/* See if we will want to display the start time, and
- if so take that into account. */
+ * if so take that into account. */
if (event->start > week_view->day_starts[span->start_day])
min_text_x += time_width
+ E_WEEK_VIEW_EVENT_TIME_X_PAD;
/* Now make sure we don't go to the left of the minimum
- position. */
+ * position. */
text_x = MAX (text_x, min_text_x);
/* Now calculate the largest valid width, using the
- calculated x position, and make sure we don't
- exceed that. */
+ * calculated x position, and make sure we don't
+ * exceed that. */
max_text_w = span_x + span_w - E_WEEK_VIEW_EVENT_R_PAD
- E_WEEK_VIEW_EVENT_BORDER_WIDTH
- E_WEEK_VIEW_EVENT_EDGE_X_PAD - text_x;
@@ -3319,9 +3342,9 @@ e_week_view_reshape_event_span (EWeekView *week_view,
gboolean
e_week_view_start_editing_event (EWeekView *week_view,
- gint event_num,
- gint span_num,
- gchar *initial_text)
+ gint event_num,
+ gint span_num,
+ gchar *initial_text)
{
EWeekViewEvent *event;
EWeekViewEventSpan *span;
@@ -3403,7 +3426,7 @@ e_week_view_start_editing_event (EWeekView *week_view,
span = &g_array_index (week_view->spans, EWeekViewEventSpan, event->spans_index + span_num);
/* Try to move the cursor to the end of the text. */
- g_object_get (G_OBJECT (span->text_item), "event_processor", &event_processor, NULL);
+ g_object_get (span->text_item, "event_processor", &event_processor, NULL);
if (event_processor) {
command.action = E_TEP_MOVE;
command.position = E_TEP_END_OF_BUFFER;
@@ -3459,7 +3482,7 @@ cancel_editing (EWeekView *week_view)
/* Reset the text to what was in the component */
summary = icalcomponent_get_summary (event->comp_data->icalcomp);
- g_object_set (G_OBJECT (span->text_item), "text", summary ? summary : "", NULL);
+ g_object_set (span->text_item, "text", summary ? summary : "", NULL);
/* Stop editing */
e_week_view_stop_editing_event (week_view);
@@ -3467,8 +3490,8 @@ cancel_editing (EWeekView *week_view)
static gboolean
e_week_view_on_text_item_event (GnomeCanvasItem *item,
- GdkEvent *gdkevent,
- EWeekView *week_view)
+ GdkEvent *gdkevent,
+ EWeekView *week_view)
{
EWeekViewEvent *event;
gint event_num, span_num;
@@ -3486,11 +3509,11 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
tooltip_destroy (week_view, item);
if (!E_TEXT (item)->preedit_len && gdkevent && gdkevent->key.keyval == GDK_KEY_Return) {
/* We set the keyboard focus to the EDayView, so the
- EText item loses it and stops the edit. */
+ * EText item loses it and stops the edit. */
gtk_widget_grab_focus (GTK_WIDGET (week_view));
/* Stop the signal last or we will also stop any
- other events getting to the EText item. */
+ * other events getting to the EText item. */
g_signal_stop_emission_by_name (G_OBJECT (item), "event");
return TRUE;
} else if (gdkevent->key.keyval == GDK_KEY_Escape) {
@@ -3516,7 +3539,7 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
return FALSE;
/* if we started to editing new item on the canvas, then do not open editing dialog until it's saved,
- because the save of the event recalculates event numbers and you can edit different one */
+ * because the save of the event recalculates event numbers and you can edit different one */
if (!is_icalcomp_on_the_server (event->comp_data->icalcomp, event->comp_data->client))
return TRUE;
@@ -3552,7 +3575,7 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
e_week_view_set_selected_time_range_visible (week_view, e->start, e->end);
e_week_view_show_popup_menu (week_view,
- (GdkEventButton*) gdkevent,
+ (GdkEventButton *) gdkevent,
event_num);
g_signal_stop_emission_by_name (G_OBJECT (item->canvas),
@@ -3576,7 +3599,7 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
g_warning ("No GdkEvent");
/* FIXME: Remember the day offset from the start of
- the event, for DnD. */
+ * the event, for DnD. */
return TRUE;
}
@@ -3601,7 +3624,7 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
}
/* Stop the signal last or we will also stop any
- other events getting to the EText item. */
+ * other events getting to the EText item. */
g_signal_stop_emission_by_name (G_OBJECT (item), "event");
return TRUE;
}
@@ -3648,7 +3671,7 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
pevent->tooltip = (GtkWidget *)g_object_get_data (G_OBJECT (week_view), "tooltip-window");
if (pevent->tooltip) {
- e_calendar_view_move_tip (pevent->tooltip, pevent->x+16, pevent->y+16);
+ e_calendar_view_move_tip (pevent->tooltip, pevent->x + 16, pevent->y + 16);
}
return TRUE;
case GDK_FOCUS_CHANGE:
@@ -3746,7 +3769,8 @@ static gboolean e_week_view_event_move (ECalendarView *cal_view, ECalViewMoveDir
}
static gint
-e_week_view_get_day_offset_of_event (EWeekView *week_view, time_t event_time)
+e_week_view_get_day_offset_of_event (EWeekView *week_view,
+ time_t event_time)
{
time_t first_day = week_view->day_starts[0];
@@ -3757,7 +3781,8 @@ e_week_view_get_day_offset_of_event (EWeekView *week_view, time_t event_time)
}
void
-e_week_view_scroll_a_step (EWeekView *week_view, ECalViewMoveDirection direction)
+e_week_view_scroll_a_step (EWeekView *week_view,
+ ECalViewMoveDirection direction)
{
GtkAdjustment *adjustment;
GtkRange *range;
@@ -3799,7 +3824,10 @@ e_week_view_scroll_a_step (EWeekView *week_view, ECalViewMoveDirection direction
}
static void
-e_week_view_change_event_time (EWeekView *week_view, time_t start_dt, time_t end_dt, gboolean is_all_day)
+e_week_view_change_event_time (EWeekView *week_view,
+ time_t start_dt,
+ time_t end_dt,
+ gboolean is_all_day)
{
EWeekViewEvent *event;
gint event_num;
@@ -3827,13 +3855,13 @@ e_week_view_change_event_time (EWeekView *week_view, time_t start_dt, time_t end
client = event->comp_data->client;
/* We use a temporary shallow copy of the ico since we don't want to
- change the original ico here. Otherwise we would not detect that
- the event's time had changed in the "update_event" callback. */
+ * change the original ico here. Otherwise we would not detect that
+ * the event's time had changed in the "update_event" callback. */
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
date.value = &itt;
/* FIXME: Should probably keep the timezone of the original start
- and end times. */
+ * and end times. */
date.tzid = icaltimezone_get_tzid (e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
*date.value = icaltime_from_timet_with_zone (start_dt, is_all_day,
@@ -3881,7 +3909,7 @@ out:
static void
e_week_view_on_editing_started (EWeekView *week_view,
- GnomeCanvasItem *item)
+ GnomeCanvasItem *item)
{
gint event_num, span_num;
@@ -3897,7 +3925,7 @@ e_week_view_on_editing_started (EWeekView *week_view,
week_view->editing_span_num = span_num;
/* We need to reshape long events so the whole width is used while
- editing. */
+ * editing. */
if (!e_week_view_is_one_day_event (week_view, event_num)) {
e_week_view_reshape_event_span (week_view, event_num,
span_num);
@@ -3908,7 +3936,7 @@ e_week_view_on_editing_started (EWeekView *week_view,
static void
e_week_view_on_editing_stopped (EWeekView *week_view,
- GnomeCanvasItem *item)
+ GnomeCanvasItem *item)
{
gint event_num, span_num;
EWeekViewEvent *event;
@@ -3921,8 +3949,8 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
gboolean on_server;
/* Note: the item we are passed here isn't reliable, so we just stop
- the edit of whatever item was being edited. We also receive this
- event twice for some reason. */
+ * the edit of whatever item was being edited. We also receive this
+ * event twice for some reason. */
event_num = week_view->editing_event_num;
span_num = week_view->editing_span_num;
@@ -3954,7 +3982,7 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
text = NULL;
g_object_set (span->text_item, "handle_popup", FALSE, NULL);
- g_object_get (G_OBJECT (span->text_item), "text", &text, NULL);
+ g_object_get (span->text_item, "text", &text, NULL);
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
@@ -3980,7 +4008,7 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
const gchar *summary;
summary = get_comp_summary (event->comp_data->client, event->comp_data->icalcomp, &free_text);
- g_object_set (G_OBJECT (span->text_item), "text", summary ? summary : "", NULL);
+ g_object_set (span->text_item, "text", summary ? summary : "", NULL);
if (free_text)
g_free ((gchar *) summary);
@@ -4097,10 +4125,10 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
}
gboolean
-e_week_view_find_event_from_item (EWeekView *week_view,
- GnomeCanvasItem *item,
- gint *event_num_return,
- gint *span_num_return)
+e_week_view_find_event_from_item (EWeekView *week_view,
+ GnomeCanvasItem *item,
+ gint *event_num_return,
+ gint *span_num_return)
{
EWeekViewEvent *event;
EWeekViewEventSpan *span;
@@ -4129,17 +4157,17 @@ e_week_view_find_event_from_item (EWeekView *week_view,
}
/* Finds the index of the event with the given uid.
- Returns TRUE if an event with the uid was found.
- Note that for recurring events there may be several EWeekViewEvents, one
- for each instance, all with the same iCalObject and uid. So only use this
- function if you know the event doesn't recur or you are just checking to
- see if any events with the uid exist. */
+ * Returns TRUE if an event with the uid was found.
+ * Note that for recurring events there may be several EWeekViewEvents, one
+ * for each instance, all with the same iCalObject and uid. So only use this
+ * function if you know the event doesn't recur or you are just checking to
+ * see if any events with the uid exist. */
static gboolean
-e_week_view_find_event_from_uid (EWeekView *week_view,
- ECalClient *client,
- const gchar *uid,
- const gchar *rid,
- gint *event_num_return)
+e_week_view_find_event_from_uid (EWeekView *week_view,
+ ECalClient *client,
+ const gchar *uid,
+ const gchar *rid,
+ gint *event_num_return)
{
EWeekViewEvent *event;
gint event_num, num_events;
@@ -4184,8 +4212,8 @@ e_week_view_find_event_from_uid (EWeekView *week_view,
}
gboolean
-e_week_view_is_one_day_event (EWeekView *week_view,
- gint event_num)
+e_week_view_is_one_day_event (EWeekView *week_view,
+ gint event_num)
{
EWeekViewEvent *event;
EWeekViewEventSpan *span;
@@ -4260,7 +4288,8 @@ e_week_view_cursor_key_right (EWeekView *week_view)
}
static gboolean
-e_week_view_add_new_event_in_selected_range (EWeekView *week_view, const gchar *initial_text)
+e_week_view_add_new_event_in_selected_range (EWeekView *week_view,
+ const gchar *initial_text)
{
ECalClient *client;
ECalModel *model;
@@ -4314,7 +4343,7 @@ e_week_view_add_new_event_in_selected_range (EWeekView *week_view, const gchar *
comp, e_calendar_view_get_default_category (E_CALENDAR_VIEW (week_view)));
/* We add the event locally and start editing it. We don't send it
- to the server until the user finishes editing it. */
+ * to the server until the user finishes editing it. */
add_event_data.week_view = week_view;
add_event_data.comp_data = NULL;
e_week_view_add_event (comp, dtstart, dtend, TRUE, &add_event_data);
@@ -4356,7 +4385,8 @@ e_week_view_add_new_event_in_selected_range (EWeekView *week_view, const gchar *
}
static gboolean
-e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
+e_week_view_do_key_press (GtkWidget *widget,
+ GdkEventKey *event)
{
EWeekView *week_view;
gchar *initial_text;
@@ -4437,7 +4467,7 @@ e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
return FALSE;
/* We only want to start an edit with a return key or a simple
- character. */
+ * character. */
if (event->keyval == GDK_KEY_Return) {
initial_text = NULL;
} else if (((event->keyval >= 0x20) && (event->keyval <= 0xFF)
@@ -4457,7 +4487,8 @@ e_week_view_do_key_press (GtkWidget *widget, GdkEventKey *event)
}
static gint
-e_week_view_get_adjust_days_for_move_up (EWeekView *week_view,gint current_day)
+e_week_view_get_adjust_days_for_move_up (EWeekView *week_view,
+ gint current_day)
{
if (week_view->multi_week_view)
return -7;
@@ -4466,7 +4497,8 @@ e_week_view_get_adjust_days_for_move_up (EWeekView *week_view,gint current_day)
}
static gint
-e_week_view_get_adjust_days_for_move_down (EWeekView *week_view,gint current_day)
+e_week_view_get_adjust_days_for_move_down (EWeekView *week_view,
+ gint current_day)
{
if (week_view->multi_week_view)
return 7;
@@ -4475,19 +4507,22 @@ e_week_view_get_adjust_days_for_move_down (EWeekView *week_view,gint current_day
}
static gint
-e_week_view_get_adjust_days_for_move_left (EWeekView *week_view,gint current_day)
+e_week_view_get_adjust_days_for_move_left (EWeekView *week_view,
+ gint current_day)
{
return -1;
}
static gint
-e_week_view_get_adjust_days_for_move_right (EWeekView *week_view,gint current_day)
+e_week_view_get_adjust_days_for_move_right (EWeekView *week_view,
+ gint current_day)
{
return 1;
}
static gboolean
-e_week_view_key_press (GtkWidget *widget, GdkEventKey *event)
+e_week_view_key_press (GtkWidget *widget,
+ GdkEventKey *event)
{
gboolean handled = FALSE;
handled = e_week_view_do_key_press (widget, event);
@@ -4499,9 +4534,9 @@ e_week_view_key_press (GtkWidget *widget, GdkEventKey *event)
}
void
-e_week_view_show_popup_menu (EWeekView *week_view,
- GdkEventButton *bevent,
- gint event_num)
+e_week_view_show_popup_menu (EWeekView *week_view,
+ GdkEventButton *bevent,
+ gint event_num)
{
week_view->popup_event_num = event_num;
@@ -4518,7 +4553,8 @@ e_week_view_popup_menu (GtkWidget *widget)
}
void
-e_week_view_jump_to_button_item (EWeekView *week_view, GnomeCanvasItem *item)
+e_week_view_jump_to_button_item (EWeekView *week_view,
+ GnomeCanvasItem *item)
{
gint day;
GnomeCalendar *calendar;
@@ -4539,8 +4575,8 @@ e_week_view_jump_to_button_item (EWeekView *week_view, GnomeCanvasItem *item)
static gboolean
e_week_view_on_jump_button_event (GnomeCanvasItem *item,
- GdkEvent *event,
- EWeekView *week_view)
+ GdkEvent *event,
+ EWeekView *week_view)
{
gint day;
@@ -4594,20 +4630,20 @@ e_week_view_on_jump_button_event (GnomeCanvasItem *item,
}
/* Converts an hour from 0-23 to the preferred time format, and returns the
- suffix to add and the width of it in the normal font. */
+ * suffix to add and the width of it in the normal font. */
void
-e_week_view_convert_time_to_display (EWeekView *week_view,
- gint hour,
- gint *display_hour,
- const gchar **suffix,
- gint *suffix_width)
+e_week_view_convert_time_to_display (EWeekView *week_view,
+ gint hour,
+ gint *display_hour,
+ const gchar **suffix,
+ gint *suffix_width)
{
ECalModel *model;
model = e_calendar_view_get_model (E_CALENDAR_VIEW (week_view));
/* Calculate the actual hour number to display. For 12-hour
- format we convert 0-23 to 12-11am/12-11pm. */
+ * format we convert 0-23 to 12-11am/12-11pm. */
*display_hour = hour;
if (e_cal_model_get_use_24_hour_format (model)) {
*suffix = "";
@@ -4629,7 +4665,7 @@ e_week_view_convert_time_to_display (EWeekView *week_view,
}
gint
-e_week_view_get_time_string_width (EWeekView *week_view)
+e_week_view_get_time_string_width (EWeekView *week_view)
{
ECalModel *model;
gint time_width;
@@ -4691,7 +4727,8 @@ e_week_view_get_num_events_selected (EWeekView *week_view)
}
gboolean
-e_week_view_is_jump_button_visible (EWeekView *week_view, gint day)
+e_week_view_is_jump_button_visible (EWeekView *week_view,
+ gint day)
{
g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), FALSE);
diff --git a/calendar/gui/e-week-view.h b/calendar/gui/e-week-view.h
index 9525b87c02..5a1f2e6d22 100644
--- a/calendar/gui/e-week-view.h
+++ b/calendar/gui/e-week-view.h
@@ -53,12 +53,12 @@
((obj), E_TYPE_WEEK_VIEW, EWeekViewClass))
/* The maximum number of weeks we show. 5 is usually enough for 1 month,
- but we allow 6 for longer selections. */
+ * but we allow 6 for longer selections. */
#define E_WEEK_VIEW_MAX_WEEKS 6
/* The size of the reminder & recurrence icons, and padding around them.
- X_PAD is the padding between icons. R_PAD is the padding on the right of
- the last icon, before the event text. */
+ * X_PAD is the padding between icons. R_PAD is the padding on the right of
+ * the last icon, before the event text. */
#define E_WEEK_VIEW_ICON_WIDTH 16
#define E_WEEK_VIEW_ICON_HEIGHT 16
#define E_WEEK_VIEW_ICON_X_PAD 1
@@ -66,7 +66,7 @@
#define E_WEEK_VIEW_ICON_R_PAD 8
/* The space on the left & right outside of the event. (The triangle to
- indicate the event continues is displayed in this space). */
+ * indicate the event continues is displayed in this space). */
#define E_WEEK_VIEW_EVENT_L_PAD 2
#define E_WEEK_VIEW_EVENT_R_PAD 2
@@ -90,12 +90,12 @@
#define E_WEEK_VIEW_EVENT_EDGE_X_PAD 2
/* The padding above and on the right of the date string at the top of each
- cell. */
+ * cell. */
#define E_WEEK_VIEW_DATE_T_PAD 2
#define E_WEEK_VIEW_DATE_R_PAD 4
/* The padding above and below the line under the date string, in the Week
- view, and also the space on the left of it. */
+ * view, and also the space on the left of it. */
#define E_WEEK_VIEW_DATE_LINE_T_PAD 1
#define E_WEEK_VIEW_DATE_LINE_B_PAD 1
#define E_WEEK_VIEW_DATE_LINE_L_PAD 10
@@ -104,8 +104,8 @@
#define E_WEEK_VIEW_DATE_B_PAD 1
/* We use a 7-bit field to store row numbers in EWeekViewEventSpan, so the
- maximum number or rows we can allow is 127. It is very unlikely to be
- reached anyway. */
+ * maximum number or rows we can allow is 127. It is very unlikely to be
+ * reached anyway. */
#define E_WEEK_VIEW_MAX_ROWS_PER_CELL 127
G_BEGIN_DECLS
@@ -139,7 +139,7 @@ typedef enum
} EWeekViewDragPosition;
/* These specify which times are shown for the 1-day events. We use the small
- font for the minutes if it can be loaded and the option is on. */
+ * font for the minutes if it can be loaded and the option is on. */
typedef enum
{
E_WEEK_VIEW_TIME_NONE,
@@ -195,8 +195,8 @@ struct _EWeekView {
gint layout_timeout_id;
/* An array of EWeekViewEventSpan elements. Each event has its own
- space within this array, and uses the spans_index and num_spans
- fields of the EWeekViewEvent struct to access it. */
+ * space within this array, and uses the spans_index and num_spans
+ * fields of the EWeekViewEvent struct to access it. */
GArray *spans;
/* The start of each day displayed. */
@@ -209,7 +209,7 @@ struct _EWeekView {
GDate first_day_shown;
/* If we are displaying multiple weeks in rows. If this is FALSE only
- one week is shown, with a different layout. */
+ * one week is shown, with a different layout. */
gboolean multi_week_view;
/* TRUE when requires scrolling by a week in a multi_week_view */
@@ -219,11 +219,11 @@ struct _EWeekView {
gboolean update_base_date;
/* How many weeks we are showing. This is only relevant if
- display_month is TRUE. */
+ * display_month is TRUE. */
gint weeks_shown;
/* If Sat & Sun are compressed. Only applicable in month view, since
- they are always compressed into 1 cell in the week view. */
+ * they are always compressed into 1 cell in the week view. */
gboolean compress_weekend;
/* Whether we use show event end times. */
@@ -233,8 +233,8 @@ struct _EWeekView {
gint week_start_day;
/* The first day of the week we display, 0 (Monday) to 6 (Sunday).
- This will usually be week_start_day, but if the weekend is
- compressed, and week_start_day is Sunday we have to use Saturday. */
+ * This will usually be week_start_day, but if the weekend is
+ * compressed, and week_start_day is Sunday we have to use Saturday. */
gint display_start_day;
/* The vertical offset of the events from the top of the cells. */
@@ -257,7 +257,7 @@ struct _EWeekView {
PangoFontDescription *small_font_desc;
/* The widths of various pieces of text, used to determine which of
- several date formats to display, set in e_week_view_style_set (). */
+ * several date formats to display, set in e_week_view_style_set (). */
gint space_width; /* One space character ' '. */
gint colon_width; /* Size of ':' in the font. */
gint slash_width; /* Size of '/' in the font. */
@@ -273,10 +273,10 @@ struct _EWeekView {
gint max_abbr_month_width;
/* The size of the main grid of days and of the cells. A row
- corresponds to a compressed day, so normal days usually take
- up 2 rows. Note that the offsets arrays have one more element
- than the widths/heights arrays since they also contain the
- right/bottom edge. */
+ * corresponds to a compressed day, so normal days usually take
+ * up 2 rows. Note that the offsets arrays have one more element
+ * than the widths/heights arrays since they also contain the
+ * right/bottom edge. */
gint rows;
gint columns;
gint col_widths[7];
@@ -285,7 +285,7 @@ struct _EWeekView {
gint row_offsets[E_WEEK_VIEW_MAX_WEEKS * 2 + 1];
/* This specifies which times we are showing for the events, depending
- on how much room is available. */
+ * on how much room is available. */
EWeekViewTimeFormat time_format;
/* The icons. */
@@ -307,22 +307,22 @@ struct _EWeekView {
GdkCursor *last_cursor_set;
/* The currently selected region, in days from the first day shown.
- If selection_start_day is -1 there is no current selection. */
+ * If selection_start_day is -1 there is no current selection. */
gint selection_start_day;
gint selection_end_day;
/* This specifies which end of the selection is being dragged, or is
- E_WEEK_VIEW_DRAG_NONE if the selection isn't being dragged. */
+ * E_WEEK_VIEW_DRAG_NONE if the selection isn't being dragged. */
EWeekViewDragPosition selection_drag_pos;
/* This is the event the mouse button was pressed on. If the button
- is released we start editing it, but if the mouse is dragged we set
- this to -1. */
+ * is released we start editing it, but if the mouse is dragged we set
+ * this to -1. */
gint pressed_event_num;
gint pressed_span_num;
/* The event span currently being edited. The num is -1 if no event is
- being edited. */
+ * being edited. */
gint editing_event_num;
gint editing_span_num;
@@ -344,7 +344,7 @@ struct _EWeekView {
gboolean event_destroyed;
/* remember last selected interval when click and restore on double click,
- if we double clicked inside that interval. */
+ * if we double clicked inside that interval. */
guint32 bc_event_time;
time_t before_click_dtstart;
time_t before_click_dtend;
@@ -365,16 +365,16 @@ GType e_week_view_get_type (void);
ECalendarView * e_week_view_new (ECalModel *model);
/* The first day shown. Note that it will be rounded down to the start of a
- week when set. The returned value will be invalid if no date has been set
- yet. */
+ * week when set. The returned value will be invalid if no date has been set
+ * yet. */
void e_week_view_get_first_day_shown (EWeekView *week_view,
GDate *date);
void e_week_view_set_first_day_shown (EWeekView *week_view,
GDate *date);
/* The selected time range. The EWeekView will show the corresponding
- month and the days between start_time and end_time will be selected.
- To select a single day, use the same value for start_time & end_time. */
+ * month and the days between start_time and end_time will be selected.
+ * To select a single day, use the same value for start_time & end_time. */
void e_week_view_set_selected_time_range_visible
(EWeekView *week_view,
time_t start_time,
@@ -396,7 +396,7 @@ void e_week_view_set_weeks_shown (EWeekView *week_view,
gint weeks_shown);
/* Whether the weekend (Sat/Sun) should be compressed into 1 cell in the Month
- view. In the Week view they are always compressed. */
+ * view. In the Week view they are always compressed. */
gboolean e_week_view_get_compress_weekend (EWeekView *week_view);
void e_week_view_set_compress_weekend (EWeekView *week_view,
gboolean compress_weekend);
diff --git a/calendar/gui/ea-cal-view-event.c b/calendar/gui/ea-cal-view-event.c
index f3716d7623..5111d6d27f 100644
--- a/calendar/gui/ea-cal-view-event.c
+++ b/calendar/gui/ea-cal-view-event.c
@@ -176,7 +176,7 @@ static void ea_cal_view_finalize (GObject *object)
}
#endif
-AtkObject*
+AtkObject *
ea_cal_view_event_new (GObject *obj)
{
AtkObject *atk_obj = NULL;
@@ -386,7 +386,7 @@ ea_cal_view_event_get_index_in_parent (AtkObject *accessible)
--event_num) {
day_view_event = &g_array_index (day_view->long_events,
EDayViewEvent, event_num);
- if (cal_view_event == (ECalendarViewEvent*) day_view_event)
+ if (cal_view_event == (ECalendarViewEvent *) day_view_event)
return event_num;
}
@@ -397,7 +397,7 @@ ea_cal_view_event_get_index_in_parent (AtkObject *accessible)
--event_num) {
day_view_event = &g_array_index (day_view->events[day],
EDayViewEvent, event_num);
- if (cal_view_event == (ECalendarViewEvent*) day_view_event)
+ if (cal_view_event == (ECalendarViewEvent *) day_view_event)
return num_before + event_num;
}
num_before += day_view->events[day]->len;
@@ -447,12 +447,12 @@ atk_component_interface_init (AtkComponentIface *iface)
}
static void
-ea_cal_view_get_extents (AtkComponent *component,
- gint *x,
- gint *y,
- gint *width,
- gint *height,
- AtkCoordType coord_type)
+ea_cal_view_get_extents (AtkComponent *component,
+ gint *x,
+ gint *y,
+ gint *width,
+ gint *height,
+ AtkCoordType coord_type)
{
GObject *g_obj;
GnomeCanvasItem *canvas_item;
@@ -568,7 +568,8 @@ atk_action_interface_init (AtkActionIface *iface)
}
static gboolean
-ea_cal_view_event_do_action (AtkAction *action, gint i)
+ea_cal_view_event_do_action (AtkAction *action,
+ gint i)
{
AtkGObjectAccessible *atk_gobj;
AtkComponent *atk_comp;
@@ -591,7 +592,8 @@ ea_cal_view_event_get_n_actions (AtkAction *action)
}
static const gchar *
-ea_cal_view_event_action_get_name (AtkAction *action, gint i)
+ea_cal_view_event_action_get_name (AtkAction *action,
+ gint i)
{
if (i >= 0 && i < CAL_VIEW_EVENT_ACTION_NUM)
return action_name[i];
diff --git a/calendar/gui/ea-cal-view.c b/calendar/gui/ea-cal-view.c
index 5b93469450..e6c3d65b9b 100644
--- a/calendar/gui/ea-cal-view.c
+++ b/calendar/gui/ea-cal-view.c
@@ -33,7 +33,7 @@
static void ea_cal_view_class_init (EaCalViewClass *klass);
-static AtkObject* ea_cal_view_get_parent (AtkObject *accessible);
+static AtkObject * ea_cal_view_get_parent (AtkObject *accessible);
static void ea_cal_view_real_initialize (AtkObject *accessible, gpointer data);
static void ea_cal_view_event_changed_cb (ECalendarView *cal_view,
@@ -50,11 +50,17 @@ static void atk_action_interface_init (AtkActionIface *iface);
static gboolean action_interface_do_action (AtkAction *action, gint i);
static gint action_interface_get_n_actions (AtkAction *action);
static const gchar *
-action_interface_get_description (AtkAction *action, gint i);
+ action_interface_get_description
+ (AtkAction *action,
+ gint i);
static const gchar *
-action_interface_get_keybinding (AtkAction *action, gint i);
+ action_interface_get_keybinding
+ (AtkAction *action,
+ gint i);
static const gchar *
-action_interface_action_get_name (AtkAction *action, gint i);
+ action_interface_action_get_name
+ (AtkAction *action,
+ gint i);
static gpointer parent_class = NULL;
@@ -119,7 +125,7 @@ ea_cal_view_class_init (EaCalViewClass *klass)
class->initialize = ea_cal_view_real_initialize;
}
-AtkObject*
+AtkObject *
ea_cal_view_new (GtkWidget *widget)
{
GObject *object;
@@ -136,7 +142,8 @@ ea_cal_view_new (GtkWidget *widget)
}
static void
-ea_cal_view_real_initialize (AtkObject *accessible, gpointer data)
+ea_cal_view_real_initialize (AtkObject *accessible,
+ gpointer data)
{
ECalendarView *cal_view;
GnomeCalendar *gcal;
@@ -156,10 +163,12 @@ ea_cal_view_real_initialize (AtkObject *accessible, gpointer data)
* of the event is removed, the cal_view_event will go to the state
* of "defunct" (changed by weak ref callback of atkgobjectaccessible
*/
- g_signal_connect (G_OBJECT(cal_view), "event_changed",
- G_CALLBACK (ea_cal_view_event_changed_cb), NULL);
- g_signal_connect (G_OBJECT(cal_view), "event_added",
- G_CALLBACK (ea_cal_view_event_added_cb), NULL);
+ g_signal_connect (
+ cal_view, "event_changed",
+ G_CALLBACK (ea_cal_view_event_changed_cb), NULL);
+ g_signal_connect (
+ cal_view, "event_added",
+ G_CALLBACK (ea_cal_view_event_added_cb), NULL);
/* listen for date changes of calendar */
gcal = e_calendar_view_get_calendar (cal_view);
@@ -170,7 +179,7 @@ ea_cal_view_real_initialize (AtkObject *accessible, gpointer data)
accessible);
}
-static AtkObject*
+static AtkObject *
ea_cal_view_get_parent (AtkObject *accessible)
{
ECalendarView *cal_view;
@@ -188,7 +197,8 @@ ea_cal_view_get_parent (AtkObject *accessible)
}
static void
-ea_cal_view_event_changed_cb (ECalendarView *cal_view, ECalendarViewEvent *event,
+ea_cal_view_event_changed_cb (ECalendarView *cal_view,
+ ECalendarViewEvent *event,
gpointer data)
{
AtkObject *atk_obj;
@@ -225,7 +235,8 @@ ea_cal_view_event_changed_cb (ECalendarView *cal_view, ECalendarViewEvent *event
}
static void
-ea_cal_view_event_added_cb (ECalendarView *cal_view, ECalendarViewEvent *event,
+ea_cal_view_event_added_cb (ECalendarView *cal_view,
+ ECalendarViewEvent *event,
gpointer data)
{
AtkObject *atk_obj;
@@ -290,7 +301,8 @@ idle_dates_changed (gpointer data)
}
static void
-ea_cal_view_dates_change_cb (GnomeCalendar *gcal, gpointer data)
+ea_cal_view_dates_change_cb (GnomeCalendar *gcal,
+ gpointer data)
{
g_idle_add (idle_dates_changed, data);
}
@@ -320,7 +332,8 @@ atk_action_interface_init (AtkActionIface *iface)
}
static gboolean
-action_interface_do_action (AtkAction *action, gint index)
+action_interface_do_action (AtkAction *action,
+ gint index)
{
GtkWidget *widget;
gboolean return_value = TRUE;
@@ -381,13 +394,15 @@ action_interface_get_n_actions (AtkAction *action)
}
static const gchar *
-action_interface_get_description (AtkAction *action, gint index)
+action_interface_get_description (AtkAction *action,
+ gint index)
{
return action_interface_action_get_name (action, index);
}
static const gchar *
-action_interface_get_keybinding (AtkAction *action, gint index)
+action_interface_get_keybinding (AtkAction *action,
+ gint index)
{
GtkWidget *widget;
@@ -424,7 +439,8 @@ action_interface_get_keybinding (AtkAction *action, gint index)
}
static const gchar *
-action_interface_action_get_name (AtkAction *action, gint i)
+action_interface_action_get_name (AtkAction *action,
+ gint i)
{
if (i >= 0 && i < CAL_VIEW_ACTION_NUM)
return action_name[i];
diff --git a/calendar/gui/ea-cal-view.h b/calendar/gui/ea-cal-view.h
index 959f7816b5..d0363025e0 100644
--- a/calendar/gui/ea-cal-view.h
+++ b/calendar/gui/ea-cal-view.h
@@ -51,7 +51,7 @@ struct _EaCalViewClass
GtkAccessibleClass parent_class;
};
-AtkObject* ea_cal_view_new (GtkWidget *widget);
+AtkObject * ea_cal_view_new (GtkWidget *widget);
G_END_DECLS
diff --git a/calendar/gui/ea-calendar.c b/calendar/gui/ea-calendar.c
index 423e2dfbd7..cbea6ded02 100644
--- a/calendar/gui/ea-calendar.c
+++ b/calendar/gui/ea-calendar.c
@@ -50,9 +50,9 @@ EA_FACTORY_GOBJECT (
EA_FACTORY (EA_TYPE_GNOME_CALENDAR, ea_gnome_calendar, ea_gnome_calendar_new)
static gboolean ea_calendar_focus_watcher (GSignalInvocationHint *ihint,
- guint n_param_values,
- const GValue *param_values,
- gpointer data);
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer data);
static gpointer e_text_type, pixbuf_type, e_day_view_type, e_week_view_type;
static gpointer e_day_view_main_item_type, e_week_view_main_item_type;
diff --git a/calendar/gui/ea-day-view-cell.c b/calendar/gui/ea-day-view-cell.c
index a94a9d193f..4fe1c5bedb 100644
--- a/calendar/gui/ea-day-view-cell.c
+++ b/calendar/gui/ea-day-view-cell.c
@@ -69,7 +69,9 @@ e_day_view_cell_class_init (EDayViewCellClass *class)
}
EDayViewCell *
-e_day_view_cell_new (EDayView *day_view, gint row, gint column)
+e_day_view_cell_new (EDayView *day_view,
+ gint row,
+ gint column)
{
GObject *object;
EDayViewCell *cell;
@@ -95,7 +97,7 @@ static void ea_day_view_cell_class_init (EaDayViewCellClass *klass);
static const gchar * ea_day_view_cell_get_name (AtkObject *accessible);
static const gchar * ea_day_view_cell_get_description (AtkObject *accessible);
-static AtkStateSet* ea_day_view_cell_ref_state_set (AtkObject *obj);
+static AtkStateSet * ea_day_view_cell_ref_state_set (AtkObject *obj);
static AtkObject * ea_day_view_cell_get_parent (AtkObject *accessible);
static gint ea_day_view_cell_get_index_in_parent (AtkObject *accessible);
@@ -168,7 +170,7 @@ ea_day_view_cell_class_init (EaDayViewCellClass *klass)
class->get_index_in_parent = ea_day_view_cell_get_index_in_parent;
}
-AtkObject*
+AtkObject *
ea_day_view_cell_new (GObject *obj)
{
gpointer object;
@@ -240,7 +242,7 @@ ea_day_view_cell_get_description (AtkObject *accessible)
return ea_day_view_cell_get_name (accessible);
}
-static AtkStateSet*
+static AtkStateSet *
ea_day_view_cell_ref_state_set (AtkObject *obj)
{
AtkStateSet *state_set;
@@ -326,8 +328,11 @@ atk_component_interface_init (AtkComponentIface *iface)
static void
component_interface_get_extents (AtkComponent *component,
- gint *x, gint *y, gint *width, gint *height,
- AtkCoordType coord_type)
+ gint *x,
+ gint *y,
+ gint *width,
+ gint *height,
+ AtkCoordType coord_type)
{
GObject *g_obj;
AtkObject *atk_obj;
diff --git a/calendar/gui/ea-day-view-cell.h b/calendar/gui/ea-day-view-cell.h
index 669fb1abae..2b2f6dddc5 100644
--- a/calendar/gui/ea-day-view-cell.h
+++ b/calendar/gui/ea-day-view-cell.h
@@ -78,7 +78,7 @@ struct _EaDayViewCellClass
AtkGObjectAccessibleClass parent_class;
};
-AtkObject* ea_day_view_cell_new (GObject *gobj);
+AtkObject * ea_day_view_cell_new (GObject *gobj);
G_END_DECLS
diff --git a/calendar/gui/ea-day-view-main-item.c b/calendar/gui/ea-day-view-main-item.c
index 1274cb7b72..1ced61b7ad 100644
--- a/calendar/gui/ea-day-view-main-item.c
+++ b/calendar/gui/ea-day-view-main-item.c
@@ -43,7 +43,7 @@ static const gchar *
(AtkObject *accessible);
static gint ea_day_view_main_item_get_n_children (AtkObject *obj);
-static AtkObject* ea_day_view_main_item_ref_child (AtkObject *obj,
+static AtkObject * ea_day_view_main_item_ref_child (AtkObject *obj,
gint i);
static AtkObject * ea_day_view_main_item_get_parent (AtkObject *accessible);
static gint ea_day_view_main_item_get_index_in_parent (AtkObject *accessible);
@@ -67,7 +67,7 @@ static gint table_interface_get_column_at_index (AtkTable *table,
gint index);
static gint table_interface_get_row_at_index (AtkTable *table,
gint index);
-static AtkObject* table_interface_ref_at (AtkTable *table,
+static AtkObject * table_interface_ref_at (AtkTable *table,
gint row,
gint column);
static gint table_interface_get_n_rows (AtkTable *table);
@@ -97,25 +97,29 @@ static gboolean table_interface_add_column_selection (AtkTable *table,
gint column);
static gboolean table_interface_remove_column_selection (AtkTable *table,
gint column);
-static AtkObject* table_interface_get_row_header (AtkTable *table, gint row);
-static AtkObject* table_interface_get_column_header (AtkTable *table,
+static AtkObject * table_interface_get_row_header (AtkTable *table, gint row);
+static AtkObject * table_interface_get_column_header (AtkTable *table,
gint in_col);
-static AtkObject* table_interface_get_caption (AtkTable *table);
+static AtkObject * table_interface_get_caption (AtkTable *table);
static const gchar *
-table_interface_get_column_description (AtkTable *table, gint in_col);
+ table_interface_get_column_description
+ (AtkTable *table,
+ gint in_col);
static const gchar *
-table_interface_get_row_description (AtkTable *table, gint row);
+ table_interface_get_row_description
+ (AtkTable *table,
+ gint row);
-static AtkObject* table_interface_get_summary (AtkTable *table);
+static AtkObject * table_interface_get_summary (AtkTable *table);
/* atk selection interface */
static void atk_selection_interface_init (AtkSelectionIface *iface);
static gboolean selection_interface_add_selection (AtkSelection *selection,
gint i);
static gboolean selection_interface_clear_selection (AtkSelection *selection);
-static AtkObject* selection_interface_ref_selection (AtkSelection *selection,
+static AtkObject * selection_interface_ref_selection (AtkSelection *selection,
gint i);
static gint selection_interface_get_selection_count (AtkSelection *selection);
static gboolean selection_interface_is_child_selected (AtkSelection *selection,
@@ -130,17 +134,19 @@ ea_day_view_main_item_destory_cell_data (EaDayViewMainItem *ea_main_item);
static gint
ea_day_view_main_item_get_child_index_at (EaDayViewMainItem *ea_main_item,
- gint row, gint column);
+ gint row,
+ gint column);
static gint
ea_day_view_main_item_get_row_at_index (EaDayViewMainItem *ea_main_item,
- gint index);
+ gint index);
static gint
ea_day_view_main_item_get_column_at_index (EaDayViewMainItem *ea_main_item,
- gint index);
+ gint index);
static gint
ea_day_view_main_item_get_row_label (EaDayViewMainItem *ea_main_item,
- gint row, gchar *buffer,
- gint buffer_size);
+ gint row,
+ gchar *buffer,
+ gint buffer_size);
#ifdef ACC_DEBUG
static gint n_ea_day_view_main_item_created = 0;
@@ -233,7 +239,7 @@ ea_day_view_main_item_class_init (EaDayViewMainItemClass *klass)
class->get_index_in_parent = ea_day_view_main_item_get_index_in_parent;
}
-AtkObject*
+AtkObject *
ea_day_view_main_item_new (GObject *obj)
{
AtkObject *accessible;
@@ -334,7 +340,8 @@ ea_day_view_main_item_get_n_children (AtkObject *accessible)
}
static AtkObject *
-ea_day_view_main_item_ref_child (AtkObject *accessible, gint index)
+ea_day_view_main_item_ref_child (AtkObject *accessible,
+ gint index)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
@@ -418,7 +425,8 @@ ea_day_view_main_item_get_index_in_parent (AtkObject *accessible)
/* callbacks */
static void
-ea_day_view_main_item_dates_change_cb (GnomeCalendar *gcal, gpointer data)
+ea_day_view_main_item_dates_change_cb (GnomeCalendar *gcal,
+ gpointer data)
{
EaDayViewMainItem *ea_main_item;
@@ -436,7 +444,8 @@ ea_day_view_main_item_dates_change_cb (GnomeCalendar *gcal, gpointer data)
}
static void
-ea_day_view_main_item_time_change_cb (EDayView *day_view, gpointer data)
+ea_day_view_main_item_time_change_cb (EDayView *day_view,
+ gpointer data)
{
EaDayViewMainItem *ea_main_item;
AtkObject *item_cell = NULL;
@@ -474,7 +483,8 @@ ea_day_view_main_item_time_change_cb (EDayView *day_view, gpointer data)
static gint
ea_day_view_main_item_get_child_index_at (EaDayViewMainItem *ea_main_item,
- gint row, gint column)
+ gint row,
+ gint column)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
@@ -499,7 +509,7 @@ ea_day_view_main_item_get_child_index_at (EaDayViewMainItem *ea_main_item,
static gint
ea_day_view_main_item_get_row_at_index (EaDayViewMainItem *ea_main_item,
- gint index)
+ gint index)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
@@ -525,7 +535,7 @@ ea_day_view_main_item_get_row_at_index (EaDayViewMainItem *ea_main_item,
static gint
ea_day_view_main_item_get_column_at_index (EaDayViewMainItem *ea_main_item,
- gint index)
+ gint index)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
@@ -551,7 +561,9 @@ ea_day_view_main_item_get_column_at_index (EaDayViewMainItem *ea_main_item,
static gint
ea_day_view_main_item_get_row_label (EaDayViewMainItem *ea_main_item,
- gint row, gchar *buffer, gint buffer_size)
+ gint row,
+ gchar *buffer,
+ gint buffer_size)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
@@ -645,8 +657,11 @@ atk_component_interface_init (AtkComponentIface *iface)
static void
component_interface_get_extents (AtkComponent *component,
- gint *x, gint *y, gint *width, gint *height,
- AtkCoordType coord_type)
+ gint *x,
+ gint *y,
+ gint *width,
+ gint *height,
+ AtkCoordType coord_type)
{
GObject *g_obj;
AtkObject *ea_canvas;
@@ -704,14 +719,14 @@ atk_table_interface_init (AtkTableIface *iface)
iface->get_column_description = table_interface_get_column_description;
}
-static AtkObject*
+static AtkObject *
table_interface_ref_at (AtkTable *table,
- gint row,
- gint column)
+ gint row,
+ gint column)
{
gint index;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
+ EaDayViewMainItem * ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
index = ea_day_view_main_item_get_child_index_at (ea_main_item,
row, column);
return ea_day_view_main_item_ref_child (ATK_OBJECT (ea_main_item), index);
@@ -724,7 +739,7 @@ table_interface_get_n_rows (AtkTable *table)
GObject *g_obj;
EDayViewMainItem *main_item;
EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
+ EaDayViewMainItem * ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
g_obj = atk_gobject_accessible_get_object (atk_gobj);
@@ -744,7 +759,7 @@ table_interface_get_n_columns (AtkTable *table)
GObject *g_obj;
EDayViewMainItem *main_item;
EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
+ EaDayViewMainItem * ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
g_obj = atk_gobject_accessible_get_object (atk_gobj);
@@ -759,39 +774,39 @@ table_interface_get_n_columns (AtkTable *table)
static gint
table_interface_get_index_at (AtkTable *table,
- gint row,
- gint column)
+ gint row,
+ gint column)
{
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
+ EaDayViewMainItem * ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
return ea_day_view_main_item_get_child_index_at (ea_main_item,
row, column);
}
static gint
table_interface_get_column_at_index (AtkTable *table,
- gint index)
+ gint index)
{
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
+ EaDayViewMainItem * ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
return ea_day_view_main_item_get_column_at_index (ea_main_item, index);
}
static gint
table_interface_get_row_at_index (AtkTable *table,
- gint index)
+ gint index)
{
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
+ EaDayViewMainItem * ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
return ea_day_view_main_item_get_row_at_index (ea_main_item, index);
}
static gint
-table_interface_get_column_extent_at (AtkTable *table,
- gint row,
- gint column)
+table_interface_get_column_extent_at (AtkTable *table,
+ gint row,
+ gint column)
{
gint index;
gint width = 0, height = 0;
AtkObject *child;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
+ EaDayViewMainItem * ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
index = ea_day_view_main_item_get_child_index_at (ea_main_item,
row, column);
@@ -805,14 +820,14 @@ table_interface_get_column_extent_at (AtkTable *table,
}
static gint
-table_interface_get_row_extent_at (AtkTable *table,
- gint row,
- gint column)
+table_interface_get_row_extent_at (AtkTable *table,
+ gint row,
+ gint column)
{
gint index;
gint width = 0, height = 0;
AtkObject *child;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
+ EaDayViewMainItem * ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
index = ea_day_view_main_item_get_child_index_at (ea_main_item,
row, column);
@@ -827,13 +842,13 @@ table_interface_get_row_extent_at (AtkTable *table,
static gboolean
table_interface_is_row_selected (AtkTable *table,
- gint row)
+ gint row)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
EDayViewMainItem *main_item;
EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
+ EaDayViewMainItem * ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
g_obj = atk_gobject_accessible_get_object (atk_gobj);
@@ -857,8 +872,8 @@ table_interface_is_row_selected (AtkTable *table,
static gboolean
table_interface_is_selected (AtkTable *table,
- gint row,
- gint column)
+ gint row,
+ gint column)
{
return table_interface_is_row_selected (table, row) &&
table_interface_is_column_selected (table, column);
@@ -866,13 +881,13 @@ table_interface_is_selected (AtkTable *table,
static gboolean
table_interface_is_column_selected (AtkTable *table,
- gint column)
+ gint column)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
EDayViewMainItem *main_item;
EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
+ EaDayViewMainItem * ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
g_obj = atk_gobject_accessible_get_object (atk_gobj);
@@ -890,13 +905,13 @@ table_interface_is_column_selected (AtkTable *table,
static gint
table_interface_get_selected_rows (AtkTable *table,
- gint **rows_selected)
+ gint **rows_selected)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
EDayViewMainItem *main_item;
EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
+ EaDayViewMainItem * ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
gint start_row = -1, n_rows = 0;
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
@@ -931,13 +946,13 @@ table_interface_get_selected_rows (AtkTable *table,
static gint
table_interface_get_selected_columns (AtkTable *table,
- gint **columns_selected)
+ gint **columns_selected)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
EDayViewMainItem *main_item;
EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
+ EaDayViewMainItem * ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
gint start_column = -1, n_columns = 0;
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
@@ -965,13 +980,13 @@ table_interface_get_selected_columns (AtkTable *table,
static gboolean
table_interface_add_row_selection (AtkTable *table,
- gint row)
+ gint row)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
EDayViewMainItem *main_item;
EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
+ EaDayViewMainItem * ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
g_obj = atk_gobject_accessible_get_object (atk_gobj);
@@ -998,20 +1013,20 @@ table_interface_add_row_selection (AtkTable *table,
static gboolean
table_interface_remove_row_selection (AtkTable *table,
- gint row)
+ gint row)
{
return FALSE;
}
static gboolean
table_interface_add_column_selection (AtkTable *table,
- gint column)
+ gint column)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
EDayViewMainItem *main_item;
EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
+ EaDayViewMainItem * ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
g_obj = atk_gobject_accessible_get_object (atk_gobj);
@@ -1035,44 +1050,44 @@ table_interface_add_column_selection (AtkTable *table,
static gboolean
table_interface_remove_column_selection (AtkTable *table,
- gint column)
+ gint column)
{
/* FIXME: NOT IMPLEMENTED */
return FALSE;
}
-static AtkObject*
+static AtkObject *
table_interface_get_row_header (AtkTable *table,
- gint row)
+ gint row)
{
/* FIXME: NOT IMPLEMENTED */
return NULL;
}
-static AtkObject*
+static AtkObject *
table_interface_get_column_header (AtkTable *table,
- gint in_col)
+ gint in_col)
{
/* FIXME: NOT IMPLEMENTED */
return NULL;
}
-static AtkObject*
-table_interface_get_caption (AtkTable *table)
+static AtkObject *
+table_interface_get_caption (AtkTable *table)
{
/* FIXME: NOT IMPLEMENTED */
return NULL;
}
static const gchar *
-table_interface_get_column_description (AtkTable *table,
- gint in_col)
+table_interface_get_column_description (AtkTable *table,
+ gint in_col)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
EDayViewMainItem *main_item;
EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
+ EaDayViewMainItem * ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
const gchar *description;
EaCellTable *cell_data;
@@ -1101,12 +1116,12 @@ table_interface_get_column_description (AtkTable *table,
}
static const gchar *
-table_interface_get_row_description (AtkTable *table,
- gint row)
+table_interface_get_row_description (AtkTable *table,
+ gint row)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
+ EaDayViewMainItem * ea_main_item = EA_DAY_VIEW_MAIN_ITEM (table);
const gchar *description;
EaCellTable *cell_data;
@@ -1133,8 +1148,8 @@ table_interface_get_row_description (AtkTable *table,
return description;
}
-static AtkObject*
-table_interface_get_summary (AtkTable *table)
+static AtkObject *
+table_interface_get_summary (AtkTable *table)
{
/* FIXME: NOT IMPLEMENTED */
return NULL;
@@ -1155,13 +1170,14 @@ atk_selection_interface_init (AtkSelectionIface *iface)
}
static gboolean
-selection_interface_add_selection (AtkSelection *selection, gint i)
+selection_interface_add_selection (AtkSelection *selection,
+ gint i)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
EDayViewMainItem *main_item;
EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (selection);
+ EaDayViewMainItem * ea_main_item = EA_DAY_VIEW_MAIN_ITEM (selection);
gint column, row;
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
@@ -1199,7 +1215,7 @@ selection_interface_clear_selection (AtkSelection *selection)
GObject *g_obj;
EDayViewMainItem *main_item;
EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (selection);
+ EaDayViewMainItem * ea_main_item = EA_DAY_VIEW_MAIN_ITEM (selection);
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
g_obj = atk_gobject_accessible_get_object (atk_gobj);
@@ -1220,14 +1236,15 @@ selection_interface_clear_selection (AtkSelection *selection)
return TRUE;
}
-static AtkObject*
-selection_interface_ref_selection (AtkSelection *selection, gint i)
+static AtkObject *
+selection_interface_ref_selection (AtkSelection *selection,
+ gint i)
{
gint count;
GObject *g_obj;
EDayViewMainItem *main_item;
EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (selection);
+ EaDayViewMainItem * ea_main_item = EA_DAY_VIEW_MAIN_ITEM (selection);
gint start_index;
count = selection_interface_get_selection_count (selection);
@@ -1253,7 +1270,7 @@ selection_interface_get_selection_count (AtkSelection *selection)
GObject *g_obj;
EDayViewMainItem *main_item;
EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (selection);
+ EaDayViewMainItem * ea_main_item = EA_DAY_VIEW_MAIN_ITEM (selection);
gint start_index, end_index;
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
@@ -1278,13 +1295,14 @@ selection_interface_get_selection_count (AtkSelection *selection)
}
static gboolean
-selection_interface_is_child_selected (AtkSelection *selection, gint i)
+selection_interface_is_child_selected (AtkSelection *selection,
+ gint i)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
EDayViewMainItem *main_item;
EDayView *day_view;
- EaDayViewMainItem* ea_main_item = EA_DAY_VIEW_MAIN_ITEM (selection);
+ EaDayViewMainItem * ea_main_item = EA_DAY_VIEW_MAIN_ITEM (selection);
gint column, row;
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
diff --git a/calendar/gui/ea-day-view-main-item.h b/calendar/gui/ea-day-view-main-item.h
index c782e6acc8..b3ef6a0160 100644
--- a/calendar/gui/ea-day-view-main-item.h
+++ b/calendar/gui/ea-day-view-main-item.h
@@ -51,7 +51,7 @@ struct _EaDayViewMainItemClass
AtkGObjectAccessibleClass parent_class;
};
-AtkObject* ea_day_view_main_item_new (GObject *obj);
+AtkObject * ea_day_view_main_item_new (GObject *obj);
G_END_DECLS
diff --git a/calendar/gui/ea-day-view.c b/calendar/gui/ea-day-view.c
index 72f3e5ba61..89e9c4b8a0 100644
--- a/calendar/gui/ea-day-view.c
+++ b/calendar/gui/ea-day-view.c
@@ -36,7 +36,7 @@ static void ea_day_view_class_init (EaDayViewClass *klass);
static const gchar * ea_day_view_get_name (AtkObject *accessible);
static const gchar * ea_day_view_get_description (AtkObject *accessible);
static gint ea_day_view_get_n_children (AtkObject *obj);
-static AtkObject* ea_day_view_ref_child (AtkObject *obj,
+static AtkObject * ea_day_view_ref_child (AtkObject *obj,
gint i);
static gpointer parent_class = NULL;
@@ -99,7 +99,7 @@ ea_day_view_class_init (EaDayViewClass *klass)
class->ref_child = ea_day_view_ref_child;
}
-AtkObject*
+AtkObject *
ea_day_view_new (GtkWidget *widget)
{
GObject *object;
@@ -233,7 +233,8 @@ ea_day_view_get_n_children (AtkObject *accessible)
}
static AtkObject *
-ea_day_view_ref_child (AtkObject *accessible, gint index)
+ea_day_view_ref_child (AtkObject *accessible,
+ gint index)
{
EDayView *day_view;
gint child_num;
diff --git a/calendar/gui/ea-day-view.h b/calendar/gui/ea-day-view.h
index 33399f6600..3e6d6154ef 100644
--- a/calendar/gui/ea-day-view.h
+++ b/calendar/gui/ea-day-view.h
@@ -50,7 +50,7 @@ struct _EaDayViewClass
EaCalViewClass parent_class;
};
-AtkObject* ea_day_view_new (GtkWidget *widget);
+AtkObject * ea_day_view_new (GtkWidget *widget);
G_END_DECLS
diff --git a/calendar/gui/ea-gnome-calendar.c b/calendar/gui/ea-gnome-calendar.c
index 0983de84b9..e1826355b5 100644
--- a/calendar/gui/ea-gnome-calendar.c
+++ b/calendar/gui/ea-gnome-calendar.c
@@ -35,7 +35,7 @@
static void ea_gnome_calendar_class_init (EaGnomeCalendarClass *klass);
-static gint ea_gnome_calendar_get_n_children (AtkObject* obj);
+static gint ea_gnome_calendar_get_n_children (AtkObject * obj);
static AtkObject * ea_gnome_calendar_ref_child (AtkObject *obj, gint i);
static void ea_gcal_dates_change_cb (GnomeCalendar *gcal, gpointer data);
@@ -114,7 +114,7 @@ ea_gnome_calendar_class_init (EaGnomeCalendarClass *klass)
class->ref_child = ea_gnome_calendar_ref_child;
}
-AtkObject*
+AtkObject *
ea_gnome_calendar_new (GtkWidget *widget)
{
GObject *object;
@@ -253,7 +253,7 @@ ea_gnome_calendar_get_label_description (GnomeCalendar *gcal)
}
static gint
-ea_gnome_calendar_get_n_children (AtkObject* obj)
+ea_gnome_calendar_get_n_children (AtkObject *obj)
{
g_return_val_if_fail (EA_IS_GNOME_CALENDAR (obj), 0);
@@ -264,7 +264,8 @@ ea_gnome_calendar_get_n_children (AtkObject* obj)
}
static AtkObject *
-ea_gnome_calendar_ref_child (AtkObject *obj, gint i)
+ea_gnome_calendar_ref_child (AtkObject *obj,
+ gint i)
{
AtkObject * child = NULL;
GnomeCalendar * calendarWidget;
@@ -309,7 +310,8 @@ ea_gnome_calendar_ref_child (AtkObject *obj, gint i)
}
static void
-ea_gcal_dates_change_cb (GnomeCalendar *gcal, gpointer data)
+ea_gcal_dates_change_cb (GnomeCalendar *gcal,
+ gpointer data)
{
const gchar *new_name;
diff --git a/calendar/gui/ea-gnome-calendar.h b/calendar/gui/ea-gnome-calendar.h
index db9acdb47e..953db4a2d5 100644
--- a/calendar/gui/ea-gnome-calendar.h
+++ b/calendar/gui/ea-gnome-calendar.h
@@ -50,7 +50,7 @@ struct _EaGnomeCalendarClass
GtkAccessibleClass parent_class;
};
-AtkObject* ea_gnome_calendar_new (GtkWidget *widget);
+AtkObject * ea_gnome_calendar_new (GtkWidget *widget);
const gchar * ea_gnome_calendar_get_label_description (GnomeCalendar *gcal);
diff --git a/calendar/gui/ea-jump-button.c b/calendar/gui/ea-jump-button.c
index e19b1037a0..34a7b32ad0 100644
--- a/calendar/gui/ea-jump-button.c
+++ b/calendar/gui/ea-jump-button.c
@@ -112,7 +112,7 @@ ea_jump_button_class_init (EaJumpButtonClass *klass)
class->get_description = ea_jump_button_get_description;
}
-AtkObject*
+AtkObject *
ea_jump_button_new (GObject *obj)
{
AtkObject *atk_obj = NULL;
@@ -171,7 +171,7 @@ atk_action_interface_init (AtkActionIface *iface)
static gboolean
jump_button_do_action (AtkAction *action,
- gint i)
+ gint i)
{
gboolean return_value = TRUE;
AtkGObjectAccessible *atk_gobj;
@@ -209,7 +209,7 @@ jump_button_get_n_actions (AtkAction *action)
static const gchar *
jump_button_get_keybinding (AtkAction *action,
- gint i)
+ gint i)
{
const gchar *return_value = NULL;
diff --git a/calendar/gui/ea-week-view-cell.c b/calendar/gui/ea-week-view-cell.c
index 506a5f5724..fce7a9def1 100644
--- a/calendar/gui/ea-week-view-cell.c
+++ b/calendar/gui/ea-week-view-cell.c
@@ -69,7 +69,9 @@ e_week_view_cell_class_init (EWeekViewCellClass *class)
}
EWeekViewCell *
-e_week_view_cell_new (EWeekView *week_view, gint row, gint column)
+e_week_view_cell_new (EWeekView *week_view,
+ gint row,
+ gint column)
{
GObject *object;
EWeekViewCell *cell;
@@ -95,7 +97,7 @@ static void ea_week_view_cell_class_init (EaWeekViewCellClass *klass);
static const gchar * ea_week_view_cell_get_name (AtkObject *accessible);
static const gchar * ea_week_view_cell_get_description (AtkObject *accessible);
-static AtkStateSet* ea_week_view_cell_ref_state_set (AtkObject *obj);
+static AtkStateSet * ea_week_view_cell_ref_state_set (AtkObject *obj);
static AtkObject * ea_week_view_cell_get_parent (AtkObject *accessible);
static gint ea_week_view_cell_get_index_in_parent (AtkObject *accessible);
@@ -169,7 +171,7 @@ ea_week_view_cell_class_init (EaWeekViewCellClass *klass)
}
-AtkObject*
+AtkObject *
ea_week_view_cell_new (GObject *obj)
{
gpointer object;
@@ -252,7 +254,7 @@ ea_week_view_cell_get_description (AtkObject *accessible)
return ea_week_view_cell_get_name (accessible);
}
-static AtkStateSet*
+static AtkStateSet *
ea_week_view_cell_ref_state_set (AtkObject *obj)
{
AtkStateSet *state_set;
@@ -336,8 +338,11 @@ atk_component_interface_init (AtkComponentIface *iface)
static void
component_interface_get_extents (AtkComponent *component,
- gint *x, gint *y, gint *width, gint *height,
- AtkCoordType coord_type)
+ gint *x,
+ gint *y,
+ gint *width,
+ gint *height,
+ AtkCoordType coord_type)
{
GObject *g_obj;
AtkObject *atk_obj;
diff --git a/calendar/gui/ea-week-view-cell.h b/calendar/gui/ea-week-view-cell.h
index 1524e9d3a8..afef4d1302 100644
--- a/calendar/gui/ea-week-view-cell.h
+++ b/calendar/gui/ea-week-view-cell.h
@@ -78,7 +78,7 @@ struct _EaWeekViewCellClass
AtkGObjectAccessibleClass parent_class;
};
-AtkObject* ea_week_view_cell_new (GObject *gobj);
+AtkObject * ea_week_view_cell_new (GObject *gobj);
G_END_DECLS
diff --git a/calendar/gui/ea-week-view-main-item.c b/calendar/gui/ea-week-view-main-item.c
index cdeefa0138..f7a5a2a7fe 100644
--- a/calendar/gui/ea-week-view-main-item.c
+++ b/calendar/gui/ea-week-view-main-item.c
@@ -147,7 +147,7 @@ static void atk_selection_interface_init (AtkSelectionIface *iface);
static gboolean selection_interface_add_selection (AtkSelection *selection,
gint i);
static gboolean selection_interface_clear_selection (AtkSelection *selection);
-static AtkObject* selection_interface_ref_selection (AtkSelection *selection,
+static AtkObject * selection_interface_ref_selection (AtkSelection *selection,
gint i);
static gint selection_interface_get_selection_count (AtkSelection *selection);
static gboolean selection_interface_is_child_selected (AtkSelection *selection,
@@ -268,7 +268,7 @@ ea_week_view_main_item_class_init (EaWeekViewMainItemClass *klass)
class->get_index_in_parent = ea_week_view_main_item_get_index_in_parent;
}
-AtkObject*
+AtkObject *
ea_week_view_main_item_new (GObject *obj)
{
AtkObject *accessible;
@@ -369,7 +369,8 @@ ea_week_view_main_item_get_n_children (AtkObject *accessible)
}
static AtkObject *
-ea_week_view_main_item_ref_child (AtkObject *accessible, gint index)
+ea_week_view_main_item_ref_child (AtkObject *accessible,
+ gint index)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
@@ -453,7 +454,8 @@ ea_week_view_main_item_get_index_in_parent (AtkObject *accessible)
/* callbacks */
static void
-ea_week_view_main_item_dates_change_cb (GnomeCalendar *gcal, gpointer data)
+ea_week_view_main_item_dates_change_cb (GnomeCalendar *gcal,
+ gpointer data)
{
EaWeekViewMainItem *ea_main_item;
@@ -471,7 +473,8 @@ ea_week_view_main_item_dates_change_cb (GnomeCalendar *gcal, gpointer data)
}
static void
-ea_week_view_main_item_time_change_cb (EWeekView *week_view, gpointer data)
+ea_week_view_main_item_time_change_cb (EWeekView *week_view,
+ gpointer data)
{
EaWeekViewMainItem *ea_main_item;
AtkObject *item_cell = NULL;
@@ -507,7 +510,8 @@ ea_week_view_main_item_time_change_cb (EWeekView *week_view, gpointer data)
static gint
ea_week_view_main_item_get_child_index_at (EaWeekViewMainItem *ea_main_item,
- gint row, gint column)
+ gint row,
+ gint column)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
@@ -533,7 +537,7 @@ ea_week_view_main_item_get_child_index_at (EaWeekViewMainItem *ea_main_item,
static gint
ea_week_view_main_item_get_row_at_index (EaWeekViewMainItem *ea_main_item,
- gint index)
+ gint index)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
@@ -554,7 +558,7 @@ ea_week_view_main_item_get_row_at_index (EaWeekViewMainItem *ea_main_item,
static gint
ea_week_view_main_item_get_column_at_index (EaWeekViewMainItem *ea_main_item,
- gint index)
+ gint index)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
@@ -575,7 +579,9 @@ ea_week_view_main_item_get_column_at_index (EaWeekViewMainItem *ea_main_item,
static gint
ea_week_view_main_item_get_row_label (EaWeekViewMainItem *ea_main_item,
- gint row, gchar *buffer, gint buffer_size)
+ gint row,
+ gchar *buffer,
+ gint buffer_size)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
@@ -649,8 +655,11 @@ atk_component_interface_init (AtkComponentIface *iface)
static void
component_interface_get_extents (AtkComponent *component,
- gint *x, gint *y, gint *width, gint *height,
- AtkCoordType coord_type)
+ gint *x,
+ gint *y,
+ gint *width,
+ gint *height,
+ AtkCoordType coord_type)
{
GObject *g_obj;
AtkObject *ea_canvas;
@@ -708,14 +717,14 @@ atk_table_interface_init (AtkTableIface *iface)
iface->get_column_description = table_interface_get_column_description;
}
-static AtkObject*
+static AtkObject *
table_interface_ref_at (AtkTable *table,
- gint row,
- gint column)
+ gint row,
+ gint column)
{
gint index;
- EaWeekViewMainItem* ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
+ EaWeekViewMainItem * ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
index = ea_week_view_main_item_get_child_index_at (ea_main_item,
row, column);
return ea_week_view_main_item_ref_child (ATK_OBJECT (ea_main_item), index);
@@ -728,7 +737,7 @@ table_interface_get_n_rows (AtkTable *table)
GObject *g_obj;
EWeekViewMainItem *main_item;
EWeekView *week_view;
- EaWeekViewMainItem* ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
+ EaWeekViewMainItem * ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
g_obj = atk_gobject_accessible_get_object (atk_gobj);
@@ -746,7 +755,7 @@ table_interface_get_n_columns (AtkTable *table)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
- EaWeekViewMainItem* ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
+ EaWeekViewMainItem * ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
g_obj = atk_gobject_accessible_get_object (atk_gobj);
@@ -758,39 +767,39 @@ table_interface_get_n_columns (AtkTable *table)
static gint
table_interface_get_index_at (AtkTable *table,
- gint row,
- gint column)
+ gint row,
+ gint column)
{
- EaWeekViewMainItem* ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
+ EaWeekViewMainItem * ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
return ea_week_view_main_item_get_child_index_at (ea_main_item,
row, column);
}
static gint
table_interface_get_column_at_index (AtkTable *table,
- gint index)
+ gint index)
{
- EaWeekViewMainItem* ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
+ EaWeekViewMainItem * ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
return ea_week_view_main_item_get_column_at_index (ea_main_item, index);
}
static gint
table_interface_get_row_at_index (AtkTable *table,
- gint index)
+ gint index)
{
- EaWeekViewMainItem* ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
+ EaWeekViewMainItem * ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
return ea_week_view_main_item_get_row_at_index (ea_main_item, index);
}
static gint
-table_interface_get_column_extent_at (AtkTable *table,
- gint row,
- gint column)
+table_interface_get_column_extent_at (AtkTable *table,
+ gint row,
+ gint column)
{
gint index;
gint width = 0, height = 0;
AtkObject *child;
- EaWeekViewMainItem* ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
+ EaWeekViewMainItem * ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
index = ea_week_view_main_item_get_child_index_at (ea_main_item,
row, column);
@@ -804,14 +813,14 @@ table_interface_get_column_extent_at (AtkTable *table,
}
static gint
-table_interface_get_row_extent_at (AtkTable *table,
- gint row,
- gint column)
+table_interface_get_row_extent_at (AtkTable *table,
+ gint row,
+ gint column)
{
gint index;
gint width = 0, height = 0;
AtkObject *child;
- EaWeekViewMainItem* ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
+ EaWeekViewMainItem * ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
index = ea_week_view_main_item_get_child_index_at (ea_main_item,
row, column);
@@ -826,13 +835,13 @@ table_interface_get_row_extent_at (AtkTable *table,
static gboolean
table_interface_is_row_selected (AtkTable *table,
- gint row)
+ gint row)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
EWeekViewMainItem *main_item;
EWeekView *week_view;
- EaWeekViewMainItem* ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
+ EaWeekViewMainItem * ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
g_obj = atk_gobject_accessible_get_object (atk_gobj);
@@ -845,7 +854,7 @@ table_interface_is_row_selected (AtkTable *table,
if (week_view->selection_start_day == -1)
/* no selection */
return FALSE;
- if ((row < 0)&&(row + 1 > week_view->weeks_shown ))
+ if ((row < 0) && (row + 1 > week_view->weeks_shown ))
return FALSE;
if (((week_view->selection_start_day < row * 7) &&
(week_view->selection_end_day < row * 7)) ||
@@ -858,8 +867,8 @@ table_interface_is_row_selected (AtkTable *table,
static gboolean
table_interface_is_selected (AtkTable *table,
- gint row,
- gint column)
+ gint row,
+ gint column)
{
return table_interface_is_row_selected (table, row) &&
table_interface_is_column_selected (table, column);
@@ -867,13 +876,13 @@ table_interface_is_selected (AtkTable *table,
static gboolean
table_interface_is_column_selected (AtkTable *table,
- gint column)
+ gint column)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
EWeekViewMainItem *main_item;
EWeekView *week_view;
- EaWeekViewMainItem* ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
+ EaWeekViewMainItem * ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
g_obj = atk_gobject_accessible_get_object (atk_gobj);
@@ -883,13 +892,13 @@ table_interface_is_column_selected (AtkTable *table,
main_item = E_WEEK_VIEW_MAIN_ITEM (g_obj);
week_view = e_week_view_main_item_get_week_view (main_item);
- if ((column <0)||(column >6))
+ if ((column <0) || (column >6))
return FALSE;
else {
gint i;
- for (i=0;i<week_view->weeks_shown;i++)
- if ((column + i*7>= week_view->selection_start_day ) &&
- (column + i*7<= week_view->selection_end_day))
+ for (i = 0; i < week_view->weeks_shown; i++)
+ if ((column + i *7>= week_view->selection_start_day ) &&
+ (column + i *7<= week_view->selection_end_day))
return TRUE;
return FALSE;
}
@@ -897,13 +906,13 @@ table_interface_is_column_selected (AtkTable *table,
static gint
table_interface_get_selected_rows (AtkTable *table,
- gint **rows_selected)
+ gint **rows_selected)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
EWeekViewMainItem *main_item;
EWeekView *week_view;
- EaWeekViewMainItem* ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
+ EaWeekViewMainItem * ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
gint start_row = -1, n_rows = 0;
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
@@ -932,13 +941,13 @@ table_interface_get_selected_rows (AtkTable *table,
static gint
table_interface_get_selected_columns (AtkTable *table,
- gint **columns_selected)
+ gint **columns_selected)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
EWeekViewMainItem *main_item;
EWeekView *week_view;
- EaWeekViewMainItem* ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
+ EaWeekViewMainItem * ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
gint start_column = -1, n_columns = 0;
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
@@ -970,13 +979,13 @@ table_interface_get_selected_columns (AtkTable *table,
static gboolean
table_interface_add_row_selection (AtkTable *table,
- gint row)
+ gint row)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
EWeekViewMainItem *main_item;
EWeekView *week_view;
- EaWeekViewMainItem* ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
+ EaWeekViewMainItem * ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
g_obj = atk_gobject_accessible_get_object (atk_gobj);
@@ -997,20 +1006,20 @@ table_interface_add_row_selection (AtkTable *table,
static gboolean
table_interface_remove_row_selection (AtkTable *table,
- gint row)
+ gint row)
{
return FALSE;
}
static gboolean
table_interface_add_column_selection (AtkTable *table,
- gint column)
+ gint column)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
EWeekViewMainItem *main_item;
EWeekView *week_view;
- EaWeekViewMainItem* ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
+ EaWeekViewMainItem * ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
g_obj = atk_gobject_accessible_get_object (atk_gobj);
@@ -1023,7 +1032,7 @@ table_interface_add_column_selection (AtkTable *table,
/* FIXME: we need multi-selection */
week_view->selection_start_day = column;
- week_view->selection_end_day = (week_view->weeks_shown - 1)*7+column;
+ week_view->selection_end_day = (week_view->weeks_shown - 1) * 7 + column;
gtk_widget_queue_draw (week_view->main_canvas);
return TRUE;
@@ -1031,42 +1040,42 @@ table_interface_add_column_selection (AtkTable *table,
static gboolean
table_interface_remove_column_selection (AtkTable *table,
- gint column)
+ gint column)
{
/* FIXME: NOT IMPLEMENTED */
return FALSE;
}
-static AtkObject*
+static AtkObject *
table_interface_get_row_header (AtkTable *table,
- gint row)
+ gint row)
{
/* FIXME: NOT IMPLEMENTED */
return NULL;
}
-static AtkObject*
+static AtkObject *
table_interface_get_column_header (AtkTable *table,
- gint in_col)
+ gint in_col)
{
/* FIXME: NOT IMPLEMENTED */
return NULL;
}
-static AtkObject*
-table_interface_get_caption (AtkTable *table)
+static AtkObject *
+table_interface_get_caption (AtkTable *table)
{
/* FIXME: NOT IMPLEMENTED */
return NULL;
}
static const gchar *
-table_interface_get_column_description (AtkTable *table,
- gint in_col)
+table_interface_get_column_description (AtkTable *table,
+ gint in_col)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
- EaWeekViewMainItem* ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
+ EaWeekViewMainItem * ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
const gchar *description;
EaCellTable *cell_data;
@@ -1118,14 +1127,14 @@ table_interface_get_column_description (AtkTable *table,
}
static const gchar *
-table_interface_get_row_description (AtkTable *table,
- gint row)
+table_interface_get_row_description (AtkTable *table,
+ gint row)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
EWeekViewMainItem *main_item;
EWeekView *week_view;
- EaWeekViewMainItem* ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
+ EaWeekViewMainItem * ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (table);
const gchar *description;
EaCellTable *cell_data;
@@ -1155,8 +1164,8 @@ table_interface_get_row_description (AtkTable *table,
return description;
}
-static AtkObject*
-table_interface_get_summary (AtkTable *table)
+static AtkObject *
+table_interface_get_summary (AtkTable *table)
{
/* FIXME: NOT IMPLEMENTED */
return NULL;
@@ -1177,13 +1186,14 @@ atk_selection_interface_init (AtkSelectionIface *iface)
}
static gboolean
-selection_interface_add_selection (AtkSelection *selection, gint i)
+selection_interface_add_selection (AtkSelection *selection,
+ gint i)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
EWeekViewMainItem *main_item;
EWeekView *week_view;
- EaWeekViewMainItem* ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (selection);
+ EaWeekViewMainItem * ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (selection);
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
g_obj = atk_gobject_accessible_get_object (atk_gobj);
@@ -1211,7 +1221,7 @@ selection_interface_clear_selection (AtkSelection *selection)
GObject *g_obj;
EWeekViewMainItem *main_item;
EWeekView *week_view;
- EaWeekViewMainItem* ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (selection);
+ EaWeekViewMainItem * ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (selection);
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
g_obj = atk_gobject_accessible_get_object (atk_gobj);
@@ -1229,14 +1239,15 @@ selection_interface_clear_selection (AtkSelection *selection)
return TRUE;
}
-static AtkObject*
-selection_interface_ref_selection (AtkSelection *selection, gint i)
+static AtkObject *
+selection_interface_ref_selection (AtkSelection *selection,
+ gint i)
{
gint count;
GObject *g_obj;
EWeekViewMainItem *main_item;
EWeekView *week_view;
- EaWeekViewMainItem* ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (selection);
+ EaWeekViewMainItem * ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (selection);
gint start_index;
count = selection_interface_get_selection_count (selection);
@@ -1262,7 +1273,7 @@ selection_interface_get_selection_count (AtkSelection *selection)
GObject *g_obj;
EWeekViewMainItem *main_item;
EWeekView *week_view;
- EaWeekViewMainItem* ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (selection);
+ EaWeekViewMainItem * ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (selection);
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
g_obj = atk_gobject_accessible_get_object (atk_gobj);
@@ -1280,13 +1291,14 @@ selection_interface_get_selection_count (AtkSelection *selection)
}
static gboolean
-selection_interface_is_child_selected (AtkSelection *selection, gint i)
+selection_interface_is_child_selected (AtkSelection *selection,
+ gint i)
{
AtkGObjectAccessible *atk_gobj;
GObject *g_obj;
EWeekViewMainItem *main_item;
EWeekView *week_view;
- EaWeekViewMainItem* ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (selection);
+ EaWeekViewMainItem * ea_main_item = EA_WEEK_VIEW_MAIN_ITEM (selection);
atk_gobj = ATK_GOBJECT_ACCESSIBLE (ea_main_item);
g_obj = atk_gobject_accessible_get_object (atk_gobj);
@@ -1296,7 +1308,7 @@ selection_interface_is_child_selected (AtkSelection *selection, gint i)
main_item = E_WEEK_VIEW_MAIN_ITEM (g_obj);
week_view = e_week_view_main_item_get_week_view (main_item);
- if ((week_view->selection_start_day <= i)&&(week_view->selection_end_day >= i))
+ if ((week_view->selection_start_day <= i) && (week_view->selection_end_day >= i))
return TRUE;
else
return FALSE;
diff --git a/calendar/gui/ea-week-view-main-item.h b/calendar/gui/ea-week-view-main-item.h
index d9110160c4..f8598c9a1f 100644
--- a/calendar/gui/ea-week-view-main-item.h
+++ b/calendar/gui/ea-week-view-main-item.h
@@ -52,7 +52,7 @@ struct _EaWeekViewMainItemClass
AtkGObjectAccessibleClass parent_class;
};
-AtkObject* ea_week_view_main_item_new (GObject *obj);
+AtkObject * ea_week_view_main_item_new (GObject *obj);
G_END_DECLS
diff --git a/calendar/gui/ea-week-view.c b/calendar/gui/ea-week-view.c
index c431f2ce14..15fe1cb09f 100644
--- a/calendar/gui/ea-week-view.c
+++ b/calendar/gui/ea-week-view.c
@@ -36,7 +36,7 @@ static void ea_week_view_class_init (EaWeekViewClass *klass);
static const gchar * ea_week_view_get_name (AtkObject *accessible);
static const gchar * ea_week_view_get_description (AtkObject *accessible);
static gint ea_week_view_get_n_children (AtkObject *obj);
-static AtkObject* ea_week_view_ref_child (AtkObject *obj,
+static AtkObject * ea_week_view_ref_child (AtkObject *obj,
gint i);
static gpointer parent_class = NULL;
@@ -101,7 +101,7 @@ ea_week_view_class_init (EaWeekViewClass *klass)
class->ref_child = ea_week_view_ref_child;
}
-AtkObject*
+AtkObject *
ea_week_view_new (GtkWidget *widget)
{
GObject *object;
@@ -256,7 +256,8 @@ ea_week_view_get_n_children (AtkObject *accessible)
}
static AtkObject *
-ea_week_view_ref_child (AtkObject *accessible, gint index)
+ea_week_view_ref_child (AtkObject *accessible,
+ gint index)
{
EWeekView *week_view;
gint child_num, max_count;
diff --git a/calendar/gui/ea-week-view.h b/calendar/gui/ea-week-view.h
index 09409ec4cf..d6184f08c4 100644
--- a/calendar/gui/ea-week-view.h
+++ b/calendar/gui/ea-week-view.h
@@ -51,7 +51,7 @@ struct _EaWeekViewClass
EaCalViewClass parent_class;
};
-AtkObject* ea_week_view_new (GtkWidget *widget);
+AtkObject * ea_week_view_new (GtkWidget *widget);
G_END_DECLS
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index aca2d05068..cf1a12deab 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -99,8 +99,8 @@ struct _GnomeCalendarPrivate {
guint update_marcus_bains_line_timeout;
/* This is the view currently shown. We use it to keep track of the
- positions of the panes. range_selected is TRUE if a range of dates
- was selected in the date navigator to show the view. */
+ * positions of the panes. range_selected is TRUE if a range of dates
+ * was selected in the date navigator to show the view. */
ECalendarView *views[GNOME_CAL_LAST_VIEW];
GnomeCalendarViewType current_view_type;
GList *notifications;
@@ -108,8 +108,8 @@ struct _GnomeCalendarPrivate {
gboolean range_selected;
/* These are the saved positions of the panes. They are multiples of
- calendar month widths & heights in the date navigator, so that they
- will work OK after theme changes. */
+ * calendar month widths & heights in the date navigator, so that they
+ * will work OK after theme changes. */
gint hpane_pos;
gint hpane_pos_month_view;
@@ -117,8 +117,8 @@ struct _GnomeCalendarPrivate {
guint day_selected_id;
/* The dates currently shown. If they are -1 then we have no dates
- shown. We only use these to check if we need to emit a
- 'dates-shown-changed' signal.*/
+ * shown. We only use these to check if we need to emit a
+ * 'dates-shown-changed' signal.*/
time_t visible_start;
time_t visible_end;
gboolean updating;
@@ -204,7 +204,9 @@ message_push (Message *msg)
G_DEFINE_TYPE (GnomeCalendar, gnome_calendar, G_TYPE_OBJECT)
static void
-gcal_update_status_message (GnomeCalendar *gcal, const gchar *message, gdouble percent)
+gcal_update_status_message (GnomeCalendar *gcal,
+ const gchar *message,
+ gdouble percent)
{
ECalModel *model;
@@ -301,9 +303,9 @@ view_progress_cb (ECalModel *model,
static void
view_complete_cb (ECalModel *model,
- const GError *error,
- ECalClientSourceType type,
- GnomeCalendar *gcal)
+ const GError *error,
+ ECalClientSourceType type,
+ GnomeCalendar *gcal)
{
gcal_update_status_message (gcal, NULL, -1);
}
@@ -878,7 +880,7 @@ get_times_for_views (GnomeCalendar *gcal,
time_to_gdate_with_zone (&date, *start_time, timezone);
/* The start of the work-week is the first working day after the
- week start day. */
+ * week start day. */
/* Get the weekday corresponding to start_time, 0 (Sun) to 6 (Sat). */
weekday = g_date_get_weekday (&date) % 7;
@@ -902,7 +904,7 @@ get_times_for_views (GnomeCalendar *gcal,
last_day = (last_day + 6) % 7;
}
/* Now calculate the days we need to show to include all the
- working days in the week. Add 1 to make it inclusive. */
+ * working days in the week. Add 1 to make it inclusive. */
days_shown = (last_day + 7 - first_day) % 7 + 1;
} else {
/* If no working days are set, just use 7. */
@@ -974,7 +976,9 @@ get_times_for_views (GnomeCalendar *gcal,
/* Computes the range of time that the date navigator is showing */
static void
-get_date_navigator_range (GnomeCalendar *gcal, time_t *start_time, time_t *end_time)
+get_date_navigator_range (GnomeCalendar *gcal,
+ time_t *start_time,
+ time_t *end_time)
{
ECalModel *model;
gint start_year, start_month, start_day;
@@ -1014,7 +1018,8 @@ get_date_navigator_range (GnomeCalendar *gcal, time_t *start_time, time_t *end_t
/* Adjusts a given query sexp with the time range of the date navigator */
static gchar *
-adjust_client_view_sexp (GnomeCalendar *gcal, const gchar *sexp)
+adjust_client_view_sexp (GnomeCalendar *gcal,
+ const gchar *sexp)
{
time_t start_time, end_time;
gchar *start, *end;
@@ -1550,7 +1555,7 @@ notify_selected_time_changed (GnomeCalendar *gcal)
static void
gnome_calendar_goto_date (GnomeCalendar *gcal,
- GnomeCalendarGotoDateType goto_date)
+ GnomeCalendarGotoDateType goto_date)
{
ECalModel *model;
time_t new_time = 0;
@@ -1566,7 +1571,7 @@ gnome_calendar_goto_date (GnomeCalendar *gcal,
switch (goto_date) {
/* GNOME_CAL_GOTO_TODAY and GNOME_CAL_GOTO_DATE are
- currently not used
+ * currently not used
*/
case GNOME_CAL_GOTO_TODAY:
break;
@@ -1625,7 +1630,8 @@ gnome_calendar_goto_date (GnomeCalendar *gcal,
}
void
-gnome_calendar_goto (GnomeCalendar *gcal, time_t new_time)
+gnome_calendar_goto (GnomeCalendar *gcal,
+ time_t new_time)
{
GnomeCalendarPrivate *priv;
gint i;
@@ -1676,7 +1682,8 @@ gnome_calendar_update_view_times (GnomeCalendar *gcal,
}
static void
-gnome_calendar_direction (GnomeCalendar *gcal, gint direction)
+gnome_calendar_direction (GnomeCalendar *gcal,
+ gint direction)
{
ECalModel *model;
icaltimezone *timezone;
@@ -1724,7 +1731,8 @@ gnome_calendar_previous (GnomeCalendar *gcal)
}
void
-gnome_calendar_dayjump (GnomeCalendar *gcal, time_t time)
+gnome_calendar_dayjump (GnomeCalendar *gcal,
+ time_t time)
{
ECalModel *model;
icaltimezone *timezone;
@@ -1866,16 +1874,18 @@ gnome_calendar_display_view (GnomeCalendar *gcal,
gnome_calendar_set_range_selected (gcal, range_selected);
/* For the week & month views we want the selection in the date
- navigator to be rounded to the nearest week when the arrow buttons
- are pressed to move to the previous/next month. */
+ * navigator to be rounded to the nearest week when the arrow buttons
+ * are pressed to move to the previous/next month. */
g_object_set (
gcal->priv->date_navigator->calitem,
"preserve_day_when_moving", preserve_day, NULL);
/* keep week days selected as before for a work week view */
- g_object_set (G_OBJECT (gcal->priv->date_navigator->calitem),
- "keep_wdays_on_weeknum_click", view_type == GNOME_CAL_WORK_WEEK_VIEW,
- NULL);
+ g_object_set (
+ gcal->priv->date_navigator->calitem,
+ "keep_wdays_on_weeknum_click",
+ view_type == GNOME_CAL_WORK_WEEK_VIEW,
+ NULL);
if (!gcal->priv->base_view_time)
start_time = time (NULL);
@@ -1931,7 +1941,8 @@ gnome_calendar_get_memo_table (GnomeCalendar *gcal)
}
void
-gnome_calendar_set_memo_table (GnomeCalendar *gcal, GtkWidget *memo_table)
+gnome_calendar_set_memo_table (GnomeCalendar *gcal,
+ GtkWidget *memo_table)
{
g_return_if_fail (GNOME_IS_CALENDAR (gcal));
@@ -1957,7 +1968,8 @@ gnome_calendar_get_task_table (GnomeCalendar *gcal)
}
void
-gnome_calendar_set_task_table (GnomeCalendar *gcal, GtkWidget *task_table)
+gnome_calendar_set_task_table (GnomeCalendar *gcal,
+ GtkWidget *task_table)
{
g_return_if_fail (GNOME_IS_CALENDAR (gcal));
@@ -2009,7 +2021,7 @@ gnome_calendar_set_range_selected (GnomeCalendar *gcal,
void
gnome_calendar_set_selected_time_range (GnomeCalendar *gcal,
- time_t start_time)
+ time_t start_time)
{
gnome_calendar_update_view_times (gcal, start_time);
gnome_calendar_update_date_navigator (gcal);
@@ -2026,7 +2038,9 @@ gnome_calendar_set_selected_time_range (GnomeCalendar *gcal,
**/
#if 0 /* KILL-BONOBO */
void
-gnome_calendar_new_task (GnomeCalendar *gcal, time_t *dtstart, time_t *dtend)
+gnome_calendar_new_task (GnomeCalendar *gcal,
+ time_t *dtstart,
+ time_t *dtend)
{
GnomeCalendarPrivate *priv;
ECal *ecal;
@@ -2080,12 +2094,12 @@ gnome_calendar_new_task (GnomeCalendar *gcal, time_t *dtstart, time_t *dtend)
#endif
/* Returns the selected time range for the current view. Note that this may be
- different from the fields in the GnomeCalendar, since the view may clip
- this or choose a more appropriate time. */
+ * different from the fields in the GnomeCalendar, since the view may clip
+ * this or choose a more appropriate time. */
void
gnome_calendar_get_current_time_range (GnomeCalendar *gcal,
- time_t *start_time,
- time_t *end_time)
+ time_t *start_time,
+ time_t *end_time)
{
GnomeCalendarViewType view_type;
ECalendarView *view;
@@ -2097,7 +2111,7 @@ gnome_calendar_get_current_time_range (GnomeCalendar *gcal,
}
/* This updates the month shown and the days selected in the calendar, if
- necessary. */
+ * necessary. */
static void
gnome_calendar_update_date_navigator (GnomeCalendar *gcal)
{
@@ -2165,8 +2179,8 @@ gnome_calendar_notify_dates_shown_changed (GnomeCalendar *gcal)
return;
/* We check if the visible date range has changed, and only emit the
- signal if it has. (This makes sure we only change the folder title
- bar label in the shell when we need to.) */
+ * signal if it has. (This makes sure we only change the folder title
+ * bar label in the shell when we need to.) */
if (priv->visible_start != start_time
|| priv->visible_end != end_time) {
priv->visible_start = start_time;
@@ -2206,9 +2220,9 @@ struct purge_data {
static gboolean
check_instance_cb (ECalComponent *comp,
- time_t instance_start,
- time_t instance_end,
- gpointer data)
+ time_t instance_start,
+ time_t instance_end,
+ gpointer data)
{
struct purge_data *pd = data;
@@ -2219,7 +2233,8 @@ check_instance_cb (ECalComponent *comp,
}
void
-gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than)
+gnome_calendar_purge (GnomeCalendar *gcal,
+ time_t older_than)
{
gchar *sexp, *start, *end;
GList *clients, *l;
diff --git a/calendar/gui/gnome-cal.h b/calendar/gui/gnome-cal.h
index 58130399f4..bc65fe2316 100644
--- a/calendar/gui/gnome-cal.h
+++ b/calendar/gui/gnome-cal.h
@@ -166,8 +166,8 @@ void gnome_calendar_new_task (GnomeCalendar *gcal,
time_t *dtend);
/* Returns the selected time range for the current view. Note that this may be
- different from the fields in the GnomeCalendar, since the view may clip
- this or choose a more appropriate time. */
+ * different from the fields in the GnomeCalendar, since the view may clip
+ * this or choose a more appropriate time. */
void gnome_calendar_get_current_time_range
(GnomeCalendar *gcal,
time_t *start_time,
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c
index 19f01614c6..c2fa19ba68 100644
--- a/calendar/gui/itip-utils.c
+++ b/calendar/gui/itip-utils.c
@@ -397,7 +397,8 @@ typedef struct {
} ItipUtilTZData;
static void
-foreach_tzid_callback (icalparameter *param, gpointer data)
+foreach_tzid_callback (icalparameter *param,
+ gpointer data)
{
ItipUtilTZData *tz_data = data;
const gchar *tzid;
@@ -1057,7 +1058,8 @@ comp_limit_attendees (ECalComponent *comp)
}
static void
-comp_sentby (ECalComponent *comp, ECalClient *cal_client)
+comp_sentby (ECalComponent *comp,
+ ECalClient *cal_client)
{
ECalComponentOrganizer organizer;
GSList * attendees, *l;
@@ -1109,7 +1111,8 @@ comp_sentby (ECalComponent *comp, ECalClient *cal_client)
}
}
static ECalComponent *
-comp_minimal (ECalComponent *comp, gboolean attendee)
+comp_minimal (ECalComponent *comp,
+ gboolean attendee)
{
ECalComponent *clone;
icalcomponent *icomp, *icomp_clone;
@@ -1827,15 +1830,16 @@ itip_publish_begin (ECalComponent *pub_comp,
}
static void
-fb_sort (struct icalperiodtype *ipt, gint fb_count)
+fb_sort (struct icalperiodtype *ipt,
+ gint fb_count)
{
gint i,j;
if (ipt == NULL || fb_count == 0)
return;
- for (i = 0; i < fb_count-1; i++) {
- for (j = i+1; j < fb_count; j++) {
+ for (i = 0; i < fb_count - 1; i++) {
+ for (j = i + 1; j < fb_count; j++) {
struct icalperiodtype temp;
if (icaltime_compare (ipt[i].start, ipt[j].start) < 0)
@@ -1880,7 +1884,7 @@ comp_fb_normalize (icalcomponent *icomp)
fb_count = icalcomponent_count_properties (icomp,
ICAL_FREEBUSY_PROPERTY);
- ipt = g_new0 (struct icalperiodtype, fb_count+1);
+ ipt = g_new0 (struct icalperiodtype, fb_count + 1);
for (prop = icalcomponent_get_first_property (icomp,
ICAL_FREEBUSY_PROPERTY);
@@ -1894,7 +1898,7 @@ comp_fb_normalize (icalcomponent *icomp)
fb_sort (ipt, fb_count);
- for (j = 0; j <= fb_count-1; j++) {
+ for (j = 0; j <= fb_count - 1; j++) {
icalparameter *param;
prop = icalproperty_new_freebusy (ipt[j]);
diff --git a/calendar/gui/misc.c b/calendar/gui/misc.c
index 29de491df8..f3bacef89b 100644
--- a/calendar/gui/misc.c
+++ b/calendar/gui/misc.c
@@ -86,7 +86,8 @@ get_uri_without_password (const gchar *full_uri)
}
gint
-get_position_in_array (GPtrArray *objects, gpointer item)
+get_position_in_array (GPtrArray *objects,
+ gpointer item)
{
gint i;
@@ -99,7 +100,8 @@ get_position_in_array (GPtrArray *objects, gpointer item)
}
gchar *
-calculate_time (time_t start, time_t end)
+calculate_time (time_t start,
+ time_t end)
{
time_t difference = end - start;
gchar *str;
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index 2c17b05c86..6d37168fc1 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -68,10 +68,10 @@ struct PrintCalItem {
time_t start;
};
-static double
+static gdouble
evo_calendar_print_renderer_get_width (GtkPrintContext *context,
- PangoFontDescription *font,
- const gchar *text)
+ PangoFontDescription *font,
+ const gchar *text)
{
PangoLayout *layout;
gint layout_width, layout_height;
@@ -90,8 +90,8 @@ evo_calendar_print_renderer_get_width (GtkPrintContext *context,
static gdouble
evo_calendar_print_renderer_get_height (GtkPrintContext *context,
- PangoFontDescription *font,
- const gchar *text)
+ PangoFontDescription *font,
+ const gchar *text)
{
PangoLayout *layout;
gint layout_width, layout_height;
@@ -108,7 +108,7 @@ evo_calendar_print_renderer_get_height (GtkPrintContext *context,
return pango_units_to_double (layout_height);
}
-static double
+static gdouble
get_font_size (PangoFontDescription *font)
{
g_return_val_if_fail (font, 0.0);
@@ -139,17 +139,17 @@ get_font_size (PangoFontDescription *font)
#define MONTH_NORMAL_FONT_SIZE 8
/* The height of the header bar across the top of the Day, Week & Month views,
- which contains the dates shown and the 2 small calendar months. */
+ * which contains the dates shown and the 2 small calendar months. */
#define HEADER_HEIGHT 80
/* The width of the small calendar months, the space from the right edge of
- the header rectangle, and the space between the months. */
+ * the header rectangle, and the space between the months. */
#define MIN_SMALL_MONTH_WIDTH 100
#define SMALL_MONTH_PAD 5
#define SMALL_MONTH_SPACING 20
/* The minimum number of rows we leave space for for the long events in the
- day view. */
+ * day view. */
#define DAY_VIEW_MIN_ROWS_IN_TOP_DISPLAY 2
/* The row height for long events in the day view. */
@@ -170,7 +170,7 @@ get_font_size (PangoFontDescription *font)
#define EPSILON 0.01
/* The weird month of September 1752, where 3 Sep through 13 Sep were
- eliminated due to the Gregorian reformation. */
+ * eliminated due to the Gregorian reformation. */
static const gint sept_1752[42] = {
0, 0, 1, 2, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23,
@@ -222,7 +222,7 @@ struct psinfo
};
/* Convenience function to help the transition to timezone functions.
- It converts a time_t to a struct tm. */
+ * It converts a time_t to a struct tm. */
static void
convert_timet_to_struct_tm (time_t time,
icaltimezone *zone,
@@ -282,7 +282,7 @@ build_month (ECalModel *model,
d_week = time_day_of_week (1, month, year);
/* Get the configuration setting specifying which weekday we put on
- the left column, 0=Sun to 6=Sat. */
+ * the left column, 0=Sun to 6=Sat. */
week_start_day = e_cal_model_get_week_start_day (model);
/* Figure out which square we want to put the 1 in. */
@@ -299,7 +299,8 @@ build_month (ECalModel *model,
}
static PangoFontDescription *
-get_font_for_size (double height, PangoWeight weight)
+get_font_for_size (gdouble height,
+ PangoWeight weight)
{
PangoFontDescription *desc;
gint size;
@@ -316,19 +317,23 @@ get_font_for_size (double height, PangoWeight weight)
}
/* Prints a rectangle, with or without a border, filled or outline, and
- possibly with triangular arrows at one or both horizontal edges.
- width = width of border, -ve means no border.
- red,green,blue = bgcolor to fill, -ve means no fill.
- left_triangle_width, right_triangle_width = width from edge of rectangle to
- point of triangle, or -ve for no triangle. */
+ * possibly with triangular arrows at one or both horizontal edges.
+ * width = width of border, -ve means no border.
+ * red,green,blue = bgcolor to fill, -ve means no fill.
+ * left_triangle_width, right_triangle_width = width from edge of rectangle to
+ * point of triangle, or -ve for no triangle. */
static void
print_border_with_triangles (GtkPrintContext *pc,
- gdouble x1, gdouble x2,
- gdouble y1, gdouble y2,
- gdouble line_width,
- gdouble red, gdouble green, gdouble blue,
- gdouble left_triangle_width,
- gdouble right_triangle_width)
+ gdouble x1,
+ gdouble x2,
+ gdouble y1,
+ gdouble y2,
+ gdouble line_width,
+ gdouble red,
+ gdouble green,
+ gdouble blue,
+ gdouble left_triangle_width,
+ gdouble right_triangle_width)
{
cairo_t *cr = gtk_print_context_get_cairo_context (pc);
@@ -385,14 +390,18 @@ print_border_with_triangles (GtkPrintContext *pc,
}
/* Prints a rectangle, with or without a border, and filled or outline.
- width = width of border, -ve means no border.
- fillcolor = shade of fill, -ve means no fill. */
+ * width = width of border, -ve means no border.
+ * fillcolor = shade of fill, -ve means no fill. */
static void
print_border_rgb (GtkPrintContext *pc,
- gdouble x1, gdouble x2,
- gdouble y1, gdouble y2,
- gdouble line_width,
- gdouble red, gdouble green, gdouble blue)
+ gdouble x1,
+ gdouble x2,
+ gdouble y1,
+ gdouble y2,
+ gdouble line_width,
+ gdouble red,
+ gdouble green,
+ gdouble blue)
{
print_border_with_triangles (
pc, x1, x2, y1, y2, line_width,
@@ -401,10 +410,12 @@ print_border_rgb (GtkPrintContext *pc,
static void
print_border (GtkPrintContext *pc,
- gdouble x1, gdouble x2,
- gdouble y1, gdouble y2,
- gdouble line_width,
- gdouble fillcolor)
+ gdouble x1,
+ gdouble x2,
+ gdouble y1,
+ gdouble y2,
+ gdouble line_width,
+ gdouble fillcolor)
{
print_border_rgb (
pc, x1, x2, y1, y2, line_width,
@@ -413,9 +424,13 @@ print_border (GtkPrintContext *pc,
static void
print_rectangle (GtkPrintContext *context,
- gdouble x, gdouble y,
- gdouble width, gdouble height,
- gdouble red, gdouble green, gdouble blue)
+ gdouble x,
+ gdouble y,
+ gdouble width,
+ gdouble height,
+ gdouble red,
+ gdouble green,
+ gdouble blue)
{
cairo_t *cr = gtk_print_context_get_cairo_context (context);
@@ -429,12 +444,17 @@ print_rectangle (GtkPrintContext *context,
}
/* Prints 1 line of aligned text in a box. It is centered vertically, and
- the horizontal alignment can be either PANGO_ALIGN_LEFT, PANGO_ALIGN_RIGHT,
- or PANGO_ALIGN_CENTER. */
-static double
-print_text (GtkPrintContext *context, PangoFontDescription *desc,
- const gchar *text, PangoAlignment alignment,
- gdouble x1, gdouble x2, gdouble y1, gdouble y2)
+ * the horizontal alignment can be either PANGO_ALIGN_LEFT, PANGO_ALIGN_RIGHT,
+ * or PANGO_ALIGN_CENTER. */
+static gdouble
+print_text (GtkPrintContext *context,
+ PangoFontDescription *desc,
+ const gchar *text,
+ PangoAlignment alignment,
+ gdouble x1,
+ gdouble x2,
+ gdouble y1,
+ gdouble y2)
{
PangoLayout *layout;
gint layout_width, layout_height;
@@ -475,10 +495,14 @@ print_text (GtkPrintContext *context, PangoFontDescription *desc,
}
/* gets/frees the font for you, as a normal font */
-static double
-print_text_size (GtkPrintContext *context, const gchar *text,
- PangoAlignment alignment, gdouble x1, gdouble x2,
- gdouble y1, gdouble y2)
+static gdouble
+print_text_size (GtkPrintContext *context,
+ const gchar *text,
+ PangoAlignment alignment,
+ gdouble x1,
+ gdouble x2,
+ gdouble y1,
+ gdouble y2)
{
PangoFontDescription *font;
gdouble w;
@@ -491,10 +515,14 @@ print_text_size (GtkPrintContext *context, const gchar *text,
}
/* gets/frees the font for you, as a bold font */
-static double
-print_text_size_bold (GtkPrintContext *context, const gchar *text,
- PangoAlignment alignment, gdouble x1, gdouble x2,
- gdouble y1, gdouble y2)
+static gdouble
+print_text_size_bold (GtkPrintContext *context,
+ const gchar *text,
+ PangoAlignment alignment,
+ gdouble x1,
+ gdouble x2,
+ gdouble y1,
+ gdouble y2)
{
PangoFontDescription *font;
gdouble w;
@@ -507,10 +535,15 @@ print_text_size_bold (GtkPrintContext *context, const gchar *text,
}
static void
-titled_box (GtkPrintContext *context, const gchar *text,
- PangoFontDescription *font, PangoAlignment alignment,
- gdouble *x1, gdouble *y1, gdouble *x2, gdouble *y2,
- gdouble linewidth)
+titled_box (GtkPrintContext *context,
+ const gchar *text,
+ PangoFontDescription *font,
+ PangoAlignment alignment,
+ gdouble *x1,
+ gdouble *y1,
+ gdouble *x2,
+ gdouble *y2,
+ gdouble linewidth)
{
gdouble size;
@@ -572,17 +605,17 @@ format_date (struct tm *tm,
if (flags & DATE_DAY) {
if (flags & DATE_DAYNAME)
strcat(fmt, " ");
- strcat (fmt, gettext (days[tm->tm_mday-1]));
+ strcat (fmt, gettext (days[tm->tm_mday - 1]));
}
if (flags & DATE_MONTH) {
- if (flags & (DATE_DAY|DATE_DAYNAME))
+ if (flags & (DATE_DAY | DATE_DAYNAME))
strcat(fmt, " ");
strcat(fmt, "%B");
- if ((flags & (DATE_DAY|DATE_YEAR)) == (DATE_DAY|DATE_YEAR))
+ if ((flags & (DATE_DAY | DATE_YEAR)) == (DATE_DAY | DATE_YEAR))
strcat(fmt, ",");
}
if (flags & DATE_YEAR) {
- if (flags & (DATE_DAY|DATE_DAYNAME|DATE_MONTH))
+ if (flags & (DATE_DAY | DATE_DAYNAME | DATE_MONTH))
strcat(fmt, " ");
strcat(fmt, "%Y");
}
@@ -612,7 +645,8 @@ const gchar *daynames[] =
N_("Th"), N_("Fr"), N_("Sa") };
static gdouble
-calc_small_month_width (GtkPrintContext *context, gdouble for_height)
+calc_small_month_width (GtkPrintContext *context,
+ gdouble for_height)
{
PangoFontDescription *font_bold;
@@ -643,10 +677,17 @@ calc_small_month_width (GtkPrintContext *context, gdouble for_height)
print out the month small, embolden any days with events.
*/
static void
-print_month_small (GtkPrintContext *context, GnomeCalendar *gcal, time_t month,
- gdouble x1, gdouble y1, gdouble x2, gdouble y2,
- gint titleflags, time_t greystart, time_t greyend,
- gint bordertitle)
+print_month_small (GtkPrintContext *context,
+ GnomeCalendar *gcal,
+ time_t month,
+ gdouble x1,
+ gdouble y1,
+ gdouble x2,
+ gdouble y2,
+ gint titleflags,
+ time_t greystart,
+ time_t greyend,
+ gint bordertitle)
{
icaltimezone *zone;
PangoFontDescription *font, *font_bold, *font_normal;
@@ -685,11 +726,11 @@ print_month_small (GtkPrintContext *context, GnomeCalendar *gcal, time_t month,
col_width = (x2 - x1) / (7 + (week_numbers ? 1 : 0));
/* The top row with the day abbreviations gets an extra bit of
- vertical space around it. */
+ * vertical space around it. */
row_height = ABS (y2 - y1) / 7.4;
/* First we need to calculate a reasonable font size. We start with a
- rough guess of just under the height of each row. */
+ * rough guess of just under the height of each row. */
font_size = row_height;
/* get month days */
@@ -700,8 +741,8 @@ print_month_small (GtkPrintContext *context, GnomeCalendar *gcal, time_t month,
font_bold = get_font_for_size (font_size, PANGO_WEIGHT_BOLD);
/* Get a reasonable estimate of the largest number we will need,
- and use it to calculate the offset from the right edge of the
- cell that we should put the numbers. */
+ * and use it to calculate the offset from the right edge of the
+ * cell that we should put the numbers. */
w = evo_calendar_print_renderer_get_width (context, font_bold, "23");
text_xpad = (col_width - w) / 2;
@@ -732,9 +773,9 @@ print_month_small (GtkPrintContext *context, GnomeCalendar *gcal, time_t month,
if (week_numbers) {
cell_left = x1;
/* We add a 0.05 to make sure the cells meet up with
- each other. Otherwise you sometimes get lines
- between them which looks bad. Maybe I'm not using
- coords in the way gnome-print expects. */
+ * each other. Otherwise you sometimes get lines
+ * between them which looks bad. Maybe I'm not using
+ * coords in the way gnome-print expects. */
cell_right = cell_left + col_width + 0.05;
text_right = cell_right - text_xpad;
@@ -774,9 +815,9 @@ print_month_small (GtkPrintContext *context, GnomeCalendar *gcal, time_t month,
cell_left = x1 + (x + (week_numbers ? 1 : 0)) * col_width;
/* We add a 0.05 to make sure the cells meet up with
- each other. Otherwise you sometimes get lines
- between them which looks bad. Maybe I'm not using
- coords in the way gnome-print expects. */
+ * each other. Otherwise you sometimes get lines
+ * between them which looks bad. Maybe I'm not using
+ * coords in the way gnome-print expects. */
cell_right = cell_left + col_width + 0.05;
text_right = cell_right - text_xpad;
@@ -813,13 +854,18 @@ print_month_small (GtkPrintContext *context, GnomeCalendar *gcal, time_t month,
}
/* wraps text into the print context, not taking up more than its allowed space */
-static double
+static gdouble
bound_text (GtkPrintContext *context,
PangoFontDescription *font,
- const gchar *text, gint len,
- gdouble x1, gdouble y1,
- gdouble x2, gdouble y2,
- gboolean can_wrap, gdouble *last_page_start, gint *pages)
+ const gchar *text,
+ gint len,
+ gdouble x1,
+ gdouble y1,
+ gdouble x2,
+ gdouble y2,
+ gboolean can_wrap,
+ gdouble *last_page_start,
+ gint *pages)
{
PangoLayout *layout;
gint layout_width, layout_height;
@@ -871,9 +917,14 @@ bound_text (GtkPrintContext *context,
/* Draw the borders, lines, and times down the left of the day view. */
static void
-print_day_background (GtkPrintContext *context, GnomeCalendar *gcal,
- time_t whence, struct pdinfo *pdi,
- double left, double right, double top, double bottom)
+print_day_background (GtkPrintContext *context,
+ GnomeCalendar *gcal,
+ time_t whence,
+ struct pdinfo *pdi,
+ gdouble left,
+ gdouble right,
+ gdouble top,
+ gdouble bottom)
{
ECalModel *model;
PangoFontDescription *font_hour, *font_minute;
@@ -969,7 +1020,7 @@ print_day_background (GtkPrintContext *context, GnomeCalendar *gcal,
cairo_stroke (cr);
/* Draw the horizontal line for the 1/2-hours, across the
- entire width except for part of the time column. */
+ * entire width except for part of the time column. */
cairo_move_to (cr, left + width * 0.6, y - yinc / 2);
cairo_line_to (cr, right, y - yinc / 2);
cairo_set_line_width (cr, 1);
@@ -984,13 +1035,13 @@ print_day_background (GtkPrintContext *context, GnomeCalendar *gcal,
/* This adds one event to the view, adding it to the appropriate array. */
static gint
print_day_add_event (ECalModelComponent *comp_data,
- time_t start,
- time_t end,
- icaltimezone *zone,
- gint days_shown,
- time_t *day_starts,
- GArray *long_events,
- GArray **events)
+ time_t start,
+ time_t end,
+ icaltimezone *zone,
+ gint days_shown,
+ time_t *day_starts,
+ GArray *long_events,
+ GArray **events)
{
EDayViewEvent event;
@@ -1018,7 +1069,7 @@ print_day_add_event (ECalModelComponent *comp_data,
event.canvas_item = NULL;
/* Calculate the start & end minute, relative to the top of the
- display. */
+ * display. */
/*offset = day_view->first_hour_shown * 60
+ day_view->first_minute_shown;*/
offset = 0;
@@ -1033,12 +1084,12 @@ print_day_add_event (ECalModelComponent *comp_data,
if (start >= day_starts[day] && end <= day_starts[day + 1]) {
/* Special case for when the appointment ends at
- midnight, i.e. the start of the next day. */
+ * midnight, i.e. the start of the next day. */
if (end == day_starts[day + 1]) {
/* If the event last the entire day, then we
- skip it here so it gets added to the top
- canvas. */
+ * skip it here so it gets added to the top
+ * canvas. */
if (start == day_starts[day])
break;
@@ -1050,14 +1101,16 @@ print_day_add_event (ECalModelComponent *comp_data,
}
/* The event wasn't within one day so it must be a long event,
- i.e. shown in the top canvas. */
+ * i.e. shown in the top canvas. */
g_array_append_val (long_events, event);
return E_DAY_VIEW_LONG_EVENT;
}
static gboolean
-print_day_details_cb (ECalComponent *comp, time_t istart, time_t iend,
- gpointer data)
+print_day_details_cb (ECalComponent *comp,
+ time_t istart,
+ time_t iend,
+ gpointer data)
{
ECalModelGenerateInstancesData *mdata = (ECalModelGenerateInstancesData *) data;
struct pdinfo *pdi = (struct pdinfo *) mdata->cb_data;
@@ -1118,10 +1171,17 @@ get_role_as_string (icalparameter_role role)
return res;
}
-static double
-print_attendees (GtkPrintContext *context, PangoFontDescription *font, cairo_t *cr,
- double left, double right, double top, double bottom,
- ECalComponent *comp, gint page_nr, gint *pages)
+static gdouble
+print_attendees (GtkPrintContext *context,
+ PangoFontDescription *font,
+ cairo_t *cr,
+ gdouble left,
+ gdouble right,
+ gdouble top,
+ gdouble bottom,
+ ECalComponent *comp,
+ gint page_nr,
+ gint *pages)
{
GSList *attendees = NULL, *l;
@@ -1222,13 +1282,13 @@ print_day_long_event (GtkPrintContext *context,
return;
/* If the event starts before the first day being printed, draw a
- triangle. (Note that I am assuming we are just showing 1 day at
- the moment.) */
+ * triangle. (Note that I am assuming we are just showing 1 day at
+ * the moment.) */
if (event->start < pdi->day_starts[0])
left_triangle_width = 4;
/* If the event ends after the last day being printed, draw a
- triangle. */
+ * triangle. */
if (event->end > pdi->day_starts[1])
right_triangle_width = 4;
@@ -1244,7 +1304,7 @@ print_day_long_event (GtkPrintContext *context,
right_triangle_width);
/* If the event starts after the first day being printed, we need to
- print the start time. */
+ * print the start time. */
if (event->start > pdi->day_starts[0]) {
date_tm.tm_year = 2001;
date_tm.tm_mon = 0;
@@ -1262,7 +1322,7 @@ print_day_long_event (GtkPrintContext *context,
}
/* If the event ends before the end of the last day being printed,
- we need to print the end time. */
+ * we need to print the end time. */
if (event->end < pdi->day_starts[1]) {
date_tm.tm_year = 2001;
date_tm.tm_mon = 0;
@@ -1290,9 +1350,15 @@ print_day_long_event (GtkPrintContext *context,
}
static void
-print_day_event (GtkPrintContext *context, PangoFontDescription *font,
- double left, double right, double top, double bottom,
- EDayViewEvent *event, struct pdinfo *pdi, ECalModel *model)
+print_day_event (GtkPrintContext *context,
+ PangoFontDescription *font,
+ gdouble left,
+ gdouble right,
+ gdouble top,
+ gdouble bottom,
+ EDayViewEvent *event,
+ struct pdinfo *pdi,
+ ECalModel *model)
{
gdouble x1, x2, y1, y2, col_width, row_height;
gint start_offset, end_offset, start_row, end_row;
@@ -1373,8 +1439,13 @@ print_day_event (GtkPrintContext *context, PangoFontDescription *font,
}
static void
-print_day_details (GtkPrintContext *context, GnomeCalendar *gcal, time_t whence,
- double left, double right, double top, double bottom)
+print_day_details (GtkPrintContext *context,
+ GnomeCalendar *gcal,
+ time_t whence,
+ gdouble left,
+ gdouble right,
+ gdouble top,
+ gdouble bottom)
{
ECalModel *model;
icaltimezone *zone;
@@ -1448,12 +1519,12 @@ print_day_details (GtkPrintContext *context, GnomeCalendar *gcal, time_t whence,
font = get_font_for_size (12, PANGO_WEIGHT_NORMAL);
/* We always leave space for DAY_VIEW_MIN_ROWS_IN_TOP_DISPLAY in the
- top display, but we may have more rows than that, in which case
- the main display area will be compressed. */
+ * top display, but we may have more rows than that, in which case
+ * the main display area will be compressed. */
/* Limit long day event to half the height of the panel */
rows_in_top_display = MIN (MAX (rows_in_top_display,
DAY_VIEW_MIN_ROWS_IN_TOP_DISPLAY),
- (bottom-top)*0.5/DAY_VIEW_ROW_HEIGHT);
+ (bottom - top) * 0.5 / DAY_VIEW_ROW_HEIGHT);
if (rows_in_top_display > pdi.long_events->len)
rows_in_top_display = pdi.long_events->len;
@@ -1475,7 +1546,7 @@ print_day_details (GtkPrintContext *context, GnomeCalendar *gcal, time_t whence,
const gchar **xpm = (const gchar **) jump_xpm;
/* this ugly thing is here only to get rid of compiler warning
- about unused 'jump_xpm_focused' */
+ * about unused 'jump_xpm_focused' */
if (pixbuf)
xpm = (const gchar **) jump_xpm_focused;
@@ -1485,7 +1556,7 @@ print_day_details (GtkPrintContext *context, GnomeCalendar *gcal, time_t whence,
/* Right align - 10 comes from print_day_long_event too */
x = right - gdk_pixbuf_get_width (pixbuf) * 0.5 - 10;
/* Placing '...' over the last all day event entry printed. '-1 -1' comes
- from print_long_day_event (top/bottom spacing in each cell) */
+ from print_long_day_event (top / bottom spacing in each cell) */
y = top + LONG_DAY_EVENTS_TOP_SPACING
+ DAY_VIEW_ROW_HEIGHT * (i - 1)
+ (DAY_VIEW_ROW_HEIGHT - 1 - 1) * 0.5;
@@ -1552,8 +1623,8 @@ print_day_details (GtkPrintContext *context, GnomeCalendar *gcal, time_t whence,
/* Returns TRUE if the event is a one-day event (i.e. not a long event). */
static gboolean
print_is_one_day_week_event (EWeekViewEvent *event,
- EWeekViewEventSpan *span,
- time_t *day_starts)
+ EWeekViewEventSpan *span,
+ time_t *day_starts)
{
if (event->start == day_starts[span->start_day]
&& event->end == day_starts[span->start_day + 1])
@@ -1568,23 +1639,31 @@ print_is_one_day_week_event (EWeekViewEvent *event,
}
static void
-print_week_long_event (GtkPrintContext *context, PangoFontDescription *font,
- struct psinfo *psi,
- double x1, double x2, double y1, double row_height,
- EWeekViewEvent *event, EWeekViewEventSpan *span,
- gchar *text, double red, double green, double blue)
+print_week_long_event (GtkPrintContext *context,
+ PangoFontDescription *font,
+ struct psinfo *psi,
+ gdouble x1,
+ gdouble x2,
+ gdouble y1,
+ gdouble row_height,
+ EWeekViewEvent *event,
+ EWeekViewEventSpan *span,
+ gchar *text,
+ gdouble red,
+ gdouble green,
+ gdouble blue)
{
gdouble left_triangle_width = -1.0, right_triangle_width = -1.0;
struct tm date_tm;
gchar buffer[32];
/* If the event starts before the first day of the span, draw a
- triangle to indicate it continues. */
+ * triangle to indicate it continues. */
if (event->start < psi->day_starts[span->start_day])
left_triangle_width = 4;
/* If the event ends after the last day of the span, draw a
- triangle. */
+ * triangle. */
if (event->end > psi->day_starts[span->start_day + span->num_days])
right_triangle_width = 4;
@@ -1593,7 +1672,7 @@ print_week_long_event (GtkPrintContext *context, PangoFontDescription *font,
left_triangle_width, right_triangle_width);
/* If the event starts after the first day being printed, we need to
- print the start time. */
+ * print the start time. */
if (event->start > psi->day_starts[span->start_day]) {
date_tm.tm_year = 2001;
date_tm.tm_mon = 0;
@@ -1613,7 +1692,7 @@ print_week_long_event (GtkPrintContext *context, PangoFontDescription *font,
}
/* If the event ends before the end of the last day being printed,
- we need to print the end time. */
+ * we need to print the end time. */
if (event->end < psi->day_starts[span->start_day + span->num_days]) {
date_tm.tm_year = 2001;
date_tm.tm_mon = 0;
@@ -1638,11 +1717,19 @@ print_week_long_event (GtkPrintContext *context, PangoFontDescription *font,
}
static void
-print_week_day_event (GtkPrintContext *context, PangoFontDescription *font,
- struct psinfo *psi,
- double x1, double x2, double y1, double row_height,
- EWeekViewEvent *event, EWeekViewEventSpan *span,
- gchar *text, double red, double green, double blue)
+print_week_day_event (GtkPrintContext *context,
+ PangoFontDescription *font,
+ struct psinfo *psi,
+ gdouble x1,
+ gdouble x2,
+ gdouble y1,
+ gdouble row_height,
+ EWeekViewEvent *event,
+ EWeekViewEventSpan *span,
+ gchar *text,
+ gdouble red,
+ gdouble green,
+ gdouble blue)
{
struct tm date_tm;
gchar buffer[32];
@@ -1681,12 +1768,16 @@ print_week_day_event (GtkPrintContext *context, PangoFontDescription *font,
}
static void
-print_week_event (GtkPrintContext *context, PangoFontDescription *font,
- struct psinfo *psi,
- double left, double top,
- double cell_width, double cell_height,
- ECalModel *model,
- EWeekViewEvent *event, GArray *spans)
+print_week_event (GtkPrintContext *context,
+ PangoFontDescription *font,
+ struct psinfo *psi,
+ gdouble left,
+ gdouble top,
+ gdouble cell_width,
+ gdouble cell_height,
+ ECalModel *model,
+ EWeekViewEvent *event,
+ GArray *spans)
{
EWeekViewEventSpan *span;
gint span_num;
@@ -1790,7 +1881,7 @@ print_week_event (GtkPrintContext *context, PangoFontDescription *font,
const gchar **xpm = (const gchar **) jump_xpm;
/* this ugly thing is here only to get rid of compiler warning
- about unused 'jump_xpm_focused' */
+ * about unused 'jump_xpm_focused' */
if (pixbuf)
xpm = (const gchar **) jump_xpm_focused;
@@ -1817,9 +1908,11 @@ print_week_event (GtkPrintContext *context, PangoFontDescription *font,
static void
print_week_view_background (GtkPrintContext *context,
PangoFontDescription *font,
- struct psinfo *psi,
- double left, double top,
- double cell_width, double cell_height)
+ struct psinfo *psi,
+ gdouble left,
+ gdouble top,
+ gdouble cell_width,
+ gdouble cell_height)
{
struct tm tm;
gint day, day_x, day_y, day_h;
@@ -1844,7 +1937,7 @@ print_week_view_background (GtkPrintContext *context,
convert_timet_to_struct_tm (psi->day_starts[day], psi->zone, &tm);
/* In the month view we draw a grey background for the end
- of the previous month and the start of the following. */
+ * of the previous month and the start of the following. */
fillcolor = -1.0;
if (psi->multi_week_view && (tm.tm_mon != psi->month))
fillcolor = 0.9;
@@ -1869,9 +1962,9 @@ print_week_view_background (GtkPrintContext *context,
cairo_stroke (cr);
/* strftime format %A = full weekday name, %d = day of
- month, %B = full month name. You can change the
- order but don't change the specifiers or add
- anything. */
+ * month, %B = full month name. You can change the
+ * order but don't change the specifiers or add
+ * anything. */
format_string = _("%A %d %B");
}
@@ -1886,9 +1979,9 @@ print_week_view_background (GtkPrintContext *context,
/* This adds one event to the view, adding it to the appropriate array. */
static gboolean
print_week_summary_cb (ECalComponent *comp,
- time_t start,
- time_t end,
- gpointer data)
+ time_t start,
+ time_t end,
+ gpointer data)
{
EWeekViewEvent event;
@@ -1929,10 +2022,17 @@ print_week_summary_cb (ECalComponent *comp,
}
static void
-print_week_summary (GtkPrintContext *context, GnomeCalendar *gcal,
- time_t whence, gboolean multi_week_view, gint weeks_shown,
- gint month, double font_size,
- double left, double right, double top, double bottom)
+print_week_summary (GtkPrintContext *context,
+ GnomeCalendar *gcal,
+ time_t whence,
+ gboolean multi_week_view,
+ gint weeks_shown,
+ gint month,
+ gdouble font_size,
+ gdouble left,
+ gdouble right,
+ gdouble top,
+ gdouble bottom)
{
icaltimezone *zone;
EWeekViewEvent *event;
@@ -2000,7 +2100,7 @@ print_week_summary (GtkPrintContext *context, GnomeCalendar *gcal,
}
/* Calculate the row height, using the normal font and with room for
- space or a rectangle around it. */
+ * space or a rectangle around it. */
psi.row_height = font_size * 1.2;
psi.header_row_height = font_size * 1.5;
@@ -2081,7 +2181,7 @@ print_month_summary (GtkPrintContext *context,
month = tt.month - 1;
/* Find the start of the month, and then the start of the week on
- or before that day. */
+ * or before that day. */
if (!date)
date = time_month_begin_with_zone (whence, zone);
date = time_week_begin_with_zone (date, weekday, zone);
@@ -2093,9 +2193,9 @@ print_month_summary (GtkPrintContext *context,
/* do day names ... */
/* We are only interested in outputting the weekday here, but we want
- to be able to step through the week without worrying about
- overflows making strftime choke, so we move near to the start of
- the month. */
+ * to be able to step through the week without worrying about
+ * overflows making strftime choke, so we move near to the start of
+ * the month. */
convert_timet_to_struct_tm (date, zone, &tm);
tm.tm_mday = (tm.tm_mday % 7) + 7;
@@ -2137,9 +2237,14 @@ print_month_summary (GtkPrintContext *context,
}
static void
-print_todo_details (GtkPrintContext *context, GnomeCalendar *gcal,
- time_t start, time_t end,
- double left, double right, double top, double bottom)
+print_todo_details (GtkPrintContext *context,
+ GnomeCalendar *gcal,
+ time_t start,
+ time_t end,
+ gdouble left,
+ gdouble right,
+ gdouble top,
+ gdouble bottom)
{
PangoFontDescription *font_summary;
gdouble y, yend, x, xend;
@@ -2151,7 +2256,7 @@ print_todo_details (GtkPrintContext *context, GnomeCalendar *gcal,
cairo_t *cr;
/* We get the tasks directly from the TaskPad ETable. This means we
- get them filtered & sorted for free. */
+ * get them filtered & sorted for free. */
task_table = gnome_calendar_get_task_table (gcal);
table = E_TABLE (task_table);
g_return_if_fail (table != NULL);
@@ -2220,7 +2325,7 @@ print_todo_details (GtkPrintContext *context, GnomeCalendar *gcal,
y = bound_text (context, font_summary, summary.value, -1,
x + 14, y + 4, xend, yend, FALSE, NULL, NULL);
- y += get_font_size (font_summary)-5;
+ y += get_font_size (font_summary) - 5;
cr = gtk_print_context_get_cairo_context (context);
cairo_move_to (cr, x, y);
cairo_line_to (cr, xend, y);
@@ -2234,7 +2339,9 @@ print_todo_details (GtkPrintContext *context, GnomeCalendar *gcal,
}
static void
-print_day_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date)
+print_day_view (GtkPrintContext *context,
+ GnomeCalendar *gcal,
+ time_t date)
{
ECalModel *model;
GtkPageSetup *setup;
@@ -2309,9 +2416,14 @@ print_day_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date)
}
static void
-print_work_week_background (GtkPrintContext *context, GnomeCalendar *gcal,
- time_t whence, struct pdinfo *pdi, double left,
- double right, double top, double bottom)
+print_work_week_background (GtkPrintContext *context,
+ GnomeCalendar *gcal,
+ time_t whence,
+ struct pdinfo *pdi,
+ gdouble left,
+ gdouble right,
+ gdouble top,
+ gdouble bottom)
{
ECalModel *model;
PangoFontDescription *font_hour, *font_minute;
@@ -2424,7 +2536,7 @@ print_work_week_background (GtkPrintContext *context, GnomeCalendar *gcal,
cairo_stroke (cr);
/* Draw the horizontal line for the 1/2-hours, across the
- entire width except for part of the time column. */
+ * entire width except for part of the time column. */
cairo_move_to (cr, left + width * 0.6, y - yinc / 2);
cairo_line_to (cr, right, y - yinc / 2);
cairo_set_line_width (cr, 1);
@@ -2433,7 +2545,7 @@ print_work_week_background (GtkPrintContext *context, GnomeCalendar *gcal,
}
/* Draw the vertical lines for the days */
- day_width = (right - left - 2*width) / pdi->days_shown;
+ day_width = (right - left - 2 *width) / pdi->days_shown;
for (i = 0; i < pdi->days_shown - 1; ++i) {
cr = gtk_print_context_get_cairo_context (context);
cairo_move_to (cr, left + width + day_width * (i + 1), top);
@@ -2456,9 +2568,14 @@ print_work_week_background (GtkPrintContext *context, GnomeCalendar *gcal,
}
static void
-print_work_week_day_details (GtkPrintContext *context, GnomeCalendar *gcal,
- time_t whence, double left, double right,
- double top, double bottom, struct pdinfo *_pdi)
+print_work_week_day_details (GtkPrintContext *context,
+ GnomeCalendar *gcal,
+ time_t whence,
+ gdouble left,
+ gdouble right,
+ gdouble top,
+ gdouble bottom,
+ struct pdinfo *_pdi)
{
ECalModel *model;
icaltimezone *zone;
@@ -2536,12 +2653,12 @@ print_work_week_day_details (GtkPrintContext *context, GnomeCalendar *gcal,
font = get_font_for_size (12, PANGO_WEIGHT_NORMAL);
/* We always leave space for DAY_VIEW_MIN_ROWS_IN_TOP_DISPLAY in the
- top display, but we may have more rows than that, in which case
- the main display area will be compressed. */
+ * top display, but we may have more rows than that, in which case
+ * the main display area will be compressed. */
/* Limit long day event to half the height of the panel */
rows_in_top_display = MIN (MAX (rows_in_top_display,
DAY_VIEW_MIN_ROWS_IN_TOP_DISPLAY),
- (bottom-top)*0.5/DAY_VIEW_ROW_HEIGHT);
+ (bottom - top) * 0.5 / DAY_VIEW_ROW_HEIGHT);
if (rows_in_top_display > pdi.long_events->len)
rows_in_top_display = pdi.long_events->len;
@@ -2563,7 +2680,7 @@ print_work_week_day_details (GtkPrintContext *context, GnomeCalendar *gcal,
const gchar **xpm = (const gchar **) jump_xpm;
/* this ugly thing is here only to get rid of compiler warning
- about unused 'jump_xpm_focused' */
+ * about unused 'jump_xpm_focused' */
if (pixbuf)
xpm = (const gchar **) jump_xpm_focused;
@@ -2573,7 +2690,7 @@ print_work_week_day_details (GtkPrintContext *context, GnomeCalendar *gcal,
/* Right align - 10 comes from print_day_long_event too */
x = right - gdk_pixbuf_get_width (pixbuf) * 0.5 - 10;
/* Placing '...' over the last all day event entry printed. '-1 -1' comes
- from print_long_day_event (top/bottom spacing in each cell) */
+ from print_long_day_event (top / bottom spacing in each cell) */
y = top + LONG_DAY_EVENTS_TOP_SPACING
+ DAY_VIEW_ROW_HEIGHT * (i - 1)
+ (DAY_VIEW_ROW_HEIGHT - 1 - 1) * 0.5;
@@ -2653,7 +2770,9 @@ print_work_week_view_cb (ECalComponent *comp,
}
static void
-print_work_week_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date)
+print_work_week_view (GtkPrintContext *context,
+ GnomeCalendar *gcal,
+ time_t date)
{
GtkPageSetup *setup;
icaltimezone *zone;
@@ -2728,7 +2847,7 @@ print_work_week_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date
24 + 3, 24 + 3 + 24);
/* Now print each days' events */
- day_width = (width - 2*DAY_VIEW_TIME_COLUMN_WIDTH) / days;
+ day_width = (width - 2 *DAY_VIEW_TIME_COLUMN_WIDTH) / days;
when = start;
for (i = 0; i < days; ++i) {
day_x = DAY_VIEW_TIME_COLUMN_WIDTH + day_width * i;
@@ -2749,7 +2868,9 @@ print_work_week_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date
}
static void
-print_week_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date)
+print_week_view (GtkPrintContext *context,
+ GnomeCalendar *gcal,
+ time_t date)
{
GtkPageSetup *setup;
ECalModel *model;
@@ -2776,7 +2897,7 @@ print_week_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date)
when = time_week_begin_with_zone (date, week_start_day, zone);
/* If the week starts on a Sunday, we have to show the Saturday first,
- since the weekend is compressed. */
+ * since the weekend is compressed. */
if (week_start_day == 0) {
if (tm.tm_wday == 6)
when = time_add_day_with_zone (when, 6, zone);
@@ -2830,7 +2951,9 @@ print_week_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date)
}
static void
-print_month_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date)
+print_month_view (GtkPrintContext *context,
+ GnomeCalendar *gcal,
+ time_t date)
{
ECalModel *model;
GtkPageSetup *setup;
@@ -2879,7 +3002,9 @@ print_month_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date)
}
static gboolean
-same_date (struct tm tm1, time_t t2, icaltimezone *zone)
+same_date (struct tm tm1,
+ time_t t2,
+ icaltimezone *zone)
{
struct tm tm2;
@@ -2922,13 +3047,14 @@ write_label_piece (time_t t,
strcat (buffer, etext);
}
-static icaltimezone*
-get_zone_from_tzid (ECalClient *client, const gchar *tzid)
+static icaltimezone *
+get_zone_from_tzid (ECalClient *client,
+ const gchar *tzid)
{
icaltimezone *zone;
/* Note that the timezones may not be on the server, so we try to get
- the builtin timezone with the TZID first. */
+ * the builtin timezone with the TZID first. */
zone = icaltimezone_get_builtin_timezone_from_tzid (tzid);
if (!zone && tzid) {
GError *error = NULL;
@@ -3404,8 +3530,8 @@ print_comp_draw_page (GtkPrintOperation *operation,
static void
print_comp_begin_print (GtkPrintOperation *operation,
- GtkPrintContext *context,
- PrintCompItem *pci)
+ GtkPrintContext *context,
+ PrintCompItem *pci)
{
gint pages;
@@ -3448,7 +3574,9 @@ print_comp (ECalComponent *comp,
}
static void
-print_title (GtkPrintContext *context, const gchar *text, gdouble page_width)
+print_title (GtkPrintContext *context,
+ const gchar *text,
+ gdouble page_width)
{
PangoFontDescription *desc;
PangoLayout *layout;
@@ -3509,8 +3637,10 @@ print_table_draw_page (GtkPrintOperation *operation,
}
void
-print_table (ETable *table, const gchar *dialog_title,
- const gchar *print_header, GtkPrintOperationAction action)
+print_table (ETable *table,
+ const gchar *dialog_title,
+ const gchar *print_header,
+ GtkPrintOperationAction action)
{
GtkPrintOperation *operation;
EPrintable *printable;
diff --git a/calendar/gui/tag-calendar.c b/calendar/gui/tag-calendar.c
index 82eae30c83..6a0fdcce1f 100644
--- a/calendar/gui/tag-calendar.c
+++ b/calendar/gui/tag-calendar.c
@@ -94,9 +94,9 @@ prepare_tag (ECalendar *ecal,
* called from e_cal_generate_instances() */
static gboolean
tag_calendar_cb (ECalComponent *comp,
- time_t istart,
- time_t iend,
- gpointer data)
+ time_t istart,
+ time_t iend,
+ gpointer data)
{
struct calendar_tag_closure *c = data;
struct icaltimetype start_tt, end_tt;
@@ -104,7 +104,7 @@ tag_calendar_cb (ECalComponent *comp,
guint8 style = 0;
/* If we are skipping TRANSPARENT events, return if the event is
- transparent. */
+ * transparent. */
e_cal_component_get_transparency (comp, &transparency);
if (transparency == E_CAL_COMPONENT_TRANSP_TRANSPARENT) {
if (c->skip_transparent_events)
@@ -153,7 +153,7 @@ get_recur_events_italic (void)
void
tag_calendar_by_client (ECalendar *ecal,
ECalClient *client,
- GCancellable *cancellable)
+ GCancellable *cancellable)
{
struct calendar_tag_closure *c;
@@ -182,9 +182,9 @@ tag_calendar_by_client (ECalendar *ecal,
}
/* Resolves TZIDs for the recurrence generator, for when the comp is not on
- the server. We need to try to use builtin timezones first, as they may not
- be added to the server yet. */
-static icaltimezone*
+ * the server. We need to try to use builtin timezones first, as they may not
+ * be added to the server yet. */
+static icaltimezone *
resolve_tzid_cb (const gchar *tzid,
gpointer data)
{
diff --git a/calendar/gui/weekday-picker.c b/calendar/gui/weekday-picker.c
index a9cd687169..d1a9a2835a 100644
--- a/calendar/gui/weekday-picker.c
+++ b/calendar/gui/weekday-picker.c
@@ -380,7 +380,8 @@ weekday_picker_class_init (WeekdayPickerClass *class)
}
static void
-day_clicked (WeekdayPicker *wp, gint index)
+day_clicked (WeekdayPicker *wp,
+ gint index)
{
WeekdayPickerPrivate *priv = wp->priv;
guint8 day_mask;
@@ -397,7 +398,8 @@ day_clicked (WeekdayPicker *wp, gint index)
}
static gint
-handle_key_press_event (WeekdayPicker *wp, GdkEvent *event)
+handle_key_press_event (WeekdayPicker *wp,
+ GdkEvent *event)
{
WeekdayPickerPrivate *priv = wp->priv;
guint keyval = event->key.keyval;
@@ -434,7 +436,9 @@ handle_key_press_event (WeekdayPicker *wp, GdkEvent *event)
/* Event handler for the day items */
static gint
-day_event_cb (GnomeCanvasItem *item, GdkEvent *event, gpointer data)
+day_event_cb (GnomeCanvasItem *item,
+ GdkEvent *event,
+ gpointer data)
{
WeekdayPicker *wp;
WeekdayPickerPrivate *priv;
@@ -530,7 +534,8 @@ weekday_picker_new (void)
* Sunday is bit 0, Monday is bit 1, etc.
**/
void
-weekday_picker_set_days (WeekdayPicker *wp, guint8 day_mask)
+weekday_picker_set_days (WeekdayPicker *wp,
+ guint8 day_mask)
{
WeekdayPickerPrivate *priv;
@@ -576,7 +581,8 @@ weekday_picker_get_days (WeekdayPicker *wp)
* weekday_picker_set_days().
**/
void
-weekday_picker_set_blocked_days (WeekdayPicker *wp, guint8 blocked_day_mask)
+weekday_picker_set_blocked_days (WeekdayPicker *wp,
+ guint8 blocked_day_mask)
{
WeekdayPickerPrivate *priv;
@@ -618,7 +624,8 @@ weekday_picker_get_blocked_days (WeekdayPicker *wp)
* Sets the day that defines the start of the week for a weekday picker.
**/
void
-weekday_picker_set_week_start_day (WeekdayPicker *wp, gint week_start_day)
+weekday_picker_set_week_start_day (WeekdayPicker *wp,
+ gint week_start_day)
{
WeekdayPickerPrivate *priv;