summaryrefslogtreecommitdiffstats
path: root/src/maingui/printergui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/maingui/printergui.cpp')
-rw-r--r--src/maingui/printergui.cpp9
1 files changed, 7 insertions, 2 deletions
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;