summaryrefslogtreecommitdiff
path: root/modules/printbackends
diff options
context:
space:
mode:
authorMarek Kasik <mkasik@redhat.com>2012-09-18 14:18:15 +0200
committerMarek Kasik <mkasik@redhat.com>2012-09-19 18:03:41 +0200
commitbe7752183eb07274b67036362f895b31aa28eb25 (patch)
tree8cb619198d6d17e23c94ddfc61be9cc40ca1863b /modules/printbackends
parent2d3aee2132ed37029aadd251837790b46e330161 (diff)
downloadgtk+-be7752183eb07274b67036362f895b31aa28eb25.tar.gz
printing: Add "Custom." prefix only once to paper size
Check whether "Custom." prefix is already present in the name of selected paper size. (#679883)
Diffstat (limited to 'modules/printbackends')
-rw-r--r--modules/printbackends/cups/gtkprintbackendcups.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c
index c79fe9da21..3c28a849fd 100644
--- a/modules/printbackends/cups/gtkprintbackendcups.c
+++ b/modules/printbackends/cups/gtkprintbackendcups.c
@@ -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);