month-view: initial drawing of overflow indicator
Added FIXME for properly wording the message
This commit is contained in:
+17
-1
@@ -48,7 +48,7 @@ typedef struct
|
|||||||
GList *multiday_children;
|
GList *multiday_children;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hash containing which days have overflow
|
* Set containing which days have overflow
|
||||||
*/
|
*/
|
||||||
GHashTable *overflown_days;
|
GHashTable *overflown_days;
|
||||||
|
|
||||||
@@ -863,6 +863,22 @@ gcal_month_view_draw (GtkWidget *widget,
|
|||||||
layout);
|
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);
|
g_free (nr_day);
|
||||||
}
|
}
|
||||||
pango_font_description_free (sfont_desc);
|
pango_font_description_free (sfont_desc);
|
||||||
|
|||||||
Reference in New Issue
Block a user