aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/alarm-notify
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2007-11-15 06:04:21 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-11-15 06:04:21 +0800
commit9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91 (patch)
tree2e1e96f33404781354c422a7e9beaf458ebeb655 /calendar/gui/alarm-notify
parent7e8f8bb9e5167b0219b48ab3e8062080d3740b0a (diff)
downloadgsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar.gz
gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar.zst
gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.zip
** Remove trailing whitespace from source code.
2007-11-14 Matthew Barnes <mbarnes@redhat.com> ** Remove trailing whitespace from source code. svn path=/trunk/; revision=34537
Diffstat (limited to 'calendar/gui/alarm-notify')
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.c90
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.h4
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.c76
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.h2
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c248
-rw-r--r--calendar/gui/alarm-notify/alarm.c10
-rw-r--r--calendar/gui/alarm-notify/config-data.c30
-rw-r--r--calendar/gui/alarm-notify/notify-main.c4
8 files changed, 232 insertions, 232 deletions
diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.c b/calendar/gui/alarm-notify/alarm-notify-dialog.c
index eab6b95606..7022c389be 100644
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.c
+++ b/calendar/gui/alarm-notify/alarm-notify-dialog.c
@@ -34,7 +34,7 @@
#include <gtk/gtkwindow.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
-#if 0
+#if 0
# include <libgnomeui/gnome-winhints.h>
#endif
#include <glade/glade.h>
@@ -46,7 +46,7 @@
#include <e-util/e-icon-factory.h>
-
+
enum {
ALARM_DISPLAY_COLUMN,
ALARM_SUMMARY_COLUMN,
@@ -55,7 +55,7 @@ enum {
ALARM_START_COLUMN,
ALARM_END_COLUMN,
-
+
ALARM_FUNCINFO_COLUMN,
N_ALARM_COLUMNS
@@ -74,16 +74,16 @@ typedef struct {
GtkWidget *dialog;
GtkWidget *snooze_time_min;
GtkWidget *snooze_time_hrs;
- GtkWidget *snooze_btn;
+ GtkWidget *snooze_btn;
GtkWidget *minutes_label;
GtkWidget *hrs_label;
GtkWidget *description;
GtkWidget *location;
GtkWidget *treeview;
GtkWidget *scrolledwindow;
-
+
AlarmFuncInfo *cur_funcinfo;
-
+
} AlarmNotify;
@@ -91,9 +91,9 @@ static void
tree_selection_changed_cb (GtkTreeSelection *selection, gpointer data);
static void
-fill_in_labels (AlarmNotify *an, const gchar *summary, const gchar *description,
+fill_in_labels (AlarmNotify *an, const gchar *summary, const gchar *description,
const gchar *location, time_t occur_start, time_t occur_end);
-static void
+static void
edit_pressed_cb (GtkButton *button, gpointer user_data);
static void
@@ -137,7 +137,7 @@ dialog_response_cb (GtkDialog *dialog, guint response_id, gpointer user_data)
GtkTreeModel *model = NULL;
AlarmFuncInfo *funcinfo = NULL;
GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (an->treeview));
-
+
if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
gtk_tree_model_get (model, &iter, ALARM_FUNCINFO_COLUMN, &funcinfo, -1);
}
@@ -158,7 +158,7 @@ dialog_response_cb (GtkDialog *dialog, guint response_id, gpointer user_data)
return;
}
-static void
+static void
edit_pressed_cb (GtkButton *button, gpointer user_data)
{
AlarmNotify *an = user_data;
@@ -168,14 +168,14 @@ edit_pressed_cb (GtkButton *button, gpointer user_data)
GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (an->treeview));
if (gtk_tree_selection_get_selected (selection, &model, &iter))
- gtk_tree_model_get (model, &iter, ALARM_FUNCINFO_COLUMN, &funcinfo, -1);
+ gtk_tree_model_get (model, &iter, ALARM_FUNCINFO_COLUMN, &funcinfo, -1);
g_return_if_fail (funcinfo);
-
+
(* funcinfo->func) (ALARM_NOTIFY_EDIT, -1, funcinfo->func_data);
}
-static void
+static void
snooze_pressed_cb (GtkButton *button, gpointer user_data)
{
int snooze_timeout;
@@ -188,7 +188,7 @@ snooze_pressed_cb (GtkButton *button, gpointer user_data)
gtk_widget_grab_focus ((GtkWidget *) button);
if (gtk_tree_selection_get_selected (selection, &model, &iter))
- gtk_tree_model_get (model, &iter, ALARM_FUNCINFO_COLUMN, &funcinfo, -1);
+ gtk_tree_model_get (model, &iter, ALARM_FUNCINFO_COLUMN, &funcinfo, -1);
g_return_if_fail (funcinfo);
@@ -226,25 +226,25 @@ notified_alarms_dialog_new (void)
GtkTreeViewColumn *column = NULL;
GtkTreeSelection *selection = NULL;
GtkTreeModel *model = GTK_TREE_MODEL (gtk_list_store_new (
- N_ALARM_COLUMNS,
-
+ N_ALARM_COLUMNS,
+
G_TYPE_STRING, /* Display */
G_TYPE_STRING, /* Summary */
G_TYPE_STRING, /* Description */
G_TYPE_STRING, /* Location */
-
+
G_TYPE_POINTER, /* Start */
G_TYPE_POINTER, /* End */
-
+
G_TYPE_POINTER /* FuncInfo*/));
-
+
an->xml = glade_xml_new (EVOLUTION_GLADEDIR "/alarm-notify.glade", NULL, NULL);
if (!an->xml) {
g_message ("alarm_notify_dialog(): Could not load the Glade XML file!");
g_free (an);
return NULL;
}
-
+
an->dialog = glade_xml_get_widget (an->xml, "alarm-notify");
an->snooze_time_min = glade_xml_get_widget (an->xml, "snooze-time-min");
an->minutes_label = glade_xml_get_widget (an->xml, "minutes-label");
@@ -258,7 +258,7 @@ notified_alarms_dialog_new (void)
an->snooze_btn = snooze_btn;
edit_btn = glade_xml_get_widget (an->xml, "edit-button");
- if (!(an->dialog && an->scrolledwindow && an->treeview && an->snooze_time_min && an->snooze_time_hrs
+ if (!(an->dialog && an->scrolledwindow && an->treeview && an->snooze_time_min && an->snooze_time_hrs
&& an->description && an->location && edit_btn && snooze_btn)) {
g_message ("alarm_notify_dialog(): Could not find all widgets in Glade file!");
g_object_unref (an->xml);
@@ -275,14 +275,14 @@ notified_alarms_dialog_new (void)
gtk_tree_view_column_set_attributes (column, renderer,
"markup", ALARM_DISPLAY_COLUMN, NULL);
-
+
gtk_tree_view_append_column (GTK_TREE_VIEW (an->treeview), column);
-
+
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_CALLBACK (tree_selection_changed_cb), an);
-
+
gtk_widget_realize (an->dialog);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (an->dialog)->vbox), 0);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (an->dialog)->action_area), 12);
@@ -295,7 +295,7 @@ notified_alarms_dialog_new (void)
g_signal_connect (snooze_btn, "clicked", G_CALLBACK (snooze_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);
-
+
if (!GTK_WIDGET_REALIZED (an->dialog))
gtk_widget_realize (an->dialog);
icon_list = e_icon_factory_get_icon_list ("stock_alarm");
@@ -304,25 +304,25 @@ notified_alarms_dialog_new (void)
g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
g_list_free (icon_list);
}
-
+
/* 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);
-
+
/* 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);
-
-
+
+
na = g_new0 (AlarmNotificationsDialog, 1);
na->treeview = an->treeview;
na->dialog = an->dialog;
-
+
return na;
}
-
-
+
+
/**
* add_alarm_to_notified_alarms_dialog:
* @na: Pointer to the dialog-info
@@ -341,9 +341,9 @@ notified_alarms_dialog_new (void)
*
* Return value: the iter in the treeview of the dialog
**/
-
-GtkTreeIter
-add_alarm_to_notified_alarms_dialog (AlarmNotificationsDialog *na, time_t trigger,
+
+GtkTreeIter
+add_alarm_to_notified_alarms_dialog (AlarmNotificationsDialog *na, time_t trigger,
time_t occur_start, time_t occur_end,
ECalComponentVType vtype, const char *summary,
const char *description, const char *location,
@@ -368,29 +368,29 @@ add_alarm_to_notified_alarms_dialog (AlarmNotificationsDialog *na, time_t trigge
funcinfo = g_new0 (AlarmFuncInfo, 1);
funcinfo->func = func;
funcinfo->func_data = func_data;
-
+
gtk_list_store_append (GTK_LIST_STORE(model), &iter);
current_zone = config_data_get_timezone ();
start = timet_to_str_with_zone (occur_start, current_zone);
end = timet_to_str_with_zone (occur_end, current_zone);
str_time = calculate_time (occur_start, occur_end);
- to_display = g_strdup_printf ("<big><b>%s</b></big>\n%s %s",
+ to_display = g_strdup_printf ("<big><b>%s</b></big>\n%s %s",
summary, start, str_time);
g_free (start);
g_free (end);
- gtk_list_store_set (GTK_LIST_STORE(model), &iter,
+ gtk_list_store_set (GTK_LIST_STORE(model), &iter,
ALARM_DISPLAY_COLUMN, to_display, -1);
g_free (to_display);
g_free (str_time);
-
+
gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_SUMMARY_COLUMN, summary, -1);
gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_DESCRIPTION_COLUMN, description, -1);
gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_LOCATION_COLUMN, location, -1);
gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_START_COLUMN, occur_start, -1);
gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_END_COLUMN, occur_end, -1);
gtk_list_store_set (GTK_LIST_STORE(model), &iter, ALARM_FUNCINFO_COLUMN, funcinfo, -1);
-
+
return iter;
}
@@ -400,7 +400,7 @@ tree_selection_changed_cb (GtkTreeSelection *selection, gpointer user_data)
GtkTreeModel *model;
GtkTreeIter iter;
AlarmNotify *an = user_data;
-
+
if (gtk_tree_selection_get_selected (selection, &model, &iter))
{
gchar *summary, *description, *location;
@@ -413,17 +413,17 @@ tree_selection_changed_cb (GtkTreeSelection *selection, gpointer user_data)
gtk_tree_model_get (model, &iter, ALARM_START_COLUMN, &occur_start, -1);
gtk_tree_model_get (model, &iter, ALARM_END_COLUMN, &occur_end, -1);\
gtk_tree_model_get (model, &iter, ALARM_FUNCINFO_COLUMN, &an->cur_funcinfo, -1);
-
+
fill_in_labels (an, summary, description, location, occur_start, occur_end);
} else {
- gtk_widget_set_sensitive (an->snooze_btn, FALSE);
+ gtk_widget_set_sensitive (an->snooze_btn, FALSE);
}
}
-static void
-fill_in_labels (AlarmNotify *an, const gchar *summary, const gchar *description,
+static void
+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 ();
diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.h b/calendar/gui/alarm-notify/alarm-notify-dialog.h
index fbfc64adc6..43bfb2c523 100644
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.h
+++ b/calendar/gui/alarm-notify/alarm-notify-dialog.h
@@ -49,8 +49,8 @@ typedef void (* AlarmNotifyFunc) (AlarmNotifyResult result, int snooze_mins, gpo
AlarmNotificationsDialog *
notified_alarms_dialog_new (void);
-GtkTreeIter
-add_alarm_to_notified_alarms_dialog (AlarmNotificationsDialog *na, time_t trigger,
+GtkTreeIter
+add_alarm_to_notified_alarms_dialog (AlarmNotificationsDialog *na, time_t trigger,
time_t occur_start, time_t occur_end,
ECalComponentVType vtype, const char *summary,
const char *description, const char *location,
diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c
index 9044f2d5d6..4d287c8cd2 100644
--- a/calendar/gui/alarm-notify/alarm-notify.c
+++ b/calendar/gui/alarm-notify/alarm-notify.c
@@ -40,7 +40,7 @@ struct _AlarmNotifyPrivate {
/* FIXME do we need per source type uri hashes? or perhaps we
just need to hash based on source */
GHashTable *uri_client_hash [E_CAL_SOURCE_TYPE_LAST];
- ESourceList *source_lists [E_CAL_SOURCE_TYPE_LAST];
+ ESourceList *source_lists [E_CAL_SOURCE_TYPE_LAST];
ESourceList *selected_calendars;
GMutex *mutex;
};
@@ -88,23 +88,23 @@ process_removal_in_hash (gpointer key, gpointer value, gpointer data)
ProcessRemovalsData *prd = data;
GSList *groups, *sources, *p, *q;
gboolean found = FALSE;
-
+
/* search the list of selected calendars */
groups = e_source_list_peek_groups (prd->source_list);
for (p = groups; p != NULL; p = p->next) {
ESourceGroup *group = E_SOURCE_GROUP (p->data);
-
+
sources = e_source_group_peek_sources (group);
for (q = sources; q != NULL; q = q->next) {
ESource *source = E_SOURCE (q->data);
char *source_uri;
const char *completion = e_source_get_property (source, "alarm");
-
+
source_uri = e_source_get_uri (source);
if (strcmp (source_uri, uri) == 0)
if (!completion || !g_ascii_strcasecmp (completion, "true"))
found = TRUE;
-
+
g_free (source_uri);
if (found)
@@ -128,7 +128,7 @@ list_changed_cb (ESourceList *source_list, gpointer data)
int i;
g_signal_handlers_block_by_func(source_list, list_changed_cb, data);
-
+
priv = an->priv;
/* Figure out the source type */
@@ -140,25 +140,25 @@ list_changed_cb (ESourceList *source_list, gpointer data)
}
if (source_type == E_CAL_SOURCE_TYPE_LAST)
return;
-
+
/* process the additions */
groups = e_source_list_peek_groups (source_list);
for (p = groups; p != NULL; p = p->next) {
ESourceGroup *group = E_SOURCE_GROUP (p->data);
-
+
sources = e_source_group_peek_sources (group);
for (q = sources; q != NULL; q = q->next) {
ESource *source = E_SOURCE (q->data);
char *uri;
const char *completion = e_source_get_property (source, "alarm");
-
- if (completion && (!g_ascii_strcasecmp (completion, "false") ||
+
+ if (completion && (!g_ascii_strcasecmp (completion, "false") ||
!g_ascii_strcasecmp (completion, "never")))
continue;
-
+
uri = e_source_get_uri (source);
if (!g_hash_table_lookup (priv->uri_client_hash[source_type], uri)) {
- d (printf("%s:%d (list_changed_cb) - Adding Calendar %s\n", __FILE__, __LINE__, uri));
+ d (printf("%s:%d (list_changed_cb) - Adding Calendar %s\n", __FILE__, __LINE__, uri));
alarm_notify_add_calendar (an, source_type, source, FALSE);
}
g_free (uri);
@@ -177,7 +177,7 @@ list_changed_cb (ESourceList *source_list, gpointer data)
}
g_list_free (prd.removals);
g_signal_handlers_unblock_by_func(source_list, list_changed_cb, data);
-
+
}
ESourceList *
@@ -194,7 +194,7 @@ load_calendars (AlarmNotify *an, ECalSourceType source_type)
GSList *groups, *sources, *p, *q;
priv = an->priv;
-
+
if (!e_cal_get_sources (&source_list, source_type, NULL)) {
d (printf("%s:%d (load_calendars) - Cannont get sources\n ", __FILE__, __LINE__));
priv->source_lists[source_type] = NULL;
@@ -205,22 +205,22 @@ load_calendars (AlarmNotify *an, ECalSourceType source_type)
groups = e_source_list_peek_groups (source_list);
for (p = groups; p != NULL; p = p->next) {
ESourceGroup *group = E_SOURCE_GROUP (p->data);
-
+
sources = e_source_group_peek_sources (group);
for (q = sources; q != NULL; q = q->next) {
ESource *source = E_SOURCE (q->data);
char *uri;
const char *completion = e_source_get_property (source, "alarm");
-
+
if (completion && (!g_ascii_strcasecmp (completion, "false") ||
- !g_ascii_strcasecmp (completion, "never")))
+ !g_ascii_strcasecmp (completion, "never")))
continue;
-
+
uri = e_source_get_uri (source);
- d (printf("%s:%d (load_calendars) - Loading Calendar %s \n", __FILE__, __LINE__, uri));
+ d (printf("%s:%d (load_calendars) - Loading Calendar %s \n", __FILE__, __LINE__, uri));
alarm_notify_add_calendar (an, source_type, source, FALSE);
g_free (uri);
-
+
}
}
@@ -241,7 +241,7 @@ alarm_notify_init (AlarmNotify *an, AlarmNotifyClass *klass)
priv->selected_calendars = config_data_get_calendars ("/apps/evolution/calendar/sources");
d (printf("%s:%d (alarm_notify_init) - Initing Alarm Notify\n", __FILE__, __LINE__));
-
+
for (i = 0; i < E_CAL_SOURCE_TYPE_LAST; i++)
priv->uri_client_hash[i] = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
@@ -267,12 +267,12 @@ alarm_notify_finalize (GObject *object)
AlarmNotify *an;
AlarmNotifyPrivate *priv;
int i;
-
+
g_return_if_fail (object != NULL);
g_return_if_fail (IS_ALARM_NOTIFY (object));
-
+
d (printf("%s:%d (alarm_notify_finalize) - Finalize \n ", __FILE__, __LINE__));
-
+
an = ALARM_NOTIFY (object);
priv = an->priv;
@@ -345,8 +345,8 @@ static void
alarm_msg_received(EThread *e, EMsg *msg, void *data)
{
AlarmMsg *m = (AlarmMsg *)msg;
-
- d(printf("%s:%d (alarm_msg_received) - %p: Received at thread %" G_GINT64_MODIFIER "x\n", __FILE__, __LINE__, m, e_util_pthread_id(pthread_self())));
+
+ d(printf("%s:%d (alarm_msg_received) - %p: Received at thread %" G_GINT64_MODIFIER "x\n", __FILE__, __LINE__, m, e_util_pthread_id(pthread_self())));
if (m->receive_msg) {
m->receive_msg (e, m, data);
}
@@ -354,9 +354,9 @@ alarm_msg_received(EThread *e, EMsg *msg, void *data)
/**
* alarm_notify_new:
- *
+ *
* Creates a new #AlarmNotify object.
- *
+ *
* Return value: A newly-created #AlarmNotify, or NULL if its corresponding
* CORBA object could not be created.
**/
@@ -364,10 +364,10 @@ AlarmNotify *
alarm_notify_new (void)
{
AlarmNotify *an;
-
+
d (printf("%s:%d (alarm_notify_new) - Alarm Notify New \n ", __FILE__, __LINE__));
- /* Create a thread for alarm queue operation*/
+ /* Create a thread for alarm queue operation*/
alarm_channel_setup(&alarm_reply_port, &alarm_reply_channel, alarm_msgport_replied);
alarm_operation_thread = e_thread_new(E_THREAD_QUEUE);
@@ -378,7 +378,7 @@ alarm_notify_new (void)
an = g_object_new (TYPE_ALARM_NOTIFY,
"poa", bonobo_poa_get_threaded (ORBIT_THREAD_HINT_PER_REQUEST, NULL),
NULL);
-
+
return an;
}
@@ -389,9 +389,9 @@ cal_opened_cb (ECal *client, ECalendarStatus status, gpointer user_data)
AlarmNotify *an = ALARM_NOTIFY (user_data);
priv = an->priv;
-
+
d (printf("%s:%d (cal_opened_cb) %s - Calendar Status %d\n", __FILE__, __LINE__, e_cal_get_uri (client), status));
-
+
if (status == E_CALENDAR_STATUS_OK)
alarm_queue_add_client (client);
else {
@@ -408,7 +408,7 @@ cal_opened_cb (ECal *client, ECalendarStatus status, gpointer user_data)
* @uri: URI of the calendar to load.
* @load_afterwards: Whether this calendar should be loaded in the future
* when the alarm daemon starts up.
- *
+ *
* Tells the alarm notification service to load a calendar and start monitoring
* its alarms. It can optionally be made to save the URI of this calendar so
* that it can be loaded in the future when the alarm daemon starts up.
@@ -430,7 +430,7 @@ alarm_notify_add_calendar (AlarmNotify *an, ECalSourceType source_type, ESource
e_uri = e_uri_new (str_uri);
pass_key = e_uri_to_string (e_uri, FALSE);
e_uri_free (e_uri);
-
+
g_mutex_lock (an->priv->mutex);
/* See if we already know about this uri */
if (g_hash_table_lookup (priv->uri_client_hash[source_type], str_uri)) {
@@ -455,11 +455,11 @@ alarm_notify_add_calendar (AlarmNotify *an, ECalSourceType source_type, ESource
return;
}
}
-
+
client = auth_new_cal_from_source (source, source_type);
if (client) {
- d (printf("%s:%d (alarm_notify_add_calendar) %s - Calendar Open Async... %p\n", __FILE__, __LINE__, str_uri, client));
+ d (printf("%s:%d (alarm_notify_add_calendar) %s - Calendar Open Async... %p\n", __FILE__, __LINE__, str_uri, client));
g_hash_table_insert (priv->uri_client_hash[source_type], g_strdup (str_uri), client);
g_signal_connect (G_OBJECT (client), "cal_opened", G_CALLBACK (cal_opened_cb), an);
e_cal_open_async (client, FALSE);
@@ -474,7 +474,7 @@ alarm_notify_remove_calendar (AlarmNotify *an, ECalSourceType source_type, const
{
AlarmNotifyPrivate *priv;
ECal *client;
-
+
priv = an->priv;
client = g_hash_table_lookup (priv->uri_client_hash[source_type], str_uri);
diff --git a/calendar/gui/alarm-notify/alarm-notify.h b/calendar/gui/alarm-notify/alarm-notify.h
index 342dd1dba1..8d11367bca 100644
--- a/calendar/gui/alarm-notify/alarm-notify.h
+++ b/calendar/gui/alarm-notify/alarm-notify.h
@@ -47,7 +47,7 @@ struct _AlarmMsg {
void (*receive_msg)(EThread *e, struct _AlarmMsg *msg, void *data); /* message received */
void *data;
-
+
/* Private Usage */
struct _AlarmMsgPrivate *priv;
};
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
index 5a086266b8..e166791ade 100644
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ b/calendar/gui/alarm-notify/alarm-queue.c
@@ -173,7 +173,7 @@ static void query_objects_removed_cb (ECal *client, GList *objects, gpointer dat
static void remove_client_alarms (ClientAlarms *ca);
static void update_cqa (CompQueuedAlarms *cqa, ECalComponent *comp);
-static void update_qa (ECalComponentAlarms *alarms, QueuedAlarm *qa);
+static void update_qa (ECalComponentAlarms *alarms, QueuedAlarm *qa);
static void tray_list_remove_cqa (CompQueuedAlarms *cqa);
static void on_dialog_objs_removed_cb (ECal *client, GList *objects, gpointer data);
@@ -199,7 +199,7 @@ queue_midnight_refresh (void)
midnight = time_day_end_with_zone (time (NULL), zone);
d(printf("%s:%d (queue_midnight_refresh) - Refresh at %s \n",__FILE__, __LINE__, ctime(&midnight)));
-
+
midnight_refresh_id = alarm_add (midnight, midnight_refresh_cb, NULL, NULL);
if (!midnight_refresh_id) {
d(printf("%s:%d (queue_midnight_refresh) - Could not setup the midnight refresh alarm\n",__FILE__, __LINE__));
@@ -212,9 +212,9 @@ static void
add_client_alarms_cb (gpointer key, gpointer value, gpointer data)
{
ClientAlarms *ca = (ClientAlarms *)data;
-
+
d(printf("%s:%d (add_client_alarms_cb) - Adding %p\n",__FILE__, __LINE__, ca));
-
+
ca = value;
load_alarms_for_today (ca);
}
@@ -230,13 +230,13 @@ midnight_refresh_async (EThread *e, AlarmMsg *msg, void *data)
struct _midnight_refresh_msg *list = msg->data;
d(printf("%s:%d (midnight_refresh_async) \n",__FILE__, __LINE__));
-
+
/* Re-load the alarms for all clients */
g_hash_table_foreach (client_alarms_hash, add_client_alarms_cb, NULL);
/* Re-schedule the midnight update */
if (list->remove && midnight_refresh_id != NULL) {
- d(printf("%s:%d (midnight_refresh_async) - Reschedule the midnight update \n",__FILE__, __LINE__));
+ d(printf("%s:%d (midnight_refresh_async) - Reschedule the midnight update \n",__FILE__, __LINE__));
alarm_remove (midnight_refresh_id);
midnight_refresh_id = NULL;
}
@@ -249,7 +249,7 @@ midnight_refresh_cb (gpointer alarm_id, time_t trigger, gpointer data)
{
AlarmMsg *msg;
struct _midnight_refresh_msg *list;
-
+
/* These two structures will be freed by the msg destroy function*/
msg = malloc (sizeof (AlarmMsg));
msg->receive_msg = midnight_refresh_async;
@@ -420,7 +420,7 @@ alarm_trigger_cb (gpointer alarm_id, time_t trigger, gpointer data)
#ifdef HAVE_LIBNOTIFY
popup_notification (trigger, cqa, alarm_id, TRUE);
#endif
- display_notification (trigger, cqa, alarm_id, TRUE);
+ display_notification (trigger, cqa, alarm_id, TRUE);
break;
case E_CAL_COMPONENT_ALARM_EMAIL:
@@ -462,13 +462,13 @@ add_component_alarms (ClientAlarms *ca, ECalComponentAlarms *alarms)
cqa->queued_alarms = NULL;
d(printf("%s:%d (add_component_alarms) - Creating CQA %p\n",__FILE__, __LINE__, cqa));
-
+
for (l = alarms->alarms; l; l = l->next) {
ECalComponentAlarmInstance *instance;
gpointer alarm_id;
QueuedAlarm *qa;
time_t tnow = time(NULL);
-
+
instance = l->data;
if (!has_known_notification (cqa->alarms->comp, instance->auid)) {
@@ -517,11 +517,11 @@ load_alarms (ClientAlarms *ca, time_t start, time_t end)
char *str_query, *iso_start, *iso_end;
d(printf("%s:%d (load_alarms) \n",__FILE__, __LINE__));
-
+
iso_start = isodate_from_time_t (start);
if (!iso_start)
return;
-
+
iso_end = isodate_from_time_t (end);
if (!iso_end) {
g_free (iso_start);
@@ -535,7 +535,7 @@ load_alarms (ClientAlarms *ca, time_t start, time_t end)
/* create the live query */
if (ca->query) {
- d(printf("%s:%d (load_alarms) - Disconnecting old queries \n",__FILE__, __LINE__));
+ d(printf("%s:%d (load_alarms) - Disconnecting old queries \n",__FILE__, __LINE__));
g_signal_handlers_disconnect_matched (ca->query, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, ca);
g_object_unref (ca->query);
ca->query = NULL;
@@ -546,7 +546,7 @@ load_alarms (ClientAlarms *ca, time_t start, time_t end)
g_warning (G_STRLOC ": Could not get query for client");
} else {
d(printf("%s:%d (load_alarms) - Setting Call backs \n",__FILE__, __LINE__));
-
+
g_signal_connect (G_OBJECT (ca->query), "objects_added",
G_CALLBACK (query_objects_changed_cb), ca);
g_signal_connect (G_OBJECT (ca->query), "objects_modified",
@@ -579,7 +579,7 @@ load_alarms_for_today (ClientAlarms *ca)
from = MAX (config_data_get_last_notification_time () + 1, day_start);
day_end = time_day_end_with_zone (now, zone);
- d(printf("%s:%d (load_alarms_for_today) - From %s to %s\n",__FILE__, __LINE__, ctime (&from), ctime(&day_end)));
+ d(printf("%s:%d (load_alarms_for_today) - From %s to %s\n",__FILE__, __LINE__, ctime (&from), ctime(&day_end)));
load_alarms (ca, from, day_end);
}
@@ -640,16 +640,16 @@ remove_comp (ClientAlarms *ca, ECalComponentId *id)
g_free (id->rid);
id->rid = NULL;
}
-
+
cqa = lookup_comp_queued_alarms (ca, id);
- if (!cqa)
+ if (!cqa)
return;
/* If a component is present, then it means we must have alarms queued
* for it.
*/
g_return_if_fail (cqa->queued_alarms != NULL);
-
+
d(printf("%s:%d (remove_comp) - Removing CQA %p\n",__FILE__, __LINE__, cqa));
remove_alarms (cqa, TRUE);
}
@@ -663,18 +663,18 @@ struct _query_msg {
gpointer data;
};
-static GList *
+static GList *
duplicate_ical (GList *in_list)
{
GList *l, *out_list = NULL;
for (l = in_list; l; l = l->next) {
out_list = g_list_prepend (out_list, icalcomponent_new_clone (l->data));
}
-
+
return g_list_reverse (out_list);
}
-static GList *
+static GList *
duplicate_ecal (GList *in_list)
{
GList *l, *out_list = NULL;
@@ -686,7 +686,7 @@ duplicate_ecal (GList *in_list)
id->rid = g_strdup (old->rid);
out_list = g_list_prepend (out_list, id);
}
-
+
return g_list_reverse (out_list);
}
@@ -703,11 +703,11 @@ query_objects_changed_async (EThread *e, AlarmMsg *msg, void *data)
struct _query_msg *list = msg->data;
ECal *client;
GList *objects;
-
+
client = list->client;
ca = list->data;
objects = list->objects;
-
+
from = config_data_get_last_notification_time ();
if (from == -1)
from = time (NULL);
@@ -717,9 +717,9 @@ query_objects_changed_async (EThread *e, AlarmMsg *msg, void *data)
zone = config_data_get_timezone ();
day_end = time_day_end_with_zone (time (NULL), zone);
-
+
d(printf("%s:%d (query_objects_changed_async) - Querying for object between %s to %s\n",__FILE__, __LINE__, ctime(&from), ctime(&day_end)));
-
+
for (l = objects; l != NULL; l = l->next) {
ECalComponentId *id;
GSList *sl;
@@ -753,7 +753,7 @@ query_objects_changed_async (EThread *e, AlarmMsg *msg, void *data)
d(printf("%s:%d (query_objects_changed_async) - Alarm Already Exist for %s\n",__FILE__, __LINE__, id->uid));
/* if the alarms or the alarms list is empty remove it after updating the cqa structure */
if (alarms == NULL || alarms->alarms == NULL) {
-
+
/* update the cqa and its queued alarms for changes in summary and alarm_uid */
update_cqa (cqa, comp);
@@ -766,7 +766,7 @@ query_objects_changed_async (EThread *e, AlarmMsg *msg, void *data)
remove_alarms (cqa, FALSE);
cqa->alarms = alarms;
cqa->queued_alarms = NULL;
-
+
/* add the new alarms */
for (sl = cqa->alarms->alarms; sl; sl = sl->next) {
ECalComponentAlarmInstance *instance;
@@ -782,7 +782,7 @@ query_objects_changed_async (EThread *e, AlarmMsg *msg, void *data)
alarm_id = alarm_add (instance->trigger, alarm_trigger_cb, cqa, NULL);
if (!alarm_id) {
- d(printf("%s:%d (query_objects_changed_async) -Unable to schedule trigger for %s \n",__FILE__, __LINE__, ctime(&(instance->trigger))));
+ d(printf("%s:%d (query_objects_changed_async) -Unable to schedule trigger for %s \n",__FILE__, __LINE__, ctime(&(instance->trigger))));
continue;
}
@@ -790,11 +790,11 @@ query_objects_changed_async (EThread *e, AlarmMsg *msg, void *data)
qa->alarm_id = alarm_id;
qa->instance = instance;
qa->snooze = FALSE;
- qa->orig_trigger = instance->trigger;
+ qa->orig_trigger = instance->trigger;
cqa->queued_alarms = g_slist_prepend (cqa->queued_alarms, qa);
d(printf("%s:%d (query_objects_changed_async) - Adding %p to queue \n",__FILE__, __LINE__, qa));
}
-
+
cqa->queued_alarms = g_slist_reverse (cqa->queued_alarms);
g_object_unref (comp);
comp = NULL;
@@ -817,7 +817,7 @@ query_objects_changed_cb (ECal *client, GList *objects, gpointer data)
list->data = data;
msg->data = list;
- d(printf("%s:%d (query_objects_changed_cb) - Posting a task\n",__FILE__, __LINE__));
+ d(printf("%s:%d (query_objects_changed_cb) - Posting a task\n",__FILE__, __LINE__));
e_thread_put(alarm_operation_thread, (EMsg *)msg);
}
@@ -833,18 +833,18 @@ query_objects_removed_async (EThread *e, AlarmMsg *msg, void *data)
struct _query_msg *list = msg->data;
ECal *client;
GList *objects;
-
+
client = list->client;
ca = list->data;
objects = list->objects;
-
+
d(printf("%s:%d (query_objects_removed_async) - Removing %d objects\n",__FILE__, __LINE__, g_list_length(objects)));
-
- for (l = objects; l != NULL; l = l->next) {
+
+ for (l = objects; l != NULL; l = l->next) {
/* If the alarm is already triggered remove it. */
tray_list_remove_cqa (lookup_comp_queued_alarms (ca, l->data));
remove_comp (ca, l->data);
- g_hash_table_remove (ca->uid_alarms_hash, l->data);
+ g_hash_table_remove (ca->uid_alarms_hash, l->data);
e_cal_component_free_id (l->data);
}
@@ -864,10 +864,10 @@ query_objects_removed_cb (ECal *client, GList *objects, gpointer data)
list = malloc (sizeof (struct _query_msg));
list->client = client;
list->objects = duplicate_ecal (objects);
- list->data = data;
+ list->data = data;
msg->data = list;
- d(printf("%s:%d (query_objects_removed_cb) - Posting a task\n",__FILE__, __LINE__));
+ d(printf("%s:%d (query_objects_removed_cb) - Posting a task\n",__FILE__, __LINE__));
e_thread_put(alarm_operation_thread, (EMsg *)msg);
}
@@ -916,7 +916,7 @@ edit_component (ECal *client, ECalComponent *comp)
GNOME_Evolution_Calendar_CompEditorFactory_CompEditorMode corba_type;
d(printf("%s:%d (edit_component) - Client %p\n",__FILE__, __LINE__, client));
-
+
e_cal_component_get_uid (comp, &uid);
uri = e_cal_get_uri (client);
@@ -939,9 +939,9 @@ edit_component (ECal *client, ECalComponent *comp)
corba_type = GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_TODO;
break;
default:
- corba_type = GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_EVENT;
+ corba_type = GNOME_Evolution_Calendar_CompEditorFactory_EDITOR_MODE_EVENT;
}
-
+
GNOME_Evolution_Calendar_CompEditorFactory_editExisting (factory, uri, (char *) uid, corba_type, &ev);
if (BONOBO_EX (&ev))
@@ -1001,7 +1001,7 @@ free_tray_icon_data (TrayIconData *tray_data)
g_object_unref (tray_data->comp);
tray_data->comp = NULL;
-
+
tray_data->cqa = NULL;
tray_data->alarm_id = NULL;
tray_data->tray_icon = NULL;
@@ -1021,11 +1021,11 @@ on_dialog_objs_removed_async (EThread *e, AlarmMsg *msg, void *data)
GList *objects;
d(printf("%s:%d (on_dialog_objs_removed_async)\n",__FILE__, __LINE__));
-
+
client = list->client;
tray_data = list->data;
objects = list->objects;
-
+
e_cal_component_get_uid (tray_data->comp, &our_uid);
g_return_if_fail (our_uid && *our_uid);
@@ -1061,7 +1061,7 @@ on_dialog_objs_removed_cb (ECal *client, GList *objects, gpointer data)
msg->data = list;
d(printf("%s:%d (on_dialog_objs_removed_cb) - Posting a task \n",__FILE__, __LINE__));
- e_thread_put(alarm_operation_thread, (EMsg *)msg);
+ e_thread_put(alarm_operation_thread, (EMsg *)msg);
}
struct _tray_cqa_msg {
@@ -1076,12 +1076,12 @@ tray_list_remove_cqa_async(EThread *e, AlarmMsg *msg, void *data)
GList *list = tray_icons_list;
d(printf("%s:%d (tray_list_remove_cqa_async) - Removing CQA %p from tray list\n",__FILE__, __LINE__, cqa));
-
+
while (list) {
TrayIconData *tray_data = list->data;
GList *tmp = list;
GtkTreeModel *model;
-
+
list = list->next;
if (tray_data->cqa == cqa) {
d(printf("%s:%d (tray_list_remove_cqa_async) - Found.\n", __FILE__, __LINE__));
@@ -1093,9 +1093,9 @@ tray_list_remove_cqa_async(EThread *e, AlarmMsg *msg, void *data)
free_tray_icon_data (tray_data);
}
}
-
+
d(printf("%s:%d (tray_list_remove_cqa_async) - %d alarms left.\n", __FILE__, __LINE__, g_list_length (tray_icons_list)));
-
+
if (alarm_notifications_dialog) {
if (!g_list_length (tray_icons_list)) {
gtk_widget_destroy (alarm_notifications_dialog->dialog);
@@ -1140,11 +1140,11 @@ tray_list_remove_async(EThread *e, AlarmMsg *msg, void *data)
while (list != NULL) {
TrayIconData *tray_data = list->data;
-
+
if (!tray_data->snooze_set){
GList *temp = list->next;
gboolean status;
-
+
tray_icons_list = g_list_remove_link (tray_icons_list, list);
status = remove_queued_alarm (tray_data->cqa, tray_data->alarm_id, FALSE, TRUE);
if (status) {
@@ -1157,11 +1157,11 @@ tray_list_remove_async(EThread *e, AlarmMsg *msg, void *data)
g_list_free_1 (list);
if (tray_icons_list != list) /* List head is modified */
list = tray_icons_list;
- else
+ else
list = temp;
} else
list = list->next;
- }
+ }
}
static void
@@ -1190,7 +1190,7 @@ tray_list_remove_data_async(EThread *e, AlarmMsg *msg, void *data)
TrayIconData *tray_data = tmsg->data;
d(printf("%s:%d (tray_list_remove_data_async) - Removing %p from tray list\n",__FILE__, __LINE__, tray_data));
-
+
tray_icons_list = g_list_remove_all (tray_icons_list, tray_data);
free_tray_icon_data (tray_data);
tray_data = NULL;
@@ -1219,23 +1219,23 @@ notify_dialog_cb (AlarmNotifyResult result, int snooze_mins, gpointer data)
TrayIconData *tray_data = data;
d(printf("%s:%d (notify_dialog_cb) - Received from dialog\n",__FILE__, __LINE__));
-
+
g_signal_handlers_disconnect_matched (tray_data->query, G_SIGNAL_MATCH_FUNC,
0, 0, NULL, on_dialog_objs_removed_cb, NULL);
switch (result) {
case ALARM_NOTIFY_SNOOZE:
- d(printf("%s:%d (notify_dialog_cb) - Creating a snooze\n",__FILE__, __LINE__));
+ d(printf("%s:%d (notify_dialog_cb) - Creating a snooze\n",__FILE__, __LINE__));
create_snooze (tray_data->cqa, tray_data->alarm_id, snooze_mins);
tray_data->snooze_set = TRUE;
tray_list_remove_data (tray_data);
if (alarm_notifications_dialog) {
- GtkTreeSelection *selection =
+ GtkTreeSelection *selection =
gtk_tree_view_get_selection (
GTK_TREE_VIEW (alarm_notifications_dialog->treeview));
GtkTreeIter iter;
GtkTreeModel *model = NULL;
-
+
/* We can` also use tray_data->iter */
if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
@@ -1249,9 +1249,9 @@ notify_dialog_cb (AlarmNotifyResult result, int snooze_mins, gpointer data)
gtk_tree_selection_select_iter (selection, &iter);
}
}
-
+
}
-
+
break;
case ALARM_NOTIFY_EDIT:
@@ -1263,20 +1263,20 @@ notify_dialog_cb (AlarmNotifyResult result, int snooze_mins, gpointer data)
d(printf("%s:%d (notify_dialog_cb) - Dialog close\n",__FILE__, __LINE__));
if (alarm_notifications_dialog) {
GtkTreeIter iter;
- GtkTreeModel *model =
+ GtkTreeModel *model =
gtk_tree_view_get_model (
GTK_TREE_VIEW (alarm_notifications_dialog->treeview));
gboolean valid = gtk_tree_model_get_iter_first (model, &iter);
-
- /* Maybe we should warn about this first? */
+
+ /* Maybe we should warn about this first? */
while (valid) {
valid = gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
}
-
+
gtk_widget_destroy (alarm_notifications_dialog->dialog);
g_free (alarm_notifications_dialog);
alarm_notifications_dialog = NULL;
-
+
/* Task to remove the tray icons */
tray_list_remove_icons ();
}
@@ -1309,14 +1309,14 @@ open_alarm_dialog (TrayIconData *tray_data)
if (!alarm_notifications_dialog)
alarm_notifications_dialog = notified_alarms_dialog_new ();
-
+
if (alarm_notifications_dialog) {
GtkTreeSelection *selection = NULL;
-
+
selection = gtk_tree_view_get_selection (
GTK_TREE_VIEW (alarm_notifications_dialog->treeview));
-
+
tray_data->iter = add_alarm_to_notified_alarms_dialog (
alarm_notifications_dialog,
tray_data->trigger,
@@ -1327,11 +1327,11 @@ open_alarm_dialog (TrayIconData *tray_data)
tray_data->description,
tray_data->location,
notify_dialog_cb, tray_data);
-
+
gtk_tree_selection_select_iter (selection, &tray_data->iter);
}
-
+
}
return TRUE;
@@ -1341,25 +1341,25 @@ static gint
tray_icon_clicked_cb (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
{
if (event->type == GDK_BUTTON_PRESS) {
- d(printf("%s:%d (tray_icon_clicked_cb) - left click and %d alarms\n",__FILE__, __LINE__, g_list_length (tray_icons_list)));
+ d(printf("%s:%d (tray_icon_clicked_cb) - left click and %d alarms\n",__FILE__, __LINE__, g_list_length (tray_icons_list)));
if (event->button == 1 && g_list_length (tray_icons_list) > 0) {
GList *tmp;
for (tmp = tray_icons_list; tmp; tmp = tmp->next) {
open_alarm_dialog (tmp->data);
}
-
+
return TRUE;
} else if (event->button == 3) {
- d(printf("%s:%d (tray_icon_clicked_cb) - right click\n",__FILE__, __LINE__));
+ d(printf("%s:%d (tray_icon_clicked_cb) - right click\n",__FILE__, __LINE__));
if (tray_blink_id > -1)
g_source_remove (tray_blink_id);
tray_blink_id = -1;
-
-
+
+
gtk_status_icon_set_visible (tray_icon, FALSE);
g_object_unref (tray_icon);
- tray_icon = NULL;
+ tray_icon = NULL;
return TRUE;
}
}
@@ -1400,7 +1400,7 @@ tray_icon_blink_cb (gpointer data)
GdkPixbuf *pixbuf;
tray_blink_state = tray_blink_state == TRUE ? FALSE: TRUE;
-
+
pixbuf = e_icon_factory_get_icon (tray_blink_state == TRUE?
"stock_appointment-reminder-excl" :
"stock_appointment-reminder",
@@ -1420,7 +1420,7 @@ static void
tray_list_add_async (EThread *e, AlarmMsg *msg, void *data)
{
struct _tray_msg *list = msg->data;
- d(printf("%s:%d (tray_list_add_async) - Add %p\n",__FILE__, __LINE__, list->data));
+ d(printf("%s:%d (tray_list_add_async) - Add %p\n",__FILE__, __LINE__, list->data));
tray_icons_list = g_list_prepend (tray_icons_list, list->data);
}
@@ -1437,8 +1437,8 @@ tray_list_add_new (TrayIconData *data)
list = malloc (sizeof (struct _tray_msg));
list->data = data;
msg->data = list;
-
- d(printf("%s:%d (tray_list_add_new) - Posting a task\n",__FILE__, __LINE__));
+
+ d(printf("%s:%d (tray_list_add_new) - Posting a task\n",__FILE__, __LINE__));
e_thread_put(alarm_operation_thread, (EMsg *)msg);
}
@@ -1458,15 +1458,15 @@ display_notification (time_t trigger, CompQueuedAlarms *cqa,
ECalComponentOrganizer organiser;
d(printf("%s:%d (display_notification)\n",__FILE__, __LINE__));
-
+
comp = cqa->alarms->comp;
qa = lookup_queued_alarm (cqa, alarm_id);
if (!qa)
return;
-
+
/* get a sensible description for the event */
e_cal_component_get_summary (comp, &text);
- e_cal_component_get_organizer (comp, &organiser);
+ e_cal_component_get_organizer (comp, &organiser);
if (text.value)
summary = text.value;
@@ -1502,7 +1502,7 @@ display_notification (time_t trigger, CompQueuedAlarms *cqa,
G_CALLBACK (popup_menu), NULL);
}
-
+
current_zone = config_data_get_timezone ();
alarm_str = timet_to_str_with_zone (trigger, current_zone);
start_str = timet_to_str_with_zone (qa->instance->occur_start, current_zone);
@@ -1578,17 +1578,17 @@ popup_notification (time_t trigger, CompQueuedAlarms *cqa,
char *body;
d(printf("%s:%d (popup_notification)\n",__FILE__, __LINE__));
-
+
comp = cqa->alarms->comp;
qa = lookup_queued_alarm (cqa, alarm_id);
if (!qa)
return;
if (!notify_is_initted ())
notify_init("Evolution Alarm Notify");
-
+
/* get a sensible description for the event */
e_cal_component_get_summary (comp, &text);
- e_cal_component_get_organizer (comp, &organiser);
+ e_cal_component_get_organizer (comp, &organiser);
if (text.value)
@@ -1620,12 +1620,12 @@ popup_notification (time_t trigger, CompQueuedAlarms *cqa,
if (location)
body = g_strdup_printf ("%s %s\n%s %s", _("Location:"), location, start_str, time_str);
else
- body = g_strdup_printf ("%s %s", start_str, time_str);
+ body = g_strdup_printf ("%s %s", start_str, time_str);
}
n = notify_notification_new (summary, body, "stock_appointment-reminder", NULL);
if (!notify_notification_show(n, NULL))
- g_warning ("Could not send notification to daemon\n");
+ g_warning ("Could not send notification to daemon\n");
/* create the private structure */
g_free (start_str);
@@ -1650,7 +1650,7 @@ audio_notification (time_t trigger, CompQueuedAlarms *cqa,
int flag = 0;
d(printf("%s:%d (audio_notification)\n",__FILE__, __LINE__));
-
+
comp = cqa->alarms->comp;
qa = lookup_queued_alarm (cqa, alarm_id);
if (!qa)
@@ -1691,7 +1691,7 @@ mail_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id)
/* FIXME */
d(printf("%s:%d (mail_notification)\n",__FILE__, __LINE__));
-
+
if (!e_cal_get_static_capability (cqa->parent_client->client,
CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS))
return;
@@ -1713,17 +1713,17 @@ mail_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id)
/* Performs notification of a procedure alarm */
static gboolean
-procedure_notification_dialog (const char *cmd, const char *url)
+procedure_notification_dialog (const char *cmd, const char *url)
{
GtkWidget *dialog, *label, *checkbox;
char *str;
int btn;
d(printf("%s:%d (procedure_notification_dialog)\n",__FILE__, __LINE__));
-
+
if (config_data_is_blessed_program (url))
return TRUE;
-
+
dialog = gtk_dialog_new_with_buttons (_("Warning"),
NULL, 0,
GTK_STOCK_NO, GTK_RESPONSE_CANCEL,
@@ -1746,7 +1746,7 @@ procedure_notification_dialog (const char *cmd, const char *url)
checkbox = gtk_check_button_new_with_label
(_("Do not ask me about this program again."));
gtk_widget_show (checkbox);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
checkbox, TRUE, TRUE, 4);
/* Run the dialog */
@@ -1771,7 +1771,7 @@ procedure_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id
int result;
d(printf("%s:%d (procedure_notification)\n",__FILE__, __LINE__));
-
+
comp = cqa->alarms->comp;
qa = lookup_queued_alarm (cqa, alarm_id);
if (!qa)
@@ -1805,7 +1805,7 @@ procedure_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id
result = 0;
if (procedure_notification_dialog (cmd, url))
result = gnome_execute_shell (NULL, cmd);
-
+
if (cmd != (char *) url)
g_free (cmd);
@@ -1831,14 +1831,14 @@ check_midnight_refresh (gpointer user_data)
icaltimezone *zone;
d(printf("%s:%d (check_midnight_refresh)\n",__FILE__, __LINE__));
-
+
zone = config_data_get_timezone ();
new_midnight = time_day_end_with_zone (time (NULL), zone);
if (new_midnight > midnight) {
AlarmMsg *msg;
struct _midnight_refresh_msg *list;
-
+
/* These two structures will be freed by the msg destroy function*/
msg = malloc (sizeof (AlarmMsg));
msg->receive_msg = midnight_refresh_async;
@@ -1850,7 +1850,7 @@ check_midnight_refresh (gpointer user_data)
msg->data = list;
d(printf("%s:%d (check_midnight_refresh) - Posting a task to refresh\n",__FILE__, __LINE__));
- e_thread_put(alarm_operation_thread, (EMsg *)msg);
+ e_thread_put(alarm_operation_thread, (EMsg *)msg);
}
return TRUE;
@@ -1869,7 +1869,7 @@ alarm_queue_init (gpointer data)
g_return_if_fail (alarm_queue_inited == FALSE);
d(printf("%s:%d (alarm_queue_init)\n",__FILE__, __LINE__));
-
+
client_alarms_hash = g_hash_table_new (g_direct_hash, g_direct_equal);
queue_midnight_refresh ();
@@ -1896,12 +1896,12 @@ free_client_alarms_cb (gpointer key, gpointer value, gpointer user_data)
ClientAlarms *ca = value;
d(printf("%s:%d (free_client_alarms_cb) - %p\n",__FILE__, __LINE__, ca));
-
+
if (ca) {
remove_client_alarms (ca);
if (ca->client) {
d(printf("%s:%d (free_client_alarms_cb) - Disconnecting Client \n",__FILE__, __LINE__));
-
+
g_signal_handlers_disconnect_matched (ca->client, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, ca);
g_object_unref (ca->client);
@@ -1909,7 +1909,7 @@ free_client_alarms_cb (gpointer key, gpointer value, gpointer user_data)
if (ca->query) {
d(printf("%s:%d (free_client_alarms_cb) - Disconnecting Query \n",__FILE__, __LINE__));
-
+
g_signal_handlers_disconnect_matched (ca->query, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, ca);
g_object_unref (ca->query);
@@ -1940,7 +1940,7 @@ alarm_queue_done (void)
g_return_if_fail (g_hash_table_size (client_alarms_hash) == 0);
d(printf("%s:%d (alarm_queue_done)\n",__FILE__, __LINE__));
-
+
g_hash_table_foreach_remove (client_alarms_hash, (GHRFunc) free_client_alarms_cb, NULL);
g_hash_table_destroy (client_alarms_hash);
client_alarms_hash = NULL;
@@ -1953,7 +1953,7 @@ alarm_queue_done (void)
alarm_queue_inited = FALSE;
}
-static gboolean
+static gboolean
compare_ids (gpointer a, gpointer b)
{
ECalComponentId *id, *id1;
@@ -1967,12 +1967,12 @@ compare_ids (gpointer a, gpointer b)
return g_str_equal (id->rid, id1->rid);
else if (!(id->rid && id1->rid))
return TRUE;
- }
+ }
}
return FALSE;
}
-static guint
+static guint
hash_ids (gpointer a)
{
ECalComponentId *id =a;
@@ -2002,7 +2002,7 @@ static void alarm_queue_add_async (EThread *e, AlarmMsg *msg, void *data)
}
d(printf("%s:%d (alarm_queue_add_async) - %p\n",__FILE__, __LINE__, client));
-
+
ca = g_new (ClientAlarms, 1);
ca->client = client;
@@ -2018,7 +2018,7 @@ static void alarm_queue_add_async (EThread *e, AlarmMsg *msg, void *data)
g_signal_connect (client, "cal_opened",
G_CALLBACK (cal_opened_cb),
ca);
- }
+ }
}
/**
@@ -2072,12 +2072,12 @@ static gboolean
remove_comp_by_id (gpointer key, gpointer value, gpointer userdata) {
ClientAlarms *ca = (ClientAlarms *)userdata;
-
+
d(printf("%s:%d (remove_comp_by_id)\n",__FILE__, __LINE__));
-
+
/* if (!g_hash_table_size (ca->uid_alarms_hash)) */
/* return; */
-
+
remove_cqa (ca, (ECalComponentId *)key, (CompQueuedAlarms *) value);
return TRUE;
@@ -2088,10 +2088,10 @@ remove_comp_by_id (gpointer key, gpointer value, gpointer userdata) {
static void
remove_client_alarms (ClientAlarms *ca)
{
- d(printf("%s:%d (remove_client_alarms) - size %d \n",__FILE__, __LINE__, g_hash_table_size (ca->uid_alarms_hash)));
+ d(printf("%s:%d (remove_client_alarms) - size %d \n",__FILE__, __LINE__, g_hash_table_size (ca->uid_alarms_hash)));
g_hash_table_foreach_remove (ca->uid_alarms_hash, (GHRFunc)remove_comp_by_id, ca);
-
+
/* The hash table should be empty now */
g_return_if_fail (g_hash_table_size (ca->uid_alarms_hash) == 0);
}
@@ -2122,7 +2122,7 @@ alarm_queue_remove_async (EThread *e, AlarmMsg *msg, void *data)
/* Clean up */
if (ca->client) {
d(printf("%s:%d (alarm_queue_remove_async) - Disconnecting Client \n",__FILE__, __LINE__));
-
+
g_signal_handlers_disconnect_matched (ca->client, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, ca);
g_object_unref (ca->client);
@@ -2131,7 +2131,7 @@ alarm_queue_remove_async (EThread *e, AlarmMsg *msg, void *data)
if (ca->query) {
d(printf("%s:%d (alarm_queue_remove_async) - Disconnecting Query \n",__FILE__, __LINE__));
-
+
g_signal_handlers_disconnect_matched (ca->query, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, ca);
g_object_unref (ca->query);
@@ -2176,9 +2176,9 @@ alarm_queue_remove_client (ECal *client, gboolean immediately)
e_thread_put(alarm_operation_thread, (EMsg *)msg);
}
-/* Update non-time related variables for various structures on modification of an existing component
+/* Update non-time related variables for various structures on modification of an existing component
to be called only from query_objects_changed_cb */
-static void
+static void
update_cqa (CompQueuedAlarms *cqa, ECalComponent *newcomp)
{
ECalComponent *oldcomp;
@@ -2195,7 +2195,7 @@ update_cqa (CompQueuedAlarms *cqa, ECalComponent *newcomp)
to = time_day_end_with_zone (time (NULL), zone);
d(printf("%s:%d (update_cqa) - Generating alarms between %s and %s\n",__FILE__, __LINE__, ctime(&from), ctime(&to)));
- alarms = e_cal_util_generate_alarms_for_comp (newcomp, from, to, omit,
+ alarms = e_cal_util_generate_alarms_for_comp (newcomp, from, to, omit,
e_cal_resolve_tzid_cb, cqa->parent_client->client, zone);
/* Update auids in Queued Alarms*/
@@ -2208,14 +2208,14 @@ update_cqa (CompQueuedAlarms *cqa, ECalComponent *newcomp)
else {
if (e_cal_component_get_alarm (oldcomp, check_auid)) { /* Need to update QueuedAlarms */
if (alarms == NULL) {
- d(printf("%s:%d (update_cqa) - No alarms found in the modified component\n",__FILE__, __LINE__));
+ d(printf("%s:%d (update_cqa) - No alarms found in the modified component\n",__FILE__, __LINE__));
break;
}
update_qa (alarms, qa);
}
else
g_warning ("Failed in auid lookup for old component also\n");
- }
+ }
}
/* Update the actual component stored in CompQueuedAlarms structure */
@@ -2240,4 +2240,4 @@ update_qa (ECalComponentAlarms *alarms, QueuedAlarm *qa)
break;
}
}
-}
+}
diff --git a/calendar/gui/alarm-notify/alarm.c b/calendar/gui/alarm-notify/alarm.c
index 38e0638ec8..5239812c99 100644
--- a/calendar/gui/alarm-notify/alarm.c
+++ b/calendar/gui/alarm-notify/alarm.c
@@ -145,13 +145,13 @@ setup_timeout (void)
* current time we timeout immediately */
diff = MAX (0, ar->trigger - time (NULL));
now = time (NULL);
-
+
/* Add the time out */
g_message ("Setting timeout for %d %lu %lu", diff, ar->trigger, now);
g_message (" %s", ctime (&ar->trigger));
g_message (" %s", ctime (&now));
timeout_id = g_timeout_add (diff * 1000, alarm_ready_cb, NULL);
-
+
}
/* Used from g_list_insert_sorted(); compares the trigger times of two AlarmRecord structures. */
@@ -175,7 +175,7 @@ queue_alarm (AlarmRecord *ar)
/* Track the current head of the list in case there are changes */
old_head = alarms;
- /* Insert the new alarm in order if the alarm's trigger time is
+ /* Insert the new alarm in order if the alarm's trigger time is
after the current time */
alarms = g_list_insert_sorted (alarms, ar, compare_alarm_by_time);
@@ -226,7 +226,7 @@ alarm_add (time_t trigger, AlarmFunction alarm_fn, gpointer data,
/**
* alarm_remove:
* @alarm: A queued alarm identifier.
- *
+ *
* Removes an alarm from the alarm queue.
**/
void
@@ -274,7 +274,7 @@ alarm_remove (gpointer alarm)
/**
* alarm_done:
- *
+ *
* Terminates the alarm timer mechanism. This should be called at the end of
* the program.
**/
diff --git a/calendar/gui/alarm-notify/config-data.c b/calendar/gui/alarm-notify/config-data.c
index c35d2b4a6c..e7120d4b38 100644
--- a/calendar/gui/alarm-notify/config-data.c
+++ b/calendar/gui/alarm-notify/config-data.c
@@ -101,10 +101,10 @@ config_data_get_calendars (const char *key)
ESourceList *cal_sources;
gboolean state;
GSList *gconf_list;
-
+
if (!inited)
conf_client = gconf_client_get_default ();
-
+
gconf_list = gconf_client_get_list (conf_client,
key,
GCONF_VALUE_STRING,
@@ -117,12 +117,12 @@ config_data_get_calendars (const char *key)
return cal_sources;
}
- state = gconf_client_get_bool (conf_client,
+ state = gconf_client_get_bool (conf_client,
"/apps/evolution/calendar/notify/notify_with_tray",
NULL);
if (!state) /* Should be old client*/ {
GSList *source;
- gconf_client_set_bool (conf_client,
+ gconf_client_set_bool (conf_client,
"/apps/evolution/calendar/notify/notify_with_tray",
TRUE,
NULL);
@@ -149,11 +149,11 @@ config_data_get_calendars (const char *key)
}
return cal_sources;
-
+
}
void
-config_data_replace_string_list (const char *key,
+config_data_replace_string_list (const char *key,
const char *old,
const char *new)
{
@@ -166,9 +166,9 @@ config_data_replace_string_list (const char *key,
key,
GCONF_VALUE_STRING,
NULL);
-
+
for (tmp = source; tmp; tmp = tmp->next) {
-
+
if (strcmp (tmp->data, old) == 0) {
gboolean state;
@@ -205,7 +205,7 @@ config_data_get_timezone (void)
ensure_inited ();
- location = gconf_client_get_string (conf_client,
+ location = gconf_client_get_string (conf_client,
"/apps/evolution/calendar/display/timezone",
NULL);
if (location && location[0]) {
@@ -246,7 +246,7 @@ config_data_get_notify_with_tray (void)
/**
* config_data_set_last_notification_time:
* @t: A time value.
- *
+ *
* Saves the last notification time so that it can be fetched the next time the
* alarm daemon is run. This way the daemon can show alarms that should have
* triggered while it was not running.
@@ -271,9 +271,9 @@ config_data_set_last_notification_time (time_t t)
/**
* config_data_get_last_notification_time:
- *
+ *
* Queries the last saved value for alarm notification times.
- *
+ *
* Return value: The last saved value, or -1 if no value had been saved before.
**/
time_t
@@ -295,7 +295,7 @@ config_data_get_last_notification_time (void)
/**
* config_data_save_blessed_program:
* @program: a program name
- *
+ *
* Saves a program name as "blessed"
**/
void
@@ -317,9 +317,9 @@ config_data_save_blessed_program (const char *program)
/**
* config_data_is_blessed_program:
* @program: a program name
- *
+ *
* Checks to see if a program is blessed
- *
+ *
* Return value: TRUE if program is blessed, FALSE otherwise
**/
gboolean
diff --git a/calendar/gui/alarm-notify/notify-main.c b/calendar/gui/alarm-notify/notify-main.c
index 3a87002c65..83c2421d38 100644
--- a/calendar/gui/alarm-notify/notify-main.c
+++ b/calendar/gui/alarm-notify/notify-main.c
@@ -78,7 +78,7 @@ save_session_cb (GnomeClient *client, GnomeSaveStyle save_style, gint shutdown,
args[1] = NULL;
gnome_client_set_restart_command (client, 1, args);
g_free (args[0]);
-
+
return TRUE;
}
@@ -157,7 +157,7 @@ main (int argc, char **argv)
init_session ();
/* FIXME Ideally we should not use camel libraries in calendar, though it is the case
- currently for attachments. Remove this once that is fixed.
+ currently for attachments. Remove this once that is fixed.
Initialise global camel_object_type */
camel_object_get_type();