Benjamin Otte [Sun, 22 Apr 2018 00:45:11 +0000 (02:45 +0200)]
demo: Don't add more icons all the time
If adding new icons takes longer than a second, the frame clock should
run before we add even more icons...
Timm Bäder [Sat, 21 Apr 2018 17:30:12 +0000 (19:30 +0200)]
build: Remove 'name' kwarg from has_function calls
They cause warnings with later meson versions.
Timm Bäder [Sat, 21 Apr 2018 17:24:25 +0000 (19:24 +0200)]
build: Fix copy/paste error
Timm Bäder [Sat, 21 Apr 2018 17:18:20 +0000 (19:18 +0200)]
Always use #ifdef for G_ENABLE_DEBUG
Release builds don't define it to 0, they just don't define it. Avoid
the compilation warning we get otherwise.
Timm Bäder [Sat, 21 Apr 2018 17:01:06 +0000 (19:01 +0200)]
sizerequestcache: Directly initialize some locals
Declaring them and initializing them in the same block of code without
an empty line in between is really just confusing.
Timm Bäder [Sat, 21 Apr 2018 15:04:41 +0000 (17:04 +0200)]
Use inlined gtk_widget_get_display version in a few places
We can safely do this whenever we already made sure that the given
pointer is a valid GtkWidget.
Timm Bäder [Sat, 21 Apr 2018 15:03:31 +0000 (17:03 +0200)]
widget: Add static inline version of gtk_widget_display()
Due to the few type checks in gtk_widget_get_display(), it was the
slowest part of a call to gtk_widget_query_size_for_orientation if the
in case of a cache hit.
Timm Bäder [Sat, 21 Apr 2018 13:45:47 +0000 (15:45 +0200)]
textview: Remove handling_key_event flag
It's not used anymore.
Timm Bäder [Sat, 21 Apr 2018 09:20:15 +0000 (11:20 +0200)]
gsk: Make gsk_text_node_new_with_bounds private
We pulled out the bounds calculation for performance reasons, but the
caller can't know how to properly compute them. Inside gtk+, we can do
that but it's not good enough for public API.
Timm Bäder [Sat, 21 Apr 2018 08:13:16 +0000 (10:13 +0200)]
gl renderer: Rename texture_id parameter to fbo_id
So this makes sense again.
Timm Bäder [Sat, 21 Apr 2018 08:05:39 +0000 (10:05 +0200)]
widget: Use get_instance_private more often
To be more consistent with newer code. We can also save a few lines here
and there by pulling the priv initialization before the precondition
checks.
Timm Bäder [Sat, 21 Apr 2018 07:33:48 +0000 (09:33 +0200)]
sizerequestcache: Constify some locals
Make it clear that we only use them for lookups here.
Timm Bäder [Sat, 21 Apr 2018 07:22:59 +0000 (09:22 +0200)]
sizerequestcache: Use int instead of gint
Timm Bäder [Sat, 21 Apr 2018 07:14:48 +0000 (09:14 +0200)]
sizerequest: Pull locals in closest scope
Timm Bäder [Fri, 20 Apr 2018 18:35:00 +0000 (20:35 +0200)]
snapshot: Fix some documentation problems
Timm Bäder [Sun, 15 Apr 2018 19:16:12 +0000 (21:16 +0200)]
viewport: Remove useless import
Just a debugging remnant
Timm Bäder [Sun, 15 Apr 2018 18:57:58 +0000 (20:57 +0200)]
viewport: Remove outdated comment
Timm Bäder [Sun, 15 Apr 2018 16:20:52 +0000 (18:20 +0200)]
gl renderer: Fix fallback node scaling
Matthias Clasen [Fri, 20 Apr 2018 21:37:13 +0000 (21:37 +0000)]
Merge branch 'print-deserialize' into 'master'
printing: Be more careful when deserializing
See merge request GNOME/gtk!121
Matthias Clasen [Fri, 20 Apr 2018 20:56:28 +0000 (16:56 -0400)]
printing: Be more careful when deserializing
The GVariant we are getting here might not be coming
from GTK+, but rather from some other source. Best to
be forgiving and deal with missing data without crashing.
This was causing the GTK+ portal backends to crash on
print requests from Qt.
Daniel Mustieles [Fri, 20 Apr 2018 09:42:22 +0000 (11:42 +0200)]
Updated Spanish translation
Daniel Mustieles [Thu, 19 Apr 2018 14:13:15 +0000 (16:13 +0200)]
Revert "Update Spanish translation"
This reverts commit
8570d33e08a72abf9004a92784663a3aeba86c00.
Marco Trevisan (Treviño) [Thu, 19 Apr 2018 01:58:57 +0000 (20:58 -0500)]
stack: protect set_visible_child_name from NULL stack
Return with error if gtk_stack_set_visible_child_name is called
with NULL parameter
(cherry picked from commit
2ee5aee4a9f01cce3dda7dff877070b62c3e2880)
Emmanuele Bassi [Thu, 19 Apr 2018 08:24:49 +0000 (08:24 +0000)]
Merge branch 'gtkplacesview-finalization-fixes-master' into 'master'
Gtkplacesview finalization fixes
See merge request GNOME/gtk!119
Marco Trevisan (Treviño) [Thu, 19 Apr 2018 07:47:30 +0000 (02:47 -0500)]
gtkplacesview: disconnect from server list monitor changes on destroy
It might happen otherwise that a change is recorded in between the
widget dispose and finalization, causing a crash when setting
the visible name for the GtkStack (as that will be NULL at that point)
Marco Trevisan (Treviño) [Thu, 19 Apr 2018 07:46:40 +0000 (02:46 -0500)]
gtkplacesview: unset entry_pulse_timeout_id before removing it
Fixes a warning on widget finalize, when trying to remove an invalid
source.
Daniel Boles [Wed, 18 Apr 2018 21:57:02 +0000 (22:57 +0100)]
Scale: Document new optional classes on value node
Daniel Boles [Mon, 1 Jan 2018 14:31:56 +0000 (14:31 +0000)]
Range: Make down/up keys act like down/up scrolls
Before now, down/up keys on H Ranges would increase/decrease value resp,
which is unintuitive & worse, contradicts what we already do for scrolls
Fix simply by moving to the new should_invert_move() as scrolls just did
– which also gets us the other benefits explained in the last 2 commits.
https://bugzilla.gnome.org/show_bug.cgi?id=407242
https://bugzilla.gnome.org/show_bug.cgi?id=791802
Daniel Boles [Mon, 1 Jan 2018 14:28:16 +0000 (14:28 +0000)]
Range: Use should_invert_move() to scroll value
This fixes RTL and/or :inverted Ranges responding to a horizontal scroll
by moving the value/slider button in the opposite direction... See prev.
https://bugzilla.gnome.org/show_bug.cgi?id=791802
Daniel Boles [Tue, 17 Apr 2018 20:44:16 +0000 (21:44 +0100)]
Range: Add should_invert_move() for scrolls & keys
This will be used in subsequent commits to fix the sign by which the
value is changed in response to directional scroll or keypress events.
The idea is: you have a movement to make – in the form of a delta that
follows widget directions, i.e. −1 means left or up, +1 means right or
down – and you want to know whether that delta needs to be inverted in
order to produce the intuitively expected directional change of :value.
The existing should_invert() is not sufficient: it just determines
whether to invert visually, but we need more nuance than that for input.
To answer that – while not doubling up the work for scrolls and keys – I
add a helper should_invert_move(), which considers other relevant state:
• A parallel movement on priv->orientation should just use the existing
should_invert(), which already worked OK for this case (not others).
• Movements on the other orientation now depend on priv->orientation:
◦ For a horizontal Range, always invert, so up (i.e. −ve in terms of
widget coords) always means increase value & vice-versa. This was
done in get_wheel_delta(), but move it here for use with keys too.
◦ For a vertical Range, ignore :invert as it’s only relevant to the
parallel orientation. Do not care about text direction here either
as RTL locales do not invert number lines, Cartesian plots, etc.
This returns TRUE if the delta should be inverted before applying to the
value, and we can now use this function in both scroll and key handlers.
https://bugzilla.gnome.org/show_bug.cgi?id=407242
https://bugzilla.gnome.org/show_bug.cgi?id=791802
Benjamin Otte [Sun, 15 Apr 2018 12:07:25 +0000 (14:07 +0200)]
snapshot: Don't handle clip anymore
If widgets want to clip things, they now need to do it themselves.
By not taking care of clip, we avoid the need to track clip. And by not
tracking clip, we can avoid all unnecessary cache invalidations that we
were doing for render nodes whenever the clip changed.
And when you are scrolling, the clip changes *a lot*.
Daniel Boles [Tue, 17 Apr 2018 19:50:04 +0000 (20:50 +0100)]
MenuShell: Avoid compiler warning re un/signed cmp
priv->button is a guint, but we assigned it to a local gint.
gtk/gtkmenushell.c:734:37: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
if (button && (new_button != button) && priv->parent_menu_shell)
^
Daniel Boles [Tue, 17 Apr 2018 19:03:07 +0000 (20:03 +0100)]
Menu|Item: Fix FIXME re non-const interned strings
These are members of the private struct, so it hurts no one to fix this.
Daniel Boles [Tue, 17 Apr 2018 18:56:13 +0000 (19:56 +0100)]
Menu: Remove redundant typecheck in private func
Everything that calls this already ensured we are a valid GtkMenu.
Daniel Boles [Tue, 17 Apr 2018 19:19:45 +0000 (20:19 +0100)]
Menu: Update @accel_path annotation/description
Daniel Boles [Tue, 17 Apr 2018 19:19:38 +0000 (20:19 +0100)]
Menu: Typecheck AccelGroup passed via public API
Daniel Boles [Tue, 17 Apr 2018 18:51:53 +0000 (19:51 +0100)]
Menu: Typecheck before dereferencing to get ->priv
Daniel Boles [Tue, 17 Apr 2018 18:48:43 +0000 (19:48 +0100)]
MenuShell: Sanitise take_focus bool via public API
We store in priv then compare it later, so better make sure it’s 0 or 1.
Daniel Boles [Tue, 17 Apr 2018 18:49:24 +0000 (19:49 +0100)]
MenuShell: Typecheck the instance @ select_first()
since this is public API and therefore might get junk passed to it.
Daniel Boles [Tue, 3 Apr 2018 19:01:54 +0000 (20:01 +0100)]
CellRenderer: Link to CellEditable.start_editing()
...from CellRenderer::start-editing, to point people in the direction of
info about the lifecycle of the Editable and how to do generic setup.
https://gitlab.gnome.org/GNOME/gtk/issues/154
Daniel Boles [Mon, 2 Apr 2018 12:18:18 +0000 (13:18 +0100)]
CellRenderer: Clarify doc of .start_editing()
Drop the line copied from .activate(), replace it with a description of
what this method actually does, and explain what a NULL result means.
https://gitlab.gnome.org/GNOME/gtk/issues/154
Daniel Boles [Mon, 2 Apr 2018 12:01:02 +0000 (13:01 +0100)]
CellRenderer: Entry is not the only CellEditable
so link to GtkCellEditable and note that GtkEntry is just one example.
Daniel Boles [Mon, 2 Apr 2018 11:59:16 +0000 (12:59 +0100)]
CellRenderer|Editable: Don't @See_also subclasses
The documentation knows that from the inheritance hierarchy, without us
having to manually duplicate that info here. Link to each other instead.
Daniel Boles [Tue, 17 Apr 2018 17:27:23 +0000 (18:27 +0100)]
CellEditable: Clarify doc on lifecycle of editable
* Note in the intro that we're really thinking about temporary widgets
* Mention a gotcha regarding GtkEntry and how ::focus-out stops editing
* Give some examples of what you'd want to do in ::editing-done
* Be a bit more precise about what ::remove-widget represents
* Summarise the lifecycle between Renderer/Editable in .start_editing()
* Emphasise again there that this should be viewed as a temporary widget
https://gitlab.gnome.org/GNOME/gtk/issues/154
Daniel Boles [Tue, 17 Apr 2018 17:27:22 +0000 (18:27 +0100)]
CellEditable: Move arg description to right place
Move it from the body to the argument line, and while there, update
the deprecated (allow-none) to (nullable).
Daniel Boles [Mon, 2 Apr 2018 10:49:35 +0000 (11:49 +0100)]
CellEditable: Fix grammar error in doc synopsis
Christoph Reiter [Tue, 17 Apr 2018 17:09:16 +0000 (19:09 +0200)]
ci: move the docker image to gitlab.gnome.org
Daniel Mustieles [Tue, 17 Apr 2018 16:25:45 +0000 (16:25 +0000)]
Update Spanish translation
Emmanuele Bassi [Tue, 17 Apr 2018 08:38:11 +0000 (09:38 +0100)]
Add an issue template for crashers
Better to have separate templates than a large, "choose your own
adventure" one.
gogo [Mon, 16 Apr 2018 19:09:18 +0000 (19:09 +0000)]
Update Croatian translation
Matthias Clasen [Mon, 16 Apr 2018 16:38:50 +0000 (16:38 +0000)]
Merge branch 'code-owners' into 'master'
docs: Start defining the owners of code sections
See merge request GNOME/gtk!116
Emmanuele Bassi [Mon, 16 Apr 2018 08:41:24 +0000 (09:41 +0100)]
docs: Start defining the owners of code sections
When filing a new merge request it's often hard to know who to ask for a
review; using the Git log doesn't always help — the person that touched
a file last may just be fixing the build or a compiler warning.
The `CODE-OWNERS` file format is something that GitHub uses in order to
pre-fill the list of reviewers:
https://help.github.com/articles/about-codeowners/
Ideally, in the future, we'll be able to use this file with a bot like
homu to automatically go through newly filed merge requests and
automatically ask the relevant people for reviews, instead of doing this
manually.
gogo [Mon, 16 Apr 2018 13:45:29 +0000 (13:45 +0000)]
Update Croatian translation
Christoph Reiter [Mon, 16 Apr 2018 09:54:47 +0000 (11:54 +0200)]
ci: remove allow_failure from flatpak jobs again
It was added in
814b7d7bb71920a due to too old wayland in the runtime.
5b160efc768d3 fixed it by bundling a newer wayland.
Matthias Clasen [Mon, 16 Apr 2018 01:32:51 +0000 (21:32 -0400)]
No need to clear GTK_MODULES anymore
Not a variable we care about nowadays.
Matthias Clasen [Mon, 16 Apr 2018 01:11:57 +0000 (21:11 -0400)]
Spruce up config summary
Show all the options. Nothing to hide.
Matthias Clasen [Sun, 15 Apr 2018 21:45:45 +0000 (17:45 -0400)]
flatpak: Bundle wayland for now
We need a newer wayland than is available in the runtime
currently, so use the power of flatpak and bundle it.
Timm Bäder [Sun, 15 Apr 2018 15:00:32 +0000 (17:00 +0200)]
tooltip: Ignore events with pressed buttons
We dont' want to show tooltips in those cases.
Timm Bäder [Sun, 15 Apr 2018 10:58:57 +0000 (12:58 +0200)]
gl renderer: Remove unused viewport member
Timm Bäder [Sun, 15 Apr 2018 08:55:49 +0000 (10:55 +0200)]
frame: Use underscores in widgets ids in the docs
They will work in composite widget templates this way.
Timm Bäder [Sun, 15 Apr 2018 08:55:21 +0000 (10:55 +0200)]
frame: Remove priv pointer
Timm Bäder [Sun, 15 Apr 2018 08:49:37 +0000 (10:49 +0200)]
frame: Stop saving label and child allocation
We don't use them for anything anymore.
Timm Bäder [Sat, 14 Apr 2018 20:12:51 +0000 (22:12 +0200)]
Remove gtk_render_icon_surface
As part of removing all the cairo_surace_t usage. There's still
gtk_render_icon for the same purpose that takes a GdkTexture*
Timm Bäder [Sat, 14 Apr 2018 19:52:14 +0000 (21:52 +0200)]
widget: Use _set_has_tooltip everywhere
real_set_has_tooltip sounds like it's a vfunc implementation, but it
wasn't. The force parameter was also useless so just remove that.
Timm Bäder [Sat, 14 Apr 2018 15:57:15 +0000 (17:57 +0200)]
widget: Use priv pointer directly
Timm Bäder [Sat, 14 Apr 2018 15:51:11 +0000 (17:51 +0200)]
widget: Update docs to mention ::draw less
Christoph Reiter [Sun, 15 Apr 2018 03:48:02 +0000 (05:48 +0200)]
Revert "ci: Enable the a11y test suite"
This reverts commit
968a8e1cf0c5bd21e856204d3aa1f4256d7ff814.
things still fail in the gitlab runner
Matthias Clasen [Sun, 15 Apr 2018 00:28:27 +0000 (20:28 -0400)]
font chooser: Allow tweaking fractions
This makes some sense, and frac is meant to be set globally.
Emmanuele Bassi [Fri, 13 Apr 2018 17:47:07 +0000 (18:47 +0100)]
ci: Enable the a11y test suite
The accessibility test suite only performs internal validation.
Emmanuele Bassi [Fri, 13 Apr 2018 18:19:02 +0000 (19:19 +0100)]
tests: Update the expected a11y dump results
Keep in sync with the current tree.
The changes are mostly caused by updates in the internal hierarchy of
composite widgets, and the fact that the order in which the widget tree
is traversed is not exactly stable.
Emmanuele Bassi [Sat, 14 Apr 2018 14:59:12 +0000 (15:59 +0100)]
tests: Split out the accessibility dump tests
Instead of having a single massive test running through the a11y
directory, we can split off each individual file into its own unit.
Having individual units has several advantages:
- units are executed in parallel
- it's easier to identify the failing units
- logs for failed units are easier to read
Emmanuele Bassi [Wed, 11 Apr 2018 16:45:29 +0000 (17:45 +0100)]
ci: Use a common section for Flatpak jobs
Avoid repeating blobs of YAML manually, and use the proper YAML
mechanism to copy-paste blobs instead.
Timm Bäder [Sat, 14 Apr 2018 10:37:19 +0000 (12:37 +0200)]
GskRenderer: Plug a memory leak
Timm Bäder [Sat, 14 Apr 2018 10:05:55 +0000 (12:05 +0200)]
flowbox: Remove unnecessary queue_draw call
Timm Bäder [Sat, 14 Apr 2018 09:49:57 +0000 (11:49 +0200)]
paned: Remove outdated comment
The cursor is not updated in state_flags_changed these days.
Timm Bäder [Fri, 13 Apr 2018 13:21:41 +0000 (15:21 +0200)]
build: Print summary last
Timm Bäder [Thu, 12 Apr 2018 09:02:46 +0000 (11:02 +0200)]
gl renderer: Don't use texture ids in glBindFramebuffer calls
Timm Bäder [Thu, 12 Apr 2018 08:06:16 +0000 (10:06 +0200)]
snapshot: don't create offset nodes inside offset nodes
It's pretty easy to make that one offset node.
Timm Bäder [Thu, 12 Apr 2018 07:47:17 +0000 (09:47 +0200)]
gl renderer: Increase GArray size by 2 up front
Since we know we will add two elements anyway.
Timm Bäder [Thu, 12 Apr 2018 06:20:43 +0000 (08:20 +0200)]
widget: Avoid a dead assignment
Timm Bäder [Thu, 12 Apr 2018 06:20:28 +0000 (08:20 +0200)]
tooltip: Avoid some possibly uninitialized values
Aron Xu [Sat, 14 Apr 2018 05:10:27 +0000 (13:10 +0800)]
po: fix zh_CN translation
Benjamin Otte [Fri, 13 Apr 2018 00:13:27 +0000 (02:13 +0200)]
wayland: Don't freeze the frame clock too early
We can't freeze the frame clock on commit, but only after-paint,
otherwise the frameclock will resume in the paint stage.
So freeze the frame clock at the end of the frame if we are waiting for
a frame callback.
Note; The diff is only lage because of indentation changes due to
avoiding early returns in favor of a branch.
Benjamin Otte [Wed, 11 Apr 2018 23:42:21 +0000 (01:42 +0200)]
gdk: Remove gdk_surface_create_similar_image_surface()
It's unused.
Benjamin Otte [Wed, 11 Apr 2018 23:41:51 +0000 (01:41 +0200)]
gdk: Remove gdk_cairo_surface_create_from_pixbuf()
It's unused and people should use textures and snapshots anyway.
Benjamin Otte [Wed, 11 Apr 2018 23:40:38 +0000 (01:40 +0200)]
widget-factory: Use a pixbuf instead of a surface
This gets rid of the last user of
gdk_cairo_surface_create_from_pixbuf().
Benjamin Otte [Wed, 11 Apr 2018 23:29:15 +0000 (01:29 +0200)]
testgtk: Don't set cairo surfaces as icons
The code expects textures these days, so use those.
Benjamin Otte [Wed, 11 Apr 2018 23:02:33 +0000 (01:02 +0200)]
gdk: Remove gdk_cairo_get_drawing_context()
It's unused.
Benjamin Otte [Thu, 12 Apr 2018 11:59:55 +0000 (13:59 +0200)]
tests: Use gdk_texture_save_to_png() where appropriate
Benjamin Otte [Thu, 12 Apr 2018 11:50:33 +0000 (13:50 +0200)]
texture: Add gdk_texture_save_to_png()
It's needed for debugging Timm's code, so better have it here than
hidden in my random-patch vault.
Benjamin Otte [Wed, 11 Apr 2018 17:20:17 +0000 (19:20 +0200)]
drawingcontext: Remove unused APIs
Christoph Reiter [Wed, 11 Apr 2018 17:49:03 +0000 (19:49 +0200)]
ci: allow flatpak jobs to fail for now
We can easily revert this when things are fixed again.
Timm Bäder [Wed, 11 Apr 2018 17:14:09 +0000 (19:14 +0200)]
scrolledwindow: Fix indicator revealing
We need to increase the scrollbar bounds size.
Timm Bäder [Wed, 11 Apr 2018 16:09:30 +0000 (18:09 +0200)]
gl renderer: Slightly change ops_offset behavior
Add the given delta to the current one instead of replacing it.
Timm Bäder [Wed, 11 Apr 2018 15:57:57 +0000 (17:57 +0200)]
gl renderer: Don't draw all rounded clip nodes to a texture
We only need to do that if the rounde clip node intersects with the
outer one.
Руслан Ижбулатов [Wed, 11 Apr 2018 16:39:34 +0000 (16:39 +0000)]
GDK W32: Fix a missing weak referencing
The changes in
a82d67bb7d9290693e8d8c503e65694bb62b44ca didn't
preserve a g_object_weak_ref() call that we need to ensure the
objects in hash map don't become stale. Fix this.
Emmanuele Bassi [Wed, 11 Apr 2018 14:32:37 +0000 (14:32 +0000)]
Merge branch 'gitlab-ci-ccache-again' into 'master'
gitlab-ci: Reenable ccache but disable it during the initial meson call
See merge request GNOME/gtk!111
Emmanuele Bassi [Wed, 11 Apr 2018 13:37:57 +0000 (14:37 +0100)]
Simplify the Wayland code generation
Instead of going through an ancillary script to strip away the
`WL_EXPORT` annotation from the generated code, we should bump up the
required version of Wayland, and use the `private-code` argument for
wayland-scanner, which does the right thing for us.
Christoph Reiter [Wed, 11 Apr 2018 10:18:55 +0000 (12:18 +0200)]
gitlab-ci: Reenable ccache but disable it during the initial meson call
There where some problems (??) with ccache not detecting changes during meson
checks. Setting CCACHE_DISABLE during the meson execution makes ccache not use
the cache and pass things directly to the compiler.
Timm Bäder [Wed, 11 Apr 2018 09:20:50 +0000 (11:20 +0200)]
gl renderer: Render everyhing according to MV scale
And not the surface's scale factor. This way the magnifier works.