]> Pileus Git - ~andy/gtk/blobdiff - modules/printbackends/cups/gtkprintbackendcups.c
printing: Add "Custom." prefix only once to paper size
[~andy/gtk] / modules / printbackends / cups / gtkprintbackendcups.c
index c79fe9da21aee10d25b5ab75b2ec090670029c5e..3c28a849fde2a04ee211b0ac4e89a41d5a27c985 100644 (file)
@@ -562,8 +562,8 @@ add_cups_options (const gchar *key,
         }
     }
 
-  /* Add "Custom." prefix to custom values. */
-  if (custom_value)
+  /* Add "Custom." prefix to custom values if not already added. */
+  if (custom_value && !g_str_has_prefix (value, "Custom."))
     {
       new_value = g_strdup_printf ("Custom.%s", value);
       gtk_cups_request_encode_option (request, key, new_value);