togglebutton: always set PRELIGHT state when in_button = TRUE
Previously, we would avoid setting the prelight state flag when
button_down was TRUE and draw_indicator = FALSE, which is the normal
case of a GtkToggleButton during a mouse press.
It looks like this behavior was introduced a long time ago with commit b94e6c0a8036a0489ac8ca71de75ba7611218e50. I believe the reason was that
a widget in GTK2 couldn't have more than a single state (e.g.
hover+active) at a given moment.
Michael Natterer [Fri, 14 Sep 2012 13:18:33 +0000 (15:18 +0200)]
quartz: Bug 674108 - Hard crash due to wrong NSAutoreleasePool stacking
Apply patch from Kristian Rietveld which addresses two issues
in gdkeventloop-quartz.c:
This patch moves the autorelease pool drain and introduces protection against
the invalidated ufds. Basically, when we suspect ufds has been invalidated by a
recursive main loop instance, we refrain from calling the collect function.
(cherry picked from commit 79b3326eaab18b942bd7e03ae8d24544182cb3dd)
After my recent fix for this, nautilus was still having problems
telling keeping F10 and Shift-F10 apart. With this change, we are
treating levels with the same symbol like inactive levels, ignoring
them entirely.
The widget-factory was pretty much overflowing, so I've
made it page, and started to fill the second page with
vertical spin buttons. New examples and widgets should
be added to page 2 now.
Chun-wei Fan [Wed, 29 Aug 2012 06:03:46 +0000 (14:03 +0800)]
gtkimcontexttime.c: Check context_ime->client_window is not NULL
Be a bit more careful in get_pango_attr_list() and
get_utf8_preedit_string() to ensure that the client_window is properly
created before proceeding, to avoid access violation/segfault crashes on
Windows with IME installed, especially when running the pickers demo.
Carlos Garnacho [Mon, 3 Sep 2012 15:03:52 +0000 (17:03 +0200)]
Improve CSS styling of touch text selection handles
Don't hook on the widget style context and set up instead
a widget path for itself. Also use a common style class
for both handles, with an extra top/bottom class for each
handle.
Benjamin Otte [Thu, 30 Aug 2012 13:51:29 +0000 (15:51 +0200)]
cssvalue: Pass property ID to transition function
This is to allow animating arrays properly. I'm not really thrilled
about this solution (we leak propertys into the values again...), but
it's the best I can come up with - I prefer it to having N different
array types...
Benjamin Otte [Tue, 28 Aug 2012 15:52:12 +0000 (17:52 +0200)]
css: Redo bindings parsing
I want to get away from the ability to have 0-length arrays, all css
arrays are single element.
Even if the element is "none", it is still a "none" element.
Carlos Garnacho [Wed, 11 Jul 2012 14:43:51 +0000 (16:43 +0200)]
Implement touch text selection in GtkTextView
GtkTextHandle is used to indicate both the cursor position
and the selection bound, dragging the handles will modify
the selection and scroll if necessary.
Backwards text selection is also blocked for touch devices,
so the handles don't get inverted positions and possibly
obscure portions of the selected text.
Carlos Garnacho [Wed, 11 Jul 2012 13:55:00 +0000 (15:55 +0200)]
Implement touch text selection in GtkEntry
GtkTextHandle is used to indicate both the cursor position
and the selection bound, dragging the handles will modify
the selection and scroll if necessary.
Backwards text selection is also blocked for touch devices,
so the handles don't get inverted positions (This is more
important though on GtkTextView, as inverted handles may
obscure portions of the selected text, good for consistence
though)
Carlos Garnacho [Wed, 11 Jul 2012 13:51:43 +0000 (15:51 +0200)]
Add GtkTextHandle
This is a helper object to allow text widgets to implement
text selection on touch devices. It allows for both cursor
placement and text selection, displaying draggable handles
on/around the cursor and selection bound positions.
Currently, this is private to GTK+, and only available to
GtkEntry and GtkTextView.
Carlos Garnacho [Wed, 11 Jul 2012 14:44:16 +0000 (16:44 +0200)]
scrolledwindow: don't capture events meant for non-child windows
GtkTextHandle creates temporary override redirect windows, but still
hook to the text widget for events, so those are effectively captured
by GtkScrolledWindow if a text widget is within it
A change in xkeyboard-config 2.4.1 made it so that function keys
now have a shift level which has the same symbol, but 'eats' the
shift modifier. This would ordinarily make it impossible for us
to discriminate between these key combinations.
This commit tries harder to discriminate in 2 ways:
- XKB has a mechanism to tell us when a modifier should not be
consumed even though it was used in determining the level.
We now respect such 'preserved' modifiers. This does not fix
the Shift-F10 vs F10 problem yet, since xkeyboard-config does
not currently mark Shift as preserved for function keys.
- Don't consume modifiers that do not change the symbol. For
the function keys, the symbol on the shift level is the same
as the base level, so we don't consider Shift consumed.
For more background on the xkeyboard-config change, see
https://bugs.freedesktop.org/show_bug.cgi?id=45008
Rui Matos [Mon, 20 Aug 2012 23:28:25 +0000 (01:28 +0200)]
window: Add a delay before automatically showing mnemonics
Showing mnemonics immediately on modifier press can be annoying and
distracting when the user is just trying to Alt+Tab into another
application/window since the mnemonic will show up and quickly vanish
again when we receive the focus out event.
Fix mnemonic activation for some printer option widgets
The file type radio group has a mnemonic on its label, but
activating it did not work, since GtkPrinterOptionWidget did
not know to forward the activation to one of the buttons.
Sebastian Geiger [Fri, 17 Aug 2012 23:04:22 +0000 (01:04 +0200)]
Improve print to file options in print dialog
* This patch gets rid of the separated
fields for selecting a print to file
target by removing the folder selection
button and the entry. It is replaced by
a browse button, which opens a file
selection dialog, that can select both
the path AND the filename.
* If the filename is relativ to the home
folder it will substitute ~/ instead of
the home folder. Additionally if the
resulting filename is longer than 30
characters, it cut of the first part
and replace it by '...' so that
the button text never gets too long.