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".
The keysyms create a lot of potential namespace conflicts for
C, and are especially problematic for introspection, where we take
constants into the namespace, so GDK_Display conflicts with GdkDisplay.
For C application compatiblity, add gdkkeysyms-compat.h which uses
the old names.
Just one user in GTK+ continues to use gdkkeysyms-compat.h, which is
the gtkimcontextsimple.c, since porting that requires porting more
custom Perl code.
Allow windows to be dragged by clicking on empty areas in menubars
and toolbars. This is under theme control, via the GtkWidget::window-dragging
style property. The idea is that it makes sense to turn this on if a
theme makes the window frame and the menubar/toolbar appear visually
contiguous.
The main patch was written by Cody Russell, with a contribution by
Ayan George. See bug 611313.
This commit was created using a script that searched for all docstrings
containing a parameter and the string 'or %NULL'.
Gdk backends and demos excluded as they are not part of a public API
https://bugzilla.gnome.org/show_bug.cgi?id=610474
GtkIconSize is an extensible enumeration (via
gtk_icon_size_register()), so methods that claim to take/return a
GtkIconSize need to actually use "int" to work correctly with bindings
that are strict about enum values.
https://bugzilla.gnome.org/show_bug.cgi?id=604895
The Gtk-custom.c file in gir-repository contained a number of
introspection annotations. Merge those into the GTK source files.
Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.
* gtk/gtksettings.c: (settings_install_property_parser): Handle enums too.
* gtk/gtktoolbar.c (gtk_toolbar_class_init): Move the gtk-toolbar-style and
gtk-toolbar-icon-size settings into GtkSettings because we now use it in
GtkToolPalette too.
* gtk/gtktoolpalette.[h|c]: Add gtk_tool_palette_unset_style() and
gtk_tool_palette_unset_icon_size(), and use the toolbar-style and
icon-size from GtkSettings if these are not set via the set functions.
* demos/gtk-demo/toolpalette.c (on_combo_style_changed),
(do_toolpalette): Add and handle a -1 value to mean the desktop "Default"
toolbar style.
* gtk/gtktoolbar.c (slide_idle_handler): Make sure we queue
at least one resize. This fixes a problem with toolitems remaining
invisible when they shouldn't that was reported by Christian Weiske.
svn path=/trunk/; revision=22260
2009-01-18 Christian Dywan <christian@twotoasts.de>
Remove a redundant include from gtktoolbar.c
* gtk/gtktoolbar.c: Remove second inclusion of gtktoolbar.h.
Patch by Enrico Tröger.
svn path=/trunk/; revision=22130