[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 70630] Better file cleanup or tidying
From:       Jeroen Wijnhout <Jeroen.Wijnhout () kdemail ! net>
Date:       2004-01-16 18:49:51
Message-ID: 20040116184951.16830.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
      
http://bugs.kde.org/show_bug.cgi?id=70630      




------- Additional Comments From Jeroen.Wijnhout@kdemail.net  2004-01-16 19:49 -------
Subject: Re:  Better file cleanup or tidying

On Friday 16 January 2004 19:32, Sean Clarke wrote:
> 19:32 ------- Hmm.. I've implemented it differently (perhaps that's why it
> was easy?)

My suggestions do not differ that much, really. Basically you can copy & paste 
the Kile::cleanAll() code to KileDocumentInfo::cleanUp().

> I've added a new option to the KileConfigDialog, under the "Reopen files
> and projects on startup." called something like "Clean temp files on
> document/project close". This sets a new option in the KConfig object under
> "Files", "AutoCleanUp" etc.

This is ok.

> Then in Kile::fileClose() I check to see if this file is part of a project,
> if not I call the Kile::CleanAll()... you are right, presently I get the
> confirmation dialog box (hey it is WIP :-) ), what I was going to do is
> pass a parameter into CleanAll that determines if the dialog box is
> displayed. The default would be true, but when I "auto" tidy up it would be
> false and hence no dialog appears.

This is not bad, but it just doesn't make a lot of sense to ask confirmation 
is one case (manual clean up) and not in the automatic case (after closing a 
file). Therefore I think it is better just have one behaviour and to 
configure the list of extensions in the configuration dialog.

> Note with this method even when the user is not asked what files to delete
> it still uses the same list of file extensions, so I could implement a user
> selectable list (series of checkboxes? or other QT widget) and that would
> set the CleanUp configuration for both the file close and manual clean up.

This is also a way to go. You can probably use a KListBox with some special 
KListBoxItems. We can, of course, let the user decide whether or not to show 
the pop-ups (yes, another config option).

> I thought about KileDocumentInfo, but thought the "Automatic cleanup" was a
> kile configuration rather than document configuration issue.
>
> Is this not acceptable/incorrect?

It is just cleaner (no pun intended). In principle the list of files to delete 
can vary for different documents. So if we later to decide to have subclasses 
of KileDocumentInfo we can just make cleanUp() virtual and reimplement it for 
each subclass. But the biggest advantage is that we can call 
KileDocumentInfo::cleanUp() from the KileProject class. This makes it easy to 
make a KileProject::cleanUp() method.

best,
Jeroen
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic