[PATCH] Encoding box in the file dialog

Ingo Klöcker kloecker at kde.org
Wed Sep 24 09:46:17 BST 2003


On Tuesday 23 September 2003 14:10, Carsten Pfeiffer wrote:
> On Sunday 21 September 2003 15:34, Andras Mantia wrote:
>
> Hi,
>
> >   Here is the implementation of what I've talked about some days
> > ago: mergin the Kate::FileDialog into KFileDialog. KFileDialog now
> > has a new ctor for text files which provides an encoding combo.
> >  Please review, and if there are no issues with it, I will commit,
> > as we basicly agreed with the parties involved. The users of
> > Kate::FileDialog will need to modify their code a little, as the
> > parameters for the new ctor are not in the same order and the
> > encoding setting must be queried with selectedEncoding() as it's
> > not provided as the result of exec().
>
> just one comment: wouldn't it be sufficient to have that
> functionality in a subclass, like KTextFileDialog, maybe also in
> kfile?

KTextFileDialog is a bad name for this class. If the user wants to 
attach a file in KMail, then KMail can't forsee whether this will be a 
text file or a binary file. For text files we need the encoding (cf. 
http://bugs.kde.org/show_bug.cgi?id=64815). So we would always have to 
use this subclass for the attachment file dialog. The suggested class 
name would be confusing (for me as developer) since it suggests that it 
can only deal with text files. I suggest to call it KExtendedFileDialog 
(in case it's really necessary to put this in a subclass).

KAddressBook and KOrganizer also need the encoding selection since 
(AFAIK) neither vCard nor vCal files have an encoding attribute.

Regards,
Ingo




More information about the kde-core-devel mailing list