Commit Graph

54299 Commits

Author SHA1 Message Date
Matthias Clasen
35f92b5695 Merge branch 'wip/filechooser-non-default-display-gtk4' into 'master'
Fix filechooser dialog using non default display (gtk4)

Closes #83

See merge request GNOME/gtk!60
2018-03-15 17:44:49 +00:00
Matthias Clasen
55d35dd13e Update the expected results in the testsuite
the -gtk-scaled() change in the previous commit makes it so
that we now print out the scale factors. Update the expected
output of affected tests to take that into account.
2018-03-15 13:38:41 -04:00
Timm Bäder
ba52be36c2 gl renderer: Set border program outline state 2018-03-15 18:17:57 +01:00
Timm Bäder
eaf899061a gl renderer: Remove shadow program
Drawing shadows is the same task as drawing text in our case and these
two shaders have been the same thing for quite a while.
2018-03-15 18:12:00 +01:00
Timm Bäder
0a7880110e gl renderer: Fix clipped borders
Stop abusing the clip rect for borders.
2018-03-15 18:11:57 +01:00
Timm Bäder
a475e6671c shaderbuilder: Remove unused API 2018-03-15 16:30:48 +01:00
Timm Bäder
e35132054e gl: Move shaderbuilder into gl/ subdirectory
It only handles OpenGL shaders.
2018-03-15 15:06:46 +01:00
Timm Bäder
ebfadae568 gl renderer: Draw offscreen nodes in device pixels
We need to draw them upscaled, of course. This fixes button hover (or,
more generally, crossfade nodes) in hidpi setups.
2018-03-15 13:52:07 +01:00
Timm Bäder
65e3dda065 testsuite: Add more gl renderer tests 2018-03-15 12:58:51 +01:00
Timm Bäder
f82b3fdb90 gl tests: Update clipped cross fade output 2018-03-15 12:41:11 +01:00
Timm Bäder
d66bfb1a9a testsuite: Add a GL gradient test 2018-03-15 11:15:35 +01:00
Matthias Clasen
a4c2819f91 Make GtkCssImageScaled handle scales properly
We slightly expand the syntax of -gtk-scaled to allow
specifying an explicit scale after each image, and then
we create a single-image GtkCssImageScaled with the
preferred scale in compute().
2018-03-15 06:04:08 -04:00
Timm Bäder
3a5630358f gl renderer: Fix rounded clips in hidpi 2018-03-15 11:01:53 +01:00
Timm Bäder
afffc696f4 spinbutton: Remove an unnecessary queue_draw call
This is done automatically in case the spinbutton value actually
changes.
2018-03-15 09:44:49 +01:00
Timm Bäder
a0729f9683 gdk: Remove unused variable 2018-03-15 09:25:42 +01:00
Timm Bäder
04fadc508b GskGLDriver: Use g_assert_cmphex for GL constants 2018-03-15 09:25:42 +01:00
Matthias Clasen
16bf07fe33 Trivial formatting fixes
Fix some whitespace problems.
2018-03-14 23:23:03 -04:00
Daniel Boles
2f16c092a5 testspinbutton: Add button to toggle wrap on Spins
I found myself wanting to test this for something else, so let's test
it. It revealed a bug immediately!

https://gitlab.gnome.org/GNOME/gtk/issues/88
2018-03-14 23:09:51 +00:00
Daniel Boles
55664f95ab testspinbutton: Orient box orthogonally to Spins
This makes better use of space.
2018-03-14 23:01:06 +00:00
Timm Bäder
8b800fa775 testsuite: Simplify GL test definition 2018-03-14 17:28:41 +01:00
Timm Bäder
d978d4af59 testsuite: Add a GL tests for clipped rounded clipped nodes 2018-03-14 17:28:41 +01:00
Timm Bäder
d417595a05 gl renderer: Draw rounded clip child to a texture
And then clip the texture using the current (maybe also rounded) clip.
This way, the result is correct. We don't necessarily have to do the
offscreen drawing in any case, but got the safe route for now.
2018-03-14 17:28:41 +01:00
Timm Bäder
90c8619f42 gl renderer: Properly draw gl textures from a different context
Temporarily switch to the texture's gl context, download the texture and
create a new one in our context for it.
2018-03-14 17:28:41 +01:00
Timm Bäder
955dca950c fixed: Remove snapshot implementation
It does the same thing as the default implementation.
2018-03-14 17:28:41 +01:00
Timm Bäder
5f2283c0ab snapshot: Ignore 0 sized clip nodes
This may happen due to the intersection before.
2018-03-14 17:28:41 +01:00
Carlos Soriano
f06f0a0dee gtkmenu: Remove unused constant
It was used in gtk3 but not in master anymore.
2018-03-14 16:05:08 +01:00
Jonas Ådahl
a48eaa1954 entrycompletion: Realize popup after setting screen
Realization is done as a side effect of calling
_gtk_entry_completion_resize_popup(), but if this is done before the
GdkScreen of the GtkWindow is set up correctly, it may result in the
widget being unrealized when the screen is updated. This may happen
when the file dialog parent window is not using the default GdkDisplay.

To avoid this issue, realize the popup after the screen has been
properly set up.

Fixes #83 in gtk4
2018-03-14 15:37:26 +08:00
Timm Bäder
417e8d6ca4 snapshot: Add missing (nullable) annotation 2018-03-13 23:43:29 +01:00
Timm Bäder
d4c9a35193 widget: Simplify setting a default direction
No reason for the second paramter to be a pointer.
2018-03-13 23:43:29 +01:00
Timm Bäder
81a7f8e00c label: Remove dead NULL check
We only create the gesture when priv->select_info is !NULL.
2018-03-13 23:43:29 +01:00
Christoph Reiter
f91ea2ce37 Merge branch 'master' into 'master'
Add proper annotation for gdk_frame_clock_get_refresh_info

See merge request GNOME/gtk!55
2018-03-13 20:30:53 +00:00
Christoph Reiter
5838ac3d1d run-docker.sh: Disable SELinux for the container and update the image tag
On Fedora and similar SELinux by default prevents containers accessing
mounted host directories. This script is just used for testing,
so disable it.
2018-03-13 21:13:31 +01:00
Emmanuele Bassi
27abc9fefe Update CONTRIBUTING.md
Update the instructions to match the GitLab workflow.
2018-03-13 18:13:46 +00:00
Emmanuele Bassi
b939af0090 ci: Add explicit dependency on "which"
The xvfb-run script depends on it, but it seems Fedora packages ended up
forgetting about it.
2018-03-13 17:56:44 +00:00
Emmanuele Bassi
4e2790ea74 ci: Remove ccache
There are issues with the caching; CI will randomly fail to create new
files used when testing features.
2018-03-13 17:03:27 +00:00
Emmanuele Bassi
9a5947758c ci: Add GLib build dependencies
Since we may end up building GLib as a subproject, we're going to need
all the appropriate GLib build dependencies as well as the GTK ones.
2018-03-13 16:28:42 +00:00
Emmanuele Bassi
44469197d5 ci: Use a different Docker image
I've rebuilt the new Docker image we use for CI to include GStreamer in
the dependencies.

We really need to have the Docker registry hosted on gnome.org, to avoid
pointing people at Dockerhub.
2018-03-13 16:05:03 +00:00
Emmanuele Bassi
9d045db142 Annotate gdk_gl_texture_new() appropriately
This is a constructor, and it needs a transfer annotation.

Sadly, the resulting introspection representation is going to be a less
than satisfactory `Gdk.gl_texture_new()`, because there is no such thing
as a GdkGLTexture in the public API.
2018-03-13 16:00:55 +00:00
Emmanuele Bassi
73ffb7f5e9 Initialise variables
The dx and dy variables may be left uninitialized by the coordinate
translation — or so the C compiler thinks. Let's avoid a warning when
building.
2018-03-13 16:00:55 +00:00
Emmanuele Bassi
a0d2d1f44b Use the same arguments for print backends
All the print backend shared modules should use the same C preprocessor
symbols.
2018-03-13 16:00:55 +00:00
Emmanuele Bassi
fe1586ca3d ci: Add gstreamer to the Docker image
We're going to need it for the media interface.
2018-03-13 16:00:55 +00:00
Emmanuele Bassi
b52da5682e ci: Use the right path for the logs
The meson-logs directory is under the `_build` directory.
2018-03-13 16:00:55 +00:00
Matthias Clasen
3b45019ba2 Merge branch 'query-wayland-registry' into 'master'
gtkimmodule: make match_backend() query

See merge request GNOME/gtk!56
2018-03-13 02:09:26 +00:00
Daniel Boles
9aedafa39e FileChooserWidget: Fix leaks in .get_subtitle()
Now that subtitle's default value "Searching" for OPERATION_MODE_SEARCH
is duplicated as it should be, we cannot reassign other strings to it
anymore, as that resulted in the original dupe of "Searching" leaking.

Fix this by only assigning the dup'd "Searching" after trying to get
more specific values, not before. We therefore need to set it to NULL
during its declaration, and that means we needn't in the final else.
2018-03-13 00:20:17 +00:00
Daniel Boles
fc9dc97430 FileChooserWidget: Avoid crash freeing static str
Having a FileChooserDialog in location-entry mode then pressing
<primary>f to move to search mode would crash with an invalid free().

In that case, FileChooserWidget.get_subtitle() returned a static string
straight from gettext. This crashed when the GBinding from :subtitle to
FileChooserDialog’s HeaderBar:subtitle shortly tried to free the string.

Fix by duplicating the string before returning it, like all other paths.

https://bugzilla.gnome.org/show_bug.cgi?id=791004
2018-03-12 23:07:50 +00:00
Peter Bloomfield
86cd5c04bd gtkimmodule: make match_backend() query
…the wayland registry.

Wnen _gtk_im_module_get_default_context_id calls
match_backend (context_id) and the default GdkDisplay
is wayland, match_backend() should return TRUE only if
gdk_wayland_display_query_registry (display, "gtk_text_input_manager")
returns TRUE.
2018-03-12 17:46:57 -04:00
Stas Solovey
d11c78c46f Update Russian translation
(cherry picked from commit 0e01668683)
2018-03-12 21:08:41 +00:00
Aurimas Černius
3a377bb0a3 Updated Lithuanian translation 2018-03-12 23:00:48 +02:00
Daniel Boles
bde1328a07 testinfobar: Test more properties, response signal
Also test :message-type, :show-close-button, and ::response.
2018-03-12 19:16:07 +00:00
Marek Černocký
7ec3b52d97 Updated Czech translation 2018-03-12 20:08:48 +01:00