<div dir="ltr"><div>Hello everyone,</div><div><br></div><div>It's been a while. Yesterday I somehow ended up playing with Screenshooter's codebase and implemented a couple of tiny things. It was a bit of an organic thoughtless process so many of these bits do not have an associated bug report, and I'd like to have Xfce devs' opinions on each of the changes I made in my branch:</div>
<div><br></div><div>The branch can be found here: <a href="https://github.com/Sidnioulz/xfce4-screenshooter">https://github.com/Sidnioulz/xfce4-screenshooter</a></div><div><br></div><div>2014-04-28 Steve Dodier-Lazaro <<a href="mailto:sidi@xfce.org">sidi@xfce.org</a>></div>
<div><br></div><div> * lib/screenshooter-utils.c: Fixed help callback not working properly. Fixes two open bugs.</div><div> <a href="https://github.com/Sidnioulz/xfce4-screenshooter/commit/9d9d4bb38a8bc64b4da42eb11377239f8f5d11f1">https://github.com/Sidnioulz/xfce4-screenshooter/commit/9d9d4bb38a8bc64b4da42eb11377239f8f5d11f1</a></div>
<div><br></div><div> * lib/screenshooter-capture.c, <a href="http://configure.ac.in">configure.ac.in</a>, Makefile.am: Notify the ability to cancel a</div><div> region selection with Esc -- this is somewhat controversial as it requires a dependency to </div>
<div> libnotify -- however that lib is already used by xfce4-volumed, xfce4-power-manager, Thunar and</div><div> obviously xfce4-notify so it would be problematic only for a subset of users. Of course there's</div>
<div> a compile-time switch. I'd like the change to occur to improve the learnability of the feature.</div><div> <a href="https://github.com/Sidnioulz/xfce4-screenshooter/commit/3213b49f33a418f4f905c05cab357de76ce79112">https://github.com/Sidnioulz/xfce4-screenshooter/commit/3213b49f33a418f4f905c05cab357de76ce79112</a></div>
<div><br></div><div> * lib/screenshooter-(capture,dialogs).c, src/main.c: No longer waiting a whole second for a</div><div> screenshot, but 200ms -- increase if people report bugs. Also controversial as in theory this</div>
<div> increases the likelihood of bad screenshots being generated. However there is no evidence that</div><div> the current 1000ms is the right value -- it was set this way only because the original authors</div><div>
used the seconds spinner's min value to implement the feature. If 200ms turns out to be a bit </div><div> short for old computers, they can either leave the delay of 1 second in the spinner or the value</div><div>
can be increased. It makes for a much nicer experience on those modern computers that can redraw</div><div> a dialog in under 200ms.</div><div> <a href="https://github.com/Sidnioulz/xfce4-screenshooter/commit/fc75b69e7eb7dc827b3d185b58bd491d0b3372ac">https://github.com/Sidnioulz/xfce4-screenshooter/commit/fc75b69e7eb7dc827b3d185b58bd491d0b3372ac</a></div>
<div><br></div><div> * lib/screenshooter-(actions,dialogs,utils,zimagez).(c,h): When an action fails (app launch,</div><div> clipboard, save to disk, etc), return to actions dialog rather than quitting. The reason behind</div>
<div> this change is that if you've gone through the pain of saving a screenshot AND selecting an</div><div> action to save it, it's pretty likely you *want* to take that screenshot. If you've needed some</div>
<div> effort to make the screenshot (anything region or timing-based) then you don't want that effort</div><div> wasted on Screenshooter exiting as soon as you press Esc. Now, if your action is cancelled or</div>
<div> fails (wrong credentials to zimagez, clipboard unavailable, save file dialog was destroyed or</div><div> the app you selected could not be launched) then Screenshooter will try its best to detect it</div><div>
and return to the previous menu. Similarly, the Save and Upload dialogs now have a 'Back'</div><div> button because it fits better with the philosophy of this commit. The commit also changes the</div><div> error dialog util, adding some markup and giving a nicer error message for when apps can't be</div>
<div> launched. I didn't iterate through all error messages though... probably should do that if this</div><div> commit is considered for inclusion.</div><div> <a href="https://github.com/Sidnioulz/xfce4-screenshooter/commit/8c2dfdbd537b6896b68cdedcc62dd8e16f0c26bf">https://github.com/Sidnioulz/xfce4-screenshooter/commit/8c2dfdbd537b6896b68cdedcc62dd8e16f0c26bf</a></div>
<div><br></div><div> * lib/screenshooter-zimagez.c: Do not respawn theZimageZ dialog upon closing it or pressing 'Esc'</div><div> I think this is what caused me to hack in the first place! Self-explanatory and badly needed in</div>
<div> my not-so-humble opinion :)</div><div> <a href="https://github.com/Sidnioulz/xfce4-screenshooter/commit/c5128fa554c3e4c2bdba3a11bd22a895374a19fb">https://github.com/Sidnioulz/xfce4-screenshooter/commit/c5128fa554c3e4c2bdba3a11bd22a895374a19fb</a></div>
<div><br></div><div> * src/main.c: Removed deprecated GThread functions -- this is now automatically done by the GLib.</div><div> I'm not sure if people still run the old GLib that does not have automatic GThread init. If yes,</div>
<div> then a compile-time switch could be added based on the detected GLib version. It's not a big</div><div> deal in any way, just code cleanup.</div><div> <a href="https://github.com/Sidnioulz/xfce4-screenshooter/commit/74b6151db6e39d7fe3ed5b05389c1910424e3b02">https://github.com/Sidnioulz/xfce4-screenshooter/commit/74b6151db6e39d7fe3ed5b05389c1910424e3b02</a></div>
<div><br></div><div>If you know of other (quick to write) UX improvements that are badly needed (and not in the bugzilla), please do tell me (except storing the Zimagez password in cleartext ;) ).</div><div><br></div><div>
Thanks,</div><div>-- </div><div>Steve Dodier-Lazaro</div><div>PhD Student in Information Security</div><div>University College London</div><div>Free Software Developer</div><div>OpenPGP : 1B6B1670</div></div>