[gtk+] Make print backends use standard icon names for printers



commit 0cb1f9a1809fbf8cba858f3b3fd839122635c3c6
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Aug 9 20:09:02 2010 -0400

    Make print backends use standard icon names for printers
    
    This is to make the print dialog work with the previous commit.
    See bug 626474.

 modules/printbackends/cups/gtkprintbackendcups.c |   10 +++++-----
 modules/printbackends/file/gtkprintbackendfile.c |    2 +-
 modules/printbackends/lpr/gtkprintbackendlpr.c   |    2 +-
 modules/printbackends/papi/gtkprintbackendpapi.c |    2 +-
 modules/printbackends/test/gtkprintbackendtest.c |    2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c
index 9d3a1eb..67d2d47 100644
--- a/modules/printbackends/cups/gtkprintbackendcups.c
+++ b/modules/printbackends/cups/gtkprintbackendcups.c
@@ -1326,7 +1326,7 @@ cups_request_printer_info_cb (GtkPrintBackendCups *backend,
   response = gtk_cups_result_get_response (result);
 
   /* TODO: determine printer type and use correct icon */
-  gtk_printer_set_icon_name (printer, "gtk-print");
+  gtk_printer_set_icon_name (printer, "printer");
  
   state_msg = "";
   loc = "";
@@ -2047,13 +2047,13 @@ cups_request_printer_list_cb (GtkPrintBackendCups *cups_backend,
       /* Set printer icon according to importance
          (none, report, warning, error - report is omitted). */
       if (printer_state_reason_level == 3)
-        gtk_printer_set_icon_name (printer, "gtk-print-error");
+        gtk_printer_set_icon_name (printer, "printer-error");
       else if (printer_state_reason_level == 2)
-        gtk_printer_set_icon_name (printer, "gtk-print-warning");
+        gtk_printer_set_icon_name (printer, "printer-warning");
       else if (gtk_printer_is_paused (printer))
-        gtk_printer_set_icon_name (printer, "gtk-print-paused");
+        gtk_printer_set_icon_name (printer, "printer-paused");
       else
-        gtk_printer_set_icon_name (printer, "gtk-print");
+        gtk_printer_set_icon_name (printer, "printer");
 
       if (status_changed)
         g_signal_emit_by_name (GTK_PRINT_BACKEND (backend),
diff --git a/modules/printbackends/file/gtkprintbackendfile.c b/modules/printbackends/file/gtkprintbackendfile.c
index 2d86bd5..27cc0a4 100644
--- a/modules/printbackends/file/gtkprintbackendfile.c
+++ b/modules/printbackends/file/gtkprintbackendfile.c
@@ -496,7 +496,7 @@ gtk_print_backend_file_init (GtkPrintBackendFile *backend)
 			  NULL); 
 
   gtk_printer_set_has_details (printer, TRUE);
-  gtk_printer_set_icon_name (printer, "gtk-save");
+  gtk_printer_set_icon_name (printer, "document-save");
   gtk_printer_set_is_active (printer, TRUE);
 
   gtk_print_backend_add_printer (GTK_PRINT_BACKEND (backend), printer);
diff --git a/modules/printbackends/lpr/gtkprintbackendlpr.c b/modules/printbackends/lpr/gtkprintbackendlpr.c
index 0ee856c..d84ab9a 100644
--- a/modules/printbackends/lpr/gtkprintbackendlpr.c
+++ b/modules/printbackends/lpr/gtkprintbackendlpr.c
@@ -396,7 +396,7 @@ gtk_print_backend_lpr_init (GtkPrintBackendLpr *backend)
 			     GTK_PRINT_BACKEND (backend),
 			     TRUE); 
   gtk_printer_set_has_details (printer, TRUE);
-  gtk_printer_set_icon_name (printer, "gtk-print");
+  gtk_printer_set_icon_name (printer, "printer");
   gtk_printer_set_is_active (printer, TRUE);
   gtk_printer_set_is_default (printer, TRUE);
 
diff --git a/modules/printbackends/papi/gtkprintbackendpapi.c b/modules/printbackends/papi/gtkprintbackendpapi.c
index d349010..c10b207 100644
--- a/modules/printbackends/papi/gtkprintbackendpapi.c
+++ b/modules/printbackends/papi/gtkprintbackendpapi.c
@@ -606,7 +606,7 @@ papi_get_printer_list (GtkPrintBackendPapi *papi_backend)
 		    gtk_printer_set_is_default (printer, TRUE);
 	  	  }	
 
-              gtk_printer_set_icon_name (printer, "gtk-print");
+              gtk_printer_set_icon_name (printer, "printer");
 	      gtk_print_backend_add_printer (backend, printer);
               gtk_printer_set_is_active (printer, TRUE);
 
diff --git a/modules/printbackends/test/gtkprintbackendtest.c b/modules/printbackends/test/gtkprintbackendtest.c
index 44912c0..f40c03c 100644
--- a/modules/printbackends/test/gtkprintbackendtest.c
+++ b/modules/printbackends/test/gtkprintbackendtest.c
@@ -475,7 +475,7 @@ gtk_print_backend_test_init (GtkPrintBackendTest *backend)
       g_message ("TEST Backend: Adding printer %d\n", i);
 
       gtk_printer_set_has_details (printer, FALSE);
-      gtk_printer_set_icon_name (printer, "gtk-delete"); /* use a delete icon just for fun */
+      gtk_printer_set_icon_name (printer, "edit-delete"); /* use a delete icon just for fun */
       gtk_printer_set_is_active (printer, TRUE);
 
       gtk_print_backend_add_printer (GTK_PRINT_BACKEND (backend), printer);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]