From: Michael R Sweet Date: Wed, 7 May 2025 15:52:05 +0000 (-0400) Subject: Use printer-modified event when changing the default printer (Issue #1246) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0871f341ac38fea4f43441b592a1163ee344166c;p=thirdparty%2Fcups.git Use printer-modified event when changing the default printer (Issue #1246) --- diff --git a/CHANGES.md b/CHANGES.md index a1e82cdd68..ef8457ef02 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,8 @@ CHANGES - OpenPrinting CUPS Changes in CUPS v2.4.13 (YYYY-MM-DD) ------------------------------------ +- Updated the scheduler to send the "printer-modified" event whenever the system + default printer is changed (Issue #1246) - Fixed a memory leak in `httpClose` (Issue #1223) - Fixed missing commas in `ippCreateRequestedArray` (Issue #1234) - Fixed subscription issues in the scheduler and D-Bus notifier (Issue #1235) diff --git a/scheduler/ipp.c b/scheduler/ipp.c index 1b3769ce09..68b8be99cb 100644 --- a/scheduler/ipp.c +++ b/scheduler/ipp.c @@ -10503,10 +10503,10 @@ set_default(cupsd_client_t *con, /* I - Client connection */ DefaultPrinter = printer; if (oldprinter) - cupsdAddEvent(CUPSD_EVENT_PRINTER_STATE, oldprinter, NULL, + cupsdAddEvent(CUPSD_EVENT_PRINTER_MODIFIED, oldprinter, NULL, "%s is no longer the default printer.", oldprinter->name); - cupsdAddEvent(CUPSD_EVENT_PRINTER_STATE, printer, NULL, + cupsdAddEvent(CUPSD_EVENT_PRINTER_MODIFIED, printer, NULL, "%s is now the default printer.", printer->name); cupsdMarkDirty(CUPSD_DIRTY_PRINTERS | CUPSD_DIRTY_CLASSES |