Commit Graph

155 Commits

Author SHA1 Message Date
Matthias Clasen
ffa42cb5bb Nuke GtkBoxAccessible
It didn't contain anything useful.
2012-11-07 20:17:30 -05:00
Stefano Facchini
fb18145c06 box: Fix typo
https://bugzilla.gnome.org/show_bug.cgi?id=683718
2012-09-11 21:40:46 +02:00
Cosimo Cecchi
f900df6f01 box: set orientation style classes when setting orientation
Since we override the property, we have to call the internal helper
manually.
2012-05-11 11:46:59 -04:00
Benjamin Otte
33f111a47c widget: Don't cache widget paths all the time
Add an internal API that allows GtkStyleContext to create a widget path
for the widget and with that bypassing gtk_widget_get_path() and that
  function caching the path.
2012-04-17 08:59:21 +02:00
Benjamin Otte
ece9d2fd92 gtk: Make widget only invalidate widget positions
Instead of resetting them completely
2012-04-17 08:59:10 +02:00
Benjamin Otte
461803e407 gtk: Get gtkwidgetpath.h includes out of the public headers
and include them in the C files instead.
2012-03-19 02:26:16 +01:00
Lionel Landwerlin
adf36e28d2 gtkbox: avoid warning when removing a widget with refcount of 1
If gtkbox is the only object having a reference on one of its child
and that we try to remove it from its container, we endup having a
warning when disconnecting a signal after having unparented the
widget.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=670176
2012-03-18 15:41:07 -04:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Javier Jardón
8985ce3b72 gtkbox: Move private functions to private header 2011-10-02 21:30:42 +01:00
Javier Jardón
b0a7db76fb Replace some references to the GtkTable, use GtkGrid instead 2011-09-29 12:38:49 +01:00
Michael Natterer
a6151ebb95 GtkBox: make get_path_for_child() work if there are internal children
Use foreach() instead of forall() to find the child's siblings
because internal children of subclasses have no sibling relation
to the box' children. Also deal with the subclass failing to
implement get_path_for_child(). This caused an infinite widget
path invalidation loop of sorts with GimpMessageBox, which is a
vertical box with a decorative icon to the left.
2011-09-26 00:52:28 +02:00
Matthias Clasen
896769df69 Convert GailExpander to GtkExpanderAccessible
At the same time, drop the AtkText implementation.
Also, reintroduce a GtkBoxAccessible, since the previous
way of setting the role in get_accessible was affecting
GtkBox subclasses negatively.

Adjust expected test output to match.
2011-07-05 16:08:57 -04:00
Matthias Clasen
8bb24a936f Don't overwrite roles
Otherwise, every GtkBox subclass will have to override
get_accessible just to keep their roles.
2011-07-05 16:08:56 -04:00
Matthias Clasen
1ef996ca3c Remove GailBox
It was only setting a role, and we can do that just as well
in get_accessible().
2011-07-05 16:08:53 -04:00
Benjamin Otte
246a7ecbc9 box: Remove cache for sibling paths
We can't cache this path as widgets might dynamically add or remove
style classes without telling us. At which point the stored path does
not work.
2011-07-02 01:40:16 +02:00
Cosimo Cecchi
ef153a5fff box: follow children visibility when building the sibling path
This fixes nth-child not working for widgets which were not
visible before being added to the box, but it's also a better fix
for https://bugzilla.gnome.org/show_bug.cgi?id=652769
2011-07-01 11:48:22 -04:00
Cosimo Cecchi
e731caf8d0 Revert "gtkbox: Invalidate order on changes, even if the child is not visible"
This reverts commit 8cb0cc58e3.
2011-07-01 11:47:41 -04:00
Vincent Untz
8cb0cc58e3 gtkbox: Invalidate order on changes, even if the child is not visible
When we build the sibling path for the order, we do not skip hidden
children (since, quoting the comment, "we cannot reliably detect changes
in widget visibility"). So we need to invalidate the order when hidden
children are reordered and removed.

https://bugzilla.gnome.org/show_bug.cgi?id=652769
2011-06-30 09:11:28 +02:00
Matthias Clasen
9bb5077b90 GtkBox: don't reset styles too often 2011-06-16 22:15:50 -04:00
Matthias Clasen
2204405c9c Expand migration hints for h/v boxes 2011-06-10 17:40:16 -04:00
Murray Cumming
151bcc6dfa Box, etc: Improve docs after H* and V* deprecations.
Stop documenting the base class as just a base class for the
H and V specializations, copying the useful descriptions from
those H/V classes to the base class. Do not advise the use of
the H/V classes or refer to them unnecessarily.
2011-06-10 09:50:45 +02:00
Benjamin Otte
2bc0fca209 box: Add RTL support for sibling paths
We want the reverse path when the box is right-to-left.
2011-06-02 02:03:51 +02:00
Benjamin Otte
cd838480eb box: Add support for siblings in widget paths of box children 2011-06-02 02:03:51 +02:00
Benjamin Otte
bc9c43c1cb box: Only emit pack-type notify if the pack type really changed
This is not very useful in itself, but the code reorg will be useful
once we do style invalidation.
2011-06-02 02:03:51 +02:00
Matthias Clasen
6ca6691966 GtkBoxPrivate: Improve struct packing 2011-04-12 12:24:56 -04:00
Tristan Van Berkom
887142f1f5 Added GTK_SIZE_REQUEST_CONSTANT_SIZE to GtkSizeRequestMode
The constant size request mode defines a request mode where
height-for-width geometry is unneeded, thus optimizing GTK+
by reducing the overall amount of requests that need to be
performed and cached while resizing an interface.
2011-03-25 18:42:07 +09:00
Matthias Clasen
e2ba86289f Only count visible children during size request
This was causing spacing between image and label to be requested
in buttons, even though the image is invisible.
2011-03-05 23:27:26 -05:00
Matthias Clasen
fb860a9527 Add a note to ::fill and ::expand docs 2011-01-31 10:26:28 -05:00
Pavel Holejsovsky
2fb1c06402 [GI] Add missing (out) and (array) annotations 2011-01-20 13:57:20 +01:00
Matthias Clasen
16877b4d7b Reduce includes of gtktypeutils.h to a minimum 2011-01-04 12:05:05 -05:00
Tristan Van Berkom
eb5a500495 Changing GtkBox:fill child property default back to TRUE.
Since Havoc's patches introducing the GtkWidget halign/valign
properties, fill should always be TRUE. If the widget should
not fill its allocated space then it should set the halign or
valign properties for that purpose.

This also consequently fixes bug 634592.
2010-11-25 14:37:02 +09:00
Murray Cumming
764f627733 Fix tiny documetnation typo. 2010-11-02 10:43:42 +01:00
Michael Natterer
3a0afce509 gtk: remove "gboolean homogeneous" from gtk_box_new()
Because it's FALSE in virtually all use cases.
2010-10-31 19:22:28 +01:00
Javier Jardón
73bac5af3b Emphasize that GtkBox and GtkTable can be replaced by GtkGrid 2010-10-30 06:53:44 +02:00
Matthias Clasen
c750003168 Point to GtkGrid from the GtkBox and GtkTable docs 2010-10-22 19:59:29 +02:00
Matthias Clasen
a7465c3479 Fix a typo 2010-10-22 16:42:50 +02:00
Matthias Clasen
56e797397b Improve GtkBox and GtkTable docs a bit
This adds some details gleaned from the tutorial, before its
impending demise.
2010-10-15 10:58:35 -04:00
Havoc Pennington
8abb18f910 Support GtkWidget expand properties in GtkBox
This consists of:
* expand a child if either child->expand || gtk_widget_get_expand(child)
* override compute_expand so that child->expand will cause us to
  return TRUE for gtk_widget_get_expand()

https://bugzilla.gnome.org/show_bug.cgi?id=628902
2010-10-13 10:49:06 -04:00
Matthias Clasen
f53ad33994 Remove GtkObject completely 2010-09-26 22:18:19 -04:00
Benjamin Otte
d9c9259861 Move GtkSizeRequest into GtkWidget
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".
2010-09-26 15:11:45 +02:00
Matthias Clasen
8204fe6036 GtkBox: let GtkContainer handle border width 2010-09-13 18:47:58 -04:00
Javier Jardón
1e5d7c0225 Use GtkFooPrivate instead GtkFooPriv 2010-08-27 04:48:23 +02:00
Javier Jardón
d9b459dd64 gtk/gtkbox.c: use accessor functions to access GtkWidget 2010-08-22 22:56:16 +02:00
Tristan Van Berkom
0cb7aa9c7b GtkBox: Clipped values passed to gtk_distribute_natural_allocation() incase allocated less than requested. 2010-08-18 20:01:27 -04:00
Tadej Borovšak
35105ab2b4 Fix improperly unwinded loops 2010-08-06 20:08:32 -04:00
Tadej Borovšak
651bed57a4 Implement fair extra space allocation 2010-08-06 17:28:07 -04:00
Tristan Van Berkom
95b3e63057 Migrated old loops to use gtk_distribute_allocation(). 2010-08-05 12:50:25 -04:00
Carlos Garcia Campos
76267f9d06 Add _gtk_box_get_children() internal function
https://bugzilla.gnome.org/show_bug.cgi?id=625300
2010-08-05 09:51:15 +02:00
Javier Jardón
6852137e13 Move GtkBoxChild from the public .h to gtkbox.c
https://bugzilla.gnome.org/show_bug.cgi?id=624397
2010-07-20 02:58:36 +02:00
Paolo Borelli
0754f2d72f Do not use GtkBoxChild in GtkButtonBox.
Do not store the is_secondary bit in the deprecated parent struct, use a
simple flag on the object instead. Fixes bug #624367.
2010-07-15 22:42:07 +02:00