From e4afd3f9fb962ea1295a0657ec9f83a427829171 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 26 May 2009 23:21:02 -0400 Subject: Remove trailing whitespace, again. --- calendar/gui/e-day-view-top-item.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'calendar/gui/e-day-view-top-item.c') diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c index 909379b3a6..dd91133243 100644 --- a/calendar/gui/e-day-view-top-item.c +++ b/calendar/gui/e-day-view-top-item.c @@ -10,7 +10,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see + * License along with the program; if not, see * * * Authors: -- cgit From 948235c3d1076dbe6ed2e57a24c16a083bbd9f01 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 27 May 2009 10:29:19 -0400 Subject: Prefer GLib basic types over C types. --- calendar/gui/e-day-view-top-item.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'calendar/gui/e-day-view-top-item.c') diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c index dd91133243..de9a542ef6 100644 --- a/calendar/gui/e-day-view-top-item.c +++ b/calendar/gui/e-day-view-top-item.c @@ -687,11 +687,11 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem, /* draw categories icons */ e_cal_component_get_categories_list (comp, &categories_list); for (elem = categories_list; elem; elem = elem->next) { - char *category; - const char *file; + gchar *category; + const gchar *file; GdkPixbuf *pixbuf; - category = (char *) elem->data; + category = (gchar *) elem->data; file = e_categories_get_icon_file_for (category); if (!file) continue; @@ -800,7 +800,7 @@ e_day_view_top_item_draw_triangle (EDayViewTopItem *dvtitem, This is needed so that we get button/motion events. */ static double e_day_view_top_item_point (GnomeCanvasItem *item, double x, double y, - int cx, int cy, + gint cx, gint cy, GnomeCanvasItem **actual_item) { *actual_item = item; -- cgit From 14f8eee012382f04090ea9277e9567d5f32e8bf0 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 28 May 2009 13:06:29 -0400 Subject: Whitespace cleanup. --- calendar/gui/e-day-view-top-item.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'calendar/gui/e-day-view-top-item.c') diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c index de9a542ef6..7579f00986 100644 --- a/calendar/gui/e-day-view-top-item.c +++ b/calendar/gui/e-day-view-top-item.c @@ -395,8 +395,8 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem, gconf_client = gconf_client_get_default (); alpha = gconf_client_get_float (gconf_client, - "/apps/evolution/calendar/display/events_transparency", - NULL); + "/apps/evolution/calendar/display/events_transparency", + NULL); gradient = gconf_client_get_bool (gconf_client, "/apps/evolution/calendar/display/events_gradient", -- cgit From 433eac7844481b8ceda0bae8bf08f6bb623185b0 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 1 Jun 2009 19:09:19 -0400 Subject: More code cleanup. --- calendar/gui/e-day-view-top-item.c | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'calendar/gui/e-day-view-top-item.c') diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c index 7579f00986..31cce40a5a 100644 --- a/calendar/gui/e-day-view-top-item.c +++ b/calendar/gui/e-day-view-top-item.c @@ -44,20 +44,20 @@ static void e_day_view_top_item_set_property (GObject *object, static void e_day_view_top_item_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, - int flags); + gint flags); static void e_day_view_top_item_draw (GnomeCanvasItem *item, GdkDrawable *drawable, - int x, - int y, - int width, - int height); + gint x, + gint y, + gint width, + gint height); static void e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem, gint event_num, GdkDrawable *drawable, - int x, - int y, - int width, - int height); + gint x, + gint y, + gint width, + gint height); static void e_day_view_top_item_draw_triangle (EDayViewTopItem *dvtitem, GdkDrawable *drawable, gint x, @@ -68,8 +68,8 @@ static void e_day_view_top_item_draw_triangle (EDayViewTopItem *dvtitem, static double e_day_view_top_item_point (GnomeCanvasItem *item, double x, double y, - int cx, - int cy, + gint cx, + gint cy, GnomeCanvasItem **actual_item); static gint e_day_view_top_item_event (GnomeCanvasItem *item, GdkEvent *event); @@ -155,7 +155,7 @@ static void e_day_view_top_item_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, - int flags) + gint flags) { if (GNOME_CANVAS_ITEM_CLASS (e_day_view_top_item_parent_class)->update) (* GNOME_CANVAS_ITEM_CLASS (e_day_view_top_item_parent_class)->update) (item, affine, clip_path, flags); @@ -174,10 +174,10 @@ e_day_view_top_item_update (GnomeCanvasItem *item, static void e_day_view_top_item_draw (GnomeCanvasItem *canvas_item, GdkDrawable *drawable, - int x, - int y, - int width, - int height) + gint x, + gint y, + gint width, + gint height) { EDayViewTopItem *dvtitem; EDayView *day_view; @@ -358,10 +358,10 @@ static void e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem, gint event_num, GdkDrawable *drawable, - int x, - int y, - int width, - int height) + gint x, + gint y, + gint width, + gint height) { EDayView *day_view; EDayViewEvent *event; -- cgit From 374bd42f69aca2e132fd854c9619f3d7491f1f96 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 12 Jul 2009 23:33:07 -0400 Subject: Fix excessive whitespace. --- calendar/gui/e-day-view-top-item.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'calendar/gui/e-day-view-top-item.c') diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c index 31cce40a5a..180b3adb1c 100644 --- a/calendar/gui/e-day-view-top-item.c +++ b/calendar/gui/e-day-view-top-item.c @@ -74,7 +74,6 @@ static double e_day_view_top_item_point (GnomeCanvasItem *item, static gint e_day_view_top_item_event (GnomeCanvasItem *item, GdkEvent *event); - /* The arguments we take */ enum { PROP_0, @@ -119,7 +118,6 @@ e_day_view_top_item_class_init (EDayViewTopItemClass *class) G_PARAM_WRITABLE)); } - static void e_day_view_top_item_init (EDayViewTopItem *dvtitem) { @@ -127,7 +125,6 @@ e_day_view_top_item_init (EDayViewTopItem *dvtitem) dvtitem->show_dates = FALSE; } - static void e_day_view_top_item_set_property (GObject *object, guint property_id, @@ -150,7 +147,6 @@ e_day_view_top_item_set_property (GObject *object, G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } - static void e_day_view_top_item_update (GnomeCanvasItem *item, double *affine, @@ -167,7 +163,6 @@ e_day_view_top_item_update (GnomeCanvasItem *item, item->y2 = INT_MAX; } - /* * DRAWING ROUTINES - functions to paint the canvas item. */ @@ -718,7 +713,6 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem, gdk_gc_set_clip_mask (gc, NULL); } - /* This draws a little triangle to indicate that an event extends past the days visible on screen. */ static void @@ -807,7 +801,6 @@ e_day_view_top_item_point (GnomeCanvasItem *item, double x, double y, return 0.0; } - static gint e_day_view_top_item_event (GnomeCanvasItem *item, GdkEvent *event) { -- cgit From fa360fde289f9b850191f89059d1a5e6d67c07c7 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 18 Jul 2009 14:07:42 -0400 Subject: More whitespace cleanup. --- calendar/gui/e-day-view-top-item.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'calendar/gui/e-day-view-top-item.c') diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c index 180b3adb1c..c4865ee707 100644 --- a/calendar/gui/e-day-view-top-item.c +++ b/calendar/gui/e-day-view-top-item.c @@ -426,7 +426,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem, GdkColormap *colormap; colormap = gtk_widget_get_colormap (GTK_WIDGET (day_view)); - if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE)){ + if (gdk_colormap_alloc_color (colormap, &bg_color, TRUE, TRUE)) { red = bg_color.red; green = bg_color.green; blue = bg_color.blue; @@ -487,7 +487,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem, draw_curved_rectangle (cr, x0, y0, rect_width, rect_height, radius); - if (gradient){ + if (gradient) { pat = cairo_pattern_create_linear (item_x - x + 5.5, item_y + 2.5 - y, item_x - x + 5, item_y - y + item_h + 7.5); cairo_pattern_add_color_stop_rgba (pat, 1, red/cc, green/cc, blue/cc, 0.8); -- cgit From e119ae2938fb1e3b41191fe958857c4b8f414a32 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 27 Jul 2009 17:38:25 +0200 Subject: Bug #575581 - All Day Events Should Not Depend On Calendar Scrolling --- calendar/gui/e-day-view-top-item.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'calendar/gui/e-day-view-top-item.c') diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c index c4865ee707..09ed59e6e4 100644 --- a/calendar/gui/e-day-view-top-item.c +++ b/calendar/gui/e-day-view-top-item.c @@ -287,14 +287,17 @@ e_day_view_top_item_draw (GnomeCanvasItem *canvas_item, e_day_view_top_item_get_day_label (day_view, day, buffer, sizeof (buffer)); clip_rect.x = day_view->day_offsets[day] - x; clip_rect.y = 2 - y; - clip_rect.width = day_view->day_widths[day]; + if (day_view->days_shown == 1) + clip_rect.width = day_view->top_canvas->allocation.width - day_view->day_offsets[day]; + else + clip_rect.width = day_view->day_widths[day]; clip_rect.height = item_height - 2; gdk_gc_set_clip_rectangle (fg_gc, &clip_rect); layout = gtk_widget_create_pango_layout (GTK_WIDGET (day_view), buffer); pango_layout_get_pixel_size (layout, &date_width, NULL); - date_x = day_view->day_offsets[day] + (day_view->day_widths[day] - date_width) / 2; + date_x = day_view->day_offsets[day] + (clip_rect.width - date_width) / 2; gdk_draw_layout (drawable, fg_gc, date_x - x, -- cgit From 41569bb778e228d4f5a04cb1e15bfa5b49bb044b Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 28 Jul 2009 21:01:08 -0400 Subject: Trimming redundancy. --- calendar/gui/e-day-view-top-item.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'calendar/gui/e-day-view-top-item.c') diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c index 09ed59e6e4..dd497e0f7b 100644 --- a/calendar/gui/e-day-view-top-item.c +++ b/calendar/gui/e-day-view-top-item.c @@ -369,6 +369,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem, gint start_day, end_day; gint item_x, item_y, item_w, item_h; gint text_x, icon_x, icon_y, icon_x_inc; + ECalModel *model; ECalComponent *comp; gchar buffer[16]; gint hour, display_hour, minute, offset, time_width, time_x; @@ -389,6 +390,8 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem, gdouble x0, y0, rect_height, rect_width, radius; day_view = dvtitem->day_view; + model = e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)); + cr = gdk_cairo_create (drawable); gconf_client = gconf_client_get_default (); @@ -568,7 +571,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem, e_day_view_convert_time_to_display (day_view, hour, &display_hour, &suffix, &suffix_width); - if (e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) { + if (e_cal_model_get_use_24_hour_format (model)) { g_snprintf (buffer, sizeof (buffer), "%i:%02i", display_hour, minute); } else { @@ -617,7 +620,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem, &display_hour, &suffix, &suffix_width); - if (e_calendar_view_get_use_24_hour_format (E_CALENDAR_VIEW (day_view))) { + if (e_cal_model_get_use_24_hour_format (model)) { g_snprintf (buffer, sizeof (buffer), "%i:%02i", display_hour, minute); } else { -- cgit From aa8a700dd924a83e1dcd8eb374df777fb0a83b66 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 30 Jul 2009 11:22:59 +0200 Subject: Bug #300567 - Calendar drawing optimizations --- calendar/gui/e-day-view-top-item.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'calendar/gui/e-day-view-top-item.c') diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c index dd497e0f7b..51af20bbea 100644 --- a/calendar/gui/e-day-view-top-item.c +++ b/calendar/gui/e-day-view-top-item.c @@ -34,6 +34,7 @@ #include #include #include +#include "calendar-config.h" #include "e-calendar-view.h" #include "e-day-view-top-item.h" @@ -363,7 +364,6 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem, { EDayView *day_view; EDayViewEvent *event; - GConfClient *gconf_client; GtkStyle *style; GdkGC *gc, *fg_gc; gint start_day, end_day; @@ -394,15 +394,8 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem, cr = gdk_cairo_create (drawable); - gconf_client = gconf_client_get_default (); - alpha = gconf_client_get_float (gconf_client, - "/apps/evolution/calendar/display/events_transparency", - NULL); - - gradient = gconf_client_get_bool (gconf_client, - "/apps/evolution/calendar/display/events_gradient", - NULL); - g_object_unref (gconf_client); + gradient = calendar_config_get_display_events_gradient (); + alpha = calendar_config_get_display_events_alpha (); /* If the event is currently being dragged, don't draw it. It will be drawn in the special drag items. */ -- cgit From 14eb2a884dd98fec4864e9454ae8d3e771c5656c Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 3 Aug 2009 23:24:04 +0200 Subject: Bug #587468 - Show meeting icon for component with attendees only --- calendar/gui/e-day-view-top-item.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'calendar/gui/e-day-view-top-item.c') diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c index 51af20bbea..a1f083e1b8 100644 --- a/calendar/gui/e-day-view-top-item.c +++ b/calendar/gui/e-day-view-top-item.c @@ -669,7 +669,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem, icon_x -= icon_x_inc; } - if (icon_x <= max_icon_x && e_cal_component_has_organizer (comp)) { + if (icon_x <= max_icon_x && e_cal_component_has_attendees (comp)) { cairo_save (cr); gdk_cairo_set_source_pixbuf (cr, day_view->meeting_icon, icon_x, icon_y); cairo_paint (cr); -- cgit