<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Droid Sans Mono'; font-size:10pt; font-weight:400; font-style:normal;">Hi all,<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>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).<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>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.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>http://purinchu.net/dumping-ground/krun8.png<br>
http://purinchu.net/dumping-ground/krun9.png<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>The attached code is from a sample application but would basically go into krun to replace the code already there.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>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:<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>For instance, for "untrusted" .desktop files I'd do:<br>
- Don't show custom icons (probably via KService::icon, but not KService::property)<br>
- Show the real filename and not the encoded Name=<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>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.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>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.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>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.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Regards,<br>
 - Michael Pyne</p></body></html>