FLTK2-based GUI dpi for downloads
Hi there, Let's start 2006 with a nice addition to Dillo. Here's a HOWTO fo the FLTK2-based GUI-dpi for downloads: * Get the latest CVS (it has dpi/downloads.cc) * Get http://www.dillo.org/test/dl_GUI.diff cd dillo; patch -p1 < dl_GUI.diff * Go to http://www.fltk.org/software.php and get the "fltk-2.0.x-r4721.tar.bz2" tarball (or SVN at your option). __you need FLTK 2.0.x, FLTK 1.1.x won't work___ * Install FLTK2 * Build Dillo, install & enjoy! Note to packagers: Don't worry about FLTK2. The resulting dpi binary is statically linked so there're no new dependencies for a package that ships the new GUI-dpi for downloads, and as you'll soon understand, this new dpi is the recommended choice! :-) The idea is to ship this GUI-dpi when Dillo-0.8.6 is released. All: Please test it and let me know to the list you succeeded in the installation process (just to be sure I didn't forget a step in the above instructions). Feedback is welcomed. Tips: The GUI is compact, but has plenty of information. Look at the tooltips (place the mouse cursor over the widgets wait and see; e.g. the filename widget shows the wget log). BTW, I also prepared some XPM Icons for window managers. These are in the Icons page. My Icewm looks very nice with the new 16x16 and 32x32 pair! Enjoy, and have a great 2006! -- Cheers Jorge.-
Hi, just tried it on DragonFly BSD. Now it works (nice!) just a couple of things I noticed: - strndup() seems not to be availably on DragonFly. Don't know about other BSDs. - For some reason, downloads.dpi got built from downloads.c until I manually compiled downloads.cc. Thanks, Johannes On Mon, Jan 02, 2006 at 11:30:43AM -0300, Jorge Arellano Cid wrote:
Hi there,
Let's start 2006 with a nice addition to Dillo.
Here's a HOWTO fo the FLTK2-based GUI-dpi for downloads:
* Get the latest CVS (it has dpi/downloads.cc) * Get http://www.dillo.org/test/dl_GUI.diff cd dillo; patch -p1 < dl_GUI.diff * Go to http://www.fltk.org/software.php and get the "fltk-2.0.x-r4721.tar.bz2" tarball (or SVN at your option). __you need FLTK 2.0.x, FLTK 1.1.x won't work___ * Install FLTK2 * Build Dillo, install & enjoy!
Note to packagers: Don't worry about FLTK2. The resulting dpi binary is statically linked so there're no new dependencies for a package that ships the new GUI-dpi for downloads, and as you'll soon understand, this new dpi is the recommended choice! :-) The idea is to ship this GUI-dpi when Dillo-0.8.6 is released.
All: Please test it and let me know to the list you succeeded in the installation process (just to be sure I didn't forget a step in the above instructions). Feedback is welcomed.
Tips: The GUI is compact, but has plenty of information. Look at the tooltips (place the mouse cursor over the widgets wait and see; e.g. the filename widget shows the wget log).
BTW, I also prepared some XPM Icons for window managers. These are in the Icons page. My Icewm looks very nice with the new 16x16 and 32x32 pair!
Enjoy, and have a great 2006!
-- Cheers Jorge.-
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
Hi Johannes, On Mon, Jan 02, 2006 at 09:15:44PM +0100, Johannes Hofmann wrote:
Hi,
just tried it on DragonFly BSD. Now it works (nice!)
Good!
just a couple of things I noticed:
- strndup() seems not to be availably on DragonFly. Don't know about other BSDs.
Ok, it's patched now in CVS (beware of the g_free instead of plain free).
- For some reason, downloads.dpi got built from downloads.c until I manually compiled downloads.cc.
After patching, autoconf/automake files are modified so a: make distclean ./autogen ./configure make cycle is required (otherwise dependencies may linger). -- Cheers Jorge.- PS: No need to CC' me.
On Mon, Jan 02, 2006 at 05:32:24PM -0300, Jorge Arellano Cid wrote:
- strndup() seems not to be availably on DragonFly. Don't know about other BSDs.
Ok, it's patched now in CVS (beware of the g_free instead of plain free).
Works fine now.
- For some reason, downloads.dpi got built from downloads.c until I manually compiled downloads.cc.
After patching, autoconf/automake files are modified so a:
make distclean ./autogen ./configure make
cycle is required (otherwise dependencies may linger).
Had done that... Perhaps it's a problem with my aclocal/automake installation...
-- Cheers Jorge.-
PS: No need to CC' me.
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
On Mon, Jan 02, 2006 at 09:45:46PM +0100, Johannes Hofmann wrote:
On Mon, Jan 02, 2006 at 05:32:24PM -0300, Jorge Arellano Cid wrote:
- For some reason, downloads.dpi got built from downloads.c until I manually compiled downloads.cc.
After patching, autoconf/automake files are modified so a:
make distclean ./autogen ./configure make
cycle is required (otherwise dependencies may linger).
Had done that... Perhaps it's a problem with my aclocal/automake installation...
Well the updated HOWTO is: 1.- Get the latest CVS (it has dpi/downloads.cc) 2.- Get http://www.dillo.org/test/dl_GUI.diff cd dillo; patch -p1 < dl_GUI.diff 3.- cd dillo/dpi; mv downloads.c downloads.c.old; rm -r .deps 4.- Go to http://www.fltk.org/software.php and get the "fltk-2.0.x-r4721.tar.bz2" tarball (or SVN at your option). __you need FLTK 2.0.x, FLTK 1.1.x won't work___ 5.- Install FLTK2 6.- Build Dillo, install & enjoy! -- Cheers Jorge.-
* Jorge Arellano Cid (jcid@dillo.org):
Here's a HOWTO fo the FLTK2-based GUI-dpi for downloads:
* Get the latest CVS (it has dpi/downloads.cc) * Get http://www.dillo.org/test/dl_GUI.diff cd dillo; patch -p1 < dl_GUI.diff * Go to http://www.fltk.org/software.php and get the "fltk-2.0.x-r4721.tar.bz2" tarball (or SVN at your option). __you need FLTK 2.0.x, FLTK 1.1.x won't work___ * Install FLTK2 * Build Dillo, install & enjoy!
OK, tried this on FreeBSD 6 and ran into the following minor issues: - I needed to move dpi/downloads.c out of the way; otherwise something(tm) always tried to build downloads.o using downloads.c (Makefile and Makefile.in were correctly generated but .deps/downloads.Po was wrong - could someone enlighten me what goes on there?) - I needed to patch dpi/downloads.cc to make it build, I hope this fix is correct: Index: downloads.cc =================================================================== RCS file: /sfhome/cvs/dillo/dillo/dpi/downloads.cc,v retrieving revision 1.1 diff -u -r1.1 downloads.cc --- downloads.cc 2 Jan 2006 14:08:45 -0000 1.1 +++ downloads.cc 2 Jan 2006 20:26:43 -0000 @@ -306,7 +306,7 @@ p = strrchr(fullname, '/'); shortname = (p) ? strdup(p + 1) : strdup("??"); p = strrchr(full_filename, '/'); - target_dir = (p) ? strndup(full_filename,p-full_filename+1) : strdup("??"); + target_dir = (p) ? g_strndup(full_filename,p-full_filename+1) : strdup("??"); log_len = 0; log_max = 0; - Did I mention I did get a nice gui after all (it is intended to get visible after the directory selection dialog has finished?) :-)
Note to packagers: Don't worry about FLTK2. The resulting dpi binary is statically linked so there're no new dependencies for a package that ships the new GUI-dpi for downloads, and as you'll soon understand, this new dpi is the recommended choice! :-) The idea is to ship this GUI-dpi when Dillo-0.8.6 is released.
I have a FreeBSD port for FLTK-2-snap ready for inclusion in the FreeBSD ports tree (we build everything from source in FreeBSD ports land). So building an FLTK-2 dillo should not be a problem. Best regards and thanks for keeping up the good work on dillo -- Thomas-Martin Seck (current dillo maintainer on FreeBSD)
Thomas-Martin Seck wrote:
- I needed to move dpi/downloads.c out of the way; otherwise something(tm) always tried to build downloads.o using downloads.c (Makefile and Makefile.in were correctly generated but .deps/downloads.Po was wrong - could someone enlighten me what goes on there?)
Thanks for the pointer - this allowed me to get as far as: if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include -I/usr/include/glib-1.2 -I/usr/lib/glib/include -g -O2 -MT downloads.o -MD -MP -MF ".deps/downloads.Tpo" \ -c -o downloads.o `test -f 'downloads.cc' || echo './'`downloads.cc; \ then mv -f ".deps/downloads.Tpo" ".deps/downloads.Po"; \ else rm -f ".deps/downloads.Tpo"; exit 1; \ fi downloads.cc: In function 'void read_req_cb(int, void*)': downloads.cc:915: error: jump to label 'end' downloads.cc:901: error: from here downloads.cc:907: error: crosses initialization of 'DLAction action' downloads.cc:915: error: jump to label 'end' downloads.cc:897: error: from here downloads.cc:907: error: crosses initialization of 'DLAction action' downloads.cc:915: error: jump to label 'end' downloads.cc:893: error: from here downloads.cc:907: error: crosses initialization of 'DLAction action' downloads.cc:915: error: jump to label 'end' downloads.cc:889: error: from here downloads.cc:907: error: crosses initialization of 'DLAction action' downloads.cc:915: error: jump to label 'end' downloads.cc:885: error: from here downloads.cc:907: error: crosses initialization of 'DLAction action' Putting the DlAction block within its own scope solves the problem, but I'm sure it's not as simple as that. Glyn
Hi Glyn, On Mon, Jan 02, 2006 at 09:36:05PM +0000, Glyn Kennington wrote:
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include -I/usr/include/glib-1.2 -I/usr/lib/glib/include -g -O2 -MT downloads.o -MD -MP -MF ".deps/downloads.Tpo" \ -c -o downloads.o `test -f 'downloads.cc' || echo './'`downloads.cc; \ then mv -f ".deps/downloads.Tpo" ".deps/downloads.Po"; \ else rm -f ".deps/downloads.Tpo"; exit 1; \ fi downloads.cc: In function 'void read_req_cb(int, void*)': downloads.cc:915: error: jump to label 'end' downloads.cc:901: error: from here downloads.cc:907: error: crosses initialization of 'DLAction action' downloads.cc:915: error: jump to label 'end' downloads.cc:897: error: from here downloads.cc:907: error: crosses initialization of 'DLAction action' downloads.cc:915: error: jump to label 'end' downloads.cc:893: error: from here downloads.cc:907: error: crosses initialization of 'DLAction action' downloads.cc:915: error: jump to label 'end' downloads.cc:889: error: from here downloads.cc:907: error: crosses initialization of 'DLAction action' downloads.cc:915: error: jump to label 'end' downloads.cc:885: error: from here downloads.cc:907: error: crosses initialization of 'DLAction action'
Putting the DlAction block within its own scope solves the problem, but I'm sure it's not as simple as that.
Really weird. What compiler are you using? From a distance look like the compiler gets confused trying to catch uninitialized variables. Try declaring 'action' with the other vars with a value: char *cmd = NULL, *url = NULL, *dl_dest = NULL; + DLAction action = DL_ABORT; - DLAction action = dl_win->check_filename(&dl_dest); + action = dl_win->check_filename(&dl_dest); Did you get it to work right? -- Cheers Jorge.-
Jorge Arellano Cid wrote:
Hi Glyn,
On Mon, Jan 02, 2006 at 09:36:05PM +0000, Glyn Kennington wrote:
[...] downloads.cc: In function 'void read_req_cb(int, void*)': downloads.cc:915: error: jump to label 'end' downloads.cc:901: error: from here downloads.cc:907: error: crosses initialization of 'DLAction action' [...]
Putting the DlAction block within its own scope solves the problem, but I'm sure it's not as simple as that.
Really weird. What compiler are you using?
gcc 4.0.3, in Debian testing. I get the same result with gcc 3.3.6.
From a distance look like the compiler gets confused trying to catch uninitialized variables.
There's an entry about it in the g++ FAQ: http://theory.uwinnipeg.ca/gnu/libg++/g++FAQ_42.html The draft standard does not allow a goto or a jump to a case label to skip over an initialization of a variable or a class object. I'm quite surprised that nobody else has got this error, though.
Try declaring 'action' with the other vars with a value:
char *cmd = NULL, *url = NULL, *dl_dest = NULL; + DLAction action = DL_ABORT;
- DLAction action = dl_win->check_filename(&dl_dest); + action = dl_win->check_filename(&dl_dest);
That compiles and runs OK.
Did you get it to work right?
Yes, thanks - with either your suggestion, or the extra set of braces, it works correctly. Glyn
Hi, On Mon, Jan 02, 2006 at 10:45:03PM +0000, Glyn Kennington wrote:
Jorge Arellano Cid wrote:
Hi Glyn,
On Mon, Jan 02, 2006 at 09:36:05PM +0000, Glyn Kennington wrote:
[...] downloads.cc: In function 'void read_req_cb(int, void*)': downloads.cc:915: error: jump to label 'end' downloads.cc:901: error: from here downloads.cc:907: error: crosses initialization of 'DLAction action' [...]
Putting the DlAction block within its own scope solves the problem, but I'm sure it's not as simple as that.
Really weird. What compiler are you using?
gcc 4.0.3, in Debian testing. I get the same result with gcc 3.3.6.
I'm using gcc version 3.4.5. No problem with this one.
From a distance look like the compiler gets confused trying to catch uninitialized variables.
There's an entry about it in the g++ FAQ:
http://theory.uwinnipeg.ca/gnu/libg++/g++FAQ_42.html
The draft standard does not allow a goto or a jump to a case label to skip over an initialization of a variable or a class object.
I'm quite surprised that nobody else has got this error, though.
Thanks for the information. I commited a patch to avoid this problem. -- Cheers Jorge.-
Hi There,
OK, tried this on FreeBSD 6 and ran into the following minor issues:
- I needed to move dpi/downloads.c out of the way; otherwise something(tm) always tried to build downloads.o using downloads.c (Makefile and Makefile.in were correctly generated but .deps/downloads.Po was wrong - could someone enlighten me what goes on there?)
- I needed to patch dpi/downloads.cc to make it build, I hope this fix is correct: [...]
OK, the CVS now has FLTK2 GUI dpi for downloads as _default_. If you don't have FLTK2, you can: ./configure --disable-dlgui and get the old one. So far, the current HOWTO for FLTK2-GUI-dpi for downloads is: 1.- Get the latest CVS (it has dpi/downloads.cc) 2.- Go to http://www.fltk.org/software.php and get the "fltk-2.0.x-r4721.tar.bz2" tarball (or SVN at your option). __you need FLTK 2.0.x, FLTK 1.1.x won't work___ 3.- Install FLTK2 4.- Build Dillo, install & enjoy! e.g. ./configure; make; make install-strip For old (non GUI) downloads: 1.- Get the latest CVS (it has dpi/downloads.cc) 2.- Build Dillo, install & enjoy! e.g. ./configure --disable-dlgui; make; make install-strip -- Cheers Jorge.-
participants (4)
-
Glyn Kennington
-
Johannes Hofmann
-
Jorge Arellano Cid
-
Thomas-Martin Seck