This commit is contained in:
MX 2023-07-19 01:48:21 +03:00
parent 7d81d3bee0
commit 3635a3b71f
No known key found for this signature in database
GPG Key ID: 7CCC66B7DBDD1C83
3 changed files with 16 additions and 16 deletions

View File

@ -177,15 +177,15 @@ bool archive_scene_browser_on_event(void* context, SceneManagerEvent event) {
CLIPBOARD_MODE_COPY); CLIPBOARD_MODE_COPY);
consumed = true; consumed = true;
break; break;
case ArchiveBrowserEventFileMenuPast_Cut: case ArchiveBrowserEventFileMenuPaste_Cut:
case ArchiveBrowserEventFileMenuPast_Copy: case ArchiveBrowserEventFileMenuPaste_Copy:
archive_show_file_menu(browser, false); archive_show_file_menu(browser, false);
FuriString* path_src = archive->fav_move_str; FuriString* path_src = archive->fav_move_str;
FuriString* path_dst = furi_string_alloc(); FuriString* path_dst = furi_string_alloc();
FuriString* base = furi_string_alloc(); FuriString* base = furi_string_alloc();
const bool copy = (event.event == ArchiveBrowserEventFileMenuPast_Copy); const bool copy = (event.event == ArchiveBrowserEventFileMenuPaste_Copy);
path_extract_basename(furi_string_get_cstr(path_src), base); path_extract_basename(furi_string_get_cstr(path_src), base);
path_concat(furi_string_get_cstr(browser->path), furi_string_get_cstr(base), path_dst); path_concat(furi_string_get_cstr(browser->path), furi_string_get_cstr(base), path_dst);

View File

@ -60,13 +60,13 @@ static void contex_menu_filemanager_init(ArchiveBrowserViewModel* model) {
} else if(model->clipboard_mode == CLIPBOARD_MODE_CUT) { } else if(model->clipboard_mode == CLIPBOARD_MODE_CUT) {
archive_menu_add_item( archive_menu_add_item(
menu_array_push_raw(model->context_menu), menu_array_push_raw(model->context_menu),
"Past", "Paste",
ArchiveBrowserEventFileMenuPast_Cut); ArchiveBrowserEventFileMenuPaste_Cut);
} else if(model->clipboard_mode == CLIPBOARD_MODE_COPY) { } else if(model->clipboard_mode == CLIPBOARD_MODE_COPY) {
archive_menu_add_item( archive_menu_add_item(
menu_array_push_raw(model->context_menu), menu_array_push_raw(model->context_menu),
"Past", "Paste",
ArchiveBrowserEventFileMenuPast_Copy); ArchiveBrowserEventFileMenuPaste_Copy);
} }
archive_menu_add_item( archive_menu_add_item(
@ -79,13 +79,13 @@ static void contex_menu_filemanager_init(ArchiveBrowserViewModel* model) {
if(model->clipboard_mode == CLIPBOARD_MODE_CUT) { if(model->clipboard_mode == CLIPBOARD_MODE_CUT) {
archive_menu_add_item( archive_menu_add_item(
menu_array_push_raw(model->context_menu), menu_array_push_raw(model->context_menu),
"Past", "Paste",
ArchiveBrowserEventFileMenuPast_Cut); ArchiveBrowserEventFileMenuPaste_Cut);
} else if(model->clipboard_mode == CLIPBOARD_MODE_COPY) { } else if(model->clipboard_mode == CLIPBOARD_MODE_COPY) {
archive_menu_add_item( archive_menu_add_item(
menu_array_push_raw(model->context_menu), menu_array_push_raw(model->context_menu),
"Past", "Paste",
ArchiveBrowserEventFileMenuPast_Copy); ArchiveBrowserEventFileMenuPaste_Copy);
} }
archive_menu_add_item( archive_menu_add_item(
menu_array_push_raw(model->context_menu), "NewDir", ArchiveBrowserEventFileMenuNewDir); menu_array_push_raw(model->context_menu), "NewDir", ArchiveBrowserEventFileMenuNewDir);
@ -109,7 +109,7 @@ static void render_item_menu(Canvas* canvas, ArchiveBrowserViewModel* model) {
// Folder // Folder
//FURI_LOG_D(TAG, "Directory type"); //FURI_LOG_D(TAG, "Directory type");
// { Copy/Cut, Past } NewDir, Rename, Delete // { Copy/Cut, Paste } NewDir, Rename, Delete
model->menu_file_manage = true; model->menu_file_manage = true;
model->menu_can_switch = false; model->menu_can_switch = false;
@ -119,7 +119,7 @@ static void render_item_menu(Canvas* canvas, ArchiveBrowserViewModel* model) {
//FURI_LOG_D(TAG, "Unknown type"); //FURI_LOG_D(TAG, "Unknown type");
model->menu_can_switch = true; model->menu_can_switch = true;
if(model->menu_file_manage) { if(model->menu_file_manage) {
// { Copy/Cut, Past } NewDir, Rename, Delete // { Copy/Cut, Paste } NewDir, Rename, Delete
contex_menu_filemanager_init(model); contex_menu_filemanager_init(model);
} else { } else {
// Info, [Show], // Info, [Show],
@ -187,7 +187,7 @@ static void render_item_menu(Canvas* canvas, ArchiveBrowserViewModel* model) {
model->menu_can_switch = true; model->menu_can_switch = true;
if(model->menu_file_manage) { if(model->menu_file_manage) {
// { Copy/Cut, Past } NewDir, Rename, Delete // { Copy/Cut, Paste } NewDir, Rename, Delete
contex_menu_filemanager_init(model); contex_menu_filemanager_init(model);
} else { } else {
// Run, Pin, Info, [Show] // Run, Pin, Info, [Show]

View File

@ -50,8 +50,8 @@ typedef enum {
ArchiveBrowserEventFileMenuNewDir, ArchiveBrowserEventFileMenuNewDir,
ArchiveBrowserEventFileMenuCut, ArchiveBrowserEventFileMenuCut,
ArchiveBrowserEventFileMenuCopy, ArchiveBrowserEventFileMenuCopy,
ArchiveBrowserEventFileMenuPast_Cut, ArchiveBrowserEventFileMenuPaste_Cut,
ArchiveBrowserEventFileMenuPast_Copy, ArchiveBrowserEventFileMenuPaste_Copy,
ArchiveBrowserEventFileMenuDelete, ArchiveBrowserEventFileMenuDelete,
ArchiveBrowserEventFileMenuInfo, ArchiveBrowserEventFileMenuInfo,
ArchiveBrowserEventFileMenuShow, ArchiveBrowserEventFileMenuShow,