gtk4.git
5 years agoFix incorrect use of GIR closure annotations.
Robert Ancell [Mon, 13 Jan 2020 01:11:15 +0000 (14:11 +1300)]
Fix incorrect use of GIR closure annotations.

They were being applied to the callback function, not the data that is passed
to that function.

5 years agoMerge branch 'textbuffer-missing-api-docs' into 'master'
Matthias Clasen [Mon, 13 Jan 2020 00:51:24 +0000 (00:51 +0000)]
Merge branch 'textbuffer-missing-api-docs' into 'master'

Add missing public API documentation.

See merge request GNOME/gtk!1301

5 years agoMerge branch 'menutoolbutton-missing-api-docs' into 'master'
Matthias Clasen [Mon, 13 Jan 2020 00:50:58 +0000 (00:50 +0000)]
Merge branch 'menutoolbutton-missing-api-docs' into 'master'

menutoolbutton: Add missing public API documentation.

See merge request GNOME/gtk!1303

5 years agoMerge branch 'docstring-typos' into 'master'
Matthias Clasen [Mon, 13 Jan 2020 00:50:16 +0000 (00:50 +0000)]
Merge branch 'docstring-typos' into 'master'

Fix docstring errors with drag and drop code

See merge request GNOME/gtk!1304

5 years agoMerge branch 'missing-transfer-notation' into 'master'
Matthias Clasen [Mon, 13 Jan 2020 00:49:25 +0000 (00:49 +0000)]
Merge branch 'missing-transfer-notation' into 'master'

Add missing transfer notation for function return types.

See merge request GNOME/gtk!1302

5 years agoFix docstring errors with drag and drop code
Robert Ancell [Sun, 12 Jan 2020 23:30:17 +0000 (12:30 +1300)]
Fix docstring errors with drag and drop code

5 years agotextbuffer: Add missing public API documentation.
Robert Ancell [Sun, 12 Jan 2020 23:07:15 +0000 (12:07 +1300)]
textbuffer: Add missing public API documentation.

This API was added in a52757874ee.

5 years agomenutoolbutton: Add missing public API documentation.
Robert Ancell [Sun, 12 Jan 2020 23:17:55 +0000 (12:17 +1300)]
menutoolbutton: Add missing public API documentation.

This API was added in 03e30431a8a

5 years agoAdd missing transfer notation for function return types.
Robert Ancell [Sun, 12 Jan 2020 23:14:08 +0000 (12:14 +1300)]
Add missing transfer notation for function return types.

5 years agoAdwaita: Fix needs-attention
Matthias Clasen [Sun, 12 Jan 2020 01:13:05 +0000 (20:13 -0500)]
Adwaita: Fix needs-attention

Stack switchers are now stackswitcher, no longer .stack-switcher.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2370
5 years agoUpdate POTFILES.in
Piotr Drąg [Sat, 11 Jan 2020 15:07:48 +0000 (16:07 +0100)]
Update POTFILES.in

5 years agoMerge branch 'dnd-gestures-2' into 'master'
Matthias Clasen [Sat, 11 Jan 2020 06:09:58 +0000 (06:09 +0000)]
Merge branch 'dnd-gestures-2' into 'master'

Add new dnd api

See merge request GNOME/gtk!1278

5 years agodragdest: More documentation
Matthias Clasen [Sat, 11 Jan 2020 05:31:40 +0000 (00:31 -0500)]
dragdest: More documentation

5 years agoUpdate all callers
Matthias Clasen [Sat, 11 Jan 2020 02:56:26 +0000 (21:56 -0500)]
Update all callers

5 years agoReshuffle droptarget api a little bit
Matthias Clasen [Sat, 11 Jan 2020 02:50:21 +0000 (21:50 -0500)]
Reshuffle droptarget api a little bit

Add a ::drag-motion signal back, remove x,y from
the ::accept signal, and only emit ::accept once.

5 years agoMerge branch 'wip/chergert/gtk4-gtk-main-sync' into 'master'
Matthias Clasen [Sat, 11 Jan 2020 04:41:46 +0000 (04:41 +0000)]
Merge branch 'wip/chergert/gtk4-gtk-main-sync' into 'master'

Rubustness fixes for gtk_main_sync()

See merge request GNOME/gtk!1299

5 years agogtkmain: be deterministic in source removal
Christian Hergert [Fri, 10 Jan 2020 23:04:44 +0000 (15:04 -0800)]
gtkmain: be deterministic in source removal

Fixes gtk_main_sync() to only remove a source if it has not
already executed (and been removed). The previous code was
using gtk_main_quit() directly which would be non-determinstic
based on the previous value in the return register.

5 years agogtkmain: short-circuit gtk_main_sync() where no display
Christian Hergert [Fri, 10 Jan 2020 23:00:10 +0000 (15:00 -0800)]
gtkmain: short-circuit gtk_main_sync() where no display

If there is no display, we will hit the slow path here which
can introduce long latencies in unit tests. This checks for
a NULL list of displays and simply short-circuits.

5 years agoMerge branch 'css-font-values' into 'master'
Matthias Clasen [Fri, 10 Jan 2020 22:47:41 +0000 (22:47 +0000)]
Merge branch 'css-font-values' into 'master'

Css font values

See merge request GNOME/gtk!1298

5 years agocss: Simplify font features
Matthias Clasen [Fri, 10 Jan 2020 21:59:56 +0000 (16:59 -0500)]
css: Simplify font features

Don't store numbers as GtkCssValues needlessly.

5 years agogdk_quartz_keymap_translate_keyboard_state fills consumed_modifiers
Alex Samorukov [Fri, 10 Jan 2020 21:18:24 +0000 (22:18 +0100)]
gdk_quartz_keymap_translate_keyboard_state fills consumed_modifiers
incorrectly (closes #2102)

See merge request GNOME/gtk!1225

5 years agocss: Simplify compute for font variations
Matthias Clasen [Fri, 10 Jan 2020 06:36:23 +0000 (01:36 -0500)]
css: Simplify compute for font variations

Just like font features, font variations are stored
as a hash table mapping strings to pure number values,
which never change during compute.

5 years agocss: Simplify compute for font features
Matthias Clasen [Fri, 10 Jan 2020 06:27:49 +0000 (01:27 -0500)]
css: Simplify compute for font features

Font features consist of a hash table of number
values, which will never change during compute,
so there is no point in recreating a new value
with a copy of the hash table, constaining the
same string->number mapping.

5 years agoMerge branch 'kill-builtin-image' into 'master'
Matthias Clasen [Fri, 10 Jan 2020 19:43:14 +0000 (19:43 +0000)]
Merge branch 'kill-builtin-image' into 'master'

Kill builtin image

See merge request GNOME/gtk!1297

5 years agoRemove builtin icons altogether
Matthias Clasen [Fri, 10 Jan 2020 18:11:59 +0000 (13:11 -0500)]
Remove builtin icons altogether

This removes support for GtkCssImageBuiltin and
GtkCssImageBuiltinType from everywhere.

5 years agocss: Stop supporting builtin images
Matthias Clasen [Fri, 10 Jan 2020 17:56:47 +0000 (12:56 -0500)]
css: Stop supporting builtin images

Change the default value of -gtk-icon-source to 'none',
and stop parsing 'builtin' as a value.

5 years agoUpdate Slovak translation
Dušan Kazik [Fri, 10 Jan 2020 06:47:50 +0000 (06:47 +0000)]
Update Slovak translation

5 years agotestdnd: Fix up for current api
Matthias Clasen [Thu, 9 Jan 2020 15:29:33 +0000 (10:29 -0500)]
testdnd: Fix up for current api

5 years agodocs: Expand the dnd migration hints
Matthias Clasen [Thu, 9 Jan 2020 12:47:28 +0000 (07:47 -0500)]
docs: Expand the dnd migration hints

5 years agodragicon: Add docs
Matthias Clasen [Thu, 9 Jan 2020 05:50:33 +0000 (00:50 -0500)]
dragicon: Add docs

5 years agodocs: Fix a typo
Matthias Clasen [Thu, 9 Jan 2020 05:31:13 +0000 (00:31 -0500)]
docs: Fix a typo

5 years agoProperly export GtkDragIcon
Matthias Clasen [Thu, 9 Jan 2020 05:30:41 +0000 (00:30 -0500)]
Properly export GtkDragIcon

The get_type function was missing.

5 years agoUpdate all users
Matthias Clasen [Wed, 8 Jan 2020 22:07:30 +0000 (17:07 -0500)]
Update all users

5 years agodragdest: Rename ::drag-motion to ::accept
Matthias Clasen [Wed, 8 Jan 2020 21:43:52 +0000 (16:43 -0500)]
dragdest: Rename ::drag-motion to ::accept

5 years agodragdest: Allow denying drops asynchronously
Matthias Clasen [Wed, 8 Jan 2020 21:30:44 +0000 (16:30 -0500)]
dragdest: Allow denying drops asynchronously

Add an api to deny a drop, this is meant to be used
when delaying the decision on whether to accept a
drop until after reading the data.

5 years agoremove debug spew
Matthias Clasen [Wed, 8 Jan 2020 21:08:26 +0000 (16:08 -0500)]
remove debug spew

5 years agodragdest: Add a ::drag-enter signal
Matthias Clasen [Wed, 8 Jan 2020 21:06:57 +0000 (16:06 -0500)]
dragdest: Add a ::drag-enter signal

Mainly for symmetry with ::drag-leave.

5 years agotestdnd2: Fix the text case
Matthias Clasen [Wed, 8 Jan 2020 20:59:38 +0000 (15:59 -0500)]
testdnd2: Fix the text case

We must take mime types into account when checking.

5 years agocontent provider impl: Take mime types into account
Matthias Clasen [Wed, 8 Jan 2020 20:58:52 +0000 (15:58 -0500)]
content provider impl: Take mime types into account

5 years agodragdest: Steps towards allowing nested drop sites
Matthias Clasen [Wed, 8 Jan 2020 05:25:51 +0000 (00:25 -0500)]
dragdest: Steps towards allowing nested drop sites

5 years agoAdd another dnd testcase
Matthias Clasen [Wed, 8 Jan 2020 15:34:56 +0000 (10:34 -0500)]
Add another dnd testcase

This one tests nested drop sites and interaction between
DND and other gestures.

5 years agoUpdate all callers
Matthias Clasen [Wed, 8 Jan 2020 04:31:48 +0000 (23:31 -0500)]
Update all callers

5 years agoAdd GdkDrop back to signal signatures
Matthias Clasen [Wed, 8 Jan 2020 04:45:27 +0000 (23:45 -0500)]
Add GdkDrop back to signal signatures

5 years agoDrop gtk_drag_(un)highlight
Matthias Clasen [Wed, 8 Jan 2020 00:20:32 +0000 (19:20 -0500)]
Drop gtk_drag_(un)highlight

5 years agofilechooser: Remove code for sidebar pre-arming
Matthias Clasen [Wed, 8 Jan 2020 00:12:40 +0000 (19:12 -0500)]
filechooser: Remove code for sidebar pre-arming

This is just not a feature we can support currently.
Doing it properly would require infrastructure for
a generalized :drag(sensitive) state highlighting
potential drag sites everywhere.

5 years agolistbox: Stop using gtk_drag_(un)highlight
Matthias Clasen [Tue, 7 Jan 2020 23:45:53 +0000 (18:45 -0500)]
listbox: Stop using gtk_drag_(un)highlight

This api is going away, so just do what needs to
be done manually.

5 years agocalendar: Remove drag highlighting calls
Matthias Clasen [Tue, 7 Jan 2020 23:24:03 +0000 (18:24 -0500)]
calendar: Remove drag highlighting calls

This is happening unconditionally, anyway.

5 years agotextview: Remove unnecessary drag highlighting
Matthias Clasen [Tue, 7 Jan 2020 23:19:06 +0000 (18:19 -0500)]
textview: Remove unnecessary drag highlighting

GTK does this unconditionally anyway, now.

5 years agotext: Remove unnecessary drag highlighting
Matthias Clasen [Tue, 7 Jan 2020 23:18:43 +0000 (18:18 -0500)]
text: Remove unnecessary drag highlighting

GTK does this unconditionally anyway, now.

5 years agonotebook: Receive tab dnd on the tabs
Matthias Clasen [Tue, 7 Jan 2020 23:08:25 +0000 (18:08 -0500)]
notebook: Receive tab dnd on the tabs

Don't make the whole notebook a drop target
for tab dnd, but just the tab bar. This will
help with drag highlighting, and it arguably
more correct anyway.

5 years agoAdwaita: No drag highlight for placessidebar
Matthias Clasen [Tue, 7 Jan 2020 22:40:49 +0000 (17:40 -0500)]
Adwaita: No drag highlight for placessidebar

It does its own custom thing.

5 years agoAdwaita: No dnd highlight for iconviews
Matthias Clasen [Tue, 7 Jan 2020 22:30:08 +0000 (17:30 -0500)]
Adwaita: No dnd highlight for iconviews

We only want to highlight the drop location
that is rendered with a separate css node now.

5 years agoiconview: Use a named subnode for dnd highlight
Matthias Clasen [Tue, 7 Jan 2020 22:29:44 +0000 (17:29 -0500)]
iconview: Use a named subnode for dnd highlight

This is necessary because we want to style the
iconview itself and the item highlighting differently.

5 years agoAdwaita: No dnd highlight for treeviews
Matthias Clasen [Tue, 7 Jan 2020 22:13:32 +0000 (17:13 -0500)]
Adwaita: No dnd highlight for treeviews

We only want to highlight the drop location
that is rendered with a separate css node now.

5 years agotreeview: Use a named subnode for dnd highlight
Matthias Clasen [Tue, 7 Jan 2020 22:12:37 +0000 (17:12 -0500)]
treeview: Use a named subnode for dnd highlight

This is necessary because we want to style the
treeview itself and the row highlighting differently.

5 years agoAdwaita: No drag highlight for stack switchers
Matthias Clasen [Tue, 7 Jan 2020 21:16:05 +0000 (16:16 -0500)]
Adwaita: No drag highlight for stack switchers

5 years agoAdwaita: No drag highlight for expanders
Matthias Clasen [Tue, 7 Jan 2020 20:43:50 +0000 (15:43 -0500)]
Adwaita: No drag highlight for expanders

This is pretty ugly, because Adwaita has a very
generic drop-highlight implementaiton that we
need to overrule.

5 years agodragdest: Rename ::armed to ::contains
Matthias Clasen [Tue, 7 Jan 2020 20:39:19 +0000 (15:39 -0500)]
dragdest: Rename ::armed to ::contains

5 years agogtk-demo: Update the ::prepare handler
Matthias Clasen [Tue, 7 Jan 2020 19:48:09 +0000 (14:48 -0500)]
gtk-demo: Update the ::prepare handler

5 years agodragsource: Change the ::prepare return type
Matthias Clasen [Tue, 7 Jan 2020 19:46:11 +0000 (14:46 -0500)]
dragsource: Change the ::prepare return type

Make it return the content provider to use for
the next drag. This allows just-in-time provision
of the content provider. The default handler just
returns the value of the ::content property.

5 years agodocs: Expand the GDK dnd docs
Matthias Clasen [Tue, 7 Jan 2020 07:15:22 +0000 (02:15 -0500)]
docs: Expand the GDK dnd docs

5 years agodocs: Add GtkDragIcon
Matthias Clasen [Tue, 7 Jan 2020 06:50:41 +0000 (01:50 -0500)]
docs: Add GtkDragIcon

5 years agodocs: Add GtkDropTarget section
Matthias Clasen [Tue, 7 Jan 2020 06:48:15 +0000 (01:48 -0500)]
docs: Add GtkDropTarget section

5 years agodocs: Remove dropped drag source apis
Matthias Clasen [Tue, 7 Jan 2020 06:43:34 +0000 (01:43 -0500)]
docs: Remove dropped drag source apis

5 years agodocs: Remove the dnd section
Matthias Clasen [Tue, 7 Jan 2020 06:42:28 +0000 (01:42 -0500)]
docs: Remove the dnd section

These functions in this section are all gone.

5 years agodragsource: Drop gtk_drag_source_drag_begin
Matthias Clasen [Tue, 7 Jan 2020 06:40:44 +0000 (01:40 -0500)]
dragsource: Drop gtk_drag_source_drag_begin

No longer used. Also, minor cleanups all over.

5 years agodragksource: Small doc fix
Matthias Clasen [Tue, 7 Jan 2020 06:22:33 +0000 (01:22 -0500)]
dragksource: Small doc fix

5 years agoDrop GTK content formats apis
Matthias Clasen [Tue, 7 Jan 2020 05:55:34 +0000 (00:55 -0500)]
Drop GTK content formats apis

These functions have been superseded by better
facilities in GDK.

5 years agotestdnd2: Use GDK content formats api
Matthias Clasen [Tue, 7 Jan 2020 05:46:37 +0000 (00:46 -0500)]
testdnd2: Use GDK content formats api

5 years agotext: Use GDK content formats API
Matthias Clasen [Tue, 7 Jan 2020 05:46:20 +0000 (00:46 -0500)]
text: Use GDK content formats API

5 years agoplacessidebar: Use GDK content formats api
Matthias Clasen [Tue, 7 Jan 2020 05:46:00 +0000 (00:46 -0500)]
placessidebar: Use GDK content formats api

5 years agofilechooserwidget: Use GDK content formats api:
Matthias Clasen [Tue, 7 Jan 2020 05:45:42 +0000 (00:45 -0500)]
filechooserwidget: Use GDK content formats api:

5 years agofilechooserbutton: Use GDK content formats api
Matthias Clasen [Tue, 7 Jan 2020 05:45:29 +0000 (00:45 -0500)]
filechooserbutton: Use GDK content formats api

5 years agocalendar: Use GDK content formats api
Matthias Clasen [Tue, 7 Jan 2020 05:45:07 +0000 (00:45 -0500)]
calendar: Use GDK content formats api

5 years agoiconbrowser: Use GDK content formats api
Matthias Clasen [Tue, 7 Jan 2020 05:44:50 +0000 (00:44 -0500)]
iconbrowser: Use GDK content formats api

5 years agogtk-demo: Use GDK content formats api
Matthias Clasen [Tue, 7 Jan 2020 05:44:19 +0000 (00:44 -0500)]
gtk-demo: Use GDK content formats api

5 years agotext: Fix dragging of text across focus changes
Matthias Clasen [Tue, 7 Jan 2020 05:26:30 +0000 (00:26 -0500)]
text: Fix dragging of text across focus changes

When dragging selected text from an entry over a stackswitcher
to show a different page, the focus changes, causing the selection
to be lost; we should not lose the dragged content in this case.

5 years agoAdwaita: Add drop highlight for iconview items
Matthias Clasen [Tue, 7 Jan 2020 02:25:49 +0000 (21:25 -0500)]
Adwaita: Add drop highlight for iconview items

5 years agoiconview: Render drop highlight properly
Matthias Clasen [Tue, 7 Jan 2020 02:25:15 +0000 (21:25 -0500)]
iconview: Render drop highlight properly

Use :drop(active) and render a frame, not focus.

5 years agodragsource: Fix cancellation
Matthias Clasen [Tue, 7 Jan 2020 01:46:08 +0000 (20:46 -0500)]
dragsource: Fix cancellation

We need to properly end the drag.

5 years agofilechooser: Stop using gtk_drag_source_get_drag
Matthias Clasen [Tue, 7 Jan 2020 01:42:18 +0000 (20:42 -0500)]
filechooser: Stop using gtk_drag_source_get_drag

5 years agoplacessidebar: Update a comment
Matthias Clasen [Tue, 7 Jan 2020 01:31:23 +0000 (20:31 -0500)]
placessidebar: Update a comment

5 years agoRemove an unused enum
Matthias Clasen [Tue, 7 Jan 2020 01:30:41 +0000 (20:30 -0500)]
Remove an unused enum

We are not using GtkDragResult anymore.

5 years agotestdnd2: Update to the api change in the previous commit
Matthias Clasen [Tue, 7 Jan 2020 01:30:14 +0000 (20:30 -0500)]
testdnd2: Update to the api change in the previous commit

5 years agodragsource: Rename ::drag-failed to ::drag-cancel
Matthias Clasen [Tue, 7 Jan 2020 01:29:42 +0000 (20:29 -0500)]
dragsource: Rename ::drag-failed to ::drag-cancel

This matches the names of the GdkDrag signals.

5 years agodragsource: Tweak docs more
Matthias Clasen [Tue, 7 Jan 2020 01:21:00 +0000 (20:21 -0500)]
dragsource: Tweak docs more

5 years agodragsource: Document prepare
Matthias Clasen [Tue, 7 Jan 2020 01:20:45 +0000 (20:20 -0500)]
dragsource: Document prepare

5 years agodragsource: Make ::prepare return a boolean
Matthias Clasen [Tue, 7 Jan 2020 01:09:47 +0000 (20:09 -0500)]
dragsource: Make ::prepare return a boolean

Make ::prepare return TRUE to start a drag.
The default handler simply checks that we
have a content provider and actions.

5 years agodragsource: Drop gtk_drag_get_source
Matthias Clasen [Tue, 7 Jan 2020 01:03:24 +0000 (20:03 -0500)]
dragsource: Drop gtk_drag_get_source

5 years agonotebook: Stop using gtk_drag_get_source
Matthias Clasen [Tue, 7 Jan 2020 01:02:33 +0000 (20:02 -0500)]
notebook: Stop using gtk_drag_get_source

5 years agodragsource: Drop gtk_drag_source_get_origin
Matthias Clasen [Tue, 7 Jan 2020 00:55:43 +0000 (19:55 -0500)]
dragsource: Drop gtk_drag_source_get_origin

5 years agofilechooserwidget: Stop using gtk_drag_source_get_origin
Matthias Clasen [Tue, 7 Jan 2020 00:54:52 +0000 (19:54 -0500)]
filechooserwidget: Stop using gtk_drag_source_get_origin

5 years agonotebook: Stop using gtk_drag_source_get_origin
Matthias Clasen [Tue, 7 Jan 2020 00:51:46 +0000 (19:51 -0500)]
notebook: Stop using gtk_drag_source_get_origin

5 years agotesttoolbar: Use gtk_widget_add_controller for drag source
Matthias Clasen [Tue, 7 Jan 2020 06:13:51 +0000 (01:13 -0500)]
testtoolbar: Use gtk_widget_add_controller for drag source

5 years agotestlist3: Use gtk_widget_add_controller for drag source
Matthias Clasen [Tue, 7 Jan 2020 06:13:35 +0000 (01:13 -0500)]
testlist3: Use gtk_widget_add_controller for drag source

5 years agotestdnd2: Use gtk_widget_add_controller for drag source
Matthias Clasen [Tue, 7 Jan 2020 06:13:11 +0000 (01:13 -0500)]
testdnd2: Use gtk_widget_add_controller for drag source

5 years agotestdnd: Use gtk_widget_add_controller for drag source
Matthias Clasen [Tue, 7 Jan 2020 06:12:48 +0000 (01:12 -0500)]
testdnd: Use gtk_widget_add_controller for drag source

5 years agopathbar: Use gtk_widget_add_controller for drag source
Matthias Clasen [Tue, 7 Jan 2020 06:08:51 +0000 (01:08 -0500)]
pathbar: Use gtk_widget_add_controller for drag source

5 years agonotebook: Use gtk_widget_add_controller for drag source
Matthias Clasen [Tue, 7 Jan 2020 06:08:31 +0000 (01:08 -0500)]
notebook: Use gtk_widget_add_controller for drag source

5 years agolinkbutton: Use gtk_widget_add_controller for drag source
Matthias Clasen [Tue, 7 Jan 2020 06:08:11 +0000 (01:08 -0500)]
linkbutton: Use gtk_widget_add_controller for drag source