D25186: Update internal printer enabled/paused state if it changes externally

Jonathan Marten noreply at phabricator.kde.org
Thu Nov 7 08:46:41 GMT 2019


marten created this revision.
marten added reviewers: dantti, broulik, ngraham.
Herald added a subscriber: kde-utils-devel.
marten requested review of this revision.

REVISION SUMMARY
  This means the internal enabled/disabled state of the printer, as tracked by isPaused in plasmoid/package/contents/ui/PrinterItem.qml and used to control the state of the play/pause button and the opacity of the printer name.  If the printer state is changed by some external action, e.g. CUPS detecting a printer problem or the cupsenable/cupsdisable commands being used, the applet does not notice the change and still retains the previous state.
  
  This change watches for state changes from the PrinterModel and updates the internal state (and therefore the GUI) appropriately.  It could be more selective, but I've tried to guard against spurious property changes (so hopefully signals and redrawing) by only changing the isPaused property if necessary.

TEST PLAN
  Run the unmodified print manager, observe that a working printer shows the name in black and the hover button shows the "pause" icon.  Use the cupsdisable command to disable the printer, note that the UI does not change.
  
  Run the modified print manager, observe that if a printer is disabled using the cupsdisable command then the printer name turns grey and the hover button shows the "play" icon.  Enable the printer using the cupsenable command and observe that the printer name returns to black and the hover button shows "pause" again.

REPOSITORY
  R363 Print Manager

REVISION DETAIL
  https://phabricator.kde.org/D25186

AFFECTED FILES
  plasmoid/package/contents/ui/PrinterItem.qml

To: marten, dantti, broulik, ngraham
Cc: kde-utils-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20191107/6e107d25/attachment.html>


More information about the Kde-utils-devel mailing list