Commit 6af0c53b authored by Matthew Barnes's avatar Matthew Barnes Committed by Rodrigo Moya

Coding style and whitespace cleanup.

parent 5c0b3169
......@@ -169,12 +169,14 @@ quick_add_merge_contact (QuickAdd *qa)
(GAsyncReadyCallback) merge_cb, qa);
}
/*
* Raise a contact editor with all fields editable, and hook up all signals accordingly.
*/
/* Raise a contact editor with all fields editable,
* and hook up all signals accordingly. */
static void
contact_added_cb (EContactEditor *ce, EBookStatus status, EContact *contact, gpointer closure)
contact_added_cb (EContactEditor *ce,
EBookStatus status,
EContact *contact,
gpointer closure)
{
QuickAdd *qa = (QuickAdd *) g_object_get_data (G_OBJECT (ce), "quick_add");
......@@ -228,11 +230,14 @@ ce_have_contact (EBook *book, const GError *error, EContact *contact, gpointer c
"changed", contact != NULL,
NULL);
/* We pass this via object data, so that we don't get a dangling pointer referenced if both
the "contact_added" and "editor_closed" get emitted. (Which, based on a backtrace in bugzilla,
I think can happen and cause a crash. */
g_object_set_data_full (G_OBJECT (contact_editor), "quick_add", qa,
(GDestroyNotify) quick_add_unref);
/* We pass this via object data, so that we don't get a
* dangling pointer referenced if both the "contact_added"
* and "editor_closed" get emitted. (Which, based on a
* backtrace in bugzilla, I think can happen and cause a
* crash. */
g_object_set_data_full (
G_OBJECT (contact_editor), "quick_add", qa,
(GDestroyNotify) quick_add_unref);
g_signal_connect (contact_editor,
"contact_added",
......@@ -294,7 +299,8 @@ clicked_cb (GtkWidget *w, gint button, gpointer closure)
QuickAdd *qa = (QuickAdd *) closure;
/* Get data out of entries. */
if (!qa->vcard && (button == GTK_RESPONSE_OK || button == QUICK_ADD_RESPONSE_EDIT_FULL)) {
if (!qa->vcard && (button == GTK_RESPONSE_OK ||
button == QUICK_ADD_RESPONSE_EDIT_FULL)) {
gchar *name = NULL;
gchar *email = NULL;
......@@ -498,7 +504,8 @@ e_contact_quick_add (const gchar *in_name, const gchar *email,
/* Remove extra whitespace and the quotes some mailers put around names. */
g_strstrip (name);
len = strlen (name);
if ((name[0] == '\'' && name[len-1] == '\'') || (name[0] == '"' && name[len-1] == '"')) {
if ((name[0] == '\'' && name[len-1] == '\'') ||
(name[0] == '"' && name[len-1] == '"')) {
name[0] = ' ';
name[len-1] = ' ';
}
......@@ -520,7 +527,9 @@ e_contact_quick_add (const gchar *in_name, const gchar *email,
}
void
e_contact_quick_add_free_form (const gchar *text, EContactQuickAddCallback cb, gpointer closure)
e_contact_quick_add_free_form (const gchar *text,
EContactQuickAddCallback cb,
gpointer closure)
{
gchar *name=NULL, *email=NULL;
const gchar *last_at, *s;
......@@ -595,7 +604,9 @@ e_contact_quick_add_free_form (const gchar *text, EContactQuickAddCallback cb, g
}
void
e_contact_quick_add_email (const gchar *email, EContactQuickAddCallback cb, gpointer closure)
e_contact_quick_add_email (const gchar *email,
EContactQuickAddCallback cb,
gpointer closure)
{
gchar *name = NULL;
gchar *addr = NULL;
......@@ -622,7 +633,9 @@ e_contact_quick_add_email (const gchar *email, EContactQuickAddCallback cb, gpoi
}
void
e_contact_quick_add_vcard (const gchar *vcard, EContactQuickAddCallback cb, gpointer closure)
e_contact_quick_add_vcard (const gchar *vcard,
EContactQuickAddCallback cb,
gpointer closure)
{
QuickAdd *qa;
GtkWidget *dialog;
......
......@@ -197,11 +197,19 @@ addressbook_create_cmp_cache (EReflowModel *erm)
cmp_cache = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, g_free);
for (ii = 0; ii < count; ii++) {
EContact *contact = (EContact*) e_addressbook_model_contact_at (priv->model, ii);
if (contact) {
const gchar *file_as = e_contact_get_const (contact, E_CONTACT_FILE_AS);
if (file_as)
g_hash_table_insert (cmp_cache, GINT_TO_POINTER (ii), g_utf8_collate_key (file_as, -1));
EContact *contact;
contact = (EContact *)
e_addressbook_model_contact_at (priv->model, ii);
if (contact != NULL) {
const gchar *file_as;
file_as = e_contact_get_const (
contact, E_CONTACT_FILE_AS);
if (file_as != NULL)
g_hash_table_insert (
cmp_cache, GINT_TO_POINTER (ii),
g_utf8_collate_key (file_as, -1));
}
}
......
......@@ -1471,14 +1471,15 @@ e_addressbook_view_view (EAddressbookView *view)
/* XXX Use e_alert_new(). */
/* XXX Provide a parent window. */
dialog = gtk_message_dialog_new (
NULL, 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE,
ngettext (
/* Translators: This is shown for more than 5 contacts. */
"Opening %d contacts will open %d new windows as well.\nDo you really want to display all of these contacts?",
"Opening %d contacts will open %d new windows as well.\nDo you really want to display all of these contacts?",
length
),
length, length);
NULL, 0,
GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, ngettext (
/* Translators: This is shown for > 5 contacts. */
"Opening %d contacts will open %d new windows "
"as well.\nDo you really want to display all of "
"these contacts?",
"Opening %d contacts will open %d new windows "
"as well.\nDo you really want to display all of "
"these contacts?", length), length, length);
gtk_dialog_add_buttons (
GTK_DIALOG (dialog),
_("_Don't Display"), GTK_RESPONSE_NO,
......
......@@ -123,19 +123,32 @@ typedef struct {
static gpointer midnight_refresh_id = NULL;
static time_t midnight = 0;
static void
remove_client_alarms (ClientAlarms *ca);
static void display_notification (time_t trigger, CompQueuedAlarms *cqa,
gpointer alarm_id, gboolean use_description);
static void audio_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id);
static void mail_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id);
static void procedure_notification (time_t trigger, CompQueuedAlarms *cqa, gpointer alarm_id);
static void remove_client_alarms (ClientAlarms *ca);
static void display_notification (time_t trigger,
CompQueuedAlarms *cqa,
gpointer alarm_id,
gboolean use_description);
static void audio_notification (time_t trigger,
CompQueuedAlarms *cqa,
gpointer alarm_id);
static void mail_notification (time_t trigger,
CompQueuedAlarms *cqa,
gpointer alarm_id);
static void procedure_notification (time_t trigger,
CompQueuedAlarms *cqa,
gpointer alarm_id);
#ifdef HAVE_LIBNOTIFY
static void popup_notification (time_t trigger, CompQueuedAlarms *cqa,
gpointer alarm_id, gboolean use_description);
static void popup_notification (time_t trigger,
CompQueuedAlarms *cqa,
gpointer alarm_id,
gboolean use_description);
#endif
static void query_objects_changed_cb (ECal *client, GList *objects, gpointer data);
static void query_objects_removed_cb (ECal *client, GList *objects, gpointer data);
static void query_objects_changed_cb (ECal *client,
GList *objects,
gpointer data);
static void query_objects_removed_cb (ECal *client,
GList *objects,
gpointer data);
static void update_cqa (CompQueuedAlarms *cqa, ECalComponent *comp);
static void update_qa (ECalComponentAlarms *alarms, QueuedAlarm *qa);
......@@ -196,7 +209,9 @@ e_ctime (const time_t *timep)
ret = buffer[next++] = g_strdup (ctime (timep));
if (buffer[next - 1] && *buffer[next - 1]) {
gint len = strlen (buffer[next - 1]);
while (len > 0 && (buffer[next - 1][len - 1] == '\n' || buffer[next - 1][len - 1] == '\r' || g_ascii_isspace (buffer[next - 1][len - 1])))
while (len > 0 && (buffer[next - 1][len - 1] == '\n' ||
buffer[next - 1][len - 1] == '\r' ||
g_ascii_isspace (buffer[next - 1][len - 1])))
len--;
buffer[next - 1][len - 1] = 0;
......@@ -485,20 +500,16 @@ add_component_alarms (ClientAlarms *ca, ECalComponentAlarms *alarms)
ECalComponentAlarmInstance *instance;
gpointer alarm_id;
QueuedAlarm *qa;
time_t tnow = time (NULL);
instance = l->data;
if (!has_known_notification (cqa->alarms->comp, instance->auid)) {
g_debug ("Could not recognize alarm's notification type, discarding.");
if (!has_known_notification (cqa->alarms->comp, instance->auid))
continue;
}
alarm_id = alarm_add (instance->trigger, alarm_trigger_cb, cqa, NULL);
if (!alarm_id) {
debug (("Could not schedule a trigger for %s. Discarding", e_ctime (&(instance->trigger))));
alarm_id = alarm_add (
instance->trigger, alarm_trigger_cb, cqa, NULL);
if (!alarm_id)
continue;
}
qa = g_new (QueuedAlarm, 1);
qa->alarm_id = alarm_id;
......@@ -507,7 +518,6 @@ add_component_alarms (ClientAlarms *ca, ECalComponentAlarms *alarms)
qa->snooze = FALSE;
cqa->queued_alarms = g_slist_prepend (cqa->queued_alarms, qa);
debug (("Adding alarm %p %p at %s %s", qa, alarm_id, e_ctime (&(instance->trigger)), e_ctime (&tnow)));
}
id = e_cal_component_get_id (alarms->comp);
......@@ -545,15 +555,17 @@ load_alarms (ClientAlarms *ca, time_t start, time_t end)
return;
}
str_query = g_strdup_printf ("(has-alarms-in-range? (make-time \"%s\") (make-time \"%s\"))",
iso_start, iso_end);
str_query = g_strdup_printf (
"(has-alarms-in-range? (make-time \"%s\") "
"(make-time \"%s\"))", iso_start, iso_end);
g_free (iso_start);
g_free (iso_end);
/* create the live query */
if (ca->query) {
debug (("Disconnecting old queries"));
g_signal_handlers_disconnect_matched (ca->query, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, ca);
g_signal_handlers_disconnect_matched (
ca->query, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, ca);
g_object_unref (ca->query);
ca->query = NULL;
}
......@@ -564,12 +576,15 @@ load_alarms (ClientAlarms *ca, time_t start, time_t end)
} else {
debug (("Setting Call backs"));
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",
G_CALLBACK (query_objects_changed_cb), ca);
g_signal_connect (G_OBJECT (ca->query), "objects_removed",
G_CALLBACK (query_objects_removed_cb), ca);
g_signal_connect (
ca->query, "objects_added",
G_CALLBACK (query_objects_changed_cb), ca);
g_signal_connect (
ca->query, "objects_modified",
G_CALLBACK (query_objects_changed_cb), ca);
g_signal_connect (
ca->query, "objects_removed",
G_CALLBACK (query_objects_removed_cb), ca);
e_cal_view_start (ca->query);
}
......@@ -610,7 +625,6 @@ cal_opened_cb (ECal *client, const GError *error, gpointer data)
ca = data;
debug (("Opened Calendar %p (Status %d%s%s%s)", client, error ? error->code : 0, error ? " (" : "", error ? error->message : "", error ? ")" : ""));
if (error)
return;
......@@ -767,7 +781,8 @@ query_objects_changed_async (struct _query_msg *msg)
}
debug (("Alarm Already Exist for %s", id->uid));
/* if the alarms or the alarms list is empty remove it after updating the cqa structure */
/* 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 */
......@@ -1075,7 +1090,8 @@ tray_list_remove_cqa_async (struct _tray_cqa_msg *msg)
debug (("Found"));
tray_icons_list = g_list_delete_link (tray_icons_list, tmp);
if (alarm_notifications_dialog) {
model = gtk_tree_view_get_model (GTK_TREE_VIEW (alarm_notifications_dialog->treeview));
model = gtk_tree_view_get_model (
GTK_TREE_VIEW (alarm_notifications_dialog->treeview));
gtk_list_store_remove (GTK_LIST_STORE (model), &(tray_data->iter));
}
free_tray_icon_data (tray_data);
......@@ -1091,11 +1107,14 @@ tray_list_remove_cqa_async (struct _tray_cqa_msg *msg)
alarm_notifications_dialog = NULL;
} else {
GtkTreeIter iter;
GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (alarm_notifications_dialog->treeview));
GtkTreeModel *model;
GtkTreeSelection *sel;
model = gtk_tree_view_get_model (
GTK_TREE_VIEW (alarm_notifications_dialog->treeview));
gtk_tree_model_get_iter_first (model, &iter);
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (alarm_notifications_dialog->treeview));
sel = gtk_tree_view_get_selection (
GTK_TREE_VIEW (alarm_notifications_dialog->treeview));
gtk_tree_selection_select_iter (sel, &iter);
}
}
......@@ -1133,7 +1152,9 @@ tray_list_remove_async (Message *msg)
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) {
g_hash_table_remove (tray_data->cqa->parent_client->uid_alarms_hash, tray_data->cqa->id);
g_hash_table_remove (
tray_data->cqa->parent_client->uid_alarms_hash,
tray_data->cqa->id);
e_cal_component_free_id (tray_data->cqa->id);
g_free (tray_data->cqa);
}
......@@ -1241,7 +1262,10 @@ notify_dialog_cb (AlarmNotifyResult result, gint snooze_mins, gpointer data)
case ALARM_NOTIFY_DISMISS:
if (alarm_notifications_dialog) {
GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (alarm_notifications_dialog->treeview));
GtkTreeModel *model;
model = gtk_tree_view_get_model (
GTK_TREE_VIEW (alarm_notifications_dialog->treeview));
gtk_list_store_remove (GTK_LIST_STORE (model), &tray_data->iter);
}
break;
......@@ -1520,7 +1544,10 @@ display_notification (time_t trigger, CompQueuedAlarms *cqa,
if (g_list_length (tray_icons_list) > 1) {
gchar *tip;
tip = g_strdup_printf (ngettext ("You have %d alarm", "You have %d alarms", g_list_length (tray_icons_list)), g_list_length (tray_icons_list));
tip = g_strdup_printf (ngettext (
"You have %d alarm", "You have %d alarms",
g_list_length (tray_icons_list)),
g_list_length (tray_icons_list));
gtk_status_icon_set_tooltip_text (tray_icon, tip);
}
else {
......@@ -1599,15 +1626,23 @@ popup_notification (time_t trigger, CompQueuedAlarms *cqa,
if (organiser.cn) {
if (location)
body = g_strdup_printf ("<b>%s</b>\n%s %s\n%s %s", organiser.cn, _("Location:"), location, start_str, time_str);
body = g_strdup_printf (
"<b>%s</b>\n%s %s\n%s %s",
organiser.cn, _("Location:"),
location, start_str, time_str);
else
body = g_strdup_printf ("<b>%s</b>\n%s %s", organiser.cn, start_str, time_str);
body = g_strdup_printf (
"<b>%s</b>\n%s %s",
organiser.cn, start_str, time_str);
}
else {
if (location)
body = g_strdup_printf ("%s %s\n%s %s", _("Location:"), location, start_str, time_str);
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);
}
#ifdef HAVE_LIBNOTIFY_07
......@@ -1759,7 +1794,8 @@ procedure_notification_dialog (const gchar *cmd, const gchar *url)
/* Run the dialog */
btn = gtk_dialog_run (GTK_DIALOG (dialog));
if (btn == GTK_RESPONSE_OK && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox)))
if (btn == GTK_RESPONSE_OK &&
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox)))
config_data_save_blessed_program (url);
gtk_widget_destroy (dialog);
......@@ -1937,7 +1973,8 @@ alarm_queue_done (void)
debug (("..."));
g_hash_table_foreach_remove (client_alarms_hash, (GHRFunc) free_client_alarms_cb, NULL);
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;
......@@ -2007,7 +2044,8 @@ alarm_queue_add_async (struct _alarm_client_msg *msg)
g_hash_table_insert (client_alarms_hash, client, ca);
ca->uid_alarms_hash = g_hash_table_new ((GHashFunc) hash_ids, (GEqualFunc) compare_ids);
ca->uid_alarms_hash = g_hash_table_new (
(GHashFunc) hash_ids, (GEqualFunc) compare_ids);
if (e_cal_get_load_state (client) == E_CAL_LOAD_LOADED) {
load_alarms_for_today (ca);
......@@ -2160,8 +2198,8 @@ alarm_queue_remove_client (ECal *client, gboolean immediately)
message_push ((Message *) msg);
}
/* Update non-time related variables for various structures on modification of an existing component
to be called only from query_objects_changed_cb */
/* 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
update_cqa (CompQueuedAlarms *cqa, ECalComponent *newcomp)
{
......@@ -2221,9 +2259,13 @@ update_qa (ECalComponentAlarms *alarms, QueuedAlarm *qa)
GSList *instance_list;
debug (("..."));
for (instance_list = alarms->alarms; instance_list; instance_list = instance_list->next) {
for (instance_list = alarms->alarms;
instance_list;
instance_list = instance_list->next) {
al_inst = instance_list->data;
if (al_inst->trigger == qa->orig_trigger) { /* FIXME if two or more alarm instances (audio, note) for same component have same trigger */
/* FIXME If two or more alarm instances (audio, note)
* for same component have same trigger... */
if (al_inst->trigger == qa->orig_trigger) {
g_free ((gchar *) qa->instance->auid);
qa->instance->auid = g_strdup (al_inst->auid);
break;
......
......@@ -402,8 +402,8 @@ config_data_init_debugging (void)
}
/* returns whether started debugging;
call config_data_stop_debugging() when started and you are done with it
*/
* call config_data_stop_debugging() when started and you are done with it
*/
gboolean
config_data_start_debugging (void)
{
......
......@@ -51,7 +51,7 @@ void config_data_stop_debugging (void);
#define debug(x) G_STMT_START { \
if (config_data_start_debugging ()) { \
g_print ("%s (%s): ", G_STRFUNC, G_STRLOC); \
g_print x ; \
g_print x; \
g_print ("\n"); \
\
config_data_stop_debugging (); \
......
......@@ -43,7 +43,6 @@ component_has_new_attendees (ECalComponent *comp)
return g_object_get_data (G_OBJECT (comp), "new-attendees") != NULL;
}
static gboolean
component_has_recipients (ECalComponent *comp)
{
......
......@@ -65,11 +65,14 @@ struct _ECalConfigTargetPrefs {
typedef struct _EConfigItem ECalConfigItem;
GType e_cal_config_get_type (void);
ECalConfig *e_cal_config_new (gint type, const gchar *menuid);
ECalConfigTargetSource *e_cal_config_target_new_source (ECalConfig *ecp, struct _ESource *source);
ECalConfigTargetPrefs *e_cal_config_target_new_prefs (ECalConfig *ecp);
GType e_cal_config_get_type (void);
ECalConfig * e_cal_config_new (gint type,
const gchar *menuid);
ECalConfigTargetSource *
e_cal_config_target_new_source (ECalConfig *ecp,
ESource *source);
ECalConfigTargetPrefs *
e_cal_config_target_new_prefs (ECalConfig *ecp);
G_END_DECLS
......
......@@ -31,9 +31,11 @@
* one-column list store? There's no mention of why this was done. */
#define G_LIST(x) ((GList *) x)
#define E_DATE_TIME_LIST_IS_SORTED(list) (E_DATE_TIME_LIST (list)->sort_column_id != -2)
#define IS_VALID_ITER(dt_list, iter) (iter!= NULL && iter->user_data != NULL && \
dt_list->stamp == iter->stamp)
#define E_DATE_TIME_LIST_IS_SORTED(list) \
(E_DATE_TIME_LIST (list)->sort_column_id != -2)
#define IS_VALID_ITER(dt_list, iter) \
(iter != NULL && iter->user_data != NULL && \
dt_list->stamp == iter->stamp)
enum {
PROP_0,
......@@ -74,7 +76,8 @@ copy_datetime (const ECalComponentDateTime *datetime)
}
static gint
compare_datetime (const ECalComponentDateTime *datetime1, const ECalComponentDateTime *datetime2)
compare_datetime (const ECalComponentDateTime *datetime1,
const ECalComponentDateTime *datetime2)
{
return icaltime_compare (*datetime1->value, *datetime2->value);
}
......@@ -494,7 +497,9 @@ e_date_time_list_set_date_time (EDateTimeList *date_time_list, GtkTreeIter *iter
datetime_old = G_LIST (iter->user_data)->data;
free_datetime (datetime_old);
G_LIST (iter->user_data)->data = copy_datetime (datetime);
row_updated (date_time_list, g_list_position (date_time_list->list, G_LIST (iter->user_data)));
row_updated (
date_time_list, g_list_position (
date_time_list->list, G_LIST (iter->user_data)));
}
gboolean
......@@ -522,8 +527,11 @@ e_date_time_list_append (EDateTimeList *date_time_list, GtkTreeIter *iter,
{
g_return_if_fail (datetime != NULL);
if (g_list_find_custom (date_time_list->list, datetime, (GCompareFunc)compare_datetime) == NULL) {
date_time_list->list = g_list_append (date_time_list->list, copy_datetime (datetime));
if (g_list_find_custom (
date_time_list->list, datetime,
(GCompareFunc)compare_datetime) == NULL) {
date_time_list->list = g_list_append (
date_time_list->list, copy_datetime (datetime));
row_added (date_time_list, g_list_length (date_time_list->list) - 1);
}
......@@ -542,7 +550,8 @@ e_date_time_list_remove (EDateTimeList *date_time_list, GtkTreeIter *iter)
n = g_list_position (date_time_list->list, G_LIST (iter->user_data));
free_datetime ((ECalComponentDateTime *) G_LIST (iter->user_data)->data);
date_time_list->list = g_list_delete_link (date_time_list->list, G_LIST (iter->user_data));
date_time_list->list = g_list_delete_link (
date_time_list->list, G_LIST (iter->user_data));
row_deleted (date_time_list, n);
}
......
......@@ -274,14 +274,14 @@ e_day_view_time_item_update (GnomeCanvasItem *item,
* DRAWING ROUTINES - functions to paint the canvas item.
*/
static void
edvti_draw_zone (GnomeCanvasItem *canvas_item,
cairo_t *cr,
gint x,
gint y,
gint width,
gint height,
gint x_offset,
icaltimezone *use_zone)
edvti_draw_zone (GnomeCanvasItem *canvas_item,
cairo_t *cr,
gint x,
gint y,
gint width,
gint height,
gint x_offset,
icaltimezone *use_zone)
{
EDayView *day_view;
EDayViewTimeItem *time_item;
......@@ -604,11 +604,11 @@ edvti_draw_zone (GnomeCanvasItem *canvas_item,
static void
e_day_view_time_item_draw (GnomeCanvasItem *canvas_item,
cairo_t *cr,
gint x,
gint y,
gint width,
gint height)
cairo_t *cr,
gint x,
gint y,
gint width,
gint height)
{
EDayViewTimeItem *time_item;
......
......@@ -4627,7 +4627,7 @@ e_day_view_check_layout (EDayView *day_view)
|| day_view->long_events_need_reshape)
e_day_view_reshape_long_events (day_view);
if (day_view->long_events_need_layout
if (day_view->long_events_need_layout
&& day_view->rows_in_top_display != rows_in_top_display) {
day_view->rows_in_top_display = rows_in_top_display;
e_day_view_update_top_scroll (day_view, FALSE);
......
......@@ -826,7 +826,8 @@ e_meeting_store_init (EMeetingStore *store)
store->priv->attendees = g_ptr_array_new ();
store->priv->refresh_queue = g_ptr_array_new ();
store->priv->refresh_data = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
store->priv->refresh_data = g_hash_table_new_full (
g_str_hash, g_str_equal, g_free, NULL);
store->priv->mutex = g_mutex_new ();
......@@ -1708,7 +1709,11 @@ async_read (GObject *source_object, GAsyncResult *res, gpointer data)
}
static void
soup_authenticate (SoupSession *session, SoupMessage *msg, SoupAuth *auth, gboolean retrying, gpointer data)
soup_authenticate (SoupSession *session,
SoupMessage *msg,
SoupAuth *auth,
gboolean retrying,
gpointer data)
{
SoupURI *suri;
const gchar *orig_uri;
......@@ -1757,7 +1762,10 @@ soup_authenticate (SoupSession *session, SoupMessage *msg, SoupAuth *auth, gbool
description = g_string_new ("");
g_string_append_printf (description, _("Enter password to access free/busy information on server %s as user %s"), bold_host, bold_user);
g_string_append_printf (
description, _("Enter password to access "
"free/busy information on server %s as user %s"),
bold_host, bold_user);
g_free (bold_host);
g_free (bold_user);
......@@ -1767,9 +1775,12 @@ soup_authenticate (SoupSession *session, SoupMessage *msg, SoupAuth *auth, gbool
g_string_append_printf (description, _("Failure reason: %s"), msg->reason_phrase);
}
password = e_passwords_ask_password (_("Enter password"), "Calendar", orig_uri, description->str,
E_PASSWORDS_REMEMBER_FOREVER | E_PASSWORDS_SECRET | E_PASSWORDS_ONLINE | (retrying ? E_PASSWORDS_REPROMPT : 0),
&remember, NULL);
password = e_passwords_ask_password (
_("Enter password"), "Calendar", orig_uri,
description->str, E_PASSWORDS_REMEMBER_FOREVER |
E_PASSWORDS_SECRET | E_PASSWORDS_ONLINE |
(retrying ? E_PASSWORDS_REPROMPT : 0),
&remember, NULL);
g_string_free (description, TRUE);
......@@ -1822,12 +1833,17 @@ soup_msg_ready_cb (SoupSession *session, SoupMessage *msg, gpointer user_data)
g_return_if_fail (qdata != NULL);
if (SOUP_STATUS_IS_SUCCESSFUL (msg->status_code)) {
qdata->string = g_string_new_len (msg->response_body->data, msg->response_body->length);
qdata->string = g_string_new_len (
msg->response_body->data,
msg->response_body->length);
process_free_busy (qdata, qdata->string->str);
} else {
g_warning ("Unable to access free/busy url: %s",
msg->reason_phrase && *msg->reason_phrase ? msg->reason_phrase :
(soup_status_get_phrase (msg->status_code) ? soup_status_get_phrase (msg->status_code) : "Unknown error"));
g_warning (
"Unable to access free/busy url: %s",
msg->reason_phrase && *msg->reason_phrase ?
msg->reason_phrase : (soup_status_get_phrase (
msg->status_code) ? soup_status_get_phrase (
msg->status_code) : "Unknown error"));
process_callbacks (qdata);
}
}
......@@ -1867,7 +1883,9 @@ download_with_libsoup (const gchar *uri, EMeetingStoreQueueData *qdata)
g_object_unref (proxy);
soup_message_set_flags (msg, SOUP_MESSAGE_NO_REDIRECT);
soup_message_add_header_handler (msg, "got_body", "Location", G_CALLBACK (redirect_handler), session);
soup_message_add_header_handler (
msg, "got_body", "Location",
G_CALLBACK (redirect_handler), session);
soup_message_headers_append (msg->request_headers, "Connection", "close");
soup_session_queue_message (session, msg, soup_msg_ready_cb, qdata);
}
......
......@@ -87,7 +87,9 @@ itip_organizer_is_user_ex (ECalComponent *comp, ECal *client, gboolean skip_cap_
const gchar *strip;
gboolean user_org = FALSE;
if (!e_cal_component_has_organizer (comp) || (!skip_cap_test && e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_NO_ORGANIZER)))
if (!e_cal_component_has_organizer (comp) ||
(!skip_cap_test && e_cal_get_static_capability (
client, CAL_STATIC_CAPABILITY_NO_ORGANIZER)))
return FALSE;
e_cal_component_get_organizer (comp, &organizer);
......@@ -95,10 +97,12 @@ itip_organizer_is_user_ex (ECalComponent *comp, ECal *client, gboolean skip_cap_
strip = itip_strip_mailto (organizer.value);
if (e_cal_get_static_capability (client, CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS)) {
if (e_cal_get_static_capability (
client, CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS)) {