summaryrefslogtreecommitdiff
path: root/src/ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui.c')
-rw-r--r--src/ui.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/ui.c b/src/ui.c
index 7f1dc52..da6fd1b 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -5,7 +5,7 @@
#include <string.h>
#include "nuklear.h"
-#include <nfd.h>
+#include "tinyfiledialogs.h"
#include "constants.h"
#include "logger.h"
@@ -13,7 +13,7 @@
#include "ui.h"
static nk_size pct;
-static nfdchar_t *outPath;
+static char *outPath;
void load_ui(struct ui_struct *ui) {
static char text[USHRT_MAX], box_buffer[UINT16_MAX], status_string[UCHAR_MAX];
@@ -52,14 +52,10 @@ void load_ui(struct ui_struct *ui) {
// Clear logger text
clear_log();
- nfdresult_t result = NFD_PickFolder(&outPath, "");
- if (result == NFD_OKAY) {
- DEBUG_PRINT("[NFD] outPath: %s\n", outPath);
- } else if (result == NFD_ERROR) {
- LOG("NFD", "Error: %s\n", NFD_GetError());
- }
+ outPath = tinyfd_selectFolderDialog("Pick a download folder: ", NULL);
if (outPath) {
+ DEBUG_PRINT("tinyfd gets outPath: %s\n", outPath);
append_log("Got URL: %s\n", text);
add_url(text, outPath, NULL, NULL);
} else {