[gnome-settings-daemon/gnome-3-8] print-notifications: Show final job states for remote CUPS server
- From: Marek Kašík <mkasik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/gnome-3-8] print-notifications: Show final job states for remote CUPS server
- Date: Thu, 5 Sep 2013 08:59:02 +0000 (UTC)
commit c2830265c5423a45507784da956d22d3eb76c39a
Author: Marek Kasik <mkasik redhat com>
Date: Thu Sep 5 10:57:41 2013 +0200
print-notifications: Show final job states for remote CUPS server
Remote CUPS servers send information about final state of print jobs
in job-state-change event instead of in job-completed event.
https://bugzilla.gnome.org/show_bug.cgi?id=678623
.../gsd-print-notifications-manager.c | 25 ++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/plugins/print-notifications/gsd-print-notifications-manager.c
b/plugins/print-notifications/gsd-print-notifications-manager.c
index 26c630e..c785d11 100644
--- a/plugins/print-notifications/gsd-print-notifications-manager.c
+++ b/plugins/print-notifications/gsd-print-notifications-manager.c
@@ -503,11 +503,36 @@ process_cups_notification (GsdPrintNotificationsManager *manager,
secondary_text = g_strdup_printf (_("\"%s\" on %s"), job_name, printer_name);
break;
case IPP_JOB_STOPPED:
+ g_hash_table_remove (manager->priv->printing_printers,
+ printer_name);
+ /* Translators: A print job has been stopped */
+ primary_text = g_strdup (_("Printing stopped"));
+ /* Translators: "print-job xy" on a printer */
+ secondary_text = g_strdup_printf (_("\"%s\" on %s"), job_name, printer_name);
+ break;
case IPP_JOB_CANCELED:
+ g_hash_table_remove (manager->priv->printing_printers,
+ printer_name);
+ /* Translators: A print job has been canceled */
+ primary_text = g_strdup (_("Printing canceled"));
+ /* Translators: "print-job xy" on a printer */
+ secondary_text = g_strdup_printf (_("\"%s\" on %s"), job_name, printer_name);
+ break;
case IPP_JOB_ABORTED:
+ g_hash_table_remove (manager->priv->printing_printers,
+ printer_name);
+ /* Translators: A print job has been aborted */
+ primary_text = g_strdup (_("Printing aborted"));
+ /* Translators: "print-job xy" on a printer */
+ secondary_text = g_strdup_printf (_("\"%s\" on %s"), job_name, printer_name);
+ break;
case IPP_JOB_COMPLETED:
g_hash_table_remove (manager->priv->printing_printers,
printer_name);
+ /* Translators: A print job has been completed */
+ primary_text = g_strdup (_("Printing completed"));
+ /* Translators: "print-job xy" on a printer */
+ secondary_text = g_strdup_printf (_("\"%s\" on %s"), job_name, printer_name);
break;
default:
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]