Commit Graph

29646 Commits

Author SHA1 Message Date
Benjamin Otte
a4630d0e7b rbtree: Introduce _gtk_rbtree_is_nil()
Makes for more readable code than "== tree->nil" and allows removing the
nil member later.
2011-11-22 03:32:56 +01:00
Benjamin Otte
c3056951db rbtree: Introduce _gtk_rbtree_first()
... and use it.
2011-11-22 03:32:56 +01:00
Benjamin Otte
73a834336f rbtree: Replace nil node allocation with a preallocated nil
This has one major caveat: The new value is const, so read-only memory.
Any attempt to write to it will cause a crash. Note that we are not ever
supposed to write to it, but bugs happen...
2011-11-22 03:32:56 +01:00
Matthias Clasen
fa89423346 Bump version 2011-11-21 18:34:11 -05:00
Matthias Clasen
84c0ccad47 3.3.4 2011-11-21 18:14:13 -05:00
Matthias Clasen
7c6bbf59d7 More updates 2011-11-21 17:12:27 -05:00
Benjamin Otte
e2f2289d72 tests: Add a test for the rbtree code. 2011-11-21 22:33:46 +01:00
Benjamin Otte
647c441e26 rbtree: Don't write to nil node
The code used to set nil->parent, which could cause segfaults. Don't do
that. We also need to pass the parent explicitly to the fixup code,
because the node during fixup may be the nil node.
2011-11-21 22:33:46 +01:00
Benjamin Otte
f4fe921a17 rbtree: Add a local variable
This will be needed in the next patch, and I wanted to split that patch
up.
2011-11-21 22:33:46 +01:00
Benjamin Otte
02671f9ec9 rbtree: Move to an approach where we don't move contents
So instead of copying the children and height to the new node, we keep
the old node and copy all the old stuff to it.

This is necessary so the accessibility code can use the node as a key in
the hash table or store the node as a reference to the row instead of
GtkTreeRowReference. And because it already does that (oops), this fixes
a bunch of segfaults with a11y enabled.
2011-11-21 22:33:45 +01:00
Benjamin Otte
1dd9dd45c1 rbtree: Use gtk_rbnode_adjust() even more
Use it for the modified node in gtk_rbnode_remove(). Cleans up the code
quite a lot.
2011-11-21 22:33:45 +01:00
Benjamin Otte
769186dbff rbtree: Use gtk_rbnode_adjust()
Make gtk_rbnode_remove() use it when unlinking the node.
2011-11-21 22:33:45 +01:00
Benjamin Otte
ba7a0a0188 rbtree: Use gtk_rbnode_adjust() more.
Make _gtk_rbtree_node_set_height() use it.
2011-11-21 22:33:45 +01:00
Benjamin Otte
7b2d414222 rbtree: Use gtk_rbnode_adjust() more
Make _gtk_rbtree_insert_before() use it.
2011-11-21 22:33:45 +01:00
Benjamin Otte
01a44e2a16 rbtree: Use gtk_rbnode_adjust()
Make _gtk_rbtree_insert_after() use it.
2011-11-21 22:33:45 +01:00
Benjamin Otte
22a4c15b4f rbtree: Split out a common function
gtk_rbtree_adjust() will adjust the summed values of a node and all its
parents in the tree. Currently only implemented by splitting out the
function from gtk_rbtree_free().
2011-11-21 22:33:45 +01:00
Benjamin Otte
54f3fbfe26 rbtree: Don't set variable twice 2011-11-21 22:33:45 +01:00
Benjamin Otte
6168a64713 rbtree: Add assertions to clarify usage 2011-11-21 22:33:45 +01:00
Benjamin Otte
69a516018f rbtree: Mark all debug sections as debug 2011-11-21 22:33:45 +01:00
Benjamin Otte
af2ebe638c rbtree: Make debug functions private
They're not used elsewhere
2011-11-21 22:33:45 +01:00
Cosimo Cecchi
79bbce5577 notebook: use the current page allocation when computing the redraw area
Instead of taking the first page and trying to adjust the rect with
random padding values, take the current page, as it's always guaranteed
to be at least as tall as inactive tabs.
This fixes some annoying 1px drawing artifacts while switching tabs when
the theme disables notebook padding.

https://bugzilla.gnome.org/show_bug.cgi?id=664494
2011-11-21 14:19:36 -05:00
Cosimo Cecchi
f01162c727 notebook: properly subtract the initial_gap width from the tab space
Instead of modifying the allocation.

https://bugzilla.gnome.org/show_bug.cgi?id=664494
2011-11-21 14:19:36 -05:00
Matthias Clasen
7814718152 Drop uses of @returns syntax 2011-11-21 13:12:58 -05:00
Matthias Clasen
7e8b7a72ac Prevent local filesystem influence in the a11y tests
By using the 'unix' gio volume monitor, we avoid variation
in the file chooser that otherwise breaks the 'pickers' test.
2011-11-21 13:05:47 -05:00
Alexander Larsson
9275b87b6a win32: Don't double free stuff when finalizing drag context
We were freeing stuff that was already freed in the parent class
finalizer.
2011-11-21 15:03:53 +01:00
Alexander Larsson
0d94b974b3 win32: Don't dereference keyboard_grab if it is NULL
This fixes a crash in e.g. testdnd
2011-11-21 14:37:57 +01:00
Alexander Larsson
4760b3e2bd win32: Make gdk_drag_context_new static 2011-11-21 14:34:06 +01:00
Dieter Verfaillie
2fb8b97b65 win32: get rid of GdkDragContextPrivateWin32 and related machinery.
This turns GdkWin32DragContext into a proper GdkDragContext subclass.
Because we now correctly initialize GdkWin32DragContext in
gdk_drag_context_new, we no longer crash immediatly when a DnD
operation is initialized (the find_window, drag_status, ... vfuncs
where all pointing to 0x0 instead of their proper win32 implementations).

We now try to consistently refer to GdkDragContext as "context",
GdkWin32DragContext as "win32_context" and the ole2 related
target_drag_context and source_drag_context as "ctx".

Members of GdkWin32DragContext only used by the ole2 DnD codepaths
are now explicitly marked with a ole2_dnd_ prefix.
2011-11-21 14:34:06 +01:00
Alexander Larsson
c533482f80 Convert gtk-win32.css to unix line endings 2011-11-21 14:31:17 +01:00
Alexander Larsson
c6dab00595 Add gtk_symbolic_color_new_win32 to gtk.symbols 2011-11-21 13:53:31 +01:00
Alexander Larsson
07e284a1f0 win32-theme: Fix up docs for gtk_symbolic_color_new_win32 2011-11-21 13:52:39 +01:00
Alexander Larsson
4bfa35417b Merge branch 'win32-theme2' 2011-11-21 13:49:44 +01:00
John Ralls
1e737bb61b [icons] text-x-generic isn't a generated icon
Calling it one causes maintainer-clean to delete it.
2011-11-20 16:38:34 -08:00
Javier Jardón
5c6656e485 gtk/gtkapplication.c: Fix typo 2011-11-20 23:05:47 +00:00
Cosimo Cecchi
4626edb889 frame: make sure to allocate the CSS border width
Similar to GtkNotebook, GtkFrame was only allocating space for the
padding width, and not the border.

This could be seen by just running tests/testframe. With a theme that
renders frame borders, setting xthickness = 0 in the test draws the
button border over the frame border, which is wrong.

https://bugzilla.gnome.org/show_bug.cgi?id=664342
2011-11-20 16:03:31 -05:00
Cosimo Cecchi
b9b01f99b6 frame: add GTK_STYLE_CLASS_FRAME in _init()
Instead of adding it every time we use the GtkStyleContext, just add it
in _init().

https://bugzilla.gnome.org/show_bug.cgi?id=664342
2011-11-20 16:03:31 -05:00
Cosimo Cecchi
009224a80e notebook: make sure to allocate the CSS border width
Instead of taking only the CSS padding into account when allocating the
notebook children, also allocate the border width.

https://bugzilla.gnome.org/show_bug.cgi?id=664342
2011-11-20 16:03:31 -05:00
Rui Matos
e60fa49fa7 Bug 653676 - Expand/Collapse doesn't respond after one click
Ignore leave-notify-event when mode is GDK_CROSSING_GTK_[UN]GRAB.
Just [un]grabbing shouldn't cause us to [un]prelight the current arrow
and node.
2011-11-20 21:00:08 +01:00
Kristian Rietveld
44a064fe30 Don't call scroll to cell if the tree view is empty
Account for the case when gtk_drag_finish() didn't actually add a row
(can happen when dragging from an empty tree view to itself ...).
2011-11-20 20:15:48 +01:00
Kristian Rietveld
a069ec662f Bug 660554 - gtk_tree_view_drag_begin: assertion `path != NULL' failed
Turned assertion into silent return.

This assertion is only hit when dragging from an empty tree view.  In
this case, gtk_tree_view_begin_drag() is triggered from gtkdnd.c and not
from gtk_tree_view_maybe_begin_dragging_row().  We actually want to
cancel the drag at this point, but that is not possible with the GTK+
API as far as I can see.

The alternative is to not allowing the drag to start.  This could be
done by simply unsetting the tree view as drag source when it is empty
and setting it as drag source again when rows are added.  I didn't
choose to go with this for now, since this will likely break third party
code.
2011-11-20 20:15:39 +01:00
Kristian Rietveld
64a38bdb82 quartz: fix coding style in quartz-version of gtk_drag_begin_internal 2011-11-20 20:15:32 +01:00
Kristian Rietveld
477b7f27e0 quartz: do not call gdk_drag_begin() twice
This makes drag and drop work again on Quartz.
2011-11-20 20:15:27 +01:00
John Ralls
eafff409c9 [Bug 664238] GTK apps crash when dragging something
Corrects a bad condition in a test in 085b98f4
2011-11-20 10:35:40 -08:00
Jorge González
aa17b2c578 Updated Spanish translation 2011-11-20 10:40:15 +01:00
Matthias Clasen
cd2af02c48 Adapt iconview a11y test output 2011-11-19 19:53:43 -05:00
Matthias Clasen
c3d96ff2c0 Improve AtkText implementations
There was some regressions from the recent display line fix;
while fixing it improve the test coverage and make GtkEntry
and GtkTextView return identical results.
2011-11-19 19:28:48 -05:00
Matthias Clasen
bcc98cf14c Remove leftover debug spew 2011-11-19 18:13:42 -05:00
Matthias Clasen
f2569ba92b Add a missing static 2011-11-19 18:08:18 -05:00
Matthias Clasen
5e11bf18d5 Fix the build 2011-11-19 17:57:26 -05:00
Matthias Clasen
e49fb9f2ac Updates 2011-11-19 16:15:46 -05:00