macOS: Add open files to system recent files #107174

Closed
Ankit Meel wants to merge 2 commits from ankitm:ankitm/recentfiles into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

The recently opened/ saved file will now also show up in:

  • Blender Dock icon > Right click.
  • Three finger swipe down in Open Blender i.e., App Expose

Contributed by jenkm also.
Completed the TODO in GHOST_SystemPathsCocoa::addToSystemRecentFiles.
Also fixed a variable misnomer.


Originally at https://archive.blender.org/developer/differential/0009/0009827/index.html

Clear recent files is also done code wise. But the location of adding the operator is open for discussion. So I left it out here.

Before
image
image

After
image
image

The recently opened/ saved file will now also show up in: - Blender Dock icon > Right click. - Three finger swipe down in Open Blender i.e., App Expose Contributed by jenkm also. Completed the TODO in `GHOST_SystemPathsCocoa::addToSystemRecentFiles`. Also fixed a variable misnomer. --------------- Originally at https://archive.blender.org/developer/differential/0009/0009827/index.html Clear recent files is also done code wise. But the location of adding the operator is open for discussion. So I left it out here. Before ![image](/attachments/23950d5b-e6c3-4a89-89f6-2e7dedc8a232) ![image](/attachments/2247dd75-dfb1-4c81-a55a-e2d314530fae) After ![image](/attachments/e3bf65a9-24da-4b1d-acfd-196201753301) ![image](/attachments/f6b4a1bd-2566-4b91-884b-694cb296db84)
Ankit Meel added 1 commit 2023-04-20 15:36:25 +02:00
63b417894a macOS: Add open files to system recent files
Implement the pending function. Also clean up parameter misnomer.
The file will now also show up in:
- Blender Dock icon > Right click.
- Three finger swipe down in Open Blender i.e., App Expose
Ankit Meel requested review from Brecht Van Lommel 2023-04-20 15:38:20 +02:00
Ankit Meel requested review from Julian Eisel 2023-04-20 15:38:20 +02:00
Ankit Meel requested review from Yevgeny Makarov 2023-04-20 15:38:21 +02:00
Ankit Meel added the
Module
User Interface
Platform
macOS
Interest
User Interface
labels 2023-04-20 15:38:40 +02:00
Ankit Meel added this to the User Interface project 2023-04-20 15:38:48 +02:00
Brecht Van Lommel requested changes 2023-04-20 16:41:43 +02:00
@ -2778,6 +2778,7 @@ static int wm_open_mainfile__open(bContext *C, wmOperator *op)
ED_outliner_select_sync_from_all_tag(C);
}
ED_view3d_local_collections_reset(C, (G.fileflags & G_FILE_NO_UI) != 0);
GHOST_addToSystemRecentFiles(filepath);

Why was this added, given that it's already called in wm_history_file_update?

Why was this added, given that it's already called in `wm_history_file_update`?
ankitm marked this conversation as resolved
Ankit Meel added 1 commit 2023-04-20 19:37:17 +02:00
Brecht Van Lommel approved these changes 2023-04-20 19:39:36 +02:00
Author
Member

Between files that can get deleted after updating system files and apple HIG about order of files, this could be more complex
4caf63f62e/src/vs/platform/workspaces/electron-main/workspacesHistoryMainService.ts (L426)

Between files that can get deleted after updating system files and apple HIG about order of files, this could be more complex https://github.com/microsoft/vscode/blob/4caf63f62e97df8af4eb88259073dc5d2dceeff7/src/vs/platform/workspaces/electron-main/workspacesHistoryMainService.ts#L426

Why do we need to clear recent documents from Blender at all?

In Blender itself we remove deleted files from our own list. But for the system wide list, applications can't be expected to delete files themselves there, since they don't run before a user accesses that menu.

Why do we need to clear recent documents from Blender at all? In Blender itself we remove deleted files from our own list. But for the system wide list, applications can't be expected to delete files themselves there, since they don't run before a user accesses that menu.
Author
Member

Apps that use System file menu also have a Open recents submenu which can get long. So there's a clear recents button usually. Also one would have to find and delete some plist file if we don't provide a button.

image

I just found out (experimentally) that max limit of files in the two cases (app expose & dock icon) is the recent 5. So less of a priority.

Apps that use System file menu also have a Open recents submenu which can get long. So there's a clear recents button usually. Also one would have to find and delete some plist file if we don't provide a button. ![image](/attachments/7a6adc8a-bf4f-455d-af4e-2dda0c6927ac) I just found out (experimentally) that max limit of files in the two cases (app expose & dock icon) is the recent 5. So less of a priority.
231 KiB

Clear recents in Blender could be a useful feature, but it doesn't seem macOS specific.

I don't understand how applications can be expected to update the system wide list, as they do not run before a user opens that menu.

Clear recents in Blender could be a useful feature, but it doesn't seem macOS specific. I don't understand how applications can be expected to update the system wide list, as they do not run before a user opens that menu.
Ankit Meel closed this pull request 2023-04-20 20:24:16 +02:00
Julian Eisel approved these changes 2023-04-24 14:58:45 +02:00

Pull request closed

Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#107174
No description provided.