From 6bc7fb99d889484c1d13b1d8692b1a19a7a8b609 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Tue, 14 Jul 2026 18:34:15 +0200 Subject: [PATCH] Add multi-URL clipboard import --- CMakeLists.txt | 2 +- README | 1 + po/fr.po | 4 ++-- po/it.po | 4 ++-- po/nl.po | 4 ++-- po/prozgui.pot | 2 +- po/pt_BR.po | 4 ++-- po/ro.po | 4 ++-- src/ftpsearch_win.cpp | 4 ++-- src/ftpsearch_win.h | 2 +- src/main.cpp | 12 ++++++++++-- 11 files changed, 26 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e1c3ed9..169fef0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.20) -project(prozgui VERSION 2.3.1 LANGUAGES C CXX) +project(prozgui VERSION 2.4.0 LANGUAGES C CXX) include(GNUInstallDirs) find_package(Threads REQUIRED) diff --git a/README b/README index 3684f64..2cd7d4c 100644 --- a/README +++ b/README @@ -13,6 +13,7 @@ Supports FTP Supports HTTP including redirection. Supports dragging URLs, newline-separated URL lists, and local URL-list files onto the main window. +Supports pasting one or more URLs into the main window with Ctrl+V. Selects a suitable FLTK appearance for GNOME/MATE and KDE automatically; set FLTK_SCHEME to override the automatic choice. Proxy servers supported. diff --git a/po/fr.po b/po/fr.po index 7623140..0c6cb7f 100644 --- a/po/fr.po +++ b/po/fr.po @@ -532,8 +532,8 @@ msgstr "Version de l'interface %s" msgid "libprozilla version %s" msgstr "Version de libprozilla %s" -msgid "Drop URLs or URL list files here" -msgstr "Déposez ici des URL ou des fichiers de listes d’URL" +msgid "Drop URLs or URL list files here\nor press Ctrl+V to paste URLs" +msgstr "Déposez ici des URL ou des fichiers de listes d’URL\nou appuyez sur Ctrl+V pour coller des URL" #, c-format msgid "Started %d download(s); skipped %d invalid, duplicate, or unreadable item(s)." diff --git a/po/it.po b/po/it.po index a1c8336..5f3e254 100644 --- a/po/it.po +++ b/po/it.po @@ -515,8 +515,8 @@ msgstr "Versione GUI %s" msgid "libprozilla version %s" msgstr "Versione libprozilla %s" -msgid "Drop URLs or URL list files here" -msgstr "Trascina qui URL o file con elenchi di URL" +msgid "Drop URLs or URL list files here\nor press Ctrl+V to paste URLs" +msgstr "Trascina qui URL o file con elenchi di URL\no premi Ctrl+V per incollare gli URL" #, c-format msgid "Started %d download(s); skipped %d invalid, duplicate, or unreadable item(s)." diff --git a/po/nl.po b/po/nl.po index 2e38746..b382ee7 100644 --- a/po/nl.po +++ b/po/nl.po @@ -431,8 +431,8 @@ msgstr "GUI-versie %s" msgid "libprozilla version %s" msgstr "libprozilla-versie %s" -msgid "Drop URLs or URL list files here" -msgstr "Sleep URL's of bestanden met URL-lijsten hierheen" +msgid "Drop URLs or URL list files here\nor press Ctrl+V to paste URLs" +msgstr "Sleep URL's of bestanden met URL-lijsten hierheen\nof druk op Ctrl+V om URL's te plakken" #, c-format msgid "Started %d download(s); skipped %d invalid, duplicate, or unreadable item(s)." diff --git a/po/prozgui.pot b/po/prozgui.pot index 3ce2b20..4331309 100644 --- a/po/prozgui.pot +++ b/po/prozgui.pot @@ -556,7 +556,7 @@ msgid "Prozilla - Download Accelerator" msgstr "" #: src/main.cpp -msgid "Drop URLs or URL list files here" +msgid "Drop URLs or URL list files here\nor press Ctrl+V to paste URLs" msgstr "" #: src/main.cpp diff --git a/po/pt_BR.po b/po/pt_BR.po index ad93068..b1eba16 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -534,8 +534,8 @@ msgstr "Versão da interface %s" msgid "libprozilla version %s" msgstr "Versão da libprozilla %s" -msgid "Drop URLs or URL list files here" -msgstr "Solte URLs ou arquivos de listas de URLs aqui" +msgid "Drop URLs or URL list files here\nor press Ctrl+V to paste URLs" +msgstr "Solte URLs ou arquivos de listas de URLs aqui\nou pressione Ctrl+V para colar URLs" #, c-format msgid "Started %d download(s); skipped %d invalid, duplicate, or unreadable item(s)." diff --git a/po/ro.po b/po/ro.po index 21b6146..005b2d8 100644 --- a/po/ro.po +++ b/po/ro.po @@ -454,8 +454,8 @@ msgstr "Versiune interfață %s" msgid "libprozilla version %s" msgstr "Versiune libprozilla %s" -msgid "Drop URLs or URL list files here" -msgstr "Plasați aici URL-uri sau fișiere cu liste de URL-uri" +msgid "Drop URLs or URL list files here\nor press Ctrl+V to paste URLs" +msgstr "Plasați aici URL-uri sau fișiere cu liste de URL-uri\nsau apăsați Ctrl+V pentru a lipi URL-uri" #, c-format msgid "Started %d download(s); skipped %d invalid, duplicate, or unreadable item(s)." diff --git a/src/ftpsearch_win.cpp b/src/ftpsearch_win.cpp index c471f89..ec43fee 100644 --- a/src/ftpsearch_win.cpp +++ b/src/ftpsearch_win.cpp @@ -47,14 +47,14 @@ FTPS_Window::FTPS_Window():ftps_gui() void FTPS_Window::fetch_mirror_info(urlinfo *u, long file_size, - char *ftps_loc, + const char *ftps_loc, ftpsearch_server_type_t server_type, int num_req_mirrors) { assert(u->file); ftps_file_box->value(u->file); - request=proz_ftps_request_init(u, file_size, ftps_loc, + request=proz_ftps_request_init(u, file_size, const_cast(ftps_loc), server_type, num_req_mirrors); proz_connection_set_msg_proc(request->connection, ftps_win_message_proc, this); diff --git a/src/ftpsearch_win.h b/src/ftpsearch_win.h index e2701a7..b7ea0c2 100644 --- a/src/ftpsearch_win.h +++ b/src/ftpsearch_win.h @@ -41,7 +41,7 @@ class FTPS_Window:public ftps_gui { public: FTPS_Window(); - void fetch_mirror_info(urlinfo *u, long file_size, char *ftps_loc, + void fetch_mirror_info(urlinfo *u, long file_size, const char *ftps_loc, ftpsearch_server_type_t server_type, int num_req_mirrors); diff --git a/src/main.cpp b/src/main.cpp index 41ab7f6..960091e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -130,6 +130,13 @@ int Main_Window::handle(int e) case FL_PASTE: import_dropped_text(Fl::event_text()); return 1; + case FL_SHORTCUT: + if ((Fl::event_state() & FL_CTRL) && Fl::event_key() == 'v') + { + Fl::paste(*this, 1); + return 1; + } + break; default: break; } @@ -665,8 +672,9 @@ int main(int argc, char **argv) menubar->menu(menuitems); } - Fl_Box *drop_hint = new Fl_Box(20, 55, 460, 165, - _("Drop URLs or URL list files here")); + Fl_Box *drop_hint = new Fl_Box( + 20, 55, 460, 165, + _("Drop URLs or URL list files here\nor press Ctrl+V to paste URLs")); drop_hint->box(FL_DOWN_BOX); drop_hint->labelsize(16); drop_hint->labelcolor(FL_DARK3);