Initial commit of ProzGUI 2.0.5beta
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,24 @@
|
||||
/BigProZilla01.xpm/1.1/Thu Aug 9 23:22:47 2001//
|
||||
D/images////
|
||||
/Fl_ProgressBox.H/1.2/Wed Aug 1 12:50:16 2001//
|
||||
/Fl_ProgressBox.cxx/1.2/Thu Aug 2 08:47:38 2001//
|
||||
/Makefile.am/1.9/Sun Aug 5 09:04:51 2001//
|
||||
/Makefile.in/1.9/Sun Aug 5 09:04:53 2001//
|
||||
/dl_win.cxx/1.5/Tue Aug 7 15:14:59 2001//
|
||||
/dl_win.fl/1.5/Tue Aug 7 15:14:35 2001//
|
||||
/dl_win.h/1.5/Tue Aug 7 15:14:36 2001//
|
||||
/download_win.cpp/1.11/Tue Aug 7 23:45:24 2001//
|
||||
/download_win.h/1.6/Wed Aug 8 09:41:40 2001//
|
||||
/getopt.c/1.1/Wed Aug 1 10:21:57 2001//
|
||||
/getopt.h/1.1/Wed Aug 1 10:21:57 2001//
|
||||
/init.cpp/1.7/Wed Aug 8 09:39:57 2001//
|
||||
/init.h/1.2/Wed Aug 8 09:39:10 2001//
|
||||
/main.cpp/1.8/Wed Aug 8 09:54:35 2001//
|
||||
/main.h/1.5/Mon Aug 6 13:46:57 2001//
|
||||
/options.cpp/1.7/Wed Aug 8 09:39:38 2001//
|
||||
/options.h/1.3/Wed Aug 8 09:39:01 2001//
|
||||
/prefs.cpp/1.3/Mon Aug 6 14:24:18 2001//
|
||||
/prefs.h/1.2/Wed Aug 8 09:42:10 2001//
|
||||
/we.cxx/1.8/Tue Aug 7 23:51:35 2001//
|
||||
/we.fl/1.8/Tue Aug 7 23:51:34 2001//
|
||||
/we.h/1.6/Tue Aug 7 23:51:35 2001//
|
||||
@@ -0,0 +1 @@
|
||||
fltkproz/src
|
||||
@@ -0,0 +1 @@
|
||||
:pserver:kalum@cvs.delrom.ro:/home/cvsroot
|
||||
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// "$Id: Fl_Progress.H,v 1.1.2.1 2001/08/11 14:49:51 easysw Exp $"
|
||||
//
|
||||
// Progress bar widget definitions.
|
||||
//
|
||||
// Copyright 2000-2001 by Michael Sweet.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA.
|
||||
//
|
||||
// Please report all bugs and problems to "fltk-bugs@fltk.org".
|
||||
//
|
||||
|
||||
#ifndef _Fl_Progress_H_
|
||||
# define _Fl_Progress_H_
|
||||
|
||||
//
|
||||
// Include necessary headers.
|
||||
//
|
||||
|
||||
#include <FL/Fl_Widget.H>
|
||||
|
||||
|
||||
//
|
||||
// Progress class...
|
||||
//
|
||||
|
||||
class Fl_Progress : public Fl_Widget
|
||||
{
|
||||
float value_,
|
||||
minimum_,
|
||||
maximum_;
|
||||
|
||||
protected:
|
||||
|
||||
FL_EXPORT virtual void draw();
|
||||
|
||||
public:
|
||||
|
||||
FL_EXPORT Fl_Progress(int x, int y, int w, int h, const char *l = 0);
|
||||
|
||||
void maximum(float v) { maximum_ = v; redraw(); }
|
||||
float maximum() const { return (maximum_); }
|
||||
|
||||
void minimum(float v) { minimum_ = v; redraw(); }
|
||||
float minimum() const { return (minimum_); }
|
||||
|
||||
void value(float v) { value_ = v; redraw(); }
|
||||
float value() const { return (value_); }
|
||||
};
|
||||
|
||||
#endif // !_Fl_Progress_H_
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Progress.H,v 1.1.2.1 2001/08/11 14:49:51 easysw Exp $".
|
||||
//
|
||||
@@ -0,0 +1,121 @@
|
||||
//
|
||||
// "$Id: Fl_Progress.cxx,v 1.1.2.1 2001/08/11 14:49:51 easysw Exp $"
|
||||
//
|
||||
// Progress bar widget routines.
|
||||
//
|
||||
// Copyright 2000-2001 by Michael Sweet.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA.
|
||||
//
|
||||
// Please report all bugs and problems to "fltk-bugs@fltk.org".
|
||||
//
|
||||
// Contents:
|
||||
//
|
||||
// Fl_Progress::draw() - Draw the check button.
|
||||
// Fl_Progress::Fl_Progress() - Construct a Fl_Progress widget.
|
||||
//
|
||||
|
||||
//
|
||||
// Include necessary header files...
|
||||
//
|
||||
|
||||
#include <FL/Fl.H>
|
||||
#include "Fl_Progress.H"
|
||||
#include <FL/fl_draw.H>
|
||||
#include <stdio.h>
|
||||
|
||||
//
|
||||
// Fl_Progress is a progress bar widget based off Fl_Widget that shows a
|
||||
// standard progress bar...
|
||||
//
|
||||
|
||||
|
||||
//
|
||||
// 'Fl_Progress::draw()' - Draw the check button.
|
||||
//
|
||||
|
||||
void Fl_Progress::draw()
|
||||
{
|
||||
int progress; // Size of progress bar...
|
||||
int bx, by, bw, bh; // Box areas...
|
||||
|
||||
|
||||
// Get the box borders...
|
||||
bx = Fl::box_dx(box());
|
||||
by = Fl::box_dy(box());
|
||||
bw = Fl::box_dw(box());
|
||||
bh = Fl::box_dh(box());
|
||||
|
||||
// Draw the box...
|
||||
draw_box(box(), x(), y(), w(), h(), color());
|
||||
|
||||
// Draw the progress bar...
|
||||
if (maximum_ > minimum_)
|
||||
progress = (int)((w() - bw) * (value_ - minimum_) /
|
||||
(maximum_ - minimum_) + 0.5f);
|
||||
else
|
||||
progress = 0;
|
||||
|
||||
if (progress > 0)
|
||||
{
|
||||
fl_clip(x() + bx, y() + by, w() - bw, h() - bh);
|
||||
|
||||
//The Next line is for FLTK 1.0.x
|
||||
// fl_color(active_r() ? color2() : inactive(color2()));
|
||||
//If you are using FLTK 1.1.x please comment out the above line and uncomment the next
|
||||
|
||||
fl_color(active_r() ? color2() : fl_inactive(color2()));
|
||||
//
|
||||
//
|
||||
fl_polygon(x() + bx, y() + by,
|
||||
x() + bx, y() + h() - by,
|
||||
x() + 5 + progress - h() / 4, y() + h() - by,
|
||||
x() + 2 + progress + h() / 4, y() + by);
|
||||
|
||||
fl_pop_clip();
|
||||
}
|
||||
|
||||
char buffer[30];
|
||||
sprintf(buffer, "%d%%", (int) (((value_ - minimum_)/(maximum_-minimum_))* 100));
|
||||
fl_color(FL_BLUE);
|
||||
fl_font(this->labelfont(), this->labelsize());
|
||||
fl_draw(buffer, x() + (w() - fl_width(buffer))/2, y() + fl_height() + (((h() - 2*by) - fl_height())/2));
|
||||
|
||||
|
||||
// Finally, the label...
|
||||
draw_label(x() + bx, y() + by, w() - bw, h() - bh);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// 'Fl_Progress::Fl_Progress()' - Construct a Fl_Progress widget.
|
||||
//
|
||||
|
||||
Fl_Progress::Fl_Progress(int x, int y, int w, int h, const char* l)
|
||||
: Fl_Widget(x, y, w, h, l)
|
||||
{
|
||||
align(FL_ALIGN_INSIDE);
|
||||
box(FL_DOWN_BOX);
|
||||
color(FL_WHITE, FL_GREEN);
|
||||
minimum(0.0f);
|
||||
maximum(100.0f);
|
||||
value(0.0f);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_Progress.cxx,v 1.1.2.1 2001/08/11 14:49:51 easysw Exp $".
|
||||
//
|
||||
@@ -0,0 +1,30 @@
|
||||
#include <FL/Fl_Box.H>
|
||||
#include <FL/Fl.H>
|
||||
#include <FL/fl_draw.H>
|
||||
|
||||
class Fl_ProgressBox : public Fl_Box
|
||||
{
|
||||
protected:
|
||||
double mMin;
|
||||
double mMax;
|
||||
double mPresent;
|
||||
double mStep;
|
||||
bool mShowPct;
|
||||
Fl_Color mTextColor;
|
||||
FL_EXPORT void draw();
|
||||
public:
|
||||
FL_EXPORT Fl_ProgressBox(int x, int y, int w, int h, const char *lbl);
|
||||
void range(double min, double max, double step = 1) { mMin = min; mMax = max; mStep = step; };
|
||||
void step(double step) { mPresent += step; redraw(); };
|
||||
double min() { return mMin; }
|
||||
double max() { return mMax; }
|
||||
double position() { return mPresent; }
|
||||
double step() { return mStep; }
|
||||
void position(double pos) { mPresent = pos; redraw(); }
|
||||
void showtext(bool st) { mShowPct = st; }
|
||||
bool showtext() { return mShowPct; }
|
||||
void textcolor(Fl_Color col) { mTextColor = col; }
|
||||
Fl_Color textcolor() { return mTextColor; }
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/******************************************************************************
|
||||
fltk prozilla - a front end for prozilla, a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif /*
|
||||
* HAVE_CONFIG_H
|
||||
*/
|
||||
|
||||
#include "Fl_ProgressBox.H"
|
||||
#include <stdio.h>
|
||||
|
||||
FL_EXPORT Fl_ProgressBox::Fl_ProgressBox(int x, int y, int w, int h, const char *lbl)
|
||||
: Fl_Box(x,y,w,h,lbl)
|
||||
{
|
||||
mMin = mPresent = 0;
|
||||
mMax = 100;
|
||||
mShowPct = true;
|
||||
box(FL_DOWN_BOX);
|
||||
selection_color(FL_BLUE);
|
||||
color(FL_WHITE);
|
||||
textcolor(FL_RED);
|
||||
}
|
||||
|
||||
FL_EXPORT void Fl_ProgressBox::draw()
|
||||
{
|
||||
int bdx, bdy;
|
||||
double pct;
|
||||
if(damage() & FL_DAMAGE_ALL)
|
||||
draw_box();
|
||||
bdx = Fl::box_dx(box());
|
||||
bdy = Fl::box_dy(box());
|
||||
fl_color(selection_color());
|
||||
if(mPresent > mMax)
|
||||
mPresent = mMax;
|
||||
if(mPresent < mMin)
|
||||
mPresent = mMin;
|
||||
pct = (mPresent - mMin) / mMax;
|
||||
fl_rectf(x() + bdx, y() + bdy, (int)(((double)w() - 2*bdx) * pct), h() - 2*bdy);
|
||||
if(mShowPct)
|
||||
{
|
||||
char buffer[30];
|
||||
sprintf(buffer, "%d%%", (int) (pct * 100));
|
||||
fl_color(textcolor());
|
||||
fl_font(this->labelfont(), this->labelsize());
|
||||
fl_draw(buffer, x() + (w() - fl_width(buffer))/2, y() + fl_height() + (((h() - 2*bdy) - fl_height())/2));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# Process this file with automake to produce Makefile.in.
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
bin_PROGRAMS = prozgui
|
||||
|
||||
CPPFLAGS = -DLOCALEDIR=\"$(datadir)/locale\"
|
||||
|
||||
prozgui_SOURCES = main.cpp download_win.cpp Fl_Progress.cxx we.cxx init.cpp options.cpp dl_win.cxx prefs.cpp ftps_win.cxx ftpsearch_win.cpp getopt.c savefile.cpp
|
||||
INCLUDES = -I. -I.. -I../libprozilla/src -I@includedir@
|
||||
CFLAGS = @CFLAGS@ -D_REENTRANT -Wall -ggdb
|
||||
CFLAGS += -DGLOBAL_CONF_FILE="\"@sysconfdir@/prozilla.conf\"" -DLOCALEDIR=\"$(datadir)/locale\"
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LDADD = ../libprozilla/src/libprozilla.la -L@libdir@ -L/usr/X11R6/lib -lfltk
|
||||
LIBS = @LIBS@ $(THREAD_LIBS)
|
||||
+558
@@ -0,0 +1,558 @@
|
||||
# Makefile.in generated by automake 1.7 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
# Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Process this file with automake to produce Makefile.in.
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@ -D_REENTRANT -Wall -ggdb -DGLOBAL_CONF_FILE="\"@sysconfdir@/prozilla.conf\"" -DLOCALEDIR=\"$(datadir)/locale\"
|
||||
CPP = @CPP@
|
||||
|
||||
CPPFLAGS = -DLOCALEDIR=\"$(datadir)/locale\"
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GENCAT = @GENCAT@
|
||||
GLIBC21 = @GLIBC21@
|
||||
GMOFILES = @GMOFILES@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
INTLBISON = @INTLBISON@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTLOBJS = @INTLOBJS@
|
||||
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@ $(THREAD_LIBS)
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
POFILES = @POFILES@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
THREAD_LIBS = @THREAD_LIBS@
|
||||
UNAME = @UNAME@
|
||||
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
X_CFLAGS = @X_CFLAGS@
|
||||
X_EXTRA_LIBS = @X_EXTRA_LIBS@
|
||||
X_LIBS = @X_LIBS@
|
||||
X_PRE_LIBS = @X_PRE_LIBS@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
subdirs = @subdirs@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
|
||||
bin_PROGRAMS = prozgui
|
||||
|
||||
prozgui_SOURCES = main.cpp download_win.cpp Fl_Progress.cxx we.cxx init.cpp options.cpp dl_win.cxx prefs.cpp ftps_win.cxx ftpsearch_win.cpp getopt.c savefile.cpp
|
||||
INCLUDES = -I. -I.. -I../libprozilla/src -I@includedir@
|
||||
LDADD = ../libprozilla/src/libprozilla.la -L@libdir@ -L/usr/X11R6/lib -lfltk
|
||||
subdir = src
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
bin_PROGRAMS = prozgui$(EXEEXT)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
|
||||
am_prozgui_OBJECTS = main.$(OBJEXT) download_win.$(OBJEXT) \
|
||||
Fl_Progress.$(OBJEXT) we.$(OBJEXT) init.$(OBJEXT) \
|
||||
options.$(OBJEXT) dl_win.$(OBJEXT) prefs.$(OBJEXT) \
|
||||
ftps_win.$(OBJEXT) ftpsearch_win.$(OBJEXT) getopt.$(OBJEXT) \
|
||||
savefile.$(OBJEXT)
|
||||
prozgui_OBJECTS = $(am_prozgui_OBJECTS)
|
||||
prozgui_LDADD = $(LDADD)
|
||||
prozgui_DEPENDENCIES = ../libprozilla/src/libprozilla.la
|
||||
prozgui_LDFLAGS =
|
||||
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/Fl_Progress.Po ./$(DEPDIR)/dl_win.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/download_win.Po ./$(DEPDIR)/ftps_win.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/ftpsearch_win.Po ./$(DEPDIR)/getopt.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/init.Po ./$(DEPDIR)/main.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/options.Po ./$(DEPDIR)/prefs.Po \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/savefile.Po ./$(DEPDIR)/we.Po
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
|
||||
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DIST_SOURCES = $(prozgui_SOURCES)
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
SOURCES = $(prozgui_SOURCES)
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .cpp .cxx .lo .o .obj
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu src/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
|
||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
|
||||
rm -f $(DESTDIR)$(bindir)/$$f; \
|
||||
done
|
||||
|
||||
clean-binPROGRAMS:
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f $$p $$f"; \
|
||||
rm -f $$p $$f ; \
|
||||
done
|
||||
prozgui$(EXEEXT): $(prozgui_OBJECTS) $(prozgui_DEPENDENCIES)
|
||||
@rm -f prozgui$(EXEEXT)
|
||||
$(CXXLINK) $(prozgui_LDFLAGS) $(prozgui_OBJECTS) $(prozgui_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT) core *.core
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Fl_Progress.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dl_win.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/download_win.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftps_win.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpsearch_win.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prefs.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/savefile.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/we.Po@am__quote@
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf ./$(DEPDIR)
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
|
||||
@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCC_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
|
||||
.cpp.o:
|
||||
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCXX_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
|
||||
.cpp.obj:
|
||||
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCXX_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`; \
|
||||
@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCXX_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`
|
||||
|
||||
.cpp.lo:
|
||||
@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
|
||||
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCXX_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
|
||||
.cxx.o:
|
||||
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCXX_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
|
||||
.cxx.obj:
|
||||
@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCXX_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`; \
|
||||
@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
|
||||
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCXX_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'`
|
||||
|
||||
.cxx.lo:
|
||||
@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
|
||||
@am__fastdepCXX_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
|
||||
@am__fastdepCXX_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; \
|
||||
@am__fastdepCXX_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
|
||||
@am__fastdepCXX_TRUE@ fi
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
ETAGS = etags
|
||||
ETAGSFLAGS =
|
||||
|
||||
CTAGS = ctags
|
||||
CTAGSFLAGS =
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|
||||
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
top_distdir = ..
|
||||
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkinstalldirs) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
distclean-am: clean-am distclean-compile distclean-depend \
|
||||
distclean-generic distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
|
||||
clean-generic clean-libtool ctags distclean distclean-compile \
|
||||
distclean-depend distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am info info-am install \
|
||||
install-am install-binPROGRAMS install-data install-data-am \
|
||||
install-exec install-exec-am install-info install-info-am \
|
||||
install-man install-strip installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am uninstall-binPROGRAMS uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
+273
@@ -0,0 +1,273 @@
|
||||
// generated by Fast Light User Interface Designer (fluid) version 1.0011
|
||||
|
||||
#include <libintl.h>
|
||||
#include "dl_win.h"
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <FL/x.H>
|
||||
|
||||
|
||||
# ifdef HAVE_LIBXPM
|
||||
# include <X11/xpm.h>
|
||||
# include "images/Pz12.xpm"
|
||||
# endif
|
||||
|
||||
dl_gui::dl_gui():Fl_Window(547,398) {
|
||||
Fl_Window* w;
|
||||
{ Fl_Window* o = dl_win = this;
|
||||
w = o;
|
||||
o->callback((Fl_Callback*)cb_dl_window, (void*)(this));
|
||||
o->align(129);
|
||||
#ifdef HAVE_LIBXPM // X11 w/Xpm library
|
||||
Pixmap pixmap, mask; // Icon pixmaps
|
||||
XpmAttributes attrs; // Attributes of icon
|
||||
|
||||
memset(&attrs, 0, sizeof(attrs));
|
||||
|
||||
XpmCreatePixmapFromData(fl_display, DefaultRootWindow(fl_display),
|
||||
Pz12_xpm, &pixmap, &mask, &attrs);
|
||||
o->icon((char *) pixmap);
|
||||
#endif
|
||||
{ Fl_Button* o = resume_later_button = new Fl_Button(365, 365, 170, 25, gettext("Abort, Resume Later"));
|
||||
o->labelsize(12);
|
||||
o->callback((Fl_Callback*)cb_dlwin_resume_later, (void*)(this));
|
||||
o->align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE);
|
||||
}
|
||||
{ Fl_Button* o = pause_button = new Fl_Button(45, 365, 70, 25, gettext("Pause"));
|
||||
o->labelsize(12);
|
||||
o->callback((Fl_Callback*)cb_dlwin_pause, (void*)(this));
|
||||
o->align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE);
|
||||
o->deactivate();
|
||||
}
|
||||
{ Fl_Button* o = no_resume_later_button = new Fl_Button(170, 365, 160, 25, gettext("Abort, No Resume Later"));
|
||||
o->labelsize(12);
|
||||
o->callback((Fl_Callback*)cb_dlwin_no_resume_later, (void*)(this));
|
||||
o->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
|
||||
o->hide();
|
||||
}
|
||||
{ Fl_Output* o = url_box = new Fl_Output(65, 10, 440, 25, gettext("URL:"));
|
||||
o->box(FL_ENGRAVED_BOX);
|
||||
o->color(49);
|
||||
o->labelsize(12);
|
||||
o->labelcolor(4);
|
||||
o->textsize(10);
|
||||
o->textcolor(4);
|
||||
o->align(132);
|
||||
}
|
||||
{ Fl_Output* o = resume_status_box = new Fl_Output(25, 185, 225, 25);
|
||||
o->box(FL_BORDER_BOX);
|
||||
o->color(49);
|
||||
o->labelsize(12);
|
||||
o->textsize(12);
|
||||
}
|
||||
{ Fl_Output* o = file_size_box = new Fl_Output(25, 155, 225, 25);
|
||||
o->box(FL_BORDER_BOX);
|
||||
o->color(49);
|
||||
o->labelsize(12);
|
||||
o->textsize(12);
|
||||
}
|
||||
{ Fl_Output* o = bytes_recv_box = new Fl_Output(25, 215, 225, 25);
|
||||
o->box(FL_BORDER_BOX);
|
||||
o->color(49);
|
||||
o->labelsize(12);
|
||||
o->textsize(12);
|
||||
}
|
||||
{ Fl_Browser* o = browser = new Fl_Browser(10, 275, 530, 85);
|
||||
o->box(FL_EMBOSSED_BOX);
|
||||
o->labelsize(12);
|
||||
o->textsize(12);
|
||||
o->textcolor(4);
|
||||
}
|
||||
{ Fl_Output* o = dl_speed_box = new Fl_Output(25, 245, 225, 25);
|
||||
o->box(FL_BORDER_BOX);
|
||||
o->color(49);
|
||||
o->labelsize(12);
|
||||
o->textsize(12);
|
||||
}
|
||||
{ Fl_Output* o = est_time_box = new Fl_Output(295, 245, 200, 25, gettext("Estimated Time Left"));
|
||||
o->box(FL_BORDER_BOX);
|
||||
o->color(49);
|
||||
o->labelsize(12);
|
||||
o->textsize(12);
|
||||
o->align(FL_ALIGN_TOP_LEFT);
|
||||
o->hide();
|
||||
}
|
||||
{ Fl_Scroll* o = scroll_win = new Fl_Scroll(20, 45, 510, 105);
|
||||
o->box(FL_ENGRAVED_BOX);
|
||||
o->labelsize(12);
|
||||
o->end();
|
||||
}
|
||||
progress_box = new Fl_Progress(270,180,170,20,0);
|
||||
o->show();
|
||||
o->end();
|
||||
}
|
||||
}
|
||||
|
||||
void dl_gui::set_pause_button_label(char *label) {
|
||||
assert(label!=NULL);
|
||||
strncpy(pause_button_label,label, 100-1);
|
||||
pause_button_label[100-1]=0;
|
||||
pause_button->label(pause_button_label);
|
||||
}
|
||||
|
||||
dl_join_gui::dl_join_gui() {
|
||||
Fl_Window* w;
|
||||
{ Fl_Window* o = win = new Fl_Window(372, 168, gettext("Creating file.............."));
|
||||
w = o;
|
||||
o->labelsize(12);
|
||||
o->user_data((void*)(this));
|
||||
{ Fl_Button* o = join_button = new Fl_Button(150, 140, 85, 25, gettext("Cancel"));
|
||||
o->labelsize(12);
|
||||
o->callback((Fl_Callback*)cb_join_jbutton, (void*)(this));
|
||||
}
|
||||
{ Fl_Group* o = new Fl_Group(10, 10, 350, 125);
|
||||
o->box(FL_EMBOSSED_BOX);
|
||||
{ Fl_Box* o = out_join_box = new Fl_Box(25, 20, 315, 105);
|
||||
o->labelsize(12);
|
||||
o->align(FL_ALIGN_WRAP|FL_ALIGN_INSIDE);
|
||||
}
|
||||
o->end();
|
||||
}
|
||||
progress_box = new Fl_Progress(50,20,270,20,0);
|
||||
o->end();
|
||||
}
|
||||
button_pressed = 0;
|
||||
running = FALSE;
|
||||
}
|
||||
|
||||
void dl_join_gui::set_box_label(char *label) {
|
||||
assert(label!=NULL);
|
||||
strncpy(box_label,label, MAX_MSG_SIZE-1);
|
||||
box_label[MAX_MSG_SIZE-1]=0;
|
||||
out_join_box->label(box_label);
|
||||
}
|
||||
|
||||
void dl_join_gui::set_button_label(char *label) {
|
||||
assert(label!=NULL);
|
||||
strncpy(button_label,label, 100-1);
|
||||
button_label[100-1]=0;
|
||||
join_button->label(button_label);
|
||||
}
|
||||
|
||||
flproz_message::flproz_message() {
|
||||
Fl_Window* w;
|
||||
{ Fl_Window* o = win = new Fl_Window(372, 143, gettext("Attention!"));
|
||||
w = o;
|
||||
o->labelsize(12);
|
||||
o->user_data((void*)(this));
|
||||
{ Fl_Button* o = ok_button = new Fl_Button(135, 110, 85, 25, gettext("Ok"));
|
||||
o->labelsize(12);
|
||||
o->callback((Fl_Callback*)cb_message_ok_button, (void*)(this));
|
||||
}
|
||||
{ Fl_Group* o = new Fl_Group(10, 10, 350, 95);
|
||||
o->box(FL_EMBOSSED_BOX);
|
||||
{ Fl_Box* o = out_msg_box = new Fl_Box(25, 20, 315, 75);
|
||||
o->color(0);
|
||||
o->labelsize(12);
|
||||
o->labelcolor(4);
|
||||
o->align(132|FL_ALIGN_INSIDE);
|
||||
}
|
||||
o->end();
|
||||
}
|
||||
o->end();
|
||||
}
|
||||
ok_button_pressed = 0;
|
||||
running = FALSE;
|
||||
}
|
||||
|
||||
void flproz_message::set_label(char *label) {
|
||||
assert(label!=NULL);
|
||||
strncpy(buffer,label, MAX_MSG_SIZE-1);
|
||||
buffer[MAX_MSG_SIZE-1]=0;
|
||||
out_msg_box->label(buffer);
|
||||
}
|
||||
|
||||
flproz_ask::flproz_ask() {
|
||||
Fl_Window* w;
|
||||
{ Fl_Window* o = win = new Fl_Window(372, 143, gettext("Attention!"));
|
||||
w = o;
|
||||
o->labelsize(12);
|
||||
o->user_data((void*)(this));
|
||||
{ Fl_Button* o = yes_button = new Fl_Button(105, 110, 85, 25, gettext("Yes"));
|
||||
o->labelsize(12);
|
||||
o->callback((Fl_Callback*)cb_ask_yes_button, (void*)(this));
|
||||
}
|
||||
{ Fl_Button* o = no_button = new Fl_Button(215, 110, 85, 25, gettext("No"));
|
||||
o->labelsize(12);
|
||||
o->callback((Fl_Callback*)cb_ask_no_button, (void*)(this));
|
||||
}
|
||||
{ Fl_Group* o = new Fl_Group(10, 10, 350, 95);
|
||||
o->box(FL_EMBOSSED_BOX);
|
||||
{ Fl_Box* o = out_msg_box = new Fl_Box(25, 20, 315, 75);
|
||||
o->color(0);
|
||||
o->labelsize(12);
|
||||
o->labelcolor(4);
|
||||
o->align(132|FL_ALIGN_INSIDE);
|
||||
}
|
||||
o->end();
|
||||
}
|
||||
o->end();
|
||||
}
|
||||
yes_button_pressed = 0;
|
||||
no_button_pressed = 0;
|
||||
running = FALSE;
|
||||
}
|
||||
|
||||
void flproz_ask::set_label(char *label) {
|
||||
assert(label!=NULL);
|
||||
strncpy(buffer,label, MAX_MSG_SIZE-1);
|
||||
buffer[MAX_MSG_SIZE-1]=0;
|
||||
out_msg_box->label(buffer);
|
||||
}
|
||||
|
||||
flproz_choice::flproz_choice() {
|
||||
Fl_Window* w;
|
||||
{ Fl_Window* o = win = new Fl_Window(372, 143, gettext("Attention!"));
|
||||
w = o;
|
||||
o->labelsize(12);
|
||||
o->user_data((void*)(this));
|
||||
{ Fl_Button* o = button1 = new Fl_Button(105, 110, 85, 25, gettext("Yes"));
|
||||
o->labelsize(12);
|
||||
o->callback((Fl_Callback*)cb_ask_yes_button, (void*)(this));
|
||||
}
|
||||
{ Fl_Button* o = button2 = new Fl_Button(215, 110, 85, 25, gettext("No"));
|
||||
o->labelsize(12);
|
||||
o->callback((Fl_Callback*)cb_ask_no_button, (void*)(this));
|
||||
}
|
||||
{ Fl_Group* o = new Fl_Group(10, 10, 350, 95);
|
||||
o->box(FL_EMBOSSED_BOX);
|
||||
{ Fl_Box* o = out_msg_box = new Fl_Box(25, 20, 315, 75);
|
||||
o->color(0);
|
||||
o->labelsize(12);
|
||||
o->labelcolor(4);
|
||||
o->align(132|FL_ALIGN_INSIDE);
|
||||
}
|
||||
o->end();
|
||||
}
|
||||
o->end();
|
||||
}
|
||||
button1_pressed = 0;
|
||||
button2_pressed = 0;
|
||||
running = FALSE;
|
||||
}
|
||||
|
||||
void flproz_choice::set_label(char *label) {
|
||||
assert(label!=NULL);
|
||||
strncpy(buffer,label, MAX_MSG_SIZE-1);
|
||||
buffer[MAX_MSG_SIZE-1]=0;
|
||||
out_msg_box->label(buffer);
|
||||
}
|
||||
|
||||
void flproz_choice::set_button1_label(char *label) {
|
||||
assert(label!=NULL);
|
||||
strncpy(button1_label,label, 100-1);
|
||||
button1_label[100-1]=0;
|
||||
button1->label(button1_label);
|
||||
}
|
||||
|
||||
void flproz_choice::set_button2_label(char *label) {
|
||||
assert(label!=NULL);
|
||||
strncpy(button2_label,label, 100-1);
|
||||
button2_label[100-1]=0;
|
||||
button2->label(button2_label);
|
||||
}
|
||||
+288
@@ -0,0 +1,288 @@
|
||||
# data file for the Fltk User Interface Designer (fluid)
|
||||
version 1.0011
|
||||
i18n_type 1
|
||||
i18n_include <libintl.h>
|
||||
i18n_function gettext
|
||||
header_name {.h}
|
||||
code_name {.cxx}
|
||||
gridx 5
|
||||
gridy 5
|
||||
snap 3
|
||||
decl {\#include "Fl_Progress.H"} {public
|
||||
}
|
||||
|
||||
decl {\#include "prozilla.h"} {public
|
||||
}
|
||||
|
||||
decl {\#include <assert.h>} {}
|
||||
|
||||
decl {\#include <string.h>} {}
|
||||
|
||||
class dl_gui {open : {public Fl_Window}
|
||||
} {
|
||||
Function {dl_gui():Fl_Window(547,398)} {open
|
||||
} {
|
||||
Fl_Window dl_win {
|
||||
callback cb_dl_window open selected
|
||||
xywh {204 94 547 398} align 129
|
||||
code0 {progress_box = new Fl_Progress(270,180,170,20,0);}
|
||||
code1 {o->show();} xclass dl_gui visible
|
||||
} {
|
||||
Fl_Button resume_later_button {
|
||||
label {Abort, Resume Later}
|
||||
user_data this
|
||||
callback cb_dlwin_resume_later
|
||||
xywh {365 365 170 25} labelsize 12 align 144
|
||||
}
|
||||
Fl_Button pause_button {
|
||||
label Pause
|
||||
user_data this
|
||||
callback cb_dlwin_pause
|
||||
xywh {45 365 70 25} labelsize 12 align 144 deactivate
|
||||
}
|
||||
Fl_Button no_resume_later_button {
|
||||
label {Abort, No Resume Later}
|
||||
user_data this
|
||||
callback cb_dlwin_no_resume_later
|
||||
xywh {170 365 160 25} labelsize 12 align 16 hide
|
||||
}
|
||||
Fl_Output url_box {
|
||||
label {URL:}
|
||||
xywh {65 10 440 25} box ENGRAVED_BOX color 49 labelsize 12 labelcolor 4 align 132 textsize 10 textcolor 4
|
||||
}
|
||||
Fl_Output resume_status_box {
|
||||
xywh {25 185 225 25} box BORDER_BOX color 49 labelsize 12 textsize 12
|
||||
}
|
||||
Fl_Output file_size_box {
|
||||
xywh {25 155 225 25} box BORDER_BOX color 49 labelsize 12 textsize 12
|
||||
}
|
||||
Fl_Output bytes_recv_box {
|
||||
xywh {25 215 225 25} box BORDER_BOX color 49 labelsize 12 textsize 12
|
||||
}
|
||||
Fl_Browser browser {
|
||||
xywh {10 275 530 85} box EMBOSSED_BOX labelsize 12 textsize 12 textcolor 4
|
||||
}
|
||||
Fl_Output dl_speed_box {
|
||||
xywh {25 245 225 25} box BORDER_BOX color 49 labelsize 12 textsize 12
|
||||
}
|
||||
Fl_Output est_time_box {
|
||||
label {Estimated Time Left}
|
||||
xywh {295 245 200 25} box BORDER_BOX color 49 labelsize 12 align 5 textsize 12 hide
|
||||
}
|
||||
Fl_Scroll scroll_win {
|
||||
xywh {20 45 510 105} box ENGRAVED_BOX labelsize 12
|
||||
} {}
|
||||
}
|
||||
}
|
||||
decl {Fl_Progress * progress_box;} {public
|
||||
}
|
||||
decl {char pause_button_label[100];} {public
|
||||
}
|
||||
Function {set_pause_button_label(char *label)} {} {
|
||||
code {assert(label!=NULL);
|
||||
strncpy(pause_button_label,label, 100-1);
|
||||
pause_button_label[100-1]=0;
|
||||
pause_button->label(pause_button_label);} {}
|
||||
}
|
||||
}
|
||||
|
||||
class dl_join_gui {open
|
||||
} {
|
||||
Function {dl_join_gui()} {open
|
||||
} {
|
||||
Fl_Window win {
|
||||
label {Creating file..............} open
|
||||
xywh {269 454 372 168} labelsize 12
|
||||
code0 {progress_box = new Fl_Progress(50,20,270,20,0);} visible
|
||||
} {
|
||||
Fl_Button join_button {
|
||||
label Cancel
|
||||
user_data this
|
||||
callback cb_join_jbutton
|
||||
xywh {150 140 85 25} labelsize 12
|
||||
}
|
||||
Fl_Group {} {open
|
||||
xywh {10 10 350 125} box EMBOSSED_BOX
|
||||
} {
|
||||
Fl_Box out_join_box {
|
||||
xywh {25 20 315 105} labelsize 12 align 144
|
||||
}
|
||||
}
|
||||
}
|
||||
code {button_pressed = 0;} {}
|
||||
code {running = FALSE;} {}
|
||||
}
|
||||
decl {int running;} {public
|
||||
}
|
||||
decl {Fl_Progress * progress_box;} {public
|
||||
}
|
||||
decl {int button_pressed;} {public
|
||||
}
|
||||
decl {char box_label[MAX_MSG_SIZE];} {public
|
||||
}
|
||||
decl {char button_label[100];} {public
|
||||
}
|
||||
Function {set_box_label(char *label)} {} {
|
||||
code {assert(label!=NULL);
|
||||
strncpy(box_label,label, MAX_MSG_SIZE-1);
|
||||
box_label[MAX_MSG_SIZE-1]=0;
|
||||
out_join_box->label(box_label);} {}
|
||||
}
|
||||
Function {set_button_label(char *label)} {} {
|
||||
code {assert(label!=NULL);
|
||||
strncpy(button_label,label, 100-1);
|
||||
button_label[100-1]=0;
|
||||
join_button->label(button_label);} {}
|
||||
}
|
||||
}
|
||||
|
||||
class flproz_message {} {
|
||||
Function {flproz_message()} {open
|
||||
} {
|
||||
Fl_Window win {
|
||||
label {Attention!} open
|
||||
xywh {392 479 372 143} labelsize 12 visible
|
||||
} {
|
||||
Fl_Button ok_button {
|
||||
label Ok
|
||||
user_data this
|
||||
callback cb_message_ok_button
|
||||
xywh {135 110 85 25} labelsize 12
|
||||
}
|
||||
Fl_Group {} {open
|
||||
xywh {10 10 350 95} box EMBOSSED_BOX
|
||||
} {
|
||||
Fl_Box out_msg_box {
|
||||
xywh {25 20 315 75} color 0 labelsize 12 labelcolor 4 align 148
|
||||
}
|
||||
}
|
||||
}
|
||||
code {ok_button_pressed = 0;} {}
|
||||
code {running = FALSE;} {}
|
||||
}
|
||||
decl {int running;} {public
|
||||
}
|
||||
decl {int ok_button_pressed;} {public
|
||||
}
|
||||
decl {char buffer[MAX_MSG_SIZE];} {public
|
||||
}
|
||||
Function {set_label(char *label)} {open
|
||||
} {
|
||||
code {assert(label!=NULL);
|
||||
strncpy(buffer,label, MAX_MSG_SIZE-1);
|
||||
buffer[MAX_MSG_SIZE-1]=0;
|
||||
out_msg_box->label(buffer);} {}
|
||||
}
|
||||
}
|
||||
|
||||
class flproz_ask {} {
|
||||
Function {flproz_ask()} {open
|
||||
} {
|
||||
Fl_Window win {
|
||||
label {Attention!} open
|
||||
xywh {334 479 372 143} labelsize 12 visible
|
||||
} {
|
||||
Fl_Button yes_button {
|
||||
label Yes
|
||||
user_data this
|
||||
callback cb_ask_yes_button
|
||||
xywh {105 110 85 25} labelsize 12
|
||||
}
|
||||
Fl_Button no_button {
|
||||
label No
|
||||
user_data this
|
||||
callback cb_ask_no_button
|
||||
xywh {215 110 85 25} labelsize 12
|
||||
}
|
||||
Fl_Group {} {open
|
||||
xywh {10 10 350 95} box EMBOSSED_BOX
|
||||
} {
|
||||
Fl_Box out_msg_box {
|
||||
xywh {25 20 315 75} color 0 labelsize 12 labelcolor 4 align 148
|
||||
}
|
||||
}
|
||||
}
|
||||
code {yes_button_pressed = 0;} {}
|
||||
code {no_button_pressed = 0;} {}
|
||||
code {running = FALSE;} {}
|
||||
}
|
||||
decl {int yes_button_pressed;} {public
|
||||
}
|
||||
decl {char buffer[MAX_MSG_SIZE];} {public
|
||||
}
|
||||
decl {int no_button_pressed;} {public
|
||||
}
|
||||
Function {set_label(char *label)} {open
|
||||
} {
|
||||
code {assert(label!=NULL);
|
||||
strncpy(buffer,label, MAX_MSG_SIZE-1);
|
||||
buffer[MAX_MSG_SIZE-1]=0;
|
||||
out_msg_box->label(buffer);} {}
|
||||
}
|
||||
decl {int running;} {public
|
||||
}
|
||||
}
|
||||
|
||||
class flproz_choice {} {
|
||||
Function {flproz_choice()} {open
|
||||
} {
|
||||
Fl_Window win {
|
||||
label {Attention!} open
|
||||
xywh {428 479 372 143} labelsize 12 visible
|
||||
} {
|
||||
Fl_Button button1 {
|
||||
label Yes
|
||||
user_data this
|
||||
callback cb_ask_yes_button
|
||||
xywh {105 110 85 25} labelsize 12
|
||||
}
|
||||
Fl_Button button2 {
|
||||
label No
|
||||
user_data this
|
||||
callback cb_ask_no_button
|
||||
xywh {215 110 85 25} labelsize 12
|
||||
}
|
||||
Fl_Group {} {open
|
||||
xywh {10 10 350 95} box EMBOSSED_BOX
|
||||
} {
|
||||
Fl_Box out_msg_box {
|
||||
xywh {25 20 315 75} color 0 labelsize 12 labelcolor 4 align 148
|
||||
}
|
||||
}
|
||||
}
|
||||
code {button1_pressed = 0;} {}
|
||||
code {button2_pressed = 0;} {}
|
||||
code {running = FALSE;} {}
|
||||
}
|
||||
decl {int button1_pressed;} {public
|
||||
}
|
||||
decl {char buffer[MAX_MSG_SIZE];} {public
|
||||
}
|
||||
decl {int button2_pressed;} {public
|
||||
}
|
||||
decl {char button1_label[100];} {public
|
||||
}
|
||||
decl {char button2_label[100];} {public
|
||||
}
|
||||
Function {set_label(char *label)} {} {
|
||||
code {assert(label!=NULL);
|
||||
strncpy(buffer,label, MAX_MSG_SIZE-1);
|
||||
buffer[MAX_MSG_SIZE-1]=0;
|
||||
out_msg_box->label(buffer);} {}
|
||||
}
|
||||
Function {set_button1_label(char *label)} {} {
|
||||
code {assert(label!=NULL);
|
||||
strncpy(button1_label,label, 100-1);
|
||||
button1_label[100-1]=0;
|
||||
button1->label(button1_label);} {}
|
||||
}
|
||||
Function {set_button2_label(char *label)} {open
|
||||
} {
|
||||
code {assert(label!=NULL);
|
||||
strncpy(button2_label,label, 100-1);
|
||||
button2_label[100-1]=0;
|
||||
button2->label(button2_label);} {}
|
||||
}
|
||||
decl {int running;} {public
|
||||
}
|
||||
}
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
// generated by Fast Light User Interface Designer (fluid) version 1.0011
|
||||
|
||||
#ifndef dl_win_h
|
||||
#define dl_win_h
|
||||
#include <FL/Fl.H>
|
||||
#include "Fl_Progress.H"
|
||||
#include "prozilla.h"
|
||||
#include <FL/Fl_Window.H>
|
||||
extern void cb_dl_window(Fl_Window*, void*);
|
||||
#include <FL/Fl_Button.H>
|
||||
extern void cb_dlwin_resume_later(Fl_Button*, void*);
|
||||
extern void cb_dlwin_pause(Fl_Button*, void*);
|
||||
extern void cb_dlwin_no_resume_later(Fl_Button*, void*);
|
||||
#include <FL/Fl_Output.H>
|
||||
#include <FL/Fl_Browser.H>
|
||||
#include <FL/Fl_Scroll.H>
|
||||
|
||||
class dl_gui : public Fl_Window {
|
||||
public:
|
||||
dl_gui();
|
||||
Fl_Window *dl_win;
|
||||
Fl_Button *resume_later_button;
|
||||
Fl_Button *pause_button;
|
||||
Fl_Button *no_resume_later_button;
|
||||
Fl_Output *url_box;
|
||||
Fl_Output *resume_status_box;
|
||||
Fl_Output *file_size_box;
|
||||
Fl_Output *bytes_recv_box;
|
||||
Fl_Browser *browser;
|
||||
Fl_Output *dl_speed_box;
|
||||
Fl_Output *est_time_box;
|
||||
Fl_Scroll *scroll_win;
|
||||
Fl_Progress * progress_box;
|
||||
char pause_button_label[100];
|
||||
void set_pause_button_label(char *label);
|
||||
};
|
||||
extern void cb_join_jbutton(Fl_Button*, void*);
|
||||
#include <FL/Fl_Group.H>
|
||||
#include <FL/Fl_Box.H>
|
||||
|
||||
class dl_join_gui {
|
||||
public:
|
||||
dl_join_gui();
|
||||
Fl_Window *win;
|
||||
Fl_Button *join_button;
|
||||
Fl_Box *out_join_box;
|
||||
int running;
|
||||
Fl_Progress * progress_box;
|
||||
int button_pressed;
|
||||
char box_label[MAX_MSG_SIZE];
|
||||
char button_label[100];
|
||||
void set_box_label(char *label);
|
||||
void set_button_label(char *label);
|
||||
};
|
||||
extern void cb_message_ok_button(Fl_Button*, void*);
|
||||
|
||||
class flproz_message {
|
||||
public:
|
||||
flproz_message();
|
||||
Fl_Window *win;
|
||||
Fl_Button *ok_button;
|
||||
Fl_Box *out_msg_box;
|
||||
int running;
|
||||
int ok_button_pressed;
|
||||
char buffer[MAX_MSG_SIZE];
|
||||
void set_label(char *label);
|
||||
};
|
||||
extern void cb_ask_yes_button(Fl_Button*, void*);
|
||||
extern void cb_ask_no_button(Fl_Button*, void*);
|
||||
|
||||
class flproz_ask {
|
||||
public:
|
||||
flproz_ask();
|
||||
Fl_Window *win;
|
||||
Fl_Button *yes_button;
|
||||
Fl_Button *no_button;
|
||||
Fl_Box *out_msg_box;
|
||||
int yes_button_pressed;
|
||||
char buffer[MAX_MSG_SIZE];
|
||||
int no_button_pressed;
|
||||
void set_label(char *label);
|
||||
int running;
|
||||
};
|
||||
|
||||
class flproz_choice {
|
||||
public:
|
||||
flproz_choice();
|
||||
Fl_Window *win;
|
||||
Fl_Button *button1;
|
||||
Fl_Button *button2;
|
||||
Fl_Box *out_msg_box;
|
||||
int button1_pressed;
|
||||
char buffer[MAX_MSG_SIZE];
|
||||
int button2_pressed;
|
||||
char button1_label[100];
|
||||
char button2_label[100];
|
||||
void set_label(char *label);
|
||||
void set_button1_label(char *label);
|
||||
void set_button2_label(char *label);
|
||||
int running;
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,953 @@
|
||||
/******************************************************************************
|
||||
fltk prozilla - a front end for prozilla, a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <malloc.h>
|
||||
#include <alloca.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
#include "main.h"
|
||||
#include "download_win.h"
|
||||
#include "dl_win.h"
|
||||
|
||||
|
||||
|
||||
|
||||
void cb_dl_window(Fl_Window * widget, void *)
|
||||
{
|
||||
|
||||
DL_Window *dl_window = (DL_Window *) widget;
|
||||
|
||||
if (dl_window->status != DL_IDLING)
|
||||
{
|
||||
if (fl_ask(_("Are you Sure You want to quit?")) == 1)
|
||||
{
|
||||
dl_window->cleanup(FALSE);
|
||||
}
|
||||
} else
|
||||
dl_window->cleanup(FALSE);
|
||||
}
|
||||
|
||||
|
||||
void DL_Window::cleanup(boolean erase_dlparts)
|
||||
{
|
||||
|
||||
/*handle cleanup */
|
||||
if (status == DL_DOWNLOADING)
|
||||
{
|
||||
proz_download_stop_downloads(download);
|
||||
if (erase_dlparts == TRUE)
|
||||
{
|
||||
proz_download_delete_dl_file(download);
|
||||
proz_log_delete_logfile(download);
|
||||
}
|
||||
} else if (status == DL_GETTING_INFO)
|
||||
{
|
||||
/*terminate info thread */
|
||||
pthread_cancel(info_thread);
|
||||
pthread_join(info_thread, NULL);
|
||||
} else if (status == DL_JOINING)
|
||||
{
|
||||
/*terminate joining thread */
|
||||
proz_download_cancel_joining_thread(download);
|
||||
pthread_join(download->join_thread, NULL);
|
||||
join_gui->win->hide();
|
||||
}
|
||||
else if (status== DL_FTPSEARCHING)
|
||||
{
|
||||
ftpsearch_win->cleanup();
|
||||
}
|
||||
|
||||
hide();
|
||||
join_gui->win->hide();
|
||||
message_gui->win->hide();
|
||||
ask_gui->win->hide();;
|
||||
choice_gui->win->hide();
|
||||
ftpsearch_win->hide();
|
||||
|
||||
status= DL_ABORTED;
|
||||
}
|
||||
|
||||
DL_Window::DL_Window(urlinfo * url_data, Fl_Boxtype b, int x, int y,
|
||||
const char *l):dl_gui()
|
||||
{
|
||||
box(b);
|
||||
key = 0;
|
||||
got_info = FALSE;
|
||||
got_dl = FALSE;
|
||||
status = DL_IDLING;
|
||||
|
||||
|
||||
memcpy(&u, url_data, sizeof(u));
|
||||
memset(&update_time, 0, sizeof(struct timeval));
|
||||
num_connections = rt.num_connections;
|
||||
|
||||
join_gui = new dl_join_gui();
|
||||
message_gui = new flproz_message();
|
||||
ask_gui = new flproz_ask();
|
||||
choice_gui = new flproz_choice();
|
||||
ftpsearch_win = new FTPS_Window();
|
||||
//join_win->hide();
|
||||
message_gui->running = FALSE;
|
||||
ask_gui->running = FALSE;
|
||||
choice_gui->running = FALSE;
|
||||
join_gui->running = FALSE;
|
||||
joining_thread_running = FALSE;
|
||||
do_ftpsearch = FALSE;
|
||||
using_ftpsearch = FALSE;
|
||||
end();
|
||||
|
||||
}
|
||||
|
||||
void DL_Window::scroll_browser_to_end()
|
||||
{
|
||||
if (browser->size() > 0)
|
||||
browser->bottomline(browser->size());
|
||||
|
||||
}
|
||||
|
||||
void DL_Window::my_cb()
|
||||
{
|
||||
if (status == DL_GETTING_INFO)
|
||||
{
|
||||
handle_info_thread();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// if ((got_info == TRUE && status == DL_IDLING && got_dl == FALSE)
|
||||
if((status == DL_RESTARTING && got_info == TRUE)||status== DL_DLPRESTART)
|
||||
{
|
||||
do_download();
|
||||
}
|
||||
|
||||
if (status == DL_DOWNLOADING)
|
||||
{
|
||||
handle_download_thread();
|
||||
return;
|
||||
}
|
||||
|
||||
if (status == DL_JOINING)
|
||||
{
|
||||
handle_joining_thread();
|
||||
return;
|
||||
}
|
||||
|
||||
if (status == DL_FATALERR)
|
||||
{
|
||||
handle_dl_fatal_error();
|
||||
return;
|
||||
}
|
||||
|
||||
if (status == DL_PAUSED)
|
||||
{
|
||||
//TODO what to do when paused
|
||||
return;
|
||||
}
|
||||
if (status == DL_FTPSEARCHING)
|
||||
{
|
||||
handle_ftpsearch();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void DL_Window::dl_start(int num_connections, boolean ftpsearch)
|
||||
{
|
||||
|
||||
do_ftpsearch = ftpsearch;
|
||||
|
||||
connection = proz_connection_init(&u, &getinfo_mutex);
|
||||
proz_connection_set_msg_proc(connection, ms, this);
|
||||
|
||||
url_box->value(u.url);
|
||||
browser->add(_("Creating the thread that gets info about file.."));
|
||||
|
||||
|
||||
proz_get_url_info_loop(connection, &info_thread);
|
||||
|
||||
status = DL_GETTING_INFO;
|
||||
}
|
||||
|
||||
|
||||
void DL_Window::do_download()
|
||||
{
|
||||
char buffer[MAX_MSG_SIZE];
|
||||
logfile lf;
|
||||
|
||||
status= DL_DLPRESTART;
|
||||
|
||||
if (ask_gui->running == TRUE)
|
||||
{
|
||||
if (ask_gui->yes_button_pressed == TRUE) /*delete the file then */
|
||||
{
|
||||
ask_gui->win->hide();
|
||||
ask_gui->running = FALSE;
|
||||
if (proz_download_delete_target(download) == -1)
|
||||
{
|
||||
browser->add(_("I am unable to delete the target file!"));
|
||||
}
|
||||
handle_prev_download();
|
||||
return;
|
||||
}
|
||||
if (ask_gui->no_button_pressed == TRUE)
|
||||
{
|
||||
ask_gui->win->hide();
|
||||
ask_gui->running = FALSE;
|
||||
/*TODO abort the dl */
|
||||
status = DL_ABORTED;
|
||||
cleanup(FALSE);
|
||||
// handle_prev_download();
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (choice_gui->running == TRUE)
|
||||
{
|
||||
/*The choice gui is running..monitor whats hapenning */
|
||||
if (choice_gui->button1_pressed == TRUE) //Button 1 is Resume
|
||||
{
|
||||
choice_gui->win->hide();
|
||||
choice_gui->running = FALSE;
|
||||
/*Resume selected */
|
||||
//Read the logfile structure
|
||||
if (proz_log_read_logfile(&lf, download, FALSE) != 1)
|
||||
{
|
||||
browser->
|
||||
add
|
||||
(_
|
||||
("A error occured while processing the logfile! Assuming default number of connections"));
|
||||
}
|
||||
// validate the info returned
|
||||
//TODO check whether files size is the same and if not prompt the user what to do.
|
||||
if (lf.num_connections != num_connections)
|
||||
{
|
||||
browser->
|
||||
add
|
||||
(_
|
||||
("The previous download used a different number of connections than the default! so I will use the previous number of threads"));
|
||||
num_connections = lf.num_connections;
|
||||
assert(num_connections > 0);
|
||||
// cleanup(FALSE);
|
||||
}
|
||||
download->resume_mode = TRUE;
|
||||
start_download();
|
||||
return;
|
||||
} else if (choice_gui->button2_pressed == TRUE) //button 2 is overwrite
|
||||
{
|
||||
choice_gui->win->hide();
|
||||
choice_gui->running = FALSE;
|
||||
|
||||
/*Overwrite selected */
|
||||
/*delete the downloads */
|
||||
if (proz_log_read_logfile(&lf, download, FALSE) != 1)
|
||||
{
|
||||
browser->
|
||||
add
|
||||
(_
|
||||
("A error occured while processing the logfile! Assuming default number of connections to delete"));
|
||||
download->num_connections = 4;
|
||||
} else
|
||||
proz_download_delete_dl_file(download);
|
||||
download->resume_mode = FALSE;
|
||||
// cleanup(FALSE);
|
||||
start_download();
|
||||
return;
|
||||
} else
|
||||
return; /*Just return if nothing has been pressed */
|
||||
}
|
||||
|
||||
|
||||
/*setup the download */
|
||||
download = proz_download_init(&connection->u);
|
||||
proz_download_set_msg_proc(download, ms, this);
|
||||
|
||||
/*Check and see whether the target exists and whether to overwrite it */
|
||||
|
||||
if (proz_download_target_exist(download) == 1)
|
||||
{
|
||||
|
||||
snprintf(buffer, MAX_MSG_SIZE,
|
||||
_
|
||||
("The target file %s exists, would you like to overwrite it?"),
|
||||
connection->u.file);
|
||||
|
||||
ask_gui->set_label(buffer);
|
||||
ask_gui->win->show();
|
||||
ask_gui_type = DLG_TARGETERASE;
|
||||
ask_gui->running = TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
handle_prev_download();
|
||||
}
|
||||
|
||||
void DL_Window::handle_prev_download()
|
||||
{
|
||||
char buffer[MAX_MSG_SIZE];
|
||||
/*Check for a prior download */
|
||||
int previous_dl = proz_download_prev_download_exists(download);
|
||||
if (previous_dl == 1)
|
||||
{
|
||||
|
||||
/*TODO: Check if the server supports resume */
|
||||
|
||||
if (connection->resume_support)
|
||||
{
|
||||
|
||||
snprintf(buffer, MAX_MSG_SIZE,
|
||||
_
|
||||
("Previous download of %s exists, would you like to resume it or overwrite it?"),
|
||||
connection->u.file);
|
||||
|
||||
choice_gui->set_label(buffer);
|
||||
choice_gui->set_button1_label(_("Resume"));
|
||||
choice_gui->set_button2_label(_("Overwrite"));
|
||||
choice_gui->win->show();
|
||||
choice_gui_type = DLG_PREVRESUME;
|
||||
choice_gui->running = TRUE;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
start_download();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void DL_Window::start_download()
|
||||
{
|
||||
|
||||
char buffer[MAX_MSG_SIZE];
|
||||
int ret=0;
|
||||
|
||||
if (using_ftpsearch != TRUE)
|
||||
ret = num_connections = proz_download_setup_connections_no_ftpsearch
|
||||
(download, connection, num_connections);
|
||||
else
|
||||
ret = proz_download_setup_connections_ftpsearch(download,
|
||||
connection,
|
||||
ftpsearch_win->request,
|
||||
num_connections);
|
||||
|
||||
if(ret==-1)
|
||||
{
|
||||
fl_message(_("There doesnt seem to be enough free space or a disk write failed when attempting to create output file"));
|
||||
status = DL_ABORTED;
|
||||
return;
|
||||
}
|
||||
|
||||
fls = new Fl_Output *[num_connections];
|
||||
|
||||
/* Add the scrolling info display */
|
||||
for (int i = 0; i < num_connections; i++)
|
||||
{
|
||||
fls[i] = new Fl_Output(22, 48 + (20 * i + 5), 465, 20);
|
||||
fls[i]->value("");
|
||||
fls[i]->box(FL_FLAT_BOX);
|
||||
fls[i]->show();
|
||||
fls[i]->color(FL_GRAY);
|
||||
scroll_win->add(fls[i]);
|
||||
}
|
||||
scroll_win->end();
|
||||
|
||||
/*Display resume status */
|
||||
if (download->resume_support)
|
||||
{
|
||||
sprintf(buffer, _("RESUME supported"));
|
||||
resume_status_box->textcolor(FL_BLUE);
|
||||
resume_status_box->value(buffer);
|
||||
|
||||
resume_later_button->show();
|
||||
no_resume_later_button->show();
|
||||
} else
|
||||
{
|
||||
sprintf(buffer, _("RESUME NOT supported"));
|
||||
resume_status_box->textcolor(FL_RED);
|
||||
resume_status_box->value(buffer);
|
||||
resume_later_button->hide();
|
||||
|
||||
no_resume_later_button->show();
|
||||
|
||||
}
|
||||
resume_status_box->value(buffer);
|
||||
|
||||
if (download->resume_support)
|
||||
{
|
||||
set_pause_button_label(_("Pause"));
|
||||
pause_button->show();
|
||||
pause_button->activate();
|
||||
} else
|
||||
{
|
||||
pause_button->deactivate();
|
||||
}
|
||||
|
||||
gettimeofday(&update_time, NULL);
|
||||
this->redraw();
|
||||
proz_download_start_downloads(download, download->resume_mode);
|
||||
status = DL_DOWNLOADING;
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void DL_Window::unpause_download()
|
||||
{
|
||||
|
||||
assert(status = DL_PAUSED);
|
||||
|
||||
if (got_info == FALSE)
|
||||
{
|
||||
dl_start(4, do_ftpsearch);
|
||||
return;
|
||||
}
|
||||
|
||||
if (got_info == TRUE && got_dl == FALSE)
|
||||
{
|
||||
/*setup the download */
|
||||
download = proz_download_init(&connection->u);
|
||||
proz_download_set_msg_proc(download, ms, this);
|
||||
download->resume_mode = TRUE;
|
||||
start_download();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DL_Window::pause_download()
|
||||
{
|
||||
|
||||
/*TODO: Check and see if download is not resumable dont pause */
|
||||
if (status == DL_DOWNLOADING)
|
||||
{
|
||||
proz_download_stop_downloads(download);
|
||||
|
||||
} else if (status == DL_GETTING_INFO)
|
||||
{
|
||||
/*terminate info thread */
|
||||
pthread_cancel(info_thread);
|
||||
pthread_join(info_thread, NULL);
|
||||
}
|
||||
set_pause_button_label(_("UnPause"));
|
||||
this->redraw();
|
||||
status = DL_PAUSED;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void DL_Window::handle_info_thread()
|
||||
{
|
||||
char buffer[MAX_MSG_SIZE];
|
||||
|
||||
if (message_gui->running == TRUE)
|
||||
{
|
||||
if (message_gui->ok_button_pressed == TRUE)
|
||||
{
|
||||
message_gui->win->hide();
|
||||
message_gui->running = FALSE;
|
||||
got_info = FALSE;
|
||||
status = DL_IDLING;
|
||||
cleanup(FALSE);
|
||||
return;
|
||||
} else
|
||||
return;
|
||||
}
|
||||
|
||||
bool getting_info =proz_connection_running(connection);
|
||||
|
||||
|
||||
if (getting_info == FALSE)
|
||||
{
|
||||
browser->add(_("waiting for thread to end"));
|
||||
pthread_join(info_thread, NULL);
|
||||
browser->add(_("Thread ended"));
|
||||
|
||||
if (connection->err == HOK || connection->err == FTPOK)
|
||||
{
|
||||
got_info = TRUE;
|
||||
url_box->value(connection->u.url);
|
||||
this->label(strdup(connection->u.url));
|
||||
|
||||
browser->add(_("Got info succesfully"));
|
||||
if (connection->main_file_size != -1)
|
||||
{
|
||||
sprintf(buffer, _("File Size = %ld Kb"),
|
||||
connection->main_file_size / 1024);
|
||||
progress_box->show();
|
||||
} else
|
||||
sprintf(buffer, _("File Size is UNKOWN"));
|
||||
file_size_box->value(buffer);
|
||||
|
||||
//TODO CHANGED by me
|
||||
if (connection->main_file_size != -1 && do_ftpsearch == TRUE)
|
||||
{
|
||||
status = DL_FTPSEARCHING;
|
||||
ftpsearch_win->show();
|
||||
if(rt.ftpsearch_server_id==0)
|
||||
{
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
do_download();
|
||||
}
|
||||
|
||||
} else
|
||||
{
|
||||
|
||||
if (connection->err == FTPNSFOD || connection->err == HTTPNSFOD)
|
||||
{
|
||||
char buffer[MAX_MSG_SIZE];
|
||||
snprintf(buffer, MAX_MSG_SIZE, _("The URL %s doesnt exist!"),
|
||||
connection->u.url);
|
||||
message_gui->set_label(buffer);
|
||||
message_gui->win->show();
|
||||
message_gui_type = DLG_URLNSFOD;
|
||||
message_gui->running = TRUE;
|
||||
|
||||
} else
|
||||
{
|
||||
message_gui->set_label(proz_strerror(connection->err));
|
||||
message_gui->win->show();
|
||||
message_gui_type = DLG_UNKNOWNERR;
|
||||
message_gui->running = TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DL_Window::handle_ftpsearch()
|
||||
{
|
||||
|
||||
uerr_t err;
|
||||
err = ftpsearch_win->callback();
|
||||
if (err == MASSPINGDONE)
|
||||
{
|
||||
if (ftpsearch_win->request->num_mirrors == 0)
|
||||
{
|
||||
browser->
|
||||
add(_
|
||||
("No suitable mirrors were found, downloading from original server"));
|
||||
using_ftpsearch = FALSE;
|
||||
// status = DL_IDLING;
|
||||
ftpsearch_win->hide();
|
||||
do_download();
|
||||
return;
|
||||
}
|
||||
using_ftpsearch = TRUE;
|
||||
// status = DL_IDLING;
|
||||
ftpsearch_win->exit_ftpsearch_button->hide();
|
||||
do_download();
|
||||
return;
|
||||
}
|
||||
if (err == FTPSFAIL)
|
||||
{
|
||||
|
||||
using_ftpsearch = FALSE;
|
||||
// status = DL_IDLING;
|
||||
do_download();
|
||||
return;
|
||||
}
|
||||
|
||||
if(ftpsearch_win->exit_ftpsearch_button_pressed==TRUE)
|
||||
{
|
||||
if(ftpsearch_win->got_mirror_info ==TRUE)
|
||||
{
|
||||
using_ftpsearch = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
using_ftpsearch = FALSE;
|
||||
}
|
||||
do_download();
|
||||
}
|
||||
}
|
||||
|
||||
void DL_Window::handle_download_thread()
|
||||
{
|
||||
|
||||
char buf[1000];
|
||||
uerr_t err;
|
||||
struct timeval cur_time;
|
||||
struct timeval diff_time;
|
||||
|
||||
err = proz_download_handle_threads(download);
|
||||
|
||||
|
||||
gettimeofday(&cur_time, NULL);
|
||||
|
||||
proz_timeval_subtract(&diff_time, &cur_time, &update_time);
|
||||
|
||||
if ((((diff_time.tv_sec * 1000) + (diff_time.tv_usec / 1000)) > 200)
|
||||
|| err == DLDONE)
|
||||
{
|
||||
for (int i = 0; i < download->num_connections; i++)
|
||||
{
|
||||
|
||||
sprintf(buf, "%d %10s %15s %10ld", i + 1,
|
||||
download->pconnections[i]->u.host,
|
||||
proz_connection_get_status_string(download->pconnections[i]),
|
||||
proz_connection_get_total_bytes_got(download->
|
||||
pconnections[i]));
|
||||
fls[i]->value(buf);
|
||||
}
|
||||
|
||||
sprintf(buf, _("Total Bytes received %ld Kb"),
|
||||
proz_download_get_total_bytes_got(download) / 1024);
|
||||
|
||||
bytes_recv_box->value(buf);
|
||||
|
||||
sprintf(buf, _("Average Speed = %.3f Kb/sec"),
|
||||
proz_download_get_average_speed(download) / 1024);
|
||||
dl_speed_box->value(buf);
|
||||
|
||||
int secs_left;
|
||||
|
||||
if ((secs_left = proz_download_get_est_time_left(download)) != -1)
|
||||
{
|
||||
if (secs_left < 60)
|
||||
sprintf(buf, _("%d Seconds"), secs_left);
|
||||
else if (secs_left < 3600)
|
||||
sprintf(buf, _("%d Minutes %d Seconds"), secs_left / 60,
|
||||
secs_left % 60);
|
||||
else
|
||||
sprintf(buf, _("%d Hours %d minutes"), secs_left / 3600,
|
||||
(secs_left % 3600) / 60);
|
||||
est_time_box->show();
|
||||
est_time_box->value(buf);
|
||||
}
|
||||
|
||||
if (download->main_file_size != -1)
|
||||
{
|
||||
// progress_box->value(50.0);
|
||||
progress_box->
|
||||
value((((double) proz_download_get_total_bytes_got(download) /
|
||||
download->main_file_size) * 100));
|
||||
}
|
||||
|
||||
/*The time of the current screen */
|
||||
gettimeofday(&update_time, NULL);
|
||||
}
|
||||
|
||||
if (err == DLDONE)
|
||||
{
|
||||
char *label = (char *) malloc(PATH_MAX + 40);
|
||||
/*Wait till all are completed */
|
||||
browser->add(_("Waiting till all threads terminate"));
|
||||
/* Now set the progress abr to 100% */
|
||||
|
||||
progress_box->value(100);
|
||||
|
||||
browser->add(_("Got DL succesfully, now building file"));
|
||||
got_dl = TRUE;
|
||||
|
||||
/* TODO Should we close the main window here or disable just the buttons */
|
||||
resume_later_button->hide();
|
||||
no_resume_later_button->hide();
|
||||
pause_button->hide();
|
||||
snprintf(label, PATH_MAX + 40, _("Building file %s ....."),
|
||||
download->u.file);
|
||||
join_gui->set_box_label(label);
|
||||
/*TODO add a function to set he wins label */
|
||||
join_gui->win->label(label);
|
||||
join_gui->win->redraw();
|
||||
join_gui->progress_box->show();
|
||||
join_gui->running = TRUE;
|
||||
join_gui->win->show();
|
||||
|
||||
// free(label);
|
||||
status = DL_JOINING;
|
||||
proz_download_join_downloads(download);
|
||||
joining_thread_running = TRUE;
|
||||
}
|
||||
|
||||
if (err == CANTRESUME)
|
||||
{
|
||||
/*FIXME Free the conections array and the download struct */
|
||||
browser->
|
||||
add
|
||||
(_
|
||||
("Error the server/proxy lied about resuming so I have to restart this from the beginning!"));
|
||||
|
||||
for (int i = 0; i < num_connections; i++)
|
||||
{
|
||||
scroll_win->remove(fls[i]);
|
||||
delete(fls[i]);
|
||||
}
|
||||
/*We can only use one connections and we cant resume */
|
||||
num_connections = 1;
|
||||
connection->resume_support = FALSE;
|
||||
got_dl = FALSE;
|
||||
status = DL_RESTARTING;
|
||||
}
|
||||
|
||||
if (err == DLLOCALFATAL)
|
||||
{
|
||||
|
||||
char buffer[MAX_MSG_SIZE];
|
||||
snprintf(buffer, MAX_MSG_SIZE,
|
||||
_
|
||||
("One connection of the download %s encountered a unrecoverable local error, usually lack of free space, or a write to bad medium, or a problem with permissions,so please fix this and retry"),
|
||||
connection->u.url);
|
||||
message_gui->set_label(buffer);
|
||||
message_gui->win->show();
|
||||
message_gui_type = DLG_ABORT;
|
||||
message_gui->running = TRUE;
|
||||
got_dl = FALSE;
|
||||
status = DL_FATALERR;
|
||||
}
|
||||
|
||||
|
||||
if (err == DLREMOTEFATAL)
|
||||
{
|
||||
|
||||
char buffer[MAX_MSG_SIZE];
|
||||
snprintf(buffer, MAX_MSG_SIZE,
|
||||
_
|
||||
("A connection(s) of the download %s encountered a unrecoverable remote error, usually the file not being present in the remote server, therefore the download had to be aborted!"),
|
||||
connection->u.url);
|
||||
message_gui->set_label(buffer);
|
||||
message_gui->win->show();
|
||||
message_gui_type = DLG_ABORT;
|
||||
message_gui->running = TRUE;
|
||||
got_dl = FALSE;
|
||||
status = DL_FATALERR;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void DL_Window::handle_joining_thread()
|
||||
{
|
||||
|
||||
uerr_t building_status = proz_download_get_join_status(download);
|
||||
|
||||
if (building_status == JOININPROGRESS)
|
||||
{
|
||||
|
||||
join_gui->progress_box->value(proz_download_get_file_build_percentage(download));
|
||||
|
||||
/*has the user pressed cancel */
|
||||
if (join_gui->button_pressed == 1)
|
||||
{
|
||||
/*End the joining thread */
|
||||
proz_download_cancel_joining_thread(download);
|
||||
joining_thread_running = FALSE;
|
||||
status = DL_IDLING;
|
||||
/*Close the window */
|
||||
join_gui->win->hide();
|
||||
join_gui->running = FALSE;
|
||||
this->hide();
|
||||
ftpsearch_win->hide();
|
||||
}
|
||||
join_gui->win->redraw();
|
||||
}
|
||||
|
||||
if (building_status == JOINERR)
|
||||
{
|
||||
if (joining_thread_running == TRUE)
|
||||
{
|
||||
proz_download_wait_till_end_joining_thread(download);
|
||||
joining_thread_running = FALSE;
|
||||
join_gui->win->show();
|
||||
join_gui->set_box_label(download->file_build_msg);
|
||||
join_gui->set_button_label(_("Close"));
|
||||
join_gui->win->redraw();
|
||||
}
|
||||
/*has the user pressed OK at the end of the download */
|
||||
if (join_gui->button_pressed == 1)
|
||||
{
|
||||
proz_download_free_download(download, 0);
|
||||
/*TODO ugly kludge below */
|
||||
status = DL_IDLING;
|
||||
/*Close the window */
|
||||
join_gui->win->hide();
|
||||
join_gui->running = FALSE;
|
||||
this->hide();
|
||||
ftpsearch_win->hide();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (building_status == JOINDONE)
|
||||
{
|
||||
|
||||
if (joining_thread_running == TRUE)
|
||||
{
|
||||
proz_download_wait_till_end_joining_thread(download);
|
||||
joining_thread_running = FALSE;
|
||||
join_gui->progress_box->value(100.0);
|
||||
join_gui->set_box_label("All Done");
|
||||
join_gui->set_button_label(_("Close"));
|
||||
join_gui->win->redraw();
|
||||
|
||||
}
|
||||
/*has the user pressed OK at the end of the download */
|
||||
if (join_gui->button_pressed == 1)
|
||||
{
|
||||
proz_download_delete_dl_file(download);
|
||||
proz_download_free_download(download, 0);
|
||||
/*TODO ugly kludge below */
|
||||
status = DL_IDLING;
|
||||
/*Close the window */
|
||||
join_gui->win->hide();
|
||||
join_gui->running = FALSE;
|
||||
this->hide();
|
||||
ftpsearch_win->hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DL_Window::handle_dl_fatal_error()
|
||||
{
|
||||
|
||||
if (message_gui->running == TRUE)
|
||||
{
|
||||
if (message_gui->ok_button_pressed == TRUE)
|
||||
{
|
||||
message_gui->win->hide();
|
||||
message_gui->running = FALSE;
|
||||
status=DL_FATALERR;
|
||||
cleanup(FALSE);
|
||||
return;
|
||||
} else
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void DL_Window::display_message(const char *msg)
|
||||
{
|
||||
browser->add(msg, 0);
|
||||
|
||||
if (browser->size() > 0)
|
||||
{
|
||||
browser->middleline(browser->size());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void DL_Window::draw()
|
||||
{
|
||||
|
||||
Fl_Window::draw();
|
||||
}
|
||||
|
||||
|
||||
/*Callback for the button that appears in the joining dialog */
|
||||
void cb_join_jbutton(Fl_Button * button, void *data)
|
||||
{
|
||||
dl_join_gui *dgui = (dl_join_gui *) data;
|
||||
dgui->button_pressed = TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*Callback for the button that appears in the joining dialog */
|
||||
void cb_dlwin_no_resume_later(Fl_Button * button, void *data)
|
||||
{
|
||||
DL_Window *dl_window = (DL_Window *) data;
|
||||
dl_window->cleanup(TRUE);
|
||||
dl_window->status=DL_ABORTED;
|
||||
}
|
||||
|
||||
|
||||
/*Callback for the button that appears in the joining dialog */
|
||||
void cb_dlwin_resume_later(Fl_Button * button, void *data)
|
||||
{
|
||||
DL_Window *dl_window = (DL_Window *) data;
|
||||
dl_window->cleanup(FALSE);
|
||||
dl_window->status=DL_ABORTED;
|
||||
}
|
||||
|
||||
/*Callback for the pause button */
|
||||
void cb_dlwin_pause(Fl_Button * button, void *data)
|
||||
{
|
||||
DL_Window *dl_window = (DL_Window *) data;
|
||||
|
||||
//TODO look carefully here *'
|
||||
if (dl_window->status != DL_PAUSED)
|
||||
{
|
||||
dl_window->pause_download();
|
||||
return;
|
||||
} else if (dl_window->status == DL_PAUSED)
|
||||
{
|
||||
dl_window->unpause_download();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*Callback for the button that appears in the message dialog */
|
||||
void cb_message_ok_button(Fl_Button * button, void *data)
|
||||
{
|
||||
flproz_message *gui = (flproz_message *) data;
|
||||
gui->ok_button_pressed = TRUE;
|
||||
}
|
||||
|
||||
|
||||
/*Callback for the button that appears in the message dialog */
|
||||
void cb_ask_yes_button(Fl_Button * button, void *data)
|
||||
{
|
||||
flproz_ask *gui = (flproz_ask *) data;
|
||||
gui->yes_button_pressed = TRUE;
|
||||
}
|
||||
|
||||
/*Callback for the button that appears in the message dialog */
|
||||
void cb_ask_no_button(Fl_Button * button, void *data)
|
||||
{
|
||||
flproz_ask *gui = (flproz_ask *) data;
|
||||
gui->no_button_pressed = TRUE;
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
#ifndef DOWNLOAD_WIN_H
|
||||
#define DOWNLOAD_WIN_H
|
||||
|
||||
#include <config.h>
|
||||
#include <FL/Fl.H>
|
||||
#include <FL/Fl_Window.H>
|
||||
#include <FL/Fl_Box.H>
|
||||
#include <FL/Fl_Group.H> // Fl_Group header file
|
||||
#include <FL/fl_ask.H> // FLTK convenience functions
|
||||
#include <FL/Fl_Menu_Bar.H>
|
||||
#include <FL/Fl_Input.H>
|
||||
#include <FL/Fl_Output.H>
|
||||
|
||||
#include <FL/Fl_Browser.H>
|
||||
#include <FL/fl_draw.H>
|
||||
#include <FL/Fl_Scroll.H>
|
||||
#include "prozilla.h"
|
||||
#include "dl_win.h"
|
||||
#include "ftpsearch_win.h"
|
||||
|
||||
|
||||
void ms(const char *msg, void *cb_data);
|
||||
void info_callback(void *);
|
||||
|
||||
|
||||
typedef enum {
|
||||
DL_IDLING,
|
||||
DL_GETTING_INFO,
|
||||
DL_FTPSEARCHING,
|
||||
DL_DLPRESTART,
|
||||
DL_DOWNLOADING,
|
||||
DL_JOINING,
|
||||
DL_RESTARTING,
|
||||
DL_PAUSED,
|
||||
DL_ABORTED,
|
||||
DL_FATALERR,
|
||||
} dlwin_status_t;
|
||||
|
||||
|
||||
//The running dialog type
|
||||
typedef enum {
|
||||
DLG_GENERIC,
|
||||
DLG_URLNSFOD,
|
||||
DLG_TARGETERASE,
|
||||
DLG_JOININING,
|
||||
DLG_PREVRESUME,
|
||||
DLG_ABORT,
|
||||
DLG_UNKNOWNERR,
|
||||
} dlg_class;
|
||||
|
||||
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,
|
||||
const char *l);
|
||||
|
||||
void dl_start(int num_connections, boolean ftpsearch);
|
||||
void my_cb();
|
||||
void display_message(const char *msg);
|
||||
|
||||
void handle_info_thread();
|
||||
void handle_ftpsearch();
|
||||
void handle_download_thread();
|
||||
|
||||
void start_download();
|
||||
|
||||
void pause_download();
|
||||
void unpause_download();
|
||||
|
||||
void handle_joining_thread();
|
||||
void handle_dl_fatal_error();
|
||||
void scroll_browser_to_end();
|
||||
void cleanup(boolean erase_dlparts);
|
||||
|
||||
Fl_Output **fls;
|
||||
dl_join_gui *join_gui;
|
||||
flproz_message *message_gui;
|
||||
flproz_ask *ask_gui;
|
||||
flproz_choice *choice_gui;
|
||||
connection_t *connection;
|
||||
download_t *download;
|
||||
urlinfo u;
|
||||
boolean got_info;
|
||||
boolean got_dl;
|
||||
|
||||
dlg_class message_gui_type;
|
||||
dlg_class choice_gui_type;
|
||||
dlg_class ask_gui_type;
|
||||
dlg_class join_gui_type;
|
||||
|
||||
dlwin_status_t status;
|
||||
|
||||
pthread_t info_thread;
|
||||
pthread_mutex_t getinfo_mutex;
|
||||
int num_connections;
|
||||
/*The time elapsed since the last update */
|
||||
struct timeval update_time;
|
||||
|
||||
private:
|
||||
void do_download();
|
||||
void handle_prev_download();
|
||||
boolean joining_thread_running;
|
||||
boolean do_ftpsearch;
|
||||
boolean using_ftpsearch;
|
||||
FTPS_Window *ftpsearch_win;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,46 @@
|
||||
// generated by Fast Light User Interface Designer (fluid) version 1.0100
|
||||
|
||||
#include <libintl.h>
|
||||
#include "ftps_win.h"
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
ftps_gui::ftps_gui():Fl_Window(300,389) {
|
||||
Fl_Window* w;
|
||||
{ Fl_Window* o = ftps_win = this;
|
||||
w = o;
|
||||
o->user_data((void*)(this));
|
||||
{ Fl_Output* o = ftps_file_box = new Fl_Output(70, 10, 220, 25, gettext("Filename::"));
|
||||
o->box(FL_ENGRAVED_BOX);
|
||||
o->color(49);
|
||||
o->labelsize(12);
|
||||
o->labelcolor(4);
|
||||
o->textsize(12);
|
||||
o->textcolor(4);
|
||||
o->align(132);
|
||||
}
|
||||
{ Fl_Browser* o = mirror_browser = new Fl_Browser(15, 60, 275, 245);
|
||||
o->labelsize(12);
|
||||
o->textsize(12);
|
||||
o->align(129);
|
||||
}
|
||||
{ Fl_Return_Button* o = exit_ftpsearch_button = new Fl_Return_Button(110, 365, 115, 20, gettext("Start Download"));
|
||||
o->labelsize(12);
|
||||
o->callback((Fl_Callback*)cb_exit_ftpsearch, (void*)(this));
|
||||
}
|
||||
{ Fl_Browser* o = message_browser = new Fl_Browser(15, 310, 275, 50);
|
||||
o->labelsize(12);
|
||||
o->textsize(12);
|
||||
}
|
||||
{ Fl_Box* o = new Fl_Box(15, 45, 70, 15, gettext("Mirrors"));
|
||||
o->labelsize(12);
|
||||
o->align(132|FL_ALIGN_INSIDE);
|
||||
}
|
||||
{ Fl_Box* o = new Fl_Box(215, 45, 75, 15, gettext("Ping Time"));
|
||||
o->labelsize(12);
|
||||
o->align(132|FL_ALIGN_INSIDE);
|
||||
}
|
||||
o->show();
|
||||
o->end();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
# data file for the Fltk User Interface Designer (fluid)
|
||||
version 1.0100
|
||||
i18n_type 1
|
||||
i18n_include <libintl.h>
|
||||
i18n_function gettext
|
||||
header_name {.h}
|
||||
code_name {.cxx}
|
||||
gridx 5
|
||||
gridy 5
|
||||
snap 3
|
||||
decl {\#include "prozilla.h"} {public
|
||||
}
|
||||
|
||||
decl {\#include <assert.h>} {}
|
||||
|
||||
decl {\#include <string.h>} {}
|
||||
|
||||
class ftps_gui {open : {public Fl_Window}
|
||||
} {
|
||||
Function {ftps_gui():Fl_Window(300,389)} {open
|
||||
} {
|
||||
Fl_Window ftps_win {open
|
||||
xywh {220 85 300 389}
|
||||
code0 {o->show();} visible
|
||||
} {
|
||||
Fl_Output ftps_file_box {
|
||||
label {Filename::}
|
||||
xywh {70 10 220 25} box ENGRAVED_BOX color 49 labelsize 12 labelcolor 4 align 132 textsize 12 textcolor 4
|
||||
}
|
||||
Fl_Browser mirror_browser {
|
||||
xywh {15 60 275 245} labelsize 12 align 129 textsize 12
|
||||
}
|
||||
Fl_Return_Button exit_ftpsearch_button {
|
||||
label {Start Download}
|
||||
user_data this
|
||||
callback cb_exit_ftpsearch selected
|
||||
xywh {110 365 115 20} labelsize 12
|
||||
}
|
||||
Fl_Browser message_browser {
|
||||
xywh {15 310 275 50} labelsize 12 textsize 12
|
||||
}
|
||||
Fl_Box {} {
|
||||
label Mirrors
|
||||
xywh {15 45 70 15} labelsize 12 align 148
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Ping Time}
|
||||
xywh {215 45 75 15} labelsize 12 align 148
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
// generated by Fast Light User Interface Designer (fluid) version 1.0100
|
||||
|
||||
#ifndef ftps_win_h
|
||||
#define ftps_win_h
|
||||
#include <FL/Fl.H>
|
||||
#include "prozilla.h"
|
||||
#include <FL/Fl_Window.H>
|
||||
#include <FL/Fl_Output.H>
|
||||
#include <FL/Fl_Browser.H>
|
||||
#include <FL/Fl_Return_Button.H>
|
||||
extern void cb_exit_ftpsearch(Fl_Return_Button*, void*);
|
||||
#include <FL/Fl_Box.H>
|
||||
|
||||
class ftps_gui : public Fl_Window {
|
||||
public:
|
||||
ftps_gui();
|
||||
Fl_Window *ftps_win;
|
||||
Fl_Output *ftps_file_box;
|
||||
Fl_Browser *mirror_browser;
|
||||
Fl_Return_Button *exit_ftpsearch_button;
|
||||
Fl_Browser *message_browser;
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,235 @@
|
||||
/******************************************************************************
|
||||
fltk prozilla - a front end for prozilla, a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <malloc.h>
|
||||
#include <alloca.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
#include <FL/fl_message.h>
|
||||
#include "main.h"
|
||||
#include "ftpsearch_win.h"
|
||||
|
||||
void ftps_win_message_proc(const char *msg, void *cb_data);
|
||||
|
||||
|
||||
|
||||
FTPS_Window::FTPS_Window():ftps_gui()
|
||||
{
|
||||
memset(&request, 0, sizeof(request));
|
||||
|
||||
request_running = FALSE;
|
||||
ping_running = FALSE;
|
||||
got_mirror_info = FALSE;
|
||||
exit_ftpsearch_button_pressed = FALSE;
|
||||
hide();
|
||||
}
|
||||
|
||||
|
||||
void FTPS_Window::fetch_mirror_info(urlinfo *u, long file_size,
|
||||
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,
|
||||
server_type, num_req_mirrors);
|
||||
proz_connection_set_msg_proc(request->connection, ftps_win_message_proc,
|
||||
this);
|
||||
proz_get_complete_mirror_list(request);
|
||||
|
||||
request_running = TRUE;
|
||||
}
|
||||
|
||||
|
||||
void ftps_win_message_proc(const char *msg, void *cb_data)
|
||||
{
|
||||
|
||||
FTPS_Window *win = (FTPS_Window *) cb_data;
|
||||
win->message_browser->add(msg, 0);
|
||||
|
||||
if (win->message_browser->size() > 0)
|
||||
win->message_browser->bottomline(win->message_browser->size());
|
||||
|
||||
}
|
||||
|
||||
uerr_t FTPS_Window::callback()
|
||||
{
|
||||
|
||||
if (request_running == TRUE)
|
||||
{
|
||||
if (proz_request_info_running(request) == FALSE)
|
||||
{
|
||||
pthread_join(request->info_thread, NULL);
|
||||
if (request->err != MIRINFOK)
|
||||
{
|
||||
message_browser->add("Unable to get mirror info", 0);
|
||||
message_browser->add(proz_strerror(request->err));
|
||||
request_running = FALSE;
|
||||
got_mirror_info = FALSE;
|
||||
exit_ftpsearch_button->hide();
|
||||
return FTPSFAIL;
|
||||
} else
|
||||
{
|
||||
message_browser->add("got mirror info", 0);
|
||||
for (int i = 0; i < request->num_mirrors; i++)
|
||||
{
|
||||
mirror_browser->add(request->mirrors[i].server_name);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
request_running = FALSE;
|
||||
got_mirror_info = TRUE;
|
||||
|
||||
request->max_simul_pings=rt.max_simul_pings;
|
||||
request->ping_timeout.tv_sec=rt.max_ping_wait;
|
||||
request->ping_timeout.tv_usec=0;
|
||||
|
||||
/*Launch the pinging thread */
|
||||
proz_mass_ping(request);
|
||||
ping_running = TRUE;
|
||||
return MASSPINGINPROGRESS;
|
||||
}
|
||||
return FTPSINPROGRESS;
|
||||
}
|
||||
|
||||
if (ping_running == TRUE)
|
||||
{
|
||||
longstring buf;
|
||||
for (int i = 0; i < request->num_mirrors; i++)
|
||||
{
|
||||
pthread_mutex_lock(&request->access_mutex);
|
||||
ftp_mirror_stat_t status = request->mirrors[i].status;
|
||||
pthread_mutex_unlock(&request->access_mutex);
|
||||
switch (status)
|
||||
{
|
||||
case UNTESTED:
|
||||
snprintf(buf, sizeof(longstring), "%s %20s",
|
||||
request->mirrors[i].server_name, "NOT TESTED");
|
||||
break;
|
||||
case RESPONSEOK:
|
||||
snprintf(buf, sizeof(longstring), "%s %20dms",
|
||||
request->mirrors[i].server_name,
|
||||
request->mirrors[i].milli_secs);
|
||||
break;
|
||||
case NORESPONSE:
|
||||
case ERROR:
|
||||
snprintf(buf, sizeof(longstring), "%s %20s",
|
||||
request->mirrors[i].server_name, "NO REPONSE");
|
||||
break;
|
||||
default:
|
||||
snprintf(buf, sizeof(longstring), "%s %20s",
|
||||
request->mirrors[i].server_name, "Unkown condition!!");
|
||||
break;
|
||||
}
|
||||
mirror_browser->text(i + 1, buf);
|
||||
// mirror_browser->data(i,strdup(buf));
|
||||
}
|
||||
|
||||
if (proz_request_mass_ping_running(request) == FALSE)
|
||||
{
|
||||
ping_done = TRUE;
|
||||
ping_running = FALSE;
|
||||
message_browser->add("Ping run completed", 0);
|
||||
message_browser->add("Sorting list", 0);
|
||||
proz_sort_mirror_list(request->mirrors, request->num_mirrors);
|
||||
|
||||
/* We should have a seprate func to display this */
|
||||
for (int i = 0; i < request->num_mirrors; i++)
|
||||
{
|
||||
pthread_mutex_lock(&request->access_mutex);
|
||||
ftp_mirror_stat_t status = request->mirrors[i].status;
|
||||
pthread_mutex_unlock(&request->access_mutex);
|
||||
switch (status)
|
||||
{
|
||||
case UNTESTED:
|
||||
snprintf(buf, sizeof(longstring), "%s %20s",
|
||||
request->mirrors[i].server_name, "NOT TESTED");
|
||||
break;
|
||||
case RESPONSEOK:
|
||||
snprintf(buf, sizeof(longstring), "%s %20dms",
|
||||
request->mirrors[i].server_name,
|
||||
request->mirrors[i].milli_secs);
|
||||
break;
|
||||
case NORESPONSE:
|
||||
case ERROR:
|
||||
snprintf(buf, sizeof(longstring), "%s %20s",
|
||||
request->mirrors[i].server_name, "NO REPONSE");
|
||||
break;
|
||||
default:
|
||||
snprintf(buf, sizeof(longstring), "%s %20s",
|
||||
request->mirrors[i].server_name, "Unkown condition!!");
|
||||
break;
|
||||
}
|
||||
mirror_browser->text(i + 1, buf);
|
||||
|
||||
// mirror_browser->data(i,strdup(buf));
|
||||
}
|
||||
// this->redraw();
|
||||
return MASSPINGDONE;
|
||||
}
|
||||
// this->redraw();
|
||||
return MASSPINGINPROGRESS;
|
||||
}
|
||||
return MASSPINGINPROGRESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void FTPS_Window::cleanup()
|
||||
{
|
||||
if(request_running==TRUE)
|
||||
{
|
||||
proz_cancel_mirror_list_request(request);
|
||||
return;
|
||||
}
|
||||
|
||||
if(ping_running==TRUE)
|
||||
{
|
||||
proz_cancel_mass_ping(request);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void cb_exit_ftpsearch(Fl_Return_Button *button, void * data)
|
||||
{
|
||||
|
||||
FTPS_Window *window=(FTPS_Window *) data;
|
||||
|
||||
window->exit_ftpsearch_button_pressed = TRUE;
|
||||
|
||||
if(window->request_running==TRUE)
|
||||
{
|
||||
proz_cancel_mirror_list_request(window->request);
|
||||
}
|
||||
|
||||
if(window->ping_running==TRUE)
|
||||
{
|
||||
proz_cancel_mass_ping(window->request);
|
||||
}
|
||||
window->hide();
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
/******************************************************************************
|
||||
fltk prozilla - a front end for prozilla, a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef FTPSEARCH_WIN_H
|
||||
#define FTPSEARCH_WIN_H
|
||||
|
||||
#include <config.h>
|
||||
#include <FL/Fl.H>
|
||||
#include <FL/Fl_Window.H>
|
||||
#include <FL/Fl_Box.H>
|
||||
#include <FL/Fl_Group.H> // Fl_Group header file
|
||||
#include <FL/fl_ask.H> // FLTK convenience functions
|
||||
#include <FL/Fl_Menu_Bar.H>
|
||||
#include <FL/Fl_Input.H>
|
||||
#include <FL/Fl_Output.H>
|
||||
|
||||
#include <FL/Fl_Browser.H>
|
||||
#include <FL/fl_draw.H>
|
||||
#include <FL/Fl_Scroll.H>
|
||||
#include "prozilla.h"
|
||||
#include "ftps_win.h"
|
||||
|
||||
|
||||
|
||||
class FTPS_Window:public ftps_gui {
|
||||
public:
|
||||
FTPS_Window();
|
||||
void fetch_mirror_info(urlinfo *u, long file_size, char *ftps_loc,
|
||||
ftpsearch_server_type_t server_type,
|
||||
int num_req_mirrors);
|
||||
|
||||
void cleanup();
|
||||
|
||||
uerr_t callback();
|
||||
void ping_list();
|
||||
|
||||
ftps_request_t *request;
|
||||
|
||||
boolean request_running;
|
||||
boolean ping_running;
|
||||
boolean got_mirror_info;
|
||||
boolean ping_done;
|
||||
boolean exit_ftpsearch_button_pressed;
|
||||
|
||||
private:
|
||||
// ftp_mirror_t *arranged_mirrors;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
+1156
File diff suppressed because it is too large
Load Diff
+142
@@ -0,0 +1,142 @@
|
||||
/* Declarations for getopt.
|
||||
Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc.
|
||||
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA. */
|
||||
|
||||
#ifndef _GETOPT_H
|
||||
#define _GETOPT_H 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/* For communication from `getopt' to the caller.
|
||||
When `getopt' finds an option that takes an argument,
|
||||
the argument value is returned here.
|
||||
Also, when `ordering' is RETURN_IN_ORDER,
|
||||
each non-option ARGV-element is returned here. */
|
||||
extern char *optarg;
|
||||
|
||||
/* Index in ARGV of the next element to be scanned.
|
||||
This is used for communication to and from the caller
|
||||
and for communication between successive calls to `getopt'.
|
||||
|
||||
On entry to `getopt', zero means this is the first call; initialize.
|
||||
|
||||
When `getopt' returns -1, this is the index of the first of the
|
||||
non-option elements that the caller should itself scan.
|
||||
|
||||
Otherwise, `optind' communicates from one call to the next
|
||||
how much of ARGV has been scanned so far. */
|
||||
|
||||
extern int optind;
|
||||
|
||||
/* Callers store zero here to inhibit the error message `getopt' prints
|
||||
for unrecognized options. */
|
||||
|
||||
extern int opterr;
|
||||
|
||||
/* Set to an option character which was unrecognized. */
|
||||
|
||||
extern int optopt;
|
||||
|
||||
/* Describe the long-named options requested by the application.
|
||||
The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
|
||||
of `struct option' terminated by an element containing a name which is
|
||||
zero.
|
||||
|
||||
The field `has_arg' is:
|
||||
no_argument (or 0) if the option does not take an argument,
|
||||
required_argument (or 1) if the option requires an argument,
|
||||
optional_argument (or 2) if the option takes an optional argument.
|
||||
|
||||
If the field `flag' is not NULL, it points to a variable that is set
|
||||
to the value given in the field `val' when the option is found, but
|
||||
left unchanged if the option is not found.
|
||||
|
||||
To have a long-named option do something other than set an `int' to
|
||||
a compiled-in constant, such as set a value from `optarg', set the
|
||||
option's `flag' field to zero and its `val' field to a nonzero
|
||||
value (the equivalent single-letter option character, if there is
|
||||
one). For long options that have a zero `flag' field, `getopt'
|
||||
returns the contents of the `val' field. */
|
||||
|
||||
struct option {
|
||||
#if defined (__STDC__) && __STDC__
|
||||
const char *name;
|
||||
#else
|
||||
char *name;
|
||||
#endif
|
||||
/*
|
||||
* has_arg can't be an enum because some compilers complain about
|
||||
* type mismatches in all the code that assumes it is an int.
|
||||
*/
|
||||
int has_arg;
|
||||
int *flag;
|
||||
int val;
|
||||
};
|
||||
|
||||
/* Names for the values of the `has_arg' field of `struct option'. */
|
||||
|
||||
#define no_argument 0
|
||||
#define required_argument 1
|
||||
#define optional_argument 2
|
||||
|
||||
#if defined (__STDC__) && __STDC__
|
||||
#ifdef __GNU_LIBRARY__
|
||||
/* Many other libraries have conflicting prototypes for getopt, with
|
||||
differences in the consts, in stdlib.h. To avoid compilation
|
||||
errors, only prototype getopt for the GNU C library. */
|
||||
extern int getopt(int argc, char *const *argv, const char *shortopts);
|
||||
#else /*
|
||||
* not __GNU_LIBRARY__
|
||||
*/
|
||||
extern int getopt();
|
||||
#endif /*
|
||||
* __GNU_LIBRARY__
|
||||
*/
|
||||
extern int getopt_long(int argc, char *const *argv,
|
||||
const char *shortopts,
|
||||
const struct option *longopts, int *longind);
|
||||
extern int getopt_long_only(int argc, char *const *argv,
|
||||
const char *shortopts,
|
||||
const struct option *longopts, int *longind);
|
||||
|
||||
/* Internal only. Users should not call this directly. */
|
||||
extern int _getopt_internal(int argc, char *const *argv,
|
||||
const char *shortopts,
|
||||
const struct option *longopts,
|
||||
int *longind, int long_only);
|
||||
#else /*
|
||||
* not __STDC__
|
||||
*/
|
||||
extern int getopt();
|
||||
extern int getopt_long();
|
||||
extern int getopt_long_only();
|
||||
|
||||
extern int _getopt_internal();
|
||||
#endif /*
|
||||
* __STDC__
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /*
|
||||
* getopt.h
|
||||
*/
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,4 @@
|
||||
/BigProZilla01.xpm/1.1/Fri Jul 20 11:05:31 2001//
|
||||
/Pz12.xpm/1.1/Thu Aug 2 08:15:15 2001//
|
||||
/Pzdlwin.xpm/1.1/Thu Aug 2 09:38:39 2001//
|
||||
D
|
||||
@@ -0,0 +1 @@
|
||||
fltkproz/src/images
|
||||
@@ -0,0 +1 @@
|
||||
:pserver:kalum@cvs.delrom.ro:/home/cvsroot
|
||||
@@ -0,0 +1,225 @@
|
||||
/* XPM */
|
||||
static char * Pz12_xpm[] = {
|
||||
"48 48 174 2",
|
||||
" c None",
|
||||
". c #D6D6CE",
|
||||
"+ c #6B6B6B",
|
||||
"@ c #292929",
|
||||
"# c #212121",
|
||||
"$ c #181818",
|
||||
"% c #393939",
|
||||
"& c #313131",
|
||||
"* c #424242",
|
||||
"= c #636363",
|
||||
"- c #4A4A4A",
|
||||
"; c #525252",
|
||||
"> c #5A5A5A",
|
||||
", c #737373",
|
||||
"' c #848484",
|
||||
") c #8C8C8C",
|
||||
"! c #8C8C84",
|
||||
"~ c #C6C6C6",
|
||||
"{ c #000000",
|
||||
"] c #7B7B7B",
|
||||
"^ c #8C948C",
|
||||
"/ c #182118",
|
||||
"( c #94948C",
|
||||
"_ c #9C9C9C",
|
||||
": c #A5A5A5",
|
||||
"< c #949494",
|
||||
"[ c #4A4242",
|
||||
"} c #5A5252",
|
||||
"| c #6B6363",
|
||||
"1 c #423131",
|
||||
"2 c #6B3921",
|
||||
"3 c #9C7B63",
|
||||
"4 c #8C7363",
|
||||
"5 c #634239",
|
||||
"6 c #4A3129",
|
||||
"7 c #B5B5B5",
|
||||
"8 c #6B5A52",
|
||||
"9 c #945A4A",
|
||||
"0 c #A5735A",
|
||||
"a c #BD9C84",
|
||||
"b c #BDA584",
|
||||
"c c #947B73",
|
||||
"d c #C6BDBD",
|
||||
"e c #5A3931",
|
||||
"f c #5A4242",
|
||||
"g c #423939",
|
||||
"h c #6B4A42",
|
||||
"i c #BD7B5A",
|
||||
"j c #BD9C7B",
|
||||
"k c #BDA58C",
|
||||
"l c #7B6B5A",
|
||||
"m c #7B6352",
|
||||
"n c #9C8C7B",
|
||||
"o c #948473",
|
||||
"p c #4A2118",
|
||||
"q c #635242",
|
||||
"r c #392929",
|
||||
"s c #9C6342",
|
||||
"t c #CEA584",
|
||||
"u c #AD947B",
|
||||
"v c #6B5242",
|
||||
"w c #291810",
|
||||
"x c #423121",
|
||||
"y c #846B52",
|
||||
"z c #6B5239",
|
||||
"A c #290000",
|
||||
"B c #524A42",
|
||||
"C c #735A42",
|
||||
"D c #523929",
|
||||
"E c #5A4239",
|
||||
"F c #7B634A",
|
||||
"G c #CEA58C",
|
||||
"H c #C69473",
|
||||
"I c #734221",
|
||||
"J c #391000",
|
||||
"K c #393129",
|
||||
"L c #7B5A52",
|
||||
"M c #7B5242",
|
||||
"N c #8C6352",
|
||||
"O c #846352",
|
||||
"P c #A5846B",
|
||||
"Q c #DEAD9C",
|
||||
"R c #C68C7B",
|
||||
"S c #A56352",
|
||||
"T c #8C5239",
|
||||
"U c #524239",
|
||||
"V c #84635A",
|
||||
"W c #946B5A",
|
||||
"X c #845242",
|
||||
"Y c #734A39",
|
||||
"Z c #292921",
|
||||
"` c #312929",
|
||||
" . c #ADADAD",
|
||||
".. c #B5B5AD",
|
||||
"+. c #C6CECE",
|
||||
"@. c #CEDEDE",
|
||||
"#. c #BDC6C6",
|
||||
"$. c #ADB5B5",
|
||||
"%. c #C6C6BD",
|
||||
"&. c #CECEC6",
|
||||
"*. c #D6DED6",
|
||||
"=. c #A5ADA5",
|
||||
"-. c #BDCECE",
|
||||
";. c #DEF7F7",
|
||||
">. c #9CA59C",
|
||||
",. c #BDBDB5",
|
||||
"'. c #DEDECE",
|
||||
"). c #DEDED6",
|
||||
"!. c #C6CEC6",
|
||||
"~. c #D6E7DE",
|
||||
"{. c #BDCEC6",
|
||||
"]. c #D6EFEF",
|
||||
"^. c #C6D6D6",
|
||||
"/. c #BDBDBD",
|
||||
"(. c #D6D6C6",
|
||||
"_. c #E7E7CE",
|
||||
":. c #E7E7D6",
|
||||
"<. c #E7EFDE",
|
||||
"[. c #E7E7DE",
|
||||
"}. c #D6DECE",
|
||||
"|. c #CED6CE",
|
||||
"1. c #BDC6B5",
|
||||
"2. c #C6DEDE",
|
||||
"3. c #ADBDB5",
|
||||
"4. c #9CADA5",
|
||||
"5. c #E7EFD6",
|
||||
"6. c #EFEFE7",
|
||||
"7. c #E7EFE7",
|
||||
"8. c #ADADA5",
|
||||
"9. c #D6F7F7",
|
||||
"0. c #CEE7E7",
|
||||
"a. c #DEEFD6",
|
||||
"b. c #EFF7E7",
|
||||
"c. c #A5ADAD",
|
||||
"d. c #B5BDBD",
|
||||
"e. c #DEE7D6",
|
||||
"f. c #E7F7DE",
|
||||
"g. c #E7F7E7",
|
||||
"h. c #F7F7E7",
|
||||
"i. c #B5BDB5",
|
||||
"j. c #DEEFE7",
|
||||
"k. c #DEE7DE",
|
||||
"l. c #DEEFDE",
|
||||
"m. c #EFEFDE",
|
||||
"n. c #D6D6D6",
|
||||
"o. c #CECECE",
|
||||
"p. c #BDC6BD",
|
||||
"q. c #D6E7D6",
|
||||
"r. c #E7E7E7",
|
||||
"s. c #DEDEDE",
|
||||
"t. c #CED6D6",
|
||||
"u. c #949C94",
|
||||
"v. c #CEDECE",
|
||||
"w. c #EFEFEF",
|
||||
"x. c #C6D6CE",
|
||||
"y. c #F7F7EF",
|
||||
"z. c #F7F7F7",
|
||||
"A. c #F7526B",
|
||||
"B. c #F74263",
|
||||
"C. c #EFFFE7",
|
||||
"D. c #F75263",
|
||||
"E. c #FFFFF7",
|
||||
"F. c #F7FFF7",
|
||||
"G. c #DEEFEF",
|
||||
"H. c #F7FFEF",
|
||||
"I. c #F74A63",
|
||||
"J. c #EFF7EF",
|
||||
"K. c #FFFFEF",
|
||||
"L. c #E7F7F7",
|
||||
"M. c #D6E7E7",
|
||||
"N. c #DEF7EF",
|
||||
"O. c #EFFFF7",
|
||||
"P. c #9C9C94",
|
||||
"Q. c #73736B",
|
||||
" . + @ # $ $ $ @ % $ @ & & # % * * = % - ; > * % ; > , + + ' ) ) ! ",
|
||||
" ~ % $ $ $ { { $ & % $ $ @ * # * % & - & - & ; & & * $ ; * > , ] ) ' ^ ",
|
||||
" ~ / { $ $ $ { { $ $ - $ & % * % * % & * & ; - & % & - + % * > - + , ] ) ( ",
|
||||
" ~ { { { $ @ { $ $ $ $ * $ $ * & & - > - * & * & > % - - > - @ * = % = + ' ) ",
|
||||
"~ $ { { $ $ $ $ { # % # @ @ % - % % % * - & - > > = $ & - * = @ % > > % ; , _ : ",
|
||||
"$ { { { $ $ $ $ $ # & & # # & > % - * - * ; % * * ; ; * > - % % ; ; * @ * + ) ) ",
|
||||
"$ $ $ { { $ & @ $ $ & $ @ % * % % - * > ; % % ; - ; # * % % @ $ $ $ % + , , ) ' ~ ",
|
||||
"$ $ $ $ $ $ # $ # @ * $ & $ ; - - % - % ; * % ; - , & & * * = ; + , ] ' < ' < ] ' < ",
|
||||
"{ $ $ { $ # $ $ $ @ * $ @ & = & * & - % - % - > @ > @ * + + , [ } | > ; = + < ' ) = , ) ",
|
||||
"$ $ $ $ $ @ $ { $ - @ $ & @ - - & @ @ $ $ $ $ * % > & = ' > 1 2 3 4 5 6 1 % - ' ' ' , - , 7 ",
|
||||
"$ $ { { # $ & $ $ # @ @ & & % - @ & & - > @ $ - @ ; & ; 8 9 0 a b 4 c d e f g = ' ) ) ] , ] = ) ",
|
||||
"$ @ $ $ @ & * @ @ $ # @ * * % % % @ % & & & % ; $ = % % h i j k l m n o p e q r ] ) ) ' ) ) ' + ",
|
||||
"& & $ $ @ * @ & @ & & % * - - * * & > > * % - = - , % [ 6 s t u 4 v w x v y z A B > ) ] ) ' ] ] ",
|
||||
"& @ { { & $ $ $ & % % * & ; ; > > - - = - - - = * * * ; @ 1 9 3 C D E F 3 G H I J K % * = > ] ",
|
||||
"% # $ { @ @ $ & & * $ $ % - ; - - - = + ; - - = > , ; + = & 1 L M N O P Q R S T 8 U % @ * + ",
|
||||
"@ $ $ $ @ # # @ & @ * @ % - = > * ; ; - ; - - > * - * = ; & @ $ & E V W N X Y Z % > * ; , ] + ",
|
||||
"$ $ $ $ @ # & $ & @ - * = ; - ; * ; = - - % > + & - * ; = - * % @ $ $ & @ ` @ @ > @ * * - + > > ",
|
||||
"$ $ $ $ & @ & # $ # & % % > - ; % > - + % - = = % + * > ; - > - - - % @ * * * % ; > * > + = > > ",
|
||||
"$ $ $ $ % $ @ % $ % @ @ @ & @ > & - > + * % > + - > - + = ; > - > ; > * > + - > + ; = - + = ; = ",
|
||||
"$ { # $ $ % # # $ $ # @ * * - - ; > + = > > = - * > & ; = % ; - = % = % * - * ; = * > * ; - & * ",
|
||||
"@ $ @ & % @ > & & @ @ - * * - % % % - + ; ; + , + ; > = = > = = , > + = , - % > = = ; * , = * @ ",
|
||||
"$ $ $ $ @ # % # $ @ # $ - > = ; & & ; ] ' ' < ) ] ) ] < ) ] ' , ' = ; * + = - > > % ; ; ; = % * ",
|
||||
"& % & @ & & * $ $ & @ % @ > ; * & ; = , ] ' _ ._ _ : : : _ _ ) ) ' ] ] + = - = = * - * = = % - ",
|
||||
"& $ & @ & & @ & @ @ @ # - > > > & ; + ] ' ( _ : ..+.~ +.@.#. .$.7 : _ : : ) ' > + - ; > ; = > + ",
|
||||
"& % $ & @ $ * # $ $ % @ % > * * = - ] ' _ _ : ..%.&.. . *.7 =.-.;.-.>. .$.: .< ' = * = % % - ; ",
|
||||
"$ @ # % % & @ & { @ @ * % - - ; > = + < ...,.%.&.'.).).*.&.%.!.~.=.( {.].^./.7 7 _ < _ ] = , - ",
|
||||
"{ $ $ @ & * & # $ $ % * * * * = - = , < +.~ (.'.'._.:.:.<.[.).}.|.1.=.#.2.3.4.: +./. . .' > = + ",
|
||||
"{ & & % & % & $ & * # * ; % - > ; = ] < #.!.&.'._._._.5.<.6.7.<.[.}.1.8.( ! ! 4.9.0.#./.7 _ ' , ",
|
||||
"$ @ @ & % % @ $ & # * ; % > - ; ; - + ) : 7 %.(.:.:._.a.<.7.b.b.6.[.}.%...>.( 4.9.].c.>.+.d.7 < ",
|
||||
"$ - * & * * $ @ @ # @ - % % * , = % > ] _ 7 %.|.e.:.5.a.a.f.g.b.h.6.[.. ~ i. .$.-._ ! c.9.0.+.: ",
|
||||
"@ % * & * - $ @ & & - - = * @ * * - > + ) .!.j.*.k.<.l.l.l.f.f.b.b.m.[.n.o.~ p.,...: $.].c.: 7 ",
|
||||
"% % # & @ % $ # $ $ & & & @ & = % * ; ] ] < : p.|.*.e.k.q.l.l.<.<.g.b.6.r.s.*.n.. o.o.t./.u.u.0.",
|
||||
"- - @ % * - $ $ @ $ & > & & % ; % ; > = ] ] _ 7 1.*.*.|.v.q.e.a.<.f.b.b.w.w.r.r.r.[.s.s.s.|.~ ",
|
||||
"& * $ # @ % # $ # & * % % & * % # * * = ] ' ' 7 ^.;.x.p.!.|.q.a.f.g.b.b.y.z.z.z.z.w.w.w.r.s.n.j.",
|
||||
"- - A.A.A.A.A.& # # # @ % # - = @ ; & - = + ] ) 7 ].{...i.B.B.a.f.B.B.b.C.B.B.z.z.z.z.z.w.r.n.&.",
|
||||
"% % A.A.A.A.D.D.& - - & * * ; - - = > > = + ) ) _ +.d.=...B.B.e.<.B.B.g.b.B.B.E.E.F.z.z.z.w.r.n.",
|
||||
"& @ A.A.& - D.D.D.& * @ & - - & ; * % - * - , ] ) : c.>.{.j.*.e.<.B.B.g.f.B.B.F.E.E.E.z.z.z.w.r.",
|
||||
"; % A.A.- - * D.D.@ - @ % % > % @ = = * % ; ] ' ] _ /.0.;.G.&.e.<.B.B.g.f.B.B.H.F.E.E.E.E.z.z.w.",
|
||||
"* & A.A.* - A.D.D.$ % D.D.D.% ; D.D.I.* % % I.B.B.B.B.7 ].B.B.).[.B.B.g.g.B.B.J.H.B.B.B.B.B.E.z.",
|
||||
"* * A.A.A.A.D.D.; & D.D.D.* - D.D.I.I.I.> * I.B.B.B.B.: d.B.B.&.).B.B.b.b.B.B.b.y.B.B.B.B.B.E.E.",
|
||||
"% & A.A.A.A.D.> > - D.D.$ - D.D.D.* I.I.I.- - % B.B.B.' .B.B.*.r.B.B.6.J.B.B.b.b.h.y.K.B.B.K.K.",
|
||||
"@ @ A.A.- - ; ; ; > D.D.$ @ D.D.& & - I.I.> + > B.B.+ ] ' B.B.G.L.B.B.6.w.B.B.b.b.B.B.B.B.B.K.K.",
|
||||
"% % A.A.& * ; > > = D.D.& $ D.D.& * % I.I.; = I.B.- + ' ] B.B.~ M.B.B.[.6.B.B.y.B.B.b.b.B.B.h.h.",
|
||||
"$ $ A.A.% @ % ; - = D.D.- > D.D.D.& I.I.I.* I.I.B.% ; = + B.B._ $.B.B.k.r.B.B.z.B.B.b.b.B.B.m.h.",
|
||||
"> & A.A.* = > = , ; D.D.; > > D.D.D.I.I.@ - I.B.B.B.B.+ ] B.B.< : B.B.N.O.B.B.w.B.B.B.B.B.B.m.m.",
|
||||
"$ $ A.A.$ # > - = % D.D.; * @ & D.I.I.s._ # I.B.B.B.B.+ = B.B.] ' B.B.t.L.B.B.w.z.B.B.B.B.B.m.m.",
|
||||
"% % % - % % > * + + * > > = % % , , ] ! # $ * - * - ; , ] ] ] : ~ ~ |.&.n.r.w.y.z.z.y.y.h.m.",
|
||||
"* % * - @ - ; > % ; ; - = * & ; = ' P. Q.$ - = > - * ; , , ] _ ./.~ ~ o.[.6.w.y.z.z.z.y.m."};
|
||||
@@ -0,0 +1,308 @@
|
||||
/* XPM */
|
||||
static char * Pzdlwin_xpm[] = {
|
||||
"48 48 257 2",
|
||||
" c None",
|
||||
". c #000000",
|
||||
"+ c #101010",
|
||||
"@ c #181818",
|
||||
"# c #212121",
|
||||
"$ c #290000",
|
||||
"% c #292118",
|
||||
"& c #292121",
|
||||
"* c #292929",
|
||||
"= c #312929",
|
||||
"- c #313129",
|
||||
"; c #313131",
|
||||
"> c #391000",
|
||||
", c #392929",
|
||||
"' c #393931",
|
||||
") c #393939",
|
||||
"! c #422110",
|
||||
"~ c #423121",
|
||||
"{ c #423131",
|
||||
"] c #423939",
|
||||
"^ c #424239",
|
||||
"/ c #424242",
|
||||
"( c #4A3129",
|
||||
"_ c #4A3929",
|
||||
": c #4A4A42",
|
||||
"< c #4A4A4A",
|
||||
"[ c #524231",
|
||||
"} c #524239",
|
||||
"| c #524242",
|
||||
"1 c #524A42",
|
||||
"2 c #52524A",
|
||||
"3 c #525252",
|
||||
"4 c #5A3931",
|
||||
"5 c #5A4239",
|
||||
"6 c #5A5A5A",
|
||||
"7 c #635242",
|
||||
"8 c #63635A",
|
||||
"9 c #6B5242",
|
||||
"0 c #6B5A52",
|
||||
"a c #734221",
|
||||
"b c #734239",
|
||||
"c c #8C4A39",
|
||||
"d c #845239",
|
||||
"e c #7B5242",
|
||||
"f c #7B634A",
|
||||
"g c #846352",
|
||||
"h c #84635A",
|
||||
"i c #84735A",
|
||||
"j c #906756",
|
||||
"k c #635A63",
|
||||
"l c #636363",
|
||||
"m c #6B6363",
|
||||
"n c #6B6B63",
|
||||
"o c #736363",
|
||||
"p c #9C7B63",
|
||||
"q c #6B636B",
|
||||
"r c #6B6B6B",
|
||||
"s c #73736B",
|
||||
"t c #8C6B6B",
|
||||
"u c #736B73",
|
||||
"v c #737373",
|
||||
"w c #7B7B73",
|
||||
"x c #8C7B73",
|
||||
"y c #948473",
|
||||
"z c #7B737B",
|
||||
"A c #52738C",
|
||||
"B c #527394",
|
||||
"C c #5A7394",
|
||||
"D c #5A7B94",
|
||||
"E c #637394",
|
||||
"F c #637B94",
|
||||
"G c #637B9C",
|
||||
"H c #67849C",
|
||||
"I c #738C9C",
|
||||
"J c #739494",
|
||||
"K c #7B7B7B",
|
||||
"L c #7B8C9C",
|
||||
"M c #847B84",
|
||||
"N c #84847B",
|
||||
"O c #848484",
|
||||
"P c #848C84",
|
||||
"Q c #84948C",
|
||||
"R c #849494",
|
||||
"S c #8C848C",
|
||||
"T c #8C8C84",
|
||||
"U c #8C8C8C",
|
||||
"V c #8C948C",
|
||||
"W c #8C9494",
|
||||
"X c #94847B",
|
||||
"Y c #948C8C",
|
||||
"Z c #948C94",
|
||||
"` c #94948C",
|
||||
" . c #949494",
|
||||
".. c #949C94",
|
||||
"+. c #9C8C84",
|
||||
"@. c #9C9494",
|
||||
"#. c #9C9C94",
|
||||
"$. c #738CA5",
|
||||
"%. c #73A5A5",
|
||||
"&. c #7B949C",
|
||||
"*. c #7B94A5",
|
||||
"=. c #7BA5A5",
|
||||
"-. c #7BA5AD",
|
||||
";. c #8494A5",
|
||||
">. c #8494AD",
|
||||
",. c #849CA5",
|
||||
"'. c #94989C",
|
||||
"). c #84A5AD",
|
||||
"!. c #84ADAD",
|
||||
"~. c #94A5A5",
|
||||
"{. c #9C949C",
|
||||
"]. c #9C9C9C",
|
||||
"^. c #9CA59C",
|
||||
"/. c #739CBD",
|
||||
"(. c #739CC6",
|
||||
"_. c #7B9CBD",
|
||||
":. c #84ADB5",
|
||||
"<. c #94ADAD",
|
||||
"[. c #8CA9B9",
|
||||
"}. c #8CB5B5",
|
||||
"|. c #94B1BD",
|
||||
"1. c #7B9CC6",
|
||||
"2. c #7FA5C6",
|
||||
"3. c #8CA5C6",
|
||||
"4. c #8CADC6",
|
||||
"5. c #90ADCA",
|
||||
"6. c #90B3E6",
|
||||
"7. c #6FADFF",
|
||||
"8. c #87B5F5",
|
||||
"9. c #B58168",
|
||||
"0. c #F79C41",
|
||||
"a. c #F7A529",
|
||||
"b. c #F99457",
|
||||
"c. c #FF904E",
|
||||
"d. c #FF9452",
|
||||
"e. c #FF8C5A",
|
||||
"f. c #FF995D",
|
||||
"g. c #EFAD18",
|
||||
"h. c #F1A736",
|
||||
"i. c #F7A54A",
|
||||
"j. c #F9A560",
|
||||
"k. c #E2AD73",
|
||||
"l. c #F3AB6D",
|
||||
"m. c #F7AD73",
|
||||
"n. c #F6D275",
|
||||
"o. c #A59C8C",
|
||||
"p. c #A2A49F",
|
||||
"q. c #D2A990",
|
||||
"r. c #D3AF9C",
|
||||
"s. c #E7AD7B",
|
||||
"t. c #E4AF86",
|
||||
"u. c #DEAF96",
|
||||
"v. c #DEBD9C",
|
||||
"w. c #EFAD7B",
|
||||
"x. c #EFB57F",
|
||||
"y. c #EBB98C",
|
||||
"z. c #E7BA96",
|
||||
"A. c #F7D086",
|
||||
"B. c #E9C899",
|
||||
"C. c #FFE67F",
|
||||
"D. c #F3E094",
|
||||
"E. c #A59CA5",
|
||||
"F. c #A5A5A5",
|
||||
"G. c #ADA5A5",
|
||||
"H. c #ADA5AD",
|
||||
"I. c #A5ADA5",
|
||||
"J. c #ADADA5",
|
||||
"K. c #A5ADAD",
|
||||
"L. c #ADADAD",
|
||||
"M. c #A5B5A5",
|
||||
"N. c #A5B5AD",
|
||||
"O. c #9CB5B5",
|
||||
"P. c #A0B9B9",
|
||||
"Q. c #ADB5AD",
|
||||
"R. c #ADB5B5",
|
||||
"S. c #ADBDB5",
|
||||
"T. c #B5ADB5",
|
||||
"U. c #B5B5AD",
|
||||
"V. c #B5B5B5",
|
||||
"W. c #BDADB9",
|
||||
"X. c #BDB5BD",
|
||||
"Y. c #B5BDB5",
|
||||
"Z. c #B9C1B1",
|
||||
"`. c #BDBDB5",
|
||||
" + c #BDBDBD",
|
||||
".+ c #CBAFAA",
|
||||
"++ c #C6B5B5",
|
||||
"@+ c #D0B7AF",
|
||||
"#+ c #D8BBA9",
|
||||
"$+ c #BDC6BD",
|
||||
"%+ c #D8CAAF",
|
||||
"&+ c #E4D0A7",
|
||||
"*+ c #E1DBAD",
|
||||
"=+ c #9CB5C6",
|
||||
"-+ c #9CBDC8",
|
||||
";+ c #B2AFCB",
|
||||
">+ c #ADC1CA",
|
||||
",+ c #A5ADD6",
|
||||
"'+ c #9FB2E1",
|
||||
")+ c #A5C1E7",
|
||||
"!+ c #AFBDDA",
|
||||
"~+ c #BDB9C6",
|
||||
"{+ c #C6BDBD",
|
||||
"]+ c #C6BDC6",
|
||||
"^+ c #BDC6C6",
|
||||
"/+ c #BDBDCE",
|
||||
"(+ c #BDC6CE",
|
||||
"_+ c #B5C6D6",
|
||||
":+ c #B5C6DE",
|
||||
"<+ c #9CCED6",
|
||||
"[+ c #9CD6DE",
|
||||
"}+ c #A5D6DE",
|
||||
"|+ c #A5D6E7",
|
||||
"1+ c #A5DEDE",
|
||||
"2+ c #A5DEE7",
|
||||
"3+ c #ADCEDE",
|
||||
"4+ c #ADDEDE",
|
||||
"5+ c #B5CECE",
|
||||
"6+ c #BDCECE",
|
||||
"7+ c #B5CED6",
|
||||
"8+ c #B5D6D6",
|
||||
"9+ c #ADDEE7",
|
||||
"0+ c #BDCED6",
|
||||
"a+ c #B5CEDE",
|
||||
"b+ c #B9DEE2",
|
||||
"c+ c #C6C6BD",
|
||||
"d+ c #C6C6C6",
|
||||
"e+ c #C6CEC1",
|
||||
"f+ c #CECABD",
|
||||
"g+ c #C6C6CE",
|
||||
"h+ c #C6CECE",
|
||||
"i+ c #CECACA",
|
||||
"j+ c #CECECE",
|
||||
"k+ c #CAD6CA",
|
||||
"l+ c #CED6CE",
|
||||
"m+ c #CEDEC6",
|
||||
"n+ c #C6D6D6",
|
||||
"o+ c #D6D3C5",
|
||||
"p+ c #D6D6CE",
|
||||
"q+ c #D6E7BD",
|
||||
"r+ c #E1E6C8",
|
||||
"s+ c #CEDEDE",
|
||||
"t+ c #D6D6D6",
|
||||
"u+ c #D6E2D6",
|
||||
"v+ c #DEE1D8",
|
||||
"w+ c #C6E7DE",
|
||||
"x+ c #D4E9E6",
|
||||
"y+ c #DEE7DE",
|
||||
"z+ c #DBF1E9",
|
||||
"A+ c #E7E7D6",
|
||||
"B+ c #E7E7DE",
|
||||
"C+ c #E7EFD6",
|
||||
"D+ c #E7F3DE",
|
||||
"E+ c #E7EBE7",
|
||||
"F+ c #EFEFE2",
|
||||
"G+ c #DEF9F7",
|
||||
"H+ c #F3F7E7",
|
||||
"T T T T P 6 # # @ @ @ * ) @ * ; ; # ) / / l ) q r r / ) 3 6 v r r O U U T T T T T T T T T T T U ",
|
||||
"T T e.e.e.e.f.@ . . @ * ) @ @ # ) # ) ) * q l Z U .l k / n.n./ 6 C.C.U O C.C.T T T T T T T T T ",
|
||||
"T T e.e.e.b.f.f.. . @ @ < @ ; ) / ) / ) l Z L ;.Z U Z U q A.A./ 6 A.C.v K D.C.T T T T U T T T T ",
|
||||
"T 8 c.d.. @ f.f.j.@ @ @ / @ @ ) ; * / 6 q Z l l L ,.Z .Z .q k / D.D.l r D.D.P U T T T T T T T ",
|
||||
"s @ c.d.@ @ @ j.j.# ) # # # ) < ) ) ) / q U ; r r u I L Z Z {.U l B.&+) < &+*+l T T T T T T T T ",
|
||||
"@ . c.d.@ @ j.j.j.# * l.l.m.; 6 x.x.x.< l .y.y.z.B.B.l ;.B.B.l ) &+&+# / *+*+K K *+*+q+q+q+T T ",
|
||||
"@ @ 0.0.i.b.j.j.@ @ l.l.l.) ) s.x.t.t.y.q Z z.z.v.v.v.l Z v.%+k . %+%+r v %+f+O K o+m+m+m+m+T T ",
|
||||
"@ @ 0.0.i.i.j.@ # * l.l.* @ s.t.t.) t.z.z.Z l ;.v.v.#+l Z #+%+r < f+f+O .f+e+K K l O T h+6+T T ",
|
||||
". @ h.0.@ # @ @ @ * k.k.* ; t.t.) ; / u.u.Z ) r #+#+E l ].@+{+m ] c+c+3 l ^+(+O U (+_+7+7+a+T T ",
|
||||
"@ @ h.h.@ # @ . @ < k.s.; * t.t.; # # r.r.U k @+@+H L u E.{+{+o 9 ~+/+( { _+_+O !+!+v < )+)+N P ",
|
||||
"@ @ a.h.# @ * @ @ # k.k.; * t.u.u.; r.r.r.U .+.+++F L r @.~+~++.i ;+!+{+4 !+!+l )+)+U K 6.6.l r ",
|
||||
"@ # g.h.# ; ) # # @ k.k./ ) ) q.r.r.r..+@ l .+++W.W.X.l @.;+;++.1 ,+,+y ! '+'+, 6.6.8.8.8.8.O r ",
|
||||
"; * g.h.# / * * # * k.k./ < < ) r.r..+6 / * W.W.W.W.;+q Y ;+,+X 7 '+'+~ 9 6.6.$ | 8.8.7.7.7.K K ",
|
||||
"; # . . * @ @ @ * ) ) / ; < 3 6 6 < < l < < < / ; l J ;.U Y t x [ _ 5 f p q.9.a > , ) / l 6 K N ",
|
||||
") # @ . * * @ ; * / @ @ ) / 3 < < < l r < < < l 6 3 ) v u l % 5 e j g y r.9.j c 0 } ) * / r N T ",
|
||||
"* @ @ @ * # # # ; * / # ) < l 6 / < < < < < < 6 / / / / ) # # @ - 5 h j j d b & ) 6 / < v K r O ",
|
||||
"@ @ @ @ # # * @ * # < / l < < 3 / < l < / ) 6 r ; < / < u ) ) ) # @ @ = * * # # 6 * ) / / r 6 6 ",
|
||||
"@ @ @ @ * # * # @ # ; ) ) 6 < 3 ) 6 < r ) < 6 l ) r / 6 r ) 6 < / < ) * ) ) ) ) < 6 / 6 r l 6 6 ",
|
||||
"@ @ @ @ ) @ * ) @ ) # # * * # 6 ; < 6 r / ) 6 r / 6 < r v ) 6 < 6 3 6 / 6 r < 6 r 3 l < r l 3 l ",
|
||||
"@ . # @ @ ) # # @ @ # # / / / < < 6 r l 6 6 l < ) 6 ; 3 u * < < l ) l ) / < / < l ) 6 / 3 < * ) ",
|
||||
"# @ # ; ) # 6 * ; k k q q l q l l l q v r r v z v r r :.H F v u z r v v z q l u v u r l v l / * ",
|
||||
"@ @ @ @ # # ) # k @ @ . ) / / ) # # ) 6 6 6 r l 6 l 3 |.|.$.6 3 6 / ) ; < / ) / / * ) ) q l ) / ",
|
||||
"; ) * * ; ; / @ k # * ) * 6 3 / ; 3 l v K O ].L.].].F.v v r r U U O K K r 6 / l l / < l / l ) < ",
|
||||
"; @ * # ; * * ; k @ * # / 6 6 6 * 3 r K O ` ].F.U.h+d+h+s+^+L.R.V.F.].F.F.U O 6 r < 3 r ) 6 6 r ",
|
||||
"* ) @ ; * @ / # k . ) * ) 6 / / l < K O #.].F.U.c+i+p+p+t+V.I.6+G+6+p.L.R.F.L. .O l / u * ) < 3 ",
|
||||
"@ # # ) ) * # ; k @ # ) ) < / < 6 l r .Q.U.`.c+o+p+v+v+u+j+c+e+s+I.` ^+z+n+ +V.V.]. .U 6 l v < ",
|
||||
". k k =.=.-.l k k . ) ) ) / / v q !.}.-+K.F.J.U.U.U.U.`.w+w+b+Q.J.p. .F.N.'.-+-+7+]. . .l 6 l r ",
|
||||
". @ # C =.C # . # * # / 3 ) < / ) H }.>.U V ` #.^.#.^.p.5+w+_+I.p.#.T w n l *.-+3+~.Q O O ].O v ",
|
||||
"@ # * ; l * @ @ ; # / < ) 6 < 3 3 < v l K V.c+p+A+A+r+C+D+`.J.J.F+B+p+c+U.^.` W O.<.K.^.h+V.V. .",
|
||||
"@ / / * l ; @ * # # * < ) ) / v 6 ) u 6 ].V.c+l+v+A+C+C+C+Y.I.H+H+F+B+p+d+Y.L.'.Q ..T K.G+x+d+F.",
|
||||
"* ) / ; l ; @ # * ; < / l / # / / < r < U L.d+y+u+y+B+y+y+Y.I.D+F+H+F+B+t+j+d+].K U.F.R.x+K.F.V.",
|
||||
") ) # * k * @ # @ @ * * * * * 6 ) / q 6 K .F.$+k+u+y+y+u+Y.p.D+D+D+F+F+E+v+v+F.O j+j+t+ +....w+",
|
||||
"Z Z U Z Z Z U U U U ; 6 ; U Z .Z . .{.E.E.L.V.$+u+d+d+d+h+j+j+j+j+l+j+j+i+i+d+d+d+d+d+d+j+d+G+",
|
||||
"U l k k k l k k k U l ) ) U l l k l q v K K F.].n+G+d+p.F.I.J.J.J.J.I.i+].].{. . . . .{.d+{.t+z+",
|
||||
"Z q =.-.-.-.=.=.%.U %.k ) U q :.%.).=.-.!.:.E.|.].z+ +'.|.|.=+=+=+=+4+d+4+U 4+}+1.1.2.2.]+4+ .i+",
|
||||
"Z l %.=.-.).=.=.=.Z ; # ; Z r -.-.!.).).!.:.H.l v W +Y [.[.|.5.4.3.4+]+/ ^ ' }+/././.1.]+< 3 l ",
|
||||
"U k k k k -.=.k k l -.U # Z q l q l =.).l q K }.F.v V.U 4.5.3.3.2.2.O O }+ +& M /././././.1.]+3 ",
|
||||
" .l -.).).).-.).%.%.-.U * Z r =.=.!.:.-.-.).}.|.E.r +F.5.4.2.2.1.1.}+}+}+X.@ [+/./././././.]+: ",
|
||||
"Z k k l -.q q r -.k l U @ Z l q k =.r q l -.l v E.< T.U 4.2._._././.}+M M X.@ [+/./././././. +) ",
|
||||
"Z l =.=.-.-.).!.).=.%.U . Z q =.-.).).).!.-.).).E.< L.O _._._./././.[+[+[+X.@ [+/./././././.X.- ",
|
||||
"Z C C C F C C r r q k U . Z k %.k q A F F F F F {.) T.K <+M M M }+M M M M X.@ M M [+M K M M X.& ",
|
||||
"U A C C F F F ).).).%.U . U r %.=.=.F C C H H H {.@ T.K <+[+[+}+}+[+[+[+[+X.@ [+[+[+[+[+[+[+X.& ",
|
||||
"Z C C F C C F ).u :.l U # U k k l l C C C F H G E.* T.K K M M [+M [+M [+M X.@ M [+M [+M [+M X.* ",
|
||||
"U A C C C C C ).).!.).Z ; .k %.=.=.A A F C F H E.# L.z <+[+[+[+[+[+[+[+[+X.@ [+[+[+[+[+[+[+X.& ",
|
||||
"{.C F F C H F !.z ).v {.) .r l u -.F A A F F G E.; T.z K K [+K M [+M [+M X.@ [+M M [+M [+M +- ",
|
||||
"U A C C A A H -.!.=.-. .) Z k =.:.).I *.F A C D ].* H.z <+<+[+[+[+[+[+[+}+ +# }+}+}+}+}+}+}+{+^ ",
|
||||
"Z Z Z .Z Z .Z {.].Z {./ {.Z Z ].].p.F.F.{.U Z {.* F.H.T.T.X.X.X.X.X.X.X.X.; + +]+]+]+]+]+]+2 ",
|
||||
"; * ; ; @ ; ) / * ) ) ; / ; # ) / 6 r l l l / . ; / ; * # * ; ; * ; ) / / / / : < < 2 3 3 6 l n "};
|
||||
@@ -0,0 +1,25 @@
|
||||
/* XPM */
|
||||
static char * pause_xpm[] = {
|
||||
"34 17 5 1",
|
||||
" c None",
|
||||
". c #EEF2EE",
|
||||
"+ c #CDCECD",
|
||||
"@ c #626562",
|
||||
"# c #000000",
|
||||
".++++++++++++++++++++++++++++++++@",
|
||||
".++++++++++++++++++++++++++++++++@",
|
||||
".++++++++++++##+++##+++++++++++++@",
|
||||
".++++++++++++##+++##+++++++++++++@",
|
||||
".++++++++++++##+++##+++++++++++++@",
|
||||
".++++++++++++##+++##+++++++++++++@",
|
||||
".++++++++++++##+++##+++++++++++++@",
|
||||
".++++++++++++##+++##+++++++++++++@",
|
||||
".++++++++++++##+++##+++++++++++++@",
|
||||
".++++++++++++##+++##+++++++++++++@",
|
||||
".++++++++++++##+++##+++++++++++++@",
|
||||
".++++++++++++##+++##+++++++++++++@",
|
||||
".++++++++++++##+++##+++++++++++++@",
|
||||
".++++++++++++##+++##+++++++++++++@",
|
||||
".++++++++++++##+++##+++++++++++++@",
|
||||
".++++++++++++++++++++++++++++++++@",
|
||||
".++++++++++++++++++++++++++++++++@"};
|
||||
@@ -0,0 +1,27 @@
|
||||
/* XPM */
|
||||
static char * play_xpm[] = {
|
||||
"44 20 4 1",
|
||||
" c None",
|
||||
". c #EEF2EE",
|
||||
"+ c #CDCECD",
|
||||
"@ c #000000",
|
||||
"............................................",
|
||||
".+++++++++++++++++++++++++++++++++++++++++++",
|
||||
".+++++++++++++++++++++++++++++++++++++++++++",
|
||||
".+++++++++++++++++++++++++++++++++++++++++++",
|
||||
".+++++++++++++++++++@@@+++++++++++++++++++++",
|
||||
".+++++++++++++++++++@@@@++++++++++++++++++++",
|
||||
".+++++++++++++++++++@@@@@+++++++++++++++++++",
|
||||
".+++++++++++++++++++@@+@@@++++++++++++++++++",
|
||||
".+++++++++++++++++++@@++@@@+++++++++++++++++",
|
||||
".+++++++++++++++++++@@+++@@@++++++++++++++++",
|
||||
".+++++++++++++++++++@@++++@@@+++++++++++++++",
|
||||
".+++++++++++++++++++@@+++@@@++++++++++++++++",
|
||||
".+++++++++++++++++++@@++@@@+++++++++++++++++",
|
||||
".+++++++++++++++++++@@+@@@++++++++++++++++++",
|
||||
".+++++++++++++++++++@@@@@+++++++++++++++++++",
|
||||
".+++++++++++++++++++@@@@++++++++++++++++++++",
|
||||
".+++++++++++++++++++@@@+++++++++++++++++++++",
|
||||
".+++++++++++++++++++++++++++++++++++++++++++",
|
||||
".+++++++++++++++++++++++++++++++++++++++++++",
|
||||
".+++++++++++++++++++++++++++++++++++++++++++"};
|
||||
+179
@@ -0,0 +1,179 @@
|
||||
/******************************************************************************
|
||||
fltk prozilla - a front end for prozilla, a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif /*
|
||||
* HAVE_CONFIG_H
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "prozilla.h"
|
||||
#include "main.h"
|
||||
#include "init.h"
|
||||
#include "options.h"
|
||||
|
||||
|
||||
|
||||
extern struct runtime rt;
|
||||
|
||||
/* Sets the default config */
|
||||
void set_defaults(int *argc, char ***argv)
|
||||
{
|
||||
|
||||
struct stat st;
|
||||
char cwd[PATH_MAX];
|
||||
/*
|
||||
* Zero the structure which holds the config data
|
||||
*/
|
||||
memset(&rt, 0, sizeof(rt));
|
||||
|
||||
if (getcwd(cwd, sizeof(cwd)) == NULL)
|
||||
{
|
||||
proz_debug("Failed to get the current working directory");
|
||||
strcpy(cwd, ".");
|
||||
}
|
||||
|
||||
rt.home_dir = strdup(libprozrtinfo.home_dir);
|
||||
|
||||
/*TODO what to do if the homedir is NULL */
|
||||
rt.config_dir = (char *) malloc(PATH_MAX);
|
||||
snprintf(rt.config_dir, PATH_MAX, "%s/%s", rt.home_dir, PRZCONFDIR);
|
||||
/* Make the ~/.prozilla directory if necessary */
|
||||
|
||||
if (stat(rt.config_dir, &st) == -1)
|
||||
{
|
||||
/*error has hapenned */
|
||||
if (errno == ENOENT)
|
||||
{
|
||||
/*Create the dir then */
|
||||
if (mkdir(rt.config_dir, S_IRWXU) != 0)
|
||||
{
|
||||
perror
|
||||
("unable to create the directory to store the config info in");
|
||||
exit(0);
|
||||
}
|
||||
} else
|
||||
perror("Error while stating the config info directory");
|
||||
}
|
||||
|
||||
/*Output the file to the directory , cwd by default */
|
||||
rt.output_dir = strdup(cwd);
|
||||
rt.dl_dir = strdup(cwd);
|
||||
rt.logfile_dir = strdup(rt.config_dir);
|
||||
|
||||
|
||||
/*
|
||||
* The default no of connections and maximum redirections allowed
|
||||
*/
|
||||
rt.num_connections = 4;
|
||||
rt.max_redirections = 10;
|
||||
/* Uses PASV by default
|
||||
*/
|
||||
rt.ftp_use_pasv = libprozrtinfo.ftp_use_pasv;
|
||||
/*
|
||||
* The force option, off by default when enabled
|
||||
* cause Prozilla not to prompt the user about overwriting existent
|
||||
* files etc..
|
||||
*/
|
||||
rt.force_mode = FALSE;
|
||||
/*
|
||||
* .netrc options
|
||||
*/
|
||||
rt.use_netrc = TRUE;
|
||||
|
||||
|
||||
/*
|
||||
* The max number of trys and the delay between each
|
||||
*/
|
||||
rt.max_attempts = 0; /*TODO it is currently UNLIMITED */
|
||||
rt.retry_delay = 15; /*
|
||||
* delay in seconds
|
||||
*/
|
||||
|
||||
/*Default is to not log any debug info */
|
||||
rt.debug_mode = FALSE;
|
||||
rt.ftp_search = FALSE;
|
||||
rt.max_simul_pings = 5;
|
||||
rt.max_ping_wait = 8;
|
||||
rt.ftps_mirror_req_n = 40;
|
||||
|
||||
rt.max_bps_per_dl = 0; /* 0= No throttling */
|
||||
// rt.ftpsearch_url =
|
||||
//nstrdup("http://download.lycos.com/swadv/AdvResults.asp");
|
||||
|
||||
rt.http_proxy = (proxy_info *) malloc(sizeof(proxy_info));
|
||||
rt.http_proxy->username = strdup("");
|
||||
rt.http_proxy->passwd = strdup("");
|
||||
rt.http_proxy->type = HTTPPROXY;
|
||||
proz_parse_url("localhost:3128", &rt.http_proxy->proxy_url, 0);
|
||||
rt.use_http_proxy = FALSE;
|
||||
|
||||
rt.ftp_proxy = (proxy_info *) malloc(sizeof(proxy_info));
|
||||
rt.ftp_proxy->username = strdup("");
|
||||
rt.ftp_proxy->passwd = strdup("");
|
||||
rt.ftp_proxy->type = HTTPPROXY;
|
||||
proz_parse_url("localhost:3128", &rt.ftp_proxy->proxy_url, 0);
|
||||
rt.use_ftp_proxy = FALSE;
|
||||
rt.http_no_cache = FALSE;
|
||||
rt.timeout.tv_sec = 90;
|
||||
rt.timeout.tv_usec = 0;
|
||||
rt.use_ftpsearch=FALSE;
|
||||
rt.ftpsearch_server_id = 0;
|
||||
/*Set the values necessary for libprozilla */
|
||||
set_runtime_values();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*This sets the runtime values to libprozilla from the runtime structure */
|
||||
void set_runtime_values()
|
||||
{
|
||||
struct timeval tv;
|
||||
|
||||
proz_set_connection_timeout(&rt.timeout);
|
||||
tv.tv_sec = rt.retry_delay;
|
||||
tv.tv_usec = 0;
|
||||
proz_set_connection_retry_delay(&tv);
|
||||
libprozrtinfo.ftp_use_pasv = rt.ftp_use_pasv;
|
||||
libprozrtinfo.http_no_cache = rt.http_no_cache;
|
||||
proz_set_output_dir(rt.output_dir);
|
||||
/*FIXME */
|
||||
proz_set_download_dir(rt.output_dir);
|
||||
proz_set_logfile_dir(rt.logfile_dir);
|
||||
|
||||
proz_set_http_proxy(rt.http_proxy);
|
||||
proz_use_http_proxy(rt.use_http_proxy);
|
||||
proz_set_ftp_proxy(rt.ftp_proxy);
|
||||
proz_use_ftp_proxy(rt.use_ftp_proxy);
|
||||
|
||||
libprozrtinfo.max_bps_per_dl = rt.max_bps_per_dl;
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
/* Declarations for initialising runtime variables
|
||||
|
||||
Copyright (C) 2000 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
|
||||
#ifndef INIT_H
|
||||
#define INIT_H
|
||||
|
||||
|
||||
/*Initialises the default runtime values */
|
||||
void set_defaults(int *argc, char ***argv);
|
||||
void set_runtime_values();
|
||||
#endif
|
||||
+508
@@ -0,0 +1,508 @@
|
||||
/******************************************************************************
|
||||
fltk prozilla - a front end for prozilla, a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <FL/Fl.H>
|
||||
#include <FL/Fl_Window.H>
|
||||
#include <FL/Fl_Box.H>
|
||||
#include <FL/Fl_Group.H> // Fl_Group header file
|
||||
#include <FL/fl_ask.H> // FLTK convenience functions
|
||||
#include <FL/Fl_Menu_Bar.H>
|
||||
#include <FL/Fl_Input.H>
|
||||
#include <FL/Fl_Output.H>
|
||||
#include <FL/Fl_Browser.H>
|
||||
#include <FL/fl_draw.H>
|
||||
#include <FL/Fl_Hold_Browser.H>
|
||||
#include <FL/x.H>
|
||||
|
||||
# ifdef HAVE_LIBXPM
|
||||
# include <X11/xpm.h>
|
||||
# include "images/Pz12.xpm"
|
||||
# endif
|
||||
|
||||
|
||||
#include "prozilla.h"
|
||||
|
||||
#include "download_win.h"
|
||||
#include "main.h"
|
||||
#include "init.h"
|
||||
#include "we.h"
|
||||
#include "options.h"
|
||||
#include "prefs.h"
|
||||
#include "getopt.h"
|
||||
#include "savefile.h"
|
||||
|
||||
struct runtime rt;
|
||||
Fl_Hold_Browser *browser = 0;
|
||||
|
||||
|
||||
/* structure for options parsing,
|
||||
currently doesnt contain anything
|
||||
*/
|
||||
|
||||
struct option long_opts[] = {
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
|
||||
void open_new_dl_win(urlinfo * url_data, boolean ftpsearch);
|
||||
void menu_download_start();
|
||||
void menu_download_stop();
|
||||
void menu_download_remove();
|
||||
|
||||
class Main_Window:public Fl_Window {
|
||||
public:
|
||||
Main_Window::Main_Window(int w, int h, const char *l);
|
||||
int handle(int);
|
||||
|
||||
};
|
||||
|
||||
Main_Window::Main_Window(int w, int h, const char *l):Fl_Window(w, h, l)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int Main_Window::handle(int e)
|
||||
{
|
||||
|
||||
if (e == FL_PASTE)
|
||||
{
|
||||
// printf("%s\n", Fl::event_text());
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (Fl_Window::handle(e))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Main_Window *window;
|
||||
Fl_Window *url_input_win;
|
||||
|
||||
|
||||
DL_Window **dl_wins = NULL;
|
||||
int num_dl_wins = 0;
|
||||
|
||||
Fl_Menu_Bar *menubar;
|
||||
//Fl_Input *new_url;
|
||||
//Fl_Output *t1;
|
||||
|
||||
|
||||
void ms(const char *msg, void *cb_data)
|
||||
{
|
||||
|
||||
DL_Window *win = (DL_Window *) cb_data;
|
||||
win->browser->add(msg, 0);
|
||||
if (win->browser->size() > 0)
|
||||
win->browser->bottomline(win->browser->size());
|
||||
|
||||
}
|
||||
|
||||
|
||||
void info_callback(void *)
|
||||
{
|
||||
|
||||
int i;
|
||||
|
||||
// Fl::paste(*window);
|
||||
|
||||
for (i = 0; i < num_dl_wins; i++)
|
||||
{
|
||||
dl_wins[i]->my_cb();
|
||||
}
|
||||
|
||||
Fl::repeat_timeout(0.05, info_callback, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void open_new_url()
|
||||
{
|
||||
|
||||
in_url->value("");
|
||||
do_ftpsearch_button->value(rt.use_ftpsearch==TRUE?1:0);
|
||||
url_input_win->show();
|
||||
/*
|
||||
val = fl_input(_("Enter URL (CTRL+V to paste from clipboard)"), 0);
|
||||
if (val == 0)
|
||||
{
|
||||
return;
|
||||
// User entered a string - go find it!
|
||||
// strcpy(search, val);
|
||||
// find2_cb();
|
||||
// t1->value(val);
|
||||
}
|
||||
|
||||
err = proz_parse_url(val, url_data, 0);
|
||||
if (err != URLOK)
|
||||
{
|
||||
fl_message(_("%s does not seem to be a valid URL"), val);
|
||||
return;
|
||||
}
|
||||
open_new_dl_win(url_data);
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
void paste_new_url(char *url)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void open_new_dl_win(urlinfo * url_data, boolean ftpsearch)
|
||||
{
|
||||
num_dl_wins++;
|
||||
dl_wins =
|
||||
(DL_Window **) realloc(dl_wins,
|
||||
(sizeof(DL_Window **) * num_dl_wins));
|
||||
|
||||
dl_wins[num_dl_wins - 1] =
|
||||
new DL_Window(url_data, FL_DOWN_BOX, 70, 70, "");
|
||||
|
||||
dl_wins[num_dl_wins - 1]->label(strdup(url_data->url));
|
||||
|
||||
dl_wins[num_dl_wins - 1]->show();
|
||||
|
||||
/*Search and see if DL is already in list */
|
||||
boolean in_list=FALSE;
|
||||
|
||||
for (int i=0;i<browser->size();i++)
|
||||
{
|
||||
if(strcmp(url_data->url, browser->text(i+1))==0)
|
||||
{
|
||||
in_list=TRUE;
|
||||
}
|
||||
}
|
||||
if(in_list==FALSE)
|
||||
{
|
||||
/*Add the URL to the browser if not already in list*/
|
||||
browser->add(url_data->url, 0);
|
||||
}
|
||||
|
||||
dl_wins[num_dl_wins - 1]->dl_start(4, ftpsearch);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void show_prefs()
|
||||
{
|
||||
pref_panel_setup();
|
||||
rt.prefs_win->show();
|
||||
}
|
||||
|
||||
void show_about()
|
||||
{
|
||||
win_about->show();
|
||||
}
|
||||
|
||||
|
||||
void quit_cb(Fl_Widget *, void *)
|
||||
{
|
||||
create_savefile(browser);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
/*Callback for the ok button that appears in the open new url dialog*/
|
||||
void cb_url_input_ok(Fl_Return_Button * button, void *data)
|
||||
{
|
||||
uerr_t err;
|
||||
urlinfo *url_data;
|
||||
|
||||
url_data = (urlinfo *) malloc(sizeof(urlinfo));
|
||||
memset(url_data, 0, sizeof(urlinfo));
|
||||
|
||||
err = proz_parse_url(in_url->value(), url_data, 0);
|
||||
if (err != URLOK)
|
||||
{
|
||||
fl_message(_("%s does not seem to be a valid URL"), in_url->value());
|
||||
return;
|
||||
}
|
||||
|
||||
/*Search and see if DL is already in list */
|
||||
|
||||
for (int i=0;i<browser->size();i++)
|
||||
{
|
||||
if(strcmp(url_data->url, browser->text(i+1))==0)
|
||||
{
|
||||
fl_message(_("%s is already in the list of downloads"), in_url->value());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*Search and se eif DL is already running*/
|
||||
for (int i = 0; i < num_dl_wins; i++)
|
||||
{
|
||||
if(strcmp( url_data->url,dl_wins[i]->u.url)==0)
|
||||
{
|
||||
if(dl_wins[i]->status!= DL_ABORTED &&
|
||||
dl_wins[i]->status!=DL_FATALERR &&
|
||||
dl_wins[i]->status!=DL_IDLING)
|
||||
{
|
||||
fl_message(_("%s is already running!"), in_url->value());
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (strlen(url_data->file) == 0)
|
||||
{
|
||||
fl_message(_
|
||||
("%s contains just a hostname, it does not contain a file to download!"),
|
||||
url_data->url);
|
||||
return;
|
||||
}
|
||||
|
||||
open_new_dl_win(url_data, do_ftpsearch_button->value());
|
||||
|
||||
url_input_win->hide();
|
||||
|
||||
}
|
||||
|
||||
/*Callback for the cancel button that appears in the open new url dialog*/
|
||||
void cb_url_input_cancel(Fl_Button * button, void *data)
|
||||
{
|
||||
url_input_win->hide();
|
||||
}
|
||||
|
||||
|
||||
void cb_main_win(Fl_Window * widget, void *)
|
||||
{
|
||||
quit_cb(widget, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* kov: FIXME?:
|
||||
I brought this here because it was not being affected by gettext
|
||||
*/
|
||||
Fl_Menu_Item menuitems[] = {
|
||||
{_("&File"), FL_CTRL + 'F', 0, 0, FL_SUBMENU},
|
||||
{_("&New URL"), FL_CTRL + 'N', (Fl_Callback *) open_new_url,
|
||||
(void *) 0},
|
||||
{_("&Preferences"), FL_CTRL + 'P', (Fl_Callback *) show_prefs,
|
||||
(void *) 0},
|
||||
{_("&Quit"), FL_CTRL + 'q', quit_cb, (void *) 0},
|
||||
{0},
|
||||
{_("&Download"), FL_CTRL + 'D', 0, 0, FL_SUBMENU},
|
||||
{_("&Start"), FL_CTRL + 'S', (Fl_Callback *) menu_download_start, (void *) 0, FL_MENU_INACTIVE},
|
||||
{_("&Stop"), FL_CTRL + 'P', (Fl_Callback *) menu_download_stop, (void *) 0, FL_MENU_INACTIVE},
|
||||
{_("&Remove from list"), FL_CTRL + 'R', (Fl_Callback *) menu_download_remove, (void *) 0, FL_MENU_INACTIVE},
|
||||
{0},
|
||||
{_("&Help"), FL_CTRL + 'H', 0, 0, FL_SUBMENU},
|
||||
{_("&About"), FL_CTRL + 'A', (Fl_Callback *) show_about, (void *) 0},
|
||||
{0},
|
||||
{0}
|
||||
};
|
||||
|
||||
|
||||
void menu_download_start()
|
||||
{
|
||||
int select=browser->value();
|
||||
boolean running=FALSE;
|
||||
|
||||
int i;
|
||||
/*Search and se eif DL is in list */
|
||||
for ( i = 0; i < num_dl_wins; i++)
|
||||
{
|
||||
if(strcmp(dl_wins[i]->u.url, browser->text(select))==0)
|
||||
{
|
||||
if(dl_wins[i]->status!= DL_ABORTED &&
|
||||
dl_wins[i]->status!=DL_FATALERR &&
|
||||
dl_wins[i]->status!=DL_IDLING)
|
||||
running=TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if(running==TRUE)
|
||||
{
|
||||
/*what to do if it is in the list of already started dl's */
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*Ok lets start it then */
|
||||
uerr_t err;
|
||||
urlinfo *url_data;
|
||||
|
||||
url_data = (urlinfo *) malloc(sizeof(urlinfo));
|
||||
memset(url_data, 0, sizeof(urlinfo));
|
||||
|
||||
err = proz_parse_url(browser->text(select), url_data, 0);
|
||||
if (err != URLOK)
|
||||
{
|
||||
fl_message(_("%s does not seem to be a valid URL"), in_url->value());
|
||||
return;
|
||||
}
|
||||
|
||||
if (strlen(url_data->file) == 0)
|
||||
{
|
||||
fl_message(_
|
||||
("%s contains just a hostname, it does not contain a file to download!"),
|
||||
url_data->url);
|
||||
return;
|
||||
}
|
||||
|
||||
open_new_dl_win(url_data, rt.use_ftpsearch);
|
||||
}
|
||||
}
|
||||
|
||||
void menu_download_stop()
|
||||
{
|
||||
int select=browser->value();
|
||||
}
|
||||
|
||||
void menu_download_remove()
|
||||
{
|
||||
int select=browser->value();
|
||||
browser->remove(select);
|
||||
menuitems[6].deactivate();
|
||||
menuitems[7].deactivate();
|
||||
menuitems[8].deactivate();
|
||||
}
|
||||
|
||||
void browser_cb(Fl_Widget * o, void *)
|
||||
{
|
||||
/* printf("callback, selection = %d, event_clicks = %d\n",
|
||||
((Fl_Browser*)o)->value(), Fl::event_clicks()); */
|
||||
/* Now to enable the menus */
|
||||
|
||||
int value=((Fl_Browser*)o)->value();
|
||||
|
||||
if(value==0)
|
||||
{
|
||||
/*Check and enable the menus appropriately */
|
||||
menuitems[6].deactivate();
|
||||
// menuitems[7].deactivate();
|
||||
menuitems[8].deactivate();
|
||||
}
|
||||
|
||||
if(value>0)
|
||||
{
|
||||
/*Check and enable the menus appropriately */
|
||||
menuitems[6].activate();
|
||||
// menuitems[7].activate();
|
||||
menuitems[8].activate();
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int c;
|
||||
#ifndef FL_NORMAL_SIZE
|
||||
FL_NORMAL_SIZE = 12;
|
||||
#endif
|
||||
|
||||
/* kov:
|
||||
This function has to come before the gettext stuff
|
||||
as it is making it ineffective
|
||||
*/
|
||||
proz_init(argc, argv);
|
||||
|
||||
/* Gettext stuff */
|
||||
setlocale(LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
textdomain(PACKAGE);
|
||||
|
||||
set_defaults(&argc, &argv);
|
||||
load_prefs();
|
||||
set_runtime_values();
|
||||
|
||||
/*delete the ~/.prozilla/debug.log file if present at the start of each run */
|
||||
proz_debug_delete_log();
|
||||
|
||||
/*Parse options */
|
||||
while ((c = getopt_long(argc, argv, "", long_opts, NULL)) != EOF)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
default:
|
||||
printf(_("Error: Invalid option\n"));
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
window = new Main_Window(500, 340, _("Prozilla - Download Accelerator"));
|
||||
|
||||
#ifdef HAVE_LIBXPM // X11 w/Xpm library
|
||||
fl_open_display();
|
||||
Pixmap pixmap, mask; // Icon pixmaps
|
||||
XpmAttributes attrs; // Attributes of icon
|
||||
|
||||
memset(&attrs, 0, sizeof(attrs));
|
||||
|
||||
XpmCreatePixmapFromData(fl_display, DefaultRootWindow(fl_display),
|
||||
Pz12_xpm, &pixmap, &mask, &attrs);
|
||||
window->icon((char *) pixmap);
|
||||
|
||||
#endif
|
||||
|
||||
Fl_Menu_Bar *menubar = new Fl_Menu_Bar(0, 0, 640, 30);
|
||||
menubar->labelfont(FL_TIMES);
|
||||
|
||||
{
|
||||
//NOTE Removed the menu to place above...
|
||||
|
||||
menubar->menu(menuitems);
|
||||
}
|
||||
|
||||
/*The browser window */
|
||||
browser = new Fl_Hold_Browser(2, 250, 495, 80);
|
||||
browser->callback(browser_cb);
|
||||
load_savefile(browser);
|
||||
rt.prefs_win = make_prefs_win();
|
||||
win_about = make_about_win();
|
||||
window->callback((Fl_Callback *) cb_main_win, 0);
|
||||
window->show(1, argv);
|
||||
|
||||
url_input_win = make_url_input_win();
|
||||
|
||||
/* we will now see whether the user has specfied any urls in the command line and add them */
|
||||
for (int i = optind; i < argc; i++)
|
||||
{
|
||||
uerr_t err;
|
||||
urlinfo *url_data;
|
||||
url_data = (urlinfo *) malloc(sizeof(urlinfo));
|
||||
memset(url_data, 0, sizeof(urlinfo));
|
||||
|
||||
err = proz_parse_url(argv[i], url_data, 0);
|
||||
if (err != URLOK)
|
||||
{
|
||||
printf(_("%s does not seem to be a valid URL"), argv[optind]);
|
||||
proz_debug("%s does not seem to be a valid URL", argv[optind]);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
open_new_dl_win(url_data,rt.use_ftpsearch);
|
||||
}
|
||||
|
||||
Fl::add_timeout(0.4, info_callback, 0);
|
||||
return Fl::run();
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
|
||||
#ifndef MAIN_H
|
||||
#define MAIN_H
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <FL/Fl_Window.H>
|
||||
#include "prozilla.h"
|
||||
|
||||
/* Gettext */
|
||||
#include <libintl.h>
|
||||
#define _(String) dgettext (PACKAGE,String)
|
||||
#define gettext_noop(String) (String)
|
||||
#ifndef HAVE_GNOME
|
||||
#define N_(String) gettext_noop (String)
|
||||
#endif
|
||||
/* Gettext */
|
||||
|
||||
|
||||
/*We will have a runtime structure for this program */
|
||||
|
||||
#define PRZCONFDIR ".prozilla"
|
||||
|
||||
struct runtime {
|
||||
int num_connections;
|
||||
int max_redirections;
|
||||
/*
|
||||
* whether to use the netrc file
|
||||
*/
|
||||
int use_netrc;
|
||||
int ftp_use_pasv;
|
||||
int max_attempts;
|
||||
int retry_delay; /*delay in seconds */
|
||||
/*
|
||||
* The timeout period for the connections
|
||||
*/
|
||||
struct timeval timeout;
|
||||
int debug_mode;
|
||||
int ftp_search;
|
||||
int force_mode;
|
||||
/* The maximum number of servers to ping at once */
|
||||
int max_simul_pings;
|
||||
/* The max number of seconds to wait for a server response to ping */
|
||||
int max_ping_wait;
|
||||
/* The maximum number of servers/mirrors to request */
|
||||
int ftps_mirror_req_n;
|
||||
long max_bps_per_dl;
|
||||
/* The dir to save the generated file in */
|
||||
char *output_dir;
|
||||
/*The directory where the Dl'ed portions are stored */
|
||||
char *dl_dir;
|
||||
char *logfile_dir;
|
||||
char *home_dir;
|
||||
/*The dir where the config files are stored */
|
||||
char *config_dir;
|
||||
Fl_Window *prefs_win;
|
||||
proxy_info *ftp_proxy;
|
||||
proxy_info *http_proxy;
|
||||
int use_http_proxy;
|
||||
int use_ftp_proxy;
|
||||
int http_no_cache;
|
||||
int use_ftpsearch;
|
||||
int ftpsearch_server_id;
|
||||
};
|
||||
|
||||
extern struct runtime rt;
|
||||
|
||||
#endif
|
||||
+259
@@ -0,0 +1,259 @@
|
||||
/******************************************************************************
|
||||
fltk prozilla - a front end for prozilla, a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <FL/fl_ask.H>
|
||||
#include <FL/filename.H>
|
||||
#include "main.h"
|
||||
#include "init.h"
|
||||
#include "options.h"
|
||||
#include "we.h"
|
||||
#include "prefs.h"
|
||||
|
||||
void pref_panel_setup()
|
||||
{
|
||||
char buf[1000];
|
||||
// sprintf(buf, "%d", rt.num_connections);
|
||||
threads_in->value((double) rt.num_connections);
|
||||
|
||||
sprintf(buf, "%d", rt.retry_delay);
|
||||
retry_delay_in->value(buf);
|
||||
|
||||
snprintf(buf, 1000, "%d", (int) rt.timeout.tv_sec);
|
||||
in_timeout->value(buf);
|
||||
|
||||
in_pasv_button->value(rt.ftp_use_pasv);
|
||||
in_no_cache_button->value(rt.http_no_cache);
|
||||
in_outputdir->value(rt.output_dir);
|
||||
|
||||
snprintf(buf, 1000, "%.2f", (float) rt.max_bps_per_dl / 1024);
|
||||
in_bps_per_dl->value(buf);
|
||||
|
||||
in_http_proxy_host->value(rt.http_proxy->proxy_url.host);
|
||||
snprintf(buf, 1000, "%d", rt.http_proxy->proxy_url.port);
|
||||
in_http_proxy_port->value(buf);
|
||||
|
||||
in_http_proxy_user->value(rt.http_proxy->username);
|
||||
in_http_proxy_passwd->value(rt.http_proxy->passwd);
|
||||
|
||||
in_ftp_proxy_host->value(rt.ftp_proxy->proxy_url.host);
|
||||
sprintf(buf, "%d", rt.ftp_proxy->proxy_url.port);
|
||||
in_ftp_proxy_port->value(buf);
|
||||
in_ftp_proxy_user->value(rt.ftp_proxy->username);
|
||||
in_ftp_proxy_passwd->value(rt.ftp_proxy->passwd);
|
||||
in_ftp_proxy_type->value(rt.ftp_proxy->type);
|
||||
|
||||
if (rt.use_http_proxy == FALSE && rt.use_ftp_proxy == FALSE)
|
||||
{
|
||||
in_direct_conn_button->value(1);
|
||||
in_use_proxy_button->value(0);
|
||||
gr_proxy_grp->deactivate();
|
||||
} else
|
||||
{
|
||||
in_direct_conn_button->value(0);
|
||||
in_use_proxy_button->value(1);
|
||||
gr_proxy_grp->activate();
|
||||
}
|
||||
// sprintf(buf, "%d", rt.http_proxy->proxy_url.port);
|
||||
|
||||
rt.use_http_proxy ==
|
||||
TRUE ? in_use_http_proxy->value(1) : in_use_http_proxy->value(0);
|
||||
rt.use_ftp_proxy ==
|
||||
TRUE ? in_use_ftp_proxy->value(1) : in_use_ftp_proxy->value(0);
|
||||
|
||||
|
||||
rt.use_ftpsearch==TRUE?in_use_ftpsearch_button->value(1):in_use_ftpsearch_button->value(0);
|
||||
;
|
||||
mirrors_in->value((double) rt.ftps_mirror_req_n);
|
||||
snprintf(buf, 1000, "%d", (int) rt.max_ping_wait);
|
||||
in_ping_timeout->value(buf);
|
||||
|
||||
in_simul_pings->value((double) rt.max_simul_pings);
|
||||
|
||||
ftps_server_choice->value(rt.ftpsearch_server_id);
|
||||
}
|
||||
|
||||
|
||||
int pref_panel_set_values()
|
||||
{
|
||||
char *url_str;
|
||||
urlinfo url_data;
|
||||
uerr_t err;
|
||||
|
||||
//FIXME do a check here before setting value
|
||||
rt.num_connections = (int) threads_in->value();
|
||||
rt.retry_delay = atoi(retry_delay_in->value());
|
||||
|
||||
rt.timeout.tv_sec = atoi(in_timeout->value());
|
||||
rt.timeout.tv_usec = 0;
|
||||
|
||||
rt.max_bps_per_dl = (long) (atof(in_bps_per_dl->value()) * 1024);
|
||||
|
||||
if (rt.max_bps_per_dl < 0)
|
||||
{
|
||||
rt.max_bps_per_dl = 0;
|
||||
}
|
||||
|
||||
rt.ftp_use_pasv = in_pasv_button->value();
|
||||
rt.http_no_cache = in_no_cache_button->value();
|
||||
|
||||
char *abs_out_dir = (char *) malloc(PATH_MAX);
|
||||
fl_filename_expand(abs_out_dir, in_outputdir->value());
|
||||
fl_filename_absolute(abs_out_dir, abs_out_dir);
|
||||
|
||||
// filename_absolute(abs_out_dir, in_outputdir->value());
|
||||
/*Check and see whether the directory is valid */
|
||||
if (fl_filename_isdir(abs_out_dir) == 0)
|
||||
{
|
||||
fl_message(_("%s does not seem to be a valid directory"), abs_out_dir);
|
||||
free(abs_out_dir);
|
||||
return 0;
|
||||
} else
|
||||
{
|
||||
free(rt.output_dir);
|
||||
rt.output_dir = strdup(abs_out_dir);
|
||||
/*FIXME currently rt._dl_dir == rt.output_dir */
|
||||
free(rt.dl_dir);
|
||||
rt.dl_dir = strdup(abs_out_dir);
|
||||
}
|
||||
free(abs_out_dir);
|
||||
|
||||
url_str =
|
||||
(char *) malloc(strlen(in_http_proxy_host->value()) + 1 +
|
||||
strlen(in_http_proxy_port->value()) + 1);
|
||||
|
||||
sprintf(url_str, "%s:%s", in_http_proxy_host->value(),
|
||||
in_http_proxy_port->value());
|
||||
|
||||
err = proz_parse_url(url_str, &url_data, 0);
|
||||
if (err != URLOK)
|
||||
{
|
||||
fl_message(_("%s does not seem to be a valid HTTP proxy value"),
|
||||
url_str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
proz_free_url(&rt.http_proxy->proxy_url, 0);
|
||||
free(url_str);
|
||||
memcpy(&rt.http_proxy->proxy_url, &url_data, sizeof(url_data));
|
||||
|
||||
|
||||
/*copy the http proxy username and password */
|
||||
free(rt.http_proxy->username);
|
||||
rt.http_proxy->username = strdup(in_http_proxy_user->value());
|
||||
free(rt.http_proxy->passwd);
|
||||
rt.http_proxy->passwd = strdup(in_http_proxy_passwd->value());
|
||||
|
||||
rt.use_http_proxy = in_use_http_proxy->value() == 1 ? TRUE : FALSE;
|
||||
|
||||
url_str =
|
||||
(char *) malloc(strlen(in_ftp_proxy_host->value()) + 1 +
|
||||
strlen(in_ftp_proxy_port->value()) + 1);
|
||||
|
||||
sprintf(url_str, "%s:%s", in_ftp_proxy_host->value(),
|
||||
in_ftp_proxy_port->value());
|
||||
|
||||
err = proz_parse_url(url_str, &url_data, 0);
|
||||
if (err != URLOK)
|
||||
{
|
||||
fl_message(_("%s does not seem to be a valid FTP proxy value"),
|
||||
url_str);
|
||||
return 0;
|
||||
}
|
||||
memcpy(&rt.ftp_proxy->proxy_url, &url_data, sizeof(url_data));
|
||||
|
||||
free(url_str);
|
||||
|
||||
/*copy the ftp proxy username and password */
|
||||
free(rt.ftp_proxy->username);
|
||||
rt.ftp_proxy->username = strdup(in_ftp_proxy_user->value());
|
||||
free(rt.ftp_proxy->passwd);
|
||||
rt.ftp_proxy->passwd = strdup(in_ftp_proxy_passwd->value());
|
||||
rt.ftp_proxy->type = (enum proxy_type) in_ftp_proxy_type->value();
|
||||
rt.use_ftp_proxy = in_use_ftp_proxy->value() == 1 ? TRUE : FALSE;
|
||||
|
||||
|
||||
rt.ftps_mirror_req_n =(int) mirrors_in->value();
|
||||
rt.max_simul_pings = (int) in_simul_pings->value();
|
||||
rt.max_ping_wait = atoi(in_ping_timeout->value());
|
||||
|
||||
if(rt.max_ping_wait >120)
|
||||
rt.max_ping_wait=120;
|
||||
if(rt.max_ping_wait <0)
|
||||
rt.max_ping_wait=1;
|
||||
|
||||
in_use_ftpsearch_button->value()==1?rt.use_ftpsearch=TRUE:rt.use_ftpsearch=FALSE;
|
||||
|
||||
rt.ftpsearch_server_id = ftps_server_choice->value();
|
||||
/*Set the values necessary for libprozilla */
|
||||
set_runtime_values();
|
||||
return 1;
|
||||
}
|
||||
|
||||
void cb_prefs_ok(Fl_Button *, void *)
|
||||
{
|
||||
if (pref_panel_set_values() == 1)
|
||||
rt.prefs_win->hide();
|
||||
save_prefs();
|
||||
}
|
||||
|
||||
|
||||
void cb_prefs_cancel(Fl_Button *, void *)
|
||||
{
|
||||
rt.prefs_win->hide();
|
||||
}
|
||||
|
||||
|
||||
void cb_prefs_tab(Fl_Tabs * tabs, void *)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void cb_prefs_conn(Fl_Check_Button * button, void *)
|
||||
{
|
||||
if (button->value() == 1)
|
||||
{
|
||||
in_use_http_proxy->value(0);
|
||||
in_use_ftp_proxy->value(0);
|
||||
gr_proxy_grp->deactivate();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void cb_prefs_use_proxy(Fl_Check_Button * button, void *)
|
||||
{
|
||||
|
||||
if (button->value() == 1)
|
||||
{
|
||||
gr_proxy_grp->activate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void cb_about_ok(Fl_Button * button, void *)
|
||||
{
|
||||
win_about->hide();
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
#ifndef OPTIONS_H
|
||||
#define OPTIONS_H
|
||||
|
||||
#include <string.h>
|
||||
#include "main.h"
|
||||
|
||||
void pref_panel_setup();
|
||||
#endif
|
||||
+532
@@ -0,0 +1,532 @@
|
||||
/******************************************************************************
|
||||
fltk prozilla - a front end for prozilla, a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "prozilla.h"
|
||||
#include "main.h"
|
||||
#include "prefs.h"
|
||||
|
||||
|
||||
typedef void (*prefproc) (int i, const char *const, FILE * const fp);
|
||||
|
||||
typedef struct prefopt_t {
|
||||
const char *varname;
|
||||
prefproc proc;
|
||||
int visible;
|
||||
} prefopt_t;
|
||||
|
||||
void set_num_threads(int, const char *const, FILE * const);
|
||||
void set_max_attempts(int, const char *const, FILE * const);
|
||||
|
||||
void set_max_bps_per_dl(int, const char *const, FILE * const);
|
||||
|
||||
void set_use_pasv(int, const char *const, FILE * const);
|
||||
void set_retry_delay(int, const char *const, FILE * const);
|
||||
void set_conn_timeout(int, const char *const, FILE * const);
|
||||
void set_debug_mode(int, const char *const, FILE * const);
|
||||
void set_http_no_cache(int, const char *const, FILE * const);
|
||||
void set_output_dir(int i, const char *const val, FILE * const fp);
|
||||
|
||||
void set_http_proxy(int i, const char *const val, FILE * const fp);
|
||||
void set_http_proxy_username(int i, const char *const val,
|
||||
FILE * const fp);
|
||||
void set_http_proxy_passwd(int i, const char *const val, FILE * const fp);
|
||||
void set_http_use_proxy(int i, const char *const val, FILE * const fp);
|
||||
void set_http_proxy_type(int i, const char *const val, FILE * const fp);
|
||||
|
||||
void set_ftp_proxy(int i, const char *const val, FILE * const fp);
|
||||
void set_ftp_proxy_username(int i, const char *const val, FILE * const fp);
|
||||
void set_ftp_proxy_passwd(int i, const char *const val, FILE * const fp);
|
||||
void set_ftp_use_proxy(int i, const char *const val, FILE * const fp);
|
||||
void set_ftp_proxy_type(int i, const char *const val, FILE * const fp);
|
||||
void set_mirrors_req(int i, const char *const val, FILE * const fp);
|
||||
void set_max_simul_pings(int i, const char *const val, FILE * const fp);
|
||||
void set_max_ping_wait(int i, const char *const val, FILE * const fp);
|
||||
void set_use_ftpsearch(int, const char *const, FILE * const);
|
||||
void set_ftpsearch_server_id(int i, const char *const val, FILE * const fp);
|
||||
/*TODO add saving the proxy locations too*/
|
||||
|
||||
|
||||
prefopt_t pref_opts[] = {
|
||||
{"threads", set_num_threads, 1},
|
||||
{"tries", set_max_attempts, 1},
|
||||
{"pasv", set_use_pasv, 1},
|
||||
{"retrydelay", set_retry_delay, 1},
|
||||
{"conntimeout", set_conn_timeout, 1},
|
||||
{"maxbpsperdl", set_max_bps_per_dl, 1},
|
||||
{"debug", set_debug_mode, 1},
|
||||
{"pragmanocache", set_http_no_cache, 1},
|
||||
{"outputdir", set_output_dir, 1},
|
||||
{"httpproxy", set_http_proxy, 1},
|
||||
{"httpproxyuser", set_http_proxy_username, 1},
|
||||
{"httpproxypassword", set_http_proxy_passwd, 1},
|
||||
{"httpproxytype", set_http_proxy_type, 1},
|
||||
{"usehttpproxy", set_http_use_proxy, 1},
|
||||
{"ftpproxy", set_ftp_proxy, 1},
|
||||
{"ftpproxyuser", set_ftp_proxy_username, 1},
|
||||
{"ftpproxypassword", set_ftp_proxy_passwd, 1},
|
||||
{"ftpproxytype", set_ftp_proxy_type, 1},
|
||||
{"useftpproxy", set_ftp_use_proxy, 1},
|
||||
{"mirrorsreq", set_mirrors_req, 1},
|
||||
{"maxsimulpings", set_max_simul_pings, 1},
|
||||
{"maxpingwait", set_max_ping_wait, 1},
|
||||
{"defaultftpsearch", set_use_ftpsearch, 1},
|
||||
{"ftpsearchserverid", set_ftpsearch_server_id, 1},
|
||||
{NULL, 0, 0}
|
||||
};
|
||||
|
||||
void set_num_threads(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%d", rt.num_connections);
|
||||
} else
|
||||
{
|
||||
rt.num_connections = atoi(val);
|
||||
if (rt.num_connections <= 0 || rt.num_connections > 30)
|
||||
rt.num_connections = 4;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void set_max_attempts(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%d", rt.max_attempts);
|
||||
} else
|
||||
{
|
||||
rt.max_attempts = atoi(val);
|
||||
if (rt.max_attempts < 0)
|
||||
rt.max_attempts = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void set_retry_delay(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%d", rt.retry_delay);
|
||||
} else
|
||||
{
|
||||
rt.retry_delay = atoi(val);
|
||||
if (rt.retry_delay < 0)
|
||||
rt.retry_delay = 15;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void set_conn_timeout(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%d", (int) rt.timeout.tv_sec);
|
||||
} else
|
||||
{
|
||||
rt.timeout.tv_sec = atoi(val);
|
||||
rt.timeout.tv_usec = 0;
|
||||
|
||||
if (rt.timeout.tv_sec < 0)
|
||||
rt.timeout.tv_sec = 90;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void set_max_bps_per_dl(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%d", (int) rt.max_bps_per_dl);
|
||||
} else
|
||||
{
|
||||
rt.max_bps_per_dl = atoi(val);
|
||||
|
||||
if (rt.max_bps_per_dl < 0)
|
||||
rt.max_bps_per_dl = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void set_use_pasv(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%d", rt.ftp_use_pasv);
|
||||
} else
|
||||
{
|
||||
rt.ftp_use_pasv = atoi(val);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void set_debug_mode(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%d", rt.debug_mode);
|
||||
} else
|
||||
{
|
||||
rt.debug_mode = atoi(val);
|
||||
}
|
||||
}
|
||||
|
||||
void set_http_no_cache(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%d", rt.http_no_cache);
|
||||
} else
|
||||
{
|
||||
rt.http_no_cache = atoi(val);
|
||||
}
|
||||
}
|
||||
|
||||
void set_output_dir(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%s", rt.output_dir);
|
||||
} else
|
||||
{
|
||||
free(rt.output_dir);
|
||||
rt.output_dir = strdup(val);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void set_http_proxy(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
|
||||
uerr_t err;
|
||||
urlinfo url_data;
|
||||
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%s:%d", rt.http_proxy->proxy_url.host,
|
||||
rt.http_proxy->proxy_url.port);
|
||||
} else
|
||||
{
|
||||
err = proz_parse_url(val, &url_data, 0);
|
||||
if (err != URLOK)
|
||||
{
|
||||
proz_debug("%s does not seem to be a valid proxy value", val);
|
||||
return;
|
||||
}
|
||||
proz_free_url(&rt.http_proxy->proxy_url, 0);
|
||||
memcpy(&rt.http_proxy->proxy_url, &url_data, sizeof(url_data));
|
||||
}
|
||||
}
|
||||
|
||||
void set_http_proxy_username(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%s", rt.http_proxy->username);
|
||||
} else
|
||||
{
|
||||
free(rt.http_proxy->username);
|
||||
rt.http_proxy->username = strdup(val);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void set_http_proxy_passwd(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%s", rt.http_proxy->passwd);
|
||||
} else
|
||||
{
|
||||
free(rt.http_proxy->passwd);
|
||||
rt.http_proxy->passwd = strdup(val);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void set_http_proxy_type(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%d", (int) rt.http_proxy->type);
|
||||
} else
|
||||
{
|
||||
rt.http_proxy->type = (proxy_type) atoi(val);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void set_http_use_proxy(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%d", rt.use_http_proxy);
|
||||
} else
|
||||
{
|
||||
rt.use_http_proxy = atoi(val);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void set_ftp_proxy(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
|
||||
uerr_t err;
|
||||
urlinfo url_data;
|
||||
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%s:%d", rt.ftp_proxy->proxy_url.host,
|
||||
rt.ftp_proxy->proxy_url.port);
|
||||
} else
|
||||
{
|
||||
err = proz_parse_url(val, &url_data, 0);
|
||||
if (err != URLOK)
|
||||
{
|
||||
proz_debug("%s does not seem to be a valid proxy value", val);
|
||||
return;
|
||||
}
|
||||
proz_free_url(&rt.ftp_proxy->proxy_url, 0);
|
||||
memcpy(&rt.ftp_proxy->proxy_url, &url_data, sizeof(url_data));
|
||||
}
|
||||
}
|
||||
|
||||
void set_ftp_proxy_username(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%s", rt.ftp_proxy->username);
|
||||
} else
|
||||
{
|
||||
free(rt.ftp_proxy->username);
|
||||
rt.ftp_proxy->username = strdup(val);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void set_ftp_proxy_passwd(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%s", rt.ftp_proxy->passwd);
|
||||
} else
|
||||
{
|
||||
free(rt.ftp_proxy->passwd);
|
||||
rt.ftp_proxy->passwd = strdup(val);
|
||||
}
|
||||
}
|
||||
|
||||
void set_ftp_proxy_type(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%d", (int) rt.ftp_proxy->type);
|
||||
} else
|
||||
{
|
||||
rt.ftp_proxy->type = (proxy_type) atoi(val);
|
||||
}
|
||||
}
|
||||
|
||||
void set_ftp_use_proxy(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%d", rt.use_ftp_proxy);
|
||||
} else
|
||||
{
|
||||
rt.use_ftp_proxy = atoi(val);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void set_mirrors_req(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%d", rt.ftps_mirror_req_n);
|
||||
} else
|
||||
{
|
||||
rt.ftps_mirror_req_n = atoi(val);
|
||||
if (rt.ftps_mirror_req_n <= 0 || rt.ftps_mirror_req_n> 1000)
|
||||
rt.ftps_mirror_req_n = 40;
|
||||
}
|
||||
}
|
||||
|
||||
void set_max_simul_pings(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%d", rt.max_simul_pings);
|
||||
} else
|
||||
{
|
||||
rt.max_simul_pings= atoi(val);
|
||||
if (rt.max_simul_pings <= 0 || rt.max_simul_pings> 30)
|
||||
rt.max_simul_pings=5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void set_max_ping_wait(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%d", rt.max_ping_wait);
|
||||
} else
|
||||
{
|
||||
rt.max_ping_wait= atoi(val);
|
||||
if (rt.max_ping_wait <= 0 || rt.max_ping_wait> 30)
|
||||
rt.max_ping_wait=5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void set_use_ftpsearch(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%d", rt.use_ftpsearch);
|
||||
} else
|
||||
{
|
||||
rt.use_ftpsearch = atoi(val);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void set_ftpsearch_server_id(int i, const char *const val, FILE * const fp)
|
||||
{
|
||||
if (fp != NULL)
|
||||
{
|
||||
fprintf(fp, "%d", rt.ftpsearch_server_id);
|
||||
} else
|
||||
{
|
||||
rt.ftpsearch_server_id = atoi(val);
|
||||
if (rt.ftpsearch_server_id < 0)
|
||||
rt.ftpsearch_server_id = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void save_prefs()
|
||||
{
|
||||
char config_fname[PATH_MAX];
|
||||
FILE *fp;
|
||||
int i;
|
||||
|
||||
snprintf(config_fname, PATH_MAX, "%s/.prozilla/%s", rt.home_dir,
|
||||
"prozconfig");
|
||||
|
||||
if ((fp = fopen(config_fname, "wt")) == NULL)
|
||||
{
|
||||
perror("could not save preferences file");
|
||||
proz_debug("could not save preferences file :- %s", strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
fprintf(fp, "%s",
|
||||
"# ProZilla preferences file\n# This file is loaded and OVERWRITTEN each time ProZilla is run.\n# Please try to avoid writing to this file.\n#\n");
|
||||
|
||||
for (i = 0; pref_opts[i].varname != NULL; i++)
|
||||
{
|
||||
fprintf(fp, "%s=", pref_opts[i].varname);
|
||||
(*pref_opts[i].proc) (i, NULL, fp);
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
void load_prefs()
|
||||
{
|
||||
char config_fname[PATH_MAX];
|
||||
FILE *fp;
|
||||
int i;
|
||||
char line[256];
|
||||
char *tok1, *tok2;
|
||||
|
||||
snprintf(config_fname, PATH_MAX, "%s/.prozilla/%s", rt.home_dir,
|
||||
"prozconfig");
|
||||
|
||||
if ((fp = fopen(config_fname, "rt")) == NULL)
|
||||
{
|
||||
|
||||
if (errno == ENOENT) /*Create the file then if it doesnt exist */
|
||||
{
|
||||
save_prefs();
|
||||
return;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
perror("could not open preferences file for reading");
|
||||
proz_debug("could not open preferences file :- %s", strerror(errno));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
line[sizeof(line) - 1] = '\0';
|
||||
while (fgets(line, sizeof(line) - 1, fp) != NULL)
|
||||
{
|
||||
tok1 = strtok(line, " =\t\r\n");
|
||||
if ((tok1 == NULL) || (tok1[0] == '#'))
|
||||
continue;
|
||||
tok2 = strtok(NULL, "\r\n");
|
||||
if (tok2 == NULL)
|
||||
continue;
|
||||
|
||||
for (i = 0; pref_opts[i].varname != NULL; i++)
|
||||
{
|
||||
if (strcmp(tok1, pref_opts[i].varname) == 0)
|
||||
{
|
||||
if (pref_opts[i].proc != NULL)
|
||||
(*pref_opts[i].proc) (i, tok2, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
/******************************************************************************
|
||||
fltk prozilla - a front end for prozilla, a download accelerator library
|
||||
Copyright (C) 2001 Kalum Somaratna
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
******************************************************************************/
|
||||
#ifndef PREFS_H
|
||||
#define PREFS_H
|
||||
void save_prefs();
|
||||
void load_prefs();
|
||||
#endif
|
||||
@@ -0,0 +1,90 @@
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <malloc.h>
|
||||
#include <alloca.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
#include "main.h"
|
||||
#include "savefile.h"
|
||||
#include "download_win.h"
|
||||
#include "dl_win.h"
|
||||
|
||||
|
||||
void create_savefile(Fl_Browser *browser)
|
||||
{
|
||||
FILE *fp;
|
||||
char file_name[PATH_MAX];
|
||||
snprintf(file_name, PATH_MAX, "%s/%s", rt.config_dir, "urls");
|
||||
int num_dls=browser->size();
|
||||
|
||||
if ((fp = fopen(file_name, "wt")) == NULL)
|
||||
{
|
||||
perror("Could not save the list of URLS's");
|
||||
proz_debug("Could not save the list of URLS's :- %s", strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
fprintf(fp, "%d\n", num_dls);
|
||||
|
||||
if(num_dls>0)
|
||||
{
|
||||
for(int i=0; i<num_dls;i++)
|
||||
{
|
||||
fprintf(fp, "%s\n", browser->text(i+1));
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void load_savefile(Fl_Browser *browser)
|
||||
{
|
||||
FILE *fp;
|
||||
char file_name[PATH_MAX];
|
||||
snprintf(file_name, PATH_MAX, "%s/%s", rt.config_dir, "urls");
|
||||
int num_dls=0;
|
||||
|
||||
if ((fp = fopen(file_name, "rt")) == NULL)
|
||||
{
|
||||
perror("Could not open the list of URLS's");
|
||||
proz_debug("Could not open the list of URLS's :- %s", strerror(errno));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
fscanf(fp, "%d\n", &num_dls);
|
||||
|
||||
char *line=(char *)malloc (20000);
|
||||
if(line==0)
|
||||
{
|
||||
printf("Could not allocalte memory");
|
||||
proz_debug("Could not allocalte memory");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if(num_dls>0)
|
||||
{
|
||||
for(int i=0; i<num_dls;i++)
|
||||
{
|
||||
// fgets(line, sizeof(line) - 1, fp);
|
||||
if(fscanf(fp,"%s\n", line)==EOF)
|
||||
{
|
||||
fclose(fp);
|
||||
free(line);
|
||||
proz_debug("Could not read the list of URLS from file!!");
|
||||
return;
|
||||
}
|
||||
browser->add(line);
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
free(line);
|
||||
return;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#ifndef SAVEFILE_H
|
||||
#define SAVEFILE_H
|
||||
|
||||
#include <config.h>
|
||||
#include <FL/Fl_Browser.H>
|
||||
|
||||
#include <FL/Fl_Select_Browser.H>
|
||||
void create_savefile( Fl_Browser *browser);
|
||||
void load_savefile(Fl_Browser *browser);
|
||||
#endif
|
||||
+4682
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,400 @@
|
||||
# data file for the Fltk User Interface Designer (fluid)
|
||||
version 1.0102
|
||||
i18n_type 1
|
||||
i18n_include <libintl.h>
|
||||
i18n_function gettext
|
||||
header_name {.h}
|
||||
code_name {.cxx}
|
||||
Function {make_prefs_win()} {} {
|
||||
Fl_Window win_prefs {
|
||||
label {Prozilla Preferences Panel} open
|
||||
xywh {245 135 475 410} visible
|
||||
} {
|
||||
Fl_Tabs tb_prefs {
|
||||
callback cb_prefs_tab open
|
||||
xywh {20 5 450 370} box UP_BOX
|
||||
} {
|
||||
Fl_Group gr_prefs_general {
|
||||
label General
|
||||
xywh {30 30 440 340} labelfont 1 labelsize 12
|
||||
} {
|
||||
Fl_Group {} {
|
||||
xywh {30 35 430 330} box ENGRAVED_FRAME
|
||||
} {
|
||||
Fl_Input retry_delay_in {
|
||||
xywh {305 75 95 25} type Int labelsize 12 textsize 12
|
||||
}
|
||||
Fl_Counter threads_in {
|
||||
xywh {305 45 50 25} labelsize 12 minimum 1 maximum 30 step 1 value 4 textsize 12
|
||||
code0 {o->type(FL_SIMPLE_COUNTER);}
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Number of Threads:}
|
||||
xywh {60 45 120 25} labelsize 12 align 148
|
||||
}
|
||||
Fl_Input in_timeout {
|
||||
xywh {305 105 95 25} type Int labelsize 12 textsize 12
|
||||
}
|
||||
Fl_Check_Button in_pasv_button {
|
||||
label {Use PASV for FTP transfers (recommended)}
|
||||
xywh {65 135 295 25} down_box DIAMOND_DOWN_BOX labelsize 12 align 148
|
||||
}
|
||||
Fl_Check_Button in_no_cache_button {
|
||||
label {Ask the HTTP proxies not to cache requests between sessions (default is off)}
|
||||
xywh {65 165 345 25} down_box DIAMOND_DOWN_BOX labelsize 12 align 148
|
||||
}
|
||||
Fl_Input in_outputdir {
|
||||
xywh {65 225 355 25} labelsize 12 align 1 textsize 12
|
||||
}
|
||||
Fl_Input in_bps_per_dl {
|
||||
xywh {330 275 95 25} type Float labelsize 11 align 1 textsize 12
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Retry Delay (Sec):}
|
||||
xywh {60 75 210 25} labelsize 12 align 148
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Timeout Period (Sec):}
|
||||
xywh {60 105 210 25} labelsize 12 align 148
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Directory to download the files:}
|
||||
xywh {65 195 340 25} labelsize 12 align 148
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Limit bandwith usage PER download to (Kbps) (0 = unlimited):}
|
||||
xywh {65 250 380 20} labelsize 12 align 148
|
||||
}
|
||||
}
|
||||
}
|
||||
Fl_Group gr_prefs_proxy {
|
||||
label Proxies
|
||||
xywh {30 35 440 335} labelfont 1 labelsize 12 hide
|
||||
} {
|
||||
Fl_Group {} {open
|
||||
xywh {30 35 435 325} box ENGRAVED_BOX
|
||||
} {
|
||||
Fl_Group gr_proxy_grp {open
|
||||
xywh {40 80 420 270} box ENGRAVED_BOX
|
||||
} {
|
||||
Fl_Input in_http_proxy_host {
|
||||
label {Hostname:}
|
||||
xywh {130 115 140 25} labelsize 12 align 132 textsize 12
|
||||
}
|
||||
Fl_Input in_http_proxy_port {
|
||||
label {Port:}
|
||||
xywh {310 115 140 25} type Int labelsize 12 align 132 textsize 12
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {HTTP Proxy:}
|
||||
xywh {45 90 85 25} labelfont 1 labelsize 12 align 128
|
||||
}
|
||||
Fl_Input in_http_proxy_user {
|
||||
label {Username:}
|
||||
xywh {130 145 140 25} labelsize 12 align 132 textsize 12
|
||||
}
|
||||
Fl_Input in_http_proxy_passwd {
|
||||
label {Password:}
|
||||
xywh {130 175 140 25} type Secret labelsize 12 align 132 textsize 12
|
||||
}
|
||||
Fl_Input in_ftp_proxy_host {
|
||||
label {Hostname:}
|
||||
xywh {130 230 140 25} labelsize 12 align 132 textsize 12
|
||||
}
|
||||
Fl_Input in_ftp_proxy_port {
|
||||
label {Port:}
|
||||
xywh {310 230 135 25} type Int labelsize 12 align 132 textsize 12
|
||||
}
|
||||
Fl_Input in_ftp_proxy_user {
|
||||
label {Username:}
|
||||
xywh {130 260 140 25} labelsize 12 align 132 textsize 12
|
||||
}
|
||||
Fl_Input in_ftp_proxy_passwd {
|
||||
label {Password:}
|
||||
xywh {130 290 140 25} type Secret labelsize 12 align 132 textsize 12
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {FTP Proxy:}
|
||||
xywh {45 205 85 25} labelfont 1 labelsize 12 align 128
|
||||
}
|
||||
Fl_Choice in_ftp_proxy_type {
|
||||
label {FTP Proxy Type:} open
|
||||
xywh {130 320 115 25} down_box BORDER_BOX labelsize 12 align 132 textsize 12
|
||||
} {
|
||||
menuitem {} {
|
||||
label {USER@SITE}
|
||||
xywh {20 20 100 20} labelsize 12
|
||||
}
|
||||
menuitem {} {
|
||||
label {USER@ProxyUser@SITE}
|
||||
xywh {20 20 100 20} labelsize 12
|
||||
}
|
||||
menuitem {} {
|
||||
label {USER@SITE_PROXYUSER}
|
||||
xywh {30 30 100 20} labelsize 12
|
||||
}
|
||||
menuitem {} {
|
||||
label {ProxyUser@SITE}
|
||||
xywh {40 40 100 20} labelsize 12
|
||||
}
|
||||
menuitem {} {
|
||||
label {LOGIN_then_USER@SITE}
|
||||
xywh {50 50 100 20} labelsize 12
|
||||
}
|
||||
menuitem {} {
|
||||
label OPENSITE
|
||||
xywh {60 60 100 20} labelsize 12
|
||||
}
|
||||
menuitem {} {
|
||||
label SITESITE
|
||||
xywh {70 70 100 20} labelsize 12
|
||||
}
|
||||
menuitem {} {
|
||||
label {HTTP proxy}
|
||||
xywh {80 80 100 20} labelsize 12
|
||||
}
|
||||
}
|
||||
Fl_Check_Button in_use_http_proxy {
|
||||
label {Use HTTP Proxy}
|
||||
xywh {155 90 120 20} down_box DIAMOND_DOWN_BOX labelsize 12 align 148
|
||||
}
|
||||
Fl_Check_Button in_use_ftp_proxy {
|
||||
label {Use FTP Proxy}
|
||||
xywh {145 205 120 20} down_box DIAMOND_DOWN_BOX labelsize 12 align 148
|
||||
}
|
||||
}
|
||||
Fl_Group {} {open
|
||||
xywh {55 40 285 45}
|
||||
} {
|
||||
Fl_Check_Button in_direct_conn_button {
|
||||
label {Direct Connection to the Internet}
|
||||
callback cb_prefs_conn
|
||||
xywh {55 45 205 20} type Radio down_box DIAMOND_DOWN_BOX labelsize 12 align 148
|
||||
}
|
||||
Fl_Check_Button in_use_proxy_button {
|
||||
label {Use proxies}
|
||||
callback cb_prefs_use_proxy
|
||||
xywh {55 60 210 20} type Radio down_box DIAMOND_DOWN_BOX labelsize 12 align 148
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Fl_Group gr_prefs_ftpsearch {
|
||||
label {FTP Search} open
|
||||
xywh {30 30 440 345} labelfont 1 labelsize 12 hide
|
||||
} {
|
||||
Fl_Group {} {open
|
||||
xywh {35 35 425 325} box ENGRAVED_FRAME
|
||||
} {
|
||||
Fl_Box {} {
|
||||
label {Number of mirrors to request:}
|
||||
xywh {60 95 180 25} labelsize 12 align 148
|
||||
}
|
||||
Fl_Counter mirrors_in {
|
||||
xywh {305 90 75 25} labelsize 12 minimum 1 maximum 1000 step 1 value 40 textsize 12
|
||||
code0 {o->type(FL_SIMPLE_COUNTER);}
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Ping Timeout (Sec):}
|
||||
xywh {60 130 210 25} labelsize 12 align 148
|
||||
}
|
||||
Fl_Input in_ping_timeout {
|
||||
xywh {310 130 95 25} type Int labelsize 12 textsize 12
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Number of mirrors to ping at once:}
|
||||
xywh {60 165 210 25} labelsize 12 align 148
|
||||
}
|
||||
Fl_Counter in_simul_pings {
|
||||
xywh {310 165 80 25} labelsize 12 minimum 1 maximum 30 step 1 value 5 textsize 12
|
||||
code0 {o->type(FL_SIMPLE_COUNTER);}
|
||||
}
|
||||
Fl_Check_Button in_use_ftpsearch_button {
|
||||
label {Do FTPSearch automatically}
|
||||
xywh {60 210 295 25} down_box DIAMOND_DOWN_BOX labelsize 12 align 148
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {FTPSearch Server to use:}
|
||||
xywh {60 55 180 25} labelsize 12 align 148
|
||||
}
|
||||
}
|
||||
Fl_Choice ftps_server_choice {open
|
||||
xywh {285 55 160 25} down_box BORDER_BOX labelsize 12 align 132 textsize 12
|
||||
} {
|
||||
menuitem {} {
|
||||
label {filesearching.com}
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Fl_Button ok_button {
|
||||
label OK
|
||||
callback cb_prefs_ok
|
||||
xywh {265 385 70 20} labelsize 12
|
||||
}
|
||||
Fl_Button cancel_button {
|
||||
label Cancel
|
||||
callback cb_prefs_cancel
|
||||
xywh {365 385 70 20} labelsize 12
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Function {make_about_win()} {} {
|
||||
Fl_Window win_about {open
|
||||
xywh {156 167 560 345} labeltype NORMAL_LABEL visible
|
||||
} {
|
||||
Fl_Box {} {
|
||||
label {Prozilla Download Accelerator 2.0.5beta}
|
||||
xywh {5 25 215 30} labelfont 1 labelsize 12 labelcolor 4 align 128
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {GUI Version 2.0.5beta}
|
||||
xywh {15 55 185 20} labelsize 12
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {libprozilla version 1.2.0}
|
||||
xywh {20 80 185 20} labelsize 12
|
||||
}
|
||||
Fl_Button {} {
|
||||
label OK
|
||||
callback cb_about_ok selected
|
||||
xywh {60 310 85 20} labelsize 12
|
||||
}
|
||||
Fl_Box {} {
|
||||
image {images/BigProZilla01.xpm} xywh {40 120 130 125} box SHADOW_FRAME labelsize 12
|
||||
}
|
||||
Fl_Tabs {} {open
|
||||
xywh {225 25 330 315} labelfont 1 labelcolor 4
|
||||
} {
|
||||
Fl_Group {} {
|
||||
label Credits open
|
||||
xywh {230 45 320 290} labelsize 12 labelcolor 4
|
||||
} {
|
||||
Fl_Scroll {} {open
|
||||
xywh {240 55 300 275} box ENGRAVED_BOX color 28 labelfont 1 labelsize 12 labelcolor 4
|
||||
} {
|
||||
Fl_Box {} {
|
||||
label {Kalum Somaratna - Main Programming}
|
||||
xywh {280 65 215 20} labelsize 10 align 128
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Uwe Hermann - Additional Programming}
|
||||
xywh {290 85 200 15} labelsize 10
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Gustavo Noronha Silva (KoV) - libprozilla GNU gettext support, deb package maintainer}
|
||||
xywh {290 135 220 40} labelsize 10 align 128
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Ralph Slooten - Web Page Maintainer, RPM packager, testing}
|
||||
xywh {295 105 195 30} labelsize 10 align 128
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {If you have contributed and arent listed, I apologise and please mail me <kalum@genesys.ro> and I will correct it}
|
||||
xywh {285 285 215 40} labelsize 10 align 128
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Silviu Marin-Caea - (Our sysadmin) Donation of valuable bandwith and system resources at genesys.ro, testing}
|
||||
xywh {290 175 210 45} labelsize 10 align 128
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Pablo Iranzo Gómez - testing}
|
||||
xywh {295 220 180 20} labelsize 10 align 128
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Krogg - The cool Prozilla logo}
|
||||
xywh {300 240 190 20} labelsize 10 align 128
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {David L. Matthews - testing}
|
||||
xywh {305 260 165 20} labelsize 10 align 128
|
||||
}
|
||||
}
|
||||
}
|
||||
Fl_Group {} {
|
||||
label Translations open
|
||||
xywh {230 45 320 290} labelsize 12 labelcolor 4 hide
|
||||
} {
|
||||
Fl_Scroll {} {open
|
||||
xywh {240 55 300 275} box ENGRAVED_BOX color 28 when 6
|
||||
} {
|
||||
Fl_Box {} {
|
||||
label {Ruben Boer - Dutch Translation}
|
||||
xywh {300 70 170 30} labelsize 10 align 128
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Ralph Slooten- Dutch Translation}
|
||||
xywh {300 100 180 25} labelsize 10 align 128
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Flower - Romanian Translation}
|
||||
xywh {300 130 175 20} labelsize 10 align 128
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Gustavo Noronha Silva (KoV) - Portugese Translation}
|
||||
xywh {305 155 175 35} labelsize 10 align 128
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Emanuele Tatti (Kreazy) - Itallian Translation}
|
||||
xywh {305 190 175 30} labelsize 10 align 128
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Alberto Zanoni - Itallian Translation}
|
||||
xywh {315 230 175 25} labelsize 10 align 128
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Eric Lassauge - French Translation}
|
||||
xywh {315 260 175 25} labelsize 10 align 128
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Webpage - http://prozilla.genesys.ro/}
|
||||
xywh {15 255 195 20} color 29 labelsize 10 labelcolor 1 align 128
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Function {make_url_input_win()} {} {
|
||||
Fl_Window {} {
|
||||
label {Please enter the URL} open
|
||||
xywh {219 450 440 140}
|
||||
code1 {o->hide();} visible
|
||||
} {
|
||||
Fl_Return_Button url_input_ok_button {
|
||||
label OK
|
||||
callback cb_url_input_ok
|
||||
xywh {235 110 90 25} labelsize 12
|
||||
}
|
||||
Fl_Input in_url {
|
||||
xywh {65 55 360 30} labelsize 12 align 133 textsize 12
|
||||
}
|
||||
Fl_Box {} {
|
||||
label {Enter URL (CTRL+V to paste from clipboard)}
|
||||
xywh {60 25 335 25} labelsize 12 align 148
|
||||
}
|
||||
Fl_Box {} {
|
||||
image {images/Pz12.xpm} xywh {5 30 55 60}
|
||||
}
|
||||
Fl_Button {} {
|
||||
label Cancel
|
||||
callback cb_url_input_cancel
|
||||
xywh {340 110 90 25} labelsize 12
|
||||
}
|
||||
Fl_Check_Button do_ftpsearch_button {
|
||||
label {FTPSearch for mirrors (Experimental)}
|
||||
xywh {60 90 245 20} down_box DIAMOND_DOWN_BOX labelsize 12
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
// generated by Fast Light User Interface Designer (fluid) version 1.0102
|
||||
|
||||
#ifndef we_h
|
||||
#define we_h
|
||||
#include <FL/Fl.H>
|
||||
#include <FL/Fl_Window.H>
|
||||
extern Fl_Window *win_prefs;
|
||||
#include <FL/Fl_Tabs.H>
|
||||
extern void cb_prefs_tab(Fl_Tabs*, void*);
|
||||
extern Fl_Tabs *tb_prefs;
|
||||
#include <FL/Fl_Group.H>
|
||||
extern Fl_Group *gr_prefs_general;
|
||||
#include <FL/Fl_Input.H>
|
||||
extern Fl_Input *retry_delay_in;
|
||||
#include <FL/Fl_Counter.H>
|
||||
extern Fl_Counter *threads_in;
|
||||
#include <FL/Fl_Box.H>
|
||||
extern Fl_Input *in_timeout;
|
||||
#include <FL/Fl_Check_Button.H>
|
||||
extern Fl_Check_Button *in_pasv_button;
|
||||
extern Fl_Check_Button *in_no_cache_button;
|
||||
extern Fl_Input *in_outputdir;
|
||||
extern Fl_Input *in_bps_per_dl;
|
||||
extern Fl_Group *gr_prefs_proxy;
|
||||
extern Fl_Group *gr_proxy_grp;
|
||||
extern Fl_Input *in_http_proxy_host;
|
||||
extern Fl_Input *in_http_proxy_port;
|
||||
extern Fl_Input *in_http_proxy_user;
|
||||
extern Fl_Input *in_http_proxy_passwd;
|
||||
extern Fl_Input *in_ftp_proxy_host;
|
||||
extern Fl_Input *in_ftp_proxy_port;
|
||||
extern Fl_Input *in_ftp_proxy_user;
|
||||
extern Fl_Input *in_ftp_proxy_passwd;
|
||||
#include <FL/Fl_Choice.H>
|
||||
extern Fl_Choice *in_ftp_proxy_type;
|
||||
extern Fl_Check_Button *in_use_http_proxy;
|
||||
extern Fl_Check_Button *in_use_ftp_proxy;
|
||||
extern void cb_prefs_conn(Fl_Check_Button*, void*);
|
||||
extern Fl_Check_Button *in_direct_conn_button;
|
||||
extern void cb_prefs_use_proxy(Fl_Check_Button*, void*);
|
||||
extern Fl_Check_Button *in_use_proxy_button;
|
||||
extern Fl_Group *gr_prefs_ftpsearch;
|
||||
extern Fl_Counter *mirrors_in;
|
||||
extern Fl_Input *in_ping_timeout;
|
||||
extern Fl_Counter *in_simul_pings;
|
||||
extern Fl_Check_Button *in_use_ftpsearch_button;
|
||||
extern Fl_Choice *ftps_server_choice;
|
||||
#include <FL/Fl_Button.H>
|
||||
extern void cb_prefs_ok(Fl_Button*, void*);
|
||||
extern Fl_Button *ok_button;
|
||||
extern void cb_prefs_cancel(Fl_Button*, void*);
|
||||
extern Fl_Button *cancel_button;
|
||||
Fl_Window* make_prefs_win();
|
||||
extern Fl_Menu_Item menu_in_ftp_proxy_type[];
|
||||
extern Fl_Menu_Item menu_ftps_server_choice[];
|
||||
extern Fl_Window *win_about;
|
||||
extern void cb_about_ok(Fl_Button*, void*);
|
||||
#include <FL/Fl_Scroll.H>
|
||||
Fl_Window* make_about_win();
|
||||
#include <FL/Fl_Return_Button.H>
|
||||
extern void cb_url_input_ok(Fl_Return_Button*, void*);
|
||||
extern Fl_Return_Button *url_input_ok_button;
|
||||
extern Fl_Input *in_url;
|
||||
extern void cb_url_input_cancel(Fl_Button*, void*);
|
||||
extern Fl_Check_Button *do_ftpsearch_button;
|
||||
Fl_Window* make_url_input_win();
|
||||
#endif
|
||||
Reference in New Issue
Block a user