diff options
author | Marek Kasik <mkasik@redhat.com> | 2010-10-15 12:08:12 +0200 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2010-10-15 17:01:16 -0400 |
commit | 95e69afea83e6a43163a3c2b0d2928c9e646b77b (patch) | |
tree | eea6477a8f3f7b05967b02d28e7a75f15b6f7f65 /gtk | |
parent | d70b7f49b62d8e7147d30a08340968633f36b0e7 (diff) | |
download | gtk+-95e69afea83e6a43163a3c2b0d2928c9e646b77b.tar.gz |
Parse lpoptions correctly
Parse options job-sheets, job-hold-until and sides correctly.
Add get_lpoption_name() for translation of lpoption names to
gtk option names. Usable for options which values don't need
conversion (e.g. number-up, number-up-layout, job-billing
and job-priority).
Rename array option_names to ppd_option_names to reflect its
purpose better. Rename get_option_name() to get_ppd_option_name()
because of the same reason.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkprintunixdialog.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c index 9a1152ba79..23b4f20a6e 100644 --- a/gtk/gtkprintunixdialog.c +++ b/gtk/gtkprintunixdialog.c @@ -2565,6 +2565,13 @@ dialog_get_number_up_layout (GtkPrintUnixDialog *dialog) if (val == NULL) return layout; + if (val[0] == '\0' && priv->options) + { + GtkPrinterOption *option = gtk_printer_option_set_lookup (priv->options, "gtk-n-up-layout"); + if (option) + val = option->value; + } + enum_class = g_type_class_ref (GTK_TYPE_NUMBER_UP_LAYOUT); enum_value = g_enum_get_value_by_nick (enum_class, val); if (enum_value) |