mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-04 09:40:19 +00:00
menuitem: Remove gadget
Now that GtkCheckMenuItem isn't using it anymore, we also don't need it.
This commit is contained in:
parent
022a3d76d9
commit
0845246fb8
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user