menu: Drop the child properties

These were only there in support of tabular menus.
This commit is contained in:
Matthias Clasen 2019-01-23 23:36:04 -05:00
parent e31a96123e
commit 9dee863217

View File

@ -189,14 +189,6 @@ enum {
PROP_MENU_TYPE_HINT
};
enum {
CHILD_PROP_0,
CHILD_PROP_LEFT_ATTACH,
CHILD_PROP_RIGHT_ATTACH,
CHILD_PROP_TOP_ATTACH,
CHILD_PROP_BOTTOM_ATTACH
};
static void gtk_menu_set_property (GObject *object,
guint prop_id,
const GValue *value,
@ -206,16 +198,6 @@ static void gtk_menu_get_property (GObject *object,
GValue *value,
GParamSpec *pspec);
static void gtk_menu_finalize (GObject *object);
static void gtk_menu_set_child_property(GtkContainer *container,
GtkWidget *child,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gtk_menu_get_child_property(GtkContainer *container,
GtkWidget *child,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gtk_menu_destroy (GtkWidget *widget);
static void gtk_menu_realize (GtkWidget *widget);
static void gtk_menu_unrealize (GtkWidget *widget);
@ -516,8 +498,6 @@ gtk_menu_class_init (GtkMenuClass *class)
widget_class->measure = gtk_menu_measure;
container_class->remove = gtk_menu_remove;
container_class->get_child_property = gtk_menu_get_child_property;
container_class->set_child_property = gtk_menu_set_child_property;
menu_shell_class->submenu_placement = GTK_LEFT_RIGHT;
menu_shell_class->deactivate = gtk_menu_deactivate;
@ -782,38 +762,6 @@ gtk_menu_class_init (GtkMenuClass *class)
G_PARAM_STATIC_BLURB |
G_PARAM_EXPLICIT_NOTIFY));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_LEFT_ATTACH,
g_param_spec_int ("left-attach",
P_("Left Attach"),
P_("The column number to attach the left side of the child to"),
-1, INT_MAX, -1,
GTK_PARAM_READWRITE));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_RIGHT_ATTACH,
g_param_spec_int ("right-attach",
P_("Right Attach"),
P_("The column number to attach the right side of the child to"),
-1, INT_MAX, -1,
GTK_PARAM_READWRITE));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_TOP_ATTACH,
g_param_spec_int ("top-attach",
P_("Top Attach"),
P_("The row number to attach the top of the child to"),
-1, INT_MAX, -1,
GTK_PARAM_READWRITE));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_BOTTOM_ATTACH,
g_param_spec_int ("bottom-attach",
P_("Bottom Attach"),
P_("The row number to attach the bottom of the child to"),
-1, INT_MAX, -1,
GTK_PARAM_READWRITE));
binding_set = gtk_binding_set_by_class (class);
gtk_binding_entry_add_signal (binding_set,
GDK_KEY_Up, 0,
@ -1019,69 +967,6 @@ gtk_menu_get_property (GObject *object,
}
}
static void
gtk_menu_set_child_property (GtkContainer *container,
GtkWidget *child,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
GtkMenu *menu = GTK_MENU (container);
AttachInfo *ai = get_attach_info (child);
switch (property_id)
{
case CHILD_PROP_LEFT_ATTACH:
ai->left_attach = g_value_get_int (value);
break;
case CHILD_PROP_RIGHT_ATTACH:
ai->right_attach = g_value_get_int (value);
break;
case CHILD_PROP_TOP_ATTACH:
ai->top_attach = g_value_get_int (value);
break;
case CHILD_PROP_BOTTOM_ATTACH:
ai->bottom_attach = g_value_get_int (value);
break;
default:
GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
return;
}
menu_queue_resize (menu);
}
static void
gtk_menu_get_child_property (GtkContainer *container,
GtkWidget *child,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
AttachInfo *ai = get_attach_info (child);
switch (property_id)
{
case CHILD_PROP_LEFT_ATTACH:
g_value_set_int (value, ai->left_attach);
break;
case CHILD_PROP_RIGHT_ATTACH:
g_value_set_int (value, ai->right_attach);
break;
case CHILD_PROP_TOP_ATTACH:
g_value_set_int (value, ai->top_attach);
break;
case CHILD_PROP_BOTTOM_ATTACH:
g_value_set_int (value, ai->bottom_attach);
break;
default:
GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
return;
}
}
static void
gtk_menu_init (GtkMenu *menu)
{