Commit Graph

34750 Commits

Author SHA1 Message Date
Matthias Clasen
d802b35578 Merge branch 'wip/matthiasc/monitor-signals' into 'master'
Add enter/leave signals for monitors

See merge request GNOME/gtk!1680
2020-04-13 23:25:55 +00:00
Mathieu H
57a56538eb Remove the blacklist list in convert-emoji.c since now it is supported 2020-04-13 16:29:02 -04:00
Matthias Clasen
f97180beee inspector: Show scales other than 2
We were hardcoding that monitor scales can only be
1 or 2. Not true.
2020-04-13 09:17:46 -04:00
Matthias Clasen
64b0c63190 Merge branch 'modal-buttons' into 'master'
Modal buttons

See merge request GNOME/gtk!1679
2020-04-13 11:15:14 +00:00
Matthias Clasen
8ff540eb4c appchooserbutton: Drop the Private struct 2020-04-13 01:08:52 -04:00
Matthias Clasen
9194b7388f Add a GtkAppChooserButton:modal property
Nowadays, dialogs are expected to be attached, typically,
and that only happens when they are marked as modal.
2020-04-13 00:43:19 -04:00
Matthias Clasen
6831d3e28e fontbutton: Drop the Private struct 2020-04-13 00:32:50 -04:00
Matthias Clasen
800f1c03d5 Add a GtkFontButton:modal property
Nowadays, dialogs are expected to be attached, typically,
and that only happens when they are marked as modal.
2020-04-13 00:28:34 -04:00
Matthias Clasen
7a0355fcb1 colorbutton: Drop the Private struct 2020-04-13 00:28:11 -04:00
Matthias Clasen
15d58a868a Add a GtkColorButton:modal property
Nowadays, dialogs are expected to be attached, typically,
and that only happens when they are marked as modal.
2020-04-13 00:17:00 -04:00
Matthias Clasen
61f21fc9e9 filechooserbutton: Make dialog modal by default
This is the expected behavior, so default to it.
2020-04-13 00:12:30 -04:00
Matthias Clasen
9e068d3a46 filechooserbutton: Drop the Private struct 2020-04-12 23:57:49 -04:00
Matthias Clasen
2aa136a19c Add a GtkFileChooserButton:modal property
Nowadays, dialogs are expected to be attached, typically,
and that only happens when they are marked as modal.
2020-04-12 23:45:03 -04:00
Matthias Clasen
08fbd012ec window: Make resize cursors work for modal dialogs
We were inadvertedly not letting the grab_widget determine
a cursor. This was showing up as resize cursors not appearing.
2020-04-12 22:18:50 -04:00
Matthias Clasen
19f7b7ed40 Adwaita: visible focus outline for color swatches
Make the focus outline for color swatches visible
again.
2020-04-12 20:13:50 -04:00
Matthias Clasen
e3dba28666 Merge branch 'arnaudb/better-substitution' into 'master'
Fix some gtk-builder-tool substitutions.

See merge request GNOME/gtk!1675
2020-04-12 22:53:54 +00:00
Matthias Clasen
17a9b13af2 text: Be more careful with cached layouts
If we call any functions that may call ensure_layout
themeselves, we risk having the cached layout pulled
out from underneath. Better play it safe and take a
reference.
2020-04-12 17:32:57 -04:00
Matthias Clasen
1efa781a19 window: Cosmetic cleanup
Use a convenience function to get the current event time.
2020-04-12 17:32:13 -04:00
Matthias Clasen
0a19d7ef08 textview: Fix an erroneous unref
This was left behind by accident in 0ee58e9ef4.
2020-04-12 17:32:13 -04:00
Arnaud Bonatti
926fb208ba Coding style improvements. 2020-04-12 21:21:24 +02:00
Arnaud Bonatti
11a43cf554 Replace also margin-left and margin-right. 2020-04-12 19:28:29 +02:00
Arnaud Bonatti
17ec74da35 Fix a gtk-builder-tool substitution.
The margin-left and margin-right properties have been
removed in favor of margin-start and margin-end ones.
2020-04-12 19:28:29 +02:00
Matthias Clasen
ff53d5ba11 stylecontext: Respect cursor aspect ratio everywhere
We were using the new cursor aspect ratio setting in
the snapshotting code, but not in gtk_render_insertion_cursor.

Make them both behave the same.
2020-04-12 11:44:13 -04:00
Matthias Clasen
8a1a96a47e text: Fix placing the cursor on click
Commit c297d45b8a accidentally removed the
check for the right modifier mask, causing us to
always extend the selection.
2020-04-12 09:19:12 -04:00
Matthias Clasen
432b741ab7 gtk: Port all users to the new gtk_show_uri()
We were only handling the error in one place anyway.
2020-04-11 22:10:08 -04:00
Matthias Clasen
703f18ce66 Redo gtk_show_uri_on_window
Make this a full async function, and add a simple wrapper.

Call gtk_show_uri_full() if you need control over the
results, and use gtk_show_uri() if you are fine with
ignoring any errors.
2020-04-11 21:56:32 -04:00
Matthias Clasen
feee281cf8 Drop gtk_get_current_ apis
We have event controller apis to replace these.
There is one remaining use of gtk_get_current_event_time
in gtkwindow.c, so we can't drop the implementation yet.

Add a section in the migration guide for this.
2020-04-11 17:29:27 -04:00
Matthias Clasen
4b346538e2 gtk: Port widgets away from gtk_get_current_ apis
This commit handles complicated cases where we selections.
We handle this by adding extend and modify parameters to
the ::move-cursor signals, and adjust the bindings
accordingly.
2020-04-11 17:29:27 -04:00
Matthias Clasen
0ee58e9ef4 gtk: Port widgets away from gtk_get_current_ apis
Use the event controller equivalents where needed.
This commit covers the simple cases.
2020-04-11 17:29:27 -04:00
Matthias Clasen
bd56bc9055 Add gtk_event_controller_get_current_event[_state]
For now these are private, to replace internal uses
of gtk_get_current_event[_state], but we may want to
make them public.
2020-04-11 17:29:27 -04:00
Matthias Clasen
3e7e862415 gtk: Just use current time for showing urls
We don't really have an event anywhere close in most
cases, and we already pass GDK_CURRENT_TIME in half
the cases anyway.

If we want to be serious about this, we need to pass
the event itself, since future focus-stealing protocols
may not rely on just a timestamp.
2020-04-11 17:29:27 -04:00
Matthias Clasen
4eeb413047 entrycompletion: Remove an unused field
No point in storing a device that is never used.
2020-04-11 17:29:27 -04:00
Matthias Clasen
520ea7c39d Merge branch 'jjardon/more_licenses' into 'master'
gtk/gtkaboutdialog: Add some more very common licenses:

See merge request GNOME/gtk!1667
2020-04-11 16:47:32 +00:00
Javier Jardón
ffa345e4ab gtk/gtkaboutdialog: Add some more very common licenses:
- BSD 3-Clause "New" or "Revised" license
- Apache License 2.0
- Mozilla Public License 2.0
2020-04-11 16:49:09 +01:00
Emmanuele Bassi
e072d9b28b Merge branch 'gsk-public-symbols' into 'master'
Install all headers with public symbols

Closes #2607

See merge request GNOME/gtk!1666
2020-04-11 15:21:11 +00:00
Emmanuele Bassi
d08310096c Conditionally include the GSK broadway and vulkan symbols
In case GTK is built without these features.
2020-04-11 15:42:51 +01:00
Matthias Clasen
6b9ac1043b Document actions 2020-04-11 10:07:31 -04:00
Matthias Clasen
72a0828101 Merge branch 'respect-window-cursors' into 'master'
window: Respect widget cursors

See merge request GNOME/gtk!1663
2020-04-10 18:56:44 +00:00
Matthias Clasen
7379c34a39 window: Respect widget cursors
gtk_widget_set_cursor can be used on a GtkWindow; we
should not blow away the result when temporarily installing
resize cursors.
2020-04-10 14:36:55 -04:00
Matthias Clasen
a6a31827bc Remove gtk_style_context_reset_widgets
This should never be necessary to call from the outside.
Whenever we fail to update styles properly, it is a bug.
2020-04-10 12:45:28 -04:00
Matthias Clasen
394ea32e93 Use gtk_widget_add/remove_css_class more
Replace most uses of gtk_style_context_add/remove_class
by the new APIs. The only remaining uses of the old API
are in save/restore situations.
2020-04-10 12:09:57 -04:00
Matthias Clasen
ad1bc75dd2 accelgroup: Fix an invalid write
This was lost by accident in d110fddbce.

Fixes: #2602
2020-04-10 08:24:03 -04:00
Matthias Clasen
8780906b93 Merge branch 'fix-radiobuttons' into 'master'
radiobutton: Fix selection on focus-in

Closes #2326

See merge request GNOME/gtk!1658
2020-04-10 04:17:37 +00:00
Matthias Clasen
58253d567f radiobutton: Fix selection on focus-in
We need to unselect the previously selected button
to preserve radioness.

Fixes: #2326
2020-04-09 22:38:30 -04:00
Matthias Clasen
c09c61769c modelbutton: Catch focus-in more carefully
We need to unset the propagation limit on the focus
controller, else we miss the focus-in when the focus
enters the popover upon initial popup, when it comes
from the parent button.
2020-04-09 22:22:28 -04:00
Matthias Clasen
9b5dc35650 popovermenu: Remove debug spew 2020-04-09 21:41:02 -04:00
Matthias Clasen
b15f16e8db Adwaita: Don't render focus around labels with links
This avoids the 'double outline' problem for labels
with links.

Fixes: #135
2020-04-09 21:19:36 -04:00
Matthias Clasen
e3b9dfef1c label: Improve link styling
Add a .link style class on labels that contain links,
so we can avoid the focus outline around the label
when individual links are focused, and use the link
node when rendering the focus on links.
2020-04-09 21:19:22 -04:00
Matthias Clasen
822c2aba36 scalebutton: Don't derive from GtkButton
Make GtkScaleButton a widget that has a toggle button
as a child, just like all the other button widgets now.
The immediate benefit of this arrangement is to avoid
the "double focus" problem when we pop up the popup.

Update accessible, demos and tests to match.
2020-04-09 20:43:45 -04:00
Matthias Clasen
16c820c2f0 Small documentation tweaks
Update the docs for GtkWidget:can-focus and :focus-on-click.
2020-04-09 18:26:31 -04:00