diff options
Diffstat (limited to 'src/ui.c')
-rw-r--r-- | src/ui.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -6,7 +6,7 @@ #include "nuklear.h" #include "process_url.h" -#include "tinyfiledialogs.h" +#include "nfd.h" #include "constants.h" #include "logger.h" @@ -16,7 +16,7 @@ static nk_size pct; static bool show_app_about; -static char *outPath; +static nfdchar_t *outPath; void load_ui(struct ui_struct *ui) { static char text[USHRT_MAX], box_buffer[UINT16_MAX], status_string[UCHAR_MAX]; @@ -103,12 +103,10 @@ void load_ui(struct ui_struct *ui) { // Clear logger text clear_log(); - outPath = tinyfd_selectFolderDialog("Pick a download folder: ", NULL); - - if (outPath) { - DEBUG_PRINT("tinyfd gets outPath: %s\n", outPath); + if (NFD_PickFolder(&outPath, NULL) == NFD_OKAY && outPath) { + DEBUG_PRINT("nfd gets outPath: %s\n", (char *)outPath); append_log("Got URL: %s\n", text); - add_url(text, outPath, NULL, NULL, NULL); + add_url(text, (char *)outPath, NULL, NULL, NULL); } else { LOG("NFD", "Please specify a valid file PATH to write to!\n"); } |