Commit Graph

27384 Commits

Author SHA1 Message Date
Benjamin Otte
be1da7ef92 tests: (Try to) print the actual enum value in the errors file
Instead of gtk-some-error-quark 5, print
GTK_SOME_ERROR_SOMETHING_FAILED.
2011-05-18 21:58:44 +02:00
Benjamin Otte
71b18a9006 test: Add a bunch of default properties to the CSS parser
One of each type, so that we can test the parsing of them.
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
f1307ef428 tests: Make CSS parser pass NULL as error.
We are trapping errors via signals now.
2011-05-18 21:58:44 +02:00
Benjamin Otte
2d0162c97b tests: Check errors in css test 2011-05-18 21:58:44 +02:00
Benjamin Otte
35c9650752 tests: Change the way the code does diffs
Use a temp file for intermediate storage and properly unlink that
tempfile after the diff is done.
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
c18dc15694 tests: Add test for auto-closing at end of file 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
224d65032e tests: Add CSS test checking that we don't need a semicolon 2011-05-18 21:58:43 +02:00
Benjamin Otte
8fd6bd323c tests: Add two simple css tests 2011-05-18 21:58:43 +02:00
Benjamin Otte
64fd32cdef tests: Add a test for the CSS parser
Tests in the parser need 1 or 2 files:
1) test.css
2) test.ref.css (optional, defaults to test.css)

The test instantiates a CSS provider, loads test.css, then dumps the
loaded file to test.out.css and then checks that that file matches
test.ref.css. If not, it dumps a diff between those two to the log and
fails.

You want to run the test with --verbose to get the output dumped to
stdout.
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
Chun-wei Fan
61e49e159a Update Visual C++ README.txt
-Make the build preparation instructions a bit more clear.
-Tell people about the (now optional) use of fontconfig in the
 Visual C++ builds.
2011-05-18 12:02:10 +08: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
Colin Walters
7bc2f539d0 Explicitly declare internal reserved bits in GdkModifierType
XKB and GDK both add "internal" bits to GdkModifierType.  In C,
this typically doesn't cause problems as bitfields are just integers,
and there's no validation.  However for bindings, it's normal to
convert enumerations to "native" enumeration types, which don't
support unknown bits.  See bug 597292.

https://bugzilla.gnome.org/show_bug.cgi?id=634994
2011-05-16 12:35:40 -04:00
Colin Walters
931e8e38ef gdk_display_get_pointer: Screen out parameter is (transfer none) 2011-05-16 12:35:40 -04:00
Yaron Shahrabani
55e093dcb5 Update Hebrew translation. 2011-05-13 08:28:50 +03:00
Yaron Shahrabani
80d77458c7 Update Hebrew translation. 2011-05-13 08:26:01 +03:00
Benjamin Otte
c2f23ccd23 reftests: Add a shell script to create tests
See the documentation in the script.
Tests are not yet added as the output from the 2 included scripts
doesn't match and the intended reference output first needs to be agreed
on.
2011-05-13 02:46:15 +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
Matthias Clasen
76a96626fd Flesh out the GtkGrid migration chapter some more 2011-05-12 19:34:10 -04:00
Benjamin Otte
d20aa1f8dc reftests: Add a test for the label fix 2011-05-12 23:40:26 +02: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
Matthias Clasen
3ace68ee6f Add an initial migration chapter for GtkGrid 2011-05-11 23:55:54 -04:00
Matthias Clasen
7b6e3be4a7 Another grid spacing reftest
This one checks that empty rows/columns don't affect layout.
2011-05-11 19:52:33 -04: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
Matthias Clasen
87e46bfaa9 Add some reftests comparing aspects of grid and box spacing 2011-05-11 13:48:00 -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
Friedel Wolff
a14e77fc97 Fix two small translation bugs 2011-05-10 12:47:22 +02:00