Georges Basile Stavracas Neto
202e889577
filesystemmodel: Use G_DECLARE_FINAL_TYPE()
...
Clean up boilerplate. It's a private object anyway.
2023-01-07 09:17:37 -05:00
Georges Basile Stavracas Neto
a8690c84ab
filesystemmodel: Cosmetics
...
Adjust code style, and shuffle some functions around. Remove
unhelpful doc comments.
2023-01-07 09:17:15 -05:00
Matthias Clasen
35244f4b59
filesystemmodel: Use g_set_object
2023-01-07 09:12:44 -05:00
Georges Basile Stavracas Neto
503c3ec04d
filesystemmodel: Make function private to gtkfilesystemmodel.c
...
The _gtk_file_system_model_update_file() function is not used outside
GtkFileSystemModel, so no need to expose it in the header.
Shuffle it around in code, and remove it from the header.
2023-01-07 08:44:40 -05:00
Georges Basile Stavracas Neto
4a5a466975
filesystemmodel: Cleanup unused defines
...
They were made unused with the removal of GtkTreeModel interface
implementation.
2023-01-07 08:44:34 -05:00
Matthias Clasen
7801dd8944
Merge branch 'wip/phako/fix-activate-action-annotation' into 'main'
...
widget: Mark format as nullable in activate_action
See merge request GNOME/gtk!4653
2023-01-07 01:06:00 +00:00
Matthias Clasen
38e090f5c1
Merge branch 'main' into 'main'
...
Fix a typo
See merge request GNOME/gtk!5170
2023-01-07 00:59:32 +00:00
Matthias Clasen
120396fa40
wip: Split off GdkWaylandPopup
...
Like the GdkWaylandToplevel split-off, this needs some
more cleanup.
2023-01-06 16:50:19 -05:00
Matthias Clasen
d61ec38974
wip: Split off GdkWaylandToplevel
...
This still needs some more cleanup.
2023-01-06 16:50:19 -05:00
Matthias Clasen
68700f8722
Merge branch 'drop-file-dialog-shortcuts' into 'main'
...
filedialog: Drop shortcut folders
See merge request GNOME/gtk!5396
2023-01-06 13:35:14 +00:00
Matthias Clasen
f76270167c
Merge branch 'wip/otte/for-5496' into 'main'
...
filedialog: Never set the chooser's file
Closes #5496
See merge request GNOME/gtk!5393
2023-01-06 13:34:55 +00:00
Matthias Clasen
2a442c4fbb
Merge branch 'macos-command-symbol' into 'main'
...
macos: Use Command key symbol in Keyboard shortcuts window
See merge request GNOME/gtk!5296
2023-01-06 13:17:36 +00:00
Matthias Clasen
9356dfc404
filedialog: Drop shortcut folders
...
The filechooser portal does not support this,
and we are defaulting to using the portal now.
Lets not offer a non-functional API.
2023-01-06 07:40:57 -05:00
Arjan Molenaar
c52978dfa4
macos: Command should not come from gettext
...
Instead, just provide the right character.
See also
https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkaccelgroup.c#L916 .
2023-01-06 12:08:55 +01:00
Matthias Clasen
52dfa54301
Merge branch 'test-file-dialog' into 'main'
...
Test file dialog
See merge request GNOME/gtk!5394
2023-01-06 04:28:28 +00:00
Matthias Clasen
8780aa02d7
filedialog: Cosmetics
2023-01-05 23:06:31 -05:00
Benjamin Otte
8d5a39d765
Merge branch 'wip/corey/dnd-use-cursor' into 'main'
...
Fix accidental DnD
See merge request GNOME/gtk!5275
2023-01-05 22:39:26 +00:00
Benjamin Otte
446e6a8d62
filedialog: Never set the chooser's file
...
Instead, get by with setting the name and hope the filechooser figures
things out by itself.
Fixes #5496
2023-01-05 21:30:15 +01:00
Matthias Clasen
9b1bee99b8
Merge branch 'openuri-activation-token' into 'main'
...
Pass an activation token to OpenURI
See merge request GNOME/gtk!5389
2023-01-05 14:06:14 +00:00
Matthias Clasen
fc1f1366b4
filechooser: Don't assert for possible cases
...
switch_to_selected_folder can be called when the
selection contains more than one item. Handle it
like it used to be handled: switch to the first
folder we find.
Fixes : #5494
2023-01-05 08:41:33 -05:00
Matthias Clasen
6efd1a9dad
Pass an activation token to OpenURI
...
The OpenURI portal can take an activation_token
nowadays. So it give one.
2023-01-04 16:39:24 -05:00
Matthias Clasen
918ff1d0f4
Deprecate gtk_toggle_button_toggled
...
The function is documented as useless.
2023-01-04 07:32:51 -05:00
Carlos Garnacho
4041ca0f69
gdkdisplay: Deprecate gdk_display_notify_startup_complete()
...
We have various layers where we store the startup ID for a request,
since this API does not have a GdkToplevel that we can refer about
for the Wayland platform, this is the most obvious candidate to
start untangling these various layers.
Deprecate this call, it is already unused in the gtk/ side.
2023-01-03 14:58:33 +01:00
Carlos Garnacho
3526d8b299
gtkapplication: Do not call gdk_display_notify_startup_complete()
...
This should do nothing worthwhile anymore, the X11/Wayland GtkApplication
implementations do already pass the startup ID from the platform_data
via windowing specific APIs, and the application handling the request
via show()/present() should trigger the activation request.
2023-01-03 14:58:33 +01:00
Carlos Garnacho
e8adfa2a88
gtkwindow: Shuffle gdk_toplevel_set_startup_id() calls
...
While this used to be tangential to windows showing or requesting
focus, the xdg-activation Wayland protocol does merge both concepts
together.
But also, for a correct interaction with the compositor, the
toolkit should ideally merge the activation request resulting from
both into the same one, so that the gdk_toplevel_focus() request
replies to the startup token that started the application and
correct focus-stealing prevention/etc happens, instead making up
one just in time for the focus request.
This kind of requires doing things in the right order, a show()
request on the GtkWindow should activate any pending activation
token on the toplevel, a present() request should additionally
create a new token if there was none pending. And
xdg_activation_v1_activate() should happen once on both.
Shuffle the gdk_toplevel_set_startup_id() calls so that this
happens in the right order for Wayland, while making X11 happy
too.
2023-01-03 14:58:33 +01:00
Carlos Garnacho
6f01f846dc
gtkwindow: Minor refactor
...
Move the handling of the startup ID to a separate function, since
this will be called from several places.
2023-01-03 14:57:44 +01:00
Matthias Clasen
53813f24f0
Merge branch 'matthiasc/for-main' into 'main'
...
ci: Enable introspection for the docs build
See merge request GNOME/gtk!5383
2023-01-02 21:53:58 +00:00
Matthias Clasen
1fde83f12b
Merge branch 'direction-from-language' into 'main'
...
Determine direction from language
See merge request GNOME/gtk!5385
2023-01-02 21:50:54 +00:00
Matthias Clasen
1f7783224b
Determine direction from language
...
We can determine the direction to return here
without relying on translations, by using pango
and HarfBuzz apis to go
language -> script -> direction.
2023-01-02 16:30:27 -05:00
Matthias Clasen
0d04ceda76
Merge branch 'ccook/doc-changes-2' into 'main'
...
Various documentation suggests across a few domains.
See merge request GNOME/gtk!5384
2023-01-02 20:40:54 +00:00
Cam Cook
9396ccf9ff
Various documentation suggests across a few domains.
...
| domain | current | suggestion |
|--------|---------|------------|
| [GtkSeparator](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkseparator.c#L39 ) | "`![An example GtkSeparator](separators.png)`" | "`![An example GtkSeparator](separator.png)`" [1] |
| [GtkTextBuffer](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextbuffer.c#L4885 ) | "if there is an redoable action" | "if there is a redoable action" |
| [GtkTextBuffer/get_enable_undo](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextbuffer.c#L5005 ) | (Renders `No description available.`) | "Returns: %TRUE if undoing and redoing changes to the buffer is allowed." [3] |
| [GtkTextBuffer/get_max_undo_levels](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextbuffer.c#L5102 ) | (Renders `No description available.`)| "Returns: The max number of undo levels allowed (0 indicates unlimited)." |
| [GtkTextBuffer](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextbuffer.c#L3874 ) | "with gtk_text_buffer_add_selection_clipboard()." | "with [method@Gtk.TextBuffer.add_selection_clipboard]" |
| [GtkTextBuffer](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextbuffer.c#L3494 ) | "it will automatically toggled" | "it will automatically toggle" |
* [1] See : [separator.png](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/docs/reference/gtk/images/separator.png ), [gtk4.toml.in](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/docs/reference/gtk/gtk4.toml.in#L218 ), [visual_index.md](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/docs/reference/gtk/visual_index.md?plain=1#L16 )
* [2] Taken from `enable-undo` [property description](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextbuffer.c#L516 )
* [GtkTextMark/gtk_text_mark_set_visible](https://docs.gtk.org/gtk4/method.TextMark.set_visible.html ) is defined in [GtkTextMark's header](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextmark.h#L93 ), but implemented in [GtkTextBTree](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextbtree.c#L3036 ).
* Other than being kind of confusing, this causes `gtk_text_mark_set_visible()`'s doc to not render where it expects it to.
2023-01-02 13:47:55 -05:00
Matthias Clasen
85df554ec1
Fix compiler warnings
2023-01-02 11:18:54 -05:00
Matthias Clasen
e126110ae0
Merge branch 'wide-inspector' into 'main'
...
inspector: Avoid super-wide window
See merge request GNOME/gtk!5379
2022-12-31 20:07:45 +00:00
Matthias Clasen
40a2910262
inspector: Avoid super-wide window
...
Ellipsize values that can get long, to avoid
forcing an excessively wide window.
2022-12-31 12:30:40 -05:00
Marco Melorio
ec84077486
docs: Annotate GtkDialog deprecations
2022-12-30 15:37:11 +01:00
Corey Berla
7ad693f865
gtkcolumnviewcolumn: Only create cells when the column is visible
...
It's a big performance drag to create many cells (and their associated
widgets) for columns that may never be shown. Only create cells
is the column is visible, and subsequently create/remove cells
when in column_set_visible.
2022-12-29 11:11:40 -08:00
Corey Berla
4e694c1824
gtkdroptarget: Notify value property on local drag
...
The value property is only getting notified when it's unset
or when it's set from gdk_drop_real_value_async(). Make sure
to always notify :value when its changed
2022-12-27 08:11:53 -08:00
Matthias Clasen
5eb4a3af0d
filedialog: Handle initial-folder being NULL
...
This showed up as test failure in ci.
2022-12-24 09:01:16 -05:00
Benjamin Otte
c4c747d2ad
alertdialog: Rephrase docs for show() a bit
...
In particular, discuss what to do about cancellables.
Related: !5326
2022-12-24 07:56:57 -05:00
Benjamin Otte
671fad5f34
filedialog: Clarify interaction of :filters and :default-filter
2022-12-24 07:56:57 -05:00
Benjamin Otte
1b9c45b660
filedialog: Rename :current-filter to :default-filter
...
The last "current" removed from properties. None of these are current.
2022-12-24 07:56:57 -05:00
Benjamin Otte
e2f730c0bf
filedialog: Add gtk_file_dialog_set_initial_file()
...
A shortcut for setting initial-folder and initial-name at the same time.
We can remove all arguments from the actual async calls this way.
2022-12-24 07:56:57 -05:00
Benjamin Otte
8a2d35b9fb
filedialog: Add gtk_file_dialog_set_initial_name()
2022-12-24 07:56:57 -05:00
Benjamin Otte
26cec4a021
filedialog: Rename current-folder to initial-folder
...
It's not the current one - unlike in GtkFileChooser - because there are
no live updates. So we use a more descriptive name.
2022-12-24 07:56:57 -05:00
Benjamin Otte
8d8e83afa2
fontdialog: Handle Escape better
...
Closing the dialog by hitting Escape should
have the same effect as clicking the cancel
button. Make it so.
2022-12-24 07:56:57 -05:00
Benjamin Otte
381bb84f3d
alertdialog: Bring the GError back
...
Make sure we have a GError, so that dismissing and cancelling can be
separated.
2022-12-24 07:56:57 -05:00
Benjamin Otte
977fedfdf1
dialog: GTK_DIALOG_ERROR_ABORTED => GTK_DIALOG_ERROR_CANCELLED
...
This is done via the GCancellable, so let's call it cancelling.
2022-12-24 07:56:57 -05:00
Benjamin Otte
8957302bd4
dialog: GTK_DIALOG_ERROR_CANCELLED => GTK_DIALOG_ERROR_DISMISSED
...
The term "cancelling" is used with GCancellable, a user clicking a close
button is not that.
User input is usually described as "dismissing", so we use that term.
2022-12-24 07:56:57 -05:00
Benjamin Otte
8a7f739f9f
directorylist: Always add standard::name
...
glib can't figure out how to do that, so we need to do that ourselves.
2022-12-24 07:56:57 -05:00
Cam Cook
1cd44ec7b7
Make stylecheck happy
2022-12-23 11:21:18 -05:00