summaryrefslogtreecommitdiff
path: root/Applications/FileManager
AgeCommit message (Collapse)Author
2020-10-22FileManager: Ignore model updates during widget constructionAndreas Kling
We can't use current_view() before we've actually constructed the subviews, so just ignore statusbar update requests before they get a chance to call current_view(). This is not the most beautiful thing, and maybe we can think of a nicer approach.
2020-10-22FileManager: Update the error label overlay on back/forward navigationAndreas Kling
Fixes #3817.
2020-10-22FileManager: Set up the model error/complete callbacks earlierAndreas Kling
We need to set these up before calling set_root_path, as that's where the error callbacks would fire from.
2020-10-15FileManager: Only set ~/Desktop as model root path in desktop modeLinus Groh
Setting it as model root path in DirectoryView::setup_model() for windowed mode as well would cause an issue with the following: - "open ~/Desktop" - "FileManager ~/Desktop" - "Show in FileManager..." from Desktop context menu When viewing the Desktop as the initial path it would be the same and on_path_change wasn't called, leading to various widgets and window properties not being updated. Fixes #3772.
2020-10-10FileManager: Added menu to show dotfiles in directory context menuKesse Jones
2020-10-10FileManager: Fix file creation error messageLinus Groh
s/String::format/String::formatted/ - the error message was not being formatted properly.
2020-10-05FileManager: Use new format functions.asynts
2020-10-03Everywhere: Fix more typosLinus Groh
2020-09-24FileManager: Teach DirectoryView subviews to create editing delegatesAndreas Kling
This enables inline editing of filenames for table views, where this is already supported. More work in LibGUI will be required to support the feature in icon and columns views.
2020-09-19FileManager: Prevent feedback loop between treeview and directory viewAndreas Kling
When opening something in the left-side treeview, it also opens in the right-side directory view. That triggers the "path changed" hook in the directory view, which causes us to fully reveal the opened directory in the left-side treeview. This feedback loop made the UI feel weird since it caused directories to expand just by selecting them in the left-side treeview. So let's break that loop.
2020-09-18FileManager: Properly reveal newly opened directories in the treeviewAndreas Kling
Use the new TreeView::expand_all_parent_of() API to ensure that newly opened directories are revealed and scrolled-into-view in the left-side treeview. :^)
2020-09-18FileManager: Update GUI when "entering" an inaccessible directoryAndreas Kling
When we enter an inaccessible directory, we still allow that directory to become selected in the left-side treeview, so we need to update the location box and window title to reflect the new current path. This is not perfectly factored and there's a bit of duplication between the model's on_error and on_complete hook callbacks in DirectoryView. Needs more work. :^)
2020-09-18FileManager: Show an inline error message for inaccessible directoriesAndreas Kling
Instead of popping up a message box whenever we can't read an opened directory, show the error message inside the DirectoryView (as a label) instead. This fixes a visual inconsistency where an inaccessible directory would be selected in the left-side treeview while the previous directory's contents were still showing on the right. This also makes keyboard navigation a bit more pleasant since you're not suddenly interrupted by a message box.
2020-09-18FileManager: Remove an unused enum in DirectoryViewAndreas Kling
2020-09-17FileManager: Move DirectoryView into the FileManager namespaceAndreas Kling
2020-09-17FileManager: Move the DesktopWidget to its own compilation unitAndreas Kling
2020-09-17FileManager: Handle drop events in DirectoryViewAndreas Kling
This makes it possible to drag & drop files to/from the desktop! :^)
2020-09-16FileManager: Use GUI::FileIconProvider for the location box iconAndreas Kling
2020-09-16FileManager: Show the root (/) directory in the treeview on the leftAndreas Kling
This gives you something to click on if you actually want to open the root directory. Previously, if you wanted to get to /, you had to use the "to parent directory" repeatedly. Silly. :^)
2020-09-16LibGUI: Fix TreeView scrolling to top when clicking sub-itemsAndreas Kling
This code was confusing two different versions of scroll_into_view that were getting mixed up due to member function shadowing. Adding an "override" to the subclass declaration exposed the problem. With this fixed, we no longer lose our scroll position wildly when using the mouse to select TreeView items.
2020-09-13FileManager: Use the correct delete action in the treeview context menuAndreas Kling
2020-09-13FileManager: Move delete and force-delete actions to DirectoryViewAndreas Kling
This is a little bit messy since the left-side treeview also has a delete action. Because of that, we have to put a focus-dependent action that delegates to the relevant view-specific action in the tool bar and menu bar. I'm not sure yet what a good abstraction would be for this. We'll see what we can think of.
2020-09-13FileManager: Move "Open Terminal here" action to DirectoryViewAndreas Kling
2020-09-05LibGUI: Make the Clipboard API deal in raw byte buffers a bit moreAndreas Kling
To open up for putting not just text/plain content on the clipboard, let's make the GUI::Clipboard API a bit more raw-data-friendly. :^)
2020-08-17FileManager: Make DirectoryView vend indexes from view modelAndreas Kling
Instead of translating between the sorting proxy and the underlying file system model at all the DirectoryView API boundaries, just hand out indexes into the sorting proxy model. The only thing those indexes are used for on the outside is to retrieve a GUI::FileSystemModel::Node for an index, so add a nice helper on DirectoryView that turns a ModelIndex into a Node&.
2020-08-17LibGUI: Don't require passing model to FileSystemModel::Node APIsAndreas Kling
The Node API was obnoxiously requiring you to pass the model into it all the time, simply because nodes could not find their way back to the containing model. This patch adds a back-reference to the model and simplifies the API.
2020-08-17FileManager: Move the "create new file" action into DirectoryViewAndreas Kling
This makes it available in both desktop and windowed modes. :^)
2020-08-17FileManager: Move "create new directory" action into DirectoryViewAndreas Kling
This makes it available in both desktop and windowed mode. :^)
2020-08-17FileManager: Partially bring back the desktop context menuAndreas Kling
2020-08-17FileManager: Don't pass DirectoryView subview to hooks that don't careAndreas Kling
2020-08-17FileManager: Use DirectoryView for both windowed and desktop modeAndreas Kling
This patch begins the process of converting FileManager's desktop mode to using the DirectoryView class. This will allow us to share most of the code between the two different runtime modes of FileManager. We lose a bit of functionality in this patch, but we'll bring it back!
2020-08-17FileManager: Apply wallpaper on startupLuke
I noticed that nothing actually applies the wallpaper on startup. I wasn't sure where to put the responsibility, so I gave it to the desktop mode file manager. Also adds a save_config option to set_wallpaper so it doesn't needlessly save the config.
2020-08-17FileManager: Don't close() twice when copying a fileAndreas Kling
2020-08-17FileManager: Fix descriptor leak in copy_file, found by CoverityBrian Gianforcaro
2020-08-17FileManger: Fix file descriptor leak in copy_file_or_directory, found by ↵Brian Gianforcaro
Coverity
2020-08-16LibGUI+DevTools+Applications: Use ModelIndex::data() in many placesAndreas Kling
This way you don't have to keep track of which model it came from.
2020-08-16LibGUI: Move GUI::Model::Role to GUI::ModelRoleAndreas Kling
This is preparation for using ModelRole in the ModelIndex API.
2020-08-16LibGUI: Make model sorting imperative and move order to AbstractViewAndreas Kling
Instead of SortingProxyModel having a column+order, we move that state to AbstractView. When you click on a column header, the view tells the model to resort the relevant column with the new order. This is implemented in SortingProxyModel by simply walking all the reified source/proxy mappings and resorting their row indexes.
2020-08-16FileManager: Use one SortingProxyModel for all DirectoryView subviewsAndreas Kling
This removes one major source of confusion in DirectoryView. It's still weird that we mix sorting model indexes with filesystem model indexes a bit willy-nilly but we'll improve that separately.
2020-08-14LibGUI: Make ModelSelection non-copyable and non-movableAndreas Kling
These are meant to be attached to an AbstractView at all times.
2020-08-13LibGUI: Rename ModelClient::on_model_update() => model_did_update()Andreas Kling
This follows the typical client callback naming scheme used elsewhere and doesn't collide with the "on_foo" Function hook convention.
2020-08-13LibGUI: Remove Model::sibling() since it's the same as index()Andreas Kling
... I'm not sure what the idea was here, but since these functions do the same thing, let's only have index().
2020-08-13LibGUI: Rename SortingProxyModel "target" to "source" insteadAndreas Kling
2020-08-12FileManager: Remove one direct call to FileSystemModel from outsideAndreas Kling
We should stop accessing the FileSystemModel outside DirectoryView. This whole app is pretty badly factored, due to LibGUI being in its infancy while it first developed.
2020-08-12FileManager: Use FileIconProvider in the properties dialogAndreas Kling
This removes the need for the properties dialog to access the internal data model used by the directory view.
2020-08-10FileManager: Make the desktop process show as "FileManager (Desktop)"Andreas Kling
2020-08-04FileManager: Disown spawned processesAndreas Kling
2020-08-01FileManager: Build new path of renamed files correctlyTill Mayer
Fixes #2932.
2020-07-23LibGUI: Rename GUI::Image => GUI::ImageWidgetAndreas Kling
"Image" was a bit too vague, "ImageWidget" is obviously a widget of some sort.
2020-07-19FileManager: Show a special icon for the home directoryAndreas Kling
The home-directory icon now shows up in the FileManager title bar, and alongside the path in the location textbox. Very nice. :^)