Benjamin Otte
cb8a595a65
cssprovider: Clean up declaration parser to conform to more tests
...
The tests will follow with the next commits
2011-05-18 21:58:44 +02:00
Benjamin Otte
22bda2b92f
cssprovider: Rework declaration parsing loop
...
The new loop can cope better with invalid identifiers and manages to
resume parsing properly.
2011-05-18 21:58:44 +02:00
Benjamin Otte
5e054b37a2
cssprovider: Don't fail with invalid syntax when parsing a value
...
Instead, raise a PROPERTY_VALUE error, find the next semicolon or
closing bracket and resume parsing.
2011-05-18 21:58:44 +02:00
Benjamin Otte
a94ea9a4e3
css: Overhaul value parsing
...
Value parsing only sometimes emitted errors. Sometimes it didn't emit
errors but ignored the value, sometimes it took a default, sometimes it
converted it to something it deemed suitable.
While refactoring, I moved the whole GValue <=> char * conversion
routines to a separate file, to make navigating the core css provider
easier.
2011-05-18 21:58:44 +02:00
Benjamin Otte
a50a06b583
cssprovider: Remove now useless variables
2011-05-18 21:58:44 +02:00
Benjamin Otte
469ed3e8ed
cssprovider: Remove scanner_report_warning() function
...
That function does superbad stuff just to print out something on stderr.
Don't do superbad stuff.
2011-05-18 21:58:44 +02:00
Benjamin Otte
4622614784
cssprovider: use INVALID_SYNTAX for unexpected token error
2011-05-18 21:58:44 +02:00
Benjamin Otte
b34f004f43
cssprovider: Change declaration parsing for error reporting
...
Previously, we only checked for errors after parsing the full
declaration. Now we detect errors with the property before even
attempting to parse its value.
The benefit here is that the error reporting reports the correct line
and position numbers.
2011-05-18 21:58:44 +02:00
Benjamin Otte
ee53156762
API: cssprovider: Add more error codes
2011-05-18 21:58:44 +02:00
Benjamin Otte
78afa9671e
API: cssprovider: Make error a signal
2011-05-18 21:58:44 +02:00
Benjamin Otte
06d4dab48c
cssprovider: Handle errors completely via new error functions
2011-05-18 21:58:43 +02:00
Benjamin Otte
582aa955c2
cssprovider: Provide better API to set errors
2011-05-18 21:58:43 +02:00
Benjamin Otte
707ba8597f
cssprovider: Have a private error variable
2011-05-18 21:58:43 +02:00
Benjamin Otte
38ca304825
cssprovider: Automatically add final closing bracket to last rule
2011-05-18 21:58:43 +02:00
Benjamin Otte
9d9f1e38b2
cssprovider: Ignore empty rules
2011-05-18 21:58:43 +02:00
Benjamin Otte
b1556abe04
API: gtk: Add gtk_css_provider_to_string()
...
This is intented to convert the contents of a CSS provider back to a
string.
It is not complete yet but good enough for starting a testsuite. :)
2011-05-18 21:58:43 +02:00
Benjamin Otte
8b6f92d087
API: Add gtk_gradient_to_string()
2011-05-18 21:58:43 +02:00
Benjamin Otte
dc43239a61
gtk: Add _gtk_animation_description_to_string()
...
Reverses _gtk_animation_description_from_string()
2011-05-18 21:58:43 +02:00
Benjamin Otte
6e18b5f3de
API: gtk: Add gtk_symbolic_color_to_string()
...
See future commits for why this is useful. Or try to debug some color
problem.
2011-05-18 21:58:43 +02:00
Benjamin Otte
b566debef9
cssprovider: Add a function for signalling errors
2011-05-18 21:58:43 +02:00
Benjamin Otte
f5bc27f7ef
cssprovider: Store cssprovider in scanner's user data
2011-05-18 21:58:43 +02:00
Cosimo Cecchi
f398745a15
treeview: don't arbitrairly add 2 to the expander size
...
Bump the default expander size by 2 pixels instead.
https://bugzilla.gnome.org/show_bug.cgi?id=650424
2011-05-18 11:12:47 -04:00
Cosimo Cecchi
42f5856e77
treeview: render a frame around the rows, after drawing their background
...
https://bugzilla.gnome.org/show_bug.cgi?id=650424
2011-05-18 11:12:31 -04:00
Cosimo Cecchi
1a7239481c
raleigh: clear up menu handling in the fallback CSS
...
Now that menus properly respect padding/border, this is not needed
anymore.
2011-05-18 10:45:51 -04:00
Cosimo Cecchi
091a4d7f22
menu: don't use the border as a padding value
...
Borders should be rendered inside the allocation, not act as a second
padding.
https://bugzilla.gnome.org/show_bug.cgi?id=650418
2011-05-18 10:45:50 -04:00
Cosimo Cecchi
c8a59a6f92
all: avoid boxed structs copying where possible
...
Use the GtkStyleContext accessors for boxed properties where possible,
to reduce allocations.
https://bugzilla.gnome.org/show_bug.cgi?id=650420
2011-05-18 10:27:21 -04:00
Carlos Garnacho
52452236bc
button: Fix typo in keyboard grab's evmask
...
https://bugzilla.gnome.org/show_bug.cgi?id=650382 , spotted
by Alexander Larsson.
2011-05-17 13:17:25 +02:00
Matthias Clasen
b219b3b0ec
Add shortcuts for the !children case
...
Not that we are doing too much work in that case, but we are
segfaulting, which is bad.
https://bugzilla.gnome.org/show_bug.cgi?id=649972
2011-05-12 20:12:51 -04:00
Benjamin Otte
5084739756
themingengine: Set current point to 0,0 when rendering rotated layout
...
Otherwise the layout may move to who-knows-where
2011-05-12 23:40:26 +02:00
Micah Carrick
86f5849158
Fix annotation for Gtk.TreeView.enable_model_drag_source
...
https://bugzilla.gnome.org/show_bug.cgi?id=649979
2011-05-11 16:15:23 -04:00
Benjamin Otte
f96777ea02
paned: Be careful about showing windows
...
The previous code failed to account for all child visibility and paned
mapedness invariants which could cause stray GDK windows to appear.
Not good.
Credit goes to Xan for triggering it.
2011-05-11 00:47:23 +02:00
Matthias Clasen
1ab425b132
GtkAssistant: make the content expand
...
Its all about the content, so make sure the content fills
the available space.
2011-05-10 17:57:21 -04:00
Benjamin Otte
6bda6f0c58
paned: Ensure children aren't underallocated
...
Instead, allocate them a proper size and just clip them using the window
we added for them in the last commit.
2011-05-09 18:55:13 +02:00
Benjamin Otte
206b9f940d
paned: Create a GDK window for every child
...
We need the window to clip drawing. Otherwise we cannot allow
undersizing without doing underallocations.
2011-05-09 18:37:08 +02:00
John Stowers
21761ce5fc
Add missing gtk_widget_override_* annotations
...
https://bugzilla.gnome.org/show_bug.cgi?id=649779
2011-05-09 23:09:26 +12:00
Matthias Clasen
f3a66d0783
Dueling arrow positioning fixes...
...
Revert my fix, which conflicted with Benjamins fix for the same
issue.
2011-05-08 21:33:12 -04:00
Matthias Clasen
3b3c5e19d9
Fix a arrow positioning
...
This gets the misc-alignment test for arrows closer to
not failing.
2011-05-08 21:28:36 -04:00
Benjamin Otte
ece3c54f57
arrow: Don't include padding in computation of alignment
2011-05-09 01:07:35 +02:00
Matthias Clasen
a805e70615
Add a new forgotten symbol
2011-05-06 23:51:52 -04:00
Matthias Clasen
1d647df176
Add a lock button widget
...
This is a special-purpose button that can be used together with
GPermission objects to control the sensitivity of system settings.
Suitable permission objects can e.g. be obtained from PolicyKit.
http://bugzilla.gnome.org/show_bug.cgi?id=626457
2011-05-06 22:44:38 -04:00
Matthias Clasen
5cb3f5ff0f
Remove outdated comments
...
Neither GdkColors nor GdkRGBAs are ever 'allocated' nowadays.
2011-05-06 17:05:35 -04:00
Tristan Van Berkom
e217c455f8
Added Since 3.2 annotations for new GdkRGBA properties.
2011-05-06 17:05:34 -04:00
Tristan Van Berkom
cefb950110
Added internal GdkRGBA support for GtkTextTag::paragraph-background-rgba
...
Added the remaining implementation bits for rendering paragraph backgrounds
with rgba values and updated the test case.
2011-05-06 17:05:34 -04:00
Tristan Van Berkom
2b2d7aa305
Fixed GtkTextTag to sync the GdkColors with the new GdkRGBA values for backwards compatability.
2011-05-06 17:05:34 -04:00
Tristan Van Berkom
d3c77f0330
Handled error_color with GdkRGBA in gtktextdisplay.c.
2011-05-06 17:05:34 -04:00
Tristan Van Berkom
604292a404
Fixed textview rendering regression.
...
Background color was not painted on the whole tagged segment after
line breaking, this was due to the default ->prepare_run() function
wiping the internal PangoColors clean... fixed this by unconditionally
setting local rgba colors from prepare_run instead of comparing them
and bailing out.
2011-05-06 17:05:34 -04:00
Tristan Van Berkom
d399a4acab
Added GdkRGBA properties to GtkTextTag.
...
This now allows text view to render text with alpha values in
the text foreground and backgrounds, the work is almost complete,
currently the error-underline-color is still a GdkColor style property
and since we use only GdkRGBA for rendering it needs to be converted
and applied, probably a new rgba version of the style property should
also be introduced.
This commit adds tests/testtextview that must be run from the tests/
directory to show translucent text in action.
2011-05-06 17:05:10 -04:00
Cosimo Cecchi
579afaa9a1
progressbar: fetch the padding without the trough style class
...
This is consistent with the rest of the widget, which uses only one
padding value.
https://bugzilla.gnome.org/show_bug.cgi?id=649593
2011-05-06 15:10:43 -04:00
Cosimo Cecchi
73d9ca67e6
cellrendererprogress: don't force drawing inside the border
...
The progressbar is composed by two different rendered areas: the trough
(i.e. the non-filled part of the bar) and the bar itself.
The bar should be able to fill the whole height/width of the trough
without resorting to nasty hacks in the theme, and we can control the
amount of space between the bar and the trough with the padding already.
https://bugzilla.gnome.org/show_bug.cgi?id=649593
2011-05-06 15:10:43 -04:00
Matthias Clasen
c83e76fb12
GtkAssistant: an new style for assistants
...
GtkAssistant is widely recognized as a butt-ugly widget.
This commit changes its style to look more modern. We
deprecate the sidebar and header image properties and
don't show them anymore. Instead, page titles are arranged
in a sidebar, with the title of the current page shown
in highlighted style.
2011-05-06 14:56:43 -04:00