]> Pileus Git - ~andy/gtk/commitdiff
Create enum PrinterStateLevel
authorJohn Ralls <jralls@ceridwen.us>
Sun, 19 Feb 2012 21:15:40 +0000 (13:15 -0800)
committerJohn Ralls <jralls@ceridwen.us>
Mon, 23 Apr 2012 19:44:06 +0000 (12:44 -0700)
Fixes "magic number" in printer_state_reason_level.

modules/printbackends/cups/gtkprintbackendcups.c

index f26214af6a17c5cc6abf5dc2cbf62140e47b85fc..f38a16c7cc3e2b97262f4660f70473f067d878d4 100644 (file)
@@ -1689,6 +1689,13 @@ static const char * printer_strings[] =
     N_("There is a problem on printer '%s'.")
   };
 
+typedef enum
+  {
+    GTK_PRINTER_STATE_LEVEL_NONE = 0,
+    GTK_PRINTER_STATE_LEVEL_INFO = 1,
+    GTK_PRINTER_STATE_LEVEL_WARNING = 2,
+    GTK_PRINTER_STATE_LEVEL_ERROR = 3
+  } PrinterStateLevel;
 static void
 cups_request_printer_list_cb (GtkPrintBackendCups *cups_backend,
                               GtkCupsResult       *result,