Skip to content

[kcm/libkcups/kded]: Handle printer "configure" requests/events via kcm

Mike Noe requested to merge work/noee/kded-call-kcm into master

Currently the kded notifier calls the legacy add-printer app to handle configure events. To port away, this MR makes the following changes:

  • kcm: Add command line support, process and notify
  • libkcups: Rework to open kcm with command line args
  • kded: adapt "configure" events to call kcm

See commits.

Testing:

From the terminal:

  • systemsettings kcm_printer_manager --args --add-printer
  • systemsettings kcm_printer_manager --args --add-group
  • systemsettings kcm_printer_manager --args "--configure-printer <printerName>"

If the command arg is unknown, it just prints a warning to the console and the kcm just appears as normal. And, of course, you can call just systemsettings kcm_printer_manager to just open the kcm as per normal.

  • You can exercise the dbus interfaces with your tool of choice using these signatures:
    <method name="GetReady">
    </method>
    <method name="NewPrinter">
        <arg direction="in" type="i" name="status" />
        <arg direction="in" type="s" name="name" />
        <arg direction="in" type="s" name="mfg" />
        <arg direction="in" type="s" name="mdl" />
        <arg direction="in" type="s" name="des" />
        <arg direction="in" type="s" name="cmd" />
    </method>
Edited by Mike Noe

Merge request reports

Loading