aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar
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 /modules/calendar
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 'modules/calendar')
-rw-r--r--modules/calendar/e-cal-attachment-handler.c8
-rw-r--r--modules/calendar/e-cal-shell-backend.c4
-rw-r--r--modules/calendar/e-cal-shell-settings.c3
-rw-r--r--modules/calendar/e-calendar-preferences.c12
-rw-r--r--modules/calendar/e-memo-shell-backend.c4
-rw-r--r--modules/calendar/e-memo-shell-migrate.c4
-rw-r--r--modules/calendar/e-task-shell-view-private.c18
7 files changed, 38 insertions, 15 deletions
diff --git a/modules/calendar/e-cal-attachment-handler.c b/modules/calendar/e-cal-attachment-handler.c
index 24a73f6d1a..604bc737da 100644
--- a/modules/calendar/e-cal-attachment-handler.c
+++ b/modules/calendar/e-cal-attachment-handler.c
@@ -32,6 +32,10 @@
#include <libedataserverui/e-source-selector.h>
#include <libedataserverui/e-client-utils.h>
+#define E_CAL_ATTACHMENT_HANDLER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_CAL_ATTACHMENT_HANDLER, ECalAttachmentHandlerPrivate))
+
typedef struct _ImportContext ImportContext;
struct _ECalAttachmentHandlerPrivate {
@@ -533,9 +537,7 @@ cal_attachment_handler_class_init (ECalAttachmentHandlerClass *class)
static void
cal_attachment_handler_init (ECalAttachmentHandler *handler)
{
- handler->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- handler, E_TYPE_CAL_ATTACHMENT_HANDLER,
- ECalAttachmentHandlerPrivate);
+ handler->priv = E_CAL_ATTACHMENT_HANDLER_GET_PRIVATE (handler);
}
GType
diff --git a/modules/calendar/e-cal-shell-backend.c b/modules/calendar/e-cal-shell-backend.c
index f9400707a2..d538e9bd74 100644
--- a/modules/calendar/e-cal-shell-backend.c
+++ b/modules/calendar/e-cal-shell-backend.c
@@ -379,7 +379,9 @@ action_event_new_cb (GtkAction *action,
view = gnome_calendar_get_calendar_view (gcal, view_type);
if (view) {
- g_object_set (G_OBJECT (shell_backend), "prefer-new-item", action_name, NULL);
+ g_object_set (
+ G_OBJECT (shell_backend),
+ "prefer-new-item", action_name, NULL);
e_calendar_view_new_appointment_full (
view,
diff --git a/modules/calendar/e-cal-shell-settings.c b/modules/calendar/e-cal-shell-settings.c
index 0c77063f46..392bb841cb 100644
--- a/modules/calendar/e-cal-shell-settings.c
+++ b/modules/calendar/e-cal-shell-settings.c
@@ -82,7 +82,8 @@ transform_icaltimezone_to_string (GBinding *binding,
shell_settings, "cal-use-system-timezone");
if (use_system_timezone) {
- location_str = e_shell_settings_get_string (shell_settings, "cal-timezone-string");
+ location_str = e_shell_settings_get_string (
+ shell_settings, "cal-timezone-string");
location = location_str;
} else {
timezone = g_value_get_pointer (source_value);
diff --git a/modules/calendar/e-calendar-preferences.c b/modules/calendar/e-calendar-preferences.c
index 55a91acd70..6df9b8bde3 100644
--- a/modules/calendar/e-calendar-preferences.c
+++ b/modules/calendar/e-calendar-preferences.c
@@ -233,7 +233,9 @@ day_second_zone_clicked (GtkWidget *widget,
if (!second_zone)
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), TRUE);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- g_signal_connect (item, "toggled", G_CALLBACK (on_set_day_second_zone), prefs);
+ g_signal_connect (
+ item, "toggled",
+ G_CALLBACK (on_set_day_second_zone), prefs);
recent_zones = calendar_config_get_day_second_zones ();
for (s = recent_zones; s != NULL; s = s->next) {
@@ -248,7 +250,9 @@ day_second_zone_clicked (GtkWidget *widget,
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (item), TRUE);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
g_object_set_data_full (G_OBJECT (item), "timezone", g_strdup (s->data), g_free);
- g_signal_connect (item, "toggled", G_CALLBACK (on_set_day_second_zone), prefs);
+ g_signal_connect (
+ item, "toggled",
+ G_CALLBACK (on_set_day_second_zone), prefs);
}
calendar_config_free_day_second_zones (recent_zones);
@@ -256,7 +260,9 @@ day_second_zone_clicked (GtkWidget *widget,
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
item = gtk_menu_item_new_with_label (_("Select..."));
- g_signal_connect (item, "activate", G_CALLBACK (on_select_day_second_zone), prefs);
+ g_signal_connect (
+ item, "activate",
+ G_CALLBACK (on_select_day_second_zone), prefs);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
gtk_widget_show_all (menu);
diff --git a/modules/calendar/e-memo-shell-backend.c b/modules/calendar/e-memo-shell-backend.c
index 93d2084885..2bdd3ef8ed 100644
--- a/modules/calendar/e-memo-shell-backend.c
+++ b/modules/calendar/e-memo-shell-backend.c
@@ -45,6 +45,10 @@
#include "e-memo-shell-migrate.h"
#include "e-memo-shell-view.h"
+#define E_MEMO_SHELL_BACKEND_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_MEMO_SHELL_BACKEND, EMemoShellBackendPrivate))
+
#define WEB_BASE_URI "webcal://"
#define PERSONAL_RELATIVE_URI "system"
diff --git a/modules/calendar/e-memo-shell-migrate.c b/modules/calendar/e-memo-shell-migrate.c
index 171428f408..64b5263008 100644
--- a/modules/calendar/e-memo-shell-migrate.c
+++ b/modules/calendar/e-memo-shell-migrate.c
@@ -67,9 +67,11 @@ create_memo_sources (EShellBackend *shell_backend,
if (groups) {
/* groups are already there, we need to search for things... */
GSList *g;
+ const gchar *data_dir;
gchar *base_dir, *base_uri;
- base_dir = g_build_filename (e_shell_backend_get_data_dir (shell_backend), "local", NULL);
+ data_dir = e_shell_backend_get_data_dir (shell_backend);
+ base_dir = g_build_filename (data_dir, "local", NULL);
base_uri = g_filename_to_uri (base_dir, NULL, NULL);
for (g = groups; g; g = g->next) {
diff --git a/modules/calendar/e-task-shell-view-private.c b/modules/calendar/e-task-shell-view-private.c
index 916494757d..560ce01940 100644
--- a/modules/calendar/e-task-shell-view-private.c
+++ b/modules/calendar/e-task-shell-view-private.c
@@ -47,9 +47,8 @@ task_shell_view_model_row_appended_cb (ETaskShellView *task_shell_view,
}
static gboolean
-task_shell_view_process_completed_tasks (gpointer user_data)
+task_shell_view_process_completed_tasks (ETaskShellView *task_shell_view)
{
- ETaskShellView *task_shell_view = user_data;
ETaskShellContent *task_shell_content;
ETaskShellSidebar *task_shell_sidebar;
ETaskTable *task_table;
@@ -77,11 +76,18 @@ task_shell_view_process_completed_tasks (gpointer user_data)
static void
task_shell_view_schedule_process_completed_tasks (ETaskShellView *task_shell_view)
{
- if (task_shell_view->priv->update_completed_timeout)
- g_source_remove (task_shell_view->priv->update_completed_timeout);
+ guint source_id;
- task_shell_view->priv->update_completed_timeout =
- g_timeout_add_seconds (1, task_shell_view_process_completed_tasks, task_shell_view);
+ source_id = task_shell_view->priv->update_completed_timeout;
+
+ if (source_id > 0)
+ g_source_remove (source_id);
+
+ source_id = g_timeout_add_seconds (
+ 1, (GSourceFunc) task_shell_view_process_completed_tasks,
+ task_shell_view);
+
+ task_shell_view->priv->update_completed_timeout = source_id;
}
static void