feat: filesystem and Files app support for >64 file entries, 64-bit sizes, async ops, GUI toolkit improvements to devexplorer app
This commit is contained in:
@@ -51,10 +51,13 @@ void filemanager_on_mouse(Window* win, MouseEvent& ev) {
|
||||
case CTX_DELETE: filemanager_delete_selected(fm); break;
|
||||
case CTX_NEW_FOLDER: filemanager_new_folder(fm); break;
|
||||
case CTX_PROPERTIES: {
|
||||
if (fm->multi_count > 1) {
|
||||
int sel[64];
|
||||
int n = filemanager_collect_selection(fm, sel, 64);
|
||||
if (n > 0) filemanager_show_multi_properties(fm, sel, n);
|
||||
if (fm->multi_count > 1 && fm->entry_count > 0) {
|
||||
int* sel = (int*)montauk::malloc((uint64_t)fm->entry_count * sizeof(int));
|
||||
if (sel) {
|
||||
int n = filemanager_collect_selection(fm, sel, fm->entry_count);
|
||||
if (n > 0) filemanager_show_multi_properties(fm, sel, n);
|
||||
montauk::mfree(sel);
|
||||
}
|
||||
} else {
|
||||
filemanager_show_properties(fm, target);
|
||||
}
|
||||
@@ -204,7 +207,7 @@ void filemanager_on_mouse(Window* win, MouseEvent& ev) {
|
||||
|
||||
// Recompute hit-set every frame so entries highlight live during the drag.
|
||||
filemanager_clear_multi_selection(fm);
|
||||
int limit = fm->entry_count < 64 ? fm->entry_count : 64;
|
||||
int limit = fm->entry_count;
|
||||
if (fm->grid_view) {
|
||||
int cols = (cw - FM_SCROLLBAR_W) / FM_GRID_CELL_W;
|
||||
if (cols < 1) cols = 1;
|
||||
@@ -484,7 +487,7 @@ void filemanager_on_key(Window* win, const Montauk::KeyEvent& key) {
|
||||
void filemanager_on_close(Window* win) {
|
||||
if (win->app_data) {
|
||||
FileManagerState* fm = (FileManagerState*)win->app_data;
|
||||
filemanager_free_app_icons(fm);
|
||||
filemanager_free_arrays(fm);
|
||||
montauk::mfree(win->app_data);
|
||||
win->app_data = nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user