diff options
author | Hans Petter Jansson <hpj@ximian.com> | 2003-01-27 13:34:04 +0800 |
---|---|---|
committer | Hans Petter <hansp@src.gnome.org> | 2003-01-27 13:34:04 +0800 |
commit | c509e2e85b3b4e264da53c24d1a0c91b889961e1 (patch) | |
tree | b6be55d89cb94874e36ea9ee472ea69ea2fae870 /calendar/gui/e-day-view-top-item.c | |
parent | 50a112d4c47c19e1b58b277bb0bc08828cda1505 (diff) | |
download | gsoc2013-evolution-c509e2e85b3b4e264da53c24d1a0c91b889961e1.tar.gz gsoc2013-evolution-c509e2e85b3b4e264da53c24d1a0c91b889961e1.tar.zst gsoc2013-evolution-c509e2e85b3b4e264da53c24d1a0c91b889961e1.zip |
Make clicks, drags and resizes work, and pangoize remaining strings. Fix
2003-01-26 Hans Petter Jansson <hpj@ximian.com>
Make clicks, drags and resizes work, and pangoize remaining strings.
Fix EText placement.
* gui/e-day-view-top-item.c (e_day_view_top_item_draw_long_event):
Use Pango.
* gui/e-day-view.c (e_day_view_on_top_canvas_button_press):
Don't add scroll offset, it's already factored in.
(e_day_view_on_main_canvas_button_press): Ditto.
(e_day_view_on_top_canvas_motion): Ditto.
(e_day_view_on_main_canvas_motion): Ditto.
(e_day_view_reshape_long_event): Don't set the "font_gdk" property.
Its non-existence will prevent the other properties from being set as
well.
(e_day_view_reshape_day_event): Ditto.
(e_day_view_update_top_canvas_drag): Ditto.
(e_day_view_start_editing_event): ETextEventProcessor is a GObject
now. So use g_signal_stuff.
(e_day_view_check_auto_scroll): Factor out scroll offset before
checking the pointer's position relative to widget.
(e_day_view_auto_scroll_handler): Don't freeze the canvas when
scrolling - it will fail to update the canvas. If this is not
intended behaviour, it's a bug in the canvas, I think.
(e_day_view_on_main_canvas_drag_motion): Factor in the scroll offset
before checking for auto-scroll, since the function requires this.
* gui/e-week-view.c (e_week_view_reshape_event_span): Don't set the
"font_gdk" property. Its non-existence will prevent the other
properties from being set as well.
(e_week_view_start_editing_event): ETextEventProcessor is a GObject
now. So use g_signal_stuff.
svn path=/trunk/; revision=19641
Diffstat (limited to 'calendar/gui/e-day-view-top-item.c')
-rw-r--r-- | calendar/gui/e-day-view-top-item.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c index 0f7ce66124..973d326d8f 100644 --- a/calendar/gui/e-day-view-top-item.c +++ b/calendar/gui/e-day-view-top-item.c @@ -353,6 +353,7 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem, gboolean draw_start_triangle, draw_end_triangle; GdkRectangle clip_rect; GSList *categories_list, *elem; + PangoLayout *layout; day_view = dvtitem->day_view; @@ -482,16 +483,13 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem, if (display_hour < 10) time_x += day_view->digit_width; - gdk_draw_string (drawable, font, fg_gc, + layout = gtk_widget_create_pango_layout (GTK_WIDGET (day_view), buffer); + gdk_draw_layout (drawable, fg_gc, time_x, - item_y + E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT - + E_DAY_VIEW_LONG_EVENT_Y_PAD - + font->ascent - y, -#if 0 - buffer); -#else - "FIXME text"); -#endif + item_y + E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT + + E_DAY_VIEW_LONG_EVENT_Y_PAD - y, + layout); + g_object_unref (layout); gdk_gc_set_clip_rectangle (fg_gc, NULL); @@ -528,15 +526,12 @@ e_day_view_top_item_draw_long_event (EDayViewTopItem *dvtitem, if (display_hour < 10) time_x += day_view->digit_width; - gdk_draw_string (drawable, font, fg_gc, + layout = gtk_widget_create_pango_layout (GTK_WIDGET (day_view), buffer); + gdk_draw_layout (drawable, fg_gc, time_x, - item_y + E_DAY_VIEW_LONG_EVENT_Y_PAD - + font->ascent + 1 - y, -#if 0 - buffer); -#else - "FIXME text"); -#endif + item_y + E_DAY_VIEW_LONG_EVENT_Y_PAD + 1 - y, + layout); + g_object_unref (layout); max_icon_x -= time_width + E_DAY_VIEW_LONG_EVENT_TIME_X_PAD; } |