[gtk+/wip/baedert/drawing: 31/35] checkmenuitem: Don't always snapshot the indicator
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/drawing: 31/35] checkmenuitem: Don't always snapshot the indicator
- Date: Sat, 15 Jul 2017 14:42:55 +0000 (UTC)
commit a46f25e60527e9e7e752724084da5fdc1baf8c26
Author: Timm Bäder <mail baedert org>
Date: Wed Jul 12 08:30:49 2017 +0200
checkmenuitem: Don't always snapshot the indicator
Chaining up will snapshot all child widgets, which doesn't work with
GtkModelMenuItem.
gtk/gtkcheckmenuitem.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcheckmenuitem.c b/gtk/gtkcheckmenuitem.c
index 0987fc1..b8d57cd 100644
--- a/gtk/gtkcheckmenuitem.c
+++ b/gtk/gtkcheckmenuitem.c
@@ -495,9 +495,13 @@ gtk_check_menu_item_snapshot (GtkWidget *widget,
GtkSnapshot *snapshot)
{
GtkCheckMenuItem *check_menu_item = GTK_CHECK_MENU_ITEM (widget);
+ GtkWidget *child;
+
+ child = gtk_bin_get_child (GTK_BIN (widget));
+
- if (GTK_WIDGET_CLASS (gtk_check_menu_item_parent_class)->snapshot)
- GTK_WIDGET_CLASS (gtk_check_menu_item_parent_class)->snapshot (widget, snapshot);
+ 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]