It doesn't make sense to keep them separate as GtkSizeRequest requires a
GtkWidget and GtkWidget implements GtkSizeRequest, so you can never have
one without the other.
It also makes the code a lot easier because no casts are required when
calling functions.
Also, the names would translate to gtk_widget_get_width() and people
agreed that this would be a too generic name, so a "preferred" was added
to the names.
So this patch moves the functions:
gtk_size_request_get_request_mode() => gtk_widget_get_request_mode()
gtk_size_request_get_width() => gtk_widget_get_preferred_width()
gtk_size_request_get_height() => gtk_widget_get_preferred_height()
gtk_size_request_get_size() => gtk_widget_get_preferred_size()
gtk_size_request_get_width_for_height() =>
gtk_widget_get_preferred_width_for_height()
gtk_size_request_get_height_for_width() =>
gtk_widget_get_preferred_height_for_width()
... and moves the corresponding vfuncs to the GtkWidgetClass.
The patch also renames the implementations of the vfuncs in widgets to
include the word "preferrred".
Since we have a new mechanism for requesting sizes: GtkSizeRequestIface;
it makes no sense to maintain this cache on the GtkWidget structure...
removing the requisition cache however does not break the old "size-request"
signal which is there for backwards compatability reasons.
In any case widget->requisition should not have been accessed,
gtk_widget_get_child_requisition() would have been the correct way
to consult the cache.
This commit also deprecates the newly added gtk_widget_get_requisition()
API and makes it fallback on gtk_size_request_get_size().
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
2009-02-01 Behdad Esfahbod <behdad@gnome.org>
Bug 569635 – fontchooser should reload list of families/styles on
theme change
* gtk/gtkfontsel.c (gtk_font_selection_class_init),
(gtk_font_selection_init), (gtk_font_selection_finalize),
(gtk_font_selection_ref_family), (gtk_font_selection_ref_face),
(gtk_font_selection_reload_fonts),
(gtk_font_selection_screen_changed),
(gtk_font_selection_style_set),
(gtk_font_selection_scroll_to_selection),
(gtk_font_selection_scroll_on_map),
(gtk_font_selection_select_font),
(gtk_font_selection_show_available_fonts),
(gtk_font_selection_show_available_styles),
(gtk_font_selection_select_style),
(gtk_font_selection_select_font_desc),
(gtk_font_selection_set_font_name):
Reload Pango families and faces in style_set. Installing/uninstalling
fonts shows up immediately in an open font chooser now.
svn path=/trunk/; revision=22269
shouldn't require a screen
* gtk/gtkfontsel.c (gtk_font_selection_set_font_name):
Don't warn if there is no screen, just return FALSE
svn path=/trunk/; revision=21621
2008-08-04 Michael Natterer <mitch@imendio.com>
* gtk/gtkfontsel.c (gtk_font_selection_dialog_get_font):
avoid our own deprecated public API and use
gtk_font_selection_get_font_internal() instead of
gtk_font_selection_get_font().
(gtk_font_selection_get_font)
(gtk_font_selection_dialog_get_font): Add missing
"Deprecated: 2.0" to the api doc comments.
svn path=/trunk/; revision=20962
2008-06-30 Cody Russell <bratsche@gnome.org>
* Practically everything changed.
Change all references of GIMP Toolkit (and variations of it)
to GTK+ Toolkit, showing no mercy at all to our beloved
ancestry. (#540529)
svn path=/trunk/; revision=20709
2006-05-19 Damon Chaplin <damon@gnome.org>
* gtk/gtkfontsel.c (gtk_font_selection_init): use
atk_relation_add_target() to add the targets, since it sets up weak
references to avoid crashes. (#305530)