Commit Graph

16527 Commits

Author SHA1 Message Date
Paolo Borelli
9ff75882c0 Explicitely mention -1 in the insert_with_values docs
-1 means "append". Spell it out like we do for ListStore docs.
2012-03-10 19:37:07 +01:00
Cosimo Cecchi
14e63a7370 scrolledwindow: take into account border/padding for junction
When the scrolled window has a frame (and the scrollbar is within the
bevel), we should take into account the CSS border/padding of the frame
and offset the scrollbars junction rendering with it.
2012-03-10 11:46:26 -05:00
Alexander Larsson
10d8c0621f win32: Fix text color on XP
Use a different base text color as the old one leads to
white on white on XP.
2012-03-09 16:43:00 +01:00
Alexander Larsson
f4a68dff88 Fix rendering of theme parts on Windows XP
It seems XP doesn't handle drawing non-alpha theme parts
on alpha destinations. We fix this by using alpha bitmaps only when
needed.

However this means any non-drawn area by the theme part is now draw
black, so we must take more care to only draw where the theme part draws,
so we find the theme part size when available.
2012-03-09 16:43:00 +01:00
Benjamin Otte
50e3f532b9 a11y: Only care about GtkOrientable::orientation
There are other widgets (like PanelToplevel) that aren't a GtkOrientable
but still have that property.
2012-03-09 13:23:05 +01:00
Benjamin Otte
5d57981184 widget: Set up signals after initializing style context
Otherwise, signals would be emitted on semi set up style context which
would then cause crashes when the signal handlers tried to use them.

https://bugzilla.gnome.org/show_bug.cgi?id=662023
2012-03-09 13:23:05 +01:00
Alexander Larsson
a253d4cfec Merge branch 'wip/cssvalue' 2012-03-08 17:33:18 +01:00
Alexander Larsson
ec65270c2c Add some more types to GtkCssValue
Seems these types were used in the parser tests, so we need to
handle them.
2012-03-08 16:49:13 +01:00
Alexander Larsson
1ceed037b2 Don't use GValue in GtkCssValue
We now have complete coverage in the GtkCssValue API for type
handling, so drop the GValue from internal storage and just create
new ones when needed.
2012-03-08 16:39:49 +01:00
Alexander Larsson
616cc5b96d Use GtkCssValue in symbolic color resolving
We now store the symbolic colors as a GtkCssValue which means that
we can reuse the color when resolving and storing the color in
the computed values in the style context.

Additionally we keep a last_resolved GtkCssValue cache in the
GtkSymbolicColor, and if resolving the color returns the same as
last time we reuse the old value. This further increases sharing
of Css Values.
2012-03-08 14:52:10 +01:00
Chun-wei Fan
4e5a8b822d gtkwidget.c: Use G_VA_COPY instead of va_copy()
va_copy() is not universally available, and we already have a G_VA_COPY
macro that emulates the behaviour of va_copy() when it's not available, or
simply calls va_copy() if it's there
2012-03-08 18:56:32 +08:00
Alexander Larsson
3cfd1d93dc Add singletons for small ints and numbers
These represents the majority of int values in use (thousands in use
in a simple app). There is no need to keep multiple instances of
these around.
2012-03-08 11:03:57 +01:00
Alexander Larsson
7603e6e473 css: Use GtkCssValues instead of GValue in the css machinery
Also, in places where we're computing a new CssValue based on an
old one, make sure that if nothing changes we're returning a reference
to the old one, rather than creating a new identical instance.
2012-03-08 11:03:57 +01:00
Alexander Larsson
0ece7a5de3 css: Add GtkCssValue, an immutable refcounted css value 2012-03-08 11:03:54 +01:00
Matthias Clasen
19e448146b colorchooser: Drop the ::response handler altogether
This makes it safe for users to destroy the dialog in response
to ::response.
2012-03-07 22:06:22 -05:00
Matthias Clasen
ad8bf6491c colorchooser: Do less in ::response
Some people destroy their widgets in ::response, so trying
to access dialog internals from the class handler that is
running afterwards has the potential to cause problems.
Instead, we can reset the ::show-editor property every
time we map the dialog.
2012-03-07 21:42:28 -05:00
Matthias Clasen
33004cb5e6 colorchooser: Fix default palette orientation
The switch from boolean to orientation failed to account
for the default palette.
2012-03-07 21:12:32 -05:00
Benjamin Otte
bea4ee0a2c css: Fix * selector to also match regions
Fixes css-match-region-matches-star.ui reftest.
2012-03-07 03:47:19 +01:00
Benjamin Otte
4d6a6be897 API: colorchooser: Use GtkOrientation for orientation
Unfortunately, this swaps the values from the previous state.
But it's definitely a nicer API.
2012-03-07 03:11:05 +01:00
Daniel Stone
134ef22a4e Add smooth-scroll to GtkTextView event mask
Without any extra supporting code, just adding GTK_SMOOTH_SCROLL_MASK to
the event mask for GtkTextView makes GEdit do the right thing and scroll
smoothly.  Lovely.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>

https://bugzilla.gnome.org/show_bug.cgi?id=671488
2012-03-06 21:45:09 +01:00
Alexander Larsson
2422c44f8e Add custom va_marshallers in some places
This is a slight performance optimization in the common case.
2012-03-05 12:39:09 +01:00
Matthias Clasen
ab87579e3f scrolledwindow: Fix scroll event handling
Rewrite the code that deals with smooth scroll events to
be in terms of 'scroll units' as well.
2012-03-04 19:20:10 -05:00
Matthias Clasen
5714454a73 range: Straighten the wheel delta calculation
Scroll events report normalized deltas in terms of an abstract
'scroll unit' now, so our job is to determine a suitable scroll
unit here. Since we are changing the value of the adjustment,
the allocation of the widget does not factor into this at all.
2012-03-04 19:15:32 -05:00
Matthias Clasen
47c190a1b7 grid: Work harder for tight homogeneous allocation
When doing homogeneous allocation in the presence of
overlapping spanning children, we need to avoid uneven
line allocations, otherwise, the final homogenization
will blow up the size request of the grid.

https://bugzilla.gnome.org/show_bug.cgi?id=671170
2012-03-04 17:29:01 -05:00
Paolo Borelli
8adf311acd Free the resource file string. 2012-03-04 18:02:06 +01:00
Matthias Clasen
a986cb4a76 colorscale: Select for touch events
We use long touches to trigger the popup.
2012-03-04 11:24:51 -05:00
Matthias Clasen
7192f9668c colorplane: Select for touch events
We now use long touches to trigger the popup.
2012-03-04 11:24:51 -05:00
Matthias Clasen
ea57924dde gtk: Be more careful when ignoring touch events 2012-03-04 11:24:51 -05:00
Christian Persch
5a8dba7eac colorchooser: Allow removing the palettes again
https://bugzilla.gnome.org/show_bug.cgi?id=671057
2012-03-04 00:29:04 -05:00
Matthias Clasen
912ad3b698 Break out press-and-hold code as its own object
https://bugzilla.gnome.org/show_bug.cgi?id=671057
2012-03-04 00:29:04 -05:00
Benjamin Otte
0794143f41 iconview: Fix autoscroll
... when the iconview is not the only child in it's parent GdkWindow.
2012-03-03 21:18:12 +01:00
Benjamin Otte
861a9adbad celllayout: Remove unused include 2012-03-03 19:45:03 +01:00
Benjamin Otte
2353d60b8a types: Move GtkAdustment declaration to gtktypes.h
... and make all the headers to not include gtkadjustment.h anymore. Of
course, also include it in the source files instead.
2012-03-03 19:45:03 +01:00
Benjamin Otte
7844e8089c types: Clean up gtkwidget.h includes
In particular gtksettings.h and gtkstylecontext.h needed to be included
in lots of places now.

Also, I order the includes alphabetically in a bunch of headers.
2012-03-03 19:45:03 +01:00
Benjamin Otte
9e28aa9223 types: Move widget types into gtktypes.h 2012-03-03 19:45:03 +01:00
Benjamin Otte
29324c5131 gtk: Add gtktypes.h
So far, the files is empty.
2012-03-03 19:45:03 +01:00
Matthias Clasen
b43d00fa2a colorswatch: Support touch events
Support long press for customizing, and short press for
selecting/activating. This is simpler than the generic
press-and-hold support in the multitouch branch; we don't
display any feedback, and the timeout is currently hardcoded
to 1 second.
2012-03-03 01:48:55 -05:00
Matthias Clasen
ff37a04c96 pathbar: Fix scrolling
We need to select for scroll events on the buttons now, selecting
for button events no longer gives us scrolling as a side-effect.
2012-03-02 23:02:57 -05:00
Benjamin Otte
2d1d18b732 pathbar: Fix gcc warning 2012-03-03 04:09:28 +01:00
Cosimo Cecchi
e24fd5f463 image: handle PROP_STORAGE_TYPE in get_property()
Fallout from GtkIconHelper transition.
2012-03-02 12:48:52 -05:00
Murray Cumming
819cd055b5 GtkColorChooser: Correct the signal registration 2012-03-02 18:29:33 +01:00
Benjamin Otte
1d58bf4bef selector: Add sibling seletors
"a + b" and "a ~ b" selectors now work, provided the widget supports
siblings.
2012-03-02 02:17:10 +01:00
Benjamin Otte
89a2dc4db8 selector: Pass the sibling id around all the time
The reason for this will become apparent with the followup patches.
2012-03-02 02:17:10 +01:00
Benjamin Otte
0a5b42c4fc selector: Redo from list to array
Should save ~30% of memory
2012-03-02 02:17:09 +01:00
Benjamin Otte
ae1cd1b354 selector: Introduce gtk_css_selector_previous() 2012-03-02 02:17:09 +01:00
Benjamin Otte
35a0fb09ac css: Rewrite selectors
Previously we kept a Selector object for every "simple selector" (term
from CSS spec). Now we keep one for every match operation. So given the
selector
  ".a b:focus"
we will have 4 elements:
  - pseudoclass ":focus"
  - element "b"
  - match any desendant (the space)
  - class ".a"
Each of those is represented by a "selector class" which is basically
the collection of vfuncs for this selector.
2012-03-02 02:17:09 +01:00
Benjamin Otte
eb013767bb selector: Remove a misleading error message
Duplicate selectors are indeed fine and shouldn't cause errors.
You want to use them to up specificity.
2012-03-02 02:17:09 +01:00
Benjamin Otte
67d0b8195d css: Move selector parsing code into a custom function 2012-03-02 02:17:09 +01:00
John Ralls
b2a8e6ed04 Fix compile error from splitting bitmask code
GtkBitMask was typedef'd twice.
2012-03-01 16:26:38 -08:00
Matthias Clasen
6ecc1089f2 range: Use the correct size for scaling
When scaling the scroll delta, always use the 'large' dimension
of a range widget. When dx was 0, the code code accidentally
use the small dimension.
2012-03-01 16:29:01 -05:00