diff options
author | John Ralls <jralls@ceridwen.us> | 2012-02-19 13:14:36 -0800 |
---|---|---|
committer | John Ralls <jralls@ceridwen.us> | 2012-04-23 12:44:06 -0700 |
commit | 60969ff9515d516ada21467bffa7149401526392 (patch) | |
tree | 98a98f005dc20c9046d1b98fcc9cb94cd7ca7e38 | |
parent | bfad99ad5202826e261b59651a7c373cf08e9dab (diff) | |
download | gtk+-60969ff9515d516ada21467bffa7149401526392.tar.gz |
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.
-rw-r--r-- | 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 928ad96a6b..f26214af6a 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; |