kdeplasma-addons/applets/pastebin: add two new options
Review Request #117041 - Created March 25, 2014 and discarded
|apol, dhaumann, sebas|
Summary ------- Add two options: 1. Show confirmation before sending (to prevent accidental sending of maybe sensible data) 2. Appearance: Restrict width on large host panel (to prevent huge icon on large panels) How does this change manifest on screen? ---------------------------------------- Settings dialog: - before change: http://wstaw.org/m/2014/03/25/plasma-desktopXL1751.png - after change: http://wstaw.org/m/2014/03/25/screenshot_default.png Behaviour: 1. "Show confirmation before sending" turned on and after dropping an image: http://wstaw.org/m/2014/03/25/plasma-desktopGd1751.png 2. "Appearance: Restrict width on large host panel" - turned off (default): http://wstaw.org/m/2014/03/25/plasma-desktopOt1751.png (pretty big compared to other icons in system tray) - turned on (new): http://wstaw.org/m/2014/03/25/plasma-desktopOL1751.png (the width is restricted so it does not eat up horizontal space) Open issues ----------- - Is there a default "review board TARGET_GROUP" for kdeplasma-addons review-request? @apol: I saw that in the frameworks branch you replaced pastebin with quickshare. I haven't had the chance to test it out. Does it already have the same features as pastebin?
See screenshots in description. Test if settings are getting stored. Test with different form factors (horizontal, vertical).
The frameworks version is ready, but the GUI is a complete rewrite as in Plasma 2, C++ plasmoids are not supported. Personally, I don't think these options are needed: 1. I've never had a problem with accidentally sharing anything. 2. the plasmoid should have enough resources to know what size it should be. I would prefer a saner default. Regarding the group, you should use plasma.
Makes sense to me, except for some minor suggestions. I don't think it'll hurt to have this added in the 4.x cycle. Since this plasmoid is not available in KF5 exactly in this form, I don't see an issue having this for now only in 4.x. If required, it can still be added to KF5 later. It's up to the plasma guys to give a ship-it, though :-)
If the "don't show again" checkbox is added, I'd initialize this to true.
You could use the dontAskAgainName here to add a checkbox to the dialog: KMessageBox::questionYesNo( QWidget *parent, const QString &text, const QString &caption=QString(), const KGuiItem &buttonYes = KStandardGuiItem::yes(), const KGuiItem &buttonNo = KStandardGuiItem::no(), const QString &dontAskAgainName = QString(), Options options=Notify) After this message box, you can check with shouldBeShownYesNo(...) whether for the checkbox result and adapt the variable m_configShowConfirmationBeforeSending, see http://api.kde.org/4.12-api/kdelibs-apidocs/kdeui/html/kmessagebox_8h_source.html for existing methods.
In theory, this could also show the data (the text and imageData are already available as arguments). That could either be done through using html inside the i18n() string, or more sophisticated through an extra Dialog. Needs to be tried out.
Review request changed
Review request changed
Hi Sebastian, Dominik suggested that you might give input to this review request. The code is now at a "shipitable" state. Maybe one of you core plasma guys could confirm that. There is one minor issue, though: When unchecking (and only then) the new "Restrict width on large host panel" checkbox the applet size is not updated until a resize event occurs. The other way round (checking the checkbox) it works well (applet width -- or height -- is immediately restricted). So if you see how to fix this at once that would be appreciated. If it would consume too much time to find the cause, it won't hurt to leave it like it is since in the end all applets should be ported to QML anyway. Thanks & Best regards