Commit Graph

1560 Commits

Author SHA1 Message Date
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