Commit graph

321 commits

Author SHA1 Message Date
António Fernandes 26af49013a portal: Handle SaveFile method
Saving a file includes choosing a filename. But yyping a filename
would conflict with type-to-search on the "selector" view.

So, introduce a new "namer" page in NautilusFileChooser.

Part of: https://gitlab.gnome.org/GNOME/nautilus/-/issues/3401
2024-07-24 16:10:26 +02:00
António Fernandes d1437e9fd6 network-view: Introduce new view and cells
This is the replacement for the Other Locations.

See https://gitlab.gnome.org/GNOME/nautilus/-/issues/2785
2024-06-02 15:39:09 +00:00
António Fernandes 62c4a979ba network-address-bar: Recycle widgetry (step 2/2)
The new design for Network view uses an address entry bar which is
similar to the one from Other Locations view. Instead of reinventing
the wheel, let's salvage some code.

In addition to formatting the code to nautilus style, this also makes
a couple of visual changes to match the design requests.

https://gitlab.gnome.org/GNOME/nautilus/-/issues/2785
2024-06-02 15:39:09 +00:00
António Fernandes 7c12611bd0 gtkplacesview: Remove from build
Now that NautilusPlacesView is gone, we don't use this anymore.

But there is quite a bit of recycleable code here. So, let's take this
out of the build pipeline in order to disassemble it freely.
2024-06-02 15:39:09 +00:00
António Fernandes 6997f3a5eb general: Remove Other Locations
It's going to be replaced with a new Network view.[0]

For now this removes only the direct support in nautilus code proper.
The code imported from GtkPlacesView is kept to be recycled for a new
purpose.

[0] https://gitlab.gnome.org/GNOME/nautilus/-/issues/2785
2024-06-02 15:39:09 +00:00
António Fernandes 7776f13c69 internal-place-file: Introduce new file subclass
Instead of special casing the NautilusFile for the starred:/// URI,
give it a proper display name as part of a new specialized subclass.

This is prepared to handle more cases, like the upcoming Network view.
2024-06-01 11:57:05 +00:00
Corey Berla 26480b7017 sidebar: Replace gtkbookmarksmanager with nautilus-bookmark-list 2024-05-24 15:09:12 +00:00
Bharat 84e1d76f51 progress-info-widget: Change cancel button icon
Set correct icon and remove tooltip for cancel
button when an ongoing operation is canceled

Use cancel button icon "emblem-ok-symbolic" instead of
"object-select-symbolic" since it is more correct in the current
use case as suggested by @snwh

Use tooltip "Completed" for cancel button instead of
"Operation Finished" since it is more friendly in this context
suggested by @snwh

Set "Completed" as a translatable string credit to @coreyberla

Part of https://gitlab.gnome.org/GNOME/nautilus/-/issues/3294
2024-02-05 18:03:22 +00:00
Peter Eisenmann 1e9c8a7cc5 pofiles: add star-cell
For translations of tooltips.

Fixes #3279
2024-01-28 18:57:01 +01:00
António Fernandes 47687ba66b appdata: Use non-legacy file extension
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#spec-component-location
2024-01-10 17:12:00 +00:00
Peter Eisenmann 3f263a209e date-util: add date to string helper
Move date formatting to new date-utilities file, to allow it being
called from other places too. The new file also handles reacting to
changes in date related preferences.

More functionality will be added/moved to this file in a future commit.
2023-12-20 00:20:39 +00:00
Peter Eisenmann 2d9901476b general: drop -controller suffix from filenames
Analogous to the previous commit, drop the '-controller' suffix from
filenames.
2023-12-02 18:43:46 +00:00
António Fernandes 736431b5df file-name-widget-controller: Rename to filename-validator
After the previous commit, this is a delegate, so, name it accordingly.

This name is also shorter, which is always welcome.
2023-12-02 18:43:46 +00:00
Peter Eisenmann bab0d708cf general: remove eel-vfs-extensions 2023-11-16 02:36:20 +01:00
Peter Eisenmann 9322a3d2ae file-operations: turn self-check into proper unittests
Turn the file duplication testing code into a dedicated unittest.
Unittests are more straightforward to run than the eel self-check
mechanism. This also allows dropping eel dependencies and reduces
the size of the file-operations file.

The concrete duplication syntax is abstracted away with a macro for
better readability of the comparisons.
2023-10-31 22:19:46 +00:00
Peter Eisenmann cb60f91cd1 special-location-bar: Rename to nautilus-location-banner
Update name to reflect the fact it's an AdwBanner now.
2023-10-06 20:29:04 +01:00
Corey Berla 4346087adc column-chooser: Subclass AdwWindow instead of GtkBox
We were subclassing from GtkBox and then, list-view created a
list-view-column-editor which subclassed from AdwWindow to add
the column-chooser.  It's a lot of extra code / complexity for something
that is only used in list-view.  This also allows us to directly
use column-chooser within list-view.

Also drop the list description label, in preparation for the switch to GtkListBox.
2023-05-04 21:32:59 +00:00
Ignacy Kuchciński 5b954ee535 trash-bar: Remove trash infobar
Currently trash infobar contains actions for restoring files and
emptying trash.

This is misusing of the GtkInfoBar, as it should only be used to present
some kind of status message, and having so many different buttons for
actions is uncommon and resulted in https://gitlab.gnome.org/GNOME/nautilus/-/issues/2096

To fix that, remove the trash infobar altogether, with intention of
rolling it into special-location-bar, as it will only have 1 button.
2022-08-23 18:32:03 +00:00
Piotr Drąg f2a13a1caa Update POTFILES.in 2022-08-07 14:40:27 +02:00
António Fernandes e418cf4362 properties: Remove old extensions API
We want to control the layout of the window, not having extensions
injecting their own widgets.

This also avoids future breakage when porting to newer versions of GTK.
2022-08-07 01:14:22 +00:00
António Fernandes 695c9c617b image-properties: Port to new API 2022-08-07 01:14:22 +00:00
Piotr Drąg fff9e924c6 Update POTFILES.in 2022-08-06 13:29:06 +02:00
Piotr Drąg 2cbee18233 Update POTFILES.in 2022-07-31 14:37:29 +02:00
Piotr Drąg 0b036d3785 Update POTFILES.in 2022-07-30 16:55:55 +02:00
António Fernandes 43b1c1a147 app-chooser: Implement new dialog
When choosing to open a file in another application, the user may want
to set it as the new default.

Currently we require going to the Properties, which is not intuitive,
and one may think it's going to affect only one file.

Introduce a GtkAppChooserDialog replacement which provides the means to
set as default and reset as part of "Open with Another Application...".

Compared to the Properties "Open with" tab, the "Add" action is not
present, because opening the file with an app adds it implicitly. The
"Forget" action is not included either because it lacks its "Add"
counterpart and because such fine grained control is not essential. We
have Reset anyway.
2022-07-29 18:59:19 +00:00
Piotr Drąg 2d38c00413 Update POTFILES.in 2022-07-22 13:26:15 +02:00
Piotr Drąg c5116637a3 Update POTFILES.in 2022-07-19 11:47:35 +02:00
Piotr Drąg 6f8316b39a Update POTFILES.in 2022-07-16 13:50:57 +02:00
Piotr Drąg a729bfdbb5 Update POTFILES.in 2022-06-25 12:42:58 +02:00
António Fernandes 6708861ed1 list-view: Reimplement using GtkColumnView
GtkTreeView, while still available in GTK 4, is more limited in some
more specialized situations which we have been relying on, such as
drag-and-drop and high DPI icons.

It's also been our long desire to adopt GListModel-based list widgets
in order to unlock features and bugfixes which would have been
basically impossible to do with GtkTreeView.

We are thus dropping GtkTreeView for good and adopting GtkColumnView.

The new implementation is radically different; almost no code remains
from the old implementation. However, the new implementation has full
feature parity with the old one with two exceptions:

    1. Expand subfolders as a tree: WIP in another branch.
    2. Performance for large number of items: WIP branch in GTK.

Same as the old implementation, it still lacks drag-and-drop support,
which is yet to be reimplemented for GTK4.

The new implementation also implements new features which were but
a dream in GtkTreeView:

  - Rubberband-selection.[1]
  - Empty space inbetween and around the list of items to open context
    menu, start rubberband, drop items, clear selection...[2,3,4]
  - Rows highligh on hover, distinguishing them from background space
    and serving as a reading aid instead without separator lines.[5]
  - File names in search results and recents are no longer squashed by
    the "Original location" column containing long paths. Instead, the
    original location is runs parallel to the filename.[6]
  - With the location column gone, the size column can be displayed
    again in these two special locations.
  - Full-text-search snippets no longer compete for horizontal space
    with filenames, but are displayed as accent-colored subtitles.[7]
  - Filenames are ellipsized at the middle, not to hide important
    details at their end.[7]
  - Sort order can be changed from the view menu, as in grid view.[8]
  - Per-folder sorting is shared with the grid view now, fixing an old
    inconsistency.[9]
  - A starring animation ☆★

Closes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/320

[1] Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/200
[2] Closes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1929
[3] Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1476
[4] Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1764
[5] Fixes https://bugzilla.gnome.org/show_bug.cgi?id=744405
[6] Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1411
[7] Fixes https://bugzilla.gnome.org/show_bug.cgi?id=619760
[8] Fixes https://bugzilla.gnome.org/show_bug.cgi?id=142495
[9] Fixes https://bugzilla.gnome.org/show_bug.cgi?id=45659
2022-06-21 19:55:01 +01:00
António Fernandes 0e768626cb view-icon-item-ui: Rename to NautilusGridCell
Following the view rename, also rename the item widget.

Upcoming NautilusViewClass subclasses are going to follow the same
Nautilus*Class naming pattern.

Also add missing copyright notice with SPDX licence id.
2022-06-21 19:55:01 +01:00
António Fernandes a9c2c89699 batch-rename-dialog: Import menu models into template file
Having the menu models in a separate file is keeping us from setting
them as properties directly in the template UI definition.
2022-01-05 11:32:12 +00:00
António Fernandes 23cb15d8ee eel: Drop gtk extensions
No longer used.
2022-01-05 11:32:12 +00:00
António Fernandes 7bf5ab0c73 general: Use in-tree copy of GtkPlacesSidebar
GtkPlacesSidebar is a public GTK 3 widget, but private in GTK 4, so we
need to have the sidebar in our own codebase if we are to keep using it.

Extend the script already in use for the places view and use it to copy
the places sidebar and its dependencies and patch it as necessary.

Also, construct it from code, because this in-tree places sidebar cannot
be used in a GtkBuilder UI template.
2021-12-29 12:57:58 +00:00
António Fernandes 2d1deaac2d general: Remove canvas view
The new grid view has reached feature parity with the canvas, if we
ignore drag-and-drop and clipboard support (which would need to be
reimplemented in GTK 4 anyway) and performance scalability (which is
a problem of GtkFlowBox and solvable by using GtkGridView in GTK 4).

The canvas view relies on extensive custom implementation for layout,
drawing, input handling, accessibility, etc., which would be too
hard to port to in GT1K4.

Furthermore, most of its features, such as support for manual sorting,
haven't been used since the "icons on desktop" feature has been taken
out from this app. We are actually using a swiss army knife for a job
where we only need a single blade -- a simple pocketknife would do!

Therefore, we say goodbye to this seasoned veteran widget, who has
served us for 2 whole decades.
2021-12-29 11:39:32 +00:00
António Fernandes 452df8daa1 view-icon-item-ui: Build from template
Declarative UI allows us to drop a lot of code, including GtkContainer
methods, which helps with preparing for the GTK 4 port.
2021-12-29 11:35:44 +00:00
António Fernandes 7e3dab1f52 operations-ui-manager: Port passphrase dialog to GtkBuilder
This removes usage of the GtkContainer API, preparing for GTK4.
2021-11-19 08:36:50 +01:00
Apoorv Sachan 28ce30df03 files-view: Port Ctrl+S dialog to use GtkBuilder
Now the Ctrl+S dialog is being built using the
GtkBuilder API, Now it's styling and can be
handled in the XML UI definition. The UI definiton
needs to be handled manually as Glade doesn't handle
the implementation of the GtkDialog used here.
2021-11-13 12:17:07 +00:00
Joshua Lee e1ade201dc file-conflict-dialog: Port to GtkBuilder
Modify the dialog to be built declarartively to enhance maintainability and aid
in porting to GTK 4.

This introduces a minor UI change with the 'Replace'/'Rename' and 'Skip'
buttons swapping places, with the suggested action now the endmost button as
is standard practice.
2021-11-11 19:23:29 +00:00
António Fernandes 022a075dd9 list-view: Build column editor with GtkBuilder
Keeping with the direction of preferring declarative UI definitions.
Also, it will help with porting to GTK4.

While we are at it, adopt HdyWindow for rounded corners and make
the label not bold and allow it to wrap (to avoid making the dialog
too wide with some translations).
2021-11-08 22:45:22 +00:00
António Fernandes 1cf68176ae column-chooser: Build interface from template XML
Keeping with the direction of preferring declarative UI definitions.

Also, it will help with porting to GTK4.
2021-11-08 22:45:22 +00:00
Piotr Drąg a6f011cfda Update POTFILES.in 2020-08-08 13:11:48 +02:00
Apoorv Sachan 1d60b2dd4b mime-application-chooser: Remove the whole class
Until the previous commit, its single user was the Properties window.

Now it's unused, so we can remove the its source files completely.
2020-08-05 13:48:10 +00:00
Piotr Drąg 83b34e15a5 Update POTFILES.in 2020-04-19 09:48:55 +02:00
Bastien Nocera e9bb1cff99 Add copy/paste of totem's properties window nautilus extension
The code is quite stable and this is basic functionality which is going to be
better in Nautilus rather than relying on extensions, given the quite bad
extension system Nautilus has.

This will also help with the port to gtk4, so we rely in yet another important
extension providing properties pages (which in turn export gtk3 widgets).
2019-02-11 16:03:55 +01:00
Piotr Drąg 7a81751458 Update POTFILES.in 2019-01-23 17:43:06 +01:00
Piotr Drąg 18e50919ce Update POTFILES.in 2018-11-02 17:53:23 +01:00
Piotr Drąg 5efe9c2429 Update POTFILES.in 2018-07-26 19:34:54 +02:00
Piotr Drąg f7460fb004 Update POTFILES.in 2018-05-18 18:08:38 +02:00
Piotr Drąg 29f7948f8f Update POTFILES.in 2018-05-09 17:44:29 +02:00