diff options
author | Christian Dywan <christian@twotoasts.de> | 2010-01-04 07:49:26 +0100 |
---|---|---|
committer | Christian Dywan <christian@twotoasts.de> | 2010-01-04 07:57:05 +0100 |
commit | bb1824c131f247c2ef64f3c5f8b9ffe3885c9d90 (patch) | |
tree | 4a3b900d5f439856679fd0fcf9c8394c177e8c6f /modules | |
parent | ac26960e62346558737073ac516790005d7c64ad (diff) | |
download | gtk+-bb1824c131f247c2ef64f3c5f8b9ffe3885c9d90.tar.gz |
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
Diffstat (limited to 'modules')
-rw-r--r-- | modules/input/gtkimcontextxim.c | 4 | ||||
-rw-r--r-- | modules/other/gail/gailtreeview.c | 6 | ||||
-rw-r--r-- | modules/other/gail/gailwidget.c | 8 | ||||
-rw-r--r-- | modules/other/gail/gailwindow.c | 4 | ||||
-rw-r--r-- | modules/other/gail/tests/testaction.c | 2 | ||||
-rw-r--r-- | modules/other/gail/tests/testnotebook.c | 2 | ||||
-rw-r--r-- | modules/other/gail/tests/testobject.c | 2 | ||||
-rw-r--r-- | modules/other/gail/tests/testselection.c | 2 |
8 files changed, 15 insertions, 15 deletions
diff --git a/modules/input/gtkimcontextxim.c b/modules/input/gtkimcontextxim.c index cefbf609b4..baf1a97247 100644 --- a/modules/input/gtkimcontextxim.c +++ b/modules/input/gtkimcontextxim.c @@ -1547,7 +1547,7 @@ claim_status_window (GtkIMContextXIM *context_xim) if (!context_xim->status_window && context_xim->client_widget) { GtkWidget *toplevel = gtk_widget_get_toplevel (context_xim->client_widget); - if (toplevel && GTK_WIDGET_TOPLEVEL (toplevel)) + if (toplevel && gtk_widget_is_toplevel (toplevel)) { StatusWindow *status_window = status_window_get (toplevel); @@ -1581,7 +1581,7 @@ update_in_toplevel (GtkIMContextXIM *context_xim) { GtkWidget *toplevel = gtk_widget_get_toplevel (context_xim->client_widget); - context_xim->in_toplevel = (toplevel && GTK_WIDGET_TOPLEVEL (toplevel)); + context_xim->in_toplevel = (toplevel && gtk_widget_is_toplevel (toplevel)); } else context_xim->in_toplevel = FALSE; diff --git a/modules/other/gail/gailtreeview.c b/modules/other/gail/gailtreeview.c index 44a6337d40..5b8ddce079 100644 --- a/modules/other/gail/gailtreeview.c +++ b/modules/other/gail/gailtreeview.c @@ -906,7 +906,7 @@ gail_tree_view_ref_child (AtkObject *obj, fake_renderer = g_object_new (GTK_TYPE_CELL_RENDERER_TEXT, NULL); default_registry = atk_get_default_registry (); factory = atk_registry_get_factory (default_registry, - GTK_OBJECT_TYPE (fake_renderer)); + G_OBJECT_TYPE (fake_renderer)); child = atk_object_factory_create_accessible (factory, G_OBJECT (fake_renderer)); gail_return_val_if_fail (GAIL_IS_RENDERER_CELL (child), NULL); @@ -942,7 +942,7 @@ gail_tree_view_ref_child (AtkObject *obj, default_registry = atk_get_default_registry (); factory = atk_registry_get_factory (default_registry, - GTK_OBJECT_TYPE (renderer)); + G_OBJECT_TYPE (renderer)); child = atk_object_factory_create_accessible (factory, G_OBJECT (renderer)); gail_return_val_if_fail (GAIL_IS_RENDERER_CELL (child), NULL); @@ -2200,7 +2200,7 @@ gail_tree_view_grab_cell_focus (GailCellParent *parent, gtk_tree_path_free (path); gtk_widget_grab_focus (widget); toplevel = gtk_widget_get_toplevel (widget); - if (GTK_WIDGET_TOPLEVEL (toplevel)) + if (gtk_widget_is_toplevel (toplevel)) { #ifdef GDK_WINDOWING_X11 gtk_window_present_with_time (GTK_WINDOW (toplevel), gdk_x11_get_server_time (widget->window)); diff --git a/modules/other/gail/gailwidget.c b/modules/other/gail/gailwidget.c index f81550d740..10e5cb5842 100644 --- a/modules/other/gail/gailwidget.c +++ b/modules/other/gail/gailwidget.c @@ -739,7 +739,7 @@ gail_widget_grab_focus (AtkComponent *component) { gtk_widget_grab_focus (widget); toplevel = gtk_widget_get_toplevel (widget); - if (GTK_WIDGET_TOPLEVEL (toplevel)) + if (gtk_widget_is_toplevel (toplevel)) { #ifdef GDK_WINDOWING_X11 gtk_window_present_with_time (GTK_WINDOW (toplevel), gdk_x11_get_server_time (widget->window)); @@ -777,7 +777,7 @@ gail_widget_set_extents (AtkComponent *component, return FALSE; gail_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE); - if (GTK_WIDGET_TOPLEVEL (widget)) + if (gtk_widget_is_toplevel (widget)) { if (coord_type == ATK_XY_WINDOW) { @@ -821,7 +821,7 @@ gail_widget_set_position (AtkComponent *component, return FALSE; gail_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE); - if (GTK_WIDGET_TOPLEVEL (widget)) + if (gtk_widget_is_toplevel (widget)) { if (coord_type == ATK_XY_WINDOW) { @@ -862,7 +862,7 @@ gail_widget_set_size (AtkComponent *component, return FALSE; gail_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE); - if (GTK_WIDGET_TOPLEVEL (widget)) + if (gtk_widget_is_toplevel (widget)) { gtk_widget_set_size_request (widget, width, height); return TRUE; diff --git a/modules/other/gail/gailwindow.c b/modules/other/gail/gailwindow.c index 7b4ef4f955..416e0f5910 100644 --- a/modules/other/gail/gailwindow.c +++ b/modules/other/gail/gailwindow.c @@ -563,7 +563,7 @@ gail_window_get_extents (AtkComponent *component, gail_return_if_fail (GTK_IS_WINDOW (widget)); - if (!GTK_WIDGET_TOPLEVEL (widget)) + if (!gtk_widget_is_toplevel (widget)) { AtkComponentIface *parent_iface; @@ -608,7 +608,7 @@ gail_window_get_size (AtkComponent *component, gail_return_if_fail (GTK_IS_WINDOW (widget)); - if (!GTK_WIDGET_TOPLEVEL (widget)) + if (!gtk_widget_is_toplevel (widget)) { AtkComponentIface *parent_iface; diff --git a/modules/other/gail/tests/testaction.c b/modules/other/gail/tests/testaction.c index 9bed7301dc..4e13c591d0 100644 --- a/modules/other/gail/tests/testaction.c +++ b/modules/other/gail/tests/testaction.c @@ -22,7 +22,7 @@ _check_object (AtkObject *obj) GtkWidget* widget = NULL; widget = GTK_ACCESSIBLE (obj)->widget; - typename = g_type_name (GTK_OBJECT_TYPE (widget)); + typename = g_type_name (G_OBJECT_TYPE (widget)); g_print ("Widget type name: %s\n", typename ? typename : "NULL"); } typename = g_type_name (G_OBJECT_TYPE (obj)); diff --git a/modules/other/gail/tests/testnotebook.c b/modules/other/gail/tests/testnotebook.c index 9ba4154a6f..5e8c690763 100644 --- a/modules/other/gail/tests/testnotebook.c +++ b/modules/other/gail/tests/testnotebook.c @@ -24,7 +24,7 @@ static void _print_type (AtkObject *obj) GtkWidget* widget = NULL; widget = GTK_ACCESSIBLE (obj)->widget; - typename = g_type_name (GTK_OBJECT_TYPE (widget)); + typename = g_type_name (G_OBJECT_TYPE (widget)); g_print ("\tWidget type name: %s\n", typename ? typename : "NULL"); } diff --git a/modules/other/gail/tests/testobject.c b/modules/other/gail/tests/testobject.c index c96516daec..2c8d595dbc 100644 --- a/modules/other/gail/tests/testobject.c +++ b/modules/other/gail/tests/testobject.c @@ -54,7 +54,7 @@ static void _print_type (AtkObject *obj) GtkWidget* widget = NULL; widget = GTK_ACCESSIBLE (obj)->widget; - typename = g_type_name (GTK_OBJECT_TYPE (widget)); + typename = g_type_name (G_OBJECT_TYPE (widget)); g_print ("Widget type name: %s\n", typename ? typename : "NULL"); } typename = g_type_name (G_OBJECT_TYPE (obj)); diff --git a/modules/other/gail/tests/testselection.c b/modules/other/gail/tests/testselection.c index 539dc755bb..4cd90d5ca3 100644 --- a/modules/other/gail/tests/testselection.c +++ b/modules/other/gail/tests/testselection.c @@ -58,7 +58,7 @@ static void _print_type (AtkObject *obj) GtkWidget* widget = NULL; widget = GTK_ACCESSIBLE (obj)->widget; - typename = g_type_name (GTK_OBJECT_TYPE (widget)); + typename = g_type_name (G_OBJECT_TYPE (widget)); g_print ("Widget type name: %s\n", typename ? typename : "NULL"); } typename = g_type_name (G_OBJECT_TYPE (obj)); |