checkmenuitem: Don't always snapshot the indicator

Chaining up will snapshot all child widgets, which doesn't work with
GtkModelMenuItem.
This commit is contained in:
Timm Bäder 2017-07-12 08:30:49 +02:00 committed by Matthias Clasen
parent 8358817ad1
commit 28dae5f1c2

View File

@ -495,9 +495,13 @@ gtk_check_menu_item_snapshot (GtkWidget *widget,
GtkSnapshot *snapshot)
{
GtkCheckMenuItem *check_menu_item = GTK_CHECK_MENU_ITEM (widget);
GtkWidget *child;
if (GTK_WIDGET_CLASS (gtk_check_menu_item_parent_class)->snapshot)
GTK_WIDGET_CLASS (gtk_check_menu_item_parent_class)->snapshot (widget, snapshot);
child = gtk_bin_get_child (GTK_BIN (widget));
if (child)
gtk_widget_snapshot_child (widget, child, snapshot);
if (GTK_CHECK_MENU_ITEM_GET_CLASS (check_menu_item)->snapshot_indicator)
GTK_CHECK_MENU_ITEM_GET_CLASS (check_menu_item)->snapshot_indicator (check_menu_item, snapshot);