Commit Graph

2529 Commits

Author SHA1 Message Date
Matthias Clasen
c514d1dd5e testfilechooser: Say Save
Thats a more typical affirmative action in save mode.
2015-07-31 07:12:35 -04:00
Matthias Clasen
ccfacb383c testgtk: Remove pointless code
The display is getting overwritten immediately. Pointed out by
coverity.
2015-07-17 19:54:09 -04:00
Matthias Clasen
2b105dc3d9 testdialog: Error out if templates are missing
Coverity complained about us ignoring the return value
here, and it is nicer to get an error message about this.
2015-07-17 16:11:17 -04:00
Emmanuele Bassi
b274a2656d tests/gears: Ensure we don't use unavailable GL resources
We need to check on realize if we have access to a GL context, before
calling GL functions. We use gtk_gl_area_get_error() for that.

We also need to tear down the resources during unrealization, instead
of leaking them.
2015-07-16 14:55:25 +01:00
Benjamin Otte
bc19ea965f tests: Remove testplacesview test
The GtkPlacesView widget was made private, so we can't create it in a
testcase.
2015-07-16 06:37:37 +02:00
Benjamin Otte
974c60a0d5 tests: Fix gcc complaints about testfilechooser 2015-07-16 06:37:32 +02:00
Georges Basile Stavracas Neto
7af88d40b1 placesview: add view for fixed drives and networks
Places sidebar shows XDG directories, mounted and unmounted devices,
connected networks, bookmarks and actions like 'Connect to server'
and 'Insert location', which causes the sidebar to grow very quickly
and look cluttered. Because of that, new mockups for the sidebar try
to simplify it.

To make the sidebar simpler, the new mockups propose that it should
only handle connected networks and removable devices such as flash
drives and USB devices, and delegates other devices for external
widgets through the 'Other Locations' item.

To handle fixed devices and manage network connections, add a new
widget named GtkPlacesView, based on Nautilus mockups to keep
consistency between GNOME file management tools - in this case,
between Nautilus and the bundled Gtk's file chooser.

https://bugzilla.gnome.org/show_bug.cgi?id=752034
2015-07-15 23:11:52 -03:00
Benjamin Otte
8756c03885 testtoolbar: Don't expand rows that shouldn't be expanded 2015-07-08 05:48:59 +02:00
Ryan Lortie
d2f27bfe71 testgmenu: use the menu binding code
The menu tracker does a better job of this than we can, so move over to
using it instead.

This fixes issues with './testgmenu --import' not properly displaying
the language submenu.

https://bugzilla.gnome.org/show_bug.cgi?id=752016
2015-07-07 09:28:59 -04:00
Matthias Clasen
4a21c129e4 testfilechooser: Add a --local-only flag
This allows for easier testing of !local-only mode.
2015-07-04 00:29:26 -04:00
Matthias Clasen
f87f43b622 testfilechooser: Disable the terrible preview
It makes testing the intended user experience harder.
2015-07-04 00:29:25 -04:00
Matthias Clasen
e9b847736c Add a testcase for font options 2015-07-01 19:14:58 -07:00
Cosimo Cecchi
9c7b0f0491 overlay: remove gtk_overlay_add_pass_through_overlay()
The API to access this functionality will be the setter we just added in
the previous commit.

https://bugzilla.gnome.org/show_bug.cgi?id=750568
2015-06-17 11:48:37 -07:00
Alexander Larsson
5cf2896308 testoverlay: Fix indentation 2015-06-15 11:00:40 +02:00
Alexander Larsson
1a44a85847 testoverlay: Add test for overlay z ordering
https://bugzilla.gnome.org/show_bug.cgi?id=750568

https://bugs.freedesktop.org/show_bug.cgi?id=90917
2015-06-15 10:56:46 +02:00
Alexander Larsson
a9bf6532b4 testoverlay: Fix test by using add_pass_through_overlay
https://bugzilla.gnome.org/show_bug.cgi?id=750568

https://bugs.freedesktop.org/show_bug.cgi?id=90917
2015-06-15 10:56:46 +02:00
Alexander Larsson
ccc4b192ec testoverlay: Add new input stacking test
In this case we have a bunch of interactive main children
of the overlay, and then a centered overlay that contains both
non-interactive (labels) and interactive (entry) widgets.

This shows off a problem where the non-interactive parts (the labels)
steals input from the overlay main children (breaks button click and
hover effects).

https://bugzilla.gnome.org/show_bug.cgi?id=750568

https://bugs.freedesktop.org/show_bug.cgi?id=90917
2015-06-15 10:56:45 +02:00
Matthias Clasen
675467063e testassistant: Remove padding from the filechooser page
This tests the new assistant api to remove padding from
pages.
2015-06-14 21:30:01 -04:00
Matthias Clasen
43fcae91f1 Add a filechooser-in-assistant example
This is one of the cases where one wants a page without
any padding.
2015-06-14 21:05:49 -04:00
Matthias Clasen
9fbd71394c Only build testfontchooserdialog on linux
We are using this to test pango functionality that
uses fontconfig apis, so this doesn't build on OS X
or Windows anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=750892
2015-06-13 23:00:41 -04:00
Matthias Clasen
dee0da30b6 Add a tree dnd testcase
This shows a minimal setup for enabling non-row DND from a treeview.
2015-06-05 08:33:59 -04:00
Matthias Clasen
36a2c507e2 testgtk: Add new Adwaita cursor names 2015-05-07 18:58:33 -04:00
Matthias Clasen
049cbc8b74 GtkFontChooser: Allow a custom font map
This lets applications show their own fonts instead of
or in addition to system fonts.

https://bugzilla.gnome.org/show_bug.cgi?id=748771
2015-05-07 07:33:23 -04:00
Matthias Clasen
65b7fc91bd testgtk: Respect display cursor size limitations
Instead of hardcoding 64, ask the display about the
maximal supported cursor size.
2015-04-07 18:40:21 -04:00
Matthias Clasen
cd033e6f07 testfilechooser: Improve filter setup
It is not ideal when the default filter filters away
all files, so change things to select the 'all files'
filter by default.
2015-04-05 22:09:22 -04:00
Matthias Clasen
a6c7889cb6 testgtk: Set initial cursor
Arrange for the entry and the cursor area to both start out
with the arrow cursor.
2015-04-05 19:10:39 -04:00
Matthias Clasen
e77b2832aa testgtk: Redo the cursor example
Use cursor names instead of font cursors, so we can also show
cursors that are not represented in the X cursor font and thus
don't have a value in the GdkCursorType enumeration.
2015-04-05 19:00:44 -04:00
Matthias Clasen
386534ef1f testgtk: Update cursor theme on size change
We were connecting to the wrong signal, so we were not picking
up all changes to the spin button value.
2015-04-05 13:28:26 -04:00
Matthias Clasen
505fed1383 Fix separator in testsplitheaders 2015-03-28 22:32:12 -04:00
Alexander Larsson
967cb56275 shadow-box: Blur only horizontally/vertically for the non-corner parts
There is no need to e.g. blur in the x-direction for the top part
of a box shadow. Also, there is no need to extend the mask in the
non-blurred direction.

https://bugzilla.gnome.org/show_bug.cgi?id=746468
2015-03-21 21:31:49 +01:00
Alexander Larsson
9ba185b749 Add performance test for gtkcairoblur
This just creates a large cairo surface and times bluring it
at various values of radius.

https://bugzilla.gnome.org/show_bug.cgi?id=746468
2015-03-21 20:59:57 +01:00
Matthias Clasen
cbf5b49cb8 Add an example for accelerators with manual image menuitems
This is somewhat tricky to work out, so put some example
code here for future reference. The tricky part is that
GtkAccelLabel tries to be smart about hiding the accel
if there's not enough space, so we have to make sure to
pack the label with expand=TRUE and set align=GTK_ALIGN_FILL,
or things won't work.
2015-03-06 20:36:11 -05:00
Chun-wei Fan
b3725a455d test/gtkgears.c: Fix on C89 Compilers
Make sure that variables are declared at the top of the block.

Break up one of the sincos() calls into individual calls to sin() and cos()
so that we do not have to complicate the initialization of the following
GLfloat array.
2015-03-06 23:47:35 +08:00
Matthias Clasen
17bc7aaefd Check for existence of sincos
It apparently doesn't exist everywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=745578
2015-03-04 06:30:13 -05:00
Emmanuele Bassi
0019eb7bf9 gears: Update to slightly more modern OpenGL
Instead of using glxgears, which still uses OpenGL 2.1 and the fixed
pipeline, we use a slightly modified es2gears, OpenGL 3.2, and the
programmable pipeline.
2015-03-03 00:06:35 +00:00
Lars Uebernickel
f3110e4103 Rename GtkSidebar to GtkStackSidebar
GtkSidebar is too generic and doesn't fully convey what the widget does.

https://bugzilla.gnome.org/show_bug.cgi?id=744094
2015-02-13 18:01:56 +01:00
Emmanuele Bassi
b87034a985 tests: Update testglarea
Since we dropped the legacy OpenGL compatibility profile, we need to use
recent OpenGL APi and concepts. This also means that the example code
gets a tad more complicated.

https://bugzilla.gnome.org/show_bug.cgi?id=741946
2015-02-09 19:10:30 +00:00
Cosimo Cecchi
404e2753c4 scrolledwindow: add a new edge-reached signal
This will be used to just detect when an edge of the scrollable area is
reached - as opposed to the edge-overshot signal that is emitted when
the user scrolls past the edge.

https://bugzilla.gnome.org/show_bug.cgi?id=742848
2015-01-31 23:08:17 +00:00
Matthias Clasen
34c29d8d3c testnotebookdnd: Defer deletion to an idle
The code here was always a bit buggy: We removed the tab from
the notebook in a ::drag-data-received handler. But with
GTK_DEST_DEFAULT_DROP, that signal is emitted before we inform
the source side that the drag is finished. With its improved drag
handling, GtkNotebook now interprets this as a 'spontaneous'
removal of the tab being dragged, and cancels the drag, leading
to an unwanted cancel animation.

The easiest fix is to just defer the tab removal to an idle.
2015-01-30 10:13:28 -05:00
Matthias Clasen
7b9065c2ee Avoid a crash in testcalendar
When changing between months, we can get into a situation like
'February 30", which GDate doesn't accept. Don't crash in that
case.
2014-12-23 21:47:50 -05:00
Matthias Clasen
17fec70022 Fix another header guard oversight
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=741252
2014-12-08 19:34:23 -05:00
Chun-wei Fan
fbe4f94519 test/gtkgears.c: Fix Builds on Systems Without M_PI
Use G_PI in place of M_PI to fix the build on compilers that do not have
M_PI defined.

https://bugzilla.gnome.org/show_bug.cgi?id=740795
2014-12-03 17:10:37 +08:00
Benjamin Otte
0e44722fd8 tests: Add deprecation guards
It's the last test still spewing these and I'm too lazy to do a proper
fix.
2014-11-05 13:06:32 +01:00
Matthias Clasen
f83c903ed8 Add a scale to the popover menu example
Demonsttrate that this is flexible enough for the intended uses.
2014-10-29 06:49:59 -04:00
Matthias Clasen
228e51b319 Adapt the testpopover example
Add the required boxes for each submenu. We now need to specify the
submenu name only once per submenu.
2014-10-29 06:49:59 -04:00
Matthias Clasen
2b5a49c285 Adapt the testpopover example
Drop all all explicit role setting from the testpopover example.
2014-10-29 06:49:59 -04:00
Matthias Clasen
2401a6cb8e Adapt the testpopover example 2014-10-29 06:49:59 -04:00
Matthias Clasen
1fee63d097 Adapt the testpopover example
Drop all uses of has-submenu.
2014-10-29 06:49:59 -04:00
Matthias Clasen
4da281d20b Adapt the testpopover example
We now use GtkPopoverMenu, and just add the model buttons
directly to it.
2014-10-29 06:49:58 -04:00
Matthias Clasen
a8cc4787d2 Add a manual popover menu example
Reproduce the testpopover popover manually, by packing model
buttons into a stack in a popover.
2014-10-29 06:49:58 -04:00