Use current FTP search providers for 2.4.3
This commit is contained in:
+2
-2
@@ -6,8 +6,8 @@ target_include_directories(prozgui PRIVATE
|
||||
target_compile_definitions(prozgui PRIVATE
|
||||
HAVE_CONFIG_H=1 LOCALEDIR="${LOCALEDIR}" GLOBAL_CONF_FILE="${GLOBAL_CONF_FILE}")
|
||||
target_compile_options(prozgui PRIVATE
|
||||
$<$<COMPILE_LANG_AND_ID:C,GNU,Clang>:-Wall;-Wextra>
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang>:-Wall;-Wextra>)
|
||||
$<$<COMPILE_LANG_AND_ID:C,GNU,Clang>:-Wall;-Wextra;-Wno-unused-parameter>
|
||||
$<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang>:-Wall;-Wextra;-Wno-unused-parameter;-Wno-unused-but-set-variable;-Wno-missing-field-initializers>)
|
||||
target_link_libraries(prozgui PRIVATE libprozilla::prozilla ${FLTK_LIBRARIES})
|
||||
if(Intl_FOUND)
|
||||
target_link_libraries(prozgui PRIVATE Intl::Intl)
|
||||
|
||||
+3
-3
@@ -175,7 +175,7 @@ flproz_message::flproz_message() {
|
||||
running = FALSE;
|
||||
}
|
||||
|
||||
void flproz_message::set_label(char *label) {
|
||||
void flproz_message::set_label(const char *label) {
|
||||
assert(label!=NULL);
|
||||
strncpy(buffer,label, MAX_MSG_SIZE-1);
|
||||
buffer[MAX_MSG_SIZE-1]=0;
|
||||
@@ -213,7 +213,7 @@ flproz_ask::flproz_ask() {
|
||||
running = FALSE;
|
||||
}
|
||||
|
||||
void flproz_ask::set_label(char *label) {
|
||||
void flproz_ask::set_label(const char *label) {
|
||||
assert(label!=NULL);
|
||||
strncpy(buffer,label, MAX_MSG_SIZE-1);
|
||||
buffer[MAX_MSG_SIZE-1]=0;
|
||||
@@ -251,7 +251,7 @@ flproz_choice::flproz_choice() {
|
||||
running = FALSE;
|
||||
}
|
||||
|
||||
void flproz_choice::set_label(char *label) {
|
||||
void flproz_choice::set_label(const char *label) {
|
||||
assert(label!=NULL);
|
||||
strncpy(buffer,label, MAX_MSG_SIZE-1);
|
||||
buffer[MAX_MSG_SIZE-1]=0;
|
||||
|
||||
+3
-3
@@ -166,7 +166,7 @@ class flproz_message {} {
|
||||
}
|
||||
decl {char buffer[MAX_MSG_SIZE];} {public
|
||||
}
|
||||
Function {set_label(char *label)} {open
|
||||
Function {set_label(const char *label)} {open
|
||||
} {
|
||||
code {assert(label!=NULL);
|
||||
strncpy(buffer,label, MAX_MSG_SIZE-1);
|
||||
@@ -212,7 +212,7 @@ class flproz_ask {} {
|
||||
}
|
||||
decl {int no_button_pressed;} {public
|
||||
}
|
||||
Function {set_label(char *label)} {open
|
||||
Function {set_label(const char *label)} {open
|
||||
} {
|
||||
code {assert(label!=NULL);
|
||||
strncpy(buffer,label, MAX_MSG_SIZE-1);
|
||||
@@ -264,7 +264,7 @@ class flproz_choice {} {
|
||||
}
|
||||
decl {char button2_label[100];} {public
|
||||
}
|
||||
Function {set_label(char *label)} {} {
|
||||
Function {set_label(const char *label)} {} {
|
||||
code {assert(label!=NULL);
|
||||
strncpy(buffer,label, MAX_MSG_SIZE-1);
|
||||
buffer[MAX_MSG_SIZE-1]=0;
|
||||
|
||||
+3
-3
@@ -63,7 +63,7 @@ public:
|
||||
int running;
|
||||
int ok_button_pressed;
|
||||
char buffer[MAX_MSG_SIZE];
|
||||
void set_label(char *label);
|
||||
void set_label(const char *label);
|
||||
};
|
||||
extern void cb_ask_yes_button(Fl_Button*, void*);
|
||||
extern void cb_ask_no_button(Fl_Button*, void*);
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
int yes_button_pressed;
|
||||
char buffer[MAX_MSG_SIZE];
|
||||
int no_button_pressed;
|
||||
void set_label(char *label);
|
||||
void set_label(const char *label);
|
||||
int running;
|
||||
};
|
||||
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
int button2_pressed;
|
||||
char button1_label[100];
|
||||
char button2_label[100];
|
||||
void set_label(char *label);
|
||||
void set_label(const char *label);
|
||||
void set_button1_label(const char *label);
|
||||
void set_button2_label(const char *label);
|
||||
int running;
|
||||
|
||||
+8
-14
@@ -41,7 +41,8 @@ void cb_dl_window(Fl_Window * widget, void *)
|
||||
|
||||
if (dl_window->status != DL_IDLING)
|
||||
{
|
||||
if (fl_choice(_("Are you Sure You want to quit?"), _("No"), _("Yes"), 0) == 1)
|
||||
if (fl_choice("%s", _("No"), _("Yes"), 0,
|
||||
_("Are you Sure You want to quit?")) == 1)
|
||||
{
|
||||
dl_window->cleanup(FALSE);
|
||||
}
|
||||
@@ -420,7 +421,7 @@ void DL_Window::start_download()
|
||||
void DL_Window::unpause_download()
|
||||
{
|
||||
|
||||
assert(status = DL_PAUSED);
|
||||
assert(status == DL_PAUSED);
|
||||
|
||||
if (got_info == FALSE)
|
||||
{
|
||||
@@ -514,22 +515,15 @@ void DL_Window::handle_info_thread()
|
||||
{
|
||||
ftpsearch_win->fetch_mirror_info(&connection->u,
|
||||
connection->main_file_size,
|
||||
"http://www.filesearching.com/cgi-bin/s",
|
||||
FILESEARCH_RU, rt.ftps_mirror_req_n);
|
||||
"https://archie.disconnected-by-peer.at/api/search",
|
||||
ARCHIE_JSON, rt.ftps_mirror_req_n);
|
||||
}
|
||||
else if(rt.ftpsearch_server_id==1)
|
||||
else if(rt.ftpsearch_server_id==1)
|
||||
{
|
||||
ftpsearch_win->fetch_mirror_info(&connection->u,
|
||||
connection->main_file_size,
|
||||
"http://ftpsearch.uniovi.es:8000/ftpsearch",
|
||||
LYCOS, rt.ftps_mirror_req_n);
|
||||
}
|
||||
else if(rt.ftpsearch_server_id==2)
|
||||
{
|
||||
ftpsearch_win->fetch_mirror_info(&connection->u,
|
||||
connection->main_file_size,
|
||||
"http://download.lycos.com/swadv/AdvResults.asp",
|
||||
LYCOS, rt.ftps_mirror_req_n);
|
||||
"https://www.mmnt.ru/int/get",
|
||||
MAMONT_HTML, rt.ftps_mirror_req_n);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -51,7 +51,6 @@ typedef enum {
|
||||
class DL_Window:public dl_gui {
|
||||
|
||||
void draw();
|
||||
int cx, cy;
|
||||
char key;
|
||||
public:
|
||||
DL_Window(urlinfo * url_data, Fl_Boxtype b, int x, int y,
|
||||
|
||||
@@ -54,7 +54,7 @@ void FTPS_Window::fetch_mirror_info(urlinfo *u, long file_size,
|
||||
assert(u->file);
|
||||
ftps_file_box->value(u->file);
|
||||
|
||||
request=proz_ftps_request_init(u, file_size, const_cast<char *>(ftps_loc),
|
||||
request=proz_ftps_request_init(u, file_size, ftps_loc,
|
||||
server_type, num_req_mirrors);
|
||||
proz_connection_set_msg_proc(request->connection, ftps_win_message_proc,
|
||||
this);
|
||||
|
||||
@@ -448,6 +448,8 @@ void set_ftpsearch_server_id(int i, const char *const val, FILE * const fp)
|
||||
rt.ftpsearch_server_id = atoi(val);
|
||||
if (rt.ftpsearch_server_id < 0)
|
||||
rt.ftpsearch_server_id = 0;
|
||||
else if (rt.ftpsearch_server_id > 1)
|
||||
rt.ftpsearch_server_id = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-4
@@ -82,9 +82,8 @@ Fl_Check_Button *in_use_ftpsearch_button=(Fl_Check_Button *)0;
|
||||
Fl_Choice *ftps_server_choice=(Fl_Choice *)0;
|
||||
|
||||
Fl_Menu_Item menu_ftps_server_choice[] = {
|
||||
{gettext("filesearching.com"), 0, 0, 0, 0, 0, 0, 12, 56},
|
||||
{gettext("ftpsearch.uniovie.es"), 0, 0, 0, 0, 0, 0, 12, 56},
|
||||
{gettext("ftpsearch.lycos.com"), 0, 0, 0, 0, 0, 0, 12, 56},
|
||||
{"archie.disconnected-by-peer.at", 0, 0, 0, 0, 0, 0, 12, 56},
|
||||
{"www.mmnt.ru", 0, 0, 0, 0, 0, 0, 12, 56},
|
||||
{0}
|
||||
};
|
||||
|
||||
@@ -4373,7 +4372,7 @@ esources at genesys.ro, testing"));
|
||||
}
|
||||
o->end();
|
||||
}
|
||||
{ Fl_Box* o = new Fl_Box(15, 255, 195, 20, gettext("Webpage - http://prozilla.genesys.ro/"));
|
||||
{ Fl_Box* o = new Fl_Box(15, 255, 300, 20, gettext("Webpage - https://prozilla.disconnected-by-peer.at"));
|
||||
o->color(29);
|
||||
o->labelsize(10);
|
||||
o->labelcolor(1);
|
||||
|
||||
@@ -222,16 +222,12 @@ Function {make_prefs_win()} {} {
|
||||
xywh {285 55 160 25} down_box BORDER_BOX labelsize 12 align 132 textsize 12
|
||||
} {
|
||||
menuitem {} {
|
||||
label {filesearching.com}
|
||||
label {archie.disconnected-by-peer.at}
|
||||
xywh {0 0 100 20} labelsize 12
|
||||
}
|
||||
menuitem {} {
|
||||
label {ftpsearch.uniovie.es}
|
||||
xywh {10 10 100 20} labelsize 12
|
||||
}
|
||||
menuitem {} {
|
||||
label {ftpsearch.lycos.com}
|
||||
xywh {10 10 100 20} labelsize 12
|
||||
label {www.mmnt.ru}
|
||||
xywh {0 0 100 20} labelsize 12
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -309,7 +305,7 @@ Function {make_about_win()} {} {
|
||||
xywh {290 175 210 45} labelsize 10 align 128
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Pablo Iranzo Gómez - testing}
|
||||
label {Pablo Iranzo Gómez - testing}
|
||||
xywh {295 220 180 20} labelsize 10 align 128
|
||||
}
|
||||
Fl_Box {} {
|
||||
@@ -361,7 +357,7 @@ Function {make_about_win()} {} {
|
||||
}
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Webpage - http://prozilla.genesys.ro/}
|
||||
label {Webpage - https://prozilla.disconnected-by-peer.at}
|
||||
xywh {15 255 195 20} color 29 labelsize 10 labelcolor 1 align 128
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user