Commit Graph

2743 Commits

Author SHA1 Message Date
Tom Schoonjans
2139b7642b testgtk.c: native file chooser filter changes
Set the filter before showing the dialog
Afterwards, fetch the last active filter and display its name.

https://bugzilla.gnome.org/show_bug.cgi?id=784723
2017-07-18 13:30:44 -04:00
Matthias Clasen
23f870d0cd Add a simple center box test
Just a simple use of this widget.
2017-06-04 21:40:20 -04:00
Timm Bäder
084b356d1e testlist: Fix custom css 2017-05-25 16:25:59 +02:00
Carlos Garnacho
a72404dd5a gtk: Mass delete all GtkWidget event mask API
We now rely on toplevels receiving and forwarding all the events
the windowing should be able to handle. Event masks are no longer a
way to determine whether an event is deliverable ot a widget.

Events will always be delivered in the three captured/target/bubbled
phases, widgets can now just attach GtkEventControllers and let those
handle the events.
2017-05-25 16:25:58 +02:00
Emmanuele Bassi
17518ef89b build: Improve consistency of the "coding" style
We're mixing a lot of styles in the Meson build files. This is an
attempt at making everything slightly more consistent in terms of
whitespace and indentation.
2017-05-03 15:10:57 +01:00
Tim-Philipp Müller
d12ab27c8e meson: gtk: remove internal static libs from declared gtk dependency
gdk and gsk are no longer separate libs but part of gtk now, so any
Gtk+ user should just link to gtk, there's no need to additionally
link against all those static helper libs that go into the gtk lib.

This means we need to specifically add confinc to include_directories
in more places to make sure the right config.h (i.e. ours) gets
included and not a subproject's like graphene's config.h.

Not dragging in static libs also fixes the issue of all executables
having to be relinked for any and all changes. With this change
it's super-fast now and can be skipped for most changes that don't
touch the external ABI.
2017-05-03 15:10:54 +01:00
Tim-Philipp Müller
d276cd47a5 meson: tests: make tests find resources from the source dir
Should probably also do this in the autotools build, since
the same problem exists there as well if we use srcdir != builddir.
2017-05-03 15:10:53 +01:00
Tim-Philipp Müller
08153c3854 meson: tests: update and sync with Makefiles 2017-05-03 15:10:53 +01:00
Tim-Philipp Müller
37d5938561 meson: update list of sources for changes in git master 2017-05-03 15:10:53 +01:00
Timm Bäder
4fcca9945f meson: update build files 2017-05-03 15:10:52 +01:00
Timm Bäder
bfabaa0bd6 meson: build some more tests 2017-05-03 15:10:52 +01:00
Timm Bäder
09ad2f9d31 meson: build tests/visuals 2017-05-03 15:10:52 +01:00
Timm Bäder
092f6d5c43 meson: Install libgtk and libgdk 2017-05-03 15:10:52 +01:00
Timm Bäder
8bf141b364 meson: Build all tests in tests/ 2017-05-03 15:10:52 +01:00
Timm Bäder
082cf3553d meson: Build gtk marshallers
And fix libgtk_dep/libgdk_dep to link_with the shared lib
2017-05-03 15:10:50 +01:00
Timm Bäder
6364231571 testdnd2: Don't pass a toplevel to gtk_drag_set_icon_widget 2017-04-25 20:30:37 +02:00
Timm Bäder
db4b1d28f5 label: Remove angle property 2017-04-25 20:30:37 +02:00
Timm Bäder
fb927d1993 box: Remove center child 2017-04-25 20:30:37 +02:00
Timm Bäder
066c1983ba actionbar: Add explicit center widget
The center widget in GtkBox was only introduced to use it in
GtkActionBar. However, the implementation there is much more complex
than it needs to be, so move the center widget into GtkActionBar instead
and later remove it from GtkBox.
2017-04-25 20:30:37 +02:00
Timm Bäder
c92b7d4224 box: Remove fill child property
GtkWidget:halign and GtkWidget:valign are sufficient
2017-04-25 20:30:37 +02:00
Timm Bäder
5729ea7744 box: Remove expand child property
GtkWidget already has hexpand/vexpand properties.
2017-04-25 20:30:37 +02:00
Timm Bäder
cc00fee386 testboxcss: Fix custom CSS
remove engine: parameter and add units to values
2017-04-24 15:16:08 +02:00
Matthias Clasen
d0f36a1793 testlist3: Handle dropping a row onto itself
Instead of spewing criticals, we should handle this
gracefully by doing nothing.
2017-04-22 21:39:48 -04:00
Matthias Clasen
2fed741b40 Fix the build 2017-04-22 11:30:33 -04:00
Matthias Clasen
8644e5f34d Refine the listbox dnd example
Add a drag handle, and demonstrate broken offsets.
2017-04-22 08:08:43 -04:00
Matthias Clasen
ff8cca77a2 Implement dnd for list box rows in an example
This shows very basic DND of list box rows.
2017-04-21 18:28:47 -04:00
Matthias Clasen
d779d0cb32 Avoid a compiler warning 2017-04-01 12:19:23 -04:00
Timm Bäder
9b70d9897d tests: Add widget focus test case
Shows an example of a widget that directly inherits from GtkWidget and
has multiple focusable children.
2017-03-31 09:50:40 +02:00
Matthias Clasen
e171f4930b Avoid redefining GNU_SOURCE
Gives a compiler warning with the wrong flags.
2017-03-23 15:15:12 +00:00
Philip Withnall
ed92c4bcc4 tests: Fix use of C99 inline declaration
We don’t claim to use them yet, even if we perhaps should.
2017-03-07 09:47:30 +00:00
Daniel Boles
f640749853 testheightforwidth: cleanups 2017-03-07 09:28:37 +00:00
Daniel Boles
bd89f79b8a testframe: label-yalign does nothing so don’t test
Since the border node was removed, this property has no effect.

https://bugzilla.gnome.org/show_bug.cgi?id=778886
2017-03-07 01:07:48 +00:00
Daniel Boles
aaa9ea6e3f testframe: Simplify initial setting of padding
Just start with both dimensions’ paddings at 0.
2017-03-07 00:30:24 +00:00
Daniel Boles
2eee3ef79c testframe: Add CheckButton to toggle border off/on
We should test this.
2017-03-07 00:30:23 +00:00
Daniel Boles
5470c263d1 testframe: Order controls better & improve labels
The :label-widget is drawn before the child, so put the controls that
set the alignment of the :label-widget before those that pad the child.

We set (horizontal|vertical) padding, not "[xy]thickness". Also change
to "label [xy]align" & use grid spacing, not spaces at end of Labels.
2017-03-07 00:17:28 +00:00
Daniel Boles
e44b551671 testframe: Minimise typecasts 2017-03-07 00:17:05 +00:00
Daniel Boles
9e5cac07b8 testframe: Set value before connecting callbacks
The value comes from the widget, and we were setting this after
connecting the callback, which applies the value to the widget…
2017-03-07 00:16:37 +00:00
Daniel Boles
ec5ebf82b6 testframe: Use a generic widget pointer 2017-03-07 00:16:37 +00:00
Daniel Boles
3290065079 testheightforwidth: Add missing unref 2017-03-06 20:58:13 +00:00
Daniel Boles
bf0ea7b7bc Fix the completely broken tests/testheightforwidth
This was ruined, with only 1 of the 8 subwindows rendering any content.

This commit fixes the responsible errors in the embedded GtkBuilder UIs:
 • Fix broken replace by commit fb3d9022ad
   of HBox with a Box having a broken orientation <property>
 • Replace VBox and [HV]Paned with GtkOrientable successors (properly!)
 • Remove use of Button:use_action_appearance, as this no longer exists

This commit also adds error reporting, in case other errors creep into
the GtkBuilder UI definitions, plus cleanup for the Builders and Windows
2017-03-06 20:37:38 +00:00
Timm Bäder
2aea8dfee9 togglebutton: Move :inconsistent to GtkCheckButton 2017-01-30 18:11:00 +01:00
Timm Bäder
66d584ce6e togglebutton: Move :draw-indicator property to GtkCheckButton
It's not used in GtkToggleButton at all, only in GtkCheckButton and
GtkRadioButton.
2017-01-30 18:11:00 +01:00
Daniel Boles
88ae92050e Remove tests/testtreemenu
Since GtkTreeMenu became a private class only used by GtkComboBox, all
this test actually did was to show a ComboBox constructed with a custom
CellArea. Now that the latter is no longer possible, the test just shows
a handful of settings that do nothing. Just test GtkComboBox directly.
2017-01-28 20:25:37 +00:00
Daniel Boles
439fcf7578 combobox: Remove property cell-area
The CellArea is going to become a pure implementation detail & be moved
to the .ui, instead of letting users mess with it (if anyone ever did).
2017-01-21 21:34:45 +00:00
Timm Bäder
f4341ee9f7 widget: Remove show-all property
Doesn't make sense anymore now that gtk_widget_show_all is gone.
2017-01-20 21:37:07 +01:00
Timm Bäder
ea897c6df4 Remove gtk_widget_show_all 2017-01-20 21:37:04 +01:00
Daniel Boles
d7c3d86f02 testcombo—Don’t set appears-as-list style property
List mode no longer exists, so this had no effect.
2017-01-19 22:10:59 +00:00
Matthias Clasen
2c7e567f05 Update callers
Adapt all our tests and examples to the new initialization api.
2017-01-19 13:50:17 -05:00
Benjamin Otte
fd762d203c tests: Add a rendernode test for borders 2017-01-11 18:33:09 +01:00
Timm Bäder
3d5a62a0c9 actionbar: Add revealed property
So we can show and hide it with a transition as well as bind another
property to it.
2017-01-08 14:57:11 +01:00