Commit Graph

2117 Commits

Author SHA1 Message Date
Benjamin Otte
a5b08ea931 gail: Remove AtkText implementation from GailScale
AtkText should only be implemented by text editing widgets. For just
giving out a small text string, AtkObject::name should be used.
2011-07-05 16:08:09 -04:00
Matthias Clasen
abe6c28bc2 Add some texts for text selection signals
Test that we do emit ::text_caret_moved and ::text_selection_changed
as expected.
2011-07-05 16:08:09 -04:00
Matthias Clasen
5d38185448 Skip line-related tests for GtkEntry
GtkEntry sets single-paragraph mode on its pango layout,
so the results for line-related navigation don't match.
2011-07-05 16:08:09 -04:00
Matthias Clasen
7872c2c19e GtkEntryAccessible: port from GailTextUtil to GtkPango
Also clean up and rearrange the code.
As a side-effect, the no-longer-existing stipple attributes
are dropped.  Update test results to match.
2011-07-05 16:08:08 -04:00
Matthias Clasen
ca5db10bda Add some tests for selection handling 2011-07-05 16:08:08 -04:00
Matthias Clasen
81c809e27a Add some more basic tests 2011-07-05 16:08:08 -04:00
Matthias Clasen
3744742804 Remove debug spew 2011-07-05 16:08:07 -04:00
Matthias Clasen
f0715f434e Expand the insert/delete text
GtkLabel passes this now.
2011-07-05 16:08:07 -04:00
Matthias Clasen
0437677b12 Update test results
The label accessible port dropped the no-longer-existing
stipple attributes; so update the expected test results to match.
2011-07-05 16:08:07 -04:00
Matthias Clasen
53535f03cf Replace the boundary test
The new test is much smaller, and the results have been carefully
looked at; GtkLabel gets it right, the others don't.

Also, temporarily include some code that dumps out useful information.
2011-07-05 16:08:07 -04:00
Matthias Clasen
db2da1de42 Sort text attributes alphabetically in dumps 2011-07-05 16:08:07 -04:00
Matthias Clasen
1b8c38f6e1 GtkHSV: set a suitable role for the accessible
The consensus of the accessibility team was that 'color chooser'
fits best for this. Update tests to match.
2011-07-05 16:08:07 -04:00
Matthias Clasen
3edebfb81c GtkSpinner: set a suitable role for the accessible
The consensus of the accessibility team was that this is
an animation. Update tests to match.
2011-07-05 16:08:07 -04:00
Matthias Clasen
91960a2132 Add a testcase for a very old bug
This tests a problem that was first noticed in 2003, in
bug 126797: The text of a label accessible is not properly
updated when the label switches from !use-markup to use-markup.
2011-07-05 16:08:06 -04:00
Matthias Clasen
437aaccc19 Test lots of boring string functions
Needless to say, these tests still fail.
2011-07-05 16:08:06 -04:00
Matthias Clasen
ec7c50ef00 Add some AtkText tests
These unfortunately all fail really miserably, currently.
2011-07-05 16:08:06 -04:00
Matthias Clasen
743cb1fc96 spinbutton testcase 2011-07-05 16:08:05 -04:00
Matthias Clasen
2610a43e1c iconview testcase 2011-07-05 16:08:05 -04:00
Matthias Clasen
55d8a684c7 Paned testcase 2011-07-05 16:08:05 -04:00
Matthias Clasen
9d4ce36199 Statusbar testcases 2011-07-05 16:08:05 -04:00
Matthias Clasen
fb91fd7e3c tree-performance: test with tree stores too
This duplicates the current test with a GtkTreeStore instead
of a GtkListStore.
2011-07-05 16:08:05 -04:00
Matthias Clasen
23bc606c79 a11y: add a treeview performance test
This test creates a treeview with a few columns and a liststore,
and then populates it with a 1000 rows.
2011-07-05 16:08:05 -04:00
Matthias Clasen
430957b036 Add a calendar testcase 2011-07-05 16:08:05 -04:00
Matthias Clasen
8aced27009 Add an infobar testcase 2011-07-05 16:08:05 -04:00
Matthias Clasen
f2d6439bc7 Add a GtkProgressBar testcase 2011-07-05 16:08:05 -04:00
Matthias Clasen
5d84495b77 Add a GtkSpinner testcase 2011-07-05 16:08:05 -04:00
Matthias Clasen
96d5ea96fd Add a lockbutton testcase 2011-07-05 16:08:05 -04:00
Matthias Clasen
3cc413e84f Add a testcase for all the pickers 2011-07-05 16:08:05 -04:00
Benjamin Otte
a8f663ce5e Revert "Add a testcase with a print dialog"
THe testcase depends on the installed printers, so is nondeterministic.

This reverts commit 5bf14cc7485fe015ad15747454e877f2fb3dabc5.
2011-07-05 16:08:04 -04:00
Benjamin Otte
a3ca0bf898 Revert "Add a filechooser testcase"
File choosers depend on the files in the current directory and the
settings the user has set for the file chooser, so the output cannot be
deterministic.

This reverts commit f05c9e02c49f857c33e02c3d89483fcccb5df254.
2011-07-05 16:08:04 -04:00
Benjamin Otte
aaa40bdc0a Revert "Add a testcase involving a font selection dialog"
The font chooser depends on the fonts installed on the system, so the
output is nondeterministic.

This reverts commit 08fdc399762c2af07d94e42a1801e691e5d4d6ab.
2011-07-05 16:08:04 -04:00
Benjamin Otte
d346be96c2 tests: Don't emit a message for every unnamed object 2011-07-05 16:08:04 -04:00
Benjamin Otte
4c0814a176 tests: Reset the unnamed counter before a test run
This guarantees that objects are named the same all the time.
2011-07-05 16:08:04 -04:00
Benjamin Otte
26a2cfe62a tests: Fix crash due to freeing random pointers 2011-07-05 16:08:04 -04:00
Matthias Clasen
b9c0d226c0 Add an assistant testcase 2011-07-05 16:08:04 -04:00
Matthias Clasen
1783b5c85e Add a testcase involving an expander 2011-07-05 16:08:03 -04:00
Matthias Clasen
5a257fe95f Add a testcase with a print dialog 2011-07-05 16:08:03 -04:00
Matthias Clasen
b2e624c50c Add a messagedialog testcase 2011-07-05 16:08:03 -04:00
Matthias Clasen
c950bd540b Add a testcase involving a font selection dialog 2011-07-05 16:08:03 -04:00
Matthias Clasen
4149124b2b Add a testcase with an appchooser dialog 2011-07-05 16:08:03 -04:00
Matthias Clasen
0f2c739473 Add a README for accessibility-dump 2011-07-05 16:08:03 -04:00
Matthias Clasen
4dfc4fbdaf Add an about dialog testcase 2011-07-05 16:08:03 -04:00
Matthias Clasen
f59b9e52d4 Add a color chooser testcase 2011-07-05 16:08:02 -04:00
Matthias Clasen
ac8e00010a Add a scrollbar to the range testcase 2011-07-05 16:08:02 -04:00
Matthias Clasen
dfb8fa9b5a Add a filechooser testcase 2011-07-05 16:08:02 -04:00
Matthias Clasen
56100a017a Remove debug spew
This had crept into the expected output for the buttons
testcase.
2011-07-05 16:08:02 -04:00
Matthias Clasen
5ebbf00f0a Try harder to generate names for accessibles
We are still hitting the 'no name' case in GtkFileChooser for
a GailBox, otherwise.
2011-07-05 16:08:02 -04:00
Matthias Clasen
dbf204b5b9 Handle AtkValue implementations that return integer values
We do this by transforming the returned GValue to a string.
As a side-effect, the formatting for doubles changes, so
adjust expected output to match.
2011-07-05 16:08:01 -04:00
Benjamin Otte
98a11cedf0 tests: omit fg-color and bg-color values from attributes
They depend on the environment, too.
2011-07-05 16:08:01 -04:00
Benjamin Otte
b6bd3ef4f4 tests: Add line breaks when dumping text attributes
This improves diff readability a lot when attributes differ.
2011-07-05 16:08:01 -04:00
Matthias Clasen
17e219fbce Remove debug spew 2011-07-05 16:08:01 -04:00
Matthias Clasen
4dfb500732 Add a test involving a tree view 2011-07-05 16:08:00 -04:00
Matthias Clasen
eb60a7ed54 Dump AtkTable properties
Also, make get_name() deal better with GtkAccessibles whose
widgets don't have buildable names.
2011-07-05 16:08:00 -04:00
Matthias Clasen
52aa225713 Dump AtkComponent properties
Note that the spatial aspects of AtkComponent are all dependent
on fonts and other environmental factors, thus we only dump the
little bits outside of that.
2011-07-05 16:08:00 -04:00
Matthias Clasen
570c185935 Make the dumped output a bit more readable
By adding sections for each interface.
2011-07-05 16:08:00 -04:00
Matthias Clasen
04d6c99a71 Add a test involving a text view 2011-07-05 16:08:00 -04:00
Matthias Clasen
901395db67 Dump AtkStreamableContent properties
Also, simplify the format for links slightly.
2011-07-05 16:08:00 -04:00
Matthias Clasen
bdab7cc8ff Fix the expected output for range.ui
GtkScale puts a LRM character at the start of the string.
2011-07-05 16:08:00 -04:00
Matthias Clasen
57fc8f183a Add a test involving links 2011-07-05 16:08:00 -04:00
Matthias Clasen
97ddbb5ff2 Dump AtkHyperLinkImpl properties 2011-07-05 16:07:59 -04:00
Matthias Clasen
0740876d0e Add a test involving ranges 2011-07-05 16:07:59 -04:00
Matthias Clasen
2672a3afef Dump AtkValue properties 2011-07-05 16:07:59 -04:00
Matthias Clasen
6641ae85ff Add a test involving a selection 2011-07-05 16:07:59 -04:00
Matthias Clasen
913c5241ae Dump AtkSelection properties
Also make get_name() deal with object that are not GtkAccessible,
but implement AtkText. An example of this is GailNotebookPage.
2011-07-05 16:07:59 -04:00
Matthias Clasen
a6d741b6a4 Dump AtkAction properties
Adjust expected output to match.
2011-07-05 16:07:59 -04:00
Matthias Clasen
22fc55f716 Dump AtkImage properties too
Update expected output to match.
2011-07-05 16:07:59 -04:00
Matthias Clasen
58b4b410fa More text properties 2011-07-05 16:07:59 -04:00
Matthias Clasen
76f71b8f9c Dump AtkText properties too
...would be nice if these actually _were_ properties.
Update the expected output to match.
2011-07-05 16:07:58 -04:00
Matthias Clasen
bd6b799d26 Fix make check
Not really the best fix; for now just ignore accessible parents
that are not GtkAccessibles - it seems that something causes
GailToplevels to show up as parents of GailWindows, randomly.
2011-07-05 16:07:58 -04:00
Matthias Clasen
784e4a81eb Remove an extra line from expected output 2011-07-05 16:07:58 -04:00
Matthias Clasen
5952c6abbb Don't forget to free an empty attribute set 2011-07-05 16:07:58 -04:00
Matthias Clasen
f3ae93af95 Add a more convenient way to dump
For initial creation of the results, allow to run
accessibility-dump --generate file.ui,
which will dump just the expected output to stdout,
without any extra decorations.
2011-07-05 16:07:58 -04:00
Matthias Clasen
d36d6172d2 Dump more accessibility data
This commit adds dumping of parents, attributes and states.
The expected dump output has been adjusted to match.
2011-07-05 16:07:58 -04:00
Matthias Clasen
667504d791 Add new tests to EXTRA_DIST 2011-07-05 16:07:58 -04:00
Matthias Clasen
3f01b42652 Add a test that sets ::accessible-name 2011-07-05 16:07:57 -04:00
Matthias Clasen
5c1b0b005e Add a test that has a labeled-by relation in it 2011-07-05 16:07:57 -04:00
Benjamin Otte
f76c439897 tests: Add first shot at an accessibility dump tool
The tool works like this:
  ./accessibility-dump [FILE ...]
If no files are given, all files with the extension ".ui" in the current
directory are taken. For every file "test.ui", the following steps are
performed:
1) test.ui is loaded using GtkBuilder
2) The accessible for the window is loaded
3) The information of accessible is converted into a string using a
   syntax defined in this test file
4) The generated string is diffed with the file "test.txt"
5) If the diff is empty, the test is a success, if not, the test fails.
6) The diff is output when the test runner is run with --verbose

So to add a test named "test", create a file called "test.ui", put it
into this directory. Then create the expected output file "test.txt",
put it into this directory too. You can create the initial version of
this file by invoking "./accessibility-dump --verbose test.ui". The
output will contain the expected text and can be copy/pasted into the
text file.
2011-07-05 16:07:57 -04:00
Benjamin Otte
769c795d57 reftests: Use an offscreen window to avoid artifacts
When tests are larger than the screen size and no compositing is
enabled, the window will be clipped to the screen size and all areas
outside of the screen have undefined contents.

To avoid this, we can use an offscreen window.
2011-07-05 15:28:18 +02:00
Benjamin Otte
ace4faa4e2 reftests: Fix label-sizing reference for Pango
See https://bugzilla.gnome.org/show_bug.cgi?id=649783 for a discussion
of the problem. Should this bug be fixed, this patch can just be
reverted.
2011-07-05 15:18:14 +02:00
Benjamin Otte
84e6f353ac reftests: load/save file once in Glade
This way the output is canonicalized for further editing. No changes
have been done.
2011-07-05 15:17:23 +02:00
Cosimo Cecchi
ba76f54549 reftests: Add test for box brokenness
This is a tests for the last commit.
2011-07-02 01:57:27 +02:00
Matthias Clasen
e2a2da224d Test box and toolbar regions in parallel
This makes it easy to see discrepancies.
Plus, it is fun
2011-07-01 12:31:22 -04:00
Matthias Clasen
301c120b74 toolbar: nth-child support for GtkToolbar
This doesn't quite work right yet.
2011-07-01 12:31:22 -04:00
Matthias Clasen
ebebbe4da4 Remove nonexisting properties
glade insists on adding GtkGrid:n-rows and :n-columns, for
no good reason...
2011-06-17 20:35:41 -04:00
Cosimo Cecchi
71eb9d123d tests: import the widget-factory test for theming
Courtesy of Andrea Cimitan <andrea.cimitan@canonical.com>.
2011-06-17 11:51:14 -04:00
Benjamin Otte
4edb3f08e4 reftests: fix background-area reftest after the last commit 2011-06-15 11:25:26 -04:00
Benjamin Otte
d3535ff6ce tests: Add tests for font-family
This readds the tests now that font-family works again. They were
previously removed when font-family support was backed out due to bugs.
2011-06-15 12:57:21 +02:00
Matthias Clasen
37167ec458 Make this code more meaningful 2011-06-14 21:18:08 -04:00
William Jon McCann
be7f734aff tests: Add simple test for image clipboard 2011-06-14 16:06:33 -04:00
Benjamin Otte
f4a6ef0d50 tests: Add a CSS test for color parsing errors
In [particular check for the fix in the last commit.
2011-06-13 15:01:52 +02:00
Benjamin Otte
016e0c1a3e reftests: Check that the default border color is the foreground color 2011-06-13 15:01:52 +02:00
Matthias Clasen
d9fa5b342b Forgotten file 2011-06-13 07:33:47 -04:00
Matthias Clasen
2ce9ff2d6a Remove broken font-family css test 2011-06-13 06:56:12 -04:00
Ignacio Casal Quinteiro
cfb2a45f9a overlay: add initial version of gtkoverlay 2011-06-12 23:27:18 -04:00
Javier Jardón
85747da972 tests: use GdkRGBA instead GdkColor 2011-06-13 00:24:53 +01:00
Benjamin Otte
a536a50dbd reftests: Add reftest for unresolvable properties 2011-06-11 10:41:17 +02:00
Benjamin Otte
a1d19be950 reftests: Add a test for inset box-shadow
This test is copied from the CSS spec. The reference is very sensitive
to the rendering algorithm in use, because the rounded corners have
semi-transparent pixels. It might be necessary to update them in the
future.
2011-06-11 09:29:43 +02:00
Benjamin Otte
281ce813fc reftests: Add background-area reftest
Checks the fix from last commit: background area is supposed to be the
border box.
2011-06-11 09:29:32 +02:00
Benjamin Otte
7adfd8a0f5 reftests: Remove unused file from EXTRA_DIST 2011-06-10 16:26:39 +02:00
Benjamin Otte
77c102ae6e testtreeview: Don't use deprecated classes to make things interesting 2011-06-09 06:21:11 +02:00
Benjamin Otte
6114b06b3b testgtk: Fix deprecation 2011-06-09 06:20:42 +02:00
Benjamin Otte
53e3f43217 reftests: ADd test for overlapping border-image slices 2011-06-09 05:51:55 +02:00
Benjamin Otte
9affa9fc4d reftests: Add border-image-repeat
Tests that border-image-repeat is rendered correctly.
The reftest is done via toolbars stuffed into a GtkFixed using
background-image and images tuned for it.
2011-06-09 05:51:54 +02:00
Cosimo Cecchi
83a383e4ba reftests: add reftests for border-image with gradient and url sources
https://bugzilla.gnome.org/show_bug.cgi?id=651194
2011-06-09 05:51:54 +02:00
Matthias Clasen
d8b3bfe778 Use separators instead of hseparators 2011-06-07 21:29:01 -04:00
Matthias Clasen
c134446230 Use boxes instead of hboxes 2011-06-07 19:56:27 -04:00
Matthias Clasen
682296391f tests: Use boxes instead of vboxes 2011-06-07 18:39:15 -04:00
Matthias Clasen
e7f88838f6 Remove an unneeded include 2011-06-07 18:32:24 -04:00
Matthias Clasen
d4224cd325 GtkGrid: Fix a size allocation problem
We need pay attention the the request mode when doing size allocation.
The code was using request mode for requisition, but orientation
for allocation.

Also add a reftest that exhibits the issue, courtesy of
Benjamin Otte.
2011-06-07 11:05:50 -04:00
Javier Jardón
32ef28bc85 Replace gtk_misc_set_padding() with GtkWidget:margin properties
https://bugzilla.gnome.org/show_bug.cgi?id=651605
2011-06-02 18:49:54 +02:00
Benjamin Otte
b5544f5514 tests: Add tests for font-family 2011-06-02 02:03:52 +02:00
Benjamin Otte
bda86b5dd3 tests: Add a test for border-radius handling 2011-06-02 02:03:52 +02:00
Benjamin Otte
a105edbf78 tests: Add a cute demo and test app for the new box css
It contains a live editor for CSS, that thing finds lots of bugs...
2011-06-02 02:03:51 +02:00
Benjamin Otte
bdb8c64dd0 reftests: Add a reftest setting all colors to "none" 2011-06-02 02:03:51 +02:00
Benjamin Otte
be71ea611b tests: Add CSS test for the last two bugs
And it's a 1-byte file, too!
2011-06-02 02:03:51 +02:00
Benjamin Otte
43cca78a98 reftests: Test new pseudo-class support in GtkBox 2011-06-02 02:03:50 +02:00
Matthias Clasen
60081644ae Silence a theme parser error 2011-06-01 18:40:11 -04:00
Benjamin Otte
2108e42306 tests: Make variable const to silence gcc 2011-06-01 16:52:34 +02:00
Javier Jardón
e5c7daa828 tests: avoid boxed structs copying where possible
Use the GtkStyleContext accessors for boxed properties where possible,
to reduce allocations.
2011-05-31 19:12:24 +02:00
Benjamin Otte
2881930e68 tests: Remove unused variables 2011-05-27 16:11:09 +02:00
Benjamin Otte
8c4653c4f2 tests: Make forcing of class registers work without gcc warnings 2011-05-27 16:11:09 +02:00
Matthias Clasen
cf86c7c9bb Move demos around
The pixbuf-demo gets its own subdirectory, the other small
tests move from demos/ to tests/.
2011-05-26 00:32:31 -04:00
Benjamin Otte
a21042c156 tests: Add simple CSS test for widget style properties 2011-05-23 15:56:09 +02:00
Benjamin Otte
0c7e5a51f3 reftests: sort EXTRA_DIST in Makefile 2011-05-22 05:56:12 +02:00
Benjamin Otte
4d92835997 reftests: Add a reftest to check shorthands do work
Checks shorthands are properly unpacked in the CSS and that they indeed
set all relevant properties. Or at least border-width does.
2011-05-22 05:56:12 +02:00
Benjamin Otte
ef51b5be76 reftests: Add label-shadows test
Tests shadows work properly for rotated labels
2011-05-22 05:56:12 +02:00
Benjamin Otte
bd610582b8 tests: Add parser test for shorthands 2011-05-22 05:56:11 +02:00
Benjamin Otte
d7c9d8ce15 tests: Add forgotten file
File was forgotten in 8fd6bd323c
2011-05-21 22:48:52 +02:00
Benjamin Otte
7a0600644c tests: Add missing CSS test 2011-05-19 03:16:03 +02:00
Cosimo Cecchi
d392af2e36 reftests: Check that inherited properties work 2011-05-18 22:17:59 +02:00
Benjamin Otte
25c396409c reftests: Check style property order
Ensure that style properties are read in the correct order, by having a
property twice with vastly different values.
2011-05-18 22:17:58 +02:00
Benjamin Otte
1400644069 reftests: Add a test ensuring selectors don't match children
Previously, the selector "Foo" would not only match Foo widgets, but
also all widgets that are descendants of Foo.
2011-05-18 22:17:57 +02:00
Benjamin Otte
f3ed498c5b reftests: Add a test for descendant CSS selectors match
In widget hierarchy like "Foo Bar Bar Baz", we want the selector "Foo >
Bar Baz" to match, because it matches the elements 1, 2 and 4.
Previously, the selector only matches the Bar at position 3 and then
failed because it wasn't preceded by a Foo.
2011-05-18 22:17:56 +02:00
Benjamin Otte
806c804271 reftests: Add a test that checks that * matches regions 2011-05-18 22:17:56 +02:00
Benjamin Otte
dda83e2f98 reftests: Unset background-image in CSS of test
Otherwise the test screws up when it's set
2011-05-18 22:17:56 +02:00
Benjamin Otte
b8eac1e130 reftests: Add a check for matching regions only once 2011-05-18 22:17:56 +02:00
Benjamin Otte
710caeb512 tests: Add a test for enum values 2011-05-18 22:17:56 +02:00
Benjamin Otte
8ca799cc39 reftests: Add a test for matching by class 2011-05-18 22:17:56 +02:00
Benjamin Otte
78de3e8180 reftests: Add a test for matching by name 2011-05-18 22:17:56 +02:00
Benjamin Otte
269fe0f347 reftests: Add a test for matching by subtype 2011-05-18 22:17:56 +02:00
Benjamin Otte
90caef4abe reftests: Add test to check that matching by type works 2011-05-18 22:17:56 +02:00
Benjamin Otte
174cfff50f tests: Add a test to ensure we handle unknown pseudo-classes correctly
1) We want to throw an unknown value
2) We want to skip the whole rule
2011-05-18 22:17:56 +02:00
Benjamin Otte
e7aa125eb0 tests: Add a test for all selector combination
The test contains an error where we complain about a duplicate value for
":hover:hover"
2011-05-18 22:17:56 +02:00
Benjamin Otte
ce44c95ce8 tests: Be more verbose in error messages.
Also, it makes it easier to copy/paste diffs from the message log...
2011-05-18 22:17:55 +02:00
Benjamin Otte
dd78ab5a2f tests: Add test that ensures we properly parse the color red 2011-05-18 22:17:55 +02:00
Benjamin Otte
42fb004dfc tests: Add another parsing test from the css spec 2011-05-18 22:17:55 +02:00
Benjamin Otte
3f07482b10 tests: Add parsing test from the css spec 2011-05-18 22:17:55 +02:00
Benjamin Otte
2b807e574d tests: Make the parser fail without assertions
Use the new g_test_fail() function. This way, the testsuite usually
doesn't crash, but actually finishes.
2011-05-18 22:17:55 +02:00
Benjamin Otte
7ccb9db79e css: Rewrite the parser
Instead of relying on GScanner and its idea of syntax, code up a parser
that obeys the CSS spec.
This also has the great side effect of reporting correct line numbers
and positions.

Also included is a reorganization of the returned error values. Instead
of error values describing what type of syntax error was returned, the
code just returns SYNTAX_ERROR. Other messages exist for when actual
values don't work or when errors shouldn't be fatal due to backwards
compatibility.
2011-05-18 22:17:55 +02:00
Benjamin Otte
058bbb2aec tests: Add a test for importing nonexistant files 2011-05-18 21:58:47 +02:00
Benjamin Otte
c7ef2225b7 tests: Add tests for cyclic imports 2011-05-18 21:58:47 +02:00
Benjamin Otte
427c97a635 tests: Add test for recursively importing an identical file 2011-05-18 21:58:46 +02:00
Benjamin Otte
77b40f2dcd tests: Order files by name before adding them as tests
Ensures that the order of tests is not dependant on your hard disk.
2011-05-18 21:58:46 +02:00
Benjamin Otte
796d593cc1 tests: Make css-parser test take files as argument
Takes the css files to be tested as argument and runs with it.
2011-05-18 21:58:45 +02:00
Benjamin Otte
1f4b09b2fb tests: Add a test for border parsing 2011-05-18 21:58:45 +02:00
Benjamin Otte
195589feac tests: Add new test checking weird behavior for declarations 2011-05-18 21:58:44 +02:00
Benjamin Otte
fbf658b04e tests: Add CSS integer parsing tests 2011-05-18 21:58:44 +02:00
Benjamin Otte
d28816bdba tests: Add test for booleans to CSS tests 2011-05-18 21:58:44 +02:00
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
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
c18dc15694 tests: Add test for auto-closing at end of file 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
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
Benjamin Otte
d20aa1f8dc reftests: Add a test for the label fix 2011-05-12 23:40:26 +02: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
Matthias Clasen
87e46bfaa9 Add some reftests comparing aspects of grid and box spacing 2011-05-11 13:48:00 -04:00
Benjamin Otte
d01d90fccd reftests: Add test for undersized children of GtkPaned
Tests the recent fixes done in 206b9f940d
and 6bda6f0c58
2011-05-10 01:39:14 +02:00
Benjamin Otte
b6c8671fde reftests: Add CSS file for alignment test
We need to force arrow scaling to 1.0 to get the alignment right.
2011-05-09 13:25:36 +02:00
Matthias Clasen
432e89685f Fix up the misc-alignment test
The new-style ui file had some left-over GtkMisc properties
in it.
2011-05-08 21:28:36 -04:00
Benjamin Otte
42450cacd9 reftests: Modify test to ensure identical output
GtkArrow and the align properties use different methods (float vs int)
to center the arrow. If the size of the arrow is odd, this will cause a
rendering that differs by half a pixel. So we request an even size for
both the arrow and the container and everything works out.
2011-05-09 01:36:00 +02:00
Benjamin Otte
3c2105c9cd reftests: Add misc-alignment test to Makefile 2011-05-09 01:12:29 +02:00
Benjamin Otte
50c36f38ff reftests: Actually add toplevel vs popup testcase
Adds missing files from 79d1b11d0b and
reverts eba4ca3e66.
2011-05-09 01:10:13 +02:00
Matthias Clasen
eba4ca3e66 Drop missing tests 2011-05-07 00:03:13 -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
Tristan Van Berkom
9fd1feb2a8 Adding more traditional checkered background to testtextview. 2011-05-06 17:05:35 -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
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
297e739395 testassistant: don't use deprecated functions 2011-05-06 16:08:42 -04:00
Matthias Clasen
e8413cc28e testassistant: some more tests 2011-05-06 14:56:36 -04:00
Matthias Clasen
6c1133c885 Add an alignment property test
This test compares GtkAlignment properties and GtkWidget margin and
alignment properties.
2011-05-05 22:21:59 -04:00
Matthias Clasen
9966acbdaa Expand GtkMisc tests to cover arrows and images
This unveils something fishy with arrows.
2011-05-05 21:47:14 -04:00
Matthias Clasen
587e534b7e Add a misc-alignment reftest
This test compares GtkMisc properties and GtkWidget margin and
alignment properties.
2011-05-05 17:53:12 -04:00
Matthias Clasen
ebc325d38c More box<>grid comparison tests
Add a more complicated case with multiple expanding children.
Also, make the window a popup.
2011-05-05 17:13:28 -04:00
Benjamin Otte
dced75dcc4 reftests: Add missing css file for grid-expand test 2011-05-05 19:34:31 +02:00
Benjamin Otte
ac06529f61 reftests: Add testcase for label justify fix 2011-05-05 17:33:44 +02:00
Benjamin Otte
278260a3ae reftests: Fix filename in makefile 2011-05-05 17:33:44 +02:00
Benjamin Otte
79d1b11d0b reftests: Add a test that ensures toplevels and popups render identical 2011-05-05 17:33:44 +02:00
Benjamin Otte
66f0544238 reftests: Ensure we got a draw event before quitting the main loop 2011-05-05 17:33:04 +02:00
Benjamin Otte
3f4f900242 reftests: Add a hack to make toplevels work in various WMs
If we have a toplevel, and not a popup window, do wait an additional
0.5s to give the WM/server enough time to actually create the window.

This is a hack and there should be a better solution. But it works.

Please use POPUP windows for tests unless the test must use toplevel
windows.
2011-05-05 17:33:04 +02:00
Benjamin Otte
5c026f32e9 reftests: Plug a leak 2011-05-05 17:33:04 +02:00
Benjamin Otte
9f47d388f2 reftests: Add test for box expand handling 2011-05-05 17:33:04 +02:00
Benjamin Otte
96c9dd119b reftests: Add a test for grid expand flags 2011-05-05 17:33:04 +02:00
Matthias Clasen
dd95a099be Fix box-packing test 2011-05-05 07:28:18 -04:00
Matthias Clasen
8816a12f0b Expand box-packing reftest
Compare vexpand behavior, too.
2011-05-04 22:58:32 -04:00
Matthias Clasen
f3fbdeecdb Add a box-packing reftest
This test compares GtkHBox expand handling with GtkGrid+GtkWidget::hexpand,
to ensure that replacing GtkHBox by GtkGrid works as intended.
2011-05-04 20:40:22 -04:00
Matthias Clasen
e8dd560851 Convert the commit message into a README
Not everybody thinks git grep is a great doc reader...
2011-05-03 19:37:00 -04:00
Benjamin Otte
d0451d6fa4 reftests: Add a --output option to the test runner
This argument specifies where to dump images instead of /tmp. It's not
hooked up to the test runner, so that one will continue to dump into
/tmp.
2011-05-03 15:40:49 +02:00
Benjamin Otte
3a5669afd0 reftests: Add test for low mnemonics
Low mnemonics were invisible previously. This tests the fix from
9bb145a677
2011-05-03 15:40:49 +02:00
Benjamin Otte
97ad34c3a7 reftests: Test that nonresizable windows get the right size
We want the default size, not the minimum one. This tests the fixes from
4f23dc34be
2011-05-03 15:40:49 +02:00
Benjamin Otte
32a3ad412e tests: Add a test for small ellipsized labels
Tests the fix from bf41392861
2011-05-03 15:40:49 +02:00
Benjamin Otte
af75173ddd reftests: Add grid-homogeneous test
Checks that the homogeneous properties of GtkGrid actually do what
they're supposed to.

Tests fixes from 8331b45a5f
2011-05-03 15:40:49 +02:00
Benjamin Otte
17a6d6b5f6 reftests: Add a test for correct entry text clipping in progress drawing
Tests for fixes in da1f618b09
2011-05-03 15:40:49 +02:00
Benjamin Otte
9229b3216a reftests: Add label-sizing test
Checks that the size requests for labels are as they should be for
required and natural size given various combinations of wrap, ellipsize,
width-chars and max-width-chars.

See
http://mail.gnome.org/archives/gtk-devel-list/2011-April/msg00036.html
for the discussion spawning this test.
2011-05-03 15:40:48 +02:00
Benjamin Otte
363dbb6039 reftests: Add
Add a new test runner supposed to do a lot of generic tests. Run it like
this:

./gtk-reftest [OPTIONS] TESTFILE [TESTFILES...]

where FILE is a GtkBuilder ui file to run.

For a general test named "test", you want to have the following files:
1) test.ui
2) test.ref.ui
3) test.css (optional)
The test will then check that test.ui and test.ref.ui are rendered
identically with the provided css.

In detail, for every provided TESTFILE the test runner will:
1) Add the css to the default screen
2) Load the test.ui file and the test.ref.ui file
3) Grab the first GtkWindow subclass widget
4) gtk_widget_show() it and take a snapshot image of its contents into
   a cairo surface.
5) Compare the two images to be bitwise identical. If they are not, a
   diff image will be created hilighting the differences.
6) Save the images as png files to the output directory named:
   - test.out.png (rendering of test.ui)
   - test.ref.png (rendering of test.ref.ui)
   - test.diff.png (optional, differences from step 5)
7) Fail the test if the two images are not bitwise identical

Credit for the idea of reftests goes to Mozilla and in particular David
Baron. For a larger introduction of why reftests are useful, see
http://weblogs.mozillazine.org/roc/archives/2008/12/reftests.html
2011-05-03 15:40:48 +02:00
Javier Jardón
fb3c16b7ad tests/testgtk.c: Fix crash in cursor test
This was introduced in
commit ac4c12ff60
2011-05-02 18:20:23 +01:00
Benjamin Otte
e8c6dbfab1 testgtk: right-justify menuitem by using expand/align flags
gtk_menu_item_set_right_justify() is about to be deprecated and this
thing should work. (Note: should, because I didn't implemented it yet.)
2011-05-02 16:57:12 +02:00
Benjamin Otte
cb99f0750d tests: Make testmenubars make all menubar items ellipsized
This reproduces a bug in Nautilus. And it allows to shrink things,
woohoo!
2011-05-01 04:44:56 +02:00
Javier Jardón
ac4c12ff60 tests: Use gtk_box_new() instead v/h subclasses 2011-04-22 14:44:02 +01:00
Benjamin Otte
616e6d1565 testgtk: Make it possible to stop the progressbar from updating
This way, I can check that my invalidation fixes actually work.
2011-04-14 14:59:24 +02:00
Matthias Clasen
b2f872112a Make GtkWidget::halign RTL-save
This commit makes GTK_ALIGN_START/_END pay attention to
the text direction when used in horizontal context.

This is how similar parameters in GtkMisc and GtkAlignment work,
and is generally expected of GTK+ positioning parameters. And this
is new GTK+ 3 api, so it is basically still unused at this point.

If explicit right/left turn out to be needed at some point, we
can expand the enumeration with new values.
2011-03-30 10:34:02 -04:00
Matthias Clasen
7a65db0402 GtkGrid: Add forgotten RTL flipping
How did we manage to add a non-RTL savy container in GTK+ 3.0 ?
2011-03-30 08:19:30 -04:00
Benjamin Otte
5acd15d21b tests: Make test_init() not check for gdk-pixbuf anymore
gdk-pixbuf is system-installed these days.
2011-03-29 15:33:27 +02:00
Alexander Larsson
4765f37484 Merge branch 'gtk-3-0' into broadway
Conflicts:
	gdk/gdkdisplaymanager.c
2011-03-10 10:51:04 +01:00
Matthias Clasen
57fa43d44b Add a test for interpretation of mark positions 2011-03-03 13:48:34 -05:00
Murray Cumming
f91c04e284 Minor documentation improvements
Mostly correcting it's to its and changing some , to .
2011-02-23 10:26:21 +01:00
Javier Jardón
b1a0a08d94 testgtk: Fix compilation warning 2011-02-13 14:21:12 +00:00
Matthias Clasen
d05d924516 Silence more compiler warnings 2011-02-12 08:01:51 -05:00
Matthias Clasen
bfd66fe3a3 Quell compiler warnings 2011-02-12 08:01:51 -05:00
Matthias Clasen
10ebea8c03 Use standard icon names 2011-02-11 23:53:39 -05:00
Alexander Larsson
d4add8cefa Merge branch 'master' into broadway 2011-02-11 15:27:54 +01:00
Matthias Clasen
524ce69bcb Bump the version to 3.0.0
At the same time, change the library sonames for -3.0 to just -3.
This is necessary since the 2.99 releases installed libraries like
libgtk-3.0.so.0.9903.0, and we want to prevent the library version
number from jumping back. So 3.0 will have libgtk-3.so.0.0.0.
2011-02-10 14:41:02 -05:00
Matthias Clasen
9bd175536b Add a testcase for state propagation problems 2011-02-06 14:14:48 -05:00
Hans Breuer
f55ccce2d9 win32: msvc build update 2011-02-06 15:07:12 +01:00
Matthias Clasen
2e093cdc20 Demonstrate the problem with a workaround 2011-02-05 10:58:50 -05:00
Matthias Clasen
19092fe44f Add a testcase for cell positions 2011-02-05 01:24:21 -05:00
Matthias Clasen
5f04bf6429 Simple test for display-less widget creation 2011-02-04 22:06:25 -05:00
Benjamin Otte
040b21e7d7 tests: Remove refreh button from testtoolbar test
It didn't work and did that by using APIs that are about to go away.
2011-02-01 06:33:02 +01:00
Benjamin Otte
cf94070586 testgtk: Remove ability to reload all rc files
That ability didn't work for a while anyway, so removing client messages
doesn't hurt.
2011-02-01 06:33:02 +01:00
Benjamin Otte
9e401bef68 tests: Remove clientmessage test
Client messages will not be handled by GDK3 anymore, so no need to test
them.
2011-02-01 06:33:02 +01:00
Carlos Garnacho
081d5b14da Add some bindings to testgtk.css for testing 2011-01-30 21:24:52 -05:00
Matthias Clasen
f783a75d61 Add a gtkx.h header for X11-specific GTK+ api
This keeps us from pulling gdkx.h into gtk.h

https://bugzilla.gnome.org/show_bug.cgi?id=640902
2011-01-29 14:16:47 -05:00
Benjamin Otte
388f9fd181 tests: Use Window instead of GdkNativeWindow in testsocket example 2011-01-28 17:06:07 +01:00
Matthias Clasen
9be8bbc9a0 Add gtk_app_chooser_button_get/set_heading 2011-01-24 19:25:08 -05:00
Matthias Clasen
a7bcb8a4d7 Add a way to set the heading of GtkAppChooserDialog
The application can probably set a better string than the default
we construct, like 'Select an application for "software" files'.
2011-01-20 20:57:47 -05:00
Johan Dahlin
b92df453c6 Remove property user_data which doesn't exist anymore 2011-01-20 12:12:22 -02:00
Alexander Larsson
920e8b4343 Merge branch 'master' into broadway2
Doesn't build, but fixed up actual conflicts

Conflicts:
	configure.ac
	gdk/Makefile.am
	gtk/Makefile.am
2011-01-19 19:52:00 +01:00
Benjamin Otte
b40dc528f6 tests: Remove useless calls to gtk_widget_style_attach() 2011-01-11 16:46:59 +01:00
Tristan Van Berkom
34a7dbae3b Fixed GtkCellArea to never activate/start editing insensitive cells.
Included extension to tests/testtreeedit to show this is working properly.
2011-01-10 17:58:57 +09:00
Tristan Van Berkom
a28295a742 Dont show the GtkWindow when removing it from a parent and becomming a toplevel
Showing the window causes it to try to grab focus, this causes problems
when embedded toplevels run through dispose cycles.
2011-01-06 14:39:41 +09:00
Tristan Van Berkom
72675f1f28 Changes to testtoplevelembed
- Made notebook tabs smaller
  - No need to hide/show toplevels after removing from a parent,
    if it's visible it will be automatically shown after removing
    outside of it's previous parent.
2011-01-06 14:39:41 +09:00
Tristan Van Berkom
387d745e0e Added buttons to notebook tabs in testtoplevelembed
Now you can remove and reembed the toplevels (deleting the
toplevels put them back in the notebook).
2011-01-06 14:39:40 +09:00
Tristan Van Berkom
69b1bfb17b Added tests/testtoplevelembed. 2011-01-06 14:39:40 +09:00
Benjamin Otte
2e064b3378 tests: Port testsocket example to not use deprecated APIs 2011-01-05 23:50:22 +01:00
Benjamin Otte
8136481d75 tests: Fix compile warnings for people who don't read gcc output. 2011-01-05 23:50:22 +01:00
Benjamin Otte
e1cb1b89d8 testgtk: Update adjustment usage for sealing 2011-01-05 23:50:22 +01:00
Benjamin Otte
3d3358b561 testgtk: Rename "adj" variables to "adjustment" 2011-01-05 23:50:22 +01:00
Benjamin Otte
b533305728 tests: Update prop-editor adjustment usage for sealing 2011-01-05 23:50:22 +01:00
Matthias Clasen
7799fbf239 Add GtkNumerableIcon
This is a subclass of GEmblemedIcon that can show a number or
short string as an emblem, overlayed on top of another emblem.

Written by Cosimo Cecchi
https://bugzilla.gnome.org/show_bug.cgi?id=637169
2011-01-05 16:33:15 -05:00
Benjamin Otte
c43a31ea33 API: range: Remove update policy
It's unused and complicates code a lot. In particular, it breaks the
adjustment/range abstractions.
2011-01-05 14:30:58 +01:00
Tristan Van Berkom
80e427c857 Fixed gtktreemenu for new gtkcellareabox api. 2011-01-04 23:37:13 +09:00
Tristan Van Berkom
7b2d6e5cdf Make GtkTreeMenu a private class:
- Removed GtkTreeMenu from gtk-docs.sgml
  - Removed GtkTreeMenu from gtk3-sections.txt
  - Removed GtkTreeMenu from gtk.symbols
  - Make GtkTreeMenu apis prefixed with '_' (including _get_type()).
  - Updated GtkComboBox sources to use the private apis
  - Updated GtkCellView to not mention #GtkTreeMenu in gtk-doc statements
  - Updated tests/testtreemenu to not use a GtkTreeMenu but still
    show a very fancy GtkComboBox
  - Moved gtktreemenu.h to private headers section in the makefile.
  - Removed include of gtktreemenu.h from gtk.h
2011-01-04 23:37:13 +09:00
Tristan Van Berkom
6ae724c0d3 Added LISTMODE env var check to testcombo.c so that one can easily test listmode. 2011-01-04 23:37:13 +09:00
Tristan Van Berkom
b57095412b Added aligned food menu test to testcombo.c 2011-01-04 23:37:10 +09:00
Tristan Van Berkom
ab3b75aeb1 Adding a combo box to testtreemenu to show the GtkTreeMenu at work as a combo box delegate. 2011-01-04 23:37:10 +09:00
Tristan Van Berkom
b32ee4fde3 Added orientation control to the treemenu test. 2011-01-04 23:37:09 +09:00
Tristan Van Berkom
238bf5cbaa Oops one of my last commits disabled some tests, re-enabling them. 2011-01-04 23:37:09 +09:00
Tristan Van Berkom
4a5be7c74e Getting closer to updating the treemenu view properly from the model signals 2011-01-04 23:37:08 +09:00
Tristan Van Berkom
84a726c3ce Support grid mode in GtkTreeMenu
Added properties "wrap-width", "row-span-column" and "column-span-column"
to allow grid style menus from treemodels. Handling row data changes
appropriately.
2011-01-04 23:37:07 +09:00
Tristan Van Berkom
de59f05ccd Added gtk_tree_menu_set/get_tearoff to allow the root menu to have a tearoff item
Combo boxes expose an "add-tearoffs" feature to add a tearoff item to the root of the combo menu, added this feature to GtkTreeMenu to achieve this (and updated the testcase).
2011-01-04 23:37:07 +09:00
Tristan Van Berkom
9ffaae5022 Added GtkTreeMenuHeaderFunc to decide if a submenu gets a leaf header.
GtkComboBox needs treemenus to allow selection of all leafs including
rows which may have children, this allows the combobox or combobox user
to decide which row that has children can also be selectable as a header
leaf of the submenu. Test case testtreemenu updated to reflect this.
2011-01-04 23:37:06 +09:00
Tristan Van Berkom
53bdca9dae Adding more "small" submenus to testtreemenu 2011-01-04 23:37:06 +09:00
Tristan Van Berkom
aef55bb629 Added submenus to tests/testtreemenu 2011-01-04 23:37:06 +09:00
Tristan Van Berkom
26c3f1a26d Adding GtkTreeMenu class.
Added GtkTreeMenu class to automatically render
a GtkTreeModel into a GtkMenu hierarchy (will be
used by GtkComboBox for its dropdown menus). Included
an accompanying testcase tests/testtreemenu
2011-01-04 23:37:06 +09:00
Matthias Clasen
98b140e7b5 Don't use GtkNotebook:tab-pack in testnotebookdnd 2011-01-04 00:55:50 -05:00
Matthias Clasen
b555be06b7 Make styleexamples work
If we are keeping this code in source control, might as well
make it work.

https://bugzilla.gnome.org/show_bug.cgi?id=638179
2011-01-03 12:34:23 -05:00
Hans Breuer
23506c0e44 c99ism: declaration in the mid of a block 2011-01-02 13:33:13 +01:00
Hans Breuer
95213b3f04 win32: update msvc build 2011-01-02 13:33:06 +01:00
Benjamin Otte
e4cc259111 testgtk: Don't use deprecated APIs 2010-12-27 19:43:24 +01:00
Benjamin Otte
7ab7422821 testgtk: Use the relevant device to query the widget to snapshot
Also gets rid of deprecated functions.
2010-12-27 19:27:16 +01:00
Matthias Clasen
bde1d072e5 Don't use gdk_{pointer,keyboard}_grab
Instead use gdk_device_grab.
2010-12-24 20:00:19 -05:00
Kristian Rietveld
26173c7864 Delimit the other_entries array 2010-12-23 18:19:55 +01:00
Matthias Clasen
af9d59aaca Allow inspection of construct-only object properties
The 'Properties' button here is not really modifying the property
in any way, so it doesn't make sense to disable it just because
the object can only be set at construction.

This lets us poke at e.g. the cell area of an icon view.
2010-12-23 00:43:50 -05:00
Robert Ancell
f4419be0d6 Fix DSO link issues 2010-12-22 15:01:50 +11:00
Benjamin Otte
73d8ffd74f testgtk: Use g_object_unref instead of gdk_cursor_unref 2010-12-21 12:07:05 -05:00
Matthias Clasen
2211e52ec5 Don't use gtk_set_locale 2010-12-21 12:07:02 -05:00
Matthias Clasen
ae2c3a909c tests: Don't access GdkDragContext fields directly 2010-12-21 12:06:55 -05:00
Matthias Clasen
07d49ee56a Merge libgdk and libgtk
This commit does a number of things:
- remove some dead wchar configury from configure.ac and gdkconfig.h
- repurpose gdkconfig.h as header that contains GDK_WINDOWING_foo
  macros for each included backend, include it in gdk.h and install
  it in $includedir instead of below $libdir
- drop the backend from the library names
- build libgdk-3.0.la as a convenience lib and include it in libgtk-3.0.la
It does not yet enable building multiple backends at the same time.
2010-12-21 12:06:55 -05:00
Tristan Van Berkom
49273f2277 Added "fixed-size" cell property to GtkCellAreaBox
Now a cell can either have a "fixed" size or it can have
an "aligned" starting point or both. "fixed" size cells take
no space when they are invisible.
2010-12-22 00:28:18 +09:00
Tristan Van Berkom
71e7cd0ec4 Merge branch 'master' into treeview-refactor
Conflicts:
	tests/testtreeedit.c
2010-12-17 15:25:15 +09:00
Javier Jardón
7105e8e907 tests: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:15 +00:00
Kristian Rietveld
5399f7b6e6 Make testtreeview handle RTL environment variable for testing 2010-12-15 21:36:47 +01:00
Kristian Rietveld
0112c32c5b Make testcellarea handle RTL environment variable for testing 2010-12-15 21:22:35 +01:00
Benjamin Otte
198fc0b774 tests: Hardcode testinput colors instead of trying to use GtkStyle
Makes it work with new themeing APIs.
2010-12-15 14:51:26 +01:00
Benjamin Otte
cae6021d3a tests: Make testiconview-keynav set its custom style using CSS. 2010-12-15 14:51:26 +01:00
Benjamin Otte
e274ac4b6c tests: gtk_widget_render_icon() => gtk_widget_render_icon_pixbuf() 2010-12-15 14:51:26 +01:00
Benjamin Otte
1312f774f5 tests: gtk_widget_render_icon() => gtk_widget_render_icon_pixbuf() 2010-12-15 14:51:26 +01:00
Benjamin Otte
7caec64bc3 tests: gtk_widget_render_icon() => gtk_widget_render_icon_pixbuf() 2010-12-15 14:51:26 +01:00
Benjamin Otte
6aa745b819 tests: gtk_widget_render_icon() => gtk_widget_render_icon_pixbuf() 2010-12-15 14:51:26 +01:00
Tristan Van Berkom
7e526d57f0 Add an editable cell to testverticalcells showing functional vertical focus navigation. 2010-12-12 17:21:28 +01:00
Tristan Van Berkom
2f4e451075 Added "edit_only" argument to gtk_cell_area_activate()
This argument allows the caller to specify that only an editable
cell should start editing but an activatable cell should not toggle
it's state, this is important for public apis like
gtk_tree_view_set_cursor_on_cell() which are only intended to
programatically bring attention to the editing of a specific
row or cell but not actually change any data.

GtkTreeView & CellAreaScaffold updated for the last minute api change.
2010-12-12 17:15:46 +09:00
Tristan Van Berkom
a090d62339 Added expand controls to testtreeedit (now you can play with align & expand effects in cells there). 2010-12-06 16:30:18 +09:00
Tristan Van Berkom
364fe807f4 Added g_getenv("RTL") to test rtl layouting. 2010-12-05 22:15:31 +09:00
Tristan Van Berkom
847581b67c Adding testverticalcells.c.
This test displays a GtkTreeViewColumn rendering a vertically
oriented GtkCellArea along side a horizontally oriented column
in the same treeview.
2010-12-05 22:15:03 +09:00
Tristan Van Berkom
9f4f22faf1 Removed all variables from GtkTreeViewColumn and created GtkTreeViewColumnPrivate
Some details:
  - button_request was not needed, consult the minimum request of the button
  - gtk_tree_view_column_get_button() needed to be public as people can set
    tooltips on the button (and libgail accesses the button).
2010-12-05 22:11:08 +09:00
Tristan Van Berkom
c6e1463d1e Added different icon at the end of testtreeedit to see if RTL is actually working. 2010-12-05 15:24:05 +09:00
Tristan Van Berkom
7b61cd8257 Merge branch 'master' into treeview-refactor 2010-12-05 13:14:39 +09:00
Alexander Larsson
07fafe7b23 Merge branch 'master' into broadway 2010-12-04 22:31:15 +01:00
Matthias Clasen
144c3fd478 Fix gdk_rgba_parse call 2010-12-04 16:16:29 -05:00
Tristan Van Berkom
0d786985a3 Merge branch 'master' into treeview-refactor
Conflicts:
	gtk/gtkmarshalers.list
	tests/Makefile.am
2010-12-05 00:36:37 +09:00
Carlos Garnacho
8c02445bc5 testgtk: Fix gdk_rgba_parse() arguments. 2010-12-04 15:39:58 +01:00
Matthias Clasen
e374f7e4b5 Forgotten files 2010-12-04 15:39:46 +01:00
Matthias Clasen
757837b611 Make tests compile without using GtkStyle api 2010-12-04 15:39:46 +01:00
Matthias Clasen
0f98b15090 Add illustration to gtk_render_handle docs 2010-12-04 15:39:42 +01:00
Matthias Clasen
d1f1af202b Add a frame-gap illustration 2010-12-04 15:39:42 +01:00
Matthias Clasen
e57e0e978d Illustrate extension rendering 2010-12-04 15:39:39 +01:00
Matthias Clasen
8589c5c65e Add slider illustration 2010-12-04 15:39:38 +01:00
Matthias Clasen
8d951476bf Add an activity example
This doesn't work, since it trips up on num-steps not being
available for GtkEventBox.
2010-12-04 15:39:38 +01:00
Matthias Clasen
7e96a51953 Add examples for frame rendering 2010-12-04 15:39:38 +01:00
Matthias Clasen
e522381183 Add a background example to the docs 2010-12-04 15:39:38 +01:00
Matthias Clasen
31368f16cb Add the style example code used to generate illustrations 2010-12-04 15:39:37 +01:00
Matthias Clasen
42dd5b2e15 Adapt testgtk.css to parser changes 2010-12-04 15:39:21 +01:00
Carlos Garnacho
5bf9f8c410 testgtk: Try to locate the right file. 2010-12-04 15:39:09 +01:00
Carlos Garnacho
37f9f491d2 Make testgtk load CSS for custom styling. 2010-12-04 15:39:07 +01:00
Tristan Van Berkom
c4eff8b6b0 Added some "align" checkbuttons to show configurable cell alignments in testtreeedit. 2010-12-04 21:41:48 +09:00
Benjamin Otte
ba20a00570 tests: Remove disabled testtext example 2010-12-02 20:21:04 +01:00
Tristan Van Berkom
cd09abf461 Changed tests/testcellarea.c (and scaffolding) to only reorient the GtkCellArea
It's a better test case if the scaffolding only displays the rows from top
to bottom and doesnt line up the cells from left to right (because it shows
that height-for-width still works with vertically oriented areas).
2010-12-02 17:10:10 +09:00
Tristan Van Berkom
03a72118ad Merge branch 'master' into treeview-refactor
Conflicts:
	tests/Makefile.am
2010-12-02 13:58:02 +09:00
Cosimo Cecchi
510d65ba08 app-chooser-button: add gtk_app_chooser_button_set_active_custom_item()
This allows to pre-select a custom item.
2010-12-01 17:04:22 +01:00
Bastien Nocera
959fc60c47 gtk: Allow hiding the trough/slider in GtkScale
When setting a GtkRange's upper and lower values to the same
value, the slider will not be drawn any more.

https://bugzilla.gnome.org/show_bug.cgi?id=549720
2010-12-01 15:39:50 +00:00
Tristan Van Berkom
30561228ed Added some rules to GtkCellAreaBox for rendering the last cell.
- When we reach a cell that is out of the render area, break out
   of the loop (for columns user resized too small)
 - CLAMP the size of the last renderer to fit into the area
   (so that renderers get a chance to ellipsize when rendered
   with a space less than allocation, same reason as above).
 - Hand out remaining space in the render area to the last cell,
   this is for shallow rows in the expand column which may recieve
   more than the allocated width.
2010-12-01 22:56:06 +09:00
Cosimo Cecchi
4fe23cae78 app-chooser: other misc doc fixes 2010-11-30 17:27:53 +01:00
Cosimo Cecchi
cb916f2746 Merge branch 'master' into open-with-dialog
Conflicts:
	docs/reference/gtk/gtk3-sections.txt
	gtk/gtk.symbols
2010-11-30 16:27:28 +01:00
Matthias Clasen
0ca07a6df7 Add a GtkSwitch 2010-11-29 10:14:21 -05:00
Cosimo Cecchi
232a5c7b3b app-chooser-button: change the API approach for custom items
Introduce a 'custom-item-activated' on the widget, which behaves
similairly to GtkEntryCompletion::action-activated, i.e. is emitted when
a custom item is chosen from the dropdown list.
Clients can use the name provided when adding the item as a detail for
the signal, to get notified when that specific item is activated, or use
the signal without details to get notifications for all custom items.
2010-11-29 16:04:59 +01:00
Emmanuele Bassi
0cd0e4091f Add GtkSwitch, a "light-switch" like widget
The GtkSwitch widget is a simple UI control that has two states: on and
off. Toggling between the states is possible by clicking the widget or
by dragging the handle.

https://bugzilla.gnome.org/show_bug.cgi?id=634987
2010-11-29 12:52:10 +00:00
Cosimo Cecchi
06f501fa07 app-chooser-button: rename GtkAppChooserComboBox -> GtkAppChooserButton 2010-11-29 12:19:18 +01:00
Tristan Van Berkom
c1cbc8790e Removed gtk_cell_area_context_sum_preferred_width/height apis.
Turns out theres not much reason to do this in a separate api,
now we just sum up the sizes of aligned cell groups in GtkCellAreaContextBox
when pushing the group size.
2010-11-29 10:55:50 +09:00
Tristan Van Berkom
5df7dab3cf Changed all the flush apis on GtkCellAreaContext for a single "reset" api. 2010-11-27 16:05:14 +09:00
Tristan Van Berkom
08cc318946 Fixed CellAreaScaffold for new gtk_cell_area_context_allocate() api. 2010-11-26 21:38:29 +09:00
Alexander Larsson
5b480e1b0d [broadway] Copy X backend to broadway 2010-11-25 22:09:19 +01:00
Cosimo Cecchi
ef9543e978 tests: fix indentation 2010-11-25 17:32:13 +01:00
Cosimo Cecchi
67e842be87 app-chooser-combobox: add a method to trigger the GtkAppChooserDialog
It's an optional special item in the combobox, turned off by default.
2010-11-25 17:30:01 +01:00
Tristan Van Berkom
57a94bfb53 Merge branch 'master' into treeview-refactor 2010-11-25 15:07:47 +09:00
Matthias Clasen
a498d9a9ba Coding style fixups
This commit adjusts the app chooser code to GTK+ coding style:
- line up prototypes
- remove some excess {}
- remove tabs and trailing whitespace
- add docs
2010-11-24 18:32:05 -05:00
Matthias Clasen
f64448473e Coding style fixes 2010-11-24 16:50:00 -05:00
Matthias Clasen
964b684455 Improve packing in testappchooser 2010-11-24 16:47:15 -05:00
Cosimo Cecchi
183d75b812 app-chooser-combobox: make refresh properly work with custom items
The refresh implementation leaves the custom items in place, and just
refreshes the recommended applications.
2010-11-24 19:08:17 +01:00
Cosimo Cecchi
2a95707b4c app-chooser-combobox: add an initial implementation
GtkAppChooserCombobox is an implementation of GtkAppChooser inside a
combobox that shows recommended applications for a given content type.
2010-11-24 18:45:42 +01:00
Benjamin Otte
e0fb7a86e5 gtk: Remove GtkRuler
It is really bad code, mostly unused and no one stepped up to fix it.

Note that Gtk developers do not object to a ruler widget in priciple,
just to the current implementation. If someone wants to propose a sane
version, please don't hesitate.

https://bugzilla.gnome.org/show_bug.cgi?id=613942
2010-11-24 16:56:10 +01:00
Cosimo Cecchi
783b36398e tests: remove radio mode from the test 2010-11-24 15:50:08 +01:00
Michael Natterer
fb5dd9f72f Move all GdkDevice members to private and add one missing accessor 2010-11-23 20:25:13 +01:00
Cosimo Cecchi
05bb715c51 app-chooser: rename GtkOpenWith to GtkAppChooser 2010-11-23 17:50:15 +01:00
Cosimo Cecchi
44ef183fa1 tests: update to the new API 2010-11-23 16:53:22 +01:00
William Jon McCann
076e851c5f Add some window border to test open with 2010-11-23 16:51:40 +01:00
William Jon McCann
04452df476 Add a default file to open with test 2010-11-23 16:51:40 +01:00
Cosimo Cecchi
f8a6ac5429 tests: update to new API 2010-11-23 16:51:39 +01:00
Cosimo Cecchi
cf25ec8fa7 open-with: first attempt to split the dialog into a widget + interface
Like GtkFileChooser does; GtkOpenWith is a generic interface, which is
now implemented by both GtkOpenWithDialog and GtkOpenWithWidget (and in
the future also by GtkOpenWithComboBox).
2010-11-23 16:51:39 +01:00
Cosimo Cecchi
9d6055d0c8 tests: use new open with mode in the tests 2010-11-23 16:51:39 +01:00
Cosimo Cecchi
df8ccfb800 open-with: change the API to make it symmetric for GFile or content-type
It's much more convenient this way.
2010-11-23 16:51:39 +01:00
Cosimo Cecchi
3a6b936573 tests: rewrite the GtkOpenWithDialog test to make it more interactive
Now you can play with all the options provided by GtkOpenWithDialog API.
2010-11-23 16:51:39 +01:00
Cosimo Cecchi
be18ca45f0 open-with: initial implementation of GtkOpenWithDialog 2010-11-23 16:51:38 +01:00
Chris Kühl
fad1bc0de4 tests: Fixed argument naming inconsistancy 2010-11-23 10:49:44 +01:00
Tristan Van Berkom
d56babefb4 Removed cell margin apis and now deal with "focus-line-width". 2010-11-23 16:26:46 +09:00
Javier Jardón
f427d6998d gtkoffscreenbox.c: Replace size_request by get_preferred_width/height 2010-11-17 23:58:53 +01:00
Tristan Van Berkom
92dc7f31d4 Cleaned up cell editing api in GtkCellArea
Now layouting widgets need only concern themselves with
the "add-editable" and "remove-editable" signals, also added
lots of gtk-doc comments.
2010-11-14 23:33:26 +09:00
Tristan Van Berkom
1bca6349fb Mass rename GtkCellAreaIter --> GtkCellAreaContext 2010-11-13 16:23:01 +09:00
Tristan Van Berkom
e7c4ede64c Fixed some background area related bugs in CellAreaScaffold, cleanup testcellarea 2010-11-13 15:09:36 +09:00
Tristan Van Berkom
eda16a096d Fixed some errors in testcellarea testcases. 2010-11-12 23:09:57 +09:00
Tristan Van Berkom
51b75ef44b Added tests to reflect proper treatment of background area.
CellAreaScaffold now also reflects how cell_area should be
passed to gtk_cell_area_activate() and gtk_cell_area_event()
and how the background area for gtk_cell_area_renderer() should
be created.
2010-11-12 21:55:28 +09:00
Tristan Van Berkom
47d55c4a4b Added orientation control to testcellarea's focus/editing test 2010-11-12 19:44:45 +09:00
Tristan Van Berkom
38666b406f Ironed out the kinks in editing apis for GtkCellArea
- Added gtk_cell_area_aligned_cell_area() to get the aligned
   internal area use by a cell (for focus painting and for
   event areas).

 - Provide the event area in "editing-started" signal

 - Fire "remove-editable" when editing is canceled by the user,
   an implementing layouting widget need only catch "editing-started"
   and "remove-editable" now.

 - CellAreaScaffold/testcellarea now edit textrenderers.
2010-11-12 19:25:07 +09:00
Tristan Van Berkom
33db66e728 Added event handling to GtkCellAreaBox
Now GtkCellAreaBox handles the click event to activate renderers
and checks if the area is in a sibling of a focus renderer, possibly
activating the proper focus sibling renderer.

Also GtkCellArea gains a "focus-changed" signal to allow it to
change the currently focused row according to the button events.
2010-11-11 18:13:54 +09:00
Tristan Van Berkom
f330b40521 GtkCellArea now paints focus on cells
Added concept of "Focus Siblings" to GtkCellArea so that some
static text/icon may be included in the focus/click area of
an activatable or editable cell, implemented focus drawing
as well, updated testcellarea to reflect the changes.
2010-11-11 16:13:06 +09:00
Tristan Van Berkom
524110f902 Focus driving in GtkCellArea now works.
- Fixed focus driving in GtkCellArea with refined apis
 - Added gtk_cell_area_activate() to be called when the area has focus
   (to activate or start editing the focused cell)
 - Added support for this in cellareascaffold
 - testcellarea now watches the "toggled" signal for a toggle renderer
   and updates the model state accordingly, this currently works with
   keyboard navigation, however focus is still not painted on cells.
2010-11-10 22:25:13 +09:00
Tristan Van Berkom
4643d90c5f Committing new (and simplified) focus handling approach for GtkCellArea.
Also adding missing file cellareascaffold.h
2010-11-10 19:17:06 +09:00
Tristan Van Berkom
f85938a211 Changed testcellarea
Changed testcellarea to watch the iter for size changes and queue resizes
instead of explicitly queueing resizes when controls change.
2010-11-09 14:09:47 +09:00
Tristan Van Berkom
e03b280757 Adding expand/align controls to testcellarea. 2010-11-09 13:50:53 +09:00
Tristan Van Berkom
2a3ae8da3a Added orientation control on testcellarea test
shows vertical orientation of cells lined up horizontally instead
of horizontal orientation of cells stacked up vertically.
2010-11-09 13:23:12 +09:00
Tristan Van Berkom
85d6aa1627 Added test and scaffolding widget for GtkCellArea. 2010-11-09 01:26:38 +09:00
Matthias Clasen
e5c0d40d94 Make GtkFileChooserButton behave as expected when expanding 2010-11-08 11:31:03 +09:00
Cosimo Cecchi
99144330a0 tests: fix the build
gtk_box_new() changed API recently.
2010-11-08 11:31:01 +09:00
Cosimo Cecchi
c068e988a1 tests: add a test for pixbufs implementing the GIcon interface
https://bugzilla.gnome.org/show_bug.cgi?id=634060
2010-11-08 11:31:01 +09:00
Matthias Clasen
9dfeee8127 Make GtkFileChooserButton behave as expected when expanding 2010-11-07 11:22:07 -05:00
Cosimo Cecchi
c69075f170 tests: fix the build
gtk_box_new() changed API recently.
2010-11-05 17:01:34 +01:00
Cosimo Cecchi
fcfd494b78 tests: add a test for pixbufs implementing the GIcon interface
https://bugzilla.gnome.org/show_bug.cgi?id=634060
2010-11-05 16:28:32 +01:00
Michael Natterer
8979855f60 tests: missed these two gtk_box_new() which sneaked in by rebasing... 2010-11-02 12:04:35 +09:00
Michael Natterer
260ccdfebe gtk: remove "gboolean homogeneous" from gtk_box_new()
Because it's FALSE in virtually all use cases.
2010-11-02 12:04:35 +09:00
Matthias Clasen
c50f790417 Add content size test for scrolled window 2010-11-02 12:04:35 +09:00
Michael Natterer
240e1b4b59 tests: missed these two gtk_box_new() which sneaked in by rebasing... 2010-10-31 20:01:28 +01:00
Michael Natterer
3a0afce509 gtk: remove "gboolean homogeneous" from gtk_box_new()
Because it's FALSE in virtually all use cases.
2010-10-31 19:22:28 +01:00
Matthias Clasen
81d7dd0774 Add content size test for scrolled window 2010-10-31 14:10:41 -04:00
Javier Jardón
c15ef6405c Use gtk_box_new() instead gtk_[v|h]box_new() 2010-10-30 17:37:03 +09:00
Javier Jardón
6c301d4b0a Use gtk_scrollbar_new() instead gtk_[v|h]scrollbar_new() 2010-10-30 17:37:03 +09:00
Javier Jardón
234553c093 Use gtk_scale_new() instead gtk_[v|h]scale_new() 2010-10-30 17:37:03 +09:00
Javier Jardón
d03d2943d2 Use gtk_scale_new_with_range() instead gtk_[v|h]scale_new_with_range() 2010-10-30 17:37:03 +09:00
Javier Jardón
cdf4b4bbd5 Use gtk_paned_new() instead gtk_[v|h]paned_new() 2010-10-30 17:37:03 +09:00
Javier Jardón
524e704147 Use gtk_ruler_new() instead gtk_[v|h]ruler_new() 2010-10-30 17:37:02 +09:00
Javier Jardón
821c3c6578 Use gtk_separator_new() instead gtk_[v|h]separator_new() 2010-10-30 17:37:02 +09:00
Javier Jardón
2615ebf37e Use gtk_button_box_new() instead gtk_[v|h]_button_box_new() 2010-10-30 17:37:02 +09:00
Vincent Untz
e0d1652a99 Port tests to GtkScrollable API instead of deprecated GtkLayout API
https://bugzilla.gnome.org/show_bug.cgi?id=633374
2010-10-30 17:37:01 +09:00
Matthias Clasen
5e0451de3a Use correct icon name in testtoolbar 2010-10-30 17:35:20 +09:00
Javier Jardón
a9894d4cf4 Use gtk_box_new() instead gtk_[v|h]box_new() 2010-10-30 05:22:58 +02:00
Javier Jardón
570b90e218 Use gtk_scrollbar_new() instead gtk_[v|h]scrollbar_new() 2010-10-30 02:26:24 +02:00
Javier Jardón
217036975a Use gtk_scale_new() instead gtk_[v|h]scale_new() 2010-10-30 02:26:24 +02:00
Javier Jardón
8177ad320e Use gtk_scale_new_with_range() instead gtk_[v|h]scale_new_with_range() 2010-10-30 02:26:23 +02:00