From kde-usability Sun Aug 17 13:10:01 2003 From: Ingo =?iso-8859-1?q?Kl=F6cker?= Date: Sun, 17 Aug 2003 13:10:01 +0000 To: kde-usability Subject: Re: ui guidelines clarification: Save As... X-MARC-Message: https://marc.info/?l=kde-usability&m=106112624926219 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============17357555722438223==" --===============17357555722438223== Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Boundary-03=_r63P/Je/w7sg+dd"; charset="iso-8859-1" Content-Transfer-Encoding: 7bit --Boundary-03=_r63P/Je/w7sg+dd Content-Type: multipart/mixed; boundary="Boundary-01=_p63P/PzTUmiXEZI" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_p63P/PzTUmiXEZI Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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=20 applications even if it was supported by all KDE apps. AFAICS the only solution is to make KMail flag all attachments (=3D=3D=20 temporary files) as read-only so that everyone who tries to edit them=20 notices that he can't save them. Unfortunately, then also attachments=20 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...=20 but not if he drags the attachment icon to let's say KWord. This leaves=20 us with the read-only flag as only possible solution. Any other suggestion? Otherwise I'll commit the attached patch which=20 flags all temporary attachment files as read-only. Regards, Ingo --Boundary-01=_p63P/PzTUmiXEZI Content-Type: text/x-diff; charset="iso-8859-1"; name="make_temporary_attachment_files_read-only.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="make_temporary_attachment_files_read-only.diff" Index: kmreaderwin.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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; =20 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 ); =20 return fname; } --Boundary-01=_p63P/PzTUmiXEZI-- --Boundary-03=_r63P/Je/w7sg+dd Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3rc1 (GNU/Linux) iD8DBQA/P36rGnR+RTDgudgRAnYaAKC5fooi2pvaFjzSGSaPmS6RAs+BjwCeLFbn zQfv+iQJCTza9BZ4oy9cGCo= =22QT -----END PGP SIGNATURE----- --Boundary-03=_r63P/Je/w7sg+dd-- --===============17357555722438223== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kde-usability mailing list kde-usability@mail.kde.org http://mail.kde.org/mailman/listinfo/kde-usability --===============17357555722438223==--