Commit Graph

73338 Commits

Author SHA1 Message Date
Benjamin Otte
09f0c96b9b Fix g_object_new(GTK_TYPE_SNAPSHOT)
GJS apparent likes g_object_new() over actual constructors, so make that work.
2022-08-01 20:08:58 +00:00
Matthias Clasen
641a589734 Add GtkLabel:tabs
This adds more powerful formatting capabilities to GtkLabel
without costing us much, since Pango already supports tabs.
2022-08-01 08:20:05 -04:00
Christian Hergert
9bce70ed8d Merge branch 'wip/chergert/builder-expose-object-fix' into 'main'
builder: gracefully handle re-exposing builder object

See merge request GNOME/gtk!4913
2022-08-01 05:09:53 +00:00
Christian Hergert
d00d1334ce gtkbuilder: update gtk_builder_expose_object() docs 2022-07-31 21:37:20 -07:00
Christian Hergert
fbe124ca54 gtkbuilder: update gtk_builder_extend_with_templat() docs 2022-07-31 21:25:58 -07:00
Christian Hergert
f680b86130 gtkbuilder: check for existing object before extending template
If gtk_builder_expose_object() is called twice with the same name, it will
result in a g_critical(). This improves that situation by checking for the
object before exposing additional times.

This turns out to be handy in situations where templates are expanded
multiple times, such as application-side implementations of UI merging.
2022-07-31 21:25:58 -07:00
Dr. David Alan Gilbert
dbc4e18bf8 x11: Don't assume valid type
If we get an invalid TARGETS reply, we might not have a valid 'type',
which ends up as NULL and segs in the g_str_equal.

(This is probably fallout from my fix 506566b6a4, which I still
can't reproduce reliably, so the last one just moved the seg a bit
further along, and we still don't know who is sending a bad TARGETS).

This corresponds to:
https://bugzilla.redhat.com/show_bug.cgi?id=2062143
2022-07-30 22:11:59 +01:00
Luca Bacci
924da0e84b Merge branch 'fix-gdk-win32-dnd' into 'main'
Fix DnD on Windows

Closes #4498

See merge request GNOME/gtk!4900
2022-07-29 12:42:57 +00:00
Christian Kirbach
38f14303d8 Update German translation 2022-07-28 21:13:07 +00:00
Nart Tlisha
b896b73e5e Update Abkhazian translation 2022-07-28 19:19:12 +00:00
Matthias Clasen
81a65690f8 Merge branch 'alatiera/node-flatpak' into 'main'
flatpak: add a NodeEditor demo

See merge request GNOME/gtk!4898
2022-07-28 18:08:47 +00:00
Matthias Clasen
33f7d96e8f Merge branch 'ebassi/file-list-fixes' into 'main'
Add constructors for GdkFileList

See merge request GNOME/gtk!4907
2022-07-28 18:07:34 +00:00
Emmanuele Bassi
dcd549aebe Add constructors for GdkFileList
C API users can keep dealing with the implicit equivalence of
GdkFileList and GSList, but language bindings have no idea that one type
is another, and none of them exposes GSList as a type anyway, so they
will need a way to construct a GdkFileList.

Instead of making GdkFileList mutable, and re-implement GSList, we only
provide a constructors pair that lets you create a GdkFileList from a
linked list or from an array.
2022-07-28 14:41:35 +01:00
Emmanuele Bassi
8a4aee583c Merge branch 'barthalion/gnome-runtime-images-quay' into 'main'
Update (or drop) the Docker image used by Flatpak job

See merge request GNOME/gtk!4906
2022-07-27 11:39:55 +00:00
Bartłomiej Piotrowski
ea21923932 Update (or drop) the Docker image used by Flatpak job
The gnome-runtime-images have been recently migrated to Quay. This is already reflected in the template.

Please note this MR has been created semi-automatically. If it doesn't make sense, feel free to close it.
2022-07-27 12:47:50 +02:00
Daniel Mustieles
5ca266f137 Updated Spanish translation 2022-07-27 11:36:48 +02:00
Christian Hergert
b9f374c0c6 Merge branch 'wip/chergert/disable-sysprof-agent' into 'main'
build: configure subproject sysprof with -Dagent=false

See merge request GNOME/gtk!4896
2022-07-26 23:44:37 +00:00
Christian Hergert
a32b9d8b51 build: configure subproject sysprof with -Dagent=false
Sysprof has a new -Dagent=true build option which allows installing a
/usr/bin/sysprof-agent program (simimlar to sysprof-cli). It provides a
P2P D-Bus API to the process which can control subprocesses. It's used by
IDE tooling to have more control across container boundaries.

However, we do not need it for GTK CI.
2022-07-26 16:29:25 -07:00
Emmanuele Bassi
c92b27f41b Merge branch 'markand-main-patch-04776' into 'main'
gtk: Missing end of code block

See merge request GNOME/gtk!4902
2022-07-26 15:09:28 +00:00
David Demelier
06bec5fb45 gtk: Missing end of code block 2022-07-26 14:52:30 +00:00
Nart Tlisha
e0be85ccca Add Abkhazian translation 2022-07-26 11:17:20 +00:00
Benjamin Otte
0c052c9a37 Merge branch 'gridview' into 'main'
Gridview fix rubberbanding issues

Closes #3462 and #3445

See merge request GNOME/gtk!4688
2022-07-26 01:08:08 +00:00
Corey Berla
a7bbc25851 listview: Fix selection for last item in get_items_in_rect
Make the last item dependent on y + height
2022-07-25 17:55:26 -07:00
Corey Berla
d6fab1408a listview: Allow starting rubberband in empty space below last row
Rubberband does not work when initiated past the last row
(warning is printed "Could not start rubberbanding: No item).

Clamp y at the max height of the widgets in the listview
2022-07-25 17:55:15 -07:00
Corey Berla
e14b84ff67 listview: Return an empty bitset when selecting only empty space
Return an empty bitset if the user selects exclusively below the last
row.
2022-07-25 17:54:44 -07:00
Corey Berla
aba2d994e6 gridview: Fix typo in docstring for gtk_grid_view_get_cell_at_y() 2022-07-25 17:54:44 -07:00
Corey Berla
57c032e6cc listbase: Clear selection if rubberband selected an empty set
If rubberband returns an empty bitset the selection should be cleared
unless the shift or ctrl key is held
2022-07-25 17:54:44 -07:00
Corey Berla
f3fc8f5b35 gridview: Return an empty bitset when selecting only empty space
Return an empty bitset if the user selects exclusively below the last
row.  No need to calculate selection.
2022-07-25 17:54:44 -07:00
Corey Berla
ba909cf901 gridview: Fix get_items_in_rect() selection
last_row should be dependent on y + height, not y
2022-07-25 17:54:44 -07:00
Corey Berla
1e9a36ffa8 gridview: Allow starting rubberband in empty space below last row
Rubberband does not work when initiated past the last row
(warning is printed "Could not start rubberbanding: No item).

Clamp y at the max height of the widgets in the gridview

Fixes: #3462
2022-07-25 17:54:35 -07:00
Corey Berla
c6f357e447 gridview: Limit rectangle to gridview columns
The function gtk_grid_view_get_items_in_rect() erroneously calculates
columns less than 0 and greater than n_columns when the user attempts
to rubberband all the way to the left or right respectively.  This
causes the rubberband to persistent and creates unexpected behavior.
Limit the rows to a minimum of 0 and maximum of n_columns - 1.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3445
2022-07-25 17:27:24 -07:00
Corey Berla
2bcae546b3 gridview: Move gtk_grid_view_computer_total_height() up for reuse 2022-07-25 17:27:24 -07:00
Emmanuele Bassi
291696607a Merge branch 'widget-docs-fix' into 'main'
gtkwidget: Fix a small typo in a docs comment

See merge request GNOME/gtk!4901
2022-07-25 21:31:18 +00:00
Philip Withnall
87ba99f66b gtkwidget: Fix a small typo in a docs comment
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-07-25 23:15:58 +02:00
Zurab Kargareteli
fc20268cb8 Update Georgian translation 2022-07-25 16:03:57 +00:00
darkcutler
64a959dad9 Fix DnD on Windows
DnD under Windows needed 3 fixes to work with Gtk.DropTarget.

1. The droptarget_w32format_contentformat_map list never gets
filled so the gdk_win32_drop_read_async throws
"No compatible transfer format found".
This is an easy fix and done the same way in the win32 clipboard code.

2. After a drop no gdk_drop_emit_leave_event gets emitted.
This causes a second drop to trigger a bunch of assertion
'self->drop == drop' failed because the first drop is still active.
This is also an easy fix and done the same way by the macos backend.

3. Handling gdk_drop_status/gdk_drop_get_actions interaction.
In gtk_drop_target_do_drop the code
```gdk_drop_finish (self->drop, gdk_drop_get_actions (self->drop));```
calls the finish operation with the actions of the drop which triggers
```g_return_if_fail (gdk_drag_action_is_unique (action));```
in gdk_drop_finish. The code assumes that GdkDrop::actions gets
narrowed down by calling gdk_drop_status. This is hard to assure
because at the same time gdk_drop_get_actions is used by
gtk_drop_target_accept to figure out if a drag is accepted.
GdkDrop::actions serves a double purpose here as the supported source
actions and the currently agreed on action. Both the x11 and the
wayland backend get this wrong somewhat too. Under wayland/x11 when
a drag coming from a source that supports both MOVE and COPY is
first hovering a drop target that only supports COPY it is afterwards
no longer accepted by other drop targets only accepting MOVE.
Under x11 this is permanent for this drag but with wayland the drag
recovers when hovering other widgets. The win32 backend now sets the
supported source actions before any enter/move/drop and narrows them
down in gdk_win32_drop_status.

The patch only touches the win32 backend and fixes all three issues,
for me restoring DnD under windows.

Closes #4498
2022-07-25 15:16:23 +00:00
Corey Berla
111929593a mountoperation: Free user_widgets list upon dialog destruction
There's a list user_widgets that contains all of the entries and
selections during authentication.  This is only freed  upon
finalizing the GtkMountOperation.  It's possible (and true for the
GVFS SMB implementation) that a MountOperation can have the
gtk_mount_operation_ask_password_do_gtk () function called multiple
times (i.e. bad password).  The user_widgets list grows with now
invalid pointers to old widgets (causing unexpected behavior and
seg faults).

Free the user_widgets list upon dialog destruction, we don't need it
anymore.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5059
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5058
2022-07-25 06:54:14 -07:00
Jordan Petridis
23bd7c1c05 flatpak-build.sh: change the buildtype to debugoptimized
So that the flatpaks will include debuginfo and make debugging
easier.
2022-07-25 15:42:14 +03:00
Jordan Petridis
f99880a74a flatpak: add a NodeEditor demo 2022-07-25 15:38:55 +03:00
Emmanuele Bassi
61bf5ac009 Merge branch 'content-fit-since' into 'main'
picture: Fix Since and Deprecated annotations for content-fit

See merge request GNOME/gtk!4897
2022-07-25 11:45:43 +00:00
Maximiliano Sandoval R
ef07d1556b
picture: Fix Since and Deprecated annotations
gi-docgen will parse four or more whitespaces of indentation as code blocks,
two whitespaces were used.

This was missing in https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4873.
2022-07-25 12:59:47 +02:00
Corey Berla
dd5d1030b5 mountoperation: Select "Anonymous" check button by default
It is already explicitly assumed that anonymous authentication will
be used when available, but it is not clear to the user since neither
of the check buttons are selected.  Select the Anonymous check button
by default.
2022-07-24 20:53:41 -07:00
Jordi Mas
f480ff2e4d Update Catalan translation 2022-07-21 04:25:20 +02:00
Carlos Garnacho
2b131f09a8 Merge branch 'fix-controller-key-event-propagation-file-chooser-widget' into 'main'
GtkFileChooserWidget: Propagate captured key events when the location entry is focused

Closes #4880

See merge request GNOME/gtk!4674
2022-07-19 22:15:04 +00:00
Matthias Clasen
b165028e86 Merge branch 'drag-action' into 'main'
tree/iconview: Use a unique drag action in drag_enter/motion callbacks

Closes #3187

See merge request GNOME/gtk!4882
2022-07-18 14:35:11 +00:00
Matthias Clasen
6e379181d9 Merge branch 'treeview-drag-ancestor' into 'main'
treeview: Check for column header area in row click/drag gestures

Closes #4453

See merge request GNOME/gtk!4885
2022-07-18 14:33:26 +00:00
Matthias Clasen
edf8c9e501 Merge branch 'matthiasc/for-main' into 'main'
css: Fix handling of transform values

See merge request GNOME/gtk!4890
2022-07-18 14:24:49 +00:00
Matthias Clasen
f95f992d32 Merge branch 'wip/carlosg/use-press-serial' into 'main'
gdk/wayland: Use last implicit grab serial for DnD start requests

Closes #5048

See merge request GNOME/gtk!4889
2022-07-18 14:18:22 +00:00
Carlos Garnacho
95cf34ab4c gdk/wayland: Stop storing the last serial in GdkWaylandDisplay
This is not used anymore, so we can drop the serial being stored
here.
2022-07-18 15:21:40 +02:00
Matthias Clasen
0cebf6d9c5 Merge branch 'drop-target-unique' into 'main'
droptarget: Provide a unique action for gdk_drop_finish

Closes #5051

See merge request GNOME/gtk!4888
2022-07-18 12:38:52 +00:00