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

List:       koffice-devel
Subject:    Re: Always open with this template weirdness
From:       David Faure <faure () kde ! org>
Date:       2005-07-09 23:07:09
Message-ID: 200507100107.09779.faure () kde ! org
[Download RAW message or body]

On Friday 08 July 2005 16:38, Boudewijn Rempt wrote:
> I haven't found the exact pattern yet but it happens in all koffice apps that 
> I have tried: at one point in time the switch "Always open with this 
> template" gets switched on without me actually clicking on that checkbox -- 
> next time I start the app I get the template immediately, instead of the nice 
> template dialog.

Strange. Must be a bug ;)

> I'd investigate this if I was sure that the checkbox is actually useful in 
> itself; I'd prefer if the template/open/recent dialog was always shown.

It is useful. It was implemented because of many users who complained about
getting that dialog on every startup, and wanted a more traditional "open the
app showing me an empty document" behavior (like almost all other office
suites do).

> Oh, and what's the KOffice standard on this: open a file, don't modify, 
> immediately open another file. Should the second file replace the first in 
> its view, or should it be opened in its own view? I'd prefer the latter, but 
> there has been a bug report in Krita about it: 
> http://bugs.kde.org/show_bug.cgi?id=108399 and I fixed it, but it makes it 
> quite hard to open a number of images at the same time.

The KOffice standard is: if the document you first opened isn't "empty",
then it doesn't get replaced. The definition of empty is: an unmodified template.
So if you open an old document of yours, then another one, the first one does NOT
get replaced. This is useful for comparing two documents, or working on two
documents at once, or reading something up in one before editing another, etc.

To achieve this, the KoDocument-derived class should simply call setEmpty()
when loading a template and in the KoTemplateChooseDia::Empty case.
When loading an existing file KoDocument takes care of setting empty to false,
and in addition, any call to setModified(true) sets empty to false too.


-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel

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

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