Matthias Clasen
e07f3d6e64
spin button: Listen for ::cancel on gestures
...
Otherwise, we keep spinning when we should stop.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1861
2019-05-02 19:15:37 +00:00
Matthias Clasen
b844778b5b
widget: Update controllers responsiveness
...
Make controllers unresponsive when their
widget is insensitive. This is the expected
behavior.
2019-05-02 19:15:37 +00:00
Matthias Clasen
fca0f649a0
gesture: Chain up in filter_event
...
This is the right thing to do.
We want to exclude more events.
2019-05-02 19:15:37 +00:00
Matthias Clasen
da034390f2
event controller: Add a ::responsive property
...
This lets us 'mute' controllers, for example
when widgets are insensitive. For now, we make
this property readonly and only let GTK itself
update it.
2019-05-02 19:15:37 +00:00
Benjamin Otte
19227d9789
rendernode: Compute border node colors properly
...
Change the way we compute border color cutoffs to the same method that
browsers use. This method does not consider the corner sizes at all and
only looks at border-width.
2019-05-02 19:35:45 +02:00
Benjamin Otte
8915d60900
roundedrect: Mke sure shrinking borders works
...
Previously, when borders were too big - ie when a 100x100 rect had only
one 100x100 border, like the black part of ◔ - and then shrinking this
rect by 25px on either side, we'd end up with a 50x50 rect with a 75x75
border, and that's obviously not correct.
2019-05-02 19:35:45 +02:00
Matthias Clasen
ed52c029a0
gtk: Small documentation fixes
2019-05-01 23:24:14 -04:00
Matthias Clasen
7b1201cd4d
box layout: Documentation additions
2019-05-01 23:24:14 -04:00
Matthias Clasen
3f940715e4
gsk: Documentation tweaks
...
Add some missing symbols.
2019-05-01 23:24:14 -04:00
Matthias Clasen
f6225901e8
gdk: Documentation improvements
...
Document some new x11 symbols.
2019-05-02 02:39:36 +00:00
Matthias Clasen
eff4b6377d
Merge branch 'inspector-menus' into 'master'
...
inspector: Fix showing of menus
See merge request GNOME/gtk!810
2019-05-02 02:12:28 +00:00
Matthias Clasen
a18647af0e
Merge branch 'inspector-actions' into 'master'
...
inspector: Show the default.activate action
See merge request GNOME/gtk!809
2019-05-02 02:09:03 +00:00
Matthias Clasen
c7df0c907a
inspector: Fix showing of menus
...
We were hitting an assertion in some leftover
code that assumed property editors are popovers.
2019-05-02 02:05:46 +00:00
Matthias Clasen
b74407a343
Merge branch 'filechooser-save-again' into 'master'
...
Make file chooser saving work again
See merge request GNOME/gtk!808
2019-05-02 01:55:28 +00:00
Matthias Clasen
cd5c39834d
inspector: Show the default.activate action
...
We were hardcoding that GtkApplicationWindow only
has a single action group with prefix 'win', but
that is no longer the case. Simply use the code
for the general widget case that can handle multiple
action groups.
2019-05-02 01:53:57 +00:00
Matthias Clasen
574a25b09c
Merge branch 'kill-display-changed' into 'master'
...
Kill display changed
See merge request GNOME/gtk!807
2019-05-02 01:49:31 +00:00
Matthias Clasen
6e0b13b81f
Make file chooser saving work again
...
I was a little overzealous when going
for the new default handling here. We
can't switch to gtk_widget_activate_default
before we actually handle the default.activate
action.
2019-05-02 01:41:23 +00:00
Matthias Clasen
bea8025fb5
Drop the GtkWidget::display-changed signal
...
Display changes now happen exclusively through
the ::root and ::unroot vfuncs. Third parties
can observe display changes by listening
for notify::root.
2019-05-02 01:33:41 +00:00
Matthias Clasen
965d0e04d1
gtk: Use root/unroot instead of display-changed
...
The display-changed signal is going away
2019-05-02 01:33:41 +00:00
Matthias Clasen
d7c54920ee
menu: Listen only for notify::root
...
We no longer emit the display-changed signal,
so stop listening.
2019-05-01 23:05:09 +00:00
Matthias Clasen
33a8108f19
window: Implement display change via root/unroot
...
Export gtk_widget_root/unroot privately,
make them work on roots, and use them in
gtk_window_set_display. This gets us to a
single way to listen for display changes,
the root property.
2019-05-01 23:05:09 +00:00
Matthias Clasen
78d254370c
Merge branch 'inspector-menu-fix' into 'master'
...
Inspector menu fix
See merge request GNOME/gtk!804
2019-05-01 23:01:50 +00:00
Matthias Clasen
377ec33069
menus: Fix menus on non-default displays
...
Currently, we sometimes emit display-changed
when the display changed, and sometimes we don't
since the display is changed via gtk_widget_root.
Listen for notify::root as well and update our
display. This is a temporary fix - all display
changes should go through gtk_widget_root,
eventually.
2019-05-01 22:50:29 +00:00
Benjamin Otte
2952ba07e1
Merge branch 'kill-menu-display' into 'master'
...
Kill menu display
See merge request GNOME/gtk!806
2019-05-01 22:09:13 +00:00
Matthias Clasen
62b7ea7611
Remove gtk_menu_set_display
...
Menus should always be attached to a toplevel,
in which case they get their display that way.
2019-05-01 21:54:57 +00:00
Matthias Clasen
c9eca55c5e
tests: Stop using gtk_menu_set_display
...
It is not needed here.
2019-05-01 21:54:57 +00:00
Matthias Clasen
435bc269e9
Merge branch 'expander-demo-fix' into 'master'
...
gtk-demo: Make the expander demo behave again
See merge request GNOME/gtk!805
2019-05-01 21:19:27 +00:00
Matthias Clasen
0d2a7f876b
gtk-demo: Make the expander demo behave again
...
Changes to the dialog hierarchy have affected
this demo, that admittedly pokes at message
dialog internals. Do that some more, to fix
things up.
2019-05-01 21:12:36 +00:00
Matthias Clasen
737400ddbc
wayland: sanity check events at the source
...
Sanity check events before we throw them into
the event queue, as this makes it much easier
to track down the culprit.
2019-05-01 20:51:43 +00:00
Matthias Clasen
134e159bc9
gdk: add a sanity check for events
...
Before delivering events to GTK, make sure
they're sane. For now, this means making sure
the surface and device are from the same
display.
2019-05-01 20:50:24 +00:00
Matthias Clasen
6f0b47681b
seat: Add a sanity check
...
apis that takes multiple display-relative objects
should make sure that they are all from the same
display, or hard-to-track-down badness will happen
later on.
Add such a check for the surface and device arguments
of gdk_seat_grab. This helped in tracking down
critical warnings from combo boxes in the inspector.
2019-05-01 20:46:02 +00:00
Matthias Clasen
d53981fdbb
Merge branch 'add-color-button-fix' into 'master'
...
Adwaita: Fix 'add color' button corners
Closes #1856
See merge request GNOME/gtk!801
2019-05-01 17:26:34 +00:00
Matthias Clasen
e09beee62a
Adwaita: Fix 'add color' button corners
...
The specification for border-radius goes
top-left top-right bottom-right bottom-left.
The css for the add button in the color
chooser got this wrong, and was showing
a broken top-right corner.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1856
2019-05-01 17:18:39 +00:00
Rico Tzschichholz
724ec3ca92
Add a few placeholder documentation block to have g-i annotations
2019-05-01 15:03:16 +02:00
Matthias Clasen
3ce6a710a3
Merge branch 'entry-fix' into 'master'
...
Fix Emoji insertion
See merge request GNOME/gtk!800
2019-05-01 05:21:09 +00:00
Matthias Clasen
e41596d6a1
text: Make Emoji insertion work properly
...
We are now getting focus-out and focus-in events
when the Emoji chooser is shown and hidden, and
this is causing the text to select-on-entry before
inserting the Emoji, which then deletes the selection.
Avoid this by saving and restoring the selection
when presenting the Emoji chooser.
2019-05-01 05:13:52 +00:00
Matthias Clasen
0fa4d54316
inspector: Track readonly property values
...
That a property can't be set does not mean
its value can't change. This was showing up
as the cursor-position and selection-bound
properties in GtkText not showing their
current value in the inspector.
2019-05-01 04:57:54 +00:00
Matthias Clasen
e7cbb7a76c
inspector: Don't listen for notify twice
...
The property list now uses property editors
for the value, which listen for updates by
themselves, so no need for the list to do it.
2019-05-01 04:44:07 +00:00
Matthias Clasen
b2a23a9a90
entry: only notify properties we have
...
GtkText now has the propagate-text-width property,
which is not present on GtkEntry, so we can't just
blindly forward all properties.
2019-05-01 04:41:28 +00:00
Matthias Clasen
6878c2bae0
Merge branch 'minus-one' into 'master'
...
fix signedness issues in api
Closes #1555
See merge request GNOME/gtk!799
2019-05-01 03:38:42 +00:00
Matthias Clasen
5b8f1aa2ee
Merge branch 'xdg-output' into 'master'
...
[gtk4] wayland: Add support for xdg-output
Closes #1828
See merge request GNOME/gtk!751
2019-05-01 03:34:56 +00:00
Matthias Clasen
6b4a82224c
Merge branch 'window-activate-revert-master' into 'master'
...
Revert "gdk: deactivate/activate surface on keyboard grabs"
See merge request GNOME/gtk!795
2019-05-01 03:32:12 +00:00
Matthias Clasen
1f30b7742b
textutil: Fix signedness issues in api
...
A length argument that can be -1 should be signed.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1555
2019-05-01 03:25:29 +00:00
Matthias Clasen
54e7a94d70
builder: Fix signedness issues in apis
...
Whenever we take a length argument that can
be -1 for 'nul-terminated', it should be
gssize, not gsize.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1555
2019-05-01 03:21:29 +00:00
Matthias Clasen
f1919c706f
Merge branch 'grab-cursor-fix' into 'master'
...
window: Prevent resize cursors from sticking
Closes #23
See merge request GNOME/gtk!797
2019-05-01 00:42:09 +00:00
Matthias Clasen
26b17473aa
window: Prevent resize cursors from sticking
...
When a modal dialog is smaller than its parent,
we were keeping the resize cursor from the dialogs
edge all over the parent window, which looks
really irritating, since the resize cursors are
closely associated with the window edge. Fix
this by falling back to the default cursor
outside the grab widgets surface.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/23
2019-04-30 20:19:35 -04:00
Samuel Thibault
99eee5cea9
Revert "gdk: deactivate/activate surface on keyboard grabs"
...
This reverts commits 35417a5a74
and
01455399e8
.
This reintroduces #85 , but see discussion in
https://gitlab.gnome.org/GNOME/gtk/merge_requests/433 for the unforeseen
invasive consequences of these commits.
2019-04-30 16:48:16 +02:00
Timm Bäder
074a0014c1
filechooserwidget: Only query clock-format setting once
...
We don't support that setting life-updating anyway. So, instead of
getting the value *every time we format a time*, get it once for the
filechooserwidget and reuse that value.
2019-04-30 06:43:42 +02:00
Timm Bäder
091cac00b2
Adwaita: Fix active spinbutton button image color
...
The spinbutton>button>image is currently blue when the image is clicked
and dark-ish when the button is clicked(but not the image). This was not
the case before since we didn't even propagate :active down to the image
child. Fix this by only applying the blue color to direct image children
of entries.
2019-04-30 05:54:00 +02:00
Timm Bäder
175e3d751d
filechooserwidget: Remove unnecessary deprecation guards
2019-04-30 05:36:20 +02:00
Timm Bäder
83e9361005
filechooserwidget: Stop using gtk_widget_get_allocat*
2019-04-30 05:36:20 +02:00
Timm Bäder
17bb1248b5
filechooserwidget: Shorten cancel_all_operations() impl
2019-04-30 05:36:20 +02:00
Timm Bäder
8211e79be9
filechooserwidget: Shorten dispose impl a bit
2019-04-30 05:36:20 +02:00
Timm Bäder
d5282862e5
filechooserwidget: Remove some unnecessary show() calls
...
Widgets are visible by default now.
2019-04-30 05:36:20 +02:00
Timm Bäder
26b6d18563
filechooserwidget: Use a bin layout
...
Instead of implementing size_allocate and measure manually.
2019-04-30 05:36:20 +02:00
Timm Bäder
31fb5cc2d4
filechooserwidget: Shorten finalize implementation a bit
2019-04-30 05:36:20 +02:00
Timm Bäder
90301c6813
filechooserwidget: Inline fuction into only caller
2019-04-30 05:36:20 +02:00
Timm Bäder
ccdf50aafd
filechooserwidget: Fix rename popover widget alignment
2019-04-30 05:36:20 +02:00
Timm Bäder
af5c80248d
placesview: Bring spacing in the actionbar back
...
In particular between the Connect button and the adjacent button/entry
combination.
2019-04-30 05:36:20 +02:00
Timm Bäder
1d81a58cf1
filechooserwidget: Pick reasonable default sidebar width
...
The old default of 148px doesn't work everywhere. Instead, pick a
default value of -1 and measure() the sidebar widget in the
filechooserwidget in that case. Other values >= 0 are still handled as
before.
2019-04-30 05:36:20 +02:00
Timm Bäder
09cec2e6a1
filechooserwidget: Delay view switch to search hits
...
Leave it to the ::hits-added handler to switch to the list of search
hits. This way we don't get a weird transition when the current search
didn't have any hits and the next one doesn't either.
Searches with hits still feel good.
2019-04-30 05:36:20 +02:00
Chun-wei Fan
efed2641f4
Merge branch 'fix-win32-gl-resize' into 'master'
...
Fix win32 gl resize
See merge request GNOME/gtk!694
2019-04-30 03:35:16 +00:00
Matthias Clasen
97a5ca74d2
Merge branch 'modelbutton-focus' into 'master'
...
Adwaita: Give model buttons visible focus
See merge request GNOME/gtk!794
2019-04-29 19:32:31 +00:00
Matthias Clasen
5b5b215dea
Merge branch 'frameclock-property' into 'master'
...
surface: Add a frame-clock property
See merge request GNOME/gtk!791
2019-04-29 19:23:09 +00:00
Matthias Clasen
7a06859f38
Adwaita: Give model buttons visible focus
...
Hard to use keynav, otherwise. Also, hard
to debug focus issues if you can't see where
the focus is.
2019-04-29 15:21:40 -04:00
Matthias Clasen
24fa104b61
surface: Add a frame-clock property
...
Now that GdkSurface has properties, it makes
sense to turn the frame clock into one too.
This will make it easier to reshuffle some
of the surface constructors later.
2019-04-29 15:11:58 -04:00
Matthias Clasen
89861faa04
Merge branch 'tooltip-cleanup' into 'master'
...
tooltip: Remove an unused gdk_surface_get_root_coords call
See merge request GNOME/gtk!793
2019-04-29 19:04:49 +00:00
Benjamin Otte
5fd94e2027
Merge branch 'window-cursor' into 'master'
...
window: Set cursor on the right surface
See merge request GNOME/gtk!792
2019-04-29 19:02:21 +00:00
Benjamin Otte
1f4d02740e
Merge branch 'accessible-present' into 'master'
...
icon view accessible: Stop presenting windows
See merge request GNOME/gtk!790
2019-04-29 19:02:15 +00:00
Matthias Clasen
0023b9036b
tooltip: Remove an unused gdk_surface_get_root_coords call
...
The tx and ty variables are not used, so don't
bother setting them.
2019-04-29 14:56:00 -04:00
Matthias Clasen
89d1f8c3ca
window: Set cursor on the right surface
...
Set the cursor on the surface of the target
widget, not the surface of some of its parents.
This does not make a difference currently.
But it will in the future, when we have
parented widgets with surfaces.
2019-04-29 14:51:55 -04:00
Matthias Clasen
7d9364655d
icon view accessible: Stop presenting windows
...
Thats really not its business.
2019-04-29 14:46:40 -04:00
Matthias Clasen
86d2fcef16
Merge branch 'wayland-grab-fix' into 'master'
...
wayland: Only check incorrect top-most for grabbing popups
See merge request GNOME/gtk!789
2019-04-29 18:42:46 +00:00
Jonas Ådahl
5f8543fe81
wayland: Only check top-most for grabbing popups
...
Non-grabbing popups are not limited to a single
nesting stack, as per the spec, so we should not
prevent that on the client-side.
2019-04-29 16:00:53 +00:00
Matthias Clasen
aae7816557
wayland: Reshuffle some internals
...
Make find_grab_input_seat return a GdkWaylandSeat
instead of a struct wl_seat, so we can use it and
avoid calling gdk_display_get_default_seat when
we need to get a serial later.
2019-04-29 16:00:09 +00:00
Jakub Steiner
6fbf13965c
Adwaita: tone down lowres icon aid
...
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1818
2019-04-29 15:08:49 +02:00
Alexander Larsson
484e330e4a
Merge branch 'wip/baedert/fix-gl-debug' into 'master'
...
Fix GL debugging
See merge request GNOME/gtk!778
2019-04-29 11:42:04 +00:00
Kristjan SCHMIDT
f27ecde1e2
Update Esperanto translation
2019-04-29 06:16:28 +00:00
Benjamin Otte
c06d1a69ae
Merge branch 'transform-fixes' into 'master'
...
Small fixes to GskTransform
See merge request GNOME/gtk!660
2019-04-29 00:42:28 +00:00
Emmanuele Bassi
cf9deb7cf5
Use getters for translation and scaling components
...
Instead of accessing the matrix cells directly.
2019-04-29 02:26:31 +02:00
Emmanuele Bassi
40beb69487
Never compare floats for equality
...
Floating point values cannot ever be compared for equality. GLib has a
G_APPROX_VALUE macro that lets us compare two value within a provided
precision, so we should use that instead.
2019-04-29 02:26:31 +02:00
Emmanuele Bassi
f1cadee196
Use matrix equality in GskTransform
...
Graphene has new API to check for equality, so we should use it instead
of doing a byte-by-byte comparison.
2019-04-29 02:26:31 +02:00
Emmanuele Bassi
f6594ff073
Update the version of Graphene
...
We're going to use newly added API soon.
2019-04-29 02:26:31 +02:00
Emmanuele Bassi
478fdaa632
Use atomic boxing instead of manual refcounting
...
Artisanal, homegrown, locally sourced, vegan reference counting has been
replaced by the appropriate API in GLib, which does small things like
saturation and type checking.
2019-04-29 02:25:18 +02:00
Matthias Clasen
6c472ed2b8
Merge branch 'default-handling' into 'master'
...
Default handling
See merge request GNOME/gtk!786
2019-04-28 23:51:17 +00:00
Matthias Clasen
30942c4e3d
Fix builder parser tests
...
The line numbers changed here because we
removed some properties.
2019-04-28 23:44:07 +00:00
Matthias Clasen
bf7d1e7b5a
tests: Fix a default-related test
...
The test was setting has-default, but testing
receives-default.
2019-04-28 23:40:57 +00:00
Matthias Clasen
92e21c3f1c
Drop the can-default property
...
It was added at a time when default buttons
had a very large external border that would disrupt
aligment. Not a problem nowadays.
2019-04-28 23:28:39 +00:00
Matthias Clasen
8880d27460
inspector: Stop showing default widget in misc
...
This is just a regular window property now,
no need for special casing.
2019-04-28 23:23:11 +00:00
Matthias Clasen
59d50be737
widget: Drop gtk_widget_grab_default
...
The default widget is mostly a dialog concept,
and does not really need this generic api.
If you need to mark a widget as default,
use gtk_window_set_default() directly.
2019-04-28 23:23:11 +00:00
Matthias Clasen
6d73443131
widget: Remove special handling for has-default
...
We used to handle has-default specially in ui
files. It was awkward, so stop doing that. If you
need to influence the default widget in a window,
you can just set the default-widget property.
2019-04-28 23:23:11 +00:00
Matthias Clasen
fe3796ed5b
widget-factory: Stop setting has-default in ui files
...
We can just set the default-widget property. The
special handling for has-default in ui files is
going away.
2019-04-28 23:21:51 +00:00
Matthias Clasen
89f7b974f2
Stop using gtk_widget_grab_default
...
Replace gtk_widget_grab_default by gtk_window_set_default_widget.
2019-04-28 23:21:51 +00:00
Matthias Clasen
0ae958d45b
Drop gtk_window_activate_default
...
This api has been replaced by an action that
can be activated with gtk_widget_activate_action.
2019-04-28 23:21:50 +00:00
Matthias Clasen
3d1fdf77dc
file chooser: Stop using gtk_window_activate_default
...
Instead, use the new way of activating default.
I think most of the default handling in
GtkFileChooserDialog should be dropped, but
for now this keeps things working.
2019-04-28 23:20:13 +00:00
Matthias Clasen
0ae71cacb4
mount operation: Handle default activation via action
...
Switch to the new way of activating default.
2019-04-28 23:20:13 +00:00
Matthias Clasen
218d635ca2
entry: Activate default via action
...
Switch to the new way of activating default.
2019-04-28 23:20:13 +00:00
Matthias Clasen
7553d0c471
label: Activate default via action
...
Switch to the new way of activating default.
2019-04-28 23:20:13 +00:00
Matthias Clasen
f4880f5df5
Add gtk_widget_activate_default
...
This is a convenience wrapper for
activating the "default.activate" action.
2019-04-28 23:20:13 +00:00
Matthias Clasen
3ccdad76de
popover: Add a default.activate action
...
This is a first example of a widget intercepting
the default.activate for its own handling.
2019-04-28 23:20:13 +00:00
Matthias Clasen
e464c08545
window: Add a default.activate action
...
Activating this action will replace other
activate_default apis. It is more flexible,
since intermediate widgets can intercept the
action and do their own handling.
2019-04-28 23:20:13 +00:00
Matthias Clasen
56e95ddfc8
popover: Add a default-widget property
...
This is part of redoing default widget handling.
2019-04-28 23:20:13 +00:00
Matthias Clasen
65052a5d6c
Rename gtk_window_set_default
...
Call it gtk_window_set_default_widget, to match
the getter, and the property name. Update all
callers.
2019-04-28 23:20:13 +00:00
Matthias Clasen
1364eb2f62
window: Add a default-widget property
...
This is a part of redoing default widget handling.
2019-04-28 23:20:13 +00:00
Matthias Clasen
aa8ada3fed
widget: Add a convenience api to activate actions
...
Since actions are used increasingly, we should
have a convenient way to trigger an action in
the context of a widget.
2019-04-28 23:19:05 +00:00
Matthias Clasen
3643a9fe86
Merge branch 'focus-cleanup' into 'master'
...
Focus cleanup
See merge request GNOME/gtk!788
2019-04-28 23:17:46 +00:00
Matthias Clasen
25f4bb2e17
Avoid critical warnings
...
These critical warnings break the tests, otherwise.
2019-04-28 22:55:43 +00:00
Matthias Clasen
3b62d9c027
Drop gtk_window_activate_focus
...
This api wasn't used anywhere in GTK. And since
we've dropped the variant for the default widget,
this one should go too. If it is needed, it should
become and action too.
2019-04-28 22:21:09 +00:00
Matthias Clasen
c92938b378
widget: Remove special handling of has-focus
...
We used to handle has-focus in ui files specially.
It was awkward, so stop doing that. If you need
to influence the initial focus of a window, you
can just set the focus-widget property.
2019-04-28 22:21:03 +00:00
Matthias Clasen
c98313016e
window: Fix up the buildable implementation
...
We were assuming that the parent class has a custom
set_property, which may not be the case. Be more
careful.
2019-04-28 22:20:55 +00:00
Matthias Clasen
e43839114d
Merge branch 'inspector-prop-sort' into 'master'
...
inspector: Make property list sortable again
See merge request GNOME/gtk!787
2019-04-28 22:03:31 +00:00
Matthias Clasen
b6c1786165
inspector: Make property list sortable again
...
We lost this when moving from a treeview to
a listbox. Bring it back, with homegrown list
headers.
2019-04-28 21:56:10 +00:00
Matthias Clasen
3a40555202
Merge branch 'file-chooser-location-escape' into 'master'
...
file chooser: Stay focused
Closes #1851
See merge request GNOME/gtk!785
2019-04-28 16:16:31 +00:00
Matthias Clasen
ff604e1906
file chooser: Stay focused
...
When hitting Escape in the location entry,
we were not moving the focus anywhere,
causing focus to be NULL, and key bindings
to stop working. The visible effect was
that Ctrl-L / Escape / Ctrl-L would not
get back to the location entry, as expected.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1851
2019-04-28 16:08:21 +00:00
Matthias Clasen
34974a8a66
Merge branch 'wip/baedert/filechooser2' into 'master'
...
Assorted filechooser improvements
See merge request GNOME/gtk!783
2019-04-28 15:33:07 +00:00
Matthias Clasen
7c15daf99e
Merge branch 'file-chooser-escape' into 'master'
...
file chooser: Prevent accidental search
Closes #1850
See merge request GNOME/gtk!784
2019-04-28 15:27:51 +00:00
Matthias Clasen
b9467a4dc7
file chooser: Prevent accidental search
...
When hitting Escape, the file chooser will go
into search mode, because the search entry
consumes the key to emit the ::search-stopped
signal. Recognize this situation and avoid
switching to search mode in this case.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1850
2019-04-28 15:20:07 +00:00
Timm Bäder
5a1c37a8c8
filechooserwidget: Use a center box for the search entry
...
This way we can avoid a slight position offset when we show or hide the
spinner during a search.
2019-04-28 11:30:13 +02:00
Timm Bäder
b75bc8aa64
filechooserwidget: Allow keynav from the treeview to the search entry
2019-04-28 11:27:42 +02:00
Timm Bäder
ed4c08d9b3
window: Check whether the new focus widget is the old one
...
We generally do that for all properties.
2019-04-28 11:27:21 +02:00
Timm Bäder
929cdd9259
treeview: Don't always grab_focus() when moving the cursor
...
This doesn't really make sense, we can assume that the treeview already
has the focus when it receives key events.
2019-04-28 11:26:40 +02:00
Timm Bäder
78049f452a
filechooserwidget: Remove unneeded function prototype
2019-04-28 11:08:09 +02:00
Timm Bäder
cf2ef4863b
filechooserwidget: Don't focus treeview when searching
...
It's just weird that the search entry does not have focus while we type.
2019-04-28 11:07:14 +02:00
Timm Bäder
2bd348558e
filechooserwidget: Remove some GdkEvent usage
2019-04-28 11:05:37 +02:00
Timm Bäder
0f6d83bb5f
filechooserbutton: Remove some dead code
2019-04-28 11:02:59 +02:00
Timm Bäder
7e20232607
colorbutton: Remove unneeded snapshot implementation
2019-04-28 10:55:10 +02:00
Timm Bäder
dcc55e3a73
Adwaita: Bring filechooserbutton spacing back
...
Add some space between the icons and the text, like there was in gtk3.
2019-04-28 10:40:54 +02:00
Timm Bäder
59fd48cee0
entry: Fix primary icon allocation in RTL entries
...
The primary icon is on the right in RTL, so don't offset the text child
to the right for it.
Fixes the text and icon overlapping in the second entry
in tests/testentryicons
2019-04-28 08:36:36 +02:00
Timm Bäder
c848b9014b
gl renderer: Add simple blend node implementation
2019-04-28 07:58:31 +02:00
Timm Bäder
1e16cb088a
treeview: Always update expand when allocating columns
...
It doesn't make sense to keep track of all the last_* values anymore now
that widgets only get allocated when their size changes anyway.
Remove all the associated (and thus now unused) flags as well.
2019-04-28 06:54:10 +02:00
Timm Bäder
f4cf43359d
treeview: Remove a useless check
2019-04-28 06:50:57 +02:00
Timm Bäder
6c8a5f5e2f
treeview: Remove unused member
2019-04-28 06:45:33 +02:00
Matthias Clasen
da64d687d1
Merge branch 'popover-demos' into 'master'
...
Popover demos
See merge request GNOME/gtk!782
2019-04-27 18:09:57 +00:00
Matthias Clasen
aab803b7ae
widget-factory: Make a resizing popover
...
Add an expander to a popover to test how
changing sizes works with popovers.
2019-04-27 18:00:22 +00:00
Matthias Clasen
936aba884a
Merge branch 'file-chooser-search' into 'master'
...
file chooser: Fix Ctrl-L
Closes #1829
See merge request GNOME/gtk!781
2019-04-27 17:52:02 +00:00
Matthias Clasen
e1200230c4
widget-factory: Add some nested popovers
...
These are mainly for stress-testing our
popover implementations.
2019-04-27 17:50:22 +00:00
Matthias Clasen
d3ad816d63
widget-factory: Add non-modal popovers
...
This makes is easy to test moving the toplevel
or repositioning the parent while the popover
is shown.
2019-04-27 17:50:14 +00:00
Matthias Clasen
eea1388cf4
file chooser: Fix Ctrl-L
...
We were forwarding key events to the search entry
and unconditionally considered search started
afterwards. That is not correct, since things
like a Ctrl key press should not trigger search.
Fix this by only switching to search mode when
the event was actually consumed.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1829
2019-04-27 17:43:59 +00:00
Matthias Clasen
f3747d1776
Merge branch 'font-chooser-search' into 'master'
...
fontchooser: Fix type-to-search
Closes #1842
See merge request GNOME/gtk!780
2019-04-27 16:08:53 +00:00
Matthias Clasen
6277f2fccc
fontchooser: Fix type-to-search
...
The key capture was interfering with other
entries in the dialog, so be smarter about
when we want to capture keys and when we
don't.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1842
2019-04-27 15:59:45 +00:00
Timm Bäder
931b0b3752
gl renderer: Move texture labeling below initialization
...
Apparently genTextures and friends only "reserves names", initializing
them will actually create them. Using glObjectLabel on textures before
initializing them will throw a GL_INVALID_VALUE error.
2019-04-27 10:44:37 +02:00
Timm Bäder
6f3e608331
gdkglcontext: Limit gl debug label length
...
There's a maximum length we have to adhere to, otherwise GL throws a
GL_INVALID_VALUE error.
2019-04-27 10:44:23 +02:00
Timm Bäder
cc4b3798e5
searchentry: Always measure and allocate icon
...
Just measuring it (so the warning goes away) but then not using the
values will later underallocate the text widget.
Instead, always reserve space for the icon (which will inevitable be
visible as soon as the searchentry is actually being used).
Fixes #1831
2019-04-27 08:40:33 +02:00
Timm Bäder
8634a51aa5
Adwaita: separate '.view text' from textview>text
...
The first rule breaks GtkText inside GtkSearchEntry inside something
that has .view applied, as found in the file chooser when searching.
2019-04-27 08:40:33 +02:00
Benjamin Otte
7420f9c34a
testsuite: Rewrite text diff to use GSubprocess
...
... instead of g_spawn(). Avoids having to create a temp file, too.
2019-04-27 06:20:30 +02:00
Timm Bäder
1a7c280ebb
gl renderer: bind the texture framebuffer before rendering
...
When rendering to a texture, collecting the render ops might bind a
different framebuffer, so bind the one we want again before doing the
actual rendering.
2019-04-26 18:05:32 +02:00
Timm Bäder
4bb6e70d01
tooltip: Initialize tooltip coords to given event coords
...
Otherwise the coordinates passed to the query-tooltip signal are always
0.
2019-04-26 18:05:32 +02:00
Matthias Clasen
2bd9b42479
Merge branch 'wip/surface-transform-data' into 'master'
...
Surface transform listener fixes
See merge request GNOME/gtk!776
2019-04-25 16:42:42 +00:00
Chun-wei Fan
b8127670df
Merge branch 'fix-gdkwin32-move-drag' into 'master'
...
gdksurface-win32.c: Acquire root coordinates on drag/move
See merge request GNOME/gtk!693
2019-04-25 15:44:59 +00:00
Jonas Ådahl
3a1ef7aa2c
widget: Move surface relative transform fields into its own struct
...
The purpose being to reduce the size of GtkWidgetPrivate. What is left
is a pointer to the allocated struct.
2019-04-25 16:02:19 +02:00
Daniel Mustieles
8dd26b6b8a
Updated Spanish translation
2019-04-25 15:58:58 +02:00
Matthias Clasen
0526775ff4
Merge branch 'wip/alexl/gl-debug' into 'master'
...
Add GL debugging integration
See merge request GNOME/gtk!771
2019-04-25 13:16:09 +00:00
Jonas Ådahl
1ad406e15d
widget: Remove leftover parent-changed handler removal
...
It was never added, as the listener was replaced by explicit code in
gtk_widget_(un)root(), but the removal code was left in place in error.
2019-04-25 14:29:19 +02:00
Alexander Larsson
249f6a85b3
gdkglcontext: Only emit opengl debug calls if GDK_DEBUG=gl-debug
...
This avoids a potential performance cost in the non-debug case.
2019-04-25 11:36:23 +02:00
Alexander Larsson
32edf29c0a
GskGLRenderer: Add debug groups
...
This adds debug groups in various places, including the debug
nodes if those are in use. This makes the traces in tools like
renderdoc much easier to read.
2019-04-25 11:36:21 +02:00
Alexander Larsson
4f7171885f
GskGLRenderer: Label various gl objects
...
This means the names are more useful in tools like renderdoc.
2019-04-25 11:35:00 +02:00
Alexander Larsson
b1eedbeb58
GdkGLContext: Add internal functions for KHR_DEBUG calls
...
This includes pushing and poping debug group messages and labeling
objects.
2019-04-25 11:35:00 +02:00
Matthias Clasen
a98f857a82
Merge branch 'parent-surface' into 'master'
...
Drop the parent surface getter and setter
See merge request GNOME/gtk!774
2019-04-25 01:18:54 +00:00
Matthias Clasen
b9770fa752
widget: Drop gtk_widget_set_parent_surface
...
And the getter, too. Widgets no longer have
extra surfaces that could serve as parent surfaces.
2019-04-24 20:57:09 -04:00
Matthias Clasen
52d4bcf1be
popover: Stop using gtk_widget_get_parent_surface
...
We can just use the surface of the parent.
2019-04-24 20:57:09 -04:00
Matthias Clasen
fe3b5ba545
tests: Stop using gtk_widget_get_parent_surface
...
We can just use the surface of the parent.
2019-04-24 20:57:09 -04:00
Matthias Clasen
33f034d0d7
a11y: Stop using gtk_widget_get_parent_surface
...
We can just use the surface of the parent.
2019-04-24 20:54:05 -04:00
Matthias Clasen
2516f1142d
Merge branch 'wip/widget-position-changed-callbacks' into 'master'
...
widget: Add surface relative position changed callback
See merge request GNOME/gtk!760
2019-04-24 19:26:27 +00:00
Matthias Clasen
ec37e1e462
Merge branch 'fix-and-improve-linked-button-style' into 'master'
...
themes: Fix and improve linked button style
Closes #1294
See merge request GNOME/gtk!730
2019-04-24 19:23:12 +00:00
Matthias Clasen
79180f62d7
Merge branch 'wip/jimmac/type-experiments' into 'master'
...
Adwaita: generic type styles
See merge request GNOME/gtk!772
2019-04-24 19:08:40 +00:00
Jakub Steiner
5cd4ec510d
Adwaita: generic type styles
...
- try to define a basic typographic structure
See https://gitlab.gnome.org/GNOME/gtk/issues/1808
2019-04-24 19:23:05 +02:00
Matthias Clasen
ea95aea246
Merge branch 'csserror-g-decls' into 'master'
...
csserror: Add G_BEGIN_DECLS and G_END_DECLS
See merge request GNOME/gtk!773
2019-04-24 16:56:40 +00:00
Timm Bäder
e13d242320
gl renderer: Keep op builder around
...
GL keeps the unoform state per-program, but not per-frame. So, we can't
pretend that this works for us. Keep the RenderOpBuilder around for the
entire lifetime of the renderer instead.
2019-04-24 17:55:14 +02:00
Kjell Ahlstedt
c21063e71e
csserror: Add G_BEGIN_DECLS and G_END_DECLS
...
Necessary when the header file is included in C++ code.
Merge request !773
2019-04-24 16:32:54 +02:00
Jonas Ådahl
477ad2505b
widget: Add surface relative transform changed callback
...
Added two new private GtkWidget API:
* gtk_widget_add_surface_transform_changed_callback()
* gtk_widget_remove_surface_transform_changed_callback()
The intention is to let the user know when a widget transform relative
to the surface changes. It works by calculating the surface relative
transform during allocation, and notifying the callbacks if it changed
since last time. Each widget adds itself as a listener to its parent
widget, thus will be triggered if a parents surface relative transform
changes.
2019-04-24 14:26:24 +02:00
Timm Bäder
91bbe6ef95
gl renderer: Sync gpu and cpu default alpha value
...
Otherwise we might end up not passing the new value to the GPU.
2019-04-24 13:29:45 +02:00
Timm Bäder
34fcfb154a
gl renderer: Properly apply opacity in cross-fade shader
2019-04-24 13:29:45 +02:00
Daniel Mustieles
28815bc7e4
Updated Spanish translation
2019-04-24 09:52:46 +02:00
Matthias Clasen
8eaa8aaaf8
Merge branch 'simplify-fixes' into 'master'
...
Simplify fixes
See merge request GNOME/gtk!770
2019-04-23 21:39:29 +00:00
Matthias Clasen
491829a2b5
builder-tool: Check canonical names
...
Always canonicalize names before comparing.
We were missing properties like left_attach,
since we were comparing them to left-attach.
2019-04-23 17:30:00 -04:00
Matthias Clasen
28be1c5d3a
builder-tool: Fix property check
...
Embarrassingly, there was a missing else
causing us to check all packing properties
as object properties, never finding them.
2019-04-23 21:25:59 +00:00
Timm Bäder
65ff19d149
eventcontrollermotion: Document missing signal parameters
2019-04-23 17:24:51 +02:00
Timm Bäder
3da6e83609
cssprovider: Fix a parameter name mismatch
2019-04-23 17:24:07 +02:00
Benjamin Otte
2a7e4ae7f6
testsuite: Don't pretend we're a GTest
...
This is a meson test, not a GTest thing. So:
- Use g_print(), not g_test_message
That makes meson test --verbose print the actual log messsages.
- Don't g_assert() all the time
Instead, run tests through to the end and just return a non-0 exit
status.
2019-04-23 17:09:14 +02:00
Timm Bäder
cc878ec00f
gl renderer: begin/end_frame around do_render
...
This fixes rendering to a texture on intel hardware. The glClear calls
would throw a GL_FRAMEBUFFER_INCOMPLETE error here, because the
gsk_gl_driver_begin_frame() call in do_render() reset the framebuffer
object in use.
2019-04-23 17:09:14 +02:00
Timm Bäder
1f5649e1ce
GdkWaylandDevice: Don't recreate the default cursor every frame
...
Save the information whether the cursor in use is the default one, and
don't create a new cursor object in that case.
We previously created a new cursor object every frame just to compare it
to the current cursor in use and then throw it away.
2019-04-23 17:09:14 +02:00
Daniel Mustieles
ca19b940ce
Updated Spanish translation
2019-04-23 10:30:35 +02:00
Daniel Mustieles
3f70d20bb3
Updated Spanish translation
2019-04-23 10:29:32 +02:00
Matthias Clasen
304e06541e
Merge branch 'forgotten-file' into 'master'
...
window: Remove dropped api from headers
See merge request GNOME/gtk!769
2019-04-23 01:37:39 +00:00
Matthias Clasen
c91371951a
window: Remove dropped api from headers
...
This was forgotten in fed2db1493
.
2019-04-23 01:23:01 +00:00
Benjamin Otte
6e59c5c843
gdk: Remove gdk_surface_invalidate_rect() from public API
...
It's still available for backends, but public API (read: GTK) is
meant to only call gdk_surface_queue_expose() and track its
invalid region itself.
2019-04-21 20:08:05 +02:00
Matthias Clasen
f5a8b79cfb
Merge branch 'unused-typehint' into 'master'
...
gdk: Remove an unused field
See merge request GNOME/gtk!767
2019-04-21 15:41:25 +00:00
Matthias Clasen
c723893f09
gdk: Remove an unused field
...
Its not used, so get rid of it.
2019-04-21 11:19:42 -04:00
Matthias Clasen
a247529bc8
Merge branch 'drop-skip-pager' into 'master'
...
window: Drop some x11-specific apis
See merge request GNOME/gtk!766
2019-04-20 02:46:26 +00:00
Matthias Clasen
51b2759eb1
surface: Drop group api
...
This was only ever implemented on X11, and
GTK is not using it at all. Relegate it to
x11-specific api.
2019-04-20 02:28:46 +00:00
Matthias Clasen
fed2db1493
window: Drop some x11-specific apis
...
The skip-taskbar, skip-pager and urgency hints were
only ever implemented for X11, and are not very useful
with modern desktops. Relegate the functionality to
x11 backend api, and drop the GtkWindow api.
2019-04-20 02:28:46 +00:00
Matthias Clasen
77ff83cdd1
Fix a compiler warning
2019-04-19 13:58:52 -04:00
Matthias Clasen
37fee8c52f
wayland: Improve debug output for events
...
We were missing surfaces in a few places.
2019-04-19 13:58:45 -04:00
Benjamin Otte
08c84bc830
Merge branch 'cairo-borders-fixage' into 'master'
...
Cairo borders fixage
See merge request GNOME/gtk!765
2019-04-19 01:48:59 +00:00
Benjamin Otte
9b6f822f15
rendernode: Fix border rendering
...
This fixed the reftest introduced in the previous commit.
I'm using a mesh gradient here instead of drawing 4 individual sides to
avoid artifacts when those sides overlap in rounded corners.
2019-04-19 03:39:57 +02:00
Benjamin Otte
70fb29e81a
reftests: Add a reftest for rendering failure
...
c18d2872f2
introduced a misrendering in
the Cairo fallback rendering code while fixing another one.
This test exposes that problem.
Related: !756
2019-04-19 03:39:57 +02:00
Matthias Clasen
0e26e95b00
window: Fix an oversight
...
We must still reset cursors.
2019-04-18 20:15:39 +00:00
Matthias Clasen
ba1c5cf43f
Merge branch 'cursor-things' into 'master'
...
Cursor things
See merge request GNOME/gtk!764
2019-04-18 19:38:56 +00:00
Matthias Clasen
f3821031e0
window: Stop juggling cursors
...
We have convenience api for this.
2019-04-18 15:07:01 -04:00
Matthias Clasen
e37f4d0ea6
text: Stop juggling cursors
...
We have a convenience api for this.
2019-04-18 15:06:35 -04:00
Matthias Clasen
b26087845d
label: Stop juggling cursors
...
We have a convenience api for this.
2019-04-18 15:06:09 -04:00
Matthias Clasen
891b343197
Merge branch 'style-prop-change' into 'master'
...
Style prop change
See merge request GNOME/gtk!763
2019-04-18 18:20:06 +00:00
Matthias Clasen
8727b0708e
css: Kerning affects text size
...
Thats the point. And we were missing the proper
flags to make GTK do the right thing when
changing font-kerning in the inspector.
2019-04-18 18:08:10 +00:00
Matthias Clasen
1932a50d36
css: Some updates to internal docs
...
Minor corrections to the AFFECTS flags docs.
2019-04-18 18:04:58 +00:00
Matthias Clasen
5a5da91785
Merge branch 'letterspacing-resize' into 'master'
...
css: Letterspacing affects text size
See merge request GNOME/gtk!762
2019-04-18 17:46:35 +00:00
Carlos Garnacho
de2e0f451f
Merge branch 'wip/carlosg/tablet-cursors-hidpi-master' into 'master'
...
gdk/wayland: Listen to wl_surface events on tablet cursors
Closes #1675
See merge request GNOME/gtk!761
2019-04-18 17:35:45 +00:00
Matthias Clasen
8400d8e75d
css: Letterspacing affects text size
...
It does. And we were missing the proper
flags to make GTK do the right thing when
changing letter-spacing in the inspector.
2019-04-18 17:34:44 +00:00
Carlos Garnacho
50eb11a2a0
gdk/wayland: Listen to wl_surface events on tablet cursors
...
And update the surface accordingly (eg. scale on hidpi). The mechanism
that did that for wl_pointer has been made generic so it can be shared
with tablets too.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1675
2019-04-18 19:27:29 +02:00
Matthias Clasen
e8f898508a
Merge branch 'handle-tool-scale-fix' into 'master'
...
gdkdevice-wayland: Update pointer scale on tablet tool proximity events
See merge request GNOME/gtk!582
2019-04-18 16:55:28 +00:00
Jonas Ådahl
638a3c142c
Merge branch 'wayland-cursor-hotspot' into 'master'
...
wayland: Avoid using uninitialized memory
Closes #1328
See merge request GNOME/gtk!757
2019-04-18 14:35:06 +00:00
Matthias Clasen
ecdad20827
wayland: Avoid using uninitialized memory
...
_gdk_wayland_cursor_get_buffer was not initializing
its out variables in the 'not found' case. This
was showing up in protocol traces as garbage hotspots
being sent to the compositor.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1328
2019-04-18 14:27:00 +00:00
Benjamin Otte
5cd8e0f7f1
testsuite: Add theme-validate test
...
The test just loads all of GTK's themes and makes sure they cause no
errors or warnings from the CSS parser.
2019-04-18 02:28:42 +02:00
Benjamin Otte
83696639a7
themes: Regenerate CSS
...
Seems to have been forgotten a few times.
2019-04-18 02:28:15 +02:00
Benjamin Otte
1aa1610611
cssprovider: Export correct API
...
gtk_css_provider_get_named() is the old GTK3 style API to load themes.
Instead, export the function we currently use,
gtk_css_provider_load_named().
As a side effect we allow people to load a theme as often as they want
without conflicting with GTK's theme.
2019-04-18 02:26:04 +02:00
Matthias Clasen
0c87b62251
Survive absence of librsvg without criticals
...
We can't guarantee that we can load svgs, so
we shouldn't spew criticals when some of our
own resources fail to load due to that reason.
2019-04-18 00:14:00 +00:00
Matthias Clasen
69f12ed6a5
Avoid a crash without librsvg
...
gtk_css_image_recolor_load_texture may leave
recolor->text as NULL without setting error.
No need to crash for that.
2019-04-18 00:13:53 +00:00
Matthias Clasen
a8db330341
HighContrast: Fix a typo
...
The new css parser complains about an unknown pseudo-class
here.
2019-04-18 00:13:48 +00:00
Matthias Clasen
2681f7c7af
textview: Refine touch popup
...
The touch popup was meant to have linked buttons.
2019-04-17 23:40:32 +00:00
Matthias Clasen
836b5a217a
text: Refine the touch popup
...
The touch popup was meant to have linked buttons.
2019-04-17 23:40:26 +00:00
Matthias Clasen
802c426d89
Add a png version of process-working-symbolic
...
Otherwise, we get a spinning missing-image without
librsvg.
2019-04-17 22:27:19 +00:00
Matthias Clasen
7c3eadf169
Merge branch 'wip/otte/werror' into 'master'
...
CI: Build with --werror
See merge request GNOME/gtk!755
2019-04-17 17:37:01 +00:00
Benjamin Otte
6c6fd13034
CI: Build with --werror
...
This turns on --werror in the Fedora CI builds.
2019-04-17 18:57:37 +02:00
Benjamin Otte
4ce217b1a5
Merge branch 'wip/otte/warnings' into 'master'
...
Add more gcc error flags
See merge request GNOME/gtk!537
2019-04-17 16:51:06 +00:00
Matthias Clasen
2656f5b4eb
Remove two more plusses
2019-04-16 21:27:17 -04:00
Matthias Clasen
bc8ecef605
Merge branch 'icon-browser-tweaks' into 'master'
...
Icon browser tweaks
See merge request GNOME/gtk!754
2019-04-17 01:19:13 +00:00
Matthias Clasen
33eb72a69b
dialog: Fix a doc typo
2019-04-16 21:13:40 -04:00
Matthias Clasen
21be06310c
builder-tool: Tweak --help output
2019-04-16 21:13:16 -04:00
Matthias Clasen
6e27e79c8b
Merge branch 'gtk-demo-inspector' into 'master'
...
gtk-demo: Add a gear menu
See merge request GNOME/gtk!753
2019-04-17 01:07:26 +00:00
Matthias Clasen
e2d821fa59
icon-browser: Left-align the sidebar
...
The centered labels just look disorderly.
2019-04-16 21:00:47 -04:00
Matthias Clasen
8d001e3573
icon-browser: Recover from GtkDialog api change
...
When we moved content_area to a sibling of action area,
it changed orientation from vertical to horizontal.
Adapt to this change.
2019-04-16 20:59:57 -04:00
Matthias Clasen
f6afa3d03f
gtk-demo: Add a gear menu
...
Modernize the about dialog, and make it available
from a gear menu, together with a way to bring up
the inspector.
2019-04-16 20:34:59 -04:00
Matthias Clasen
3286221870
Merge branch 'widget-factory-inspector' into 'master'
...
Widget factory inspector
See merge request GNOME/gtk!752
2019-04-16 23:47:14 +00:00
Matthias Clasen
f4e32f29e1
widget-factory: Update copyright line
...
Update the years to 2019, and use some better typography.
2019-04-16 18:09:46 -04:00
Matthias Clasen
226e0eadf0
widget-factory: Add an Inspector menu item
...
Just because we can.
2019-04-16 18:06:12 -04:00
Olivier Fourdan
1f58e0ed6b
wayland: Add support for xdg-output
...
Previously, the GDK backend for Wayland would deduce the logical size
of the monitors from the wl_output size and scale.
With the addition of fractional scaling which advertises a larger scale
value and then scale down the client surface, the computed logical size
of the monitors in GDK would be wrong and confuse applications which
insist on using the monitor size and position (like Firefox).
The xdg-output protocol aims at describing outputs in a way which is more
in line with the concept of an output on desktop oriented systems by
presenting the outputs using their logical size and position appropriately
transformed.
Add support for the optional xdg-output protocol so that the size and
position of the monitors as reported by GDK is correct even when using
fractional scaling.
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/1828
2019-04-16 16:14:43 +02:00
Timm Bäder
1ee5c2cac4
grid: Fix annotation typo
2019-04-16 07:20:13 -04:00
Emmanuele Bassi
97fb1c7757
Add licensing and copyright notice to report generators
...
So that other projects can use them.
2019-04-16 11:43:23 +01:00
Benjamin Otte
dff9a5a195
build: Add new gcc error flags
...
These flags check for code that we don't want to write, so turn them
into error flags.
Variable length arrays should be replaced by malloc() - or explicit
alloca() calls if you know what you're doing.
Implicit fallthrough should be replaced by explicit fallthrough with the
usage of G_GNU_FALLTHROUGH.
This work inspired by Kees Cook's LCA2019 talk:
https://www.youtube.com/watch?v=FY9SbqTO5GQ
http://outflux.net/slides/2019/lca/danger.pdf
2019-04-15 14:40:25 +02:00
Benjamin Otte
b9fb2f0933
Add missing G_GNUC_FALLTHROUGH statements
2019-04-15 14:40:25 +02:00
Benjamin Otte
0791924bf7
Convert fallthrough comments to G_GNUC_FALLTHROUGH
...
This way it's very obvious that fallthrough is indeed what we want.
Also bump the glib requirement to 2.59 which introduced
G_GNUC_FALLTHROUGH.
2019-04-15 14:40:25 +02:00
Benjamin Otte
90870194ff
filechoosernativewin32: Add missing break statement
2019-04-15 14:38:23 +02:00
Benjamin Otte
c593f86ac6
notebook: Add missing return statement
...
Previously, the code would just fall thrrough and repeat an operation it
had tried before, but that seems quite unnecessary.
2019-04-15 14:38:23 +02:00
Benjamin Otte
ad3ded7ba0
textview: Add missing break statement
2019-04-15 14:38:23 +02:00
Benjamin Otte
3f9b8f25d8
vulkan: Add missing break statement
2019-04-15 14:38:23 +02:00
Benjamin Otte
8ad38e5ae5
menu: Remove unused function parameter
...
The parameter was only ever set to TRUE.
And to make matters even more fun, the function didn't ever look
at the parameter.
2019-04-15 14:38:23 +02:00
Benjamin Otte
0cd2946676
menu: Move enum into only source file using it
2019-04-15 14:38:23 +02:00
Benjamin Otte
5473d13470
menu: remove bottom attach
...
bottom attach is top attach + 1, so use that everywhere
2019-04-15 14:38:23 +02:00
Benjamin Otte
31ccb7ca70
menu: get rid of 2 variables
...
They are always 0 and 1 respectively, so treat the code like that.
2019-04-15 14:38:23 +02:00
Benjamin Otte
dba1926a42
menu: Yeah cool, you're the last child
...
Nobody cares.
2019-04-15 14:38:23 +02:00
Benjamin Otte
b1b12a239f
menu: Remove attach properties
...
They're never changed from being -1. So just replace them with -1
everywhere.
2019-04-15 14:38:23 +02:00
Benjamin Otte
44ce36bef5
menubar: Remove pack direction
2019-04-15 14:38:23 +02:00
Benjamin Otte
84d2150077
tests: Remove popupat test
...
The test hasn't worked for a while and nobody cared to fix it.
Neither do I.
2019-04-15 14:38:23 +02:00
Emmanuele Bassi
3f61360fa1
ci: Restructure the HTML report
...
We should show all the possible result sections:
- passed
- skipped
- expected failures
- failures
- timed out
Even if we consider the first three to be successes.
2019-04-14 21:07:15 +01:00
Emmanuele Bassi
7fb9f21ee0
ci: Tweak the HTML report style
...
The header needs to take into account the job id field.
2019-04-14 20:37:21 +01:00
Emmanuele Bassi
d733078766
ci: Style the test report
...
My web design skills are terrible, but it's better than nothing; I'm
sure this will lead to somebody filing a merge request to make the
test report look a lot better.
While we're at it, let's include the reftest images inside the report
itself, so we don't have to hunt them down.
2019-04-14 20:29:14 +01:00
Emmanuele Bassi
cb6e48e22b
Merge branch 'harfbuzz-deprecations' into 'master'
...
Handle deprecated HarfBuzz API
See merge request GNOME/gtk!748
2019-04-13 13:45:32 +00:00
Emmanuele Bassi
f39ae35e4b
demo: Ignore deprecated HarfBuzz API
...
We should avoid warnings just because we're building against bleeding
edge HarfBuzz.
2019-04-13 14:30:09 +01:00
Emmanuele Bassi
daea92ea00
Ignore deprecated HarfBuzz API
...
HarfBuzz 2.0 deprecated some API used by the GtkFontChooser, but since
we're still supporting older versions of HarfBuzz, we should disable the
deprecation warnings to avoid too much noise during builds.
2019-04-13 14:30:09 +01:00
Emmanuele Bassi
b98c7214ef
ci: Generate valid HTML for the report
...
Fix a typo in the closing <ul>, and add a missing closing <div>.
2019-04-13 14:28:53 +01:00
Emmanuele Bassi
3412d18dc2
ci: Use the v5 CI image
...
Otherwise the dependencies for the HTML report won't be available.
2019-04-13 14:18:14 +01:00
Emmanuele Bassi
3bc8ab91a2
ci: Add an HTML report generator
...
The JUnit cover report is useful, but only up to a point; for instance,
it's not used unless it's part of a merge request. This means you don't
get a report if you're pushing to a branch that does not have an MR open.
With a simple Python script and some minimal templating, we can generate
an HTML report from the "I Can't Believe it's not JSON™" log that Meson
produces, and keep it as a CI artifact.
2019-04-13 14:11:30 +01:00
Benjamin Otte
f9d5869774
passwordentry: Add missing break statement
2019-04-13 11:01:02 +02:00
Timm Bäder
20ccb53c42
text: Remove useless gtk_widget_get_allocation call
2019-04-13 06:26:27 +02:00
Timm Bäder
f9a589c7fd
listbox: Fix compiler warning
2019-04-13 06:26:17 +02:00
Timm Bäder
ddd044f283
entry: Remove some unused constants
2019-04-13 06:18:43 +02:00
Timm Bäder
3569348f9c
gl renderer: Declare color matrix child separately
...
Otherwise I'm doing this all the time when debugging.
2019-04-13 06:00:02 +02:00
Benjamin Otte
9e8e3eb0ca
Merge branch 'listbox-separators' into 'master'
...
Listbox separators
See merge request GNOME/gtk!747
2019-04-13 00:38:14 +00:00
Matthias Clasen
87121998a2
Merge branch 'test-locale-change' into 'master'
...
testutils: Run in UTF8 locale
See merge request GNOME/gtk!734
2019-04-13 00:28:08 +00:00
Matthias Clasen
68d6c51dbc
inspector: Use the new show-separators property
...
Add separators to the list boxes on the Settings page.
2019-04-12 20:25:54 -04:00
Matthias Clasen
4551aef081
Adwaita: Implement list separators
...
Just put a top border on every row.
2019-04-12 20:25:16 -04:00
Matthias Clasen
0249bd4f8a
listbox: Add a ::show-separators property
...
This is getting translated into a .separators style
class on the list box css node.
2019-04-12 20:24:40 -04:00
Benjamin Otte
b11c69b4a8
Merge branch 'fix-reftests' into 'master'
...
Fix reftests
See merge request GNOME/gtk!746
2019-04-13 00:02:19 +00:00
Benjamin Otte
84351ba9e5
reftests: Be more graceful about errors
...
The nice thing about that is that we can then log messages about the
errors to the log.
And then we can read the logs of the CI machinery and actually know
what's going on.
2019-04-13 01:48:28 +02:00
Matthias Clasen
9a1da43890
inspector: Fix editing in the property list
...
The type-to-search was interfering with using
entries in the list. Avoid that by watching
where the focus is.
2019-04-12 19:48:23 -04:00
Benjamin Otte
c78ba42051
testutils: Run in UTF8 locale
...
before, code was using the "C" locale, but that one uses ASCII. Instead,
run in the "C.utf8" locale.
Nobody expects code to not support UTF8 and no end user runs their
machine in an ASCII setup, so it makes no sense to default to that.
2019-04-13 01:40:10 +02:00
Benjamin Otte
e0730bc118
testsuite: Fix label-shadows test
...
Use a GtkFixed to position and rotate the labels. This is necessary
because the GtkLabel::angle property was removed.
2019-04-13 01:31:49 +02:00
Matthias Clasen
7d9a8a6ec0
Merge branch 'gtkcomposetable-checked-mul' into 'master'
...
gtkcomposetable: use g_size_checked_mul() for overflow checking
See merge request GNOME/gtk!745
2019-04-12 22:19:31 +00:00
Benjamin Otte
07e0411b98
reftests: Fix textview-margins test
...
The text is wider now that we changed the font properties, so account
for that.
2019-04-13 00:11:24 +02:00
Christoph Reiter
b66e4cd64c
gtkcomposetable: use g_size_checked_mul() for overflow checking
...
The check was added in !741 , this replaces it with g_size_checked_mul()
2019-04-12 22:41:58 +02:00
Benjamin Otte
254feda16b
Revert "reftests: Fix textview-margins test"
...
This reverts commit c6471ee874
.
Doesn't work on CI.
2019-04-12 22:38:11 +02:00
Benjamin Otte
c6471ee874
reftests: Fix textview-margins test
...
The text is wider now that we changed the font properties, so account
for that.
2019-04-12 22:15:00 +02:00
Emmanuele Bassi
261b8c7ee6
Merge branch 'cache-reftest-images' into 'master'
...
ci: Cache the reftest artifacts
See merge request GNOME/gtk!744
2019-04-12 20:09:50 +00:00
Emmanuele Bassi
f58f0732c2
ci: Cache the reftest artifacts
...
Keeping the reftest output images as artifacts of a job allows us to
browse them and download them straight from GitLab.
2019-04-12 20:58:29 +01:00
Emmanuele Bassi
c5a4a26f06
Merge branch 'ci-update' into 'master'
...
ci: Install Monospace fonts
See merge request GNOME/gtk!742
2019-04-12 19:30:31 +00:00
Emmanuele Bassi
faff08193a
Merge branch 'fix-meson-on-macos-2' into 'master'
...
reftests: Use shared_library, not shared_module
See merge request GNOME/gtk!743
2019-04-12 19:30:19 +00:00
Emmanuele Bassi
3046358d38
ci: Update list of xfail tests
...
The label tests do not fail any more, because the CI image has Monospace
fonts; the textview-margins test started to fail on the CI image,
though.
2019-04-12 20:21:29 +01:00
Matthias Clasen
e81f033ece
Merge branch 'validate-alloc-size' into 'master'
...
Check the size of the g_new arguments
See merge request GNOME/gtk!741
2019-04-12 19:11:30 +00:00
Emmanuele Bassi
5c608fe070
ci: Install Monospace fonts
...
The reftests require them.
2019-04-12 20:09:10 +01:00
Matthias Clasen
a2db956492
inspector: Show readonly property values
2019-04-12 15:08:01 -04:00
Matthias Clasen
8d51038cb1
inspector: Cosmetics
2019-04-12 15:08:01 -04:00
Matthias Clasen
86c86e0860
inspector: Revamp attribute and action info
...
This also needs to be turned into single-line data.
2019-04-12 15:08:01 -04:00
Matthias Clasen
324f5472a2
Fix a crash
...
We had a signal handler with a wrong signature, causing
a crash when looking at the GtkSettings properties in
the inspector.
2019-04-12 15:08:01 -04:00
James Westman
c20360dd98
reftests: Use shared_library, not shared_module
...
This allows Meson to run on macOS, where shared modules cannot be linked
against.
2019-04-12 14:04:01 -05:00
Emmanuele Bassi
1b6252ebf0
Merge branch 'default-request-mode' into 'master'
...
Add default GtkLayoutManagerClass.get_request_mode()
See merge request GNOME/gtk!738
2019-04-12 17:59:04 +00:00
Emmanuele Bassi
b4c8ba4de7
Check the size of the g_new arguments
...
We're passing integers without validating their size, and newer GCC are
very cross about it, with warnings like:
warning: argument 1 range [18446744071562067968, 18446744073709551615]
exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
We should check we're not overflowing the allocation size, by limiting
the range of values we can use.
First of all, we need to use `gsize` instead of a random `int`, since we're
allocating data.
Additionally, we need to check that the multiplication that computes the
size of the allocation doesn't overflow the maximum value of a `gsize`.
2019-04-12 18:58:34 +01:00
Benjamin Otte
ad34f731e9
CI: Turn on reftests
2019-04-12 19:34:29 +02:00
Benjamin Otte
198207f1ff
reftests: Mark the currently unfixed failures as XFAIL
...
They should be fixeed before 4.0 but the fixes are more involved. And we
want to start running the existing tests on CI, because they break
regularly and we want to catch that.
2019-04-12 19:34:29 +02:00
Benjamin Otte
6120f11ed3
reftests: Fix GtkFixed layout properties
...
GtkFixed was still using "x" and "y", when it should have been using
"position".
2019-04-12 19:34:29 +02:00
Benjamin Otte
0a440a804f
reftests: Fix CSS for various tests
...
* :nth-child(first) => :first-child
* :nth-child(last) => :last-child
* Add semicolons at end of declarations
* Remove spaces between color functions (shade, alpha, ...) and args
2019-04-12 19:34:29 +02:00
Benjamin Otte
117fc68195
tests: Remove testboxcss
...
That test was cool in 2011, but hasn't been updated or used since then
because its features are now part of widget-factory and the inspector.
So let's remove it.
2019-04-12 19:34:29 +02:00
Benjamin Otte
f310609a66
builder: Parse GskTransform properties
...
In particular, this allows parsing the GtkFixed position properties.
2019-04-12 19:34:29 +02:00
Benjamin Otte
8001c7d972
transform: Add gsk_transform_parse()
...
It uses the new CSS parser.
2019-04-12 19:34:29 +02:00
Benjamin Otte
023b695422
testsuite: Fix stylecontext test
...
Update the test to the stricter interpretation of the CSS specification
and the removal of custom additions.
2019-04-12 19:34:29 +02:00
Benjamin Otte
ec6ce0707a
testsuite: Update references for style test
...
We have more accurate section printouts now and they are used here.
2019-04-12 19:34:29 +02:00
Benjamin Otte
f37573f8dc
testsuite: Check errors not just for line, but for full range
...
Instead of just checking that the line of the error message is correct,
assert that start and end position are on the correct character offset.
Also fix all the tests to conform to this.
2019-04-12 19:34:29 +02:00
Benjamin Otte
49f8b571b9
testsuite: Update integer test
...
Make the test use an actual integer property that accepts negative
numbers (opacity) instead of one that wants units (margin-top) or
can't deal with negative numbers (everything else).
2019-04-12 19:34:29 +02:00
Benjamin Otte
e1cd996617
selector: Inlcude : sign when reporting errors
2019-04-12 19:34:28 +02:00
Benjamin Otte
24cc721bc6
cssprovider: Mark whole @import statement on import error
2019-04-12 19:34:28 +02:00
Benjamin Otte
d41580adfc
calc: Have better error location range
2019-04-12 19:34:28 +02:00
Benjamin Otte
3ab65b7da2
csspositionvalue: Redo the parser
...
The old one incorrectly rejected "center left" and "center right".
2019-04-12 19:34:28 +02:00
Benjamin Otte
79238b0d8f
cssparser: Add error functions that take locations
...
... and use them to report better error locations for the warning when
blocks aren't terminated properly.
2019-04-12 19:34:28 +02:00
Benjamin Otte
2e0a56665a
css: Move gtkcsssection.[ch] into gtk/css
2019-04-12 19:34:28 +02:00
Benjamin Otte
76826cfa2f
cssparser: Pass in error locations explicitly
...
And for the quick function, use the start/end location of the current
token.
2019-04-12 19:34:28 +02:00
Benjamin Otte
37671d2bd0
cssprovider: Redo error emission
...
Emit all errors via the parser, don't try to have a custom error
handling machinery.
The only exception is the initial file load error - we need to do that
one directly, because there is no parser.
2019-04-12 19:34:28 +02:00
Benjamin Otte
04d24b7cd2
csssection: Make printing functions public
2019-04-12 19:34:28 +02:00
Benjamin Otte
085d34cbb0
cssprovider: Advance parser to start of declaration
...
This way, the block will reference the right location.
2019-04-12 19:34:28 +02:00
Benjamin Otte
46143492a2
cssprovider: Change section handling
...
Instead of building a full tree of sections that then nobody cares
about, just create sections as necessary for when we use it in the
inspector.
2019-04-12 19:34:28 +02:00
Benjamin Otte
a475d72d47
cssparser: Improve location APIs
...
1. Export multiple locations
2. Return the location instead of passing one in
2019-04-12 19:34:28 +02:00
Benjamin Otte
a8f712b09a
cssection: Return locations, not numbers
...
Now that we have GtkCssLocation, actually use it.
2019-04-12 19:34:28 +02:00
Benjamin Otte
2fb202187c
css: Remove GtkCssSectionType
...
It's unused.
2019-04-12 19:34:28 +02:00
Benjamin Otte
207c0b32b4
csssection: Redo constructors
...
Remove the unused one and rename the old one to new_from_parser().
2019-04-12 19:34:28 +02:00
Benjamin Otte
35f60dc918
csssection: Store a GtkCssLocation
2019-04-12 19:34:28 +02:00
Benjamin Otte
1cd9396154
css: Review error messages
...
... and move them from _gtk_css_parser_error() to the proper new error
message.
2019-04-12 19:34:28 +02:00
Benjamin Otte
de73ac980f
css: Use gtk_css_parser_consume_any() for transition shorthand
2019-04-12 19:34:28 +02:00
Benjamin Otte
acaec5f186
testsuite: Update parser tests to new errors
...
Some errors are now properly detected as unknown values when previously
they were just treated as syntax errors.
2019-04-12 19:34:28 +02:00
Benjamin Otte
c8589a9a2f
testsuite: Handle warnings in CSS tests
2019-04-12 19:34:28 +02:00
Benjamin Otte
a31e5f7a8c
cssshadow: Use gtk_css_parser_consume_any()
...
This way, the arguments can now really be speicified in any order.
A new testcase testing all the ordering possibilities has been added.
2019-04-12 19:34:28 +02:00
Benjamin Otte
e0a01ba174
css: Redo for new parser
...
This commit is still way too big, but I couldn't make it smaller.
It transitions the old CSS parser to the new parser. CSS parsing is now
tokenized, everything else is probably still buggy.
2019-04-12 19:34:28 +02:00
Benjamin Otte
98e076b51e
rgba: Add gdk_rgba_parser_parse()
...
This function is a (private) function to parse a GdkRGBA accoridng to
the CSS specs. We should probably use it for gdk_rgba_parse(), but that
would change the syntax we accept there...
This also introduces a dependency of libgdk on libgtkcss.
So far, no users for this function exist.
2019-04-12 19:34:28 +02:00
Benjamin Otte
f3db19d694
Resurrect the CSS parser from the tokenizer branch
...
So far that parser is unused.
2019-04-12 19:34:28 +02:00
Benjamin Otte
607502ef43
cssparser: Add gtk_css_parser_consume_url()
...
Another slight renaming and semantics change.
2019-04-12 19:34:28 +02:00
Benjamin Otte
acddc317da
cssparser: Add gtk_css_parser_resolve_url()
...
Another slight change of semantics and naming for the new parser.
2019-04-12 19:34:28 +02:00
Benjamin Otte
7f99c1e588
cssparser: Split integer gettig into has/consume functions
...
We can't try to get an integer because ultimately integer getters
support the same shenanigans that numbers and percentages do with calc()
and whatnot.
2019-04-12 19:34:28 +02:00
Benjamin Otte
5f3e5a0406
cssparser: Add gtk_css_parser_try_delim()
...
For parsing single code point delimiters. Also port calc() to use this.
2019-04-12 19:34:28 +02:00
Benjamin Otte
23080d47b5
cssparser: Get rid of _gtk_css_parser_try_double()
...
Use gtk_css_parser_consume_number() everywhere instead.
2019-04-12 19:34:28 +02:00
Benjamin Otte
f0d2f99239
cssparser: Add gtk_css_parser_consume_string()
...
Well, just rename _gtk_css_parser_read_string() for the new semantics,
but this sounds cooler.
2019-04-12 19:34:28 +02:00
Benjamin Otte
e7b9ecc99a
cssparser: Add gtk_css_parser_try_at_keyword()
2019-04-12 19:34:28 +02:00
Benjamin Otte
dce8c11b07
cssparser: Drop _gtk_css_parser_has_prefix()
...
Replace it with has_ident/has_function. The old function is a typical
string matching API, not a tokenizing one.
2019-04-12 19:34:28 +02:00
Benjamin Otte
7ccec19501
parser: Get rid of _gtk_css_parser_is_eof()
...
Use gtk_css_parser_has_token() instead.
2019-04-12 19:34:28 +02:00
Benjamin Otte
93b643c44d
css: Make font-weight an integer
...
This conforms to what Pango does and to the CSS4 spec. And it makes the
parsing code easier. So let's go for it.
2019-04-12 19:34:28 +02:00
Benjamin Otte
21616f6e2e
cssimagescaled: Use gtk_css_parser_consume_function()
...
As part of that, adapt the syntax from
-gtk-scaled( [<image>, <int>?]# )
to
-gtk-scaled( [<image> <int>?]# )
because the commas should be used to separate distinct elements.
Note that almost nobody specifies the scale anyway.
2019-04-12 19:34:28 +02:00
Benjamin Otte
8157004068
easevalue: Use gtk_css_parser_consume_function()
2019-04-12 19:34:28 +02:00
Benjamin Otte
8d69bda27a
cssimagelinear: Use gtk_css_parser_consume_function()
2019-04-12 19:34:28 +02:00
Benjamin Otte
dbdb81f411
cssparser: Add gtk_css_parser_consume_ident()
...
And use it to fix the palette parser.
2019-04-12 19:34:28 +02:00
Benjamin Otte
28fbcf6abe
shorthand: Use gtk_css_parser_try_ident()
2019-04-12 19:34:28 +02:00
Benjamin Otte
1fd339c46f
cssimageradial: Use gtk_css_parser_consume_function()
2019-04-12 19:34:28 +02:00
Benjamin Otte
b830bdca37
cssimagefallback: Use gtk_css_parser_consume_function()
2019-04-12 19:34:28 +02:00
Benjamin Otte
45bc4ed321
cssimagerecolor: Use gtk_css_parser_consume_function()
2019-04-12 19:34:28 +02:00
Benjamin Otte
3988847a05
reftests: Add a cross-fade syntax-checking reftest
...
Making sure all this newfangled code does what it says.
2019-04-12 19:34:28 +02:00
Benjamin Otte
9c862d7736
cross-fade: Make progress optional
...
Now we accept progress being unset and then dynamically compute it
on-demand.
2019-04-12 19:34:28 +02:00
Benjamin Otte
d99ae4b6c2
cross-fade: Use gtk_css_parser_consume_any()
...
.. and gtk_css_parser_consume_function().
gtk_css_parser_consume_any() is a new function that implements the CSS
spec's any combinator ||.
2019-04-12 19:34:28 +02:00
Benjamin Otte
96f9cbcabf
cssimage: Make cross-fade() an array
...
The new spec at https://drafts.csswg.org/css-images-4/#cross-fade-function
allows infinite images to cross-fade and we want to, too.
2019-04-12 19:34:28 +02:00
Benjamin Otte
3597f7e8b1
cssimageicontheme: Use gtk_css_parser_consume_function()
2019-04-12 19:34:28 +02:00
Benjamin Otte
38227dc972
cssfiltervalue: Use gtk_css_parser_consume_function()
2019-04-12 19:34:28 +02:00
Benjamin Otte
aa50e92c65
csstransformvalue: Use gtk_css_parser_consume_function()
2019-04-12 19:34:28 +02:00
Benjamin Otte
753ad64cbc
cssparser: Introduce gtk_css_parser_consume_function()
...
This is a vfunc-based function parser.
2019-04-12 19:34:28 +02:00
Benjamin Otte
3fb44ae651
cssparser: Add gtk_css_parser_try_token()
2019-04-12 19:34:28 +02:00
Benjamin Otte
76fb80f46c
cssparser: Introduce gtk_css_parser_try_ident()
...
... and gtk_css_parser_has_function().
2019-04-12 19:34:28 +02:00
Benjamin Otte
684b6459f1
cssparser: Get rid of _gtk_css_parser_begins_with()
...
Replace it with calls to gtk_css_parser_has_token().
2019-04-12 19:34:28 +02:00
Benjamin Otte
904a9d0c98
parser: Add gtk_css_parser_has_token()
...
This is ithe first step towards converting the parsing code to use
tokens. For now, the topken type is just a magic enum value that only
works as-needed.
2019-04-12 19:34:28 +02:00
Benjamin Otte
32e256e5ab
css: Split GtkCssLocation into its own file
...
And make the struct public, so we can use it in signal handlers.
2019-04-12 19:34:28 +02:00
Benjamin Otte
d4d46e8125
csstokenizer: Add gtk_css_token_is_preserved()
2019-04-12 19:34:28 +02:00
Benjamin Otte
661720ef8b
tokenizer: Pass error arg to read_token()
...
Instead of an error vfunc, have the tokenizer vfunc take a GError
argument. Note that even when an error is returned, there is still a
token to be read.
2019-04-12 19:34:28 +02:00
Benjamin Otte
013591d68d
css: Add GtkCssTokenizer
...
This is copied from an old branch of mine.
2019-04-12 19:34:28 +02:00
Benjamin Otte
a938c14d11
build: Add gtk-css static library
...
This library is meant to be the new CSS library that gets used from GDK,
GSK and GTK for string printing and parsing.
As a first step, move GtkCssProviderError into it.
While doing so, split it into GtkCssParserError (for critical problems)
and GtkCssParserWarning (for non-critical problems).
2019-04-12 19:34:28 +02:00
Emmanuele Bassi
d6cc10ea74
Merge branch 'vulkan-warning' into 'master'
...
vulkan: Add missing enumeration value
See merge request GNOME/gtk!740
2019-04-12 17:26:52 +00:00
Emmanuele Bassi
f25832455f
vulkan: Add missing enumeration value
...
Vulkan 1.1.97 added VK_ERROR_INVALID_DEVICE_ADDRESS_EXT, and we now must
handle it.
2019-04-12 18:03:22 +01:00
Matthias Clasen
42ea95c54e
inspector: Modernize action references
...
Now that we do inline editing, we need to
show this in a single line.
2019-04-12 13:01:19 -04:00
Matthias Clasen
46e7b44ffa
inspector: Drop binding info
...
Thia was relying on non-public implementation details
and was broken since 2015.
2019-04-12 12:35:06 -04:00
Emmanuele Bassi
a27737b04e
Add default GtkLayoutManagerClass.get_request_mode()
...
Just like GtkContainer provides a default implementation of
GtkWidgetClass.get_request_mode(), we can do the same inside
GtkLayoutManager.
A default implementation preserves the behavior of existing widgets that
moved, or will move, to a GtkLayoutManager.
2019-04-12 17:10:30 +01:00
Matthias Clasen
bd2d07e671
Merge branch 'inspector-props' into 'master'
...
inspector: Improve property list editing
See merge request GNOME/gtk!736
2019-04-12 15:20:26 +00:00
Matthias Clasen
fde21b57cd
inspector: Improve property list editing
...
Replace the treeview with popups on the property
page with a listbox with inline editing.
2019-04-12 11:12:55 -04:00
Benjamin Otte
637bd13f3f
boxlayout: Remove unused variable
2019-04-12 16:32:00 +02:00
Emmanuele Bassi
eadd90c22e
ci: Use UTF-8 encoding for the test cover report
...
Since we're embedding text coming from the tests into the report, we
should specify an encoding for both the source JSON file and the target
XML file when opening them.
2019-04-12 13:56:17 +01:00
Emmanuele Bassi
279cb5717c
Merge branch 'issue-1821' into 'master'
...
Fix get_request_mode for GtkBoxLayout
Closes #1821
See merge request GNOME/gtk!737
2019-04-12 12:54:08 +00:00
Emmanuele Bassi
b91fbfd5a0
Fix get_request_mode for GtkBoxLayout
...
The default GtkWidgetClass.get_request_mode() is implemented by
GtkContainer; now that GtkBox uses a GtkBoxLayout, we need to implement
it inside the layout manager to preserve the same behavior as the old
GtkBox.
Fixes #1821
2019-04-12 13:14:44 +01:00
Chun-wei Fan
88086ea91a
meson: Only use HarfBuzz fallback when needed
...
The current Meson releases have broken CMake support, meaning that it is
likely that HarfBuzz could not be located for Visual Studio builds
unless one handcrafts pkg-config files for it, which is both tedious and
error-prone.
Instead, use the existing mechanism for looking for the HarfBuzz headers
and libraries on Visual Studio first when it could not be found via
dependency(), and then use the fallback if it still could not be found.
2019-04-12 18:16:12 +08:00
Matthias Clasen
0842d084dd
inspector: Cometic fixes for controllers
...
Add a frame, and make the rows not activatable.
2019-04-11 22:28:15 -04:00
Matthias Clasen
838b25177f
inspector: Make rows activatable
...
Rows containing just a switch should be activatable,
and toggle the switch.
2019-04-11 22:06:16 -04:00
Matthias Clasen
b39d0cec3c
inspector: Fix css autosave
...
We were creating the directory with improper permissions.
2019-04-11 19:39:44 -04:00
Matthias Clasen
f0c72bdc3b
Adwaita: Add spacing to message dialogs
...
The text was running into the action area.
2019-04-11 19:39:44 -04:00
Benjamin Otte
427d216081
inspector: Enable by default
...
We don't want to stop people from being able to debug GTK applications
by default.
The keybinding also runs last in event delivery, so it doesn't override
existing keybindings anywhere and is therefor safe to enable.
The setting of course should remain, so people who want to lock down
installations, like for kiosks, can turn this off.
2019-04-12 00:39:24 +02:00
Aurimas Černius
dc8b5f75a4
Updated Lithuanian translation
2019-04-11 22:50:00 +03:00
Matthias Clasen
b6f2969872
Merge branch 'frame-clock' into 'master'
...
gdkframeclockidle: Don't permanently skew frame time
Closes #1612
See merge request GNOME/gtk!731
2019-04-11 17:23:03 +00:00
Jakub Steiner
6eed78e3de
Adwaita: OSD set semi-opaque again
...
- forgot the bling bling
2019-04-11 15:35:24 +02:00
Jakub Steiner
c4aa060118
Adwaita: less purple OSD style
...
- one of the bits that escaped the purple cast is the osd background color
2019-04-11 15:26:55 +02:00
Chris Williams
0bf4c2420d
gdkframeclockidle: Don't permanently skew frame time
...
Since commit 3b2f9395
, the frame time may be set into the future, so
only ensure monotonicity, and don't store the offset. This prevents the
frame time from becoming out of sync with g_get_monotonic_time().
Fixes #1612
2019-04-09 16:26:25 -04:00
Daniel Mustieles
aac2556762
Update Spanish translation
2019-04-09 08:11:59 +00:00
Chris Williams
f813bc1823
gdkframeclockidle: Remove unused struct member
...
compute_frame_time() has been using g_get_monotonic_time() instead of
GTimer since commit 7dfa4121
.
2019-04-08 20:37:00 -04:00
nana-4
ca233ad9ae
themes: Fix and improve linked button style
...
Instead of re-styling the border and radius of the linked buttons
depending on the position (middle, first, last, or only child), just
remove the border and radius in a specific direction when the button is
`:not(:first-child)` and/or `:not(:last-child)`.
This properly handles the style of linked buttons in all positions
-- middle, first, last, and only child.
Fixes #1294
2019-04-09 02:27:41 +09:00
Matthias Clasen
e6631a7b66
Merge branch 'wip/cellrendererpixbuf-fallbacks' into 'master'
...
cellrendererpixbuf: Use fallback icons with icon-name
Closes #1809
See merge request GNOME/gtk!728
2019-04-08 15:09:40 +00:00
Iain Lane
fbe0e32813
cellrendererpixbuf: Use fallback icons with icon-name
...
This gives us a better chance of finding an icon to show.
Closes : #1809
2019-04-08 15:05:51 +01:00
Matthias Clasen
2594593de2
Merge branch 'pick-insensitive2' into 'master'
...
Make picking insensitive widgets work again
Closes #1816 and #51
See merge request GNOME/gtk!727
2019-04-08 12:59:06 +00:00
Matthias Clasen
ef982b7d46
Rename things
...
Rename the can-pick property to can-target,
and redo the pick flags with more descriptive names.
2019-04-08 08:42:25 -04:00
Ask Hjorth Larsen
0432b850c5
Updated Danish translation of gtk
2019-04-08 00:04:13 +02:00
Matthias Clasen
1b362d1f01
Keep a drawable check in gtk_widget_contains
...
If the widget is not drawable, it probably doesn't have
an allocation, so asking the question does not make much
sense.
2019-04-07 20:34:12 +00:00
Matthias Clasen
7ce968f297
Document GtkPickFlags
2019-04-07 17:27:58 +00:00
Matthias Clasen
0e15b4a367
inspector: Allow picking insensitive widgets again
...
Use the new argument to gtk_widget_pick to allow picking
insensitive widgets.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/51
2019-04-07 17:23:17 +00:00
Matthias Clasen
de0942b0b8
tooltip: Allow tooltips on insensitive widgets again
...
Use the new argument to gtk_widget_pick to allow picking
insensitive widgets.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1816
2019-04-07 17:23:06 +00:00
Matthias Clasen
b804235aea
Add a flags argument to gtk_widget_pick
...
This will be used to let the inspector and other users
pick insensitive widgets again. For now, update all
callers to pass no flags, preserving the current
behavior.
2019-04-07 17:19:09 +00:00
Matthias Clasen
6bc32a3d5d
widget: Drop the pick vfunc
...
The way to influence picking is to implement contains,
we no longer use the pick vfunc.
2019-04-07 17:00:51 +00:00
Matthias Clasen
5e24454764
window: Stop implementing pick
...
Treat popovers as a special-case for now.
2019-04-07 16:11:20 +00:00
Matthias Clasen
d9cf0ff684
paned: Drop the pick vfunc
...
Implement contains on the handle, instead of pick on the paned.
2019-04-07 16:03:27 +00:00
Matthias Clasen
5b78a3048f
gizmo: Add a contains_func
...
Let GtkGizmo override the contains() implementation.
Update all callers to pass NULL for the contains_func.
2019-04-07 15:47:24 +00:00
Matthias Clasen
676ac380cd
widget: Make contains just be about position
...
Leave out reactiveness considerations here,
pick will handle those.
2019-04-07 15:18:37 +00:00
Matthias Clasen
dce2c58799
widget: Make contains respect rounded borders
...
We have the api for this now.
2019-04-07 15:18:37 +00:00
Matthias Clasen
f3d1666394
Merge branch 'treeview-expander-fix' into 'master'
...
treeview: Make expanders work again
Closes #1814
See merge request GNOME/gtk!725
2019-04-07 15:16:23 +00:00
Matthias Clasen
8af0782261
treeview: Make expanders work again
...
These were broken by the crossing event unification.
We are now generating some more crossing events, and
the treeview was not looking closely enough at the
ones it gets.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1814
2019-04-07 12:16:20 +00:00
Matthias Clasen
df18223487
NEWS: More details about transforms
2019-04-06 23:42:01 +00:00
Matthias Clasen
b678d12c2d
Merge branch 'inspector-work' into 'master'
...
Inspector work
See merge request GNOME/gtk!724
2019-04-06 23:14:01 +00:00
Matthias Clasen
a0e6353667
inspector: Disable autoloaded custom css initially
...
This is a safeguard against possible crashing css
being autoloaded.
2019-04-06 23:08:10 +00:00
Matthias Clasen
bea7ccb41f
widget: Propagate display changes to the style context
...
When a root is set on a widget, the style context may
already exist. We need to make sure that the style context
has the right display set.
This was showing up as "css spillover" in the inspector.
Closes: #https://gitlab.gnome.org/GNOME/gtk/issues/1817
2019-04-06 23:03:25 +00:00
Matthias Clasen
9895f2bd3a
Merge branch 'inspector-fixes' into 'master'
...
Inspector fixes
See merge request GNOME/gtk!723
2019-04-06 22:09:23 +00:00
Matthias Clasen
721a12826d
inspector: Warn if using the default display
2019-04-06 18:19:40 +00:00
Matthias Clasen
4b40cc27a9
inspector: Autosave css
...
Save and restore the contents of the css editor in a file.
2019-04-06 18:00:09 +00:00
Matthias Clasen
c92e53622f
inspector: Rearrange settings a bit
...
Keep only the software gl setting for GL, and put it together
with the simulate touchscreen setting in a 'misc' box. This
keeps all the 'show' options nicely grouped.
2019-04-06 17:39:00 +00:00
Matthias Clasen
c31185b419
inspector: Clean up on finalize
...
Just a matter of cleanliness.
2019-04-06 16:53:35 +00:00
Matthias Clasen
5ff59c12b0
inspector: Fix a copy-paste error
...
We were stuffing the layout overlay into the updates_overlay
field, leaving the layout_overlay field unused.
2019-04-06 16:53:35 +00:00
Matthias Clasen
d3c0899000
gdk: Fix an indentation mishap
...
Commit f1d61d5515
inadvertedly
destroyed indentation in most of gdksurface.c. Fix this.
2019-04-06 16:48:52 +00:00
Piotr Drąg
32334b2e83
Update Polish translation
2019-04-06 16:45:45 +02:00
Matthias Clasen
ea527812a0
HighContrast: fix focus
...
We don't want to render focus rectangles on everything. With
the way focus is propagated nowadays, the theme has to selectively
render focus on certain widgets.
At the same time, we always want to render focus for this
theme, so use the focus pseudoclass, not focus(visible).
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1815
2019-04-06 13:19:29 +00:00
Matthias Clasen
01851e04fc
combo box: Remove leftovers in the header
...
These functions no longer exist and should not be in
the headers anymore.
2019-04-06 12:09:37 +00:00
Matthias Clasen
299c53201d
Updates for 3.96
2019-04-05 22:05:49 -04:00
Matthias Clasen
bfb5e6e72f
widget: Remove some leftover child-property code
2019-04-05 20:52:29 -04:00
Matthias Clasen
1fab3d9e20
builder-tool: Handle layout properties gracefully
...
If there are already layout properties in the ui
file, we shouldn't crash, even if --3to4 is given.
2019-04-05 20:52:29 -04:00
Matthias Clasen
f950172731
Remove a few stray <packing/> elements
...
These were leftovers from an earlier conversion
that did not properly strip empty elements.
2019-04-05 20:52:29 -04:00
Matthias Clasen
9c9b4e6832
Merge branch 'menushell-bandaid' into 'master'
...
Make menu activation work again
Closes #1796
See merge request GNOME/gtk!721
2019-04-06 00:40:54 +00:00
Matthias Clasen
2deb0e7e1d
Make menu activation work again
...
After we stopped untranslatable delivering events, menus stopped
working 'the second time'. After some painful debugging, it appears
that this is caused by the menushell code deliberately grabbing
on the menubar *after* grabbing on the menu, causing events to
be deleivered to the wrong toplevel. This did not use to matter,
but now we drop these events.
Absent a more thorough rewrite of menus, just don't grab on
the menubar. This makes menu activation work again and does not
appear to have ill effects, on either Wayland or X.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1796
2019-04-06 00:20:21 +00:00
Emmanuele Bassi
6f6ea51290
Merge branch 'wip/ebassi/ci-junit-report' into 'master'
...
ci: Add JUnit report for the test suite
See merge request GNOME/gtk!718
2019-04-05 20:01:06 +00:00
Matthias Clasen
11428fb869
Merge branch 'gtk-4-file-containers-in-sidebar' into 'master'
...
gtkplacessidebar: Add loop devices
See merge request GNOME/gtk!289
2019-04-05 19:58:56 +00:00
segfault3
d465523f65
gtkplacessidebar: Add loop devices
2019-04-05 19:58:56 +00:00
Matthias Clasen
14d97cf547
Merge branch 'inspector-layout' into 'master'
...
Show layout children in the inspector
See merge request GNOME/gtk!720
2019-04-05 19:57:32 +00:00
Matthias Clasen
cb3d61bb0e
inspector: Avoid a critical
...
If a layout manager does not have layout children,
quietly hide the layout page.
2019-04-05 19:44:16 +00:00
Emmanuele Bassi
f756c3b8a0
ci: Add manual jobs for Flatpak bundles
...
Bundles can be useful on branches and MRs as an opt-in.
2019-04-05 20:29:16 +01:00
Emmanuele Bassi
220c516691
ci: Call the report script on failure as well
...
GitLab's CI will bail out at the first failure, which means the
JSON-to-JUnit conversion script won't run unless it's part of the same
script that we run for building an testing.
2019-04-05 20:29:16 +01:00
Emmanuele Bassi
ba07279c95
ci: Add JUnit report for the test suite
...
We can convert the JSON output for `meson test` into a JUnix XML report,
which can be consumed by GitLab.
2019-04-05 20:29:16 +01:00
Matthias Clasen
ef9dc43474
Show layout children in the inspector
2019-04-05 19:15:55 +00:00
Matthias Clasen
c6aa90f176
Merge branch 'child-props-followup' into 'master'
...
Child props followup
See merge request GNOME/gtk!719
2019-04-05 19:01:21 +00:00
Matthias Clasen
74352e0bee
buildable: Remove a mention of <packing>
...
This is no longer a supported element in ui files.
2019-04-05 14:41:46 -04:00
Matthias Clasen
5c8a870510
print dialog: Rewrite example
...
The ui file example was still using GTK3 syntax
for GtkNotebooks.
2019-04-05 14:41:46 -04:00
Matthias Clasen
7a29462ca6
Fix the inspector
...
One of the inspector ui files was still using
child properties.
2019-04-05 14:41:46 -04:00
Piotr Drąg
c3c36d45e5
Update POTFILES.in
2019-04-05 19:56:06 +02:00
Matthias Clasen
d89df8a980
Merge branch 'child-properties-be-gone' into 'master'
...
Child properties be gone
See merge request GNOME/gtk!715
2019-04-05 12:27:24 +00:00
Matthias Clasen
7699b43ffe
testsuite: Remove packing property tests
...
These test files were for checking that
GtkBuilder parses <packing> properly.
We no longer support <packing>, so these
can go.
2019-04-05 12:01:43 +00:00
Matthias Clasen
ea7a43beb4
container: Reduce boilerplate
...
We no longer need to hand-roll the type registration,
since we no longer install our own param spec pool.
2019-04-05 12:01:43 +00:00
Matthias Clasen
70bf6d4b97
Drop child property related apis
...
We no longer have any child properties in
our containers, so drop the infrastructure for it.
2019-04-05 12:01:43 +00:00
Matthias Clasen
7cd9ea497b
builder-tool: Stop using child properties
2019-04-05 12:01:43 +00:00
Matthias Clasen
0a4a7b310d
testgtk: Stop using child properties
2019-04-05 12:01:43 +00:00
Matthias Clasen
a26f400576
paned: Stop using child properties
2019-04-05 12:01:43 +00:00
Matthias Clasen
a97845c380
notebook: Stop using child properties
2019-04-05 12:01:43 +00:00
Matthias Clasen
7f6213291d
gtk-demo: Stop using child properties
2019-04-05 12:01:43 +00:00
Matthias Clasen
f184393f07
Remove testactionbar
...
This test relies on child properties.
2019-04-05 12:01:43 +00:00
Matthias Clasen
1f37600c4c
Remove testtitlebar
...
This test relies on child properties.
2019-04-05 12:01:43 +00:00
Matthias Clasen
08d8f2bb80
print dialog: Stop using gtk_container_child_get
...
The grid does not have child properties anymore.
2019-04-05 12:01:43 +00:00
Matthias Clasen
b14f0b8987
grid: Annotate out args as optional
...
They are optional, so annotate them as such.
2019-04-05 12:01:43 +00:00
Matthias Clasen
edbc99104f
searchbar: Fix a compiler warning
2019-04-05 05:10:33 +00:00
Matthias Clasen
285293ac17
file chooser: Fix some compiler warnings
2019-04-05 05:10:26 +00:00
Matthias Clasen
6f7d9f9613
A round of + removal
...
change GTK+ to GTK throughout gtkmain.c.
2019-04-05 05:07:32 +00:00
Matthias Clasen
fe822a0a24
builder-tool: Don't empty out <mark> elements
...
We were inadvertedly losing the content of <mark>
elements. Fix this, by marking (!) them as pcdata
elements.
2019-04-05 03:05:08 +00:00
Matthias Clasen
69d4081ff8
Merge branch 'wip/ebassi/grid-layout' into 'master'
...
Implement GtkGridLayout
See merge request GNOME/gtk!714
2019-04-05 02:42:55 +00:00
Emmanuele Bassi
c9d8ff21d2
testsuite/css: Change the active RadioButton
...
The `buttons` test for CSS nodes sets the second RadioButton as the
active one, whereas the first RadioButton is not set as active.
Nevertheless, the reference output says that the first radio button
should match the `:checked` selector, whereas the second radio button
should not.
The fact that the test currently passes is a mystery.
2019-04-05 01:42:37 +01:00
Emmanuele Bassi
824743a395
testsuite/css: Update UI files
...
Run the UI files through `gtk-builder-tool simplify --3to4` to update
the layout properties.
2019-04-05 01:01:40 +01:00
Emmanuele Bassi
5d778175ee
testsuite/reftests: Update UI files
...
Run the UI files through `gtk-builder-tool simplify --3to4` to update
the layout properties.
2019-04-05 00:33:12 +01:00
Emmanuele Bassi
358ad227d5
testsuite/a11y: Update GtkGrid definitions in UI files
2019-04-05 00:24:49 +01:00
Emmanuele Bassi
9700543e02
tests: Update GtkGrid definitions in UI files
2019-04-05 00:20:45 +01:00
Emmanuele Bassi
ecc4c4f368
examples: Update GtkGrid definitions in UI files
2019-04-05 00:15:51 +01:00
Emmanuele Bassi
31b65e6721
demos: Update GtkGrid definitions in UI files
2019-04-05 00:12:26 +01:00
Emmanuele Bassi
cfcca335b1
Update GtkGrid definitions in GtkBuilder files
...
Convert packing properties to layout ones.
2019-04-05 00:08:18 +01:00
Emmanuele Bassi
3ea39210cd
builder-tool: Convert GtkGrid child properties
2019-04-05 00:04:14 +01:00
Emmanuele Bassi
b79220ca19
tests: Update the GtkGrid suite
...
We don't use child properties any more.
2019-04-04 22:43:07 +01:00
Emmanuele Bassi
faafd23225
Add convenience function for querying a child of GtkGrid
...
Getting the layout manager instance out of GtkGrid, and then querying
all layout properties can be tedious, especially for code that was
usually calling gtk_container_child_get().
To replace that, we can add a simple query function that returns the two
attach points and the spans.
2019-04-04 22:41:19 +01:00
Emmanuele Bassi
62acb80671
Port GtkGrid to use GtkGridLayout
2019-04-04 22:41:03 +01:00
Marek Kašík
cf6f9ad4cf
Merge branch 'master' into 'master'
...
Print dialog, CUPS: Check unknown option values whether they are actually custom settings
See merge request GNOME/gtk!434
2019-04-04 16:39:18 +00:00
Till Kamppeter
c6ea37144c
print: Check unknown option values whether they are actually custom settings
...
Additional code improvements and fixes:
- Use g_regex_match_simple() instead of sscanf()
- Added spaces between function names and left parantheses
- Set always correct custom page size
- Added page_setup field to CupsOptionsData data structure
- Replaced tab indentions by spaces
- Moved #define out of add_cups_options() function, removed line breaks from regular expressions
2019-04-04 16:39:18 +00:00
Emmanuele Bassi
89c1a66403
docs: Add missing layout managers to the API reference
2019-04-04 16:43:06 +01:00
Emmanuele Bassi
c4c897f921
Document GtkGridLayout
...
Add missing stanzas for properties and accessor functions.
2019-04-04 16:31:56 +01:00
Piotr Drąg
0d4ad02353
Update POTFILES.in and POTFILES.skip
2019-04-04 13:25:03 +02:00
Matthias Clasen
d21546d79b
Merge branch 'custom-surface' into 'master'
...
Drop gdk_wayland_surface_set_use_custom_surface
Closes #1806
See merge request GNOME/gtk!713
2019-04-03 23:38:55 +00:00
Matthias Clasen
624c30ecd2
Drop gdk_wayland_surface_set_use_custom_surface
...
This is unused in GTK, and it does not seem useful
enough to keep around.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1806
2019-04-03 23:23:24 +00:00
Matthias Clasen
25abd88fc4
Merge branch 'zbrown/type-info' into 'master'
...
inspector: Type info for misc pane
See merge request GNOME/gtk!712
2019-04-03 23:14:38 +00:00
Zander Brown
e493b9b702
inspector: Type info for misc pane
...
Replaces the class hierarchy page with a button/popover on the misc page
2019-04-03 23:50:24 +01:00
Emmanuele Bassi
6e0f1800c8
Add GtkGridLayout
...
Layout manager for grid-like widgets.
2019-04-03 19:03:58 +01:00
Piotr Drąg
528f1f085e
Update POTFILES.in
2019-04-03 19:03:36 +02:00
Matthias Clasen
09cd6e3b5f
Fix teststack
...
This testcase wasn't updated to new GtkStack apis.
2019-04-03 15:10:10 +00:00
Matthias Clasen
2cc30f75a0
Merge branch 'wip/carlosg/drop-search-handle-event' into 'master'
...
Search improvements
See merge request GNOME/gtk!710
2019-04-03 13:28:58 +00:00
Matthias Clasen
222805d580
Merge branch 'wip/carlosg/paned-cursor' into 'master'
...
paned: Set cursor on gizmo widget
See merge request GNOME/gtk!711
2019-04-03 13:12:01 +00:00
Matthias Clasen
56b42a2ee9
Merge branch 'patch-1' into 'master'
...
Update zh_CN.po
See merge request GNOME/gtk!709
2019-04-03 12:16:01 +00:00
Carlos Garnacho
c9839b2069
paned: Set cursor on gizmo widget
...
We may avoid setting it on the paned widget depending on the pointer
position altogether, since the handle is now a widget. Also is more
likely to be correct as the implicitly grabbed widget will probably
be that one.
Fixes the paned losing the resize cursor after button press.
2019-04-03 13:26:40 +02:00
Carlos Garnacho
b842bf7bf5
gtk: Drop gtk_search_[entry|bar]_handle_event()
...
This is now unused, and unrecommended.
2019-04-03 13:23:34 +02:00
Carlos Garnacho
edccf89020
icon-browser: Drop usage of gtk_search_bar_handle_event()
...
Make it capture key events from the toplevel.
2019-04-03 13:23:34 +02:00
Carlos Garnacho
1825aa377b
shortcutswindow: Drop usage of gtk_search_bar_handle_event()
...
Make it capture key events from the toplevel.
2019-04-03 13:23:34 +02:00
Carlos Garnacho
e59c6abd91
filechooserwidget: Drop usage of gtk_search_entry_handle_event()
...
Just use gtk_event_controller_key_forward() to let know the search
entry of the Esc key being pressed.
2019-04-03 13:23:34 +02:00
Carlos Garnacho
dc88a1ebc4
inspector: Fix prop-list search
...
Instead of handle_event(), use set_key_capture_widget().
Also, use the fact that we now propagate key events throughout the
stage, and connect to the GtkInspectorPropList instead of the toplevel.
We only want the search bar to be active while that widget is mapped
and able to receive events.
And also, handle the "search bar" visibility on ::search-started.
2019-04-03 13:23:34 +02:00
aerowolf
165a21f4bc
Update zh_CN.po
2019-04-03 11:22:55 +00:00
Carlos Garnacho
9cb9843367
searchentry: Add ::search-started signal
...
Users of search entries usually handled visibility (when initially hidden)
by checking the return value of gtk_search_entry_handle_event(). This does
not pan out with gtk_search_entry_set_key_capture_widget() since the return
value is not directly seen by the caller.
Add a ::search-started signal to cater for it, which gets emitted when the
search entry went from empty to non-empty.
2019-04-03 13:08:53 +02:00
Carlos Garnacho
95754aa71f
treeview: Fix variable typo
...
We actually want search_entry there, not search_window which is the
O-R window in the non-custom case.
2019-04-03 13:07:06 +02:00
Emmanuele Bassi
f559de112b
docs: Fix typo in the migration guide
2019-04-03 11:27:18 +01:00
Matthias Clasen
9d1f348129
Merge branch 'inspector-tweaks' into 'master'
...
Inspector tweaks
See merge request GNOME/gtk!707
2019-04-02 23:51:22 +00:00
Matthias Clasen
cf3aa570c2
inspector: Rename a few pages
...
"Global" and "Visual" are not very good names for
the content of these pages. Rename them to
"Information and "Settings".
2019-04-02 23:36:45 +00:00
Matthias Clasen
7c2ce72b5f
inspector: Manage visibility of stack pages
...
The hand-rolled stack combo we were using before
was looking at the visibility of the page itself
to show or hide items. Other stack switchers
expect us to use the GtkStackPage::visible
property for this.
2019-04-02 23:36:45 +00:00
Matthias Clasen
5371055495
inspector: Redo the object page switcher
...
The combobox for page switching was not very good.
Instead, do a sidebar that can be hidden.
2019-04-02 23:29:22 +00:00
Matthias Clasen
4d6acd5d76
inspector: Drop the child property page
...
Child properties are on the way out.
2019-04-02 23:08:17 +00:00
Matthias Clasen
285e67c044
inspector: Drop the class hierarchy page
...
This was just not useful enough to keep around.
2019-04-02 21:50:09 +00:00
Matthias Clasen
d7987e73c9
inspector: Drop the css selector page
...
This was just not useful enough to keep around.
2019-04-02 21:47:02 +00:00
Matthias Clasen
e13a8102b4
inspector: Drop the signals page
...
This was just not useful enough to keep around.
2019-04-02 21:39:47 +00:00
Matthias Clasen
e720006110
gtk-demo: Don't expand tabs
...
It is a little irritating to see super-wide
tabs in demos which have just one extra file,
such as "Fixed layout".
2019-04-02 21:32:14 +00:00
Matthias Clasen
12c4766dd0
inspector: Properly clean up
...
I got a crash in inspector code when I hit
cancel in the confirmation dialog for it.
2019-04-02 21:21:46 +00:00
Emmanuele Bassi
df19224b20
Update gtk-doc types file for GTK 4
...
We're missing newly added types, and listing removed ones.
2019-04-02 21:43:34 +01:00
Matthias Clasen
167208c811
Merge branch 'wip/ebassi/fixed-demo' into 'master'
...
Add GtkFixed demo
See merge request GNOME/gtk!706
2019-04-02 20:07:16 +00:00
Benjamin Otte
0187e91843
Merge branch 'file-conflict2' into 'master'
...
Rename all settings schemas to avoid conflict
See merge request GNOME/gtk!705
2019-04-02 20:05:12 +00:00
Emmanuele Bassi
c70c677b5a
Add GtkFixed demo
...
This demo has everything:
- a GtkFixed inside another GtkFixed
- a cube made out of GtkFrame widgets
- an example of 3D transformations
And what's there, in the window once I launch it? The GTK logo made of
widgets.
2019-04-02 20:52:49 +01:00
Matthias Clasen
5c31c721af
Rename all settings schemas to avoid conflict
...
Rename all our settings schemas to the org.gtk.gtk4
prefix to avoid conflicting with the gtk3 schemas.
2019-04-02 19:27:34 +00:00
Matthias Clasen
7a08177a3d
Merge branch 'async-api' into 'master'
...
Small async api fixes
See merge request GNOME/gtk!701
2019-04-02 15:45:30 +00:00
Matthias Clasen
ad4142df19
Merge branch 'adwaita-selected-row-switch-fix-master' into 'master'
...
Adwaita: Fix switch slider border on selected row
Closes #1802
See merge request GNOME/gtk!704
2019-04-02 15:33:24 +00:00
Matthias Clasen
ff4d61c087
Merge branch 'wip/ebassi/fixed-layout-v2' into 'master'
...
Drop GtkLayout and improve GtkFixed
See merge request GNOME/gtk!702
2019-04-02 15:27:25 +00:00
Alex Monday
fabef39f7f
Adwaita: Fix switch slider border on selected row
...
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1802
2019-04-02 20:18:26 +05:00
Matthias Clasen
64fd5158bf
gdk: Change some async dnd api
...
The pattern we generally follow is to put the
async result right after the source object, in
finish functions. Do this for gdk_drop_read_finish.
2019-04-02 15:11:06 +00:00
Matthias Clasen
8e4e4401c5
gdk: Change some async clipboard api
...
The pattern we generally follow is to put the
async result right after the source object, in
finish functions. Do this for gdk_clipboard_read_finish.
2019-04-02 15:10:53 +00:00
Emmanuele Bassi
167f49caf7
docs: Mention GtkLayout's removal in the migration guide
2019-04-02 16:00:05 +01:00
Emmanuele Bassi
6e7748b266
Add API to access child transformations to GtkFixed
...
This is mostly convenience API around GtkFixedLayoutChild, but it should
push people towards using transformations with GtkFixed instead of just
using fixed positioning.
2019-04-02 15:48:46 +01:00
Emmanuele Bassi
447dfc029f
Remove GtkLayout
...
The need of a specialised fixed layout container that can be placed into
a GtkScrolledWindow ceased to exist once GtkScrolledWindow gained the
ability to automatically interpose a GtkViewport when adding a child
that does not implement GtkScrollable.
All the other justifications that led to the existence of GtkLayout as a
separate widget from GtkFixed have been largely made irrelevant in the
20 years since its inception.
2019-04-02 15:29:20 +01:00
Emmanuele Bassi
aed70a82c7
Add overflow:hidden to GtkFixed
...
This allows GtkFixed to clip children that are outside its allocation.
2019-04-02 15:14:53 +01:00
Matthias Clasen
5b6031f7e4
Merge branch 'appnames' into 'master'
...
Rename apps for uniqueness
See merge request GNOME/gtk!699
2019-04-02 00:54:11 +00:00
Matthias Clasen
e54e72b290
Add a flatpak manifest for org.gtk.IconBrowser4
...
And build it in ci.
2019-04-02 00:33:05 +00:00
Matthias Clasen
e5ea6cfcb5
flatpaks: Drop dconf permissions
...
We are building against the 3.32 sdk, which has
a new-enough glib to default to the keyfile
settings backend.
Also, use fallback-x11, so we prefer Wayland.
2019-04-02 00:30:16 +00:00
Matthias Clasen
998c1f83a6
icon-browser: Rename to org.gtk.IconBrowser4
2019-04-02 00:27:33 +00:00
Matthias Clasen
41bb875221
widget-factory: Rename to org.gtk.WidgetFactory4
2019-04-02 00:27:33 +00:00
Matthias Clasen
365400c13e
gtk-demo: Rename to org.gtk.Demo4
2019-04-02 00:27:32 +00:00
Matthias Clasen
e2fcca4e60
Rename debug settings to org.gtk.Settings.Debug4
...
This gives us the freedom to make changes without
interfering with GTK3.
2019-04-02 00:27:32 +00:00
Matthias Clasen
0189b0c903
post-install: Use gtk4-update-icon-cache
...
I was building GTK in a minimal container without
GTK3 installed, and this caused install to fail.
We should use the tool that we just installed.
2019-04-02 00:27:32 +00:00
Emmanuele Bassi
aacab81a3e
Fix location on renamed files
...
Commit 4152e14e32
renamed a bunch of
files, but did not fix the meson.build file that referenced them.
2019-04-01 13:52:27 +01:00
Matthias Clasen
4152e14e32
Namespace some auxiliary files
...
We install a few helper files for the ui file
format. Namespace these, to avoid conflict with
the same files in GTK3.
2019-04-01 08:30:39 -04:00
Matthias Clasen
57b3cd56d7
Drop gtkbuilder.rnc
...
This is just a leftover file in git.
2019-04-01 08:29:24 -04:00
Chun-wei Fan
7a45768efe
gdkglcontext-win32.c: Fix Resizing and moving
...
We preiously did not apply the resizes and moves as they were previously
only done in the Cairo drawing context on Win32. Fix this by applying
this too in the GL drawing context.
2019-04-01 14:51:29 +08:00
Chun-wei Fan
3a56da60dd
gdk/win32/gdkcairocontext-win32.c: Make functions shared in backend
...
Make gdk_win32_surface_get_queued_window_rect() and
gdk_win32_surface_apply_queued_move_resize() not static functions, as we
want to use them in gdkglcontext-win32.c, to fix resizing and moving.
2019-04-01 14:51:13 +08:00
Chun-wei Fan
896104939b
gdksurface-win32.c: Acquire root coordinates on drag/move
...
As in commit d45996c
, the x and y coordinates passed into begin_drag and
begin_move are no longer root coordinates but are now surface
coordinates.
Use the x and y surface coordinates to acquire the root x and y
coordinates so that resizing and moving can work as expected.
2019-04-01 14:22:38 +08:00
Matthias Clasen
19f4fce931
Merge branch 'reftests.fixes.msvc' into 'master'
...
test/reftests: Fix build on Visual Studio
See merge request GNOME/gtk!692
2019-04-01 05:42:05 +00:00
Matthias Clasen
19d9d69343
icon-browser: Fix name alignment
...
The icon names were left-aligned, not centered
under the icon.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/18
2019-04-01 00:27:58 -04:00
Chun-wei Fan
68af572ba4
test/reftests: Fix build on Visual Studio
...
As we are building the gtkreftestprivate and reftest test libraries as
DLLs, we need to export the symbols in there so that things will link.
Decorate the symbols with G_MODULE_EXPORT for this purpose.
2019-04-01 12:14:45 +08:00
Matthias Clasen
0eb837e4ca
docs: Remove mention of passwords from broadwayd(1)
...
This functionality does not exist.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1697
2019-04-01 00:11:31 -04:00
Matthias Clasen
5b5a68c5db
Fix filechooser search
...
This makes the search entry show up again
when I type. There is still some misbehavior
where the entry loses focus again, and Escape
does not work to exit search.
2019-03-31 23:06:42 -04:00
Matthias Clasen
d2e0553384
Fix menuitem hover
...
We need to pay attention to details
of enter and leave events.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1795
2019-03-31 21:53:55 -04:00
Matthias Clasen
c2c4133eb0
Fix up the border/background-color removal
...
I overlooked one level of indirection here. Oops.
2019-03-31 20:43:19 -04:00
Matthias Clasen
058986714c
tooltips: Don't use a cursor_size of 0
...
This leads to flickering tooltips.
2019-03-31 16:17:08 -04:00
Matthias Clasen
91bbce3fef
Merge branch 'deprecations' into 'master'
...
Drop deprecated style context apis
See merge request GNOME/gtk!691
2019-03-31 19:56:05 +00:00
Matthias Clasen
0230cc55bc
Drop deprecated style context api
2019-03-31 15:35:20 -04:00
Matthias Clasen
6f5675ef3c
Stop using deprecated style context api
...
Use the non-deprecated one it wraps, instead.
Yes, this is cheating...
2019-03-31 15:35:20 -04:00
Matthias Clasen
396513183b
Merge branch 'fix-event-forwarding' into 'master'
...
Trigger bindings when forwarding key events
Closes #1793
See merge request GNOME/gtk!690
2019-03-31 18:27:24 +00:00
Benjamin Otte
720fd2cd40
textview: Fix comparison thinko
...
Apparently, we have no test that checks for actually drawing text, so
the thinko that caused all text to disappear in
4b07d28153
went unnoticed.
2019-03-31 20:22:05 +02:00
Matthias Clasen
da7cd6ae25
Trigger bindings when forwarding key events
...
This broke backspace handling in entries when an entry
completion is present.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1793
2019-03-31 14:04:35 -04:00
Matthias Clasen
8bae5348f9
text: Handle 'inverted' selections
...
We must handle selection_bound > cursor in
various places. This was lost in the big
entry refactoring.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1792
2019-03-31 12:36:09 -04:00
Timm Bäder
fb4ffa468c
build: Don't use 'continue'
...
It does not exist in meson 0.48 apparently.
2019-03-31 06:37:10 +02:00
Timm Bäder
0245ac2106
gl renderer: Apply transform only for final texture drawing
...
We don't want the new transform while drawing things on a texture.
Instead, only apply the new transform matrix when adding the final
texture drawing ops.
This fixes the stack cube rotation transition to at least look somewhat
better.
2019-03-31 06:16:16 +02:00
Timm Bäder
b2089b89cc
gl renderer: Add debug code to dump framebuffer
...
This way we can specify it on specific add_offscreen_ops callsites.
2019-03-31 06:14:41 +02:00
Mohammed Sadiq
56a88f107c
mediastream: fix documentation
2019-03-31 08:37:45 +05:30
Daniel Boles
96bf90abe4
Widget: Don't refer to the old get_preferred_*()
...
measure() replaced get_preferred_height() and get_preferred_width().
2019-03-30 19:47:50 +00:00
Piotr Drąg
081210688c
Update Polish translation
2019-03-30 14:54:20 +01:00
Piotr Drąg
fcde8aa94f
Update POTFILES.in
2019-03-30 14:39:18 +01:00
Matthias Clasen
bcac81eed9
Merge branch 'wip/ebassi/align-test' into 'master'
...
Remove aligned allocation checks
See merge request GNOME/gtk!596
2019-03-29 22:50:10 +00:00
Matthias Clasen
0c7e7184e7
Merge branch 'remove-deprecations' into 'master'
...
Remove gdk_device_grab/ungrab from public api
See merge request GNOME/gtk!682
2019-03-29 16:23:53 +00:00
Matthias Clasen
1e372f57f9
Don't mark GDK_SURFACE_STATE_TILED as deprecated
...
I've come to the conclusion that we should keep
this state, since not all backends support per-edge
information. Updated the docs to explain how the
tiled state relates to the per-edge states.
2019-03-29 11:55:58 -04:00
Matthias Clasen
1ea1decfd6
Add a missing include
2019-03-29 11:55:42 -04:00
Matthias Clasen
04dfbf7513
Remove gdk_device_grab/ungrab from public api
...
They are still used internally in gdk, but we no
longer offer them as public api.
2019-03-29 11:31:13 -04:00
Matthias Clasen
f273eca7e3
revealer: Add a missing break
...
This was showing up as the slide-down transition
being broken.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1790
2019-03-29 10:57:51 -04:00
Matthias Clasen
53a28f7672
testrevealer: Cover the new transitions
...
Add tests for all the swing transitions.
2019-03-29 10:54:45 -04:00
Emmanuele Bassi
5261bc6585
Merge branch 'build-warning' into 'master'
...
build: Do not use `install` argument for configure_file()
See merge request GNOME/gtk!681
2019-03-29 14:47:28 +00:00
Emmanuele Bassi
ba3a502079
build: Do not use install
argument for configure_file()
...
The `install` argument for configure_file() was introduced in Meson
0.50, and was ignored in earlier versions.
Since we're still using Meson 0.48 as a baseline, and since it doesn't
cost us nothing to use a conditional in the only place where we used the
`install` argument, let's drop it. This avoids a warning in newer
releases of Meson.
2019-03-29 14:30:57 +00:00
Alexander Larsson
7c369f309a
Merge branch 'wip/alexl/broadway7' into 'master'
...
Even more broadway updates
See merge request GNOME/gtk!680
2019-03-29 14:28:29 +00:00
Matthias Clasen
50906baee1
Merge branch 'cube-spin' into 'master'
...
stack: Add a cube spin transition
See merge request GNOME/gtk!679
2019-03-29 14:23:45 +00:00
Benjamin Otte
9d0a42dc14
stack: Add a cube spin transition
...
Add a transition to GtkStack that pretends pages
are the sides or a cube, and switch them by
rotating the cube.
Use this transition in widget-factory.
2019-03-29 10:03:18 -04:00
Alexander Larsson
5bc8f8826f
broadway: Optionally support data: uris instead of blobs
...
This is nice when you want to make a "screenshot" by using save-as.
Its not going to perform as well though, so you have to enable it
by adding ?datauri to the url
2019-03-29 14:30:13 +01:00
Alexander Larsson
4e7eccbb49
broadway: Report some level of frame timings
...
This is not ideal because we report the time of a full roundtrip, rather
than the presentation time, but its better than nothing, and i'm not sure
how the browser time should be reconciled.
2019-03-29 14:30:13 +01:00
Alexander Larsson
27e47d5df6
broadway: Change events and ops enums to straight ints
2019-03-29 14:30:13 +01:00
Alexander Larsson
7002688398
broadway: More multi-display fixes
...
When doing idle flushing, do so per display rather than a global
and some find_display hack.
2019-03-29 14:30:13 +01:00
Alexander Larsson
54167ec3fa
broadway: Add warning for unexpected roundtrip delays
2019-03-29 14:30:13 +01:00
Alexander Larsson
a966fe1ed5
broadway: Keep track of surface owner and only send input to that client
2019-03-29 14:30:13 +01:00
Alexander Larsson
ab801fe782
broadway: Fix handling of input with multiple in-process GdkDisplays
...
We need each instance to only forward input to the right display.
This make the inspector work better.
2019-03-29 14:30:13 +01:00
Alexander Larsson
43778bef4d
broadway: Add minor comment
2019-03-29 14:30:13 +01:00
Alexander Larsson
f1ba94843e
broadway: Move gsk files to a subdirectory
2019-03-29 14:30:13 +01:00
Alexander Larsson
f932d35c95
broadway: Optimize color matrix + texture nodes to pre-colorized texture
2019-03-29 14:30:13 +01:00
Alexander Larsson
b58a366dc6
broadway: Support patching nodes for textures and transforms
2019-03-29 14:30:13 +01:00
Alexander Larsson
f30ba56323
broadway: Reintroduce smarter diffing
...
We now send very minimal diff operations.
2019-03-29 14:30:13 +01:00
Alexander Larsson
4dfe2e6e2f
broadway: Initial restructuring of node tree diffing
...
This goes back to a very naive diff, but that reuses nodes from
previous frames using the node id. This will be a bettter base
to start from.
2019-03-29 14:30:13 +01:00
Alexander Larsson
90c5a5ff6b
broadway: Update broadway_node_type_names
2019-03-29 14:30:13 +01:00
Alexander Larsson
6040a7370c
Broadway: Send configure notify on move/resize too
2019-03-29 14:30:13 +01:00
Alexander Larsson
c8d7b4a79a
broadway: Fix coordinates when drag move/resizeing
...
The x/y passed in are in the surface, not root coords.
2019-03-29 14:30:13 +01:00
Anders Jonsson
ec9be21771
Update Swedish translation
...
(cherry picked from commit 2b768edd43
)
2019-03-29 10:51:19 +00:00
Benjamin Otte
1944ffe351
Revert "Bump meson req to 0.50"
...
This reverts commit f0845d98a2
.
The commit breaks CI. CI has more power than meson telling things.
2019-03-29 10:19:41 +01:00
Benjamin Otte
a8dccef507
build: The private reftest library needs to be shared
...
Otherwise the module and gtk-reftest will each have their own copy and
that'll mean all symbols - and inhibiting the shutdown - will exist
twice. Not good.
2019-03-29 09:56:52 +01:00
Benjamin Otte
90f460c236
reftests: Remove notebook-childproperties test
...
Notebooks have no child properties anymore.
2019-03-29 09:56:52 +01:00
Benjamin Otte
e5e516468a
reftests: Fix textview-tags test
...
The test was timeouting on X11.
I'm still not sure it does what it should do, but at least that
problem's gone.
2019-03-29 09:56:52 +01:00
Benjamin Otte
b88c9439aa
reftests: Fix label-sizing test
...
Set border, padding and margin to 0, not just padding.
2019-03-29 09:56:52 +01:00
Benjamin Otte
95f9c8a5eb
reftests: Remove box-packing test
...
Boxes have no packing flags anymore.
2019-03-29 09:56:52 +01:00
Benjamin Otte
fbc8bb979d
reftests: Fix grid-empty-with-spacing test
...
Widgets are visible by default now, so make sure the ones that should be
invisible are marked as such.
2019-03-29 09:56:52 +01:00
Benjamin Otte
e861b0d6c1
reftests: Fix grid-spacing2 test
...
The expand flag needs to be set on widgets when previously it was a
packing property.
2019-03-29 09:56:52 +01:00
Benjamin Otte
7918eaf677
picture: Don't cause warnings on load failures
...
When a file set via gtk_picture_set_file() can't be loaded, just
silently don't load it.
Reftest picture-load-invalid-file added for that case.
2019-03-29 09:56:52 +01:00
Benjamin Otte
bf2a93ca0e
reftests: Fix image-load-from-file test
...
- Images are always correctly sized
- Use a GtkPicture for the large file
2019-03-29 09:56:52 +01:00
Benjamin Otte
606aea2302
reftests: Fix iconview-empty test
...
Images have a static size now, use a GtkPicture instead.
2019-03-29 09:56:52 +01:00
Benjamin Otte
b21882bcea
cssimagelinear: Make gradient offsets stay in [0, 1]
...
Fixes linear-gradient reftest
2019-03-29 09:56:52 +01:00
Benjamin Otte
fee8f6b9be
reftests: Fix shorthand-entry-border test
...
We weren't setting CSS back to defaults, so the border highlight
transition would be at different stages when the 2 snapshots happened.
2019-03-29 09:56:52 +01:00
Benjamin Otte
3a8a9fc2bd
reftests: Remove style-properties-nth-child test
...
Style properties don't exist anymore.
2019-03-29 09:56:52 +01:00
Benjamin Otte
866bc13557
reftests: Fix statusbar-remove-all test
2019-03-29 09:56:52 +01:00
Benjamin Otte
d10a73f509
textview: Paint border windows in the right spot
...
Fixes textview-border-windows reftest
2019-03-29 09:56:52 +01:00
Benjamin Otte
3c44f83909
Fix textview-margins reftest
...
Draw something, otherwise the test will timeout
2019-03-29 09:56:52 +01:00
Benjamin Otte
38fbb6856c
headerbar: Duct-tape over the measure mess
...
Fixes various reftests.
The headerbar needs soeone to redo sizing.
2019-03-29 09:56:52 +01:00
Benjamin Otte
9ca5495380
reftests: Fix inherit-and-initial test
...
Run gtk-builder-tool --3to4 over it. As the test cares about the
"initial" and "inherit" CSS keywords, the actual widgets aren't that
important. It's just important to have many of them.
2019-03-29 09:56:52 +01:00
Benjamin Otte
4b07d28153
textlayout: Allow querying empty areas
...
This only happens when the textview has no content, but it does happen
now that such a textview gets allocated 0x0 and not 1x1.
2019-03-29 09:56:52 +01:00
Benjamin Otte
c04190e761
rendernode: Round pixel colors in color matrix drawing
...
Fixes symbolic-icon-translucent-color.ui reftest
2019-03-29 09:56:52 +01:00
Benjamin Otte
822791d8a9
reftests: Remove info-bar-message-types test
...
- The test doesn't properly test infobars. An infobar is not a box.
- Infobar message types aren't styled anymore.
2019-03-29 09:56:52 +01:00
Benjamin Otte
f070872b36
reftests: Fix notebook-tab-position test
...
The tab-fill child property is gone, don't use it.
2019-03-29 09:56:52 +01:00
Benjamin Otte
f3e47ee92e
reftests: Fix icon-style-basics test
...
Add a type-func to the GThemedIcon and GEmeblemedIcon usages so
GtkBuilder finds them.
2019-03-29 09:56:52 +01:00
Benjamin Otte
e612b55bd4
reftests: Fix css-match-name test
...
- Replace GtkImage::pixbuf with GtkImage::paintable
- Use a GtkPicture so the sizing is correct
2019-03-29 09:56:52 +01:00
Benjamin Otte
6d38f1dcb5
reftests: Fix css-match-type test
...
- Replace GtkImage::pixbuf with GtkImage::paintable
- Use a GtkPicture so the sizing is correct
2019-03-29 09:56:52 +01:00
Benjamin Otte
d4df5211f3
reftests: Fix border-image-excess-size.ui test
...
The old reftests drew an opaque image, the new image is transparent.
This test drew the reference image as black and the test as transparent
black, and those are now different.
2019-03-29 09:56:52 +01:00
Benjamin Otte
2e67c2eb8f
reftests: Delete removed tests from testdata
2019-03-29 09:56:52 +01:00
Benjamin Otte
47d4b06eca
reftests: Fix css-currentcolor-alpha.ui test
...
The test did not draw anything, which fails now.
2019-03-29 09:56:52 +01:00
Benjamin Otte
5ddce32e1a
reftests: Fix css-match-class test
...
- Replace GtkImage::pixbuf with GtkImage::paintable
- Use a GtkPicture so the sizing is correct
2019-03-29 09:56:52 +01:00
Benjamin Otte
8846f28369
reftests: Fix background-size-zero test
...
We were drawing nothing, causing a timeout.
2019-03-29 09:56:52 +01:00
Benjamin Otte
62d0bd7153
reftests: Fix nth-child test
...
Box children no longer have a "position" child property.
2019-03-29 09:56:52 +01:00
Benjamin Otte
d5175526f9
reftests: Fix treeview-fixed-height test
...
Convert -gtk-gradient() to linear-gradient in the CSS.
2019-03-29 09:56:52 +01:00
Benjamin Otte
7935f9d3b8
reftests: Actually build a module
...
Reftests are expecting a module called libreftest.so, so don't build a
static libgtkreftest.a but what they expect.
2019-03-29 09:56:52 +01:00
Benjamin Otte
7cc5e51a92
reftests: Fix actionbar test
...
Boxes have no pack-type anymore.
2019-03-29 09:56:52 +01:00
Benjamin Otte
8542ac2c42
reftests: Fix window-height-for-width test
...
The dialog's vbox internal child is now called content_area
2019-03-29 09:56:52 +01:00
Benjamin Otte
b3eddbb45d
reftests: Fix grid-spacing1 test
2019-03-29 09:56:52 +01:00
Benjamin Otte
e3dbf8d524
reftests: Fix unresolvable.ui test
...
- Make sure we draw something
- Don't use -gtk-gradient() but linear-gradient instead
2019-03-29 09:56:52 +01:00
Benjamin Otte
5dd5ff5236
widgetpaintable: Don't emit signals on dispose
2019-03-29 09:56:52 +01:00
Benjamin Otte
d3be32f8ea
reftest: Be more careful about snapshotting
...
Instead of waiting for the first invalidate-contents signal, wait until
we get a render node. This will break spectacularly for reftests not
drawing anything at all, but we just hope that won't happen.
2019-03-29 09:56:52 +01:00
Benjamin Otte
0c81ea2f28
reftests: Make meson run every test separately
...
This way, we don't get an abort once the first test gets a warning.
We also can use meson test to run individual tests.
Unfortunately, only ~60% of tests pass.
2019-03-29 09:56:52 +01:00
Benjamin Otte
c564a349e5
testsuite: Make reftests work again
...
Well, the testrunner works again, the tests don't all succeed.
So exclude them from CI.
2019-03-29 09:56:52 +01:00
Benjamin Otte
42d580dc07
reftests: Remove image-recording-surface test
...
It's no longer possible to set surfaces on a GtkImage, so we don't need
to test that setting a recording surface works.
2019-03-29 09:56:52 +01:00
Chun-wei Fan
4784c5a980
gdk/win32/gdkdrag-win32.c: Include math.h
...
We need that for round().
2019-03-29 16:50:53 +08:00
Chun-wei Fan
6b08227110
meson.build: Pull in fallback for PangoFT2 only when needed
...
On some systems PangoFT2 is optional, so we only use the fallback when
it is being required.
2019-03-29 16:50:35 +08:00
Matthias Clasen
6f470affef
Merge branch 'adwaita-radii-fixes-master' into 'master'
...
Adwaita radii fixes master
See merge request GNOME/gtk!628
2019-03-29 00:51:23 +00:00
Matthias Clasen
c30fc92b3e
builder-tool: Don't strip the xml declaration
...
This is useful for interoperability with other tools.
2019-03-28 19:28:05 -04:00
Matthias Clasen
7222bda146
file chooser entry: Fix a crash
...
The ::focus-out signal signature has changed. Adapt.
2019-03-28 18:55:36 -04:00
Matthias Clasen
eaae9650d9
popover menu: Fix a parameter name mismatch
2019-03-28 18:36:15 -04:00
Matthias Clasen
f20f02c416
overlay: Remove no-longer-existing api from header
2019-03-28 18:36:15 -04:00
Matthias Clasen
94533495aa
gtk: Some documentation cleanups
2019-03-28 18:36:15 -04:00
Matthias Clasen
c9e08efcbf
gsk: Fix up docs a bit
...
Some apis that were either removed or have never
existed were listed for the docs.
2019-03-28 18:36:15 -04:00
Matthias Clasen
e0f9c98e44
gsk: Add GskRoundedRect to the docs
2019-03-28 18:36:15 -04:00
Christoph Reiter
80c26ab904
CI: install meson 0.50
2019-03-28 22:47:18 +01:00
Matthias Clasen
f0845d98a2
Bump meson req to 0.50
...
meson told me to.
2019-03-28 17:35:50 -04:00
Matthias Clasen
121bbcec4b
Merge branch 'overlay-layout' into 'master'
...
overlay: Use a layout manager
See merge request GNOME/gtk!677
2019-03-28 21:07:38 +00:00
Matthias Clasen
700183e5b6
Convert ui files
...
Run gtk4-builder-tool simplify --3to4 over all ui files.
2019-03-28 16:37:21 -04:00
Matthias Clasen
8d993160c2
builder-tool: Small refactoring
...
Introduce a PropKind enum, since the collection of
booleans is getting out of hands.
2019-03-28 16:36:59 -04:00
Matthias Clasen
fc3cae34ec
builder-tool: Convert overlay child properties
2019-03-28 16:36:59 -04:00
Matthias Clasen
866640c0c2
overlay: Use a layout manager
...
This lets us get rid of the child properties,
by converting them to layout properties.
2019-03-28 16:36:59 -04:00
Piotr Drąg
0f7ca7e550
Update POTFILES.in
2019-03-28 18:58:56 +01:00
Matthias Clasen
18d1ea19e0
Merge branch 'layout-child-type' into 'master'
...
Connect LayoutManager to LayoutChild
See merge request GNOME/gtk!678
2019-03-28 17:41:33 +00:00
Emmanuele Bassi
208cae2f05
Do not leak unapplied layout properties
...
If the layout manager does not have a GtkLayoutChild, or if we cannot
apply layout properties, we should free them instead of leaking them.
2019-03-28 17:22:02 +00:00
Emmanuele Bassi
ecba428d52
Add missing handler for <layout> elements in UI files
...
The layout properties sub-parser needs to handle the parent tag.
2019-03-28 17:21:56 +00:00
Emmanuele Bassi
3f0f7c73e0
Connect LayoutManager to LayoutChild
...
If we want to inspect the type of layout properties exposed by a
GtkLayoutManager, we need a way to connect the layout manager type to
the GtkLayoutChild type it creates. In order to do so, we can set the
GtkLayoutChild type on a field of the GtkLayoutManagerClass structure.
Storing the GtkLayoutChild type on the class structure of the layout
manager also allows us to implement a default create_layout_child()
virtual function.
2019-03-28 16:58:00 +00:00
Emmanuele Bassi
3d6a456c85
Add release info to our demo apps
...
The appstream-util check performed by Flatpak on recent GNOME SDKs has
become more stringent, and now it requires a <release> tag in the
AppData XML file. If we don't have it, the Flatpak bundles of gtk-demo
and gtk-widget-factory will fail on our CI infrastructure.
2019-03-28 12:16:53 +00:00
Emmanuele Bassi
65c394dbaa
Document how to define layout manager properties
2019-03-28 11:47:46 +00:00
Matthias Clasen
4d9f4ed14b
Merge branch 'gbsneto/install-header' into 'master'
...
build: Install gtkboxlayout.h
See merge request GNOME/gtk!676
2019-03-28 02:48:03 +00:00
Georges Basile Stavracas Neto
56d420c06e
boxlayout: Notify orientation changes
...
This was missing from the initial implementation, and
breaks the tests.
2019-03-27 23:34:03 -03:00
Matthias Clasen
dec2cf49dd
Merge branch 'child-properties' into 'master'
...
Remove some more child properties
See merge request GNOME/gtk!675
2019-03-28 02:04:42 +00:00
Georges Basile Stavracas Neto
3d524cc67d
build: Install gtkboxlayout.h
...
This is included by gtk.h, and thus required to build.
2019-03-27 22:55:07 -03:00
Matthias Clasen
396deb44fa
Convert ui files
...
Run gtk4-builder-tool simplify --3to4 over all ui files.
2019-03-27 21:48:12 -04:00
Matthias Clasen
3631878cee
builder-tool: Rewrite paned child properties
2019-03-27 21:48:12 -04:00
Matthias Clasen
26de69eaae
paned: Replace the child properties
...
Replace the resize and shrink child properties
by resize-child1/2 and shrink-child1/2 properties.
2019-03-27 21:48:12 -04:00
Matthias Clasen
f89c93ea8e
Merge branch 'window-api-cleanup' into 'master'
...
GtkWindow api cleanup
See merge request GNOME/gtk!674
2019-03-28 00:14:51 +00:00
Matthias Clasen
6b050a277e
Convert ui files
...
Run gtk4-builder-tool simplify --3to4 over all ui files.
2019-03-27 20:03:59 -04:00
Matthias Clasen
7e88fcf24e
builder-tool: Rewrite toolbar child properties
2019-03-27 20:03:34 -04:00
Matthias Clasen
a443145a4d
toolbar: Remove the homogeneous and expand child properties
...
Replace these with GtkToolItem properties homogeneous
and expand-item.
2019-03-27 20:02:48 -04:00
Matthias Clasen
bbb6772934
win32: Drop set_role
...
One overlooked (non-)implementation of set_role.
2019-03-27 18:48:59 -04:00
Matthias Clasen
3600d129bf
win32: Add a missing include
...
We are using round() now, so include math.h.
2019-03-27 18:47:56 -04:00
Matthias Clasen
14ad26a599
Convert ui files
...
Run gtk4-builder-tool simplify --3to4 over all ui files.
2019-03-27 18:40:40 -04:00
Matthias Clasen
8c807303da
builder-tool: Rewrite GtkPopoverMenu::submenu
2019-03-27 18:38:29 -04:00
Matthias Clasen
5c2697633c
popover menu: Drop the submenu child property
...
We are using the GtkWidget::name property instead.
2019-03-27 18:37:57 -04:00
Matthias Clasen
4a1019bed0
popover menu: Add an api for adding submenus
...
This is a step towards removing the submenu
child property.
2019-03-27 17:53:48 -04:00
Matthias Clasen
0d43d11387
gdk: Drop gdk_surface_set_role
...
This is a very old X session management thing, and you
will be hard-pressed to find a session manager that can
make use of it, and even harder-pressed to find apps
using it to their advantage.
2019-03-27 17:29:17 -04:00
Matthias Clasen
8ef4e231ec
gdk: Stop implementing set_role
...
All but the X implementation of these were
empty anyway. And the X one is just setting
a property.
2019-03-27 17:29:17 -04:00
Matthias Clasen
2f358469af
Remove GtkWindow::role
...
...and the setter/getter for it.
This is a very old X session management thing, and you
will be hard-pressed to find a session manager that can
make use of it, and even harder-pressed to find apps
using it to their advantage.
2019-03-27 17:29:17 -04:00
Matthias Clasen
be944e0a31
file chooser: Stop setting a role
...
It does nothing.
2019-03-27 17:29:17 -04:00
Matthias Clasen
e5722367b3
Merge branch 'fixed-layout' into 'master'
...
Add GtkFixedLayout
See merge request GNOME/gtk!668
2019-03-27 18:51:04 +00:00
Alexander Larsson
2440e89a72
Merge branch 'wip/alexl/broadway6' into 'master'
...
broadway: Use css transforms
See merge request GNOME/gtk!673
2019-03-27 18:45:17 +00:00
Alexander Larsson
9212727f53
broadway: Use css transforms
...
This allows generic transforms nodes to work.
2019-03-27 19:27:16 +01:00
Matthias Clasen
733271e09a
migration guide: Improve warp-pointer entry
...
Mention platform APIs.
2019-03-27 14:21:26 -04:00
Matthias Clasen
868d3cd609
Merge branch 'pack-type' into 'master'
...
Drop some more child properties
See merge request GNOME/gtk!672
2019-03-27 18:12:01 +00:00
Matthias Clasen
4a15b16198
Mention pack-type in the migration guide
2019-03-27 13:52:47 -04:00
Matthias Clasen
7ac250dea7
Convert all ui files
...
Run gtk4-builder-tool simplify --3to4 over all ui files.
2019-03-27 13:36:24 -04:00
Matthias Clasen
c507160bf2
builder-tool: Rewrite pack-type
...
Replace GtkActionBar::pack-type and GtHeaderBar::pack-type
with child types when going from 3 to 4.
2019-03-27 13:36:24 -04:00
Matthias Clasen
84480b3da8
action bar: Drop pack-type
...
Drop the pack-type child property. Allow ui
files to direct children by adding a child
type for it.
2019-03-27 13:36:24 -04:00
Matthias Clasen
6c30b474f5
header bar: Drop pack-type
...
Drop the pack-type child property. Allow ui files
to direct children by adding a child type.
2019-03-27 13:36:24 -04:00
Matthias Clasen
2fd2c61d37
dialog: Stop using GtkHeaderBar::pack-type
...
We want to get rid of child properties.
2019-03-27 13:36:24 -04:00
Alexander Larsson
411dc7e138
broadway: Fix leftover dom modification not using display_commands
2019-03-27 14:21:28 +01:00
Matthias Clasen
141f758c5c
Migration guide: Updates
2019-03-27 02:18:36 -04:00
Matthias Clasen
5fb96392e3
Merge branch 'entry-sizing' into 'master'
...
Entry sizing
Closes #1721
See merge request GNOME/gtk!670
2019-03-27 05:55:06 +00:00
Matthias Clasen
7843382784
text: Allow growing entries
...
Add a propagate-text-width property, which, when set,
makes the entry request a natural width that is just
enough to fit the content, within the limits given
by width-chars and max-width-chars.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1721
2019-03-27 01:42:00 -04:00
Matthias Clasen
544fe83864
search entry: Fix sizing
...
Use the same sizing approach we use for GtkEntry:
ignore icons when measuring. This ensures that
search entries don't change size as icons come
and go.
2019-03-27 01:42:00 -04:00
Matthias Clasen
8a9290d0ba
password entry: Fix sizing
...
Use the same sizing approach we use for GtkEntry:
ignore icons when measuring. This ensures that
password entries don't change size as icons come
and go.
2019-03-27 01:42:00 -04:00
Matthias Clasen
8d4343a550
Merge branch 'get_caret_offset_negative_one' into 'master'
...
Return -1 for AtkText::get_caret_offset on failure
See merge request GNOME/gtk!666
2019-03-26 23:14:48 +00:00
Matthias Clasen
8984320964
Merge branch 'gdk-api-cleanups' into 'master'
...
Gdk api cleanups
See merge request GNOME/gtk!669
2019-03-26 22:37:27 +00:00
Matthias Clasen
c0aaa43122
Rename gdk_device_get_surface_at_position_double
...
We can drop the double suffix now.
2019-03-26 18:12:55 -04:00
Matthias Clasen
5935f26a1d
Drop gdk_device_get_surface_at_position
...
It is no longer used.
2019-03-26 18:12:55 -04:00
Matthias Clasen
562cc8b9ab
gtk: Stop using gtk_device_get_surface_at_position
...
We should always use the double variant of the api.
2019-03-26 18:12:55 -04:00
Matthias Clasen
9021e7d3cd
gdk: Stop using gdk_device_get_surface_at_position
...
We should always use the double variant.
2019-03-26 18:12:55 -04:00
Matthias Clasen
03eb455c93
Rename gdk_device_get_position_double
...
We can drop the double suffix now.
2019-03-26 18:12:55 -04:00
Matthias Clasen
6288043ec2
Drop gdk_device_get_position
...
It is no longer used.
2019-03-26 18:12:55 -04:00
Matthias Clasen
7e4707642a
gtk: Stop using gdk_device_get_position
...
We should always use the double variant of this api.
2019-03-26 18:12:55 -04:00
Matthias Clasen
8dece0e940
gdk: Stop using gdk_device_get_position
...
We should always use the double variant of this api.
2019-03-26 18:12:55 -04:00
Matthias Clasen
21580309d3
Rename gdk_surface_get_device_position_double
...
Drop the _double suffix, now that the int version is gone.
2019-03-26 18:12:54 -04:00
Matthias Clasen
f1d61d5515
Drop gdk_surface_get_device_position
...
Not used anymore.
2019-03-26 18:08:39 -04:00
Matthias Clasen
2d10a7b9c4
gtk: Stop using gdk_surface_get_device_position
...
Use the double version directly.
2019-03-26 18:08:32 -04:00
Matthias Clasen
54a969e0ad
gdk: Stop using gdk_surface_get_device_position
...
Use the double variant instead.
2019-03-26 17:55:29 -04:00
Matthias Clasen
eb4e7b9172
Remove GtkWindow::gravity
...
This was used to interpret the position passed
to gtk_window_move. Since that is gone, gravity
is no longer useful.
2019-03-26 17:55:29 -04:00
Matthias Clasen
de741e57f3
tests: Stop using gtk_window_set_gravity
...
This api is going away.
2019-03-26 17:55:29 -04:00
Matthias Clasen
0481f123ea
Drop gtk_window_move and gtk_window_get_position
...
These functions operate with global coordinates,
which are not available on Wayland.
2019-03-26 17:55:29 -04:00
Matthias Clasen
6f072c80db
treeview: Stop using gtk_window_move
...
It is going away. The search popup needs to be
redone using popovers.
2019-03-26 17:55:29 -04:00
Matthias Clasen
2ed533c3e1
file chooser: Stop using gtk_window_get_position
...
It is going away.
2019-03-26 17:55:29 -04:00
Matthias Clasen
27c286773c
tests: Stop using gtk_window_move
...
It is going away.
2019-03-26 17:55:29 -04:00
Matthias Clasen
f7d3815fa8
a11y: Don't support changing widget size and position
...
This does not make sense.
2019-03-26 17:55:29 -04:00
Matthias Clasen
d45996c728
Avoid root coordinates in begin_drag/move apis
...
Change the all the begin_drag and begin_move apis in
GdkSurface and GtkWindow to expect surface coordinates.
Update the x11 implementation to translate to root
coordinates where it matters. Wayland is ignoring the
coordinates anyway.
2019-03-26 15:57:11 -04:00
Matthias Clasen
6b6f26ed45
Add a window move/resize test
2019-03-26 15:57:04 -04:00
Emmanuele Bassi
060e30de3f
Turn GtkFixedLayoutChild:position into a transformation
...
This way we can transform children instead of just allocating them at an
offset.
2019-03-26 19:17:26 +00:00
Emmanuele Bassi
fc33bf2d1f
Skip all LayoutChild when testing
...
GtkLayoutChild instances are created on demand once we have a widget, a
GtkLayoutManager, and a child widget. This makes testing their creation
fairly tricky.
Let's skip them, for the time being.
2019-03-26 18:46:55 +00:00
Emmanuele Bassi
dd5c981b63
Use GtkFixedLayout in GtkFixed
...
Drop the child properties and the sizing code.
2019-03-26 18:15:13 +00:00
Emmanuele Bassi
9a4c19349e
Add GtkFixedLayout
...
A layout manager for fixed positioning.
2019-03-26 17:43:53 +00:00
Emmanuele Bassi
3389ddf6fc
Do not connect to a non-existing signal
...
The GtkWidget::parent-set signal was removed in ff6cd8f7
.
Instead of removing GtkLayoutChild instances associated to a widget
using notifications when the widget's parent changes, we can have
gtk_widget_unparent() call a method on GtkLayoutManager to remove any
eventual GtkLayoutChild instances associated to the widget.
2019-03-26 17:37:49 +00:00
Emmanuele Bassi
341660e056
Drop warning from GtkLayoutManager::get_request_mode()
...
We can return a sensible default value, so we don't really need to warn
about a missing implementation.
2019-03-26 17:37:49 +00:00
Piotr Drąg
b42bf99b13
Update POTFILES.in
2019-03-26 18:36:51 +01:00
Alexander Larsson
18d814d2ce
Merge branch 'wip/alexl/broadway5' into 'master'
...
Update broadway for gtk4
See merge request GNOME/gtk!667
2019-03-26 16:25:10 +00:00
Alexander Larsson
6fce18e1a1
broadway: Remove some spew
2019-03-26 17:09:41 +01:00
Alexander Larsson
cf4226586a
broadway: Load all textures before applying display ops, fixing flickers
2019-03-26 17:07:47 +01:00
Alexander Larsson
0481aa10e7
broadway: Use const use for constants in the js code
2019-03-26 17:07:47 +01:00
Alexander Larsson
edbaa0964f
broadway: Clean up stuff using const defines
2019-03-26 17:07:47 +01:00
Alexander Larsson
fbefec52a5
Broadway: Add id for nodes and reuse old ones
...
When sending render nodes from the client to the daemon we add an id,
and whenever we're about to re-send the entire tree node we instead
send the old id. We track all the nodes for the previous frame
of the surface this way.
Having the id on the daemon side will allow us do to much better deltas.
2019-03-26 17:07:47 +01:00
Alexander Larsson
d59d8b5dd4
Disable accidental debug spew
2019-03-26 17:07:47 +01:00
Alexander Larsson
87a13fe3d2
broadway: Prepare for splitting display ops out of command handling
2019-03-26 17:07:47 +01:00
Alexander Larsson
2f85443e37
broadway: Refcount textures
...
We want to delay some rendering, and to make that safe we need to correctly
refcount the use of blob uris for the textures so that we don't unref
it while something is scheduled to use it.
2019-03-26 17:07:47 +01:00
Alexander Larsson
311aa01e01
broadway: Simplify fallback node cache
...
Since nodes are now cached we just store the fallback as a
texture in a hashtable indexed by the node. If its unused for
5 frames we drop it.
2019-03-26 17:07:47 +01:00
Alexander Larsson
3bbbe9f71b
broadway: Don't crash of drag-resizing when already active
...
This is what the X11 code does.
2019-03-26 17:07:47 +01:00
Alexander Larsson
890b759091
broadway: Send actual float32, not some hack
2019-03-26 17:07:47 +01:00
Alexander Larsson
d997903d29
broadway: Use DataView instead of hand-rolled int parsers
...
This is nicer in general, but also will let us do floats more sanely.
2019-03-26 17:07:47 +01:00
Alexander Larsson
b097f0a7d8
Broadway: Add node for debug nodes
...
This can be helpful when debugging broadway.
2019-03-26 17:07:47 +01:00
Alexander Larsson
1b5b1bfd0e
broadway: Don't fall back for translation transform nodes
...
These are trivial anyway
2019-03-26 17:07:47 +01:00
Christoph Reiter
c94867f8a1
CI: set a timeout multiplier for the tests
...
CI can be slower than your normal dev machine so give it a bit more time
2019-03-26 16:37:22 +01:00
Martin Robinson
c8d250deb1
Return -1 for AtkText::get_caret_offset on failure
...
ATK now expects this virtual method to return -1 on failure. This allows
ATs to distinguish between a caret at position 0 and a failure.
2019-03-26 15:38:20 +01:00
Matthias Clasen
dbac377ad2
Merge branch 'wip/layout-manager' into 'master'
...
Add Layout Managers
See merge request GNOME/gtk!534
2019-03-26 12:38:18 +00:00
Christoph Reiter
0638dca29a
win32: remove another call to gdk_device_warp()
...
Inline the implementation (untested). To fix the build.
2019-03-26 08:20:07 +01:00
Christoph Reiter
ae68dc7a7d
win32: remove unused gdk_display_warp_device
...
to fix the build
2019-03-26 07:59:01 +01:00
Matthias Clasen
20b4a8b38c
Yet another win32 build fix
...
So much empty warping.
2019-03-25 23:29:34 -04:00
Emmanuele Bassi
65965bed16
Changes after review
...
- Rename GtkLegacyLayout to GtkCustomLayout
- Use for() to iterate over children in GtkBinLayout
- Whitespace fixes for code imported from GtkBox
- Store the GtkLayoutChild instances inside LayoutManager
- Simplify the GtkLayoutManager API by dropping unnecessary arguments
- Fix the ownership model of GtkLayoutManager
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
630442f31c
Parse layout properties
...
If a widget has a LayoutManager instance, then we want to parse layout
properties in UI description files; the grammar is similar to packing
properties in GtkContainer:
<child>
<object ...>
<property name="...">...</property>
<layout>
<property name="pname">value</property>
</layout>
</object>
</child>
The properties are applied after a child has been added to its parent,
to the parent's layout manager property should be set.
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
d6dfa41f10
Add GtkBinLayout
...
Like GtkBin, but lets you lay out multiple children instead of just one.
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
8cf06befc0
Port GtkSwitch to GtkLegacyLayout
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
128a34fe37
Add GtkLegacyLayout
...
GtkLegacyLayout is a layout manager for the transitional period between
the introduction of layout managers and the removal of GtkWidget virtual
functions for the size negotiation.
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
0285919f4a
docs: Add chapter on layout managers
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
1fed357752
Port GtkBox to GtkBoxLayout
...
We can delegate all the layout management to a GtkBoxLayout, now that we
have one.
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
ef9863ab63
Add GtkBoxLayout
...
The same layout policy of GtkBox, without all the GtkContainer calories.
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
5cbf6f5fbd
Add GtkLayoutChild
...
Layout managers needs a way to store properties that control the layout
policy of a widget; typically, we used to store these in GtkContainer's
child properties, but since GtkLayoutManager is decoupled from the
actual container widget, we need a separate storage. Additionally, child
properties have their own downsides, like requiring a separate, global
GParamSpecPool storage, and additional lookup API.
GtkLayoutChild is a simple GObject class, which means you can introspect
and document it as you would any other type.
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
15fda18791
Rename the internal GtkLayoutChild type
...
The type is completely private to GtkLayout, so there's really no need
to namespace it.
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
f7856e887e
Add GtkWidget:layout-manager
...
We can use a constructor property for existing container widgets with
a layout policy, and move the layout policy implementation out of the
widget itself and into a LayoutManager subclass.
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
1b8595b5f2
Hook GtkLayoutManager into GtkWidget
...
We delegate the size request mode, the measuring, and the allocation of
a widget through a GtkLayoutManager instance, if one has been attached
to the widget; otherwise, we fall back to the widget's own implementation.
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
24754c3259
Add GtkLayoutManager
...
A base abstract class for layout manager delegate objects.
Layout managers are associated to a single widget, like event
controllers, and are responsible for measuring and allocating the
children of the widget they are bound to.
2019-03-26 00:11:27 +00:00
Matthias Clasen
4dfe2a8aa8
Fix the windows build
...
There was another warp implementation that needed to be removed.
This commit also addresses a number of compiler warnings
in passing.
2019-03-25 20:06:08 -04:00
Timm Bäder
ab7507150b
Doc comment fixup
2019-03-25 15:57:31 +01:00
Timm Bäder
e657d9d553
popover: Always measure contents gizmo
...
Otherwise we're getting warnings about allocating a widget we haven't
measured first, which is fair. The contents gizmo itself will later take
care about whether or not the real popover child is NULL.
2019-03-25 15:57:31 +01:00
Timm Bäder
36e00ae95e
popover: Don't try to compute_bounds of a NULL child
2019-03-25 15:57:30 +01:00
Matthias Clasen
f2dff5115f
win32: Drop the warp implementation
...
We no longer support pointer warping.
2019-03-25 10:16:14 -04:00
Piotr Drąg
a246f8c22a
Update Polish translation
2019-03-25 14:37:44 +01:00
Piotr Drąg
6efa1fc006
Update POTFILES.in
2019-03-25 14:19:54 +01:00
Matthias Clasen
3d37f08f38
Remove gdk_device_warp
...
This was only ever implemented on X11, and is
not something we want to encourage apps to do, ever.
2019-03-24 20:49:08 -04:00
Matthias Clasen
160f1e581a
Remove a dead file
...
We are not using this anymore.
2019-03-24 20:48:35 -04:00
Matthias Clasen
661e195ffc
color editor: Don't warn if editing is cancelled
...
Thats a valid way to end color picking.
2019-03-24 20:47:26 -04:00
Benjamin Otte
551ced9ae4
Fix compile warning
2019-03-23 03:08:20 +01:00
Benjamin Otte
799cb39e08
Remove win32 themeing support
...
It was unused through all of GTK 3, so it is not worth supporting.
The best Windows themes do not make use of it at all.
2019-03-22 22:30:01 +01:00
LRN
0615668dd9
Merge branch 'ime-load-fix' into 'master'
...
Ime load fix (GTK4)
See merge request GNOME/gtk!662
2019-03-22 21:10:35 +00:00
Matthias Clasen
1ada7bbc02
Fix hover state handling
...
We were not paying enough attention to detail when updating
hover and focus state while generating crossing events. The
invariant that we need to preserve here is that when a widget
has focus or hover, its parent does too.
2019-03-22 16:35:20 -04:00
Matthias Clasen
81658105f7
Stop walking parent surfaces for crossing event generation
...
We basically don't have child surfaces anymore (the last
use in popovers is on the way out). This really needs
to be done in terms of widgets, not surfaces. For now,
just stop walking parent surfaces.
2019-03-22 16:35:20 -04:00
Benjamin Otte
d9ef734458
cssparser: Simplify
...
Remove the uint parser (and use the int parser in the one user of it).
And avoid unnecessarily going through a macro.
2019-03-22 19:55:34 +01:00
Benjamin Otte
73760e5835
cssparser: Remove unused functions
2019-03-22 19:55:34 +01:00
Matthias Clasen
5638882dca
Remove debug spew
2019-03-22 14:44:51 -04:00
Руслан Ижбулатов
8da56cef79
GDK W32: Fix property setting to correctly use static strings
...
The strings that are set are static, so g_value_set_static_string() should
be used to set them instead of g_value_set_string().
2019-03-22 16:59:03 +00:00
Руслан Ижбулатов
64ab82c403
GDK W32: Test for IME correctly
...
ImmIsIME() doesn't work (always returns TRUE) since Vista.
Use ITfActiveLanguageProfileNotifySink to detect TSF changes,
which are equal to IME changes for us.
Also make sure that IMMultiContext re-loads the IM when keyboard layout
changes, otherwise there's a subtle bug that could happen:
* Run GTK application with non-IME layout (US, for example)
* Focus on an editable widget (GtkEntry, for example)
* IM Context is initialized to use the simple IM
* Switch to an IME layout (such as Korean)
* Start typing
* Since IME module is not loaded yet, keypresses are handled
by a default MS IME handler
* Once IME commits a character, GDK will get a WM_KEYDOWN,
which will trigger a GdkKeyEvent, which will be handled by
an event filter in IM Context, which will finally re-evaluate
its status and load IME, and only after that GTK will get
to handle IME by itself - but by that point input would
already be broken.
To avoid this we can emit a dummy event (with Void keyval),
which will cause IM Context to load the appropriate module
immediately.
2019-03-22 16:58:59 +00:00
Matthias Clasen
56df49971a
entry: Disconnect text signals in dispose
...
This was showing up as crashes when closing
the file chooser.
2019-03-21 19:15:55 -04:00
Matthias Clasen
0bf136a902
Merge branch 'adwaita-remove-selectionmode-assets-master' into 'master'
...
Adwaita: Drop checkbox-selectionmode assets
See merge request GNOME/gtk!634
2019-03-20 14:10:18 +00:00
Matthias Clasen
2479d60012
Merge branch 'adwaita-selectionmode-checkboxes-master' into 'master'
...
Adwaita: Fix selection-mode checkboxes
Closes #28
See merge request GNOME/gtk!629
2019-03-20 14:10:05 +00:00
Matthias Clasen
6990f73940
Merge branch 'adwaita-headerbar-switch-margins-master' into 'master'
...
Adwaita: Adjust switch margins on headerbars
Closes #1759
See merge request GNOME/gtk!651
2019-03-20 14:06:19 +00:00
Matthias Clasen
254c27acbe
Merge branch 'wip/jimmac/focus-ring-radii' into 'master'
...
Adwaita: draw bigger radius for focus rings
Closes #1756
See merge request GNOME/gtk!649
2019-03-20 12:32:15 +00:00
Matthias Clasen
558405e1bc
window: Update state flags
...
When the window gets active / inactive, we
don't propagate events, but just send focus-in / -out
to the current focus_widget. Improve this by updating
its state flags as well.
2019-03-19 21:33:38 -04:00
Matthias Clasen
f47c376fb1
main: Fix crossing event generation for parented roots
...
We were walking the parent chain here, which now
always needs to consider whether it should stop
at roots. Like this one should.
The symptom was that a label with a popup attached to
it would end up with an unintentional focus ring that
would not go away.
2019-03-19 21:33:38 -04:00
Alex Monday
5679b9a687
Adwaita: Adjust switch margins on headerbars
...
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1759
2019-03-19 19:59:05 +05:00
Jakub Steiner
24235f61ab
Adwaita: draw bigger radius for focus rings
...
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1756
2019-03-19 14:07:10 +01:00
Benjamin Otte
a44ac75e65
gtk: Don't include gtkstylecontext.h from gtkcsstypesprivate.h
...
And make sure it's included everywhere it's needed.
2019-03-19 08:53:25 +01:00
Benjamin Otte
85c8e29d78
stylecontext: Move atk.h include where it belongs
2019-03-19 08:49:15 +01:00
Benjamin Otte
8fb797866d
paned: hide the handle widget when <2 children are visible
2019-03-19 08:48:50 +01:00
Benjamin Otte
96a677e5ca
paned: Refactor
...
Don't call a useless function, call gtk_widget_set_child_visible()
directly.
2019-03-19 08:48:41 +01:00
Benjamin Otte
07054ca20d
singleselection: Add forgotten notify emission
...
Also, add docs for the model property while I'm looking at the file.
2019-03-19 08:48:22 +01:00
Benjamin Otte
8f6a48832d
revealer: Always use identity transform for revealed child
...
Refactor the child allocation machinery, so that the complex allocation
paths are only run when the animation is running.
And in particular, ensure that when no animation is running, the
identity transform is allocated.
2019-03-19 08:48:06 +01:00
Benjamin Otte
658588dfe7
renderer: Make gsk_renderer_is_realized() public
...
... and add a property for it.
2019-03-19 08:47:54 +01:00
Benjamin Otte
480d8aec06
renderer: Remove display property
...
Renderers don't need a display until they get realized. And once they
get realized, they can look up the display from the surface.
2019-03-19 08:47:54 +01:00
Matthias Clasen
0d91481587
One forgotten leave signal handler
2019-03-18 15:35:07 -04:00
Matthias Clasen
8650980797
Adapt to motion controller api change
...
The signature of the enter/leave signals changed.
Adapt all users.
2019-03-18 09:24:42 -04:00
Matthias Clasen
2b0d1bca43
motion controller: Install the properties
...
Oops
2019-03-18 08:44:35 -04:00
Matthias Clasen
f7e328e5f7
Merge branch 'paned-no-grab' into 'master'
...
paned: Don't use a grab
See merge request GNOME/gtk!644
2019-03-18 11:50:42 +00:00
Matthias Clasen
b40743121b
Merge branch 'crossing-details' into 'master'
...
motion controller: add details to signals
See merge request GNOME/gtk!621
2019-03-18 01:49:45 +00:00
Matthias Clasen
93c1353c69
Merge branch 'wip/carlosg/include-constructors-header' into 'master'
...
gdk: Include copy of glib/gconstructor.h
See merge request GNOME/gtk!642
2019-03-18 01:10:06 +00:00
Matthias Clasen
1196380f28
paned: Don't use a grab
...
It does not seem necessary for proper functioning
of the drag handle.
2019-03-17 18:55:00 -04:00
Matthias Clasen
26f99bf20c
editable: Fix a thinko
...
When dealing with subclasses of GtkEntry, we were not
getting the property offset that is stored on the GtkEntry
type.
This was showing up as criticals when trying to set
::width-chars on a GtkFileChooserEntry.
2019-03-17 18:46:18 -04:00
Carlos Garnacho
65d9b7ee86
gdk: Include copy of glib/gconstructor.h
...
This is named gdkconstructor.h to avoid any possible conflicts. This fixes
the current usages of G_HAS_CONSTRUCTORS, as that header is not installed
by glib.
2019-03-17 21:29:59 +01:00
Piotr Drąg
688f0997f4
Update POTFILES.in
2019-03-17 17:17:02 +01:00
Matthias Clasen
430ea05aea
widget: Fix a mission annotation
2019-03-17 01:11:22 -04:00
Matthias Clasen
17f4211e4f
motion controller: Add getters for crossing event targets
...
This information can be needed in signal handlers,
so make it available.
2019-03-16 23:52:58 -04:00
Matthias Clasen
ecd6446d08
motion controller: Add focus properties
...
Add boolean properties, is-pointer-focus and
contains-pointer-focus, that track whether the pointer
is in the widget itself or in one of its descendants.
2019-03-16 23:32:31 -04:00
Matthias Clasen
1540797237
motion controller: add details to signals
...
The ::enter and ::leave signals get emitted up and down the
connecting path between the old an the new pointer location.
The signals are less useful if you can't find out where along
the path you are. That is what crossing mode and detail are
about, so add those to the signals.
2019-03-16 23:03:41 -04:00
Matthias Clasen
898728fb2d
a11y tests: Clean up the placeholder-text test
...
This was relying on setting has-focus for initial focus.
2019-03-16 22:46:34 -04:00
Matthias Clasen
fc2b412c0c
Merge branch 'wip/matthiasc/focus3' into 'master'
...
Move focus to GtkRoot
See merge request GNOME/gtk!640
2019-03-17 02:42:46 +00:00
Matthias Clasen
1ce5327058
xim: Stop using GtkWidget::event
...
It does not exist anymore. I'm removing this code now
because our CI tests are using xim and fail due to this.
Eventually, this code should be ported to use a popover.
2019-03-16 22:16:10 -04:00
Matthias Clasen
ad3773b2e1
a11y tests: Update expected results
...
The changes here are all related to initial focus.
2019-03-16 21:49:24 -04:00
Matthias Clasen
8619b109cc
Update the focus test
...
Check that we get the expected sequences of focus
change events for the nonlinear, inferior and ancestor
cases.
It would be nice to do the same checks for crossing
events, but we have no gtk_window_set_hover().
2019-03-16 21:31:56 -04:00
Matthias Clasen
6ddb61119a
Use root in gdk_synthesize_crossing_events
2019-03-16 21:30:48 -04:00
Matthias Clasen
492a38c229
Make gtk_widget_get_focus_child public
...
It doesn't really make sense to have only
the setter, but not the getter public.
2019-03-16 21:24:45 -04:00
Matthias Clasen
181a4bce25
Add key controller API to the docs
...
A bunch of API was missing here.
2019-03-16 21:24:45 -04:00
Matthias Clasen
93905a8513
key controller: Enforce limitations of key forwarding
...
We now set current_event for focus-change as well,
so make sure to check the event type.
2019-03-16 21:24:45 -04:00
Matthias Clasen
4f06b669c5
key controller: Improve the docs
...
Mention the limitations of the key forwarding api.
2019-03-16 21:24:45 -04:00
Matthias Clasen
f3ed3e99c3
key controller: Add getters for focus event targets
...
This information can be needed in signal handlers,
so make it available.
2019-03-16 21:24:45 -04:00
Matthias Clasen
4f5a8207bc
key controller: Add focus properties
...
Add boolean properties, is-focus and contains-focus, that
track whether the focus is in the widget itself or in
one of its descendants.
2019-03-16 21:24:45 -04:00
Matthias Clasen
2f1194c0c1
key controller: Fix a copy/paste error
...
Prefix the finalize function properly.
2019-03-16 21:24:45 -04:00
Matthias Clasen
921eccb459
Pass mode and detail to focus-in/out signals
...
This information is useful when maintaining a
'last focus' field.
Update all users.
2019-03-16 21:24:45 -04:00
Matthias Clasen
888b92674f
Move maintaining the focus chain
...
Put this code in the same place where we generate
the crossing events.
2019-03-16 21:24:45 -04:00
Matthias Clasen
7d354b5084
Some fixes to crossing event generation
...
In the inferior and ancestor cases, we were missing
the initial/final event.
2019-03-16 21:24:45 -04:00
Matthias Clasen
4238a04c7b
window: Use gtk_synthesize_crossing_events
...
Emit focus change events in the same way as crossing events.
Also change the code to only emit focus change events for
the master keyboard - we only maintain a single focus location,
so sending multiple focus change events for different devices
seems confusing.
2019-03-16 21:24:45 -04:00
Matthias Clasen
adb547a147
Export gtk_synthesize_crossing_events internally
...
We want to use this for focus changes, now that
it can emit focus change events.
2019-03-16 21:24:45 -04:00
Matthias Clasen
cdcd2bb073
Share crossing and focus change event code
...
Make a single function that can emit both
enter/leave and focus change events.
2019-03-16 21:24:45 -04:00
Matthias Clasen
06f790d663
gdk: Add a related_target field to some events
...
Crossing and focus change events are emitted between
two widgets, and want to associate both with the
events.
2019-03-16 21:24:45 -04:00
Matthias Clasen
c73972f7df
gdk: Rename gdk_event_set_user_data
...
Lets call it what it is, the target.
All of this is private api anyway.
Update all callers.
2019-03-16 21:24:45 -04:00
Matthias Clasen
8d5f1ae662
gdk: Add crossing mode and detail to focus events
...
We want focus events more similar to crossing events.
2019-03-16 21:24:45 -04:00
Matthias Clasen
a3abf0693d
Clarify grab_focus docs
2019-03-16 21:24:45 -04:00
Matthias Clasen
7ca24f12d7
window: Remove initial-focus builder support
...
With focus-widget now a property, this is no longer needed.
2019-03-16 21:24:45 -04:00
Matthias Clasen
f68855341e
window: Remove ::set-focus
...
The focus-widget is now a property, so we don't need
this signal anymore.
2019-03-16 21:24:45 -04:00
Matthias Clasen
31d9ecb5c3
popover: Stop using ::set-focus
...
This will change completely when GtkPopover becomes a
root. For now, stop using ::set-focus and just use the
focus-widget property.
2019-03-16 21:24:44 -04:00
Matthias Clasen
f13e6179e8
filechooser: Stop using ::set-focus
...
We can achieve the same with the focus-widget property.
2019-03-16 21:24:44 -04:00
Matthias Clasen
d279c666a9
inspector: Stop using ::set-focus
...
The focus-widget is just a regular property now that shows
up on the property page. No need to special-case it on
the misc page anymore.
2019-03-16 21:24:44 -04:00
Matthias Clasen
7819a5aab9
Drop gtk_widget_send_focus_change
...
Replace this with gtk_widget_set_has_focus + gtk_widget_event.
2019-03-16 21:24:44 -04:00
Matthias Clasen
15300f839e
widget: Add a private setter for has-focus
2019-03-16 21:24:44 -04:00
Matthias Clasen
94b0e99be5
Exclude non-drawable widgets from focus
...
This was showing up as confusion between palette
and editor in the color chooser.
2019-03-16 21:24:44 -04:00
Matthias Clasen
8c1d852a84
widget: Drop the ::focus signal
...
The focus vfunc is an implementation detail
of GTK focus handling, and having external
signal handlers interfere with it is not
a good idea.
2019-03-16 21:24:44 -04:00
Matthias Clasen
2738926dcb
Simplify the move_focus api
...
No need to pass the array in from the outside.
2019-03-16 21:24:44 -04:00
Matthias Clasen
029ec38e63
Move a check to gtk_window_set_focus
...
gtk_widget_grab_focus is just a wrapper for
gtk_window_set_focus. We should do all the enforcement
there.
2019-03-16 21:24:44 -04:00
Matthias Clasen
2bf1561b48
Port widgets to the root focus API
2019-03-16 21:24:44 -04:00
Matthias Clasen
bd44831987
window: Implement the root focus api
...
This just uses the existing get/set_focus functions.
We keep them public for now.
2019-03-16 21:24:44 -04:00
Matthias Clasen
ab5d3e756b
root: Add focus
...
Add a getter and a setter for the focus widget.
The default implementations do nothing.
2019-03-16 21:24:44 -04:00
Matthias Clasen
92f1bdcf45
Redo focus handling
...
GtkWindow has a focus_widget that points to the current input focus.
GtkWidget has a focus_child that points to the child that contains
the input focus. Following the focus_child chain from the toplevel
always leads to the focus_widget. We never unset focus_child, we only
set it. We bubble focus change events.
2019-03-16 21:24:44 -04:00
Matthias Clasen
64b9114d98
password entry: Fix property notification
...
Both placeholder-text and activates-default were not
up to our usual standards for property notification,
and the tests complained.
2019-03-16 21:23:28 -04:00
Matthias Clasen
a1cc809c60
search entry: Fix property notification
...
Both placeholder-text and activates-default were not
up to our usual standards for property notification,
and the tests complained.
2019-03-16 21:23:28 -04:00
Matthias Clasen
7c19ab66ee
single selection: Skip tests properly
...
Do runtime checks for the GLib version,
instead of compiling out tests.
This avoids compiler warnings.
2019-03-16 21:23:28 -04:00
Matthias Clasen
7ca528b896
widget: Check rootness for invisibility
...
Make the function that determines initial visibility
look at whether the class implements GtkRoot. That is
the eventual goal for this check. For now, allow
popovers in here as well.
2019-03-16 21:23:28 -04:00
Jordi Mas
2870f4dbfe
Update Catalan translation
2019-03-16 22:06:43 +01:00
Matthias Clasen
f14d998c95
password entry: Don't show both icons
...
It can be a bit confusing to have an indicator
and an action next to each other, and with the
peek icon, the need for the Caps Lock warning is
reduced, since you can just reveal the text to
see that it is capitalized.
Therefore, only show the Caps Lock warning if
the peek icon is disabled.
2019-03-15 14:35:25 -04:00
Matthias Clasen
34e859a5bc
Add a tagged entry demo
...
This can serve as an example for how composite entries
can now be done outside of GTK, easily.
2019-03-15 13:21:26 -04:00
Matthias Clasen
5822a35087
gtk-demo: Show password peek icon
2019-03-14 20:43:15 -04:00
Matthias Clasen
a3b73a416e
password entry: Add a way to see the content
...
Add a ::show-peek-icon property and show a clickable
icon when it is set. Clicking it toggles the visibility
of the content. The same functionality is also accessible
via a context menu item.
This is a common feature of password entries.
2019-03-14 20:31:45 -04:00
Matthias Clasen
d3cecd65a5
password entry: Make the Caps Lock icon less prominent
...
Set a style class, and theme the Caps Lock icon to
be less promient, so it does not appear clickable.
2019-03-14 20:03:34 -04:00
Matthias Clasen
470720e11a
password entry: Use text cursor for Caps Lock indicator
...
We don't want it to appear clickable, but we still
need to keep it pickable for the tooltip to work,
so explicitly give it the same cursor that we use
for the text.
2019-03-14 19:17:39 -04:00
Matthias Clasen
c3f43cf1f2
entry: Make progress bar not pickable
...
There is no need for that, we don't want to
handle input here at all.
2019-03-14 19:15:31 -04:00
Matthias Clasen
5251253fc0
password entry: a better Caps Lock icon
...
This is more in line with how Caps Lock
is typically indicated.
2019-03-14 19:00:37 -04:00
Matthias Clasen
f5e112fd2d
gtk-demo: Add a password entry demo
2019-03-14 18:55:51 -04:00
Matthias Clasen
56ee1f3566
password entry: Add placeholder-text and activates-default
...
Add ::placeholder-text and ::activates-default properties.
Password entries are going to be used in dialogs, where
these two properties are useful.
2019-03-14 18:42:07 -04:00
Matthias Clasen
4afad781fe
password entry: Initialize capslock state
...
The icon was erroneously showing up before the first
focus-in event.
2019-03-14 17:58:10 -04:00
Matthias Clasen
8e4c441f78
a11y: More entry fixes
...
Remove the GtkEntry assumption from more places.
2019-03-14 17:58:02 -04:00
Alex Monday
d07cd892e7
Adwaita: Drop checkbox-selectionmode assets
2019-03-13 14:12:45 +05:00
Matej Urbančič
44198cc779
Updated Slovenian translation
2019-03-12 20:25:31 +01:00
Alex Monday
4bba279085
Adwaita: Fix selection-mode checkboxes
...
Use object-select-symbolic as a check icon, adjust styles.
Closes https://gitlab.gnome.org/GNOME/gtk/issues/28
2019-03-12 22:05:08 +05:00
Alex Monday
36539a22d7
Adwaita: Adjust entry border-radius
...
Replace entry border-radius value with $button_radius variable.
2019-03-12 20:42:48 +05:00
Alex Monday
ad96220448
Adwaita: Replace spinbutton border-radii with variables
...
Replace hardcoded border-radius values with $button_radius
variable on spinbuttons.
2019-03-12 20:34:38 +05:00
Alex Monday
73139d524b
Adwaita: Replace all %linked radii with variables
...
Some of hardcoded border-radius values on linked elements were left
unchanged during Adwaita refresh.
2019-03-12 20:32:14 +05:00
Nathan Follens
f454a31caa
Update Dutch translation
2019-03-10 13:02:39 +00:00
Benjamin Otte
3863e44360
text: Simplify
...
The previous arguments were equivalent to using NULL.
2019-03-08 14:12:17 +01:00
Benjamin Otte
8566218485
text: Remove two unused member variables
2019-03-08 14:12:04 +01:00
Benjamin Otte
1475575799
text: Use gtk_widget_set_overflow()
2019-03-08 13:39:52 +01:00
Benjamin Otte
bc901ffa5a
text: Remove 2 unused variables
...
One is always 0, the other is always equal to gtk_widget_get_width()
2019-03-08 13:33:54 +01:00
Benjamin Otte
b114d45c5f
colorswatch: Use gtk_widget_set_overflow()
2019-03-08 13:20:17 +01:00
Benjamin Otte
9a1c698070
widget: Make overflow respect rounded corners
...
Fixes !574
2019-03-08 13:20:17 +01:00
Bastien Nocera
884088f649
gsk: API docs fixes
...
gsk/gskenums.h:181: Error: Gsk: multiple "@GSK_TRANSFORM_CATEGORY_2D" parameters for identifier "GskTransformCategory":
* @GSK_TRANSFORM_CATEGORY_2D: The matrix is a 2D matrix. This is equivalent
^
gsk/gsktransform.c:1342: Warning: Gsk: gsk_transform_to_2d: unknown parameter 'm' in documentation comment, should be 'self'
gsk/gsktransform.c:1368: Warning: Gsk: gsk_transform_to_2d: invalid return annotation
gsk/gsktransform.c:1461: Warning: Gsk: gsk_transform_to_translate: unknown parameter 'm' in documentation comment, should be 'self'
2019-03-07 16:29:28 +01:00
Benjamin Otte
ad5c5d477e
revealer: Add swing transitions
...
And make the revealer on page 2 of the widget-factory use one.
2019-03-07 15:06:12 +01:00
Piotr Drąg
1513bf4174
Update Polish translation
2019-03-07 11:56:27 +01:00
Matthias Clasen
eacbeb9efd
x11: Don't emit GDK_NOTHING events
...
They are good for nothing.
2019-03-06 23:42:36 -05:00
Benjamin Otte
18da852e15
rendernode: Add can_diff implementation for transform nodes
...
That one was missing and killing performance in the fishbowl.
2019-03-06 12:40:58 +01:00
Timm Bäder
39fbf13fcb
entry: Update CSS node docs
...
Remove all the nodes that are subnodes of GtkText nowadays and refer to
the GtkText docs instead.
2019-03-06 09:03:17 +01:00
Timm Bäder
9105de9170
gl renderer: Cache rendered fallback nodes
2019-03-06 06:31:25 +01:00
Timm Bäder
eeed55d45c
gl renderer: Mark pointer textures as used
...
Otherwise we remove them, causing additional texture uploads.
2019-03-06 06:31:25 +01:00
Benjamin Otte
3a3b325f8e
transform: Add perspective()
...
This commit adds gsk_transform_perspective(), gtk_snapshot_perspective()
and support for perspective() in the CSS syntax.
2019-03-05 20:46:00 +01:00
Benjamin Otte
dbe58452d7
rendernode: Implement diffing of transform nodes
...
This reinstates diffing in the same way that it worked for offset nodes.
It would be possible to add diffing for affine transforms or even all
transforms, but I think this is unnecessary right now - and also quite
expensive to compute.
2019-03-04 23:41:51 +01:00
Benjamin Otte
a8bf5eee0f
transform: Readd optimization
...
This is the optimization from bbd4e2f60d
2019-03-04 23:41:51 +01:00
Benjamin Otte
bd113aa85c
transform: Redo querying API
...
Make the API expect a tranform of the proper category instead of
doing the check ourselves and returning TRUE/FALSE.
The benefit is that the mai use case is switch (transform->category)
statements and in those we know the category and don't need to check
TRUE/FALSE.
Using the wrong matrix will now cause a g_warning().
2019-03-04 23:41:51 +01:00
Benjamin Otte
1fecbd4241
transform: Store the category in the transform
...
... instead of computing it every time we need it.
This should be faster and we want to use it a lot more prominently.
Also, we have the struct memory available anyway.
2019-03-04 23:41:51 +01:00
Benjamin Otte
3545abc7a1
transform: Implement gsk_transform_invert()
...
And use it.
And test it.
2019-03-04 23:41:51 +01:00
Benjamin Otte
70b341139b
transform: Remove gsk_transform_identity()
...
This used to be a good idea back when GskTransform was intended to be
used for transitions, but without it, it's not anymore.
2019-03-04 23:41:51 +01:00
Benjamin Otte
b391aea2b3
widget: Make transform a GskTransform
...
This concludes pushing transforms down into GskTransform.
What's remaining is potentially pushing it further into the renderers.
2019-03-04 23:41:51 +01:00
Benjamin Otte
979e9bec27
testsuite: Add a transforms test
...
In particular, check that to_matrix() and to_2d(), to_affine() and
to_translate() return the same values.
This also requires a recent Graphene version or the tests will fail.
2019-03-04 23:41:27 +01:00
Benjamin Otte
e737b42113
trasnform: Fix print statement
...
We were printing the wrong variable.
2019-03-04 23:15:24 +01:00
Benjamin Otte
cf00c36c85
transform: Split rotate() and rotate3d() class
...
This is mainly for accuracy: We can guarantee the math we do for 2D
rotations results in a 2D matrix.
2019-03-04 23:15:24 +01:00
Benjamin Otte
3cc84d2860
transform: Make category public API
...
Also rename it from GskMatrixCategory to GskTransformCategory.
2019-03-04 23:15:24 +01:00
Benjamin Otte
791bf0c2eb
transform: Remove API to poke internals
...
It is not interesting to users of GskTransform how it is made up
internally. Users should just use the gsk_transform_to_*() APIs.
2019-03-04 23:15:24 +01:00
Benjamin Otte
3a3c2d14ab
rendernode: Make the transform node take a GskTransform
...
This is an attempt to push GskTransform deeper into the stack.
2019-03-04 23:15:07 +01:00
Benjamin Otte
4916280883
transform: Add more API
...
In particular, add a per-category querying API for the matrix:
- gsk_transform_to_translate()
- gsk_transform_to_affine()
- gsk_transform_to_2d()
- gsk_transform_to_matrix()
This way, code can use the relevant one for the given category.
2019-03-04 23:15:06 +01:00
Benjamin Otte
0e1a50366a
transform: Move to GSK
...
The renaming of the prefix makes this a large patch.
2019-03-04 23:09:02 +01:00
Matthias Clasen
20f7588a84
Merge branch 'adwaita-typo-fix-master' into 'master'
...
Adwaita: Fix typo (missing comma)
Closes #1713
See merge request GNOME/gtk!618
2019-03-04 17:36:10 +00:00
Christoph Reiter
348912dff4
treeview: make sure separator nodes have a height > 0
...
In case the theme doesn't set a height/min-height for the treeview
separator the treeview drawing gets confused and draws rows on top of each
other depending on the redraw area.
This is due to gtk_tree_view_get_row_height() assuming that a node with a
height <= 0 is not set and not a separator and it will default to the
expander size.
Ideally gtk_tree_view_get_row_height() would know if it operates on a separator,
but there are too many calls/levels, so just make sure the separator height
is at least 1 (Adwaita already sets "min-height: 2px", so no change there)
Cherry-picked from !614 to master
2019-03-04 17:07:13 +01:00
Alex Monday
610692d07b
Adwaita: Fix typo (missing comma)
...
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1713
(cherry picked from commit 0b61d6f6ae
)
2019-03-04 15:58:15 +00:00
Emmanuele Bassi
fad21d8dda
Remove aligned allocation checks
...
The tests were added when we thought we had to align memory allocations
for structures including a Graphene type in their members. Graphene
added alignment annotations for its types, and we never really used the
symbols we set after testing for allocations being aligned out of the
box with malloc(), and for aligned allocators.
2019-03-04 13:51:49 +00:00
Emmanuele Bassi
45ea288ba2
Merge branch 'notebook-notify-page-not-child' into 'master'
...
notebook: Notify the notebook page, not the child
See merge request GNOME/gtk!616
2019-03-04 11:35:18 +00:00
Matthias Clasen
b79545e83c
search entry: Fix a copy-paste error
2019-03-03 22:56:02 -05:00
Matthias Clasen
02318dbda7
entries: Fix mnemonic activation
...
Since entries are no longer can-focus, the default
mnemonic_activate handler refuses to act on them.
2019-03-03 22:25:52 -05:00
Peter Bloomfield
afbfccb89e
notebook: Notify the notebook page, not the child
...
Call g_object_notify() on the GtkNotebookPage, not the child GtkWidget.
Fixes some issues in !594 .
2019-03-03 18:21:10 -05:00
Benjamin Otte
bed4c68041
widget: Fix gtk_widget_pick() on 3d-transformed widgets
...
Picking is done by drawing a line along the parent's z axis and picking
at the intersection with the child's z=0 plane.
However, the previous code was casting a ray along the child's z axis.
This patch actually transforms the line to pick into the target's
coordinate system and then computes the corrrect intersection with the
z=0 plane.
Using graphene_point3d_interpolate() to compute the final intersection
point is a bit of abuse of that function, but I found no better way in
Graphene to achieve the same thing.
2019-03-03 19:50:59 +01:00
Matthias Clasen
8ceff21497
gtk-demo: Minimally fix the sarch entry demo
...
This was broken by the entry refactoring.
2019-03-03 12:43:00 -05:00
Matej Urbančič
4fe67310fb
Updated Slovenian translation
2019-03-02 20:57:57 +01:00
Marco Trevisan (Treviño)
8385543e1c
gdkdevice-wayland: Update pointer scale on tablet tool proximity events
...
When the user approaches a tablet tool to the screen we get a proximity-in event
and in this moment we need to check the surface output scale to find the scaling
to be applied to the cursor.
And the same should be done when the tool is detached or the monitors
configuration changes.
https://gitlab.gnome.org/GNOME/gtk/issues/1675
2019-02-15 03:03:50 +01:00