Benjamin Otte [Tue, 5 Nov 2019 00:10:22 +0000 (01:10 +0100)]
scrolledwindow: Use dispose(), not destroy()
Benjamin Otte [Tue, 5 Nov 2019 18:52:25 +0000 (18:52 +0000)]
Merge branch 'wip/chergert/textundo' into 'master'
Add undo/redo support for GtkTextView, GtkText, and GtkEntry
See merge request GNOME/gtk!1158
Christian Hergert [Mon, 4 Nov 2019 22:14:42 +0000 (14:14 -0800)]
migration: add GtkEntryBuffer::deleted-text to migration guide
Christian Hergert [Fri, 1 Nov 2019 18:30:33 +0000 (11:30 -0700)]
gtk-demo: set irreversable actions for textview demos
Christian Hergert [Fri, 1 Nov 2019 18:20:22 +0000 (11:20 -0700)]
gtk-demo: add a demo for TextView undo/redo
Christian Hergert [Fri, 1 Nov 2019 18:20:02 +0000 (11:20 -0700)]
gtk-demo: add an undo demo for GtkEntry
Christian Hergert [Fri, 1 Nov 2019 18:18:21 +0000 (11:18 -0700)]
gtk-demo: wrap text operations in irreversible actions
This ensures that the actions to set the text for the demo tabs cannot
be undone. This matches the previous behavior for GtkTextBuffer.
Christian Hergert [Fri, 1 Nov 2019 18:13:30 +0000 (11:13 -0700)]
text: add undo support to GtkText
This adds support using the GtkTextHistory helper for undo/redo to the
GtkText widget. It is similar in use to GtkTextView, but with a simplified
interface.
You can disable undo support using the GtkText:enable-undo property. By
default, it is enabled.
Christian Hergert [Fri, 1 Nov 2019 18:15:35 +0000 (11:15 -0700)]
entrybuffer: remove text in ::deleted-text default handler
This changes the semantics of ::deleted-text to perform the removal of
text in the default handler. This means, that if you want the old behavior
where your signal handler is called after the text has been deleted, you
should connect with G_CONNECT_AFTER in your signal handler (or use
g_signal_connect_after).
Without this change, there was never a way to get the deleted-text before
the operation had completed and this is necessary to provide undo support
to the text widgets.
Christian Hergert [Tue, 5 Nov 2019 00:40:02 +0000 (16:40 -0800)]
editable: add enable-undo property
This property is intended to be mapped to a GtkText so that undo/redo
support can be used from a number of editable widgets.
Christian Hergert [Fri, 1 Nov 2019 18:12:21 +0000 (11:12 -0700)]
textview: add undo/redo support to GtkTextView
This builds upon the GtkTextHistory helper to provide undo and redo support
for the GtkTextView widget and GtkTextBuffer object.
You can undo/redo using familiar shortcuts such as Primary+Z,
Primary+Shift+Z, ad Primary+Y.
Developers that wish to disable undo, should set the
GtkTextBuffer:enable-undo property to FALSE.
You can wrap irreversible actions
gtk_text_buffer_begin_irreversible_action() and
gtk_text_buffer_end_irreversible_action(). This will cause the undo stack
to drop all undo/redo actions and the changes made between them will be
the "initial state" of the buffer.
Calling gtk_text_buffer_set_text() will do this automatically for you.
Christian Hergert [Thu, 24 Oct 2019 02:13:11 +0000 (19:13 -0700)]
texthistory: add GtkTextHistory helper
The GtkTextHistory helper provides the fundamental undo/redo stack that
can be integrated with other text widgets. It allows coalescing related
actions to reduce both the number of undo actions to the user as well as
the memory overhead.
A new istring helper is used by GtkTextHistory to allow for "inline
strings" that gracefully grow to using allocations with g_realloc(). This
ensure that most undo operations require no additional allocations other
than the struct for the action itself.
A queue of undoable and redoable actions are maintained and the link for
the queue is embedded in the undo action union. This allows again, for
reducing the number of allocations involved for undo operations.
Daniel Mustieles [Tue, 5 Nov 2019 14:44:34 +0000 (15:44 +0100)]
Updated Spanish translation
Emmanuele Bassi [Tue, 5 Nov 2019 10:44:05 +0000 (10:44 +0000)]
ci: Allow msys2 jobs to fail
The msys2 runner has started failing for internal reasons:
- gtk-3-24 times out
- master fails with a ld.exe assertion:
BFD (GNU Binutils) 2.33.1 assertion fail
../../binutils-2.33.1/bfd/cofflink.c:2348
Both seem related to some MSYS2 issue. Until the runner is updated, we
should not block on it.
Emmanuele Bassi [Mon, 4 Nov 2019 23:46:22 +0000 (23:46 +0000)]
tests: Add label-sizing.ui to the XFAIL list
Changes in Pango may make this test fail.
Emmanuele Bassi [Mon, 4 Nov 2019 23:35:49 +0000 (23:35 +0000)]
Revert "Adwaita: radios & checkboxes styling updates"
This reverts commit
427b5d187c8ca5f099b5d4f84664ccc6a560a919.
The commit breaks Adwaita:
Theme parsing error: gtk-contained.css:1191:28-44: No property named "-gtk-icon-effect"
Matthias Clasen [Mon, 4 Nov 2019 23:24:49 +0000 (23:24 +0000)]
Move the ifdef to the right spot
Matthias Clasen [Mon, 4 Nov 2019 23:14:44 +0000 (23:14 +0000)]
cell text: Handle new pango enum values
The PangoUnderline enum grew some new values.
Jakub Steiner [Mon, 4 Nov 2019 18:41:58 +0000 (19:41 +0100)]
Adwaita: radios & checkboxes styling updates
- port from gtk3
Benjamin Otte [Mon, 4 Nov 2019 17:46:28 +0000 (17:46 +0000)]
Merge branch 'wip/sadiq/fix-leak' into 'master'
selection-output-stream-x11: Fix a memory leak
See merge request GNOME/gtk!1149
Benjamin Otte [Mon, 4 Nov 2019 02:35:22 +0000 (02:35 +0000)]
Merge branch 'gtkstack-addnamed-return' into 'master'
stack: return the stack page when adding a child, to ease setting props
See merge request GNOME/gtk!1161
Andy Holmes [Mon, 4 Nov 2019 02:05:03 +0000 (18:05 -0800)]
stack: return the stack page when adding a child, to ease setting props
Christian Hergert [Fri, 1 Nov 2019 18:32:31 +0000 (11:32 -0700)]
textview: use g_slice_new0 for proper initial state
This fixes the missuse of the GList embedded node for prev/next.
Matthias Clasen [Fri, 1 Nov 2019 17:45:38 +0000 (17:45 +0000)]
Merge branch 'reftest-fixes' into 'master'
Reftest fixes
See merge request GNOME/gtk!1157
Matthias Clasen [Fri, 1 Nov 2019 17:33:15 +0000 (13:33 -0400)]
reftests: Print out a helpful error
When module loading fails, print out the error.
Matthias Clasen [Fri, 1 Nov 2019 17:32:56 +0000 (13:32 -0400)]
reftests: Drop libtool hack
We are not using libtool anymore.
Matthias Clasen [Fri, 1 Nov 2019 17:26:33 +0000 (17:26 +0000)]
Merge branch 'bump-pango' into 'master'
Bump pango
See merge request GNOME/gtk!1154
Matthias Clasen [Fri, 1 Nov 2019 13:15:24 +0000 (09:15 -0400)]
label: Handle new pango attributes
overline and overline-color were introduced in Pango 1.45.
Matthias Clasen [Tue, 13 Aug 2019 21:33:33 +0000 (17:33 -0400)]
label: Handle insert_hyphens pango attribute
This was introduced in Pango 1.44.4.
Matthias Clasen [Fri, 2 Aug 2019 03:42:21 +0000 (23:42 -0400)]
gsk: Stop using deprecated pango api
Shape engines are not used anymore.
Matthias Clasen [Tue, 30 Jul 2019 20:34:23 +0000 (16:34 -0400)]
build: We no longer need freetype
Matthias Clasen [Tue, 30 Jul 2019 20:32:34 +0000 (16:32 -0400)]
gtk-demo: Use harfbuzz for font features
We don't need freetype anymore here; harfbuzz
has what we need.
Matthias Clasen [Wed, 24 Jul 2019 12:02:07 +0000 (08:02 -0400)]
Port the font chooser to just use harfbuzz
Matthias Clasen [Fri, 1 Nov 2019 13:09:28 +0000 (09:09 -0400)]
Bump the pango dependency
This lets us avoid freetype uses, and simplifies
some other things as well.
Matthias Clasen [Fri, 1 Nov 2019 17:00:34 +0000 (17:00 +0000)]
Merge branch 'fix-print-dialog' into 'master'
Update the print dialog for headerbar changes
See merge request GNOME/gtk!1156
Matthias Clasen [Fri, 1 Nov 2019 16:51:42 +0000 (12:51 -0400)]
Update the print dialog for headerbar changes
This was breaking the templates test.
Matthias Clasen [Fri, 1 Nov 2019 16:30:17 +0000 (16:30 +0000)]
Merge branch 'ci-update' into 'master'
Update the CI image
See merge request GNOME/gtk!1155
Emmanuele Bassi [Fri, 1 Nov 2019 15:44:12 +0000 (15:44 +0000)]
ci: Add internal links to the HTML report
Makes it easier to link to various sections, and to specific failures.
Emmanuele Bassi [Fri, 1 Nov 2019 15:22:02 +0000 (15:22 +0000)]
ci: Add diffutils to the CI image
Some transitive dependency got dropped, and we lost diff.
Emmanuele Bassi [Fri, 1 Nov 2019 15:20:47 +0000 (15:20 +0000)]
Check for diff's availability
The tests suite calls `diff` in various places, which means we need to
check if it's installed.
Benjamin Otte [Fri, 1 Nov 2019 14:13:28 +0000 (14:13 +0000)]
Merge branch 'otte/for-master' into 'master'
Otte/for master
See merge request GNOME/gtk!1153
Benjamin Otte [Fri, 1 Nov 2019 13:49:41 +0000 (14:49 +0100)]
vulkan: Add missing enum value
Also update comment to point to new header after Vulkan reorganized
their repositories.
Emmanuele Bassi [Fri, 1 Nov 2019 12:52:19 +0000 (12:52 +0000)]
ci: Update the image to Fedora 31
Fedora 31 ships with a newer version of Pango.
Matthias Clasen [Thu, 31 Oct 2019 02:55:34 +0000 (02:55 +0000)]
Merge branch 'fallback-rendering' into 'master'
Fallback rendering
See merge request GNOME/gtk!1152
Matthias Clasen [Thu, 31 Oct 2019 02:31:27 +0000 (22:31 -0400)]
inspector: Add a switch for fallback rendering
Matthias Clasen [Thu, 31 Oct 2019 02:30:34 +0000 (22:30 -0400)]
gl: Use the fallback debug flag
This debug flag was unused; use it to enable
fallback highlighting at runtime.
Matthias Clasen [Thu, 31 Oct 2019 02:31:06 +0000 (22:31 -0400)]
inspector: Remove fallback from logs
There are no logs that this debug flag produces.
Matthias Clasen [Wed, 30 Oct 2019 02:39:49 +0000 (02:39 +0000)]
Merge branch 'wl-key-repeat' into 'master'
wayland: Rely on server key repeat info
See merge request GNOME/gtk!1150
Matthias Clasen [Wed, 30 Oct 2019 02:20:57 +0000 (22:20 -0400)]
wayland: Drop the keyboard settings object
It is no longer used.
Matthias Clasen [Wed, 30 Oct 2019 01:55:13 +0000 (21:55 -0400)]
wayland: Rely on server key repeat info
Using gsettings for this information does not work
in sandboxed scenarios, where settings are per-app.
Since the Wayland protocol provides this information
nowadays, just drop the old code for reading
the gsettings.
Benjamin Otte [Mon, 21 Oct 2019 02:57:03 +0000 (04:57 +0200)]
builder: Allow parsing G_TYPE_BYTES from strings
Just create a bytes containing the literal string.
Benjamin Otte [Sat, 26 Oct 2019 05:00:24 +0000 (07:00 +0200)]
togglebutton: Don't emit clicked during set_active()
set_active() is meant to set the state of the property, which happens
during setup.
The clicked signal is emitting events from user actions.
It is impossible to use Togglebuttons for MVC applications as long as it
does that.
Benjamin Otte [Mon, 28 Oct 2019 19:00:21 +0000 (20:00 +0100)]
messagedialog: Remove useless GTK_TYPE_BUILDABLE interface
It was just chaining up.
Mohammed Sadiq [Sun, 27 Oct 2019 08:16:37 +0000 (13:46 +0530)]
gdkselectionoutputstream-x11: Fix a memory leak
Matthias Clasen [Wed, 23 Oct 2019 01:20:36 +0000 (21:20 -0400)]
gtk-demo: Add a scrolling image demo
This tests big textures.
Matthias Clasen [Tue, 22 Oct 2019 23:52:14 +0000 (19:52 -0400)]
window: Unrealize renderer before children
Unrealize the GSK renderer before destroying children.
This makes the renderer drop any texture caches that
it might have, so that we don't needlessly download
them when releasing the widget-side holder objects.
As a fortunate side effect, this fixes crashes on
exit with GtkGLArea-containing windows under Wayland.
Matthias Clasen [Tue, 22 Oct 2019 13:23:06 +0000 (13:23 +0000)]
Merge branch 'readonly-all-the-things' into 'master'
Readonly all the things
See merge request GNOME/gtk!1145
Matthias Clasen [Tue, 22 Oct 2019 06:39:56 +0000 (02:39 -0400)]
Revert "gl: Speed up icon cache lookups"
This reverts commit
dd5ee87b5b65fff51e671ed092e18a524de78379.
Matthias Clasen [Tue, 22 Oct 2019 06:28:33 +0000 (02:28 -0400)]
gl: Avoid pointless iteration
Matthias Clasen [Tue, 22 Oct 2019 06:27:28 +0000 (02:27 -0400)]
gl: Add some comments
Matthias Clasen [Tue, 22 Oct 2019 05:34:56 +0000 (01:34 -0400)]
Revert "Cache glyph textures in render nodes"
This reverts commit
c5af4638434e39a0c224afb62252caed233c2acb.
Timm Bäder [Sun, 20 Oct 2019 14:34:24 +0000 (16:34 +0200)]
inspector: Fix expander arrow node names
They vanished after the GtkExpander node rename
Timm Bäder [Sun, 20 Oct 2019 11:03:52 +0000 (13:03 +0200)]
filechooserwidget: Remove unused function parameter
Timm Bäder [Sun, 20 Oct 2019 10:55:19 +0000 (12:55 +0200)]
filechooserwidget: Inline function into only caller
Timm Bäder [Sun, 20 Oct 2019 07:18:55 +0000 (09:18 +0200)]
placesview: open address popover upwards
Timm Bäder [Sun, 20 Oct 2019 06:51:12 +0000 (08:51 +0200)]
entry: Remove unused function
Timm Bäder [Sun, 20 Oct 2019 06:43:50 +0000 (08:43 +0200)]
text: Propagate pango attributes to placeholder
Not sure if this is really always wanted or whether we need to filter
the attributes, or even create a separate property for them.
Timm Bäder [Sun, 20 Oct 2019 06:39:55 +0000 (08:39 +0200)]
text: Fix _set_attributes docs
The list is nullable.
Timm Bäder [Sat, 19 Oct 2019 09:45:04 +0000 (11:45 +0200)]
placessidebar: Remove some unused members
Timm Bäder [Sat, 19 Oct 2019 09:40:36 +0000 (11:40 +0200)]
placesview: Use proper setters for properties
Timm Bäder [Sat, 19 Oct 2019 09:23:38 +0000 (11:23 +0200)]
text: Remove some unused members
Timm Bäder [Sat, 19 Oct 2019 09:04:03 +0000 (11:04 +0200)]
text: Fix context menu position
Fixes #2209
Timm Bäder [Sat, 19 Oct 2019 08:36:49 +0000 (10:36 +0200)]
text: Inline function into only caller
Timm Bäder [Sat, 19 Oct 2019 07:32:40 +0000 (09:32 +0200)]
text: Remove gtk_text_get_text_allocation
We can just replace that with get_width/get_height everywhere.
Timm Bäder [Sat, 19 Oct 2019 07:23:56 +0000 (09:23 +0200)]
text: Don't destroy pango layout in size_allocate
It's not needed.
Timm Bäder [Fri, 18 Oct 2019 09:44:32 +0000 (11:44 +0200)]
Adwaita: Fix menubutton in headerbar margins
Add the margins to the menubutton and not the button inside the
menubutton. This way popovers properly point to the inner button again
instead to somewhere 6px off.
Timm Bäder [Fri, 18 Oct 2019 09:43:47 +0000 (11:43 +0200)]
Adwaita: Remove padding from popover.menu
The padding belongs to the contents subnode in this case.
Timm Bäder [Fri, 18 Oct 2019 06:27:30 +0000 (08:27 +0200)]
filechooserwidget: Add .menu to right-click popover
Make it look like the other menus.
Timm Bäder [Fri, 18 Oct 2019 05:43:21 +0000 (07:43 +0200)]
filechooserwidget: Focus the searchbar when searching
This code path is taken if the search is already active, so focus the
search entry.
Timm Bäder [Fri, 18 Oct 2019 05:23:02 +0000 (07:23 +0200)]
filechooserwidget: Rename a callback
Timm Bäder [Fri, 18 Oct 2019 04:20:35 +0000 (06:20 +0200)]
shortcutlabel: Inherit from GtkWidget
Timm Bäder [Fri, 18 Oct 2019 04:20:35 +0000 (06:20 +0200)]
shortcutlabel: Inherit from GtkWidget
Timm Bäder [Thu, 17 Oct 2019 14:38:21 +0000 (16:38 +0200)]
searchentry: Make the text entry expand
Fixes the broken layout.
Timm Bäder [Thu, 17 Oct 2019 14:37:17 +0000 (16:37 +0200)]
text: Remove an unnecessary queue_draw() call
Matthias Clasen [Tue, 22 Oct 2019 05:32:51 +0000 (01:32 -0400)]
Revert "inspector: Fix node recording"
This reverts commit
ba7649b3889c823cdc16983c7552956bc655fa8a.
Matthias Clasen [Sat, 19 Oct 2019 22:43:34 +0000 (22:43 +0000)]
Merge branch 'wip/matthiasc/icon-theme' into 'master'
Misc icon theme cleanups
See merge request GNOME/gtk!1139
Matthias Clasen [Fri, 18 Oct 2019 14:33:45 +0000 (09:33 -0500)]
inspector: Fix node recording
When attaching renderer-specific data, we need to
make sure that we key it off the renderer that is
in use, and cope with the absence of render data.
This fixes recording nodes in the inspector.
Matthias Clasen [Fri, 18 Oct 2019 13:47:07 +0000 (08:47 -0500)]
Drop gtk_icon_info_new_for_pixbuf
It is better to keep icon infos as something you
only get from the icon theme.
Matthias Clasen [Fri, 18 Oct 2019 13:40:00 +0000 (08:40 -0500)]
Move symbolic pixbuf recoloring code
This function is better off next to the other
symbolic png code in gdkpixbufutils.c.
Matthias Clasen [Fri, 18 Oct 2019 13:23:44 +0000 (08:23 -0500)]
icon theme: Drop icon_file from GtkIconInfo
It is not used anymore.
Matthias Clasen [Fri, 18 Oct 2019 13:10:01 +0000 (08:10 -0500)]
Drop another use of icon_file
Stop using icon_file when loading symbolic svgs.
Matthias Clasen [Fri, 18 Oct 2019 12:48:46 +0000 (07:48 -0500)]
Drop another use of icon_file
Matthias Clasen [Fri, 18 Oct 2019 12:46:52 +0000 (07:46 -0500)]
Add another symbolic pixbuf helper
Matthias Clasen [Thu, 17 Oct 2019 12:55:25 +0000 (07:55 -0500)]
Avoid a use of icon_file
This is a step towards getting rid of GtkIconInfo->icon_file.
Matthias Clasen [Fri, 18 Oct 2019 12:22:11 +0000 (07:22 -0500)]
icon theme: Start to untangle GtkIconInfo
GtkIconInfo contains too much redundant data,
and it is hard to know which fields are to be
used when.
This commit starts to move towards dropping the
icon_file field - we prefer to work with the
filename directly, since it lets us avoid mime
sniffing and strdups.
Matthias Clasen [Fri, 18 Oct 2019 12:20:25 +0000 (07:20 -0500)]
Drop gtk_icon_theme_get_example_icon_name
This function is not useful. Every icon theme
on my system either does not have that field,
or has it as 'folder'. So, just use 'folder'
when you need an example icon.
Matthias Clasen [Thu, 17 Oct 2019 21:24:21 +0000 (16:24 -0500)]
Drop gtk_icon_theme_list_contexts
Contexts in icon themes are not useful for anything.
Matthias Clasen [Thu, 17 Oct 2019 21:21:45 +0000 (16:21 -0500)]
testicontheme: Remove useless function
Contexts in icon themes are not useful for anything,
so drop this function from testicontheme.
Matthias Clasen [Thu, 17 Oct 2019 12:56:27 +0000 (07:56 -0500)]
icon theme: Avoid a string copy
This is in an error path, so mostly cosmetic.
Piotr Drąg [Thu, 17 Oct 2019 18:11:58 +0000 (20:11 +0200)]
Update POTFILES.in