Commit Graph

840 Commits

Author SHA1 Message Date
Javier Jardón
8c941d2b4e Add _gtk_entry_get_im_context() internal accessor
It's needed by gtktreeview
2010-11-19 06:15:27 +01:00
Matthias Clasen
6613fc7b36 Fix the doc build 2010-11-09 08:16:33 -05:00
Javier Jardón
5efde9d6d0 docs: move documentation to inline comments: GtkTreeView 2010-11-06 03:26:14 +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
a9894d4cf4 Use gtk_box_new() instead gtk_[v|h]box_new() 2010-10-30 05:22:58 +02:00
Tristan Van Berkom
add32bab71 Removing size_request from GtkTreeview.
This should be implemented as propery height-for-width by
the treeview-refactor branch. This commit includes a FIXME
comment that scroll adjustments should not be updated from
inside size requests but only after receiving an allocation.
2010-10-27 22:28:41 +09:00
Javier Jardón
f5615022a7 Use accessor functions to access GtkButton 2010-10-26 06:07:42 +02:00
Tristan Van Berkom
3fe0fb4ed9 Added GtkScrollablePolicy property to scrollable interface
This patch adds the GtkScrollablePolicy type property to GtkScrollable
and implements it in all subclasses. GtkScrolledWindow observes this
property to make a good guess about when to show/hide scrollbars for
height-for-width content.

Most scrollable children do not do height-for-width *yet* but
most certainly will (toolpalette, treeview, iconview, textview
widgets all TODO), for scrollable widgets that do have a minimum
and natural size, it's important for them to observe the state
of this property in order to properly drive the scroll adjustments
according to the desired GtkScrollablePolicy. This patch makes
GtkViewport do this.

Patch also adds tests/testscrolledwindow.c to display the effects
of this property.
2010-10-26 10:15:56 +09:00
Tristan Van Berkom
051dcde4bf Fixed fallout from GtkScrollable patches.
The scrollable patch removed set_scroll_adjustments (NULL, NULL) from
gtk_tree_view_init() which ensured the treeview would have adjustments
at all times, this patch adds set_v/hadjustment (NULL) to _init to ensure
the same thing (without it, there are crashes when trying to access the
adjustments notably from set_headers_visible() in gedit).
2010-10-23 22:53:06 +09:00
Matthias Clasen
0d9ebb501d Move min-display-width/height to GtkScrolledWindow
It is just too annoying to have to implement these properties in
every scrollable. Instead, we now have ::min-content-height/width
in GtkScrolledWindow.

We also add GtkScrollablePolicy to determine how to size the
scrollable content.
2010-10-22 19:21:17 +02:00
Tadej Borovšak
55196a705f Add GtkScrollable interface
The GtkScrollable interface provides "hadjustment" and "vadjustment"
properties that are used by GtkScrolledWindow. It replaces
the ::set_scroll_adjustment signal. The scrollable interface
also has ::min-display-width/height properties that can be
used to control the minimally visible part inside a scrolled window.
2010-10-22 11:03:45 +02:00
Emmanuele Bassi
2cc059a0e7 Split off gtkprivate.h
The gtkprivate.h header contains GtkWidget-specific private symbols that
are not useful except in a handful of cases. Basically everything
includes gtkprivate.h for the GTK_PARAM_* macros.

https://bugzilla.gnome.org/show_bug.cgi?id=632539
2010-10-20 10:34:26 +01:00
Federico Mena Quintero
85e47b5c4e Part of bgo#613728 - [GtkTreeView] Focus the list, not the headers, when Tab-focusing
The idea is that it is way more common to want to manipulate the
actual list, rather than the headers.  Once you Tab into the treeview
(and the list part gets the focus), you can use Shift-Tab to focus
the headers.

This means that some hysteresis is added to the focus chain, but
it makes the treeview a lot more convenient to focus with the keyboard.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
2010-10-14 13:17:46 -05:00
Kristian Rietveld
aeec832f0e Do not call validate_visible_area() from the draw method
Because validate_visible_area() can modify the window size (and thus
the underlying surface), it should not be called from within the draw
method.  Given that the presize handler is run with a higher priority
than redraw, and the presize handler will validate the visible area,
there should not be cases wherein the draw method is called and
validate_visible_area() has not been run yet.

However, one such a case was gdk_window_process_updates(), which would
trigger the draw method at some point.  We now work around this
by factoring this in a new gtk_tree_view_bin_process_updates() function
that will run the presize handler first if needed.

Note: for other platforms, it might still be the case that the draw
method is called and validate_visible_area() has not been run yet.
(For example the Mac backend calls gdk_window_process_updates() from
the drawRect method, and the redraw-in-idle handling thus works
differently).  This does not seem to be a problem now, if
it will be in the future we need to take care of that then.
2010-10-14 17:26:17 +02:00
Kristian Rietveld
e732c16aab Use GtkAdjustment accessors to properly compress changed signals 2010-10-12 19:12:44 +02:00
Javier Jardón
b072ea220c Remove unneded casts
As gtk_adjustment_new() returns a GtkAdjustment* now

https://bugzilla.gnome.org/show_bug.cgi?id=630731
2010-09-29 01:18:10 +02:00
Benjamin Otte
de89fe501d treeview: Fix compilation warnings - missing cast 2010-09-28 18:26:05 +02:00
Matthias Clasen
f53ad33994 Remove GtkObject completely 2010-09-26 22:18:19 -04:00
Javier Jardón
eac1959d2c Move destroy signal to GtkWidget
Also make GtkWidget derive from GInitiallyUnowned
2010-09-26 22:18:18 -04:00
Benjamin Otte
41e6da4075 treeview: Use gtk_cairo_transform_to_window() 2010-09-26 15:11:46 +02: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
Benjamin Otte
21d6aba620 treeview: Get rid of gdk_drawable_get_size() usage 2010-09-26 15:11:44 +02:00
Benjamin Otte
1d3f6b30b0 API: Rename gtk_cairo_paint_*() to gtk_paint_*()
Large patch, but just renaming.
Indentation should still mostly be correct because I took care of
keeping the indentation for this function name.
2010-09-26 15:11:42 +02:00
Benjamin Otte
f525837e39 treeview: Port to draw vfunc 2010-09-26 15:11:36 +02:00
Benjamin Otte
327a04807e treeview: Update rubberbanding code to Cairo 2010-09-26 15:11:36 +02:00
Benjamin Otte
bf3b4438bb treeview: Do not put different windows in else if branches anymore 2010-09-26 15:11:36 +02:00
Benjamin Otte
f679516ce1 treeview: Use Cairo for all bin window drawing 2010-09-26 15:11:36 +02:00
Benjamin Otte
62f5fdc856 treeview: Invalidate on expander changes, don't just repaint
Repaints are supposed to be initiated by GDK, not by random repaints.
2010-09-26 15:11:36 +02:00
Benjamin Otte
bc1cd6c5cb treeview: Draw empty tree view with Cairo 2010-09-26 15:11:36 +02:00
Kristian Rietveld
03cf19e8e2 Create cairo context after running validate_visible_area()
validate_visible_area() can change the vertical adjustment and thus
trigger window moves/scrolls.  This seems to change the surface for
which gtk_tree_view_bin_expose() just created a cairo context.  Creating
the cairo context after the call to validate_visible_area() fixes
such crashes.
2010-09-26 15:11:34 +02:00
Benjamin Otte
2ee8fdb79b gtk: gdk_drawable_get_display() => gdk_window_get_display() 2010-09-26 15:11:33 +02:00
Benjamin Otte
9f47be2216 gtk: gdk_drawable_get_screen/visual => gdk_window_get_screen/visual 2010-09-26 15:11:33 +02:00
Benjamin Otte
e8a6bad00b gtk: Don't set colormap anymore when creating GDK windows
Colormaps are about to be removed, so not using them sounds like an
awesome idea.
2010-09-26 15:11:31 +02:00
Benjamin Otte
db47dd6197 API: make gtk_tree_view_create_row_drag_icon() return a cairo_surface_t
GdkPixmap is going to die!
2010-09-26 15:04:02 +02:00
Benjamin Otte
f085bc67cd treeview: Convert GtkTreeViewColumn rendering to Cairo 2010-09-26 15:03:01 +02:00
Benjamin Otte
5e4aaba482 gtk: Remove calls that try to set GDK_NO_BG on their windows
These calls aren't necessary anymore.
2010-09-26 15:03:00 +02:00
Benjamin Otte
8b4d50dd1d treeview: Port to gdk_window_shape_combine_region()
gdk_window_shape_combine_mask() is going away. It's using a GdkPixmap
and falls back to gdk_window_shape_combine_region() anyway.
2010-09-26 15:02:59 +02:00
Matthias Clasen
76d7331578 Fix the annotation of gtk_tree_view_create_row_drag_icon 2010-09-23 13:17:52 -04:00
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Matthias Clasen
92411d2c84 Fix an annotation 2010-09-19 00:22:37 -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
Colin Walters
913cdf3be7 GDK: Prefix key names with KEY_
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.
2010-09-08 18:51:44 -04:00
Javier Jardón
d05d713068 gtk/gtktreeview.c: use accessor functions to access GtkWidget 2010-09-08 21:13:03 +02: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
Matthias Clasen
095fb1afe4 Remove GtkTreeView::row-ending-details
This was a style property to let theme engines 'opt-in' to more
    correct behaviour while maintaining compatibility with existing
    themes. GTK+ 3 engines are expected to handle the more correct
    behaviour.
2010-09-01 20:58:39 -04:00
Matthias Clasen
3e4e2b233b Fix trivial doc typo
Pointed out in bug 627912.
2010-08-25 18:17:43 -04:00
Javier Jardón
c05f344c0a Use gtk_window_has_group() to know if the window has an explicit window group.
gtk_window_get_group() never returns NULL; if the window isn't in a group,
a default window group is returned instead. Use gtk_window_has_group() instead.
This fixes some previous commits to use accessors to access GtkWindow.

Reported by Philip Withnall in bug
https://bugzilla.gnome.org/show_bug.cgi?id=627828
2010-08-24 16:16:42 +02:00
Javier Jardón
f05acd707d gtk/gtktreeview.c: Use accessor functions to access GtkWindow 2010-08-23 20:19:38 +02:00
Matthias Clasen
fb48e023d2 Fix a sporadic segfault in treeview keynav
If a a treeview has frequent periodic additions and removals of
rows, it is possible that a page down keypress moves the cursor
out of the height of the treeview. In some of these cases, we
can be tricked into dereferencing a  NULL pointer.

Bug 612919.
2010-08-10 00:31:46 -04:00
Javier Jardón
237ed3bbf8 Remove some unused variables 2010-08-03 12:44:52 +02:00
Benjamin Otte
5cd6d309ea treeview: Draw the dnd pixmaps with Cairo 2010-07-26 16:42:47 +02:00
Benjamin Otte
da426ec97c treeview: Draw lines with Cairo 2010-07-26 16:42:47 +02:00
Benjamin Otte
8dd3317502 treeview: Unify all line drawing into the same function
This is useful because the dashing stuff needs to be done and it seems
like a good idea to unify it.
2010-07-26 16:42:47 +02:00
Benjamin Otte
526aac1fda treeview: Draw column reordering arrows with Cairo 2010-07-26 16:42:47 +02:00
Szilárd Pfeiffer
ac34031b4e Moved the drawing of horizontal grid lines after cell drawing.
Without the change if the cell background is set the horizontal
grid line cannot be seen.
2010-07-25 14:50:12 +02:00
Javier Jardón
3a10216dd0 Use accessor functions to acces GtkContainer 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
Philip Withnall
0b51abbfdf Add (out) annotations to GtkTreeIter parameters 2010-07-07 18:20:37 +02:00
Benjamin Otte
300e6b84cd s/GdkRegion/cairo_region_t/ in all of gtk
https://bugzilla.gnome.org/show_bug.cgi?id=613284
2010-06-29 16:06:38 +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
Colin Walters
905f988166 Revert "Add length to gtk_tree_path_get_indices"
This reverts commit eebb16eb1a.

Was an accidental commit.
2010-06-28 14:15:10 -04:00
Colin Walters
eebb16eb1a Add length to gtk_tree_path_get_indices
The old version wasn't introspectable as it didn't have a length
return parameter.  Also, delete gtk_tree_path_get_indices_with_depth,
since it's no longer needed.
2010-06-28 13:50:36 -04:00
Tristan Van Berkom
17516dc83c Exposed GtkTreeView's internal GtkTreeSelection for builder files 2010-06-25 12:15:49 -04:00
John (J5) Palmieri
256759a3b7 gtk_tree_view_get_model: return value annotated transfer none 2010-05-27 16:58:52 -04:00
Matthias Clasen
bd4609b140 Merge the xi2-for-master branch 2010-05-25 18:38:44 -04:00
John (J5) Palmieri
57754edef6 add a transfer none annotation to gtk_tree_view_get_selection
* it returns the selection from its priv structure without reffing
2010-05-25 11:49:10 -04:00
Javier Jardón
b18b33ae82 Revert "Forward-port a GtkAdjustment compatibility fix"
In the early 2.14.x releases, GtkAdjustment was changed to enforce
that values are restricted to the range [lower, upper - page_size].
This has always been the documented behaviour, and the recommended
practice is to set page_size to 0 when using adjustments for simple
scalar values, like in a slider or spin button.
Due to the large number of applications that are affected by this
change, the behaviour has been reverted to the old behaviour in
2.14.3, with an explicit warning that this change will be
reintroduced in 2.90.

This reverts commit e6373738fc.

https://bugzilla.gnome.org/show_bug.cgi?id=619474
2010-05-24 15:39:30 +02:00
Kristian Rietveld
f3fa17a16a Bug 565559 - Incorrect leave-notify signals for treeview
Set enter and leave notify mask on header window.

Extract from a patch by Hans van Hintum.
2010-05-12 12:15:48 +02:00
Alan Knowles
ee357cf885 Fix various gir annotations on tree API
Just add (out) tags where needed to generate valid gir.
2010-05-11 13:40:15 +08:00
Christian Dywan
11e97600f0 Remove deprecated GtkTreeView functions 2010-05-03 01:39:50 +02:00
Emmanuele Bassi
621b415e5b tree-view: Use gtk_widget_send_focus_change()
Remove the second (and last) internal user of the GTK_HAS_FOCUS flag.

https://bugzilla.gnome.org/show_bug.cgi?id=593671
2010-04-26 18:59:24 +01:00
Javier Jardón
32b9aeaadd Don't use GTK_WIDGET_STATE in internal code anymore
Use gtk_widget_get/set_state() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-09 02:40:17 +01:00
Javier Jardón
74ed719fa4 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-03-06 12:02:21 +01:00
Javier Jardón
1934de4b65 Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_REALIZED)
Use new API instead: gtk_widget_set_realized ()

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-06 11:51:33 +01:00
Javier Jardón
16a59ad912 Deprecate widget flag: GTK_WIDGET_REALIZED
Use gtk_widget_get_realized() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-03 20:41:05 +01:00
Javier Jardón
1fe7d3cefd Deprecate widget flag: GTK_WIDGET_MAPPED
Use gtk_widget_get_mapped() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-03 20:19:03 +01:00
Javier Jardón
214a023e91 Deprecate widget flag: GTK_WIDGET_VISIBLE
Use gtk_widget_get_visible() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 07:52:07 +01:00
Javier Jardón
4232115e22 Deprecate widget flag: GTK_WIDGET_HAS_FOCUS
Use gtk_widget_has_focus() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 06:11:01 +01:00
Javier Jardón
a27d5a2c9e Deprecate widget flag: GTK_WIDGET_IS_SENSITIVE
Use gtk_widget_is_sensitive() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 05:32:51 +01:00
Matthias Clasen
1e381138f3 Correct annotations for gtk_tree_view_get_path_at_pos
Patch by Alan Knowles, bug 609514.
2010-02-23 12:51:45 -05:00
Johan Dahlin
fe85272112 [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-02-19 17:57:51 -02:00
Michael Natterer
07dc2f6c35 gtk: fix crash in _gtk_rbtree_find_offset() called from update_prelight()
Move the check for tree_view->priv->tree being NULL into update_prelight()
so the function will never call _gtk_rbtree_find_offset() on a NULL rbtree.
2010-02-06 15:57:15 +01:00
Claudio Saavedra
52acceef56 GtkTreeView: plug a leaking GtkTreeRowReference
This is exposed by overshooting in a HildonPannableArea. Leaking
a GtkTreeRowReference also means leaking the whole model, since
the GtkTreeModel reference count is increased for each row
reference.

Fixes bug #607770 - Leak in GtkTreeView with HildonPannableArea
2010-01-22 16:53:33 +02:00
Kristian Rietveld
2f73fb76c1 Bug 607322 - Double-click doesn't work if the item is selected in...
Slight correction to fix for #596473.
2010-01-18 22:22:30 +01:00
Javier Jardón
56a893ca8c Deprecate widget flag: GTK_WIDGET_CAN_FOCUS
https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-01-07 10:05:08 +01:00
Christian Dywan
bb1824c131 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-01-04 07:57:05 +01:00
Kristian Rietveld
436855210e Unset expander_column when expander column is removed from tree view 2009-12-28 21:34:17 +01:00
Kristian Rietveld
acb6f4ff33 Fix call to update_prelight()
Seems like some minus signs sneaked in while diffing and reapplying...
Fixes regression noted in 480065.
2009-12-23 08:33:10 +01:00
Kristian Rietveld
f59294fd93 Correct problems with earlier fix for bug #480065
Initialize event_last_[xy] to out of range coordinates and also update
these values in enter and leave notify.  Fix up calls to
update_prelight() from size allocate.  Unconditionally doing these calls
caused problems with hover selection.  Now we only do this call when
the "width before the expander column" has changed.  (Which might be
awkward, but it is the best heuristic I could come up with so far).
2009-12-21 22:42:15 +01:00
Kristian Rietveld
f223577a88 Bug 480065 - wrong tree collapsed (or expanded) after having scrolled
Commit again after revert.

Store (x, y) of last motion event.  From
gtk_tree_view_adjustment_changed(), call prelight_or_select() so that
the prelight is recalculated.  We do the same from
gtk_tree_view_size_allocate() for the case that clicking on an expander
shows new rows that resize the column(s) left of the expander.  This
means that the expander is moved horizontally, in such a case the
prelight also has to be reconsidered.
2009-12-21 22:42:15 +01:00
Colin Walters
6529c07614 [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.
2009-12-16 17:22:01 -02:00
Benjamin Otte
9647285441 Revert dd511e825a
The patch completely breaks entry completion - as can be seen when using
epiphany. Bug 480065 has been reopened.
2009-12-16 11:48:11 +01:00
Kristian Rietveld
2ef9b989bf Bug 596473 - Second double-click of GtkTreeView row doesn't emit...
Rework double click handling in GtkTreeView.  We cannot blindly use
the 2BUTTON_PRESS and 3BUTTON_PRESS events.  In case a user does two
fast double clicks, we receive a 3BUTTON_PRESS and BUTTON_PRESS.  We
cannot easily deduce two double clicks from this.

We have removed the bookkeeping using row references of the last paths
clicked.  Instead we monitor event time, (x, y) coordinates and compare
against double-click-time and double-click-distance ourselves.
2009-11-27 13:48:16 +01:00
Kristian Rietveld
dd511e825a Bug 480065 - wrong tree collapsed (or expanded) after having scrolled
Store (x, y) of last motion event.  From
gtk_tree_view_adjustment_changed(), call prelight_or_select() so that
the prelight is recalculated.  We do the same from
gtk_tree_view_size_allocate() for the case that clicking on an expander
shows new rows that resize the column(s) left of the expander.  This
means that the expander is moved horizontally, in such a case the
prelight also has to be reconsidered.
2009-11-27 13:48:16 +01:00
Yevgen Muntyan
3c510f028f Use standard mac shortcuts
This changes Ctrl-X, Ctrl-C, etc. to Cmd-X, Cmd-C, etc. Also,
Alt-Left and Alt-Right in text widgets bound to Ctrl-Left and
Ctrl-Right actions

https://bugzilla.gnome.org/show_bug.cgi?id=530351
2009-10-26 00:03:05 +01:00
Kristian Rietveld
f77042aae2 Avoid recursive calls to gtk_tree_view_top_row_to_dy()
Commit 3f306a4042 made it possible for
gtk_tree_view_top_row_to_dy() to be called recursively.  (In a different
way than was already guarded for).  This caused a single test case in
the scrolling test suite to fail.  We now also guard for recursive calls at
the beginning of gtk_tree_view_top_row_to_dy().
2009-09-06 20:26:09 +02:00
Kristian Rietveld
5ec80eb5ba Recalculate heights when a (new) separator func is set on GtkTreeView 2009-09-04 17:08:29 +02:00
Kristian Rietveld
3f306a4042 Have tree view process exposes after adjustments have been updated
This was removed long ago by the patch in bug 101235.  On a hindsight,
all other scrollable widgets are processing exposes at this point, which
completely makes sense to me, so I am putting it back.
2009-09-04 14:06:58 +02:00
Kristian Rietveld
44469e4684 Make gtk_tree_view_real_set_cursor() handle non-existing paths
Such paths (eg. a child node that is collapsed) should be ignored.  This
is fixed by checking the return value of _gtk_tree_view_find_node(),
which returns a partial return value (the parent node) when it returns
TRUE.  Also added a unit test.
2009-08-28 11:04:54 +02:00
Kristian Rietveld
ec7187e039 Bug 543310 - set_enable_tree_lines doesn't work when a cellrenderer...
Reorder drawing in gtk_tree_view_bin_expose() so that the tree lines are
drawn after the cells have been drawn.  This is because cell-background
is handled in the cell renderer, so the tree lines need to be drawn
after this.
2009-08-27 18:12:54 +02:00