printing: Add "Custom." prefix only once to paper size

Check whether "Custom." prefix is already present in the name
of selected paper size. (#679883)
This commit is contained in:
Marek Kasik 2012-09-18 14:18:15 +02:00
parent 2d3aee2132
commit be7752183e

View 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);