Fix circular logic causing Pager to remain hidden

Authored by hein on Oct 9 2016, 9:42 AM.

Description

Fix circular logic causing Pager to remain hidden

Summary:
The Pager applet would transition to HiddenStatus if PagerModel.count
was smaller than 2, however hiding the root item would set
PagerModel.enabled to false, dropping the count to 0 and stopping
the window system monitoring, thus never transitioning the applet
back to ActiveStatus if the desktop or activity count increased again.

This patch introduces a new PagerModel.shouldShowPager property which
is updated even when the model is disabled, then used to drive both the
applet status and the enabled state of the model.

BUG:370324

Reviewers: Plasma, davidedmundson

Subscribers: plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D2990