|
a/src/qtgui/viewaction_w.cpp |
|
b/src/qtgui/viewaction_w.cpp |
|
... |
|
... |
97 |
bool dowarnmultiple = true;
|
97 |
bool dowarnmultiple = true;
|
98 |
for (int row = 0; row < actionsLV->rowCount(); row++) {
|
98 |
for (int row = 0; row < actionsLV->rowCount(); row++) {
|
99 |
QTableWidgetItem *item0 = actionsLV->item(row, 0);
|
99 |
QTableWidgetItem *item0 = actionsLV->item(row, 0);
|
100 |
if (!item0->isSelected())
|
100 |
if (!item0->isSelected())
|
101 |
continue;
|
101 |
continue;
|
102 |
mtypes.push_back((const char *)item0->text().local8Bit());
|
102 |
mtypes.push_back((const char *)item0->text().toLocal8Bit());
|
103 |
QTableWidgetItem *item1 = actionsLV->item(row, 1);
|
103 |
QTableWidgetItem *item1 = actionsLV->item(row, 1);
|
104 |
QString action = item1->text();
|
104 |
QString action = item1->text();
|
105 |
if (action0.isEmpty()) {
|
105 |
if (action0.isEmpty()) {
|
106 |
action0 = action;
|
106 |
action0 = action;
|
107 |
} else {
|
107 |
} else {
|
|
... |
|
... |
120 |
}
|
120 |
}
|
121 |
if (action0.isEmpty())
|
121 |
if (action0.isEmpty())
|
122 |
return;
|
122 |
return;
|
123 |
|
123 |
|
124 |
bool ok;
|
124 |
bool ok;
|
125 |
QString newaction = QInputDialog::getText("Recoll", "Edit action:",
|
125 |
QString newaction = QInputDialog::getText(this, "Recoll", "Edit action:",
|
126 |
QLineEdit::Normal,
|
126 |
QLineEdit::Normal,
|
127 |
action0, &ok, this);
|
127 |
action0, &ok);
|
128 |
if (!ok || newaction.isEmpty() )
|
128 |
if (!ok || newaction.isEmpty() )
|
129 |
return;
|
129 |
return;
|
130 |
|
130 |
|
131 |
string sact = (const char *)newaction.local8Bit();
|
131 |
string sact = (const char *)newaction.toLocal8Bit();
|
132 |
for (list<string>::const_iterator it = mtypes.begin();
|
132 |
for (list<string>::const_iterator it = mtypes.begin();
|
133 |
it != mtypes.end(); it++) {
|
133 |
it != mtypes.end(); it++) {
|
134 |
rclconfig->setMimeViewerDef(*it, sact);
|
134 |
rclconfig->setMimeViewerDef(*it, sact);
|
135 |
}
|
135 |
}
|
136 |
fillLists();
|
136 |
fillLists();
|