mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-09-20 05:50:11 +00:00
API: container: Remove GtkContainer::child property
This commit is contained in:
parent
d4d3374729
commit
1d4f23da8e
@ -294,14 +294,6 @@ enum {
|
|||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
|
||||||
PROP_0,
|
|
||||||
PROP_CHILD,
|
|
||||||
LAST_PROP
|
|
||||||
};
|
|
||||||
|
|
||||||
static GParamSpec *container_props[LAST_PROP];
|
|
||||||
|
|
||||||
#define PARAM_SPEC_PARAM_ID(pspec) ((pspec)->param_id)
|
#define PARAM_SPEC_PARAM_ID(pspec) ((pspec)->param_id)
|
||||||
#define PARAM_SPEC_SET_PARAM_ID(pspec, id) ((pspec)->param_id = (id))
|
#define PARAM_SPEC_SET_PARAM_ID(pspec, id) ((pspec)->param_id = (id))
|
||||||
|
|
||||||
@ -312,14 +304,6 @@ static void gtk_container_base_class_finalize (GtkContainerClass *klass);
|
|||||||
static void gtk_container_class_init (GtkContainerClass *klass);
|
static void gtk_container_class_init (GtkContainerClass *klass);
|
||||||
static void gtk_container_init (GtkContainer *container);
|
static void gtk_container_init (GtkContainer *container);
|
||||||
static void gtk_container_destroy (GtkWidget *widget);
|
static void gtk_container_destroy (GtkWidget *widget);
|
||||||
static void gtk_container_set_property (GObject *object,
|
|
||||||
guint prop_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec);
|
|
||||||
static void gtk_container_get_property (GObject *object,
|
|
||||||
guint prop_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec);
|
|
||||||
static void gtk_container_add_unimplemented (GtkContainer *container,
|
static void gtk_container_add_unimplemented (GtkContainer *container,
|
||||||
GtkWidget *widget);
|
GtkWidget *widget);
|
||||||
static void gtk_container_remove_unimplemented (GtkContainer *container,
|
static void gtk_container_remove_unimplemented (GtkContainer *container,
|
||||||
@ -478,9 +462,6 @@ gtk_container_class_init (GtkContainerClass *class)
|
|||||||
hadjustment_key_id = g_quark_from_static_string ("gtk-hadjustment");
|
hadjustment_key_id = g_quark_from_static_string ("gtk-hadjustment");
|
||||||
quark_focus_chain = g_quark_from_static_string ("gtk-container-focus-chain");
|
quark_focus_chain = g_quark_from_static_string ("gtk-container-focus-chain");
|
||||||
|
|
||||||
gobject_class->set_property = gtk_container_set_property;
|
|
||||||
gobject_class->get_property = gtk_container_get_property;
|
|
||||||
|
|
||||||
widget_class->destroy = gtk_container_destroy;
|
widget_class->destroy = gtk_container_destroy;
|
||||||
widget_class->compute_expand = gtk_container_compute_expand;
|
widget_class->compute_expand = gtk_container_compute_expand;
|
||||||
widget_class->show_all = gtk_container_show_all;
|
widget_class->show_all = gtk_container_show_all;
|
||||||
@ -499,15 +480,6 @@ gtk_container_class_init (GtkContainerClass *class)
|
|||||||
class->composite_name = gtk_container_child_default_composite_name;
|
class->composite_name = gtk_container_child_default_composite_name;
|
||||||
class->get_path_for_child = gtk_container_real_get_path_for_child;
|
class->get_path_for_child = gtk_container_real_get_path_for_child;
|
||||||
|
|
||||||
container_props[PROP_CHILD] =
|
|
||||||
g_param_spec_object ("child",
|
|
||||||
P_("Child"),
|
|
||||||
P_("Can be used to add a new child to the container"),
|
|
||||||
GTK_TYPE_WIDGET,
|
|
||||||
GTK_PARAM_WRITABLE);
|
|
||||||
|
|
||||||
g_object_class_install_properties (gobject_class, LAST_PROP, container_props);
|
|
||||||
|
|
||||||
container_signals[ADD] =
|
container_signals[ADD] =
|
||||||
g_signal_new (I_("add"),
|
g_signal_new (I_("add"),
|
||||||
G_OBJECT_CLASS_TYPE (gobject_class),
|
G_OBJECT_CLASS_TYPE (gobject_class),
|
||||||
@ -1656,42 +1628,6 @@ gtk_container_destroy (GtkWidget *widget)
|
|||||||
GTK_WIDGET_CLASS (parent_class)->destroy (widget);
|
GTK_WIDGET_CLASS (parent_class)->destroy (widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_container_set_property (GObject *object,
|
|
||||||
guint prop_id,
|
|
||||||
const GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
GtkContainer *container = GTK_CONTAINER (object);
|
|
||||||
|
|
||||||
switch (prop_id)
|
|
||||||
{
|
|
||||||
case PROP_CHILD:
|
|
||||||
gtk_container_add (container, GTK_WIDGET (g_value_get_object (value)));
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gtk_container_get_property (GObject *object,
|
|
||||||
guint prop_id,
|
|
||||||
GValue *value,
|
|
||||||
GParamSpec *pspec)
|
|
||||||
{
|
|
||||||
//GtkContainer *container = GTK_CONTAINER (object);
|
|
||||||
//GtkContainerPrivate *priv = container->priv;
|
|
||||||
|
|
||||||
switch (prop_id)
|
|
||||||
{
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_container_add:
|
* gtk_container_add:
|
||||||
* @container: a #GtkContainer
|
* @container: a #GtkContainer
|
||||||
|
@ -2108,6 +2108,13 @@ create_saved_position (GtkWidget *widget)
|
|||||||
main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||||
gtk_container_add (GTK_CONTAINER (window), main_vbox);
|
gtk_container_add (GTK_CONTAINER (window), main_vbox);
|
||||||
|
|
||||||
|
button = g_object_new (GTK_TYPE_TOGGLE_BUTTON,
|
||||||
|
"label", "Stop Events",
|
||||||
|
"active", FALSE,
|
||||||
|
"visible", TRUE,
|
||||||
|
NULL);
|
||||||
|
g_signal_connect (button, "clicked", G_CALLBACK (uposition_stop_configure), window);
|
||||||
|
|
||||||
vbox =
|
vbox =
|
||||||
g_object_new (GTK_TYPE_BOX,
|
g_object_new (GTK_TYPE_BOX,
|
||||||
"orientation", GTK_ORIENTATION_VERTICAL,
|
"orientation", GTK_ORIENTATION_VERTICAL,
|
||||||
@ -2115,14 +2122,8 @@ create_saved_position (GtkWidget *widget)
|
|||||||
"GtkBox::spacing", 5,
|
"GtkBox::spacing", 5,
|
||||||
"GtkWidget::parent", main_vbox,
|
"GtkWidget::parent", main_vbox,
|
||||||
"GtkWidget::visible", TRUE,
|
"GtkWidget::visible", TRUE,
|
||||||
"child", g_object_connect (g_object_new (GTK_TYPE_TOGGLE_BUTTON,
|
|
||||||
"label", "Stop Events",
|
|
||||||
"active", FALSE,
|
|
||||||
"visible", TRUE,
|
|
||||||
NULL),
|
|
||||||
"signal::clicked", uposition_stop_configure, window,
|
|
||||||
NULL),
|
|
||||||
NULL);
|
NULL);
|
||||||
|
gtk_container_add (GTK_CONTAINER (vbox), button);
|
||||||
|
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE);
|
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE);
|
||||||
@ -2325,8 +2326,8 @@ create_tooltips (GtkWidget *widget)
|
|||||||
"label_xalign", (double) 0.5,
|
"label_xalign", (double) 0.5,
|
||||||
"visible", TRUE,
|
"visible", TRUE,
|
||||||
"parent", box2,
|
"parent", box2,
|
||||||
"child", box3,
|
|
||||||
NULL);
|
NULL);
|
||||||
|
gtk_container_add (GTK_CONTAINER (frame), box3);
|
||||||
gtk_box_set_child_packing (GTK_BOX (box2), frame, TRUE, TRUE, GTK_PACK_START);
|
gtk_box_set_child_packing (GTK_BOX (box2), frame, TRUE, TRUE, GTK_PACK_START);
|
||||||
|
|
||||||
separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
|
separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
|
@ -53,7 +53,6 @@ list_ignore_properties (gboolean buglist)
|
|||||||
{
|
{
|
||||||
/* currently untestable properties */
|
/* currently untestable properties */
|
||||||
static const IgnoreProperty ignore_properties[] = {
|
static const IgnoreProperty ignore_properties[] = {
|
||||||
{ "GtkContainer", "child", NULL, }, /* needs working child widget */
|
|
||||||
{ "GtkRadioMenuItem", "group", NULL, }, /* needs working sibling */
|
{ "GtkRadioMenuItem", "group", NULL, }, /* needs working sibling */
|
||||||
{ "GtkWidget", "parent", NULL, }, /* needs working parent widget */
|
{ "GtkWidget", "parent", NULL, }, /* needs working parent widget */
|
||||||
{ "GtkCList", "selection-mode", (void*) GTK_SELECTION_NONE, },
|
{ "GtkCList", "selection-mode", (void*) GTK_SELECTION_NONE, },
|
||||||
|
Loading…
Reference in New Issue
Block a user