[gtk+/wip/baedert/drawing: 27/142] menuitem: Remove gadget
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/drawing: 27/142] menuitem: Remove gadget
- Date: Sun, 4 Jun 2017 16:59:50 +0000 (UTC)
commit 343379c8314784208da3f165d707832a06b86fde
Author: Timm Bäder <mail baedert org>
Date: Sat May 6 14:17:45 2017 +0200
menuitem: Remove gadget
Now that GtkCheckMenuItem isn't using it anymore, we also don't need it.
gtk/gtkmenuitem.c | 21 +++------------------
gtk/gtkmenuitemprivate.h | 2 --
2 files changed, 3 insertions(+), 20 deletions(-)
---
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index b58b91d..7fe5270 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -29,7 +29,6 @@
#include "gtkaccellabel.h"
#include "gtkbuiltiniconprivate.h"
#include "gtkcontainerprivate.h"
-#include "gtkcsscustomgadgetprivate.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtkmenuprivate.h"
@@ -694,7 +693,6 @@ static void
gtk_menu_item_init (GtkMenuItem *menu_item)
{
GtkMenuItemPrivate *priv;
- GtkCssNode *widget_node;
priv = gtk_menu_item_get_instance_private (menu_item);
menu_item->priv = priv;
@@ -710,20 +708,6 @@ gtk_menu_item_init (GtkMenuItem *menu_item)
priv->submenu_direction = GTK_DIRECTION_RIGHT;
priv->submenu_placement = GTK_TOP_BOTTOM;
priv->timer = 0;
-
- widget_node = gtk_widget_get_css_node (GTK_WIDGET (menu_item));
- priv->gadget = gtk_css_custom_gadget_new_for_node (widget_node,
- GTK_WIDGET (menu_item),
- NULL,
- NULL,
- NULL,
- NULL, NULL);
-}
-
-GtkCssGadget *
-_gtk_menu_item_get_gadget (GtkMenuItem *menu_item)
-{
- return menu_item->priv->gadget;
}
/**
@@ -786,7 +770,6 @@ gtk_menu_item_dispose (GObject *object)
g_clear_object (&priv->action_helper);
g_clear_object (&priv->arrow_gadget);
- g_clear_object (&priv->gadget);
G_OBJECT_CLASS (gtk_menu_item_parent_class)->dispose (object);
}
@@ -996,8 +979,10 @@ update_arrow_gadget (GtkMenuItem *menu_item)
{
priv->arrow_gadget = gtk_builtin_icon_new ("arrow",
widget,
- priv->gadget,
+ NULL,
NULL);
+ gtk_css_node_set_parent (gtk_css_gadget_get_node (priv->arrow_gadget),
+ gtk_widget_get_css_node (widget));
update_node_classes (menu_item);
}
}
diff --git a/gtk/gtkmenuitemprivate.h b/gtk/gtkmenuitemprivate.h
index d5160f6..8075ec7 100644
--- a/gtk/gtkmenuitemprivate.h
+++ b/gtk/gtkmenuitemprivate.h
@@ -20,7 +20,6 @@
#include <gtk/gtkmenuitem.h>
#include <gtk/gtkactionhelper.h>
-#include <gtk/gtkcssgadgetprivate.h>
#include <gtk/gtkcssnodeprivate.h>
G_BEGIN_DECLS
@@ -48,7 +47,6 @@ struct _GtkMenuItemPrivate
guint reserve_indicator : 1;
};
-GtkCssGadget * _gtk_menu_item_get_gadget (GtkMenuItem *menu_item);
void _gtk_menu_item_refresh_accel_path (GtkMenuItem *menu_item,
const gchar *prefix,
GtkAccelGroup *accel_group,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]