Review Request 128188: [OS X] Show job progress with Dock icon badge

René J.V. Bertin rjvbertin at gmail.com
Thu Jun 16 10:20:07 UTC 2016



> On June 14, 2016, 9:30 p.m., Kai Uwe Broulik wrote:
> > What QtCreator actually does and what I actually wanted to have was the number of build errors/warnings in the dock, not the amount of running jobs.
> > 
> > Also, it seems the background parser is registered as regular job and totally screws up the total progress I calculate. :/
> 
> Kevin Funk wrote:
>     Oh, I just confused what the 'badge text' actually is. I'm with Kai here, that's what I'd like to see, too.
> 
> René J.V. Bertin wrote:
>     I made but forgot to add a screenshot; corrected. Not that there's anything one can control about how the badge looks...
>     
>     There's no reason one couldn't have both a progress indicator and an error/warnings count, provided there's an appropriate place to store that count so it can be restored by the RunController. Where does one find the information? FWIW: Qt Creator/Mac only shows the number of errors on the Dock icon.
>     
>     You're absolutely right that the current progress indicator isn't ideal. Usually applications show a true progress bar on the Dock icon (there's a stale one left on the App folder icon in my screenshot). Creator does this too, despite the fact there doesn't seem to be anything foreseen in Qt to obtain such a display. I'll have a look how they implement that.
>     
>     Kai: that remark about the parser progress confuses me. It doesn't seem to screw up anything in the calculation we make, it is simply missing. Does the background parser put up its own progress bar in that lower-right corner, a bit like Kdevelop4 could have multiple progress bars showing up when you activate the detailed view?
> 
> Kai Uwe Broulik wrote:
>     I think the badge should be used for errors but I failed to find if/where to find that information in KDevPlatform. It's a bit unfortunate that NSDockTile has no pre-made progress indicator.
>     
>     Re the parser progress, my implementation is directly in RunController and so gets all jobs whereas yours is in the progress widget which seems to be able to tell between indeterminate jobs like the parser and regular jobs like building. So we should probably move the Unity stuff there as well. Dunno, at least both things should be in the same place.

> I think the badge should be used for errors but I failed to find if/where to find that information

That makes 2 of us. It is probably available through each of the build system plugins (make, ninja, ...). Someone ought to know, too.

> It's a bit unfortunate that NSDockTile has no pre-made progress indicator.

Maybe I should ask around, because the various Apple applications that put up such a display all seem to use the same implementation, with rounded corners and all. I looked into implementing that myself, but it's clearly going to be more complicated than probably justified (which is probably also why Creator doesn't do it). The API is a bit surprising. It took me a while to understand what the code is doing. I always thought NSRects were simple structures, but apparently there's some magic associated with them that makes you can register one as a source for future painting operations.

I saw the differences between our implementations, mine was based on yours first, before I moved it to the process widget so that it *really* gets all jobs :)
The only thing I should still figure out is how to detect if the QProgressBar is in indeterminate mode, and then whether/how to adapt the Dock indicator.


- René J.V.


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128188/#review96500
-----------------------------------------------------------


On June 15, 2016, 11:18 p.m., René J.V. Bertin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128188/
> -----------------------------------------------------------
> 
> (Updated June 15, 2016, 11:18 p.m.)
> 
> 
> Review request for KDE Software on Mac OS X and KDevelop.
> 
> 
> Repository: kdevplatform
> 
> 
> Description
> -------
> 
> This is a follow-up to https://git.reviewboard.kde.org/r/127050/, providing a job progress indication in the Dock (and app switcher), by badging the application icon.
> 
> Is it correct that the `RunController` is not used by the (Clang) parser? If so, shouldn't this progress indication (and the Unity one) be moved to the method that updates the progress bar in KDevelop's lower right corner?
> 
> 
> Diffs
> -----
> 
>   shell/CMakeLists.txt 19a9560 
>   shell/macdockprogressview.h PRE-CREATION 
>   shell/macdockprogressview.mm PRE-CREATION 
>   shell/progresswidget/statusbarprogresswidget.cpp 1a32ea8 
> 
> Diff: https://git.reviewboard.kde.org/r/128188/diff/
> 
> 
> Testing
> -------
> 
> Works on OS X 10.9.5 with Qt 5.6.0 and frameworks 5.22.0
> 
> 
> File Attachments
> ----------------
> 
> progress badge on a Dock icon
>   https://git.reviewboard.kde.org/media/uploaded/files/2016/06/14/e800031a-378b-46fb-88cf-ee55c78d7a1f__Screen_Shot_2016-06-14_at_20.30.55.png
> dock icon with progress bar
>   https://git.reviewboard.kde.org/media/uploaded/files/2016/06/14/295a93b7-3802-4501-b2dc-3bdf8fa4048b__Screen_Shot_2016-06-15_at_00.02.05.png
> 
> 
> Thanks,
> 
> René J.V. Bertin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20160616/bceaa208/attachment-0001.html>


More information about the KDevelop-devel mailing list