Commit Graph

38881 Commits

Author SHA1 Message Date
Matthias Clasen
9ac22c1088 GtkFileFilter: Add suffix matches
This is less flexible than a glob pattern, but it is
explicitly case-insensitive, to match the behavior
on Windows.

Fixes: #3705
2021-06-04 21:10:01 -04:00
Matthias Clasen
47400e4bd8 Add a helper to make case-insensitive globs
This will be used in GtkFileFilter in the future.

Tests included.
2021-06-04 21:10:01 -04:00
Matthias Clasen
8981ba4bd2 imcontext: Ignore more keysyms
It finally dawned on my that #3673 is just another
case of unexpected keysyms getting sent our way via
fringe XKB features.

Ignore them all!
2021-06-04 19:01:57 -04:00
Matthias Clasen
a4598567b9 icontheme: Add detail to the 'not found' message
Name the icon theme we're using.

Fixes: #2271
2021-06-04 09:49:05 -04:00
Matthias Clasen
8f95661167 Clean up some comments
These XXX comments aren't useful enough to keep.
2021-06-04 09:49:05 -04:00
Matthias Clasen
036dd60a4e Merge branch 'matthiasc/for-master' into 'master'
fnmatch: Support case-folding

See merge request GNOME/gtk!3628
2021-06-04 04:43:20 +00:00
DarkTrick
4d894e08f7 Documentation update for combo_box_new_with_entry 2021-06-04 04:02:48 +00:00
Matthias Clasen
31407d0a4c Move fnmatch testcases to the testsuite
We have a well-working way to test internal
apis now, lets use it for these tests.
2021-06-03 23:58:50 -04:00
Matthias Clasen
bb53cf53e7 fnmatch: Support case-folding
This will be used in GtkFileFilter in the future.

Update all callers.
2021-06-03 23:58:21 -04:00
Matthias Clasen
d3e6e303fc Merge branch 'GtkCellLayoutWordingImprovement' into 'master'
Added information, that "attributes" refer to CellRenderer "properties".

See merge request GNOME/gtk!3602
2021-06-04 02:21:33 +00:00
DarkTrick
a0c23b1c3d Added information, that "attributes" refer to CellRenderer "properties". 2021-06-04 02:21:31 +00:00
Matthias Clasen
6a509608f9 applicationwindow: Allocate tooltips
GtkApplicationWindows size_allocate does not chain
up if the menubar is visible; don't forget to allocate
the tooltip window in that case.

Fixes: #3997
2021-06-03 21:43:13 -04:00
Matthias Clasen
3ab97fac1f Cosmetics: Eradicate gdouble
Remove 3 errant uses of gdouble.
2021-06-03 17:41:28 -04:00
Matthias Clasen
e8852c9a25 Merge branch 'primary-menu-button' into 'master'
menubutton: Enable F10 for primary menus

See merge request GNOME/gtk!3580
2021-06-03 19:37:23 +00:00
Emmanuele Bassi
a88b4f517e docs: Fix link to the interactive debugging section
It's in the "running" document.
2021-06-03 09:31:13 +01:00
Matthias Clasen
a1789ee2b8 Merge branch 'wip/chergert/fix-use-after-free-switcher' into 'master'
stackswitcher: clear timer when widget id disposed

See merge request GNOME/gtk!3621
2021-06-02 20:21:57 +00:00
Matthias Clasen
ffb7df2cc4 Merge branch 'macos-menubar' into 'master'
macos: fix weird menubar rendering.

Closes #3967

See merge request GNOME/gtk!3607
2021-06-02 20:13:16 +00:00
Christian Hergert
c2ca246aee stackswitcher: clear timer when widget id disposed
If the widget is disposed while the cursor has a drag timeout queued, it
can activate after finalization.
2021-06-02 10:20:32 -07:00
Matthias Clasen
7307c6fdfb Merge branch 'entry-docs-typo' into 'master'
entry: Fix a typo in the docs

See merge request GNOME/gtk!3619
2021-06-02 11:15:10 +00:00
Matthias Clasen
039fc2e567 entry: Fix a typo in the docs 2021-06-02 06:47:27 -04:00
Matthias Clasen
1dcf9d5c95 Merge branch 'wip/exalm/treeview-click' into 'master'
treeview: Don't handle clicks on any child widgets

Closes #3996

See merge request GNOME/gtk!3618
2021-06-02 10:33:50 +00:00
Alexander Mikhaylenko
80497debbb treeview: Don't handle clicks on any child widgets
We already skip them on the edited cell widget, but it's also a problem for
header buttons. Overall, there's no real reason to let it propagate here.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3996
2021-06-02 13:49:11 +05:00
Matthias Clasen
bffc6c5b9a spinbutton: Avoid redundant storage
GtkBoxLayout stores the orientation; no need for
GtkSpinButton to duplicate that.
2021-06-01 17:37:07 -04:00
Matthias Clasen
95747b1a40 progressbar: Avoid redundant storage
GtkBoxLayout stores the orientation; no need for
GtkProgressBar to duplicate that.
2021-06-01 17:37:01 -04:00
Christian Hergert
c848a51395 stackswitcher: implement GtkOrientable
In GTK 3, GtkStackSwitcher implemented GtkOrientable via the parent GtkBox
type. In GTK 4, that was changed to inherit from GtkWidget and lost this
interface implementation.

This adds that back, along with a note in the documentation that the
interface was added in GTK 4.4.

Fixes #3988
2021-06-01 10:57:27 -07:00
Caolán McNamara
9c79b8b877 invalid cast from 'GtkButton' to 'GtkBox'
on adding a page to a GtkNotebook

(soffice): Gtk-CRITICAL **: gtk_box_remove: assertion 'GTK_IS_BOX (box)' failed
2021-06-01 14:56:53 +01:00
Matthias Clasen
c137f4017f Merge branch 'screensaver-async-4' into 'master'
gtkapplication-dbus: Fetch inital screen saver state async

See merge request GNOME/gtk!3599
2021-06-01 11:14:38 +00:00
liferooter
44f07f7708 texthistory: fix has_actionable function 2021-06-01 11:04:55 +00:00
Matthias Clasen
d1a7a55d7e box: Avoid redundant storage
GtkBoxLayout stores the orientation; no need for
GtkBox to duplicate that.
2021-05-31 18:38:52 -04:00
Zhi
75868dfee4 macos: fix weird menubar rendering.
As app menu has been deprecated, the function of app menu should be
merged into the menubar, which behaves like the original API of NSApp.

This also brings back the default app menu, which looks like native
macOS apps.

For future refactoring, please note that the menubar must contain at
least one menu before being set to NSApp to avoid weird menubar
rendering.

Fixes #3967.
2021-05-30 21:59:57 +08:00
Matthias Clasen
9f93883dc9 text: Propagate xalign to the placeholder
This is what we were doing in GTK 3, and there's
no reason not to continue.

Fixes: #3979
2021-05-27 06:57:23 -04:00
Bilal Elmoussaoui
90a829f25a docs: fix gtk grid formatting 2021-05-27 09:58:42 +00:00
Bilal Elmoussaoui
8ebdd256a5 docs: fix broken links 2021-05-27 00:18:23 +00:00
Matthias Clasen
ffbfafb189 textbuffer: Add some docs for undo
Mention what is undoable and what isn't.
2021-05-26 14:36:16 -04:00
Matthias Clasen
994a38c7ad textbuffer: Improve the docs
Add getter/setter annotations.
2021-05-26 14:36:16 -04:00
Christian Hergert
6179886b14 textbuffer: ensure user actions are propagated to history
This was an oversight when porting the GtkTextHistory into GTK. We simply
need to bind the GtkTextBuffer action into the text history for grouping
to work correctly.

Fixes #3977
2021-05-26 10:11:33 -07:00
Guido Günther
3aa34c1211 gtkapplication-dbus: Fetch inital screen saver state async
Avoid a sync call that can make the application block for no good
reason.

Fixes 6bfe171058
2021-05-26 18:47:38 +02:00
Matthias Clasen
8f4b0cd30d picture: Make setters actually take NULL
gtk_picture_set_file was claiming to be nullable,
but choked on NULL.

Fixes: #3974
2021-05-26 07:30:57 -04:00
Bilal Elmoussaoui
23ea33b656 gtk: drop unwanted char on Switch::state-set docs link 2021-05-25 20:29:46 +00:00
Matthias Clasen
ee80a22db4 Merge branch 'wip/exalm/checks' into 'master'
checkbutton: Sync the indicator state with the widget

See merge request GNOME/gtk!3568
2021-05-25 20:29:06 +00:00
Matthias Clasen
d32c343657 Merge branch 'fix.vs2013.link' into 'master'
gtk/meson.build: Fix linking on Visual Studio 2013

See merge request GNOME/gtk!3575
2021-05-25 20:27:54 +00:00
Emmanuele Bassi
e13da35d4d Turn introspection scanner warnings into errors
We want to catch errors in our annotations or our API.
2021-05-25 19:16:37 +01:00
Emmanuele Bassi
f50450485c docs: Add missing documentation on Windows
The gtk_print_run_page_setup_dialog() function, and its asynchronous
variant, are declared in the common gtkprintoperation.h header, but
implemented in different source files depending on the platform.
2021-05-25 19:16:37 +01:00
Matthias Clasen
8c441756df imcontext: Ignore NoSymbol key events
These can happen with some XKB options.

Fixes: #3973
2021-05-25 13:20:12 -04:00
Emmanuele Bassi
7da2e86d4b docs: Fix the PANGO_SCALE link
The fragment for constants is `const`.
2021-05-25 13:31:49 +01:00
Matthias Clasen
1f99723a9f Merge branch 'fix-im-reset' into 'master'
imcontextsimple: Fix a possible problem

See merge request GNOME/gtk!3584
2021-05-25 12:09:38 +00:00
Matthias Clasen
4c2761302a doc: Syntax fixes
No, we can't have links that say [constructor@...] or
[mehtod@...] or [methoc@...] or [methos@...] or [metohd@...].
And no, not [signals@...] either.
2021-05-25 07:33:55 -04:00
Bilal Elmoussaoui
4728d7b70b gtk: fix gi-docgen link type
constructors are supposed to use "ctor" as a link type, not new
2021-05-25 09:25:32 +00:00
Matthias Clasen
d0ca4a1255 imcontextsimple: Fix a possible problem
We were forgetting to handle the compose sequence
case in reset().
2021-05-24 18:53:14 -04:00
Matthias Clasen
16623d4e71 quartz: Elide underscores again
We don't want a literal _File to show up in the
global menubar on OS X, so use the revivied
_gtk_elide_underscores.

Related: #3967
2021-05-24 17:39:05 -04:00
Matthias Clasen
dab7ceaa24 Bring back elide_underscores
This used to live in gtktoolbar.c, which is gone.
We still need it, so put it in gtkprivate.c.
2021-05-24 17:37:05 -04:00
Matthias Clasen
a74420bc1a menubutton: Enable F10 for primary menus
Add a ::primary property to GtkMenuButton, which can
be set to make the menu activatable with F10, like
menubars.
2021-05-24 17:27:40 -04:00
Chun-wei Fan
943559da67 gtk/meson.build: Fix linking on Visual Studio 2013
Visual Studio 2013's linker does not suport `/WHOLEARCHIVE:`, so just
explicitly extract the objects from the static libraries that will
form the final GTK DLL.
2021-05-24 10:30:34 +08:00
Matthias Clasen
281bb5e2c4 treeviewcolumn: Use focusable when we mean it
The focusable property has taken over the role that
can-focus had in GTK 3.
2021-05-23 11:20:00 -04:00
Matthias Clasen
eb61f0fc63 treeexpander: Use focusable where we mean it
This does not fix keyboard activation for tree expanders,
but it is more correct than using can-focus.
2021-05-23 11:20:00 -04:00
Matthias Clasen
105b12f807 togglebutton: Fix mnemonic activation
We want to grab the focus when we're focusable, so
look at the focusable property.
2021-05-23 11:20:00 -04:00
Matthias Clasen
882893259d floxbox: Fix focus navigation
We want to find focusable children, so we need to look at
the focusable property, not at can-focus. This is a change
from GTK 3, where can-focus was the correct property to
look at.
2021-05-23 11:20:00 -04:00
Matthias Clasen
052917a67d label: Fix mnemonic activation
The intention of the code is to find a focusable ancestor,
so it needs to look at the focusable property, not at
can-focus. This is a change from GTK 3, where can-focus
was the correct property to look at.

Fixes: #3965
2021-05-23 11:19:40 -04:00
Matthias Clasen
be944053e0 docs: More syntax fixes
The syntax for interface links is [iface@...], not
[interface@...].
2021-05-22 21:21:10 -04:00
Matthias Clasen
8bcc6b1d96 docs: Fix up syntax
There's no [type_func@...[ syntax, it is all [func@...].
2021-05-22 20:56:14 -04:00
Matthias Clasen
40f292cb13 docs: Sync up debug flag information 2021-05-22 20:46:59 -04:00
Matthias Clasen
601a8de422 treemodel: Cosmetic docs changes 2021-05-22 20:46:59 -04:00
Matthias Clasen
fe564318b6 sortlistmodel: Cosmetic docs changes 2021-05-22 20:46:16 -04:00
Matthias Clasen
09244edc15 expression: Cosmetic docs changes 2021-05-22 17:28:10 -04:00
Matthias Clasen
f5f8f83e3e textbuffer: Cosmetic docs changes 2021-05-22 17:25:27 -04:00
Matthias Clasen
74a39bbae0 textview: Cosmetic docs changes 2021-05-22 17:25:27 -04:00
Matthias Clasen
3ab34ffdc0 text: Cosmetic docs fixes 2021-05-22 17:25:26 -04:00
Matthias Clasen
13a93489b7 widget: Cosmetic docs changes 2021-05-22 17:25:26 -04:00
Matthias Clasen
b35e02db20 shortcutscontroller: Cosmetic docs changes 2021-05-22 17:25:26 -04:00
Matthias Clasen
2d12a7d9ee directorylist: Cosmetic docs changes 2021-05-22 17:25:26 -04:00
Matthias Clasen
9a7e4f4304 eventcontroller: Cosmetic docs changes 2021-05-22 17:25:26 -04:00
Matthias Clasen
876104835e sorter: Cosmetic docs changes 2021-05-22 17:25:26 -04:00
Matthias Clasen
786e28fec0 filter: Cosmetic docs changes 2021-05-22 17:25:26 -04:00
Matthias Clasen
91f7b9663f gtk: Clean up docs syntax
Replace leftover gtk-doc syntax (#Type) with backquotes.
2021-05-22 17:25:26 -04:00
Matthias Clasen
f5bd9f721c Merge branch 'wip/exalm/check-activate' into 'master'
checkbutton: Don't allow to uncheck radios by activating them

See merge request GNOME/gtk!3569
2021-05-21 02:06:58 +00:00
Matthias Clasen
4a0d3d7acc docs: Reduce redundancy
Remove a boatload of "or %NULL" from nullable parameters
and return values. gi-docgen generates suitable text from
the annotation that we don't need to duplicate.

This adds a few missing nullable annotations too.
2021-05-20 20:45:06 -04:00
Matthias Clasen
7fe0610b68 introspection: Stop using allow-none
allow-none has been deprecated for a long time
already. Instead use optional and nullable everywhere.
2021-05-20 19:17:49 -04:00
Matthias Clasen
8ba16eb4f1 Documentation fixes
Mostly fixing up indentation of continuation lines,
and other small cleanups.
2021-05-20 19:17:49 -04:00
Matthias Clasen
ab6a5be0f8 Fix documentation syntax
Properties use : in their link syntax.
2021-05-20 19:16:59 -04:00
Matthias Clasen
94b0907534 Merge branch 'wip/exalm/switch-icons-2' into 'master'
icons: Fix switch-off icon

See merge request GNOME/gtk!3571
2021-05-20 22:49:29 +00:00
Alexander Mikhaylenko
0017b4b69a icons: Fix switch-off icon
It wasn't converted to paths and so wasn't rendered correctly.
2021-05-20 23:36:30 +05:00
Matthias Clasen
bff7ac4a1d popover: Update docs
Remove mention of show/hide animations, and mention
cascading close instead.

Fixes: #3960
2021-05-20 09:18:47 -04:00
Alexander Mikhaylenko
fb6c6c85bf checkbutton: Don't allow to uncheck radios by activating them
Do the same check as when clicking.
2021-05-20 14:38:33 +05:00
Alexander Mikhaylenko
bad01edd2c checkbutton: Sync the indicator state with the widget
Clicking the whole check button toggles it, so make sure the hover and
active states are propagated to the indicator like in GTK3.
2021-05-20 12:17:45 +05:00
Matthias Clasen
7de266a620 Merge branch 'wip/carlosg/sequence-accepted-in-group' into 'master'
gtkgesture: Apply gesture group state after setting up sequence

Closes #3946

See merge request GNOME/gtk!3560
2021-05-18 10:58:19 +00:00
Carlos Garnacho
6b7b232114 gtkwindow: Fix "shadowed" checks for GTK grabs
We iterate here from the target widget up the toplevel checking
for the previous and new grab, there's however 2 bugs here:
- The check for is_shadowed was different to the check for was_shadowed
- The loop started with the assumption that the widgets did not hold
  a grab, just to change it if the grab widget was found. (or maybe
  it's the other way around? it's unclear with the differing checks
  for past/present state).

Make these checks consistent, and ensure we start with the right
assumption for the past/present grabbing state, and accounting that
new/old grab widgets may or may not be part of the pick stack.
2021-05-18 00:16:55 +02:00
Carlos Garnacho
0a5d21ca9e gtkwindow: Rename function
With gtk_grab_notify_foreach() just taking care of emitting crossing
notifications due to the GTK grab change, rename it to a more apt
gtk_synthesize_grab_crossing().
2021-05-18 00:16:48 +02:00
Carlos Garnacho
f003a4c6cc gtkwindow: Simplify GTK grab notification
The _gtk_widget_grab_notify() function just (maybe) did a) reset
controllers and b) hide toplevels. The second part was a testing
remnant introduced in commit 024d832d94, not part of the original
fix.

Do the former more concisely, called from the place where we figure
out whether a widget's ability to receive events changed due to
GTK grabs. It's across those changes that we are interested in
resetting the controllers.

With the gestures being reset both ways, GtkWindowHandle (and
probably other) gestures are now able to reset after a GTK grab
takes input away (e.g. GtkMenuButton). This could be seen as
a sudden jump the next time they'd be dragged with the mouse,
as the gesture would "resume" the previous interaction.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3942
2021-05-18 00:16:48 +02:00
Carlos Garnacho
53df32e6cf gtkgesture: Apply gesture group state after setting up sequence
When a new sequence is added to a GtkGesture, its state is looked
in other gestures in the same group, and made to match in this
gesture. This however happened a bit too early, before the
gesture touchpoint was fully set up. As this may result in signal
emission and whatnot, it's a good idea to make it happen with a
fully set up touchpoint.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3946
2021-05-18 00:16:12 +02:00
Alexander Mikhaylenko
4f16e661cf theme: Specificity bump for dropdowns
Fix a fallout from d56711b5d8
2021-05-17 23:26:08 +05:00
Alexander Mikhaylenko
d56711b5d8 listitemwidget: Have .activatable style class if the item is activatable
Match GtkListBox, so it's possible to use the same styles for them.

Update GtkListView and GtkGridView docs to reflect that, fix a few gtk-doc
formatting leftovers along the way.
2021-05-17 18:10:35 +05:00
Alexander Mikhaylenko
27e662cfd1 emojichooser: Set selection-mode=none on the toolbar flowbox
Selection is never used there, avoid unwanted selected states if clicking
outside the buttons.
2021-05-17 14:09:03 +05:00
Matthias Clasen
07b5072c9c Merge branch 'matthiasc/for-master' into 'master'
inspector: Use new get_egl_display apis

See merge request GNOME/gtk!3546
2021-05-14 00:40:05 +00:00
Matthias Clasen
8c75e6896e inspector: Use new get_egl_display apis
This makes the code a bit more concise.

Also, get WGL information when we are using it.
2021-05-13 15:25:18 -04:00
Matthias Clasen
bf454e948d Fix picking with transforms
When transforms include scales, we weren't picking
children properly. The special-case in gtk_widget_do_pick
only applies to 2D translations.
2021-05-12 20:58:16 -04:00
Emmanuele Bassi
8ef353a970 docs: Fix indentation of the arguments
The indentation of new lines inside documentation blurbs must be smaller
than 4 spaces, otherwise the Markdown parser will consider the line to
be part of a pre-formatted code block.

Fixes: #3945
2021-05-12 17:38:07 +01:00
Matthias Clasen
ea162ed016 inspector: Avoid a crash with GL variants
When configuring the inspector display, preserve
debug flags that affect which GL variant we pick.
Otherwise, we may end up with a GLX context on the
default display, and an EGL context on the inspector
one. This hopelessly confuses libepoxy, and things
don't go well when that happens.
2021-05-10 21:25:08 -04:00
Matthias Clasen
e2aa161590 inspector: Show EGL info for X11 as well 2021-05-10 21:24:50 -04:00
Matthias Clasen
a723baec4b inspector: Show text direction
This is not a property, so show it on the misc tab.
2021-05-10 20:55:43 -04:00
Matthias Clasen
564d835fba Merge branch 'broadway-display-scale' into 'master'
broadway: Add a setter for display scale

Closes #3934

See merge request GNOME/gtk!3538
2021-05-10 20:11:38 +00:00
Matthias Clasen
b13c2e17f1 inspector: Support scale changes on Broadway 2021-05-10 10:55:41 -04:00
Matthias Clasen
7259be35b0 Merge branch 'file-replace-trap' into 'master'
print-editor: Fix saving

See merge request GNOME/gtk!3536
2021-05-09 23:06:49 +00:00
Matthias Clasen
0108ffe059 inspector: Fix saving css
g_file_replace_contents() does not accept -1
as length, unlike similar apis.
2021-05-09 11:19:43 -04:00
Matthias Clasen
fef9f1187d Merge branch 'matthiasc/for-master' into 'master'
fontbutton: Quote font family names

See merge request GNOME/gtk!3534
2021-05-09 14:43:03 +00:00
Alexander Mikhaylenko
435a8f6337 theme: Fix GtkActionBar spacing 2021-05-09 17:01:36 +05:00
Alexander Mikhaylenko
2c8e4573f2 actionbar: Fix the css node docs 2021-05-09 16:55:48 +05:00
Alexander Mikhaylenko
b45721373a action-bar: Add start and end style classes to GtkActionBar boxes
Make it possible to add spacing to them from the theme without affecting
the center child should it happen to be a box.
2021-05-09 16:54:59 +05:00
Matthias Clasen
e0ebf4e401 fontbutton: Quote font family names
Otherwise, spaces in family names will trip up
the css parser.
2021-05-08 20:54:50 -04:00
Marco Trevisan (Treviño)
0769dfbd32 emoji: Try to load emoji data using both language and territory
When loading the emoji data we just try to get the data for a language
while there may be territory specializations and emojibase provides
them.

So, split the loading function and try to load the data for the fully
defined language string (i.e. `it-ch`) before loading the generic one
for the language (i.e. `it`) and eventually falling back to the generic
english.
2021-05-07 16:10:29 +02:00
Matthias Clasen
633d783f0c Merge branch 'carlosgc/calendar-day' into 'master'
calendar: value of day property is shifted by 1

See merge request GNOME/gtk!3524
2021-05-07 11:42:59 +00:00
Matthias Clasen
3ad7d304bd Merge branch 'update-emoji-data' into 'master'
emoji: Update data to CLRD v39

See merge request GNOME/gtk!3520
2021-05-07 11:05:46 +00:00
Carlos Garcia Campos
7b2b8b86e1 calendar: do not allow to set 0 as day
We no longer unselect the current day when 0 is set, so update the
documentation and the property definition.
2021-05-07 12:13:49 +02:00
Carlos Garcia Campos
1f8985e476 calendar: value of day property is shifted by 1
The day is a number between 1 and 31 and that's what we get from
GDateTime.
2021-05-07 11:10:36 +02:00
Matthias Clasen
59cc3a9f86 Merge branch 'hidden-mnemonics-fix' into 'master'
label: Make hidden mnemonics work again

See merge request GNOME/gtk!3518
2021-05-07 00:34:33 +00:00
Matthias Clasen
febd143ac8 Merge branch 'emoji-data-prefix-fix' into 'master'
emoji: Use a portable and configuration-dependent path to load the data

See merge request GNOME/gtk!3522
2021-05-06 15:33:15 +00:00
Marco Trevisan (Treviño)
4a4525a65d emoji: remove duplicated include 2021-05-06 16:00:06 +02:00
Marco Trevisan (Treviño)
c98dd1afb9 emoji: Use a portable and configuration-dependent path to load the data
Load the emojis data in all the platforms, respecting the configured
GTK_DATA_PREFIX
2021-05-06 16:00:06 +02:00
Dan Cîrnaț
bd7b29a6c4 Only compile gtkmountoperation-stub if the X11 backend is not enabled 2021-05-06 10:38:41 +02:00
Marco Trevisan (Treviño)
ba3cbac21a emoji: Update data to CLRD v39
This is based on version 6.2.0 of emojibase, containing CLRD 39

http://cldr.unicode.org/index/downloads/cldr-39
https://github.com/milesj/emojibase/blob/b3c9a78/packages/data/CHANGELOG.md
2021-05-06 05:08:37 +02:00
Matthias Clasen
d94c386320 label: Make hidden mnemonics work again
The change in 875a92b95f made labels strip
out underlines earlier, but overlooked that this made
mnemonics not work before the timeout to show them
has passed. That was unintentional. Make mnemonics
work regardless of their visibility, again.
2021-05-05 22:55:52 -04:00
Matthias Clasen
65017a0031 Merge branch 'bilelmoussaoui/trick-gir-list-position' into 'master'
gtk: trick g-ir scanner to add INVALID_LIST_POSITION

See merge request GNOME/gtk!3513
2021-05-05 00:04:16 +00:00
Bilal Elmoussaoui
dc5aab62c8 gtk: trick g-ir scanner to add INVALID_LIST_POSITION
without it, the define doesn't get picked in the introspection data
2021-05-05 00:45:21 +02:00
Alexander Mikhaylenko
0e58bfe90e texthandle: Add a contents css node
Allow to theme it including using css transforms to avoid having assets.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3475
2021-05-04 23:53:05 +05:00
Matthias Clasen
e3e0342db7 Merge branch 'wip/exalm/switch-icons' into 'master'
icons: Fix switch icon names

Closes #3920

See merge request GNOME/gtk!3509
2021-05-04 16:18:29 +00:00
Matthias Clasen
b1f12a0535 Merge branch 'wip/exalm/icons' into 'master'
Update icons from adwaita-icon-theme

Closes #2656

See merge request GNOME/gtk!3510
2021-05-04 16:18:00 +00:00
Alexander Mikhaylenko
60f4b07196 icons: Update from adwaita-icon-theme
Also add the missing edit-clear RTL variant.
2021-05-04 19:12:04 +05:00
Alexander Mikhaylenko
4c60dac9cb icons: Remove media-playback-start-symbolic-rtl
See https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/issues/101
2021-05-04 19:12:04 +05:00
Alexander Mikhaylenko
48d95d2d7a icons: Fix switch icon names
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3920
2021-05-04 17:49:07 +05:00
Alexander Mikhaylenko
f3633d46ca cssselector: Fix max_selector usage
Reverts 2ae8ace784 other than code style
fixes.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3100
2021-05-04 12:34:29 +05:00
Matthias Clasen
da613c504b Merge branch 'wip/exalm/textview-selection' into 'master'
textview: Selection rendering fixes

See merge request GNOME/gtk!3503
2021-05-03 23:55:46 +00:00
Alexander Mikhaylenko
316c783fce label: Update selection node and redraw on state changes
Mirror GtkText and GtkTextView.
2021-05-04 02:29:10 +05:00
Matthias Clasen
9e952bc7ff dragsource: Keep the source alive long enough
When a drop causes the event controller to be finalized
(directly or indirectly), we end up segfaulting while
trying to wrap up the drag operation. So, keep a reference
on the GtkDragSource from when the drag begins to when
it is done.

This fixes a crash in gnome-todo when dragging tasks.
2021-05-03 17:00:17 -04:00
Alexander Mikhaylenko
e4832a9e94 text: Queue redraw on state changes
Mirror GtkTextView.
2021-05-04 01:20:53 +05:00
Alexander Mikhaylenko
70ee86c951 textlayout: Clip selection bounds to the line extents
The rest of the line will be painted separately.
2021-05-04 01:08:19 +05:00
Alexander Mikhaylenko
167134e1a8 textlayout: Support fully transparent selection text
Pango treats 0 alpha value as a unset alpha, so we have to special case it.
2021-05-04 00:16:05 +05:00
Alexander Mikhaylenko
0fa4b7a249 textview: Invalidate selection when its style changes 2021-05-04 00:16:05 +05:00
Alexander Mikhaylenko
f413d5ef22 textlayout: Only special case selection rendering for opaque colors
If the selection is partially transparent, it may still be desirable to
see the colors from tags underneath.
2021-05-04 00:16:05 +05:00
Matthias Clasen
a49ff5a1c4 textbtree: Static analysis fixes 2021-05-03 07:44:38 -04:00
Matthias Clasen
faf56a8abe stack: Static analysis fixes 2021-05-03 07:44:38 -04:00
Matthias Clasen
e510538f37 printoperation: Static analysis fixes 2021-05-03 07:44:38 -04:00
Matthias Clasen
b2bf48c3f0 listbase: Static analysis fixes 2021-05-03 07:44:38 -04:00
Matthias Clasen
cf0330d601 filterlistmodel: Static analysis fixes 2021-05-03 07:44:38 -04:00
Matthias Clasen
2f51f5affe emojichooser: Static analysis fixes 2021-05-03 07:44:38 -04:00
Matthias Clasen
a69ae36a99 fnmatch: Static analysis fixes 2021-05-03 07:44:38 -04:00
Matthias Clasen
6863528df1 a11y: Static analysis fixes 2021-05-03 07:44:38 -04:00
Matthias Clasen
f9d6134247 inspector: Improve monitor information display
Avoid a nested listbox, show the connector,
don't show information we don't have. Also,
disconnect all signal handlers from the display
when the inspector is going away.
2021-05-02 21:02:09 -04:00
Matthias Clasen
dfecc8fe02 inspector: Show keyboard layouts 2021-05-02 21:02:09 -04:00
Matthias Clasen
0768cfb7df shortcuts: Ignore consumed modifiers for mnemonics
This is necessary to make mnemonics like Alt-1 work in
layouts where numeric keys are shifted, like AZERTY.

Fixes: #3912
2021-05-02 18:33:44 -04:00
Matthias Clasen
32280090fe Check for root being a GtkWindow in a few places
These things were showing up as crashes during DND,
when the root is a GtkDragIcon. I'm sure there's more.
2021-04-30 13:45:39 -04:00
Geyslan G. Bem
65575fe0d0 gtkplacessidebar.c: fix coding style
Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
2021-04-28 08:42:59 -03:00
Geyslan G. Bem
1635998ac3 gtkplacessidebar.c: add bookmark null checking
This fixes nautilus crash and perhaps other callers issues.
Nautilus (and sometimes glib) crashes with malformed URI inside of the
bookmarks file .config/gtk-3.0/bookmarks when it has no LABEL.

This is result from the closed glib MR #2065 analysis and agreement.
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2065#note_1091979

Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
2021-04-27 11:58:31 -03:00
Matthias Clasen
aa569acaa1 window: Don't let solid-csd linger
Just from reading the code, it seems that we
should unset .csd and .solid-csd at the same
time, since the are mutually exclusive and
we unset them here so realize() can set one
of them again.
2021-04-24 11:29:19 -04:00
Matthias Clasen
1c1c030b8e Simplify shadow conditions
The code in gtkwindow.c for dealing with the various
combinations of client-side decorations and client-side
shadows is entirely too complicated.

This commit does not really clean it up, but simplifies
one of the shadow conditions far enough to make some
sense.

With this change, I get the expected decorations in
all the cases I can easily reproduce locally.
2021-04-24 11:07:20 -04:00
Matthias Clasen
628d5406d7 x11: Fix shadows
Commit a2cd21cab6 changed a condition and inadvertedly
broke client-side shadows on X11. Change this back.

Fixes: #3896
2021-04-24 09:19:18 -04:00
Matthias Clasen
b2f3a3220e a11y: Don't sent redundant property changes
We were sending a property changed event for every set
property whenever we were sending any updates.
2021-04-23 07:34:00 -04:00
Matthias Clasen
13f9ca60d5 Merge branch 'gtk4-listbox-selection' into 'master'
Allow repeated selection extension on gtklistbox

Closes #3887

See merge request GNOME/gtk!3461
2021-04-22 23:29:45 +00:00
Emmanuele Bassi
8789e78796 a11y: Update the level property for tree expanders
We already have the depth of a tree expander in order to compute the
indentation.

Fixes: #3892
2021-04-22 14:40:35 +01:00
Matthias Clasen
be927d9ce6 Merge branch 'resize-borders' into 'master'
window: Fix up resize borders

Closes #3856

See merge request GNOME/gtk!3467
2021-04-22 11:13:20 +00:00
Matthias Clasen
dcb5a74275 Merge branch 'a11y-debug' into 'master'
Some a11y improvements

See merge request GNOME/gtk!3455
2021-04-22 11:04:30 +00:00
Matthias Clasen
8f70f1449d Merge branch 'gtk4-compose-modifiers' into 'master'
imcontextsimple: Ignore more modifiers in compose

See merge request GNOME/gtk!3468
2021-04-22 10:58:24 +00:00
Matthias Clasen
b25bc36d33 Merge branch 'wip/muktupavels/solid-csd' into 'master'
theme: fix solid-csd style

See merge request GNOME/gtk!3460
2021-04-22 10:48:22 +00:00
Matthias Clasen
da4e2a2976 theme: Make solid borders look better
As pointed out by Alberts Muktupāvels, without this,
we are missing the inner edge of the frame.
2021-04-22 06:45:28 -04:00
Matthias Clasen
f8dcda80cf theme: Fix solid-csd borders
The selectors did not apply anymore.
Based on a patch by Alberts Muktupāvels.
2021-04-22 06:45:28 -04:00
Matthias Clasen
01d81ffc17 window: Make resize border size independent
Deriving the resize border size from the shadows
carries the risk that we might end up with uneven
resize borders (or none at all, on some sides).

So, justs enforce that we have a big enough shadow
width on all sides.
2021-04-22 06:45:28 -04:00
Ulli Kehrle
c78ec37d83 imcontextsimple: Ignore more modifiers in compose
Previously it was impossible to compose characters on higher levels of
some keyboard layouts as pressing the level selection key would just
exit compose mode.

Examples for affected keyboard layouts include the Latvian
apostrophe-variant "lv(apostrophe)" (latched third level), the extended
German keyboard layout "de(e1)" (latched fifth level) as well as the
multilingual Canadian keyboard layout "ca(multix)" and the German
neo-layout "de(neo)" and its descendants (shifted fifth level).

To reproduce, set a compose key and select the Latvian apostrophe layout.
Notice that you now can input [ by pressing first the ' and then the 8-key.
Then pressing <compose>'8'8 should produce ⟦, but prior to this patch it
did not.
2021-04-22 03:56:30 +02:00
Matthias Clasen
a2cd21cab6 window: Tweak resize borders
Make windows resizable in the padding and border
area of the css box as well. This naturally makes
solid-csd borders work again.
2021-04-21 21:09:09 -04:00
Matthias Clasen
760e60fa04 window: Fix up resize borders
The invisible resize borders have been wider than they
should, for a while. Go back to a size close to what
we have in GTK3.

To summarize: resize borders will be at most 12 pixels
on each size, but never wider than the windows shadow.
The resize corners have 'legs' of 24 pixels where you
still get a corner resize cursor.

Fixes: #3856
2021-04-21 20:09:38 -04:00
John Renner
81914f466d Allow repeated selection extension on gktlistbox 2021-04-21 14:18:29 -07:00
Matthias Clasen
ebd8338795 Merge branch 'im-cursor-pos' into 'master'
imcontext: Fix cursor positions

Closes #3885

See merge request GNOME/gtk!3464
2021-04-21 17:43:12 +00:00
Matthias Clasen
11d637f869 Merge branch 'wip/oholy/placesview-default-location-regression' into 'master'
placesview: Open location even if mount was not found

Closes nautilus#1811

See merge request GNOME/gtk!3435
2021-04-21 12:22:17 +00:00
Emmanuele Bassi
b24fedda49 a11y: Update the labelled-by relation of GtkTreeExpander
Whenever we change the :child property, we need to update the
labelled-by relation.
2021-04-21 11:43:16 +01:00
Emmanuele Bassi
57cc2c4918 a11y: Set state on the GtkTreeExpander widget
Instead of setting it on its internal child.
2021-04-21 11:43:11 +01:00
Matthias Clasen
15483ac9df imcontext: Fix cursor positions
gtk_im_context_get_preedit_string is documented to
return the cursor position as a character offset,
not a byte count. So return that.

Fixed: #3885
2021-04-21 06:28:52 -04:00
Emmanuele Bassi
8f9145109b a11y: Pair window:activate with window:deactivate signal
Orca needs both events in order to decide whether or not to subscribe to
other event/state changes in a window.
2021-04-21 10:22:20 +01:00
Matthias Clasen
99750ac7ed a11y: Realize notebook tabs when switching
We're not moving focus here, so we can't rely
on that to conjure the a11y objects into existence.
2021-04-20 20:35:22 -04:00
Alberts Muktupāvels
f89bad7f33
theme: fix solid-csd style
Move .solid-csd style out of .csd parent and adjust it so windows
look similar / same to GTK 3 windows:
- 4px padding.
- extra shadow.

https://gitlab.gnome.org/GNOME/gtk/-/issues/3879#note_1086351
https://gitlab.gnome.org/GNOME/gtk/-/issues/3879#note_1086377
2021-04-20 22:02:10 +03:00
Matthias Clasen
b97d0a3940 a11y: Avoid spurious selection changed events
Only send selection-changed events when we either
had a non-empty selection before, or have one now.

This should help orca speak the right things, and
not the wrong things.

Related: #3549
2021-04-20 13:23:56 -04:00
Emmanuele Bassi
639932ad8a a11y: Emit window:activate event
Orca uses the window:activate event type to track top levels, and avoid
being spammed by events coming from non-focused windows.
2021-04-20 17:24:13 +01:00
Matthias Clasen
1a944b2824 stackswitcher: Set accessible label properties
This makes the tabs in about dialogs come out as
'About', 'Credits', and 'System', instead of
'Tab', 'Tab', 'Tab'.
2021-04-19 22:11:55 -04:00
Matthias Clasen
ae83b79984 a11y: Emit focus events
Orca relies on these to keep track of the focus location,
ignoring the focused state. With this change, orca can
once again speak text in entries as I type.
2021-04-19 21:29:17 -04:00
Matthias Clasen
5f2c08cef1 a11y: Make things appear on focus in
We are starting with a pretty empty a11y object tree,
and we want orca to bring more of it into existence
by navigating the tree. But that only happens when we
send it events. Primarily focus events, which come in
from GTK via the platform_change mechanism. So realize
the context when we are sending platform_changes,
otherwise, orca never gets the mesage.
2021-04-19 20:39:32 -04:00
Matthias Clasen
a455db01a0 a11y: Actually set accessible roles
With most context realization happening inside
GtkAtspiContext in response to D-Bus calls, the
code in gtk_widget_realize_at_context that sets
the role is not executed for most accessibles,
causing them to be stuck with the 'filler' role
that makes orca ignore them.

To fix this, split gtk_widget_realize_at_context
into the actual context realization (getting on
the bus) and the setting of widget-specific
properties, and do the latter part when the
widget is rooted.

This makes accerciser report proper roles for
entries and buttons. Orca still has an issue
with getting the hierarchy populated.
2021-04-19 19:22:20 +01:00
Matthias Clasen
9e8187bdc4 a11y: Track window states more closely
Orca ignores events unless the object is inside an object
with role window and states ACTIVE and SHOWING. To arrange
for this, introduce a new ACTIVE platform state, and set it
for windows when they are active.

This gets orca to be a lot more talkative.
2021-04-19 19:22:20 +01:00
Matthias Clasen
9fbd11e1be a11y: Add the root object to the cache
Not 100% sure this is necessary, but maybe it helps
to get orca up to speed.
2021-04-19 19:22:20 +01:00
Matthias Clasen
aa09737d4d atspicontext: Remove an unused field
We don't make any use of the cache field, so drop it.
2021-04-19 19:22:20 +01:00
Emmanuele Bassi
dbe4543969 Merge branch 'gtksecurememory-updates' into 'master'
gtksecurememory: Request that secure memory not be dumped to disk

See merge request GNOME/gtk!3452
2021-04-17 23:46:38 +00:00
Jason Francis
b27ec5ebde
meson: check for madvise() 2021-04-17 19:30:20 -04:00
Matthew Garrett
6622ebb310
gtksecurememory: Request that secure memory not be dumped to disk
Linux 3.4 added support for the MADV_DONTDUMP option to madvise(), which
requests that the covered memory not be included in coredumps. It makes
sense to use this to prevent cases where application crashes could
result in secrets being persisted to disk or included in dumps that are
uploaded to remote servers for analysis. I've avoided making this fatal
since there's a chance this code could be built on systems that have
MADV_DONTDUMP but run on systems that don't.
2021-04-17 19:29:42 -04:00
Matthias Clasen
a804e4bd8c a11y: Add more debug spew
This is in an attempt to figure out why orca won't speak.
2021-04-17 12:00:17 -04:00
Matthias Clasen
a04ce41799 testatcontext: Print out platform changes
This helps debugging what changes orca sees.
2021-04-17 12:00:11 -04:00
Matthias Clasen
379bb6c9f5 placesview: Fix server mount feedback
We weren't properly resetting the in-entry progress.
2021-04-16 19:34:24 -04:00
Matthias Clasen
3df3a0499f placesview: Fix mounting remote locations
This was broken by a stupid copy-paste error.
2021-04-16 19:17:37 -04:00
Matthias Clasen
0d308d09f3 mountoperation: Some cosmetics
Fix up the dialog minimally.
2021-04-16 19:05:14 -04:00
Matthias Clasen
1331d5cf97 cssimageurl: Remove direct pixbuf use
Rely on the gdkpixbufutils api that gives us
a paintable.
2021-04-16 18:27:40 -04:00
Matthias Clasen
91f3f5c63b image, picture: Move pixbuf code to gdkpixbufutils
This cleans up and moves the code to load files
while taking the scale into account. Along the way,
we drop the last uses of GdkPixbufAnimation, and
consolidate the pixbuf using code in one place.
2021-04-16 18:27:40 -04:00
Matthias Clasen
08b101ace8 pixbufutils: Remove an unused function 2021-04-16 09:19:06 -04:00
Matthias Clasen
5e53c0473a Merge branch 'latest.glib.msvc' into 'master'
Fix builds against latest stable GLib with MSVC

See merge request GNOME/gtk!3443
2021-04-16 12:25:43 +00:00
Matthias Clasen
4d19de4e03 window: Fix deferred focus unsetting
In commit 4a76abffd4, we deferred unsetting focus
and default until after the next draw, overlooking the
case where the focus is set to another widget before we
ever get to the unsetting.

Fixes: #3413
2021-04-16 07:35:26 -04:00
Chun-wei Fan
153019a794 GTK: Fix builds against latest stable GLib with MSVC
GLib-2.68.x now considers warning C4098 ('void' function returning a value) as
an error, so avoid doing that.
2021-04-16 11:39:24 +08:00
Matthias Clasen
24cd05672e Merge branch 'im-context-event-leak' into 'master'
imcontext: Eat key events during preedit

See merge request GNOME/gtk!3440
2021-04-15 22:16:49 +00:00
Matthias Clasen
9f6b3e179f themes: Make fallback work a bit better
One case we did not include in fd329e0ec5 is

Adwaita-dark -> Default:dark

It turns out that it is needed.
2021-04-15 17:09:46 -04:00
Matthias Clasen
20fb64704d imcontext: Eat key events during preedit
Avoid passing through random key press or release
events while we are showing preedit. That prevents
'accidents' like typing Ctrl-. bringing up the
Emoji chooser during preedit, or hitting Ctrl-a
after the Compose key moving the 'dot' around in
vim in terminals.
2021-04-15 16:59:02 -04:00
nana-4
c6483d431f theme: Use -gtk-icon-filter for full-color icons
Not for symbolic icons.

Don't apply `-gtk-icon-filter: opacity(0.5);` to the symbolic icons as
they already have the "gray" colors indicating the disabled state.
Symbolic icons can be styled using the `color` property.

Also remove the obsolete comment.
2021-04-15 18:39:08 +09:00
Ondrej Holy
ddeabc7e19 placesview: Open location even if mount was not found
Some locations have to be mounted, but their mounts are not user-visible
(e.g. smb-browse). Though this is maybe a bit weird, it is how it works
for years. The problem is that the commit 267ea755, which tries to get the
default location for opening, caused regression as it doesn't expect such
possibility. Before this commit, such locations were opened without any
issue, but nothing happens currently after clicking to "Connect" except of
clearing the "Connect to Server" entry. Let's fallback to the original
location if the mount was not found to fix this regression.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1811
2021-04-13 17:33:03 +02:00
Matthias Clasen
13ece4ee9b Make gtk_test_init work without assertions
The g_test_init macro 'helpfully' refuses to work when
assertions are disabled. So we just use the function.
2021-04-12 21:22:46 -04:00
Matthias Clasen
ecfba2d31b Inspector: Fix a possible undefined use 2021-04-12 21:22:46 -04:00
Matthias Clasen
367dfee36e Fix unused variable warnings
These happen for variables which are only used
in assertions, when assertions are disabled.
2021-04-12 21:22:46 -04:00
Matthias Clasen
3ad56a762f Merge branch 'grouped-toggle-fix' into 'master'
togglebutton: Fix expected group behavior

See merge request GNOME/gtk!3425
2021-04-12 02:40:43 +00:00
Matthias Clasen
233e662294 togglebutton: Fix expected group behavior
The expectation is that a grouped button stays
active when you click it. Grouped check buttons
behave this way, and grouped toggle buttons should
too.
2021-04-11 18:29:53 -04:00
Matthias Clasen
e2420f62fe menubutton: Propagate focus-on-click
Propagate the focus-on-click setting to the button
inside, so that setting menubuttons as !focus-on-click
works as expected. This helps for menubuttons in
header bars, where dragging on the button will otherwise
steal focus from the content.
2021-04-11 15:32:15 -04:00
Matthias Clasen
4a76abffd4 window: Defer focus setting until after paint
Commit 3dbf5038fa tried to defer focus changes
until after rendering is done. But it failed to do so, since
the toplevel ::render handler is still before rendering of
popups that are attached to that toplevel. To do this
properly, we need to do it in the AFTER_PAINT frame clock
phase.

Fixes: #3725
2021-04-09 19:44:10 -04:00
Matthias Clasen
9313d4b6b4 scrolledwindow: Stop using scroll cursors
We used to override cursor to use all-scroll while the
content is being scrolled. Unfortunately, there is several
problems with this:
- It is really only expected certain devices, and we don't
  have the device information on Wayland
- With the way cursor setting works in GTK4, non-NULL cursors
  of the content (eg the text views ibeam) win, making the
  scroll cursor not show up
- Under X11, we seem to miss scroll end events and then
  the scroll cursor gets stuck
Therefore, just remove this feature.
2021-04-09 08:26:09 -04:00
Matthias Clasen
288a5d4151 textview: Fix a problem with the last line
Sometimes, we missed the last line for display.

Fixes: #3835
2021-04-06 11:09:05 -04:00
Matthias Clasen
303ff60d5e modelbutton: Avoid a crash
We may not have a popover menu ancestor. The check for
this was forgotten in one of the branches here.

Fixes: #3831
2021-04-05 14:06:42 -04:00
Matthias Clasen
b79eb55b34 window: Actually enable the inspector by default
427d216081 changed the default in the schema,
but didn't handle cases where the schema isn't found.
2021-04-05 11:54:37 -04:00
Matthias Clasen
2e18f1b6e3 textlayout: Remove an unused function 2021-04-05 08:47:53 -04:00
Matthias Clasen
6cf712591f textlayout: Avoid allocations for line iteration
No need to collect the lines firs, and allocate memory
for that. We can just iterate over them right away.
2021-04-04 23:42:58 -04:00
Matthias Clasen
b32cd5d328 textlayout: Introduce some locals
No need to call _gtk_text_buffer_get_btree over and over.
2021-04-04 22:44:09 -04:00
Matthias Clasen
2af99bd65e textlayout: Create the cursor snapshot on demand
We don't need it all the time.
2021-04-04 22:27:53 -04:00
Matthias Clasen
5b0ea70d1c textattributes: Small docs fix 2021-04-04 22:27:53 -04:00
Matthias Clasen
d719a3d877 textbtree: Return tags in a GPtrArray
One of the callers prefers that, it lets us avoid
copying the array in one place, and generally makes
for better code.
2021-04-04 22:27:53 -04:00
Matthias Clasen
b0df8910ba textlayout: Only get selection color once
No need to do this for every paragraph that is
inside the selection.
2021-04-04 14:20:25 -04:00
Matthias Clasen
5b8bf04035 texttag: Just use qsort
No point in trying to optimize this.
2021-04-04 14:20:25 -04:00
Matthias Clasen
58e44e296f textbtree: Inline node data handling 2021-04-04 14:20:25 -04:00
Matthias Clasen
0334d002c0 textbtree: Speed up _gtk_text_btree_find_line_top
Another place where we can avoid allocating a stack
piecemeal.
2021-04-04 14:20:25 -04:00
Matthias Clasen
d731ce49ad textbtree: Don't opencode realloc
We can just use g_realloc here.
2021-04-04 14:20:25 -04:00
Matthias Clasen
a93614409e textbtree: Speed up _gtk_text_line_char_index
No need to allocate a stack piecemeal here.
2021-04-04 14:20:25 -04:00
Matthias Clasen
214e2d14be textbtree: Avoid malloc in one place 2021-04-04 14:20:25 -04:00
Matthias Clasen
67ee6b2740 textlayout: Don't call render_para too much
render_para produces no nodes for an empty paragraph.
Don't call it over and over for those.
2021-04-04 14:20:25 -04:00
Matthias Clasen
07a3fb833c textlayout: Remove some unnecessary code
The same field is set again 2 lines down.
2021-04-04 14:20:25 -04:00
Matthias Clasen
ff38d8cdc0 Modernize error underlines
Implement PANGO_UNDERLINE_ERROR as a dotted line, instead of
squiggly, which looks quite dated.
2021-04-03 13:52:56 -04:00
Matthias Clasen
a8e8e04496 settings: Make font-size changes apply immediately
We need to invalidate the style when font-size changes,
because we propagate this value through the initial
value of the CSS font-size property, and it will not
be recomputed otherwise.
2021-04-02 23:04:09 -04:00
Matthias Clasen
91bcf6f0ba immulticontext: Unset client widget on delegate change
Forgetting to do so was causing the Wayland im context
to leave behind a dead event controller. This was showing
up as a crash when closing the inspector after changing
the im-module property of a GtkText widget. The crash
was delayed until closing the inspector because the
inspector keeps a ref on the event controllers of the
currently shown widget.
2021-04-02 22:24:19 -04:00
Matthias Clasen
a228b2de64 imwayland: Name event controllers
This helps with debugging.
2021-04-02 22:24:00 -04:00
Matthias Clasen
23dab885cd text: Name all event controllers
This helps with debugging.
2021-04-02 22:23:03 -04:00
Matthias Clasen
e7284c23da inspector: Support copying nodes to clipboard
Add a button that copies the serialization of the
selected node to the clipboard.
2021-04-02 21:38:14 -04:00
Matthias Clasen
36da7c3075 Merge branch 'matthiasc/for-master' into 'master'
comboboxtext: Remove misleading docs

Closes #3824

See merge request GNOME/gtk!3396
2021-04-03 00:04:36 +00:00
Matthias Clasen
a3b69f1101 Merge branch 'fix-initial-font-selection' into 'master'
fontchooser: Fix initial font selection

Closes #3687

See merge request GNOME/gtk!3392
2021-04-02 23:45:59 +00:00
Matthias Clasen
9f2d1ff264 comboboxtext: Remove misleading docs
The entry is no longer accessible.
The docs were outdated.

Fixes: #3824
2021-04-02 19:44:30 -04:00
Chris Mayo
ffa9814dd0 button: Style .keyboard-activating on frameless buttons
The use of the keyboard-activating CSS class for buttons was added
in [1], but the style did not apply to buttons with has-frame=FALSE.

[1] 00923615f4 ("button: Add back visual feedback for keynav", 2021-04-01)
2021-04-02 19:24:51 +01:00
Matthias Clasen
8caadaf404 fontchooser: Fix initial font selection
The change in 740559a54f to populate the list incrementally
broke initial font selection. Fix that, by trying to select
until the incremental filling is done.

Fixes: #3687
2021-04-02 01:06:23 -04:00
Matthias Clasen
469228fcd7 Merge branch 'theme-reorg' into 'master'
Reorganize our themes

See merge request GNOME/gtk!3079
2021-04-02 03:02:49 +00:00
Matthias Clasen
fd329e0ec5 Make theme fallback working with the new names
Since we are likely going to see theme names like
Adwaita and HighContrast, make fallback work as follows:

Adwaita -> Default
Adwaita:dark -> Default:dark
HighContrast -> Default:hc
HighContrast:dark -> Default:hc-dark
HighContrastInverse -> Default:hc-dark

Other themes will fall back to Default, as before.
2021-04-01 22:02:38 -04:00
Matthias Clasen
00923615f4 button: Add back visual feedback for keynav
We lost the visual feedback for activating a button
via Space or Enter when the :active pseudo-state became
managed. Bring it back with a style class.

Fixes: #3813
2021-04-01 18:38:11 -04:00
Matthias Clasen
8e9effcc1e Merge branch 'us-intl-compose' into 'master'
Revert Compose sequence changes

Closes #3807

See merge request GNOME/gtk!3386
2021-04-01 20:01:06 +00:00
Matthias Clasen
f98abe4400 Revert Compose sequence changes
This was breaking muscle memory of people with
the us intl keyboard layout, for important keys
such as '. The unfortunate side-effect is that
our handling of <dead_acute> is a bit hampered
by sequences that don't fit the pattern. But
such is life.

Fixes: #3807
2021-04-01 15:31:21 -04:00
Chris Mayo
7216f71825 docs: Escape tags in GtkBuilder description
Fixes the tags and the rest of the gi-docgen created HTML page not being
visible in a browser.
2021-04-01 19:21:57 +01:00
Matthias Clasen
0bf3e4c25b Drop Adwaita and HighContrast themes
These themes will reappear in libadwaita in due course.
2021-04-01 12:39:30 -04:00
Matthias Clasen
8938b09bc9 Change the default theme to "Default"
We are not shipping Adwaita anymore.
2021-04-01 12:27:35 -04:00
Matthias Clasen
3654bcfbe8 Make the theme variants available as themes
This makes it easier to implement the theme switching
in widget-factory, since we don't have a variant setting.
2021-04-01 12:27:26 -04:00