Description: This is a dirty hack for Mozilla that makes it use the standard KDE dialogs to open/save files. It relies on "kdialog", which is part of "kdebase". It should work for Mozilla, Firefox and Thunderbird.
WARNING: This is a cutting-edge very early alpha version. It should work but it might not. Right now it has one important bug: Mozilla freezes while the open/save dialog is opened, and it recovers when the dialog finishes. This is due to Mozilla internally uses the system() call to run kdialog. Anyway, I'm working on this to improve it and make it work correctly. Take this as a preview and DON'T use it in a production environment.
------------------------------- HOW TO INSTALL -------------------------------
Download the file and uncompress it. You'll see a file called "nsFilePicker.js". Go to the directory where you installed Mozilla, Firefox or Thunderbird. Inside it there's a directory called "components". You have to replace the file "nsFilePicker.js" with the one you've downloaded. You should rename the old file so if you experience problems with this hack or you don't like it you can restore the old version.
Note: this will only work on UNIX-like/BSD systems that can run KDE. If you're using Windows or Mac OS X, this is not for you.
This is yet another brick into the wall of a Grand Unified User Interface. Not sure about the others, but when the dialog pops up, the interface to firefox freezes up until the dialog gives the input to the main program. Is this unavoidable, or is this a bug? Either way, good show!
Dave
First of all thanks for this. It's not 100%, but it is a better "hack" than adding "FILEPICKER_CONTRACTID" to the file because this method uses the native kdialog. However, I was very disappointed, when I clicked on the options dropdown, that "Show Preview (F11)" was grayed out. I was very excited when I first saw this because I thought I'd finally be able to preview pics before uploading (like you can in Konqueror), but the option is grayed out. Any reason why, or how to enable it?
THANK YOU VERY,VERY MUCH!!
I don't like this gnome-thing. It's ugly and uncomfortable.
Just one example: creating a new folder before saving a new file and the filename disappears. So you have to close the dialog, open it and navigate once more to the newly created folder. This was really nasty, but since your hack I can use the KDE-dialog again which I appreciate much more.
(Sorry for my bad english).
Again: Thank you! :-)
If at first it doesn't work, don't give up hope!
Running Firefox 1.5.0.1 on KDE 3.5.2 and SuSE 10.0 for x86_64. Installed the patch as directed; no change. Double checked file permissions, etc. Still no change. Oh well.
I've learned to live with the GTK dialogs (sorta). Over the weekend, I went to download a file and HALLELUJAH! I now have KDE dialogs. Rejoice! Rejoice! (And scratch my head.) To the author - thank you. Thank You. THANK YOU! No more cumbersome (and ugly) GTK dialogs. Now I have the straightforward simplicity of native KDE dialogs. THANK YOU AGAIN!
I'm quite interested in this project, but I think I need something a little more stable for full time use.
For those of you looking for a stabler alternative, you can get a nice KDEsque file picker by doing the following:
1. Find the original nsFilePicker.js as described above and open (as root) it in you favourite text editor.
2. Find the following section:
--------------------------------------
compMgr.registerFactoryLocation(FILEPICKER_CID,
"FilePicker JS Component",
//@line 278 "/builds/tinderbox/Fx-Mozilla1.8/Linux_2.4.21-27.0.4.ELsmp_Depend/mozilla/xpfe/components/filepicker/src/nsFilePicker.js.in"
"",
//@line 280 "/builds/tinderbox/Fx-Mozilla1.8/Linux_2.4.21-27.0.4.ELsmp_Depend/mozilla/xpfe/components/filepicker/src/nsFilePicker.js.in"
fileSpec,
location,
type);
--------------------------------------
and change it so it looks as follows:
--------------------------------------
compMgr.registerFactoryLocation(FILEPICKER_CID,
"FilePicker JS Component",
//@line 278 "/builds/tinderbox/Fx-Mozilla1.8/Linux_2.4.21-27.0.4.ELsmp_Depend/mozilla/xpfe/components/filepicker/src/nsFilePicker.js.in"
FILEPICKER_CONTRACTID,
//@line 280 "/builds/tinderbox/Fx-Mozilla1.8/Linux_2.4.21-27.0.4.ELsmp_Depend/mozilla/xpfe/components/filepicker/src/nsFilePicker.js.in"
fileSpec,
location,
type);
--------------------------------------
3. You must then refresh the chrome registry (whatever that really means) by installing or unistalling an extension.
4. Restart Firefox/Thunderbird and do a "Save Link as..." and you should have a much more KDE friendly file picker.
While this obviously isn't as good as having the official KDE file dialogues, it can certainly make saving and opening files less painful.
Thanks, Víctor, it works quite fine with Firefox and Thunderbird 1.5. But there's one issue with folders having accents in their names: if you try to attach something from one of them or if you try to save something to such a folder, Firefox/Thunderbird stops displaying any dialogs at all (kdialogs, I mean :-D).
[ El inglés, por eduación y que me entiendan los demás ;-P ]
It's kinda stupid to release a package when you know there is a bug in it. An intelligent, responsible programmer would never do such a thing. When you say "it has a bug", you might as well be saying "here it is, but, don't download it as it won't work because it's not fixed yet and will only pollute your system".
What happened to the quality of programmer in recent years?
I started working on this yesterday. Troy wasn't conquered in one day. ;) I know there's a bug, that's why I warn it. I think it's clear this is a cutting-edge-alpha-version dirty hack. This is more like a preview so people see somebody's working on it and they can also help and report more bugs. Anyway, somebody may find this useful because when you open a file you don't usually move the file picker window. I'll continue working on this and maybe I make an update in 2 or 3 days with a trick to make Mozilla not freeze.
Pardon? I suppose you must be
kidding or just trolling.
What happened to the quality
of *users* in recent years?
Providing a software with a known
major bug as a technology preview
is absolutely justified -
not only but especially when it comes
to open source. Someone might improved
upon his idea.
You already know that it's a pre-alpha
version since you've obviously
sacrificed your precious time to
write a comprehensive post.
Downloading and installing any
software that appears on the internet
without ever reading if it is useful
for you is outright stupid. And
reading that it is not for you and
complaining afterwards even more
so!
What happened to the release early and release often credo that Linux was built on.
I think it is great that it is released as soon as it is usable. The author very clearly stated the known bug so no one would have unreasonable expectations.
Hi, the id looks very interesting but the problem is that it seems there is nothing in the archive to download... Fix it as soon as possible please ;-)
Ratings & Comments
14 Comments
This is yet another brick into the wall of a Grand Unified User Interface. Not sure about the others, but when the dialog pops up, the interface to firefox freezes up until the dialog gives the input to the main program. Is this unavoidable, or is this a bug? Either way, good show! Dave
First of all thanks for this. It's not 100%, but it is a better "hack" than adding "FILEPICKER_CONTRACTID" to the file because this method uses the native kdialog. However, I was very disappointed, when I clicked on the options dropdown, that "Show Preview (F11)" was grayed out. I was very excited when I first saw this because I thought I'd finally be able to preview pics before uploading (like you can in Konqueror), but the option is grayed out. Any reason why, or how to enable it?
THANK YOU VERY,VERY MUCH!! I don't like this gnome-thing. It's ugly and uncomfortable. Just one example: creating a new folder before saving a new file and the filename disappears. So you have to close the dialog, open it and navigate once more to the newly created folder. This was really nasty, but since your hack I can use the KDE-dialog again which I appreciate much more. (Sorry for my bad english). Again: Thank you! :-)
maybe the gnome-dialog isn't so ugly, but it's still uncomfortable ;-)
If at first it doesn't work, don't give up hope!
Running Firefox 1.5.0.1 on KDE 3.5.2 and SuSE 10.0 for x86_64. Installed the patch as directed; no change. Double checked file permissions, etc. Still no change. Oh well.
I've learned to live with the GTK dialogs (sorta). Over the weekend, I went to download a file and HALLELUJAH! I now have KDE dialogs. Rejoice! Rejoice! (And scratch my head.)
To the author - thank you. Thank You. THANK YOU!
No more cumbersome (and ugly) GTK dialogs. Now I have the straightforward simplicity of native KDE dialogs. THANK YOU AGAIN!
I'm quite interested in this project, but I think I need something a little more stable for full time use. For those of you looking for a stabler alternative, you can get a nice KDEsque file picker by doing the following: 1. Find the original nsFilePicker.js as described above and open (as root) it in you favourite text editor. 2. Find the following section: -------------------------------------- compMgr.registerFactoryLocation(FILEPICKER_CID, "FilePicker JS Component", //@line 278 "/builds/tinderbox/Fx-Mozilla1.8/Linux_2.4.21-27.0.4.ELsmp_Depend/mozilla/xpfe/components/filepicker/src/nsFilePicker.js.in" "", //@line 280 "/builds/tinderbox/Fx-Mozilla1.8/Linux_2.4.21-27.0.4.ELsmp_Depend/mozilla/xpfe/components/filepicker/src/nsFilePicker.js.in" fileSpec, location, type); -------------------------------------- and change it so it looks as follows: -------------------------------------- compMgr.registerFactoryLocation(FILEPICKER_CID, "FilePicker JS Component", //@line 278 "/builds/tinderbox/Fx-Mozilla1.8/Linux_2.4.21-27.0.4.ELsmp_Depend/mozilla/xpfe/components/filepicker/src/nsFilePicker.js.in" FILEPICKER_CONTRACTID, //@line 280 "/builds/tinderbox/Fx-Mozilla1.8/Linux_2.4.21-27.0.4.ELsmp_Depend/mozilla/xpfe/components/filepicker/src/nsFilePicker.js.in" fileSpec, location, type); -------------------------------------- 3. You must then refresh the chrome registry (whatever that really means) by installing or unistalling an extension. 4. Restart Firefox/Thunderbird and do a "Save Link as..." and you should have a much more KDE friendly file picker. While this obviously isn't as good as having the official KDE file dialogues, it can certainly make saving and opening files less painful.
Thanks, Víctor, it works quite fine with Firefox and Thunderbird 1.5. But there's one issue with folders having accents in their names: if you try to attach something from one of them or if you try to save something to such a folder, Firefox/Thunderbird stops displaying any dialogs at all (kdialogs, I mean :-D). [ El inglés, por eduación y que me entiendan los demás ;-P ]
It's kinda stupid to release a package when you know there is a bug in it. An intelligent, responsible programmer would never do such a thing. When you say "it has a bug", you might as well be saying "here it is, but, don't download it as it won't work because it's not fixed yet and will only pollute your system".
What happened to the quality of programmer in recent years?
I started working on this yesterday. Troy wasn't conquered in one day. ;) I know there's a bug, that's why I warn it. I think it's clear this is a cutting-edge-alpha-version dirty hack. This is more like a preview so people see somebody's working on it and they can also help and report more bugs. Anyway, somebody may find this useful because when you open a file you don't usually move the file picker window. I'll continue working on this and maybe I make an update in 2 or 3 days with a trick to make Mozilla not freeze.
Pardon? I suppose you must be kidding or just trolling. What happened to the quality of *users* in recent years? Providing a software with a known major bug as a technology preview is absolutely justified - not only but especially when it comes to open source. Someone might improved upon his idea. You already know that it's a pre-alpha version since you've obviously sacrificed your precious time to write a comprehensive post. Downloading and installing any software that appears on the internet without ever reading if it is useful for you is outright stupid. And reading that it is not for you and complaining afterwards even more so!
What happened to the release early and release often credo that Linux was built on. I think it is great that it is released as soon as it is usable. The author very clearly stated the known bug so no one would have unreasonable expectations.
Hi, the id looks very interesting but the problem is that it seems there is nothing in the archive to download... Fix it as soon as possible please ;-)
fast !!! corrected just after i post the message lol
Certainly strange. I've just uploaded it to an external place (Mozillux) and I've changed the link. Try again now.