mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-18 09:00:34 +00:00
Strip "Custom." prefix when getting default options from cups.
This commit is contained in:
parent
5123cfe5e6
commit
85099bf6a6
@ -3367,8 +3367,19 @@ create_pickone_option (ppd_file_t *ppd_file,
|
|||||||
option->choices_display[i] = get_choice_text (ppd_file, available[i]);
|
option->choices_display[i] = get_choice_text (ppd_file, available[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (option->type != GTK_PRINTER_OPTION_TYPE_PICKONE)
|
||||||
|
{
|
||||||
|
if (g_str_has_prefix (ppd_option->defchoice, "Custom."))
|
||||||
|
gtk_printer_option_set (option, ppd_option->defchoice + 7);
|
||||||
|
else
|
||||||
gtk_printer_option_set (option, ppd_option->defchoice);
|
gtk_printer_option_set (option, ppd_option->defchoice);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gtk_printer_option_set (option, ppd_option->defchoice);
|
||||||
|
}
|
||||||
|
}
|
||||||
#ifdef PRINT_IGNORED_OPTIONS
|
#ifdef PRINT_IGNORED_OPTIONS
|
||||||
else
|
else
|
||||||
g_warning ("CUPS Backend: Ignoring pickone %s\n", ppd_option->text);
|
g_warning ("CUPS Backend: Ignoring pickone %s\n", ppd_option->text);
|
||||||
|
Loading…
Reference in New Issue
Block a user