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

List:       koffice-devel
Subject:    Re: Opening the same file twice
From:       Anders Lund <anders () alweb ! dk>
Date:       2004-04-15 8:39:21
Message-ID: 200404151039.32983.anders () alweb ! dk
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 10 March 2004 14:20, David Faure wrote:
> > > 2. You open a file that has already been opened. This is a real life
> > > situation and even more so in linux than in Windows because most of us
> > > work on several desktops. When I do portfolio-updates I sometimes open
> > > 10 of them. In MS-Excel there all on the same desktop, all different
> > > windows inside the same application (I prefer it that way for this type
> > > of work). With KSpread you have 10 windows, but if you shuffle your
> > > work around on your desktops you can easily find yourself editing the
> > > same file twice! Saving it twice and losing half of your work without
> > > being aware of it. So this is a second reason why the read-only feature
> > > could be helpfull.
> > >
> > > As to the way to implement it...there are several ways of doing it. I
> > > think that checking if you have write permission must be possible, so
> > > that covers situation 1. For situation 2 a hack could be to write a
> > > semaphor file to the same directory as the directory of the original
> > > file. This file could have 0 bytes, same name, same extension + an
> > > agreed extra extension. Writing this file will be possible because it
> > > comes after the check for (1) and is only needed in case someone opens
> > > the other file for writing. On File|Close and File|Quit the semaphor
> > > file should be removed.

Well, since I am just working on that, it came to mind that Katepart has a 
related feature: the [in]famous "modified on disk" warnings (they are 
optional, and must be enabled on application level).

For those who does not know, katepart is monitoring all *local* open files 
(via kdirwatcher) and warning the user about changes when the user tries to 
close/save/reload modified files, in the future there will also be a check 
when a katepart view or kate editor main window gets focus, and soon we will 
even be able to use komparepart to merge changes if installed.

I don't know if this sort of system would be of interrest to other types of 
editors as well.

- -anders
- -- 
Document your code
Check before committing
Shoot spammers

Given the ugliness of the gmail service, I think everybody
with a democratic mind should stop using google at all.
=== Support democracy and individual freedom ===
=== Find yourself a different search service ===
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAfkpDyyMSZA8sCCYRAkSaAJ0W/DchTCsIEEhMvtBCZT9r7JMi1wCfezQY
dv04PPMdo36snHKrbKok/7Y=
=3pba
-----END PGP SIGNATURE-----
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.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