aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-11-08 10:13:03 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2010-11-10 06:33:23 +0800
commit7e9fc6d2b61287deaac0fa17e4dc19164c9ad51f (patch)
tree7051840d082b6f478c86efe8c350c53754152eb0 /calendar
parente216530dcdc494950afb6355723a6104ab1f25ea (diff)
downloadgsoc2013-evolution-7e9fc6d2b61287deaac0fa17e4dc19164c9ad51f.tar
gsoc2013-evolution-7e9fc6d2b61287deaac0fa17e4dc19164c9ad51f.tar.gz
gsoc2013-evolution-7e9fc6d2b61287deaac0fa17e4dc19164c9ad51f.tar.bz2
gsoc2013-evolution-7e9fc6d2b61287deaac0fa17e4dc19164c9ad51f.tar.lz
gsoc2013-evolution-7e9fc6d2b61287deaac0fa17e4dc19164c9ad51f.tar.xz
gsoc2013-evolution-7e9fc6d2b61287deaac0fa17e4dc19164c9ad51f.tar.zst
gsoc2013-evolution-7e9fc6d2b61287deaac0fa17e4dc19164c9ad51f.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/e-alarm-list.c2
-rw-r--r--calendar/gui/e-day-view-top-item.c8
-rw-r--r--calendar/gui/e-meeting-time-sel-item.c4
-rw-r--r--calendar/gui/e-week-view-event-item.c14
-rw-r--r--calendar/gui/print.c22
5 files changed, 24 insertions, 26 deletions
diff --git a/calendar/gui/e-alarm-list.c b/calendar/gui/e-alarm-list.c
index 48b55bbc02..c7f7ff9691 100644
--- a/calendar/gui/e-alarm-list.c
+++ b/calendar/gui/e-alarm-list.c
@@ -556,7 +556,7 @@ e_alarm_list_get_value (GtkTreeModel *tree_model,
EAlarmList *alarm_list = E_ALARM_LIST (tree_model);
ECalComponentAlarm *alarm;
GList *l;
- gchar *str;
+ gchar *str;
g_return_if_fail (E_IS_ALARM_LIST (tree_model));
g_return_if_fail (column < E_ALARM_LIST_NUM_COLUMNS);
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c
index c58f057903..e517e75781 100644
--- a/calendar/gui/e-day-view-top-item.c
+++ b/calendar/gui/e-day-view-top-item.c
@@ -360,7 +360,7 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
cairo_rectangle (cr,
item_x - x, item_y - y,
- item_w - E_DAY_VIEW_LONG_EVENT_BORDER_WIDTH, item_h);
+ item_w - E_DAY_VIEW_LONG_EVENT_BORDER_WIDTH, item_h);
cairo_clip (cr);
time_x = item_x + E_DAY_VIEW_LONG_EVENT_X_PAD - x;
@@ -368,7 +368,7 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
time_x += day_view->digit_width;
layout = gtk_widget_create_pango_layout (GTK_WIDGET (day_view), buffer);
- cairo_move_to (cr,
+ cairo_move_to (cr,
time_x,
item_y + E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT +
E_DAY_VIEW_LONG_EVENT_Y_PAD - y);
@@ -413,7 +413,7 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
time_x += day_view->digit_width;
layout = gtk_widget_create_pango_layout (GTK_WIDGET (day_view), buffer);
- cairo_move_to (cr,
+ cairo_move_to (cr,
time_x,
item_y + E_DAY_VIEW_LONG_EVENT_Y_PAD + 1 - y);
pango_cairo_show_layout (cr, layout);
@@ -486,7 +486,7 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item,
if (icon_x <= max_icon_x) {
gdk_cairo_set_source_pixbuf (cr, pixbuf,
icon_x, icon_y);
- cairo_rectangle (cr,
+ cairo_rectangle (cr,
icon_x, icon_y,
E_DAY_VIEW_ICON_WIDTH,
E_DAY_VIEW_ICON_HEIGHT);
diff --git a/calendar/gui/e-meeting-time-sel-item.c b/calendar/gui/e-meeting-time-sel-item.c
index b04591220a..7a50f13a1d 100644
--- a/calendar/gui/e-meeting-time-sel-item.c
+++ b/calendar/gui/e-meeting-time-sel-item.c
@@ -201,7 +201,7 @@ e_meeting_time_selector_item_update (GnomeCanvasItem *item, const cairo_matrix_t
static void
draw_strikeout_box (EMeetingTimeSelectorItem *mts_item, cairo_t *cr,
- int x, int y, int width, int height)
+ gint x, gint y, gint width, gint height)
{
GnomeCanvas *canvas = GNOME_CANVAS_ITEM (mts_item)->canvas;
EMeetingTimeSelector *mts = mts_item->mts;
@@ -291,7 +291,7 @@ e_meeting_time_selector_item_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
if (e_meeting_attendee_get_has_calendar_info (ia)) {
if (e_meeting_time_selector_item_calculate_busy_range (mts, row, x, width, &start_x, &end_x)) {
if (start_x >= width || end_x <= 0) {
- draw_strikeout_box (mts_item, cr, 0, row_y, width, mts->row_height);
+ draw_strikeout_box (mts_item, cr, 0, row_y, width, mts->row_height);
} else {
if (start_x >= 0) {
draw_strikeout_box (mts_item, cr, 0, row_y, start_x, mts->row_height);
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index 569449fe34..8a525ebfd6 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -329,13 +329,13 @@ week_view_draw_time (EWeekView *week_view,
/* Draw the hour. */
if (hour_to_display < 10) {
pango_layout_set_text (layout, buffer + 1, 1);
- cairo_move_to (cr,
+ cairo_move_to (cr,
time_x + week_view->digit_width,
time_y_normal_font);
pango_cairo_show_layout (cr, layout);
} else {
pango_layout_set_text (layout, buffer, 2);
- cairo_move_to (cr,
+ cairo_move_to (cr,
time_x,
time_y_normal_font);
pango_cairo_show_layout (cr, layout);
@@ -346,7 +346,7 @@ week_view_draw_time (EWeekView *week_view,
/* Draw the start minute, in the small font. */
pango_layout_set_font_description (layout, week_view->small_font_desc);
pango_layout_set_text (layout, buffer + 3, 2);
- cairo_move_to (cr,
+ cairo_move_to (cr,
time_x,
time_y_small_font);
pango_cairo_show_layout (cr, layout);
@@ -359,7 +359,7 @@ week_view_draw_time (EWeekView *week_view,
if (!e_cal_model_get_use_24_hour_format (model)) {
pango_layout_set_text (layout, suffix, -1);
- cairo_move_to (cr,
+ cairo_move_to (cr,
time_x,
time_y_normal_font);
pango_cairo_show_layout (cr, layout);
@@ -1051,9 +1051,9 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item,
cairo_rectangle (cr,
x1, y1,
- x2 - x1 - E_WEEK_VIEW_EVENT_R_PAD
- - E_WEEK_VIEW_EVENT_BORDER_WIDTH + 1,
- y2 - y1 + 1);
+ x2 - x1 - E_WEEK_VIEW_EVENT_R_PAD
+ - E_WEEK_VIEW_EVENT_BORDER_WIDTH + 1,
+ y2 - y1 + 1);
cairo_clip (cr);
week_view_draw_time (
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index 7378ca719f..051dbc7cce 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -91,8 +91,8 @@ evo_calendar_print_renderer_get_width (GtkPrintContext *context,
static gdouble
evo_calendar_print_renderer_get_height (GtkPrintContext *context,
- PangoFontDescription *font,
- const gchar *text)
+ PangoFontDescription *font,
+ const gchar *text)
{
PangoLayout *layout;
gint layout_width, layout_height;
@@ -2291,7 +2291,7 @@ print_work_week_background (GtkPrintContext *context, GnomeCalendar *gcal,
gdouble font_size, max_font_size, hour_font_size, minute_font_size;
gchar buf[20];
const gchar *minute;
- const int LONG_EVENT_OFFSET = 6;
+ const gint LONG_EVENT_OFFSET = 6;
gboolean use_24_hour;
gint i, hour, row;
gdouble hour_minute_xl, hour_minute_xr;
@@ -2322,7 +2322,6 @@ print_work_week_background (GtkPrintContext *context, GnomeCalendar *gcal,
cairo_line_to (cr, right - width, top);
cairo_stroke (cr);
-
/* Calculate the row height. */
if (top > bottom)
yinc = (top - bottom) / (pdi->end_hour - pdi->start_hour);
@@ -2382,7 +2381,6 @@ print_work_week_background (GtkPrintContext *context, GnomeCalendar *gcal,
hour_minute_xr, right - 3,
y - yinc, y - yinc + minute_font_size);
-
/* Draw the horizontal line between hours, across the entire
width of the day view. */
cr = gtk_print_context_get_cairo_context (context);
@@ -2397,12 +2395,12 @@ print_work_week_background (GtkPrintContext *context, GnomeCalendar *gcal,
cairo_line_to (cr, right, y - yinc / 2);
cairo_set_line_width (cr, 1);
cairo_stroke (cr);
- row ++;
+ row++;
}
/* Draw the vertical lines for the days */
day_width = (right - left - 2*width) / pdi->days_shown;
- for(i = 0; i < pdi->days_shown - 1; ++i){
+ for (i = 0; i < pdi->days_shown - 1; ++i) {
cr = gtk_print_context_get_cairo_context (context);
cairo_move_to (cr, left + width + day_width * (i + 1), top);
cairo_line_to (cr, left + width + day_width * (i + 1), bottom);
@@ -2579,7 +2577,7 @@ print_work_week_day_details (GtkPrintContext *context, GnomeCalendar *gcal,
max_font_size = ((top - bottom) / pdi.rows) - 4;
else
max_font_size = ((bottom - top ) / pdi.rows) - 4;
- font_size = MIN(DAY_NORMAL_FONT_SIZE, max_font_size);
+ font_size = MIN (DAY_NORMAL_FONT_SIZE, max_font_size);
font = get_font_for_size (font_size, PANGO_WEIGHT_NORMAL);
for (i = 0; i < pdi.events[0]->len; i++) {
@@ -2614,7 +2612,7 @@ print_work_week_view_cb (ECalComponent *comp,
tt = icaltime_from_timet_with_zone (iend, FALSE, pdi->zone);
/* If we're past the hour, use the next one */
- pdi->end_hour = MAX(pdi->end_hour, tt.minute ? tt.hour + 1 : tt.hour);
+ pdi->end_hour = MAX (pdi->end_hour, tt.minute ? tt.hour + 1 : tt.hour);
return TRUE;
}
@@ -2627,8 +2625,8 @@ print_work_week_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date
time_t when, start, end;
gdouble width, height, l, small_month_width = calc_small_month_width (context, HEADER_HEIGHT);
gint i, days = 5;
- char buf[100];
- const int LONG_EVENT_OFFSET = 6;
+ gchar buf[100];
+ const gint LONG_EVENT_OFFSET = 6;
struct pdinfo pdi;
struct tm tm;
gdouble day_width, day_x;
@@ -2692,7 +2690,7 @@ print_work_week_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date
/* Now print each days' events */
day_width = (width - 2*DAY_VIEW_TIME_COLUMN_WIDTH) / days;
when = start;
- for(i = 0; i < days; ++i){
+ for (i = 0; i < days; ++i) {
day_x = DAY_VIEW_TIME_COLUMN_WIDTH + day_width * i;
/* Print the day, e.g. 'Tuesday'. */