aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-01-10 23:30:24 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-01-11 00:20:32 +0800
commitb1ed35f70d09601717e32eb5c762f79908b0bcf8 (patch)
treec4fa0b5f5d0dc7dd8cb1a2c3931fd25d97d08b41 /calendar
parent54442be416bcdb1c3632fb9211d335f9b5cb3397 (diff)
downloadgsoc2013-evolution-b1ed35f70d09601717e32eb5c762f79908b0bcf8.tar
gsoc2013-evolution-b1ed35f70d09601717e32eb5c762f79908b0bcf8.tar.gz
gsoc2013-evolution-b1ed35f70d09601717e32eb5c762f79908b0bcf8.tar.bz2
gsoc2013-evolution-b1ed35f70d09601717e32eb5c762f79908b0bcf8.tar.lz
gsoc2013-evolution-b1ed35f70d09601717e32eb5c762f79908b0bcf8.tar.xz
gsoc2013-evolution-b1ed35f70d09601717e32eb5c762f79908b0bcf8.tar.zst
gsoc2013-evolution-b1ed35f70d09601717e32eb5c762f79908b0bcf8.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/e-meeting-store.c53
-rw-r--r--calendar/gui/e-meeting-time-sel.c40
-rw-r--r--calendar/gui/e-meeting-utils.c13
3 files changed, 52 insertions, 54 deletions
diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c
index af15470938..88e4be47e1 100644
--- a/calendar/gui/e-meeting-store.c
+++ b/calendar/gui/e-meeting-store.c
@@ -1342,9 +1342,9 @@ static void
process_free_busy_comp_get_xfb (icalproperty *ip,
gchar **summary,
gchar **location)
-{
+{
const gchar *tmp = NULL;
-
+
g_return_if_fail (ip != NULL);
g_return_if_fail (summary != NULL && *summary == NULL);
g_return_if_fail (location != NULL && *location == NULL);
@@ -1354,13 +1354,15 @@ process_free_busy_comp_get_xfb (icalproperty *ip,
* it will be displayed as a tooltip for the busy period. Otherwise,
* nothing will happen (*summary and/or *location will be NULL)
*/
-
- tmp = icalproperty_get_parameter_as_string (ip, E_MEETING_FREE_BUSY_XPROP_SUMMARY);
- *summary = e_meeting_xfb_utf8_string_new_from_ical (tmp,
- E_MEETING_FREE_BUSY_XPROP_MAXLEN);
- tmp = icalproperty_get_parameter_as_string (ip, E_MEETING_FREE_BUSY_XPROP_LOCATION);
- *location = e_meeting_xfb_utf8_string_new_from_ical (tmp,
- E_MEETING_FREE_BUSY_XPROP_MAXLEN);
+
+ tmp = icalproperty_get_parameter_as_string (
+ ip, E_MEETING_FREE_BUSY_XPROP_SUMMARY);
+ *summary = e_meeting_xfb_utf8_string_new_from_ical (
+ tmp, E_MEETING_FREE_BUSY_XPROP_MAXLEN);
+ tmp = icalproperty_get_parameter_as_string (
+ ip, E_MEETING_FREE_BUSY_XPROP_LOCATION);
+ *location = e_meeting_xfb_utf8_string_new_from_ical (
+ tmp, E_MEETING_FREE_BUSY_XPROP_MAXLEN);
}
static void
@@ -1458,22 +1460,23 @@ process_free_busy_comp (EMeetingAttendee *attendee,
* for a reference.
*/
process_free_busy_comp_get_xfb (ip, &summary, &location);
-
- e_meeting_attendee_add_busy_period (attendee,
- fb.start.year,
- fb.start.month,
- fb.start.day,
- fb.start.hour,
- fb.start.minute,
- fb.end.year,
- fb.end.month,
- fb.end.day,
- fb.end.hour,
- fb.end.minute,
- busy_type,
- summary,
- location);
-
+
+ e_meeting_attendee_add_busy_period (
+ attendee,
+ fb.start.year,
+ fb.start.month,
+ fb.start.day,
+ fb.start.hour,
+ fb.start.minute,
+ fb.end.year,
+ fb.end.month,
+ fb.end.day,
+ fb.end.hour,
+ fb.end.minute,
+ busy_type,
+ summary,
+ location);
+
if (summary != NULL)
g_free (summary);
if (location != NULL)
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index 18944065e2..1e84747979 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -523,13 +523,12 @@ e_meeting_time_selector_construct (EMeetingTimeSelector *mts,
G_CALLBACK (e_meeting_time_selector_on_canvas_scroll_event), mts);
/* used for displaying extended free/busy (XFB) display when hovering
* over a busy period which carries XFB information */
- g_signal_connect (mts->display_main,
- "query-tooltip",
- G_CALLBACK (e_meeting_time_selector_on_canvas_query_tooltip),
- mts);
- g_object_set (G_OBJECT (mts->display_main),
- "has-tooltip", TRUE,
- NULL);
+ g_signal_connect (
+ mts->display_main, "query-tooltip",
+ G_CALLBACK (e_meeting_time_selector_on_canvas_query_tooltip),
+ mts);
+ g_object_set (
+ G_OBJECT (mts->display_main), "has-tooltip", TRUE, NULL);
scrollable = GTK_SCROLLABLE (mts->display_main);
@@ -2698,19 +2697,19 @@ e_meeting_time_selector_on_canvas_query_tooltip (GtkWidget *widget,
gint first_idx = 0;
gint ii = 0;
gchar *tt_text = NULL;
-
+
g_return_val_if_fail (GNOME_IS_CANVAS (widget), FALSE);
g_return_val_if_fail (GTK_IS_TOOLTIP (tooltip), FALSE);
g_return_val_if_fail (E_IS_MEETING_TIME_SELECTOR (user_data), FALSE);
mts = E_MEETING_TIME_SELECTOR (user_data);
-
+
scrollable = GTK_SCROLLABLE (widget);
adjustment = gtk_scrollable_get_hadjustment (scrollable);
scroll_x = (gint) gtk_adjustment_get_value (adjustment);
adjustment = gtk_scrollable_get_vadjustment (scrollable);
scroll_y = (gint) gtk_adjustment_get_value (adjustment);
-
+
/* calculate the attendee index (row) we're at */
row = (scroll_y + y) / mts->row_height;
@@ -2730,8 +2729,8 @@ e_meeting_time_selector_on_canvas_query_tooltip (GtkWidget *widget,
g_return_val_if_fail (periods->len > 0, FALSE);
/* no tooltip if no busy period reaches into the current canvas area */
- first_idx = e_meeting_attendee_find_first_busy_period (attendee,
- &(mts->first_date_shown));
+ first_idx = e_meeting_attendee_find_first_busy_period (
+ attendee, &(mts->first_date_shown));
if (first_idx < 0)
return FALSE;
@@ -2746,16 +2745,15 @@ e_meeting_time_selector_on_canvas_query_tooltip (GtkWidget *widget,
EMeetingFreeBusyPeriod *p = NULL;
gint sx = 0;
gint ex = 0;
-
- p = &(g_array_index (periods,
- EMeetingFreeBusyPeriod,
- ii));
+
+ p = &(g_array_index (
+ periods, EMeetingFreeBusyPeriod, ii));
/* meeting start time x position */
- sx = e_meeting_time_selector_calculate_time_position (mts,
- &(p->start));
+ sx = e_meeting_time_selector_calculate_time_position (
+ mts, &(p->start));
/* meeting end time x position */
- ex = e_meeting_time_selector_calculate_time_position (mts,
- &(p->end));
+ ex = e_meeting_time_selector_calculate_time_position (
+ mts, &(p->end));
if ((mouse_x >= sx) && (mouse_x <= ex)) {
/* found busy period the mouse tip is over */
period = p;
@@ -2794,7 +2792,7 @@ e_meeting_time_selector_on_canvas_query_tooltip (GtkWidget *widget,
/* set XFB information as tooltip text */
gtk_tooltip_set_text (tooltip, tt_text);
g_free (tt_text);
-
+
return TRUE;
}
diff --git a/calendar/gui/e-meeting-utils.c b/calendar/gui/e-meeting-utils.c
index 2bab129b1f..733052674c 100644
--- a/calendar/gui/e-meeting-utils.c
+++ b/calendar/gui/e-meeting-utils.c
@@ -105,7 +105,7 @@ e_meeting_xfb_data_clear (EMeetingXfbData *xfb)
* length of the resulting string, since it gets displayed as a
* tooltip text in the meeting time selector.
*/
-gchar*
+gchar *
e_meeting_xfb_utf8_string_new_from_ical (const gchar *icalstring,
gsize max_len)
{
@@ -132,11 +132,8 @@ e_meeting_xfb_utf8_string_new_from_ical (const gchar *icalstring,
/* no valid UTF-8, trying to convert to it
* according to system locale
*/
- tmp = g_locale_to_utf8 (icalstring,
- -1,
- &in_len,
- &out_len,
- &tmp_err);
+ tmp = g_locale_to_utf8 (
+ icalstring, -1, &in_len, &out_len, &tmp_err);
if (tmp_err == NULL)
goto valid;
@@ -148,8 +145,8 @@ e_meeting_xfb_utf8_string_new_from_ical (const gchar *icalstring,
/* still no success, forcing it into UTF-8, using
* replacement chars to replace invalid ones
*/
- tmp = e_util_utf8_data_make_valid (icalstring,
- strlen (icalstring));
+ tmp = e_util_utf8_data_make_valid (
+ icalstring, strlen (icalstring));
valid:
if (tmp == NULL)
tmp = g_strdup (icalstring);