[gnome-calendar] month-view: initial drawing of overflow indicator
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] month-view: initial drawing of overflow indicator
- Date: Thu, 18 Dec 2014 14:07:02 +0000 (UTC)
commit 87856ec31ce454176b5f6c0f83f993dbf900c123
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Thu Dec 18 01:09:52 2014 -0500
month-view: initial drawing of overflow indicator
Added FIXME for properly wording the message
src/gcal-month-view.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c
index 41de80f..316fbdd 100644
--- a/src/gcal-month-view.c
+++ b/src/gcal-month-view.c
@@ -48,7 +48,7 @@ typedef struct
GList *multiday_children;
/**
- * Hash containing which days have overflow
+ * Set containing which days have overflow
*/
GHashTable *overflown_days;
@@ -863,6 +863,22 @@ gcal_month_view_draw (GtkWidget *widget,
layout);
}
+ if (g_hash_table_contains (priv->overflown_days, GINT_TO_POINTER (i)))
+ {
+ gchar *overflow_str;
+
+ overflow_str = g_strdup_printf (_("Other %d events"), 2); /* FIXME: handle plurars property */
+ pango_layout_set_text (layout, overflow_str, -1);
+ pango_layout_get_pixel_size (layout, &font_width, &font_height);
+
+ gtk_render_layout (context, cr,
+ cell_width * (column + k) + sw * padding.right - k * font_width,
+ cell_height * (row + 1 + first_row_gap) - font_height - padding.bottom +
start_grid_y,
+ layout);
+
+ g_free (overflow_str);
+ }
+
g_free (nr_day);
}
pango_font_description_free (sfont_desc);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]