Deprecate flag macros for toplevel, state, no window and composite child
Deprecate widget flag macros GTK_WIDGET_STATE, GTK_WIDGET_SAVED_STATE, GTK_WIDGET_FLAGS, GTK_WIDGET_TOPLEVEL, GTK_WIDGET_NO_WINDOW and GTK_WIDGET_COMPOSITE_CHILD. Also deprecate the type macros GTK_WIDGET_TYPE, GTK_OBJECT_TYPE_NAME and GTK_OBJECT_TYPE which have become redundant. Instances of GTK_WIDGET_TOPLEVEL are replaced with gtk_widget_is_toplevel, GTK_WIDGET_TYPE is replaced with G_OBJECT_TYPE, GTK_WIDGET_COMPOSITE_CHILD is replaced with use of the "composite-child" property and uses of GTK_WIDGET_NO_WINDOW are adjusted to use gtk_widget_get_has_window. Uses of GTK_WIDGET_SAVED_STATE and GTK_WIDGET_FLAGS inside GtkWidget are changed to direct flag usage. Documentation is updated to refer to gtk_widget_set_has_window and gtk_widget_get_has_window. Gail and tests are updated as well. Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=69872
This commit is contained in:
@ -1261,7 +1261,7 @@ gtk_container_set_resize_mode (GtkContainer *container,
|
||||
g_return_if_fail (GTK_IS_CONTAINER (container));
|
||||
g_return_if_fail (resize_mode <= GTK_RESIZE_IMMEDIATE);
|
||||
|
||||
if (GTK_WIDGET_TOPLEVEL (container) &&
|
||||
if (gtk_widget_is_toplevel (GTK_WIDGET (container)) &&
|
||||
resize_mode == GTK_RESIZE_PARENT)
|
||||
{
|
||||
resize_mode = GTK_RESIZE_QUEUE;
|
||||
@ -1380,7 +1380,7 @@ _gtk_container_queue_resize (GtkContainer *container)
|
||||
if (resize_container)
|
||||
{
|
||||
if (GTK_WIDGET_VISIBLE (resize_container) &&
|
||||
(GTK_WIDGET_TOPLEVEL (resize_container) || GTK_WIDGET_REALIZED (resize_container)))
|
||||
(gtk_widget_is_toplevel (GTK_WIDGET (resize_container)) || GTK_WIDGET_REALIZED (resize_container)))
|
||||
{
|
||||
switch (resize_container->resize_mode)
|
||||
{
|
||||
@ -1690,11 +1690,14 @@ gchar*
|
||||
_gtk_container_child_composite_name (GtkContainer *container,
|
||||
GtkWidget *child)
|
||||
{
|
||||
gboolean composite_child;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_CONTAINER (container), NULL);
|
||||
g_return_val_if_fail (GTK_IS_WIDGET (child), NULL);
|
||||
g_return_val_if_fail (child->parent == GTK_WIDGET (container), NULL);
|
||||
|
||||
if (GTK_WIDGET_COMPOSITE_CHILD (child))
|
||||
g_object_get (child, "composite-child", &composite_child, NULL);
|
||||
if (composite_child)
|
||||
{
|
||||
static GQuark quark_composite_name = 0;
|
||||
gchar *name;
|
||||
|
||||
Reference in New Issue
Block a user