From cf997e90fdf6d0e89273651072dd0eeccfef98cb Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 24 Mar 2016 17:44:05 +0100 Subject: [printergui] Interpret --error message as utf8 --- src/maingui/printergui.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/maingui/printergui.cpp') diff --git a/src/maingui/printergui.cpp b/src/maingui/printergui.cpp index e235007..a7f993b 100644 --- a/src/maingui/printergui.cpp +++ b/src/maingui/printergui.cpp @@ -140,7 +140,8 @@ static void enableOptionSelection(ppd_file_t *ppd, QStringList &nameList, QCombo for (ppd_option_t *o = ppdFirstOption(ppd); o != NULL; o = ppdNextOption(ppd)) { QString option(o->keyword); for (QStringList::iterator it = nameList.begin(); it != nameList.end(); ++it) { - if(!option.contains(*it)) + bool exact = (option == *it); + if((!exact && !matchedProperty.isEmpty()) || !option.contains(*it)) continue; // Matches, update combo matchedProperty = option; @@ -160,7 +161,9 @@ static void enableOptionSelection(ppd_file_t *ppd, QStringList &nameList, QCombo } combo->setUpdatesEnabled(true); combo->adjustSize(); - break; + if (exact) { + break; + } } } combo->setProperty("key", matchedProperty); @@ -296,6 +299,8 @@ void PrinterGui::on_buttonPrint_clicked() &(dest->options)); } + dest->num_options = cupsRemoveOption("InputSlot", dest->num_options, &(dest->options)); + cupsSetUser(this->user); char jobtitle[250]; const char *docName; -- cgit v1.2.3-55-g7522