mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 15:32:38 +00:00
Add File > Scripts > Rescan option to rescan the available scripts
https://community.aseprite.org/t/6170/6
This commit is contained in:
parent
8b6116911d
commit
5edf30687b
@ -635,6 +635,7 @@
|
||||
<separator id="scripts_menu_separator" />
|
||||
<menu id="scripts_menu" text="@.file_scripts" group="file_scripts">
|
||||
<item command="OpenScriptFolder" text="@.file_open_script_folder" />
|
||||
<item command="Refresh" text="@.file_rescan_script_folder" />
|
||||
</menu>
|
||||
<separator group="file_app" />
|
||||
<item command="Exit" text="@.file_exit" />
|
||||
|
@ -803,6 +803,7 @@ file_export_sprite_sheet = &Export Sprite Sheet
|
||||
file_repeat_last_export = Repeat &Last Export
|
||||
file_scripts = Scri&pts
|
||||
file_open_script_folder = &Open Scripts Folder
|
||||
file_rescan_script_folder = &Rescan Scripts Folder
|
||||
file_exit = E&xit
|
||||
edit = &Edit
|
||||
edit_undo = &Undo
|
||||
|
@ -10,7 +10,10 @@
|
||||
#endif
|
||||
|
||||
#include "app/app.h"
|
||||
#include "app/app_menus.h"
|
||||
#include "app/commands/command.h"
|
||||
#include "app/ui/main_menu_bar.h"
|
||||
#include "app/ui/main_window.h"
|
||||
#include "app/ui/status_bar.h"
|
||||
#include "fmt/format.h"
|
||||
#include "ui/scale.h"
|
||||
@ -40,8 +43,15 @@ RefreshCommand::RefreshCommand()
|
||||
|
||||
void RefreshCommand::onExecute(Context* context)
|
||||
{
|
||||
// Reload menus (mainly to reload the File > Scripts menu)
|
||||
//AppMenus::instance()->reload();
|
||||
App::instance()->mainWindow()->getMenuBar()->reload();
|
||||
|
||||
// Reload theme
|
||||
ui::set_theme(ui::get_theme(),
|
||||
ui::guiscale());
|
||||
|
||||
// Redraw screen
|
||||
app_refresh_screen();
|
||||
|
||||
// Print memory information
|
||||
|
Loading…
x
Reference in New Issue
Block a user