[gtk+/gtk-3-4] Extract reasons and reasons_desc arrays to file level
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-4] Extract reasons and reasons_desc arrays to file level
- Date: Mon, 23 Apr 2012 21:38:02 +0000 (UTC)
commit 5f667f4d24ec6c0866c959659072e35c967e90d6
Author: John Ralls <jralls ceridwen us>
Date: Sun Feb 19 13:14:36 2012 -0800
Extract reasons and reasons_desc arrays to file level
So that they can be used from more than one function. Rename them to avoid naming conflicts.
modules/printbackends/cups/gtkprintbackendcups.c | 70 +++++++++++-----------
1 files changed, 36 insertions(+), 34 deletions(-)
---
diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c
index dbe06bc..b850503 100644
--- a/modules/printbackends/cups/gtkprintbackendcups.c
+++ b/modules/printbackends/cups/gtkprintbackendcups.c
@@ -1652,6 +1652,42 @@ find_printer (GtkPrinter *printer,
printer_name = gtk_printer_get_name (printer);
return g_ascii_strcasecmp (printer_name, find_name);
}
+/* Printer messages we're interested in */
+static const char * const printer_messages[] =
+ {
+ "toner-low",
+ "toner-empty",
+ "developer-low",
+ "developer-empty",
+ "marker-supply-low",
+ "marker-supply-empty",
+ "cover-open",
+ "door-open",
+ "media-low",
+ "media-empty",
+ "offline",
+ "other"
+ };
+/* Our translatable versions of the printer messages */
+static const char * printer_strings[] =
+ {
+ N_("Printer '%s' is low on toner."),
+ N_("Printer '%s' has no toner left."),
+ /* Translators: "Developer" like on photo development context */
+ N_("Printer '%s' is low on developer."),
+ /* Translators: "Developer" like on photo development context */
+ N_("Printer '%s' is out of developer."),
+ /* Translators: "marker" is one color bin of the printer */
+ N_("Printer '%s' is low on at least one marker supply."),
+ /* Translators: "marker" is one color bin of the printer */
+ N_("Printer '%s' is out of at least one marker supply."),
+ N_("The cover is open on printer '%s'."),
+ N_("The door is open on printer '%s'."),
+ N_("Printer '%s' is low on paper."),
+ N_("Printer '%s' is out of paper."),
+ N_("Printer '%s' is currently offline."),
+ N_("There is a problem on printer '%s'.")
+ };
static void
cups_request_printer_list_cb (GtkPrintBackendCups *cups_backend,
@@ -1723,40 +1759,6 @@ cups_request_printer_list_cb (GtkPrintBackendCups *cups_backend,
gint printer_state_reason_level = 0; /* 0 - none, 1 - report, 2 - warning, 3 - error */
gboolean interested_in = FALSE;
gboolean found = FALSE;
- static const char * const reasons[] = /* Reasons we're interested in */
- {
- "toner-low",
- "toner-empty",
- "developer-low",
- "developer-empty",
- "marker-supply-low",
- "marker-supply-empty",
- "cover-open",
- "door-open",
- "media-low",
- "media-empty",
- "offline",
- "other"
- };
- static const char * reasons_descs[] =
- {
- N_("Printer '%s' is low on toner."),
- N_("Printer '%s' has no toner left."),
- /* Translators: "Developer" like on photo development context */
- N_("Printer '%s' is low on developer."),
- /* Translators: "Developer" like on photo development context */
- N_("Printer '%s' is out of developer."),
- /* Translators: "marker" is one color bin of the printer */
- N_("Printer '%s' is low on at least one marker supply."),
- /* Translators: "marker" is one color bin of the printer */
- N_("Printer '%s' is out of at least one marker supply."),
- N_("The cover is open on printer '%s'."),
- N_("The door is open on printer '%s'."),
- N_("Printer '%s' is low on paper."),
- N_("Printer '%s' is out of paper."),
- N_("Printer '%s' is currently offline."),
- N_("There is a problem on printer '%s'.")
- };
gboolean is_paused = FALSE;
gboolean is_accepting_jobs = TRUE;
gboolean default_printer = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]