.desktop file permissions dialog update

Michael Pyne mpyne at purinchu.net
Thu Feb 26 04:40:56 GMT 2009


Hi all,

Based on feedback of the current version of KRun's .desktop files permissions 
upgrade dialog, I've been working on reducing the text to the minimum 
necessary while making it clear what is about to be run.  This is my results 
right now (the hard part has been getting the QTextEdit to a sane size -- the 
attached patch has a hack to try and get a decent padding).

The following two screenshots are for a sane Exec= line, and a malicious/crazy 
Exec= line respectively.  The dialog is limited in maximum size (with the 
exec-line widget limited in minimum size) to hopefully prevent hiding text 
while still being more-or-less not completely ugly.

http://purinchu.net/dumping-ground/krun8.png
http://purinchu.net/dumping-ground/krun9.png

The attached code is from a sample application but would basically go into 
krun to replace the code already there.

Comments?  If it's better I'll go ahead and commit at some point tomorrow 
(with more revisions if necessary) and I'll move on to some other touchups I 
want to perform:

For instance, for "untrusted" .desktop files I'd do:
- Don't show custom icons (probably via KService::icon, but not 
KService::property)
- Show the real filename and not the encoded Name=

And in addition I think we should avoid doing mime-type detection to "sniff" 
out .desktop files, at least as far as icon views are concerned.

I've left open the possibility of an auto-upgrade script for existing .desktop 
files (assuming user says OK) but I don't intend to implement one myself, 
preferring instead to get our perms dialog to be polished and shiny.

Finally, I'd like to backport to KDE 4.2 once we have the dialog finalized and 
the code is working well.  I know that David has committed some fixes to the 
initial patch set so there were things overlooked before.  Is anyone having 
issues using the latest kdelibs from trunk?  If so please let me know so we 
can get those ironed out in support of backporting.

Regards,
 - Michael Pyne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090225/0950ca9a/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: window.cpp
Type: text/x-c++src
Size: 5041 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090225/0950ca9a/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090225/0950ca9a/attachment.sig>


More information about the kde-core-devel mailing list