
Firefox & KDialog Save As
Various KDE 1.-4. Improvements
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
== Prodology:
If there is something that some Linux developers can't get right, that is File Dialogs. Example, look at Gnomes (older or the new brand spanking versions), they suck. But gnome ain't only one, chose so does most of file dialogs too. And even how great Firefox is, Firefox File Dialogs aren't any exception. You knew this? Allright, to the point.
If someone remembers, there (here, at kde-look.org) has had post that replaced Firefox file dialog with KDEs one. And most whom tried it, propably remembers that there were certain "issues". It can be that there was/is newer version and I have just missed it. Newertheless, it started to look some alternative way, so I crossed to this:
http://update.mozilla.org/extensions/moreinfo.php?id=27&vid=134&category=Download%20Tools
It allows you to use alternative download manager in firefox, eg. wget or kget. Sadly kget crashed for me at startup and it was useless.
So, just when all hope was gone, and I was returning to do my thing, it hitted me; Why no use Kdialog? I have had many enjoyable moments with it and shellscriptin.
I started to look ways of using it, and I must tell you, it was criminally easy.
== How-to:
First, you need to install DowloadWith from:
http://update.mozilla.org/extensions/moreinfo.php?id=27&vid=134&category=Download%20Tools
After installed, you need to restart firefox, but first, download my example script.
Select from firefox tools menu -> extensions and open DownloadWith settings dialog from top-right icon of DownloadWith section.
Click "Create new application" from bottom left of settings window and wonder where Firefox pop-up blockker is. Choose custom configuration.
In Identification and Label field insert something, like KDialog. But in Command field choose my kfiresave.sh script. And in Arguments field type (with brackets). Press OK.
Now, you should see your Kdialog in applications section like in second screenshoot. If so, jump to Automatic download tab.
Select "All files", or, if you prefer, Specified files. But remember to select from Application dropdown menu Kdialog.
Hit OK and enjoy.
Does not work? Check that script has exec rights.
Tested in KDE 3.3-beta2 but should work on KDE > 3.2
I would like to thank academy, And KDE for staying as "U*ix desktop environment".
sociolect
14 years ago
Report
alephnull
14 years ago
isoteemu's method works _great_ using FlashGot instead of DownloadWith (DownloadWith hasn't been updated for FF 2), and the corrected script above.
Report
MarkWPiper
15 years ago
kfmclient copy "$URL" "$KDIALOG"
Note the quotes around KDIALOG.
Report
mistik1
15 years ago
I tried this method and found that if I pressed cancel on the getsavefilename kdialog the kfmclient portion of the script would still be run. This is not good behavior. You can apply one of the following to fix this bug.
#!/bin/sh
URL=$1
FILE=`basename $URL`
KDIALOG=`kdialog --getsavefilename $FILE`
if [ ${#KDIALOG} -gt 0 ]; then
kfmclient copy "$URL" "$KDIALOG"
fi
or
#!/bin/sh
URL=$1
FILE=`basename $URL`
if KDIALOG=`kdialog --getsavefilename $FILE`; then
kfmclient copy "$URL" "$KDIALOG"
fi
The latter is probaly a more elegant solution. ;-)
Report
qodsec
16 years ago
Report
MarkWPiper
15 years ago
Report
akela
16 years ago
Report
ushohet
16 years ago
Report
elcuco
16 years ago
Only problem, is that when I "save as" it uses the old dialog box. I know "save with" but it still sux.
G R E A T J O B !
Report