[gtk+] checkmenuitem: Don't always snapshot the indicator
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] checkmenuitem: Don't always snapshot the indicator
- Date: Thu, 20 Jul 2017 01:59:36 +0000 (UTC)
commit 28dae5f1c2cb01c759a68b47e90b0cb1e1b94540
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]