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

List:       kde-devel
Subject:    Re: ui guidelines clarification: Save As...
From:       Ingo =?iso-8859-1?q?Kl=F6cker?= <kloecker () kde ! org>
Date:       2003-08-17 13:10:01
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


On Friday 15 August 2003 12:39, Friedrich W. H. Kossebau wrote:
> Am Freitag, 15. August 2003 00:33 schrieb Aaron J. Seigo:
> > Hi...
> >
> > applications that allow saving of the contents of what they display
> > but not the editting of the content itself (Konqueror, kmail,
> > KGhostView), they offer a Save As.. option but no Save...
>
> Important: There are even apps that should drop "Save" and only
> display "Save as..." in certain circumstances. Like KWord displaying
> an email attachment. Try this with the "Secure Screen Locking"
> attachment (found close to this thread in kde-usability mailing
> list):
> 1. open attachment with KWord
> 2. insert something, e.g. "new text"
> 3. Alt-S or click "Save"
> 4. Exit KWord
> 5. Exit KMail (cleans /tmp/kde-user/kmail... dir)
> 6. Start KMail
> 7. Open attachment and find changes gone! But you haven't been
> warned!
>
[snip]
>
> Does someone know of a general solution for this? Using the
> filesystem might not work as the only idea I have is to use the
> readonly flag which is not limited to temporary files so it's not
> definite. Perhaps using a standard command parameter --fromtemporary?
> Duh, I have my head at something else right now...

Using a command line parameter won't work with the thousands of non-KDE 
applications even if it was supported by all KDE apps.

AFAICS the only solution is to make KMail flag all attachments (== 
temporary files) as read-only so that everyone who tries to edit them 
notices that he can't save them. Unfortunately, then also attachments 
which are dragged from KMail to a Konqueror window would be read-only.

Showing a warning in KMail would only work if the user uses RMB->Open... 
but not if he drags the attachment icon to let's say KWord. This leaves 
us with the read-only flag as only possible solution.

Any other suggestion? Otherwise I'll commit the attached patch which 
flags all temporary attachment files as read-only.

Regards,
Ingo


["make_temporary_attachment_files_read-only.diff" (text/x-diff)]

Index: kmreaderwin.cpp
===================================================================
RCS file: /home/kde/kdepim/kmail/kmreaderwin.cpp,v
retrieving revision 1.691
diff -u -3 -p -r1.691 kmreaderwin.cpp
@@ -1374,6 +1374,9 @@ QString KMReaderWin::writeMessagePartToT
     return QString::null;
 
   mTempFiles.append( fname );
+  // make file read-only so that nobody gets the impression that he might
+  // edit attached files (cf. bug #52813)
+  ::chmod( QFile::encodeName( fname ), S_IRUSR );
 
   return fname;
 }

[Attachment #8 (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


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

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