month-view: initial drawing of overflow indicator

Added FIXME for properly wording the message
This commit is contained in:
Erick Pérez Castellanos
2014-12-18 01:11:04 -05:00
parent 4c7626cad2
commit 87856ec31c
+17 -1
View File
@@ -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);