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

List:       koffice
Subject:    RE: kword doc not saved
From:       "David Stidolph" <dstidolph () broadjump ! com>
Date:       2001-05-28 19:11:51
[Download RAW message or body]

When you handle a read-only file I see several possiblities (let the
user set options as to what default action should be):

[ ] Warn user with dialog on open (or just something in a status area
and/or the title).
[ ] Do not allow editing the file
[ ] Have method to switch read-only state
[ ] Allow to save to another filename (suggest same name with (2) added
to it).

Anyway, that is my $0.02.

David Stidolph

-----Original Message-----
From: Richard Bos [mailto:allabos@freeler.nl]
Sent: Monday, May 28, 2001 4:05 PM
To: koffice@master.kde.org
Subject: Re: kword doc not saved


On Monday 28 May 2001 13:38, David Faure wrote:
> On Monday 28 May 2001 08:23, Richard Bos wrote:
> > I encountered a grave bug when saving a kword; there is no warning
that a
> > document is readonly!  Due to this lost changes I made to a document
> > twice.
> >
> > reproduction:
> > - have a kword file under user X with permissions rw-r--r--
> > - login (or su) as a different user Y
> > - ls -l above mentioned file
> > - read the above mentioned file in kword
> > - make changes to the file
> > - ls -l above mentioned file
> >    the file remains the same!!
>
> Ouch. Turns out to be a KTarGz bug - it didn't check for the result of
> device->open() ! Fixed.
> Now the standard "could not save" error dialog box pops up, so you
know you
> have to save under another name.

Thanks a lot!!

> Still to be done are:
> * better handling of error cases (being able to show a more
descriptive
> error message - QFile doesn't really help doing that though...)

> * handling of read-only files, making the document really read-only
until
> it gets saved under another name ? Hmm, is that a good thing to do
anyway ?

It would be good to get a warning when opening the file, that says the
file 
is readonly just like "vi" does.  After that the user knows he is
editing a 
readonly file and the file should be changed at another location or
(s)he 
decides to quit and get a writable version of the document.

I submitted a bug report (as a todo action)

-- 
Richard Bos
For those who have no (/)home the journey is endless

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

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