Commit Graph

27195 Commits

Author SHA1 Message Date
Cosimo Cecchi
297e739395 testassistant: don't use deprecated functions 2011-05-06 16:08:42 -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
e805320a14 gtk3-demo: assistant demo simplications
Since header and sidebar images are no longer used, don't set them.
2011-05-06 14:56: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
Matthias Clasen
e8413cc28e testassistant: some more tests 2011-05-06 14:56:36 -04:00
Matthias Clasen
e244e5050b Silently allow child properties on grandchildren
This commit simply removes some child->parent == container checks,
to add some flexibility for containers with 'inner structure'.
If these checks are considered useful, we can bring them back
with a is_child vfunc that allows container implementations to
decided who they consider legitimate child.
2011-05-06 14:29:47 -04:00
Matthias Clasen
deb271d355 Add gtk_container_child_notify
This is a variant of gtk_widget_child_notify() that takes an
explicit container, instead of relying on widget->parent to
be the correct container to use.
2011-05-06 14:29:14 -04:00
Matthias Clasen
c8c1075cfe gtk-demo: Don't leave a dangling pointer to a destroyed widget
When destroying the assistant, clean up the static variable
that points to it.
2011-05-06 14:28:28 -04:00
Matthias Clasen
73bf1740e9 Some additional auto-mnemonic fixes
Previously, we would also show mnemonics if the user hits
Ctrl+Alt, even though Ctrl+Alt+<x> does not actually trigger.
2011-05-06 14:10:23 -04:00
Rui Matos
6889d5b008 GtkWindow: set mnemonics visible on focus in if modifier is pressed
With gtk-auto-mnemonics on, we hide mnemonics on focus out. We should also
check if the modifier is pressed on focus in and if so, show mnemonics again.

https://bugzilla.gnome.org/show_bug.cgi?id=618815
2011-05-06 14:10:23 -04:00
Javier Jardón
d543a9c6f9 configure.ac: Indeed the minimum required version is 2.29.4, not 2.29.2 2011-05-06 18:54:22 +01:00
Javier Jardón
4e75148796 configure.ac: Bump glib minimum required version to 2.29.2
As we are using the new g_test_fail() in the gtk-reftest
2011-05-06 18:52:14 +01:00
Benjamin Otte
f6e11febfa Revert "arrow: Make minimum size 5px"
This reverts commit 1c46e04f30.

The change broke too many widgets that relied on the size being
constant. A proper fix would require letting themes override the size.
That would probably also require letting themes specify the size
relative to font size.
2011-05-06 19:35:40 +02: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
Colin Walters
703af0fb48 gtkicontheme: More explicitly note ownership transfers of duplicated string
I was hunting a memory leak and couldn't find it; at least I'm
pretty sure all of these are OK.  But document things better
for the future.

Also use g_hash_table_replace in one more case for consistency.

https://bugzilla.gnome.org/show_bug.cgi?id=649457
2011-05-05 16:02:10 -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
33e6479554 label: Compute label offset properly for wrapped justified labels
label offsets were computed wrong for wrapped or ellipsized labels that
were right- or center-justified and had excess space available.
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
Javier Jardón
2f3e1fa3e4 gtk/gtktrayicon-x11.c: Use GdkRGBA instead GdkColor 2011-05-05 12:48:09 +01:00
Matthias Clasen
b8fe808e15 GtkButtonBox: add a non-homogeneous child property
This makes it easier to add things like lock buttons in
dialogs. Part of #626457.
2011-05-05 07:46:03 -04: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
Daniel Mustieles
9797bf4fe8 Updated Spanish translation 2011-05-04 22:46:27 +02:00
Javier Jardón
1fcfa91ee3 gdk/x11/gdkcursor-x11.c: Use GdkRGBA instead GdkColor 2011-05-04 17:58:17 +01:00
Kristian Rietveld
8285c7f60f GdkWindow: remove unused variable 2011-05-04 07:31:39 +02: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
Carlos Garnacho
2a1a969d23 GdkWindow: Fix gdk_window_set_[device_]cursor() issues with root/foreign windows
It could be the case that gdk_window_set_cursor() is called on
pointers not yet known to the device tracking code in GdkDisplay,
so update the cursor on all master pointers.

The code actually updating the cursor for the given window has
been refactored out to gdk_window_set_cursor_internal(), used
in gdk_window_set_device_cursor() as well, which makes it handle
root/foreign windows too.

https://bugzilla.gnome.org/show_bug.cgi?id=649313
2011-05-04 01:00:42 +02:00
Colin Walters
b90e8cfc36 gtkdnd: Add API that takes GIcon
This will be useful for me to port gnome-panel to gnome-menus 4, which
uses GAppInfo, which in turn returns icon references as GIcon.

https://bugzilla.gnome.org/show_bug.cgi?id=649295
2011-05-03 12:53:46 -04:00
Colin Walters
e36c9dffac gtkimageprivate: Drop unused theme_change_id 2011-05-03 11:04:56 -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
Benjamin Otte
69300df1fc label: Allow using more underline modes 2011-05-03 15:38:43 +02:00