aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-07-12 20:02:18 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-08-20 02:17:55 +0800
commitc85109fc322137596bf34cffc5445d568223c60d (patch)
tree711e6d5b2eb3d6c7780d1d01e20d980c67a77f9e /modules/calendar
parent7d1751cc26a75166019917ec8c3b35e1083d27d6 (diff)
downloadgsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.tar.gz
gsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.tar.zst
gsoc2013-evolution-c85109fc322137596bf34cffc5445d568223c60d.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'modules/calendar')
-rw-r--r--modules/calendar/e-cal-shell-view-actions.c4
-rw-r--r--modules/calendar/e-cal-shell-view-private.c110
-rw-r--r--modules/calendar/e-cal-shell-view.c3
-rw-r--r--modules/calendar/e-calendar-preferences.c5
-rw-r--r--modules/calendar/e-memo-shell-view-private.c5
-rw-r--r--modules/calendar/e-task-shell-view-private.c5
6 files changed, 85 insertions, 47 deletions
diff --git a/modules/calendar/e-cal-shell-view-actions.c b/modules/calendar/e-cal-shell-view-actions.c
index f5a04d7d2f..f72e765b3b 100644
--- a/modules/calendar/e-cal-shell-view-actions.c
+++ b/modules/calendar/e-cal-shell-view-actions.c
@@ -321,8 +321,8 @@ action_calendar_purge_cb (GtkAction *action,
GTK_MESSAGE_WARNING,
GTK_BUTTONS_OK_CANCEL,
_("This operation will permanently erase all events older "
- "than the selected amount of time. If you continue, you "
- "will not be able to recover these events."));
+ "than the selected amount of time. If you continue, you "
+ "will not be able to recover these events."));
gtk_dialog_set_default_response (
GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c
index 721a8c9ba0..2b5aa7e4f5 100644
--- a/modules/calendar/e-cal-shell-view-private.c
+++ b/modules/calendar/e-cal-shell-view-private.c
@@ -360,7 +360,7 @@ cal_shell_view_taskpad_popup_event_cb (EShellView *shell_view,
static void
cal_shell_view_user_created_cb (ECalShellView *cal_shell_view,
- ECalClient *where_was_created,
+ ECalClient *where_was_created,
ECalendarView *calendar_view)
{
ECalShellSidebar *cal_shell_sidebar;
@@ -389,8 +389,9 @@ cal_shell_view_load_view_collection (EShellViewClass *shell_view_class)
spec = e_table_specification_new ();
filename = g_build_filename (base_dir, ETSPEC_FILENAME, NULL);
if (!e_table_specification_load_from_file (spec, filename))
- g_critical ("Unable to load ETable specification file "
- "for calendars");
+ g_critical (
+ "Unable to load ETable specification file "
+ "for calendars");
g_free (filename);
factory = calendar_view_factory_new (GNOME_CAL_DAY_VIEW);
@@ -506,9 +507,8 @@ init_timezone_monitors (ECalShellView *view)
GFile *file;
file = g_file_new_for_path (files_to_check[i]);
- priv->monitors[i] = g_file_monitor_file (file,
- G_FILE_MONITOR_NONE,
- NULL, NULL);
+ priv->monitors[i] = g_file_monitor_file (
+ file, G_FILE_MONITOR_NONE, NULL, NULL);
g_object_unref (file);
if (priv->monitors[i])
@@ -1203,8 +1203,7 @@ cal_time_t_ptr_compare (gconstpointer a,
static void cal_iterate_searching (ECalShellView *cal_shell_view);
-struct GenerateInstancesData
-{
+struct GenerateInstancesData {
ECalClient *client;
ECalShellView *cal_shell_view;
GCancellable *cancellable;
@@ -1222,7 +1221,9 @@ cal_searching_instances_done_cb (gpointer user_data)
gid->cal_shell_view->priv->search_pending_count--;
if (!gid->cal_shell_view->priv->search_pending_count) {
gid->cal_shell_view->priv->search_hit_cache =
- g_slist_sort (gid->cal_shell_view->priv->search_hit_cache, cal_time_t_ptr_compare);
+ g_slist_sort (
+ gid->cal_shell_view->priv->search_hit_cache,
+ cal_time_t_ptr_compare);
cal_iterate_searching (gid->cal_shell_view);
}
}
@@ -1303,7 +1304,9 @@ cal_search_get_object_list_cb (GObject *source,
cal_shell_view->priv->search_pending_count--;
if (!cal_shell_view->priv->search_pending_count) {
cal_shell_view->priv->search_hit_cache =
- g_slist_sort (cal_shell_view->priv->search_hit_cache, cal_time_t_ptr_compare);
+ g_slist_sort (
+ cal_shell_view->priv->search_hit_cache,
+ cal_time_t_ptr_compare);
cal_iterate_searching (cal_shell_view);
}
} else {
@@ -1311,8 +1314,11 @@ cal_search_get_object_list_cb (GObject *source,
GCancellable *cancellable;
time_t start, end;
- cancellable = e_activity_get_cancellable (cal_shell_view->priv->searching_activity);
- start = time_add_day (cal_shell_view->priv->search_time, (-1) * cal_shell_view->priv->search_direction);
+ cancellable = e_activity_get_cancellable (
+ cal_shell_view->priv->searching_activity);
+ start = time_add_day (
+ cal_shell_view->priv->search_time,
+ (-1) * cal_shell_view->priv->search_direction);
end = cal_shell_view->priv->search_time;
if (start > end) {
time_t tmp = start;
@@ -1322,14 +1328,17 @@ cal_search_get_object_list_cb (GObject *source,
for (iter = icalcomps; iter; iter = iter->next) {
icalcomponent *icalcomp = iter->data;
- struct GenerateInstancesData *gid = g_new0 (struct GenerateInstancesData, 1);
+ struct GenerateInstancesData *gid;
+ gid = g_new0 (struct GenerateInstancesData, 1);
gid->client = client;
gid->cal_shell_view = cal_shell_view;
gid->cancellable = g_object_ref (cancellable);
- e_cal_client_generate_instances_for_object (client, icalcomp, start, end, cancellable,
- cal_searching_got_instance_cb, gid, cal_searching_instances_done_cb);
+ e_cal_client_generate_instances_for_object (
+ client, icalcomp, start, end, cancellable,
+ cal_searching_got_instance_cb, gid,
+ cal_searching_instances_done_cb);
}
e_cal_client_free_icalcomp_slist (icalcomps);
@@ -1394,7 +1403,9 @@ cal_searching_update_alert (ECalShellView *cal_shell_view,
priv = cal_shell_view->priv;
if (priv->search_alert) {
- e_alert_response (priv->search_alert, e_alert_get_default_response (priv->search_alert));
+ e_alert_response (
+ priv->search_alert,
+ e_alert_get_default_response (priv->search_alert));
priv->search_alert = NULL;
}
@@ -1408,8 +1419,10 @@ cal_searching_update_alert (ECalShellView *cal_shell_view,
g_object_add_weak_pointer (G_OBJECT (alert), &priv->search_alert);
e_alert_start_timer (priv->search_alert, 5);
- shell_content = e_shell_view_get_shell_content (E_SHELL_VIEW (cal_shell_view));
- e_alert_sink_submit_alert (E_ALERT_SINK (shell_content), priv->search_alert);
+ shell_content = e_shell_view_get_shell_content (
+ E_SHELL_VIEW (cal_shell_view));
+ e_alert_sink_submit_alert (
+ E_ALERT_SINK (shell_content), priv->search_alert);
g_object_unref (priv->search_alert);
}
@@ -1436,7 +1449,9 @@ cal_iterate_searching (ECalShellView *cal_shell_view)
if (cal_searching_check_candidates (cal_shell_view)) {
if (priv->searching_activity) {
- e_activity_set_state (priv->searching_activity, E_ACTIVITY_COMPLETED);
+ e_activity_set_state (
+ priv->searching_activity,
+ E_ACTIVITY_COMPLETED);
g_object_unref (priv->searching_activity);
priv->searching_activity = NULL;
}
@@ -1445,18 +1460,25 @@ cal_iterate_searching (ECalShellView *cal_shell_view)
}
if (!priv->searching_activity) {
- EShellBackend *shell_backend = e_shell_view_get_shell_backend (E_SHELL_VIEW (cal_shell_view));
+ EShellBackend *shell_backend;
+
+ shell_backend = e_shell_view_get_shell_backend (
+ E_SHELL_VIEW (cal_shell_view));
cancellable = g_cancellable_new ();
priv->searching_activity = e_activity_new ();
- e_activity_set_cancellable (priv->searching_activity, cancellable);
- e_activity_set_state (priv->searching_activity, E_ACTIVITY_RUNNING);
- e_activity_set_text (priv->searching_activity,
+ e_activity_set_cancellable (
+ priv->searching_activity, cancellable);
+ e_activity_set_state (
+ priv->searching_activity, E_ACTIVITY_RUNNING);
+ e_activity_set_text (
+ priv->searching_activity,
priv->search_direction > 0 ?
_("Searching next matching event") :
_("Searching previous matching event"));
- e_shell_backend_add_activity (shell_backend, priv->searching_activity);
+ e_shell_backend_add_activity (
+ shell_backend, priv->searching_activity);
}
new_time = time_add_day (priv->search_time, priv->search_direction);
@@ -1465,19 +1487,22 @@ cal_iterate_searching (ECalShellView *cal_shell_view)
gint range_years;
/* would get out of bounds, stop searching */
- e_activity_set_state (priv->searching_activity, E_ACTIVITY_COMPLETED);
+ e_activity_set_state (
+ priv->searching_activity, E_ACTIVITY_COMPLETED);
g_object_unref (priv->searching_activity);
priv->searching_activity = NULL;
range_years = cal_searching_get_search_range_years (cal_shell_view);
alert_msg = g_strdup_printf (
priv->search_direction > 0 ?
- ngettext ("Cannot find matching event in the next %d year",
- "Cannot find matching event in the next %d years",
- range_years) :
- ngettext ("Cannot find matching event in the previous %d year",
- "Cannot find matching event in the previous %d years",
- range_years),
+ ngettext (
+ "Cannot find matching event in the next %d year",
+ "Cannot find matching event in the next %d years",
+ range_years) :
+ ngettext (
+ "Cannot find matching event in the previous %d year",
+ "Cannot find matching event in the previous %d years",
+ range_years),
range_years);
cal_searching_update_alert (cal_shell_view, alert_msg);
g_free (alert_msg);
@@ -1488,15 +1513,19 @@ cal_iterate_searching (ECalShellView *cal_shell_view)
}
model = gnome_calendar_get_model (
- e_cal_shell_content_get_calendar (cal_shell_view->priv->cal_shell_content));
+ e_cal_shell_content_get_calendar (
+ cal_shell_view->priv->cal_shell_content));
clients = e_cal_model_get_client_list (model);
if (!clients) {
- e_activity_set_state (priv->searching_activity, E_ACTIVITY_COMPLETED);
+ e_activity_set_state (
+ priv->searching_activity, E_ACTIVITY_COMPLETED);
g_object_unref (priv->searching_activity);
priv->searching_activity = NULL;
- cal_searching_update_alert (cal_shell_view, _("Cannot search with no active calendar"));
+ cal_searching_update_alert (
+ cal_shell_view,
+ _("Cannot search with no active calendar"));
e_shell_view_update_actions (E_SHELL_VIEW (cal_shell_view));
@@ -1536,7 +1565,9 @@ cal_iterate_searching (ECalShellView *cal_shell_view)
for (iter = clients; iter; iter = iter->next) {
ECalClient *client = iter->data;
- e_cal_client_get_object_list (client, sexp, cancellable, cal_search_get_object_list_cb, cal_shell_view);
+ e_cal_client_get_object_list (
+ client, sexp, cancellable,
+ cal_search_get_object_list_cb, cal_shell_view);
}
g_list_free_full (clients, g_object_unref);
@@ -1573,7 +1604,8 @@ e_cal_shell_view_search_events (ECalShellView *cal_shell_view,
time_t cached_start, cached_end, tmp;
cached_start = priv->search_time;
- cached_end = time_add_day (cached_start, (-1) * priv->search_direction);
+ cached_end = time_add_day (
+ cached_start, (-1) * priv->search_direction);
if (priv->search_direction > 0) {
tmp = cached_start;
@@ -1621,8 +1653,10 @@ e_cal_shell_view_search_stop (ECalShellView *cal_shell_view)
cal_searching_update_alert (cal_shell_view, NULL);
if (priv->searching_activity) {
- g_cancellable_cancel (e_activity_get_cancellable (priv->searching_activity));
- e_activity_set_state (priv->searching_activity, E_ACTIVITY_CANCELLED);
+ g_cancellable_cancel (
+ e_activity_get_cancellable (priv->searching_activity));
+ e_activity_set_state (
+ priv->searching_activity, E_ACTIVITY_CANCELLED);
g_object_unref (priv->searching_activity);
priv->searching_activity = NULL;
}
diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c
index ef8b6c5e60..afa30c3da8 100644
--- a/modules/calendar/e-cal-shell-view.c
+++ b/modules/calendar/e-cal-shell-view.c
@@ -75,7 +75,8 @@ cal_shell_view_add_action_button (GtkBox *box,
button, "tooltip-text",
G_BINDING_SYNC_CREATE);
- g_signal_connect_swapped (button, "clicked",
+ g_signal_connect_swapped (
+ button, "clicked",
G_CALLBACK (gtk_action_activate), action);
}
diff --git a/modules/calendar/e-calendar-preferences.c b/modules/calendar/e-calendar-preferences.c
index a1655fa324..b11a943957 100644
--- a/modules/calendar/e-calendar-preferences.c
+++ b/modules/calendar/e-calendar-preferences.c
@@ -273,8 +273,9 @@ day_second_zone_clicked (GtkWidget *widget,
gtk_widget_show_all (menu);
- gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
- 0, gtk_get_current_event_time ());
+ gtk_menu_popup (
+ GTK_MENU (menu), NULL, NULL, NULL, NULL,
+ 0, gtk_get_current_event_time ());
}
static void
diff --git a/modules/calendar/e-memo-shell-view-private.c b/modules/calendar/e-memo-shell-view-private.c
index f87c91ff79..5e7c7552cc 100644
--- a/modules/calendar/e-memo-shell-view-private.c
+++ b/modules/calendar/e-memo-shell-view-private.c
@@ -115,8 +115,9 @@ memo_shell_view_load_view_collection (EShellViewClass *shell_view_class)
spec = e_table_specification_new ();
filename = g_build_filename (base_dir, ETSPEC_FILENAME, NULL);
if (!e_table_specification_load_from_file (spec, filename))
- g_critical ("Unable to load ETable specification file "
- "for memos");
+ g_critical (
+ "Unable to load ETable specification file "
+ "for memos");
g_free (filename);
factory = gal_view_factory_etable_new (spec);
diff --git a/modules/calendar/e-task-shell-view-private.c b/modules/calendar/e-task-shell-view-private.c
index f9a36c69f5..b77317a1dd 100644
--- a/modules/calendar/e-task-shell-view-private.c
+++ b/modules/calendar/e-task-shell-view-private.c
@@ -183,8 +183,9 @@ task_shell_view_load_view_collection (EShellViewClass *shell_view_class)
spec = e_table_specification_new ();
filename = g_build_filename (base_dir, ETSPEC_FILENAME, NULL);
if (!e_table_specification_load_from_file (spec, filename))
- g_critical ("Unable to load ETable specification file "
- "for tasks");
+ g_critical (
+ "Unable to load ETable specification file "
+ "for tasks");
g_free (filename);
factory = gal_view_factory_etable_new (spec);