aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/alarm-notify
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-12-01 10:53:20 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-02-20 23:04:25 +0800
commit23f5773903d64a554d977ae7d0ebbaca73528f1f (patch)
tree104e1a59da8bf96b004bce204b79f47bbe0a6d13 /calendar/alarm-notify
parent49bc4c2d765ee1780c23fdc9f42152850dabb220 (diff)
downloadgsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.gz
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.bz2
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.lz
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.xz
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.tar.zst
gsoc2013-evolution-23f5773903d64a554d977ae7d0ebbaca73528f1f.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'calendar/alarm-notify')
-rw-r--r--calendar/alarm-notify/alarm-notify-dialog.c16
-rw-r--r--calendar/alarm-notify/alarm-notify.c34
-rw-r--r--calendar/alarm-notify/alarm-queue.c16
-rw-r--r--calendar/alarm-notify/config-data.c11
4 files changed, 55 insertions, 22 deletions
diff --git a/calendar/alarm-notify/alarm-notify-dialog.c b/calendar/alarm-notify/alarm-notify-dialog.c
index c9a264d880..eec926cf94 100644
--- a/calendar/alarm-notify/alarm-notify-dialog.c
+++ b/calendar/alarm-notify/alarm-notify-dialog.c
@@ -355,10 +355,18 @@ notified_alarms_dialog_new (void)
gtk_image_set_from_icon_name (
GTK_IMAGE (image), "stock_alarm", GTK_ICON_SIZE_DIALOG);
- g_signal_connect (an->edit_btn, "clicked", G_CALLBACK (edit_pressed_cb), an);
- g_signal_connect (an->print_btn, "clicked", G_CALLBACK (print_pressed_cb), an);
- g_signal_connect (an->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 (
+ an->edit_btn, "clicked",
+ G_CALLBACK (edit_pressed_cb), an);
+ g_signal_connect (
+ an->print_btn, "clicked",
+ G_CALLBACK (print_pressed_cb), an);
+ g_signal_connect (
+ an->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 (
an->dialog, "response",
G_CALLBACK (dialog_response_cb), an);
diff --git a/calendar/alarm-notify/alarm-notify.c b/calendar/alarm-notify/alarm-notify.c
index eeca88e1b6..2c14196a68 100644
--- a/calendar/alarm-notify/alarm-notify.c
+++ b/calendar/alarm-notify/alarm-notify.c
@@ -153,15 +153,20 @@ alarm_notify_list_changed_cb (ESourceList *source_list,
for (q = sources; q != NULL; q = q->next) {
ESource *source = E_SOURCE (q->data);
gchar *uri;
- const gchar *alarm = e_source_get_property (source, "alarm");
+ const gchar *alarm;
+
+ alarm = e_source_get_property (source, "alarm");
if (alarm && (!g_ascii_strcasecmp (alarm, "false") ||
!g_ascii_strcasecmp (alarm, "never")))
continue;
uri = e_source_get_uri (source);
- if (!g_hash_table_lookup (an->priv->uri_client_hash[source_type], uri) &&
- !g_slist_find_custom (an->priv->offline_sources, uri, find_slist_source_uri_cb)) {
+ if (!g_hash_table_lookup (
+ an->priv->uri_client_hash[source_type], uri) &&
+ !g_slist_find_custom (
+ an->priv->offline_sources, uri,
+ find_slist_source_uri_cb)) {
debug (("Adding Calendar %s", uri));
alarm_notify_add_calendar (an, source_type, source);
}
@@ -209,9 +214,13 @@ alarm_notify_load_calendars (AlarmNotify *an,
for (q = sources; q != NULL; q = q->next) {
ESource *source = E_SOURCE (q->data);
gchar *uri;
- const gchar *alarm = e_source_get_property (source, "alarm");
+ const gchar *alarm;
+
+ alarm = e_source_get_property (source, "alarm");
- if (alarm && (!g_ascii_strcasecmp (alarm, "false") || !g_ascii_strcasecmp (alarm, "never")))
+ if (alarm && (
+ !g_ascii_strcasecmp (alarm, "false") ||
+ !g_ascii_strcasecmp (alarm, "never")))
continue;
uri = e_source_get_uri (source);
@@ -421,8 +430,12 @@ client_opened_cb (GObject *source_object,
if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_REPOSITORY_OFFLINE)) {
if (an->priv->offline_timeout_id)
g_source_remove (an->priv->offline_timeout_id);
- an->priv->offline_sources = g_slist_append (an->priv->offline_sources, g_object_ref (source));
- an->priv->offline_timeout_id = g_timeout_add_seconds (5 * 60, try_open_offline_timeout_cb, an);
+ an->priv->offline_sources = g_slist_append (
+ an->priv->offline_sources,
+ g_object_ref (source));
+ an->priv->offline_timeout_id =
+ g_timeout_add_seconds (
+ 5 * 60, try_open_offline_timeout_cb, an);
}
g_clear_error (&error);
@@ -520,7 +533,9 @@ alarm_notify_add_calendar (AlarmNotify *an,
client_source_type = E_CLIENT_SOURCE_TYPE_LAST;
}
- g_object_set_data (G_OBJECT (source), "source-type", GUINT_TO_POINTER (source_type));
+ g_object_set_data (
+ G_OBJECT (source), "source-type",
+ GUINT_TO_POINTER (source_type));
e_client_utils_open_new (
source, client_source_type, TRUE, NULL,
@@ -551,7 +566,8 @@ alarm_notify_remove_calendar (AlarmNotify *an,
g_hash_table_remove (priv->uri_client_hash[source_type], str_uri);
}
- in_offline = g_slist_find_custom (priv->offline_sources, str_uri, find_slist_source_uri_cb);
+ in_offline = g_slist_find_custom (
+ priv->offline_sources, str_uri, find_slist_source_uri_cb);
if (in_offline) {
ESource *source = in_offline->data;
diff --git a/calendar/alarm-notify/alarm-queue.c b/calendar/alarm-notify/alarm-queue.c
index f30ce00af7..8cd052952a 100644
--- a/calendar/alarm-notify/alarm-queue.c
+++ b/calendar/alarm-notify/alarm-queue.c
@@ -1140,10 +1140,12 @@ on_dialog_objs_removed_async (struct _query_msg *msg)
if (!id)
continue;
- if (g_strcmp0 (id->uid, our_id->uid) == 0&& g_strcmp0 (id->rid, our_id->rid) == 0) {
+ if (g_strcmp0 (id->uid, our_id->uid) == 0 &&
+ g_strcmp0 (id->rid, our_id->rid) == 0) {
tray_data->cqa = NULL;
tray_data->alarm_id = NULL;
- tray_icons_list = g_list_remove (tray_icons_list, tray_data);
+ tray_icons_list = g_list_remove (
+ tray_icons_list, tray_data);
tray_data = NULL;
}
@@ -2073,16 +2075,18 @@ free_client_alarms_cb (gpointer key,
if (ca->cal_client) {
debug (("Disconnecting Client"));
- g_signal_handlers_disconnect_matched (ca->cal_client, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, ca);
+ g_signal_handlers_disconnect_matched (
+ ca->cal_client, G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL, ca);
g_object_unref (ca->cal_client);
}
if (ca->view) {
debug (("Disconnecting Query"));
- g_signal_handlers_disconnect_matched (ca->view, G_SIGNAL_MATCH_DATA,
- 0, 0, NULL, NULL, ca);
+ g_signal_handlers_disconnect_matched (
+ ca->view, G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL, ca);
g_object_unref (ca->view);
}
diff --git a/calendar/alarm-notify/config-data.c b/calendar/alarm-notify/config-data.c
index c8348f89fc..3fcbe598a5 100644
--- a/calendar/alarm-notify/config-data.c
+++ b/calendar/alarm-notify/config-data.c
@@ -267,9 +267,11 @@ config_data_set_last_notification_time (ECalClient *cal,
as_text = g_time_val_to_iso8601 (&tmval);
if (as_text) {
- e_source_set_property (source, "last-notified", as_text);
+ e_source_set_property (
+ source, "last-notified", as_text);
g_free (as_text);
- /* pass through, thus the global last notification time is also changed */
+ /* pass through, thus the global last
+ * notification time is also changed */
}
}
}
@@ -342,7 +344,10 @@ config_data_save_blessed_program (const gchar *program)
g_ptr_array_add (array, (gpointer) program);
g_ptr_array_add (array, NULL);
- g_settings_set_strv (calendar_settings, "notify-programs", (const gchar *const *) array->pdata);
+
+ g_settings_set_strv (
+ calendar_settings, "notify-programs",
+ (const gchar *const *) array->pdata);
g_strfreev (list);
g_ptr_array_free (array, TRUE);