Index: scheduler/subscriptions.c
===================================================================
--- scheduler/subscriptions.c	(revision 7251)
+++ scheduler/subscriptions.c	(working copy)
@@ -504,9 +504,14 @@
     case CUPSD_EVENT_PRINTER_MODIFIED :
         return ("printer-modified");
 
+    case CUPSD_EVENT_PRINTER_QUEUE_ORDER_CHANGED :
+        return ("printer-queue-order-changed");
+
+    case CUPSD_EVENT_PRINTER_STATE :
     case CUPSD_EVENT_PRINTER_STATE_CHANGED :
         return ("printer-state-changed");
 
+    case CUPSD_EVENT_PRINTER_CONFIG :
     case CUPSD_EVENT_PRINTER_CONFIG_CHANGED :
         return ("printer-config-changed");
 
@@ -529,8 +534,6 @@
         return ("job-progress");
 
     case CUPSD_EVENT_JOB_STATE :
-        return ("job-state");
-
     case CUPSD_EVENT_JOB_STATE_CHANGED :
         return ("job-state-changed");
 
@@ -577,14 +580,14 @@
     return (CUPSD_EVENT_PRINTER_DELETED);
   else if (!strcmp(name, "printer-modified"))
     return (CUPSD_EVENT_PRINTER_MODIFIED);
+  else if (!strcmp(name, "printer-queue-order-changed"))
+    return (CUPSD_EVENT_PRINTER_QUEUE_ORDER_CHANGED);
   else if (!strcmp(name, "printer-state-changed"))
     return (CUPSD_EVENT_PRINTER_STATE_CHANGED);
   else if (!strcmp(name, "printer-config-changed"))
     return (CUPSD_EVENT_PRINTER_CONFIG_CHANGED);
   else if (!strcmp(name, "printer-changed"))
     return (CUPSD_EVENT_PRINTER_CHANGED);
-  else if (!strcmp(name, "job-state"))
-    return (CUPSD_EVENT_JOB_STATE);
   else if (!strcmp(name, "job-created"))
     return (CUPSD_EVENT_JOB_CREATED);
   else if (!strcmp(name, "job-completed"))
Index: scheduler/subscriptions.h
===================================================================
--- scheduler/subscriptions.h	(revision 7247)
+++ scheduler/subscriptions.h	(working copy)
@@ -20,47 +20,52 @@
 typedef enum
 {
   /* Individual printer events... */
-  CUPSD_EVENT_PRINTER_RESTARTED = 0x0001,
+  CUPSD_EVENT_PRINTER_STATE = 0x0001,	/* Sent after generic printer state change */
+  CUPSD_EVENT_PRINTER_RESTARTED = 0x0002,
 					/* Sent after printer restarted */
-  CUPSD_EVENT_PRINTER_SHUTDOWN = 0x0002,/* Sent after printer shutdown */
-  CUPSD_EVENT_PRINTER_STOPPED = 0x0004,	/* Sent after printer stopped */
-  CUPSD_EVENT_PRINTER_FINISHINGS_CHANGED = 0x0008,
+  CUPSD_EVENT_PRINTER_SHUTDOWN = 0x0004,/* Sent after printer shutdown */
+  CUPSD_EVENT_PRINTER_STOPPED = 0x0008,	/* Sent after printer stopped */
+
+  CUPSD_EVENT_PRINTER_CONFIG = 0x0010,	/* Send after add/modify changes attrs */
+  CUPSD_EVENT_PRINTER_FINISHINGS_CHANGED = 0x0020,
 					/* Sent after finishings-supported changed */
-  CUPSD_EVENT_PRINTER_MEDIA_CHANGED = 0x0010,
+  CUPSD_EVENT_PRINTER_MEDIA_CHANGED = 0x0040,
 					/* Sent after media-supported changed */
-  CUPSD_EVENT_PRINTER_ADDED = 0x0020,	/* Sent after printer added */
-  CUPSD_EVENT_PRINTER_DELETED = 0x0040,	/* Sent after printer deleted */
-  CUPSD_EVENT_PRINTER_MODIFIED = 0x0080,/* Sent after printer modified */
+  CUPSD_EVENT_PRINTER_ADDED = 0x0080,	/* Sent after printer added */
+  CUPSD_EVENT_PRINTER_DELETED = 0x0100,	/* Sent after printer deleted */
+  CUPSD_EVENT_PRINTER_MODIFIED = 0x0200,/* Sent after printer modified */
+  CUPSD_EVENT_PRINTER_QUEUE_ORDER_CHANGED = 0x0400,
+					/* Sent when the order of jobs is changed */
 
   /* Convenience printer event groupings... */
-  CUPSD_EVENT_PRINTER_STATE_CHANGED = 0x0007,
-					/* RESTARTED + SHUTDOWN + STOPPED */
-  CUPSD_EVENT_PRINTER_CONFIG_CHANGED = 0x0018,
-					/* FINISHINGS_CHANGED + MEDIA_CHANGED */
-  CUPSD_EVENT_PRINTER_CHANGED = 0x00ff,	/* All of the above */
+  CUPSD_EVENT_PRINTER_STATE_CHANGED = 0x000f,
+					/* STATE + RESTARTED + SHUTDOWN + STOPPED */
+  CUPSD_EVENT_PRINTER_CONFIG_CHANGED = 0x0070,
+					/* CONFIG + FINISHINGS_CHANGED + MEDIA_CHANGED */
+  CUPSD_EVENT_PRINTER_CHANGED = 0x07ff,	/* All of the above */
 
   /* Individual job events... */
-  CUPSD_EVENT_JOB_STATE = 0x0100,	/* Any state change */
-  CUPSD_EVENT_JOB_CREATED = 0x0200,	/* Send after job is created */
-  CUPSD_EVENT_JOB_COMPLETED = 0x0400,	/* Sent after job is completed */
-  CUPSD_EVENT_JOB_STOPPED = 0x0800,	/* Sent after job is stopped */
-  CUPSD_EVENT_JOB_CONFIG_CHANGED = 0x1000,
+  CUPSD_EVENT_JOB_STATE = 0x0800,	/* Any state change */
+  CUPSD_EVENT_JOB_CREATED = 0x1000,	/* Send after job is created */
+  CUPSD_EVENT_JOB_COMPLETED = 0x2000,	/* Sent after job is completed */
+  CUPSD_EVENT_JOB_STOPPED = 0x4000,	/* Sent after job is stopped */
+  CUPSD_EVENT_JOB_CONFIG_CHANGED = 0x8000,
 					/* Sent after set-job-attributes */
-  CUPSD_EVENT_JOB_PROGRESS = 0x2000,	/* Sent for each page */
+  CUPSD_EVENT_JOB_PROGRESS = 0x10000,	/* Sent for each page */
 
   /* Convenience job event grouping... */
-  CUPSD_EVENT_JOB_STATE_CHANGED = 0x0f00,
-					/* Any state change + CREATED + COMPLETED + STOPPED */
+  CUPSD_EVENT_JOB_STATE_CHANGED = 0x7800,
+					/* STATE + CREATED + COMPLETED + STOPPED */
 
   /* Server events... */
-  CUPSD_EVENT_SERVER_RESTARTED = 0x4000,/* Sent after server restarts */
-  CUPSD_EVENT_SERVER_STARTED = 0x8000,	/* Sent when server first starts */
-  CUPSD_EVENT_SERVER_STOPPED = 0x10000,	/* Sent when server is stopped */
-  CUPSD_EVENT_SERVER_AUDIT = 0x20000,	/* Security-related stuff */
+  CUPSD_EVENT_SERVER_RESTARTED = 0x20000,/* Sent after server restarts */
+  CUPSD_EVENT_SERVER_STARTED = 0x40000,	/* Sent when server first starts */
+  CUPSD_EVENT_SERVER_STOPPED = 0x80000,	/* Sent when server is stopped */
+  CUPSD_EVENT_SERVER_AUDIT = 0x100000,	/* Security-related stuff */
 
   /* Everything and nothing... */
   CUPSD_EVENT_NONE = 0,			/* Nothing */
-  CUPSD_EVENT_ALL = 0x1ffff		/* Everything */
+  CUPSD_EVENT_ALL = 0x1fffff		/* Everything */
 } cupsd_eventmask_t;
 
 
Index: scheduler/ipp.c
===================================================================
--- scheduler/ipp.c	(revision 7247)
+++ scheduler/ipp.c	(working copy)
@@ -9322,7 +9322,8 @@
       else if (con->response->request.status.status_code == IPP_OK)
       {
         cupsdSetJobPriority(job, attr->values[0].integer);
-        event |= CUPSD_EVENT_JOB_CONFIG_CHANGED;
+        event |= CUPSD_EVENT_JOB_CONFIG_CHANGED |
+	         CUPSD_EVENT_PRINTER_QUEUE_ORDER_CHANGED;
       }
     }
     else if (!strcmp(attr->name, "job-state"))
@@ -9469,6 +9470,10 @@
   * Send events as needed...
   */
 
+  if (event & CUPSD_EVENT_PRINTER_QUEUE_ORDER_CHANGED)
+    cupsdAddEvent(CUPSD_EVENT_PRINTER_QUEUE_ORDER_CHANGED, job->printer, job,
+                  "Job priority changed by user.");
+
   if (event & CUPSD_EVENT_JOB_STATE)
     cupsdAddEvent(CUPSD_EVENT_JOB_STATE, job->printer, job,
                   job->state_value == IPP_JOB_HELD ?
Index: scheduler/printers.c
===================================================================
--- scheduler/printers.c	(revision 7247)
+++ scheduler/printers.c	(working copy)
@@ -2643,7 +2643,7 @@
   if (old_state != s)
   {
     cupsdAddEvent(s == IPP_PRINTER_STOPPED ? CUPSD_EVENT_PRINTER_STOPPED :
-                      CUPSD_EVENT_PRINTER_STATE_CHANGED, p, NULL,
+                      CUPSD_EVENT_PRINTER_STATE, p, NULL,
 		  "%s \"%s\" state changed.",
 		  (p->type & CUPS_PRINTER_CLASS) ? "Class" : "Printer",
 		  p->name);
Index: scheduler/job.c
===================================================================
--- scheduler/job.c	(revision 7250)
+++ scheduler/job.c	(working copy)
@@ -3634,7 +3634,7 @@
       {
 	cupsdSetPrinterReasons(job->printer, message);
 	cupsdAddPrinterHistory(job->printer);
-	event |= CUPSD_EVENT_PRINTER_STATE_CHANGED;
+	event |= CUPSD_EVENT_PRINTER_STATE;
       }
 
       update_job_attrs(job);
@@ -3663,14 +3663,14 @@
       if ((attr = cupsGetOption("printer-alert", num_attrs, attrs)) != NULL)
       {
         cupsdSetString(&job->printer->alert, attr);
-	event |= CUPSD_EVENT_PRINTER_STATE_CHANGED;
+	event |= CUPSD_EVENT_PRINTER_STATE;
       }
 
       if ((attr = cupsGetOption("printer-alert-description", num_attrs,
                                 attrs)) != NULL)
       {
         cupsdSetString(&job->printer->alert_description, attr);
-	event |= CUPSD_EVENT_PRINTER_STATE_CHANGED;
+	event |= CUPSD_EVENT_PRINTER_STATE;
       }
 
       cupsFreeOptions(num_attrs, attrs);
@@ -3687,7 +3687,7 @@
 
       cupsdSetString(&job->printer->recoverable, ptr);
       cupsdAddPrinterHistory(job->printer);
-      event |= CUPSD_EVENT_PRINTER_STATE_CHANGED;
+      event |= CUPSD_EVENT_PRINTER_STATE;
     }
     else if (!strncmp(message, "recovered:", 10))
     {
@@ -3700,7 +3700,7 @@
 
       cupsdSetString(&job->printer->recoverable, ptr);
       cupsdAddPrinterHistory(job->printer);
-      event |= CUPSD_EVENT_PRINTER_STATE_CHANGED;
+      event |= CUPSD_EVENT_PRINTER_STATE;
     }
 #endif /* __APPLE__ */
     else if (loglevel <= job->status_level)
@@ -3715,7 +3715,7 @@
       strlcpy(job->printer->state_message, message,
               sizeof(job->printer->state_message));
       cupsdAddPrinterHistory(job->printer);
-      event |= CUPSD_EVENT_PRINTER_STATE_CHANGED;
+      event |= CUPSD_EVENT_PRINTER_STATE;
 
       update_job_attrs(job);
     }
@@ -3724,8 +3724,8 @@
       break;
   }
 
-  if ((event & CUPSD_EVENT_PRINTER_STATE_CHANGED))
-    cupsdAddEvent(CUPSD_EVENT_PRINTER_STATE_CHANGED, job->printer, NULL,
+  if (event & CUPSD_EVENT_PRINTER_STATE)
+    cupsdAddEvent(CUPSD_EVENT_PRINTER_STATE, job->printer, NULL,
 		  (job->printer->type & CUPS_PRINTER_CLASS) ?
 		      "Class \"%s\" state changed." :
 		      "Printer \"%s\" state changed.",
Index: scheduler/main.c
===================================================================
--- scheduler/main.c	(revision 7247)
+++ scheduler/main.c	(working copy)
@@ -1077,7 +1077,7 @@
       * Reset the accumulated events...
       */
 
-      LastEvent     = CUPSD_EVENT_NONE;
+      LastEvent = CUPSD_EVENT_NONE;
     }
   }
 
