-
-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Desktop: Directories support for keybinds #331
base: dev
Are you sure you want to change the base?
Conversation
- Adds *RIGHT* button select in the file browser dialogs and changing the `Open File` action to `Open File/Directory` in `Settings > Desktop > Keybinds Setup`. This adds the ability to open to any directory in the Archive app, in addition to the default behavior of opening a file in it's default app.
- Normal files and directories are now able to be added to then main menu and are run in their appropriate apps. - e.g. .txt files shown in text viewer, .js files are run in the JS Runner app, and folders are navigated to by the Archive app. All similar to the desktop keybinds functionality. - Icons are also assigned appropriately based on the extensions, though more could probably be added to the `loader_menu_get_ext_icon` function. - Also replaced some of the long arduous is_dir checks and just used the `storage_dir_exists` function since its already there and does the same.
The adding of JS files and other stuff to the main menu seemed connected to the initial PR with the Screenshot of the files/folder with icons in the Main MenuAnother thing I was thinking about but haven't messed with is whether the word
Just a thought. |
very nice!
i think "Item" would work better as a single name for both apps and files. or alternatively, could use both app and file, changing the text of the buttons based on what is currently selected, but that is a bit over the top i think |
Oh yep, you're right. "Item" is generic enough for all of it 👍 |
Desktop* desktop = furi_record_open(RECORD_DESKTOP); | ||
desktop->archive_dir = furi_string_alloc_set(menu_app->path); | ||
furi_record_close(RECORD_DESKTOP); | ||
|
||
furi_thread_flags_set(furi_thread_get_id(app->loader_menu->thread), 0); | ||
if(app->loader_menu->closed_cb) app->loader_menu->closed_cb(app->loader_menu->context); | ||
|
||
view_dispatcher_send_custom_event( | ||
desktop->view_dispatcher, DesktopMainEventOpenArchive); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i get why its like this, but i hate it xD
ill try to come up with a way to launch archive without passing through desktop
What's new
Adds RIGHT button select in the file browser dialogs and changes the
Open File
action toOpen File/Directory
inSettings > Desktop > Keybinds Setup
. This adds the ability to open to any directory in the Archive app, in addition to the default behavior of opening a file in it's default app.For the reviewer