[gnome-settings-daemon] printing: go back to using name in notifications
- From: mccann src gnome org
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] printing: go back to using name in notifications
- Date: Wed, 2 Feb 2011 06:56:16 +0000 (UTC)
commit 0821b624879ca605808f3d0904bc44ead90d6a1c
Author: William Jon McCann <jmccann redhat com>
Date: Wed Feb 2 01:55:22 2011 -0500
printing: go back to using name in notifications
Turns out that printer-info isn't as human readable for most
printers as the spec would lead you to believe.
.../gsd-print-notifications-manager.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/plugins/print-notifications/gsd-print-notifications-manager.c b/plugins/print-notifications/gsd-print-notifications-manager.c
index 1496924..ba2ba16 100644
--- a/plugins/print-notifications/gsd-print-notifications-manager.c
+++ b/plugins/print-notifications/gsd-print-notifications-manager.c
@@ -154,7 +154,7 @@ on_cups_notification (GDBusConnection *connection,
g_variant_get (parameters, "(&s)", &printer_name);
if (is_local_dest (printer_name)) {
primary_text = g_strdup (_("Printer added"));
- secondary_text = get_dest_attr (printer_name, "printer-info");
+ secondary_text = g_strdup (printer_name);
}
}
} else if (g_strcmp0 (signal_name, "PrinterRemoved") == 0) {
@@ -163,7 +163,7 @@ on_cups_notification (GDBusConnection *connection,
g_variant_get (parameters, "(&s)", &printer_name);
if (is_local_dest (printer_name)) {
primary_text = g_strdup (_("Printer removed"));
- secondary_text = get_dest_attr (printer_name, "printer-info");
+ secondary_text = g_strdup (printer_name);
}
}
} else if (g_strcmp0 (signal_name, "QueueChanged") == 0) {
@@ -172,7 +172,8 @@ on_cups_notification (GDBusConnection *connection,
g_variant_get (parameters, "(&s)", &printer_name);
}
- display_name = get_dest_attr (printer_name, "printer-info");
+ /* FIXME: get a better human readable name */
+ display_name = g_strdup (printer_name);
if (manager->priv->actual_jobs != NULL) {
num_jobs = cupsGetJobs (&jobs, printer_name, 1, CUPS_WHICHJOBS_ALL);
@@ -281,6 +282,8 @@ on_cups_notification (GDBusConnection *connection,
}
}
+ g_free (display_name);
+
if (primary_text) {
NotifyNotification *notification;
notification = notify_notification_new (primary_text,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]