Commit Graph

209 Commits

Author SHA1 Message Date
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Matthias Clasen
54077d61e2 Add some element-type annotations to gtk apis 2010-09-17 09:26:39 -04:00
Javier Jardón
b140884fec Use gtk_size_request_get_size() instead deprecated gtk_widget_size_request()
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629598

Signed-off-by: Javier Jardón <jjardon@gnome.org>
Signed-off-by: Tristan Van Berkom <tristanvb@openismus.com>
2010-09-15 03:02:58 +02:00
Havoc Pennington
daebca19da add gtk_container_class_handle_border_width() so subclasses can ignore border_width
A subclass calls gtk_container_class_handle_border_width()
in its class_init

This marks the subclass as expecting GtkContainer to deal with
border width automatically, which GtkContainer then does.
2010-09-12 21:47:10 -04:00
Tristan Van Berkom
9934007420 Completely removed requisition cache from GtkWidget instance structure.
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().
2010-09-08 18:50:24 +02:00
Stefan Kost
9074f74c6f container: use priv in last commit
container->focus_child to container->priv->focus_child
2010-09-01 17:33:33 +03:00
Stefan Kost
267a2156d8 container: clarify the docs
Hightlight more that focus_child is a container internal thing and suggest
what application developers most likely were looking for instead.
2010-09-01 16:59:00 +03:00
Stefan Kost
b00b1c33a3 container: don't leak the focus_child ref count
gtk_conatiner_set_focus_child() takes a ref. Release the ref in _destroy().
Fixes #414712.
2010-09-01 16:59:00 +03:00
Matthias Clasen
d2d344a531 Remove a workaround for old toolbar api
The old, deprecated toolbar api has been removed, so this workaround
is no longer necessary.
2010-08-28 19:11:23 -04:00
Javier Jardón
1e5d7c0225 Use GtkFooPrivate instead GtkFooPriv 2010-08-27 04:48:23 +02:00
Javier Jardón
595b27e22d gtk/gtkcontainer.c: Use accessor functions to access GtkWindow 2010-08-23 20:18:03 +02:00
Benjamin Otte
7eabb8fd3c container: suggest parentheses around assignment used as truth value 2010-08-23 12:37:22 +02:00
Javier Jardón
3a89cc150c gtk/gtkcontainer.c: use accessor functions to access GtkWidget 2010-08-22 22:56:13 +02:00
Javier Jardón
83372be93e gtk/gtkcontainer.c: use accessor functions to access GtkWidget 2010-08-22 22:56:13 +02:00
Javier Jardón
2de1f3f88c gtkcontainer: Move public members to private structure 2010-07-13 19:40:46 +02:00
Javier Jardón
63f8313015 gtkcontainer: Add _gtk_container_get_reallocate_redraws internal accessor
Only used in gtkwidget
2010-07-13 19:40:46 +02:00
Javier Jardón
dfb24fd56e gtkcontainer: Add _gtk_container_*_need_resize internal accessors
gtkoffscreenwindow and gtkwindow need access to need_resize var
2010-07-13 19:40:46 +02:00
Javier Jardón
0a07e9733b gtk/: fully remove gtkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:51:26 +02:00
Benjamin Otte
3e96cfe8fc Deprecate the GdkRegion API
Includes fixing all callers to use the cairo region API instead. This is
usually just replacing the function names, the only difference is
gdk_region_get_rectangles() being replaced by
cairo_region_num_rectangles() and cairo_region_get_rectangle() which
required a bit more work.

https://bugzilla.gnome.org/show_bug.cgi?id=613284
2010-06-29 16:06:38 +02:00
Javier Jardón
154e3ba502 gtkcontainer: Remove unused GtkForeachData struct
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=619672
2010-05-27 03:37:32 +02:00
Javier Jardón
73b066814b Remove unused function
gtk_container_foreach_unmarshal() is not used anymore.
2010-05-03 01:51:19 +02:00
Javier Jardón
8d9e37f407 Remove all deprecated stuff from GtkContainer 2010-05-03 01:51:19 +02:00
Tristan Van Berkom
d2c35ec62a Mega commit to change ->get_desired_size() for ->get_desired_width/height().
This commit changes gtk_extended_layout_get_desired_size() for
per dimension variants. Furthermore this commit reverts the actions
done in size-groups for now as it needs a different approach.

The natural width/height parameters added to aux_info have been changed
for a per width cache for heights and a per height cache for widths.

gtk-demo is still working, currently sizegroups are not taken
into account as mentioned above - size groups need to be alerted both
when the widths and heights are updated independantly and then that
information needs to repropagate also to other extended layout implementors.
2010-04-12 22:21:46 -04:00
Javier Jardón
a602ff82eb Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_MAPPED)
Use new API instead: gtk_widget_set_mapped ()

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:59:03 -04:00
Javier Jardón
ee0bf98769 Deprecate widget flag: GTK_WIDGET_REALIZED
Use gtk_widget_get_realized() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:58:59 -04:00
Javier Jardón
e53efb120a Deprecate widget flag: GTK_WIDGET_MAPPED
Use gtk_widget_get_mapped() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:58:58 -04:00
Javier Jardón
edc65ce1d2 Deprecate widget flag: GTK_WIDGET_VISIBLE
Use gtk_widget_get_visible() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:58:20 -04:00
Javier Jardón
eb90ec7513 Deprecate widget flag: GTK_WIDGET_HAS_FOCUS
Use gtk_widget_has_focus() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:56:30 -04:00
Javier Jardón
04aba4bde2 Deprecate widget flag: GTK_WIDGET_DRAWABLE
Use gtk_widget_is_drawable() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:56:29 -04:00
Johan Dahlin
eee7bb2b2e [annotations] Add allow-none
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
2010-04-03 20:56:15 -04:00
Christian Dywan
4285f21b3b Limit GtkContainer::border-width to 65535
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=605199
2010-04-03 20:55:13 -04:00
Javier Jardón
f8d1cf58af Deprecate widget flag: GTK_WIDGET_CAN_FOCUS
https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:55:11 -04:00
Christian Dywan
bcb255593d Don't use GTK_WIDGET_NO_WINDOW in GtkContainer 2010-04-03 20:55:08 -04:00
Christian Dywan
fc2cbf960c 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
2010-04-03 20:55:07 -04:00
Colin Walters
fcbbd763cd [introspection] Merge in Gtk-custom.c annotations
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.
2010-04-03 20:51:53 -04:00
Nicola Fontana
1e1131c959 Do not use static GTypeInfo and GInterfaceInfo
Either g_type_register_static_simple (used by G_DEFINE_TYPE_EXTENDED)
and G_IMPLEMENT_INTERFACE use automatic variables for GTypeInfo and
GInterfaceInfo structs, while tutorials and source code often use
static variables. This commit consistently adopts the former method.

https://bugzilla.gnome.org/show_bug.cgi?id=600158
2009-11-06 01:21:09 +01:00
Michael Natterer
59f2a62e9c Revert "Remove deprecated GtkContainer function and macros"
This reverts commit 0e3a46915e.
2009-10-10 18:26:07 +02:00
Javier Jardón
0e3a46915e Remove deprecated GtkContainer function and macros 2009-10-10 16:58:33 +02:00
Michael Natterer
58d2a63481 add missing semicolon.
2008-12-09  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkcontainer.c (struct PackingPropertiesData): add missing
	semicolon.

	* gtk/gtkcontainer.c (attributes_text_element): "value" is a
	gchar*, not const gchar*.


svn path=/trunk/; revision=21862
2008-12-09 15:13:55 +00:00
Matthias Clasen
70675377c0 Make gtk_builder_get_translation_domain() useful for subparsers.
* gtk/gtkbuilderparser.c: Make gtk_builder_get_translation_domain()
        useful for subparsers.

        * gtk/gtkcontainer.c: Make the child property parser support
        translatable child properties.


svn path=/trunk/; revision=21855
2008-12-08 03:57:16 +00:00
Johan Dahlin
3e72ccbcdc Check for child->parent instead of GTK_WIDGET_TOPLEVEL.
2008-11-07  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkcontainer.c (gtk_container_buildable_add_child):
    Check for child->parent instead of GTK_WIDGET_TOPLEVEL.


svn path=/trunk/; revision=21771
2008-11-07 16:25:26 +00:00
Tristan Van Berkom
4858ae47e2 Made buildable and added support for adding children of type "submenu"
* gtk/gtkmenuitem.c: Made buildable and added support for adding children
	of type "submenu"

	* gtk/gtkwindow.c: Added support for custom tag "accel-groups" to add GtkAccelGroups
	to the window.

	* gtk/gtkcontainer.c: Added builder contextual warnings in buildable_add_child()

	* gtk/tests/builder.c: Added tests for buildable menus (test that accelerators are
	properly connected on stock items, test the menu hierarchy, test permission to
	add alien/custom menuitem children).

	* docs/reference/gtk/tmpl/gtkbuilder.sgml, docs/reference/gtk/tmpl/gtkwindow.sgml,
	docs/reference/gtk/tmpl/gtkmenuitem.sgml: Updated docs for buildable submenus
	and accel groups.


svn path=/trunk/; revision=21767
2008-11-06 17:34:30 +00:00
Sven Neumann
b5796771d2 gtk/gtkaccelgroup.c gtk/gtkactiongroup.c gtk/gtkcalendar.c
2008-08-11  Sven Neumann  <sven@gimp.org>

	* gtk/gtkaccelgroup.c
	* gtk/gtkactiongroup.c
	* gtk/gtkcalendar.c
	* gtk/gtkcelleditable.c
	* gtk/gtkclipboard-quartz.c
	* gtk/gtkclipboard.c
	* gtk/gtkcolorbutton.c
	* gtk/gtkcolorsel.c
	* gtk/gtkcontainer.c
	* gtk/gtkcurve.c: use canonical signal names.


svn path=/trunk/; revision=21068
2008-08-11 13:07:18 +00:00
Michael Natterer
8371b465dc gtk/gtkclist.c gtk/gtkcontainer.c gtk/gtkfilechooserbutton.c
2008-08-07  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkclist.c
	* gtk/gtkcontainer.c
	* gtk/gtkfilechooserbutton.c
	* gtk/gtkgamma.c
	* gtk/gtkmenutoolbutton.c
	* gtk/gtkoptionmenu.c
	* gtk/gtkradiobutton.c
	* gtk/gtkradiomenuitem.c
	* gtk/gtktipsquery.c
	* gtk/gtktree.c
	* gtk/gtktreeview.c: chain up unconditionally in destroy().

	* gtk/gtkhandlebox.c: remove empty destroy() implementation.


svn path=/trunk/; revision=21035
2008-08-07 14:12:32 +00:00
Matthias Clasen
c455b5eac1 Add some missing braces
svn path=/trunk/; revision=21005
2008-08-05 00:21:49 +00:00
Matthias Clasen
94ba6bba06 Doc fixes
svn path=/trunk/; revision=20887
2008-07-21 23:23:41 +00:00
Christian Dywan
bb396a07b2 Remove erroneously added g_return_if_fail (bug #541811).
2008-07-07  Christian Dywan  <christian@imendio.com>

	* gtk/gtkcontainer.c (gtk_container_add_with_properties): Remove
	erroneously added g_return_if_fail (bug #541811).

svn path=/trunk/; revision=20792
2008-07-06 22:24:24 +00:00
Cody Russell
57223c9a05 Revert name change
svn path=/trunk/; revision=20724
2008-07-01 22:57:50 +00:00
Cody Russell
fce9c8b7d4 Practically everything changed.
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
2008-06-30 23:01:56 +00:00
Martyn James Russell
cf1df130dc Fixed the FAQ location in the warning produced here.
* gtk/gtkcontainer.c: (gtk_container_add): Fixed the FAQ location
	in the warning produced here.

svn path=/trunk/; revision=20693
2008-06-27 11:51:40 +00:00