summaryrefslogtreecommitdiff
path: root/gtk/gtktreeview.c
Commit message (Collapse)AuthorAgeFilesLines
* treeview: don't call gtk_style_context_set_background()Cosimo Cecchi2015-07-011-28/+0
|
* treeview: always pixelcache widget contentsChristian Hergert2015-06-161-0/+2
| | | | | | | | | GtkTreeView has a particularly expensive drawing path. This can cause issues when part of animated widget sequences. Caching the content while a model is attached helps reduce the number of full redraws during exposure greatly. https://bugzilla.gnome.org/show_bug.cgi?id=751082
* docs: Improve deprecation notice for rules-hint propertyEmmanuele Bassi2015-06-111-1/+2
| | | | | | Specify that the theme is wholly in control. https://bugzilla.gnome.org/show_bug.cgi?id=750718
* tree view: Fix compiler warningsMatthias Clasen2015-06-021-17/+13
| | | | Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
* treeview: Avoid usage of gdk_window_get_device_position() during DnDCarlos Garnacho2015-05-211-6/+14
| | | | | | | | | | | Just use the last coordinates given on XdndPosition/drag_motion() in order to trigger scrolling. When running on Xwayland, the pointer position is unknown at this stage on the X11 side, so the coordinates given here are bogus. This change avoids both roundtrips and this situation. https://bugzilla.gnome.org/show_bug.cgi?id=749679
* tree view: Avoid a crash with rubberbandingMatthias Clasen2015-04-081-0/+1
| | | | | | | | | | When a treeview is destroyed while rubberbanding is going on, we crash because the rb tree is nuked before we want to access it to stop the rubberbanding. To avoid this crash end the rubberbanding early in destroy(). See https://bugzilla.redhat.com/show_bug.cgi?id=1173904
* treeview: Fix copy/paste bugBenjamin Otte2015-02-061-1/+1
| | | | Introduced in 7eecb16404b9fdcd1377e1a159f5e94f079e24b7
* treeview: Don't create an overly large pixel cacheBenjamin Otte2015-02-051-2/+2
| | | | | | | | | | GPUs generally have problems when you create a 35000px wide surface. Luckily X catches this and sends a BadAlloc. Which GTK immediately abort()s on. Testcase included. https://bugzilla.redhat.com/show_bug.cgi?id=1163579
* Fix a typoMatthias Clasen2015-01-281-1/+1
| | | | | commit aa1b7fab9c6a2b39 introduced a misuse of G_UNLIKELY in several places. Fix all those.
* gtktreeview: Fix horizontal grid linesAlexander Larsson2015-01-271-2/+2
| | | | | The clipping was wrong so it was not drawing grid lines outside the visible area, which broke due to the pixel cache.
* css: Remove _gtk_css_style_property_changes_affect_size()Benjamin Otte2015-01-271-1/+6
| | | | | | ... and _gtk_css_style_property_changes_affect_font(). Replace it with _gtk_css_style_property_get_mask_affecting().
* GtkTreeView: Implement get_borderMatthias Clasen2014-12-101-1/+20
| | | | | Add an implementation for the new scrollable vfunc that returns the header height as top border.
* treeview: remove single-click activation from GtkGestureMultiPress::pressedCarlos Garnacho2014-11-071-2/+1
| | | | | | | This is already handled in GtkGestureMultiPress::release, and more in concordance with how it was done pre-gestures. https://bugzilla.gnome.org/show_bug.cgi?id=737891
* treeview: Apply column-header region alwaysBenjamin Otte2014-09-151-0/+5
| | | | | | | ... so that invisible columns get it, too. Works around weird effects seen when buttons are animated and columns get hidden/shown.
* tree view: Fix column drag highlightMatthias Clasen2014-09-071-15/+24
| | | | | | | This is a bandaid fix that makes the origin case work again by switching RGBA window. The arrow case is still unreliable. https://bugzilla.gnome.org/show_bug.cgi?id=732916
* treeview: Run the row dragging gesture on the bubble phaseCarlos Garnacho2014-09-041-2/+0
| | | | | | | | This is so signal handlers have an opportunity to undo its effect by returning GDK_EVENT_STOP on ::button-press-event, just like they used to do pre-gestures. https://bugzilla.gnome.org/show_bug.cgi?id=735965
* GtkTreeView: Don't hardcode black for tree linesMatthias Clasen2014-08-301-17/+22
| | | | | | | | Use the left border color for tree lines. This is similar to our use of top border color for grid lines. As a side-effect, tree lines now get recolored when they are in a selected row. https://bugzilla.gnome.org/show_bug.cgi?id=415415
* Use CHECKED instead of ACTIVE for expanded expandersBenjamin Otte2014-08-271-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=733967
* treeview: Reset multipress controller after 2nd clickCarlos Garnacho2014-08-271-0/+3
| | | | | | | | | | | The pre-gestures code used to compare the current button press with the previous one on !activate_on_single_click, and unset the previous event data so ::row-activated would be emitted every 2 clicks. So do the same with the multipress gesture and reset it after every 2nd click to have ::row-activated emitted multiple times while manic clicking. https://bugzilla.gnome.org/show_bug.cgi?id=735353
* GtkTreeView: Avoid a crash with empty treesMatthias Clasen2014-08-261-0/+6
| | | | | | | The gesture code was assuming that the rb tree exists, which will not be the case if the treeview is empty. https://bugzilla.gnome.org/show_bug.cgi?id=735300
* treeview: Make multipress gesture accept all buttonsCarlos Garnacho2014-08-151-12/+1
| | | | | | | | That gesture is meant to handle clicks on multiple buttons, so unset the GDK_BUTTON_PRIMARY default. Also, remove unnecessary boilerplate with the new GtkGestureSingle/GtkEventController defaults. https://bugzilla.gnome.org/show_bug.cgi?id=734285
* treeview: Check the selected node active flag before maybe starting rubberbandCarlos Garnacho2014-08-111-0/+5
| | | | | | | | | This check used to be present in the pre-gestures code, but was unintentionally removed when splitting code into drag/multiclick gestures. The policy used to be that if clicking happened on an already selected node, DnD would happen instead of rubberband selection, so this behavior is resuscitated. https://bugzilla.gnome.org/show_bug.cgi?id=734143
* GtkTreeView: Avoid deprecation warningsMatthias Clasen2014-08-031-1/+3
|
* treeview: Deprecated rules-hintEmmanuele Bassi2014-08-031-14/+27
| | | | | | | | | | | | | | | | | | | | | The rules-hint property has always been a fairly bad application API, as it set some wrong expectations for the developers; deferring to the theme makes it impossible to design application reliably, and if this is a usability setting we should either impose this setting on every theme, or simply drop it. Our own default theme does not honour the zebra striping, which makes this function even more questionable. In practice, usability studies on zebra striping have demonstrated that alternating colors on a list it improves readability just as much as clear ruling between rows, or by visually differentiating the selected row. Zebra striping improves readability (or, at least, it does not hinder it) on static displays, like a table on paper or a document; on a dynamic display, like an application's UI, there are different strategies that yield similar, if not better, results. https://bugzilla.gnome.org/show_bug.cgi?id=733312
* treeview: Add back a check to ignore buttons > 3Carlos Garnacho2014-07-221-1/+7
| | | | | The removal was not intentional, and still needed as the GtkGestureMultiPress will work for any button unless told to lock on a single specific one.
* GtkTreeView: Avoid interference with animationMatthias Clasen2014-07-131-2/+27
| | | | | | | | | The animated scrolling interferes with incremental validation. As short-term solution, disable scrolling animation during incremental validation. This is not a proper solution, but it avoids broken behavior like scrollbars that are not reacting to clicks. The problem was visible, e.g. in the list view example in gtk3-demo.
* Revert "GtkTreeView: Avoid interference with animation"Matthias Clasen2014-07-131-27/+2
| | | | | | | This reverts commit faa676ffa73060538a4a456531ad1810f3ff7b95. It fixed the problematic list view example in gtk3-demo, but broke all others :-(
* GtkTreeView: Avoid interference with animationMatthias Clasen2014-07-131-2/+27
| | | | | | | | | The animated scrolling interferes with incremental validation. As short-term solution, disable scrolling animation during incremental validation. This is not a proper solution, but it avoids broken behavior like scrollbars that are not reacting to clicks. The problem was visible, e.g. in the list view example in gtk3-demo.
* treeview: remove needless duplicate gtk_widget_set_parent_window() callCarlos Garnacho2014-07-101-1/+0
| | | | This same call happens a few lines above.
* treeview: Add back the Gdk pointer grab during column draggingCarlos Garnacho2014-07-091-1/+18
| | | | | | | | The reparenting happening on the column header so it gets a movable window breaks the implicit grab, so this is one situation were we want a pointer grab, if just to replace it. https://bugzilla.gnome.org/show_bug.cgi?id=732933
* treeview: Fix horizontal position during column draggingCarlos Garnacho2014-07-091-0/+4
| | | | | | | | Code was expecting view coordinates, not widget ones, as we're only dealing with horizontal displacements, just adding the horizontal adjustment value suffices. https://bugzilla.gnome.org/show_bug.cgi?id=732933
* GtkTreeView: Animate keybindingsMatthias Clasen2014-07-021-3/+3
|
* treeview: Remove configure-event handler as wellJasper St. Pierre2014-06-261-20/+0
|
* widgetpath: Deprecate regionsBenjamin Otte2014-06-211-0/+2
| | | | This is a foolowup to d80bf0790d0903ba2825f306b6f7435529f922e2
* stylecontext: Deprecate regionsBenjamin Otte2014-06-191-0/+6
| | | | | | | | | | | Regions are done in a very non-css way. They don't fit the DOM in that they don't integrate into the CSS tree and they have very weird matching behavior in selectors. So I'm deprecating them now. GtkNotebook and GtkTreeview will continue to use them and as long as they do, we can't remove the code for it. But once those are ported it might be safe to remove the code as it will clean up lots of places in the code by quite a bit.
* GtkTreeView: Remove a no-longer-valid optimizationMatthias Clasen2014-06-191-18/+0
| | | | | | | The rubberband rendering code was assuming that we just have a 1-pixel border and the rest of the rubberband is uniform. That is not a safe assumption to make with css-styled rubberbands, so remove it.
* treeview: Check that :row-activated is only emitted on GDK_BUTTON_PRIMARYCarlos Garnacho2014-06-111-1/+2
| | | | | It turned out not all code was fully prepared to handle multiple buttons, this avoids respawning https://bugzilla.gnome.org/show_bug.cgi?id=731020.
* treeview: Make row area multipress gesture react to all buttonsCarlos Garnacho2014-06-111-2/+0
| | | | | | The code is actually prepared for that, the gesture was initially limited to only handling GDK_BUTTON_PRIMARY because it only used to handle row activation.
* treeview: Remove unused variables from priv structCarlos Garnacho2014-06-111-9/+0
| | | | | These variables were last used before moving row activation to being managed by a gesture.
* treeview: Move all button press/release management to the multipress gestureCarlos Garnacho2014-06-111-342/+312
| | | | | | | | | The multipress gesture on the bin window now also does all the business related to row selection. As row selection and activation can't be easily decoupled, this fixes certain problems around ::row-activated being emitted on NULL paths. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=731455 and https://bugzilla.gnome.org/show_bug.cgi?id=731018
* treeview: Use drag gesture for rubberband selection/DnDCarlos Garnacho2014-06-111-168/+222
| | | | | | This gesture acts only on events from the bin window, and checks that either the pressed row is draggable, or the conditions for rubberband selection apply.
* treeview: Use gestures for column dragging/resizingCarlos Garnacho2014-06-111-224/+231
| | | | | | A multipress gesture takes care of autosizing on double click, and a drag gesture is used for both column dragging/resizing (only one can happen at a time).
* treeview: Remove unused variableBenjamin Otte2014-06-101-2/+0
|
* GtkTreeView: Use G_PARAM_EXPLICIT_NOTIFYMatthias Clasen2014-06-091-185/+210
|
* treeview: Ensure the event is consumed on ::row-activateCarlos Garnacho2014-06-021-1/+4
| | | | | | Otherwise the event is possibly handled, but still propagated further anyway. Ensure the event is consumed by claiming the current sequence on the GtkGestureMultiPress::pressed handler.
* treeview: restrict the multipress gesture to GDK_BUTTON_PRIMARYCarlos Garnacho2014-06-011-0/+2
| | | | | | | | ::row-activated only used to be triggered by GDK_BUTTON_PRIMARY, so make the multipress gesture handling this now to be only triggered by that same button. https://bugzilla.gnome.org/show_bug.cgi?id=731020
* Revert "Use minimum/natural size semantics"Matthias Clasen2014-06-011-67/+103
| | | | | | | This reverts commit 6d53c2339f79baa0b295ecc614f41f9daab2e132. https://bugzilla.gnome.org/show_bug.cgi?id=731054 showed some major regressions caused by this commit.
* Revert "Better resize of expandable columns"Matthias Clasen2014-06-011-70/+9
| | | | | | | This reverts commit 0050d469b592ec571a5940f1ab1d842a76905e17. Conflicts: gtk/gtktreeview.c
* Avoid another revert conflictMatthias Clasen2014-06-011-2/+2
| | | | | Moving this bit up a few lines lets the following revert apply cleanly.
* Revert "treeview: Remove unneeded checks"Matthias Clasen2014-06-011-4/+8
| | | | | | This reverts commit a158a2aa48c8023f99963642cc2657bff207b82d. The commit conflicts with a later revert, so move it out of the way.