changed the external viewer definition dialogs
This commit is contained in:
parent
5419665741
commit
628010f7dc
@ -868,7 +868,13 @@ bool RclConfig::setMimeViewerDef(const string& mt, const string& def)
|
|||||||
{
|
{
|
||||||
if (mimeview == 0)
|
if (mimeview == 0)
|
||||||
return false;
|
return false;
|
||||||
if (!mimeview->set(mt, def, "view")) {
|
bool status;
|
||||||
|
if (!def.empty())
|
||||||
|
status = mimeview->set(mt, def, "view");
|
||||||
|
else
|
||||||
|
status = mimeview->erase(mt, "view");
|
||||||
|
|
||||||
|
if (!status) {
|
||||||
m_reason = string("RclConfig:: cant set value. Readonly?");
|
m_reason = string("RclConfig:: cant set value. Readonly?");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -167,40 +167,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="useDesktopOpenCB">
|
|
||||||
<property name="text">
|
|
||||||
<string>Use desktop preferences to choose document editor.</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="textLabelallex">
|
|
||||||
<property name="text">
|
|
||||||
<string>Exceptions</string>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Mime types that should not be passed to xdg-open even when "Use desktop preferences" is set.<br> Useful to pass page number and search string options to, e.g. evince.</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="allExLE">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>70</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="viewActionPB">
|
<widget class="QPushButton" name="viewActionPB">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|||||||
@ -84,10 +84,6 @@ void UIPrefsDialog::init()
|
|||||||
ssAutoSpaceCB, SLOT(setDisabled(bool)));
|
ssAutoSpaceCB, SLOT(setDisabled(bool)));
|
||||||
connect(ssAutoAllCB, SIGNAL(toggled(bool)),
|
connect(ssAutoAllCB, SIGNAL(toggled(bool)),
|
||||||
ssAutoSpaceCB, SLOT(setChecked(bool)));
|
ssAutoSpaceCB, SLOT(setChecked(bool)));
|
||||||
connect(useDesktopOpenCB, SIGNAL(toggled(bool)),
|
|
||||||
viewActionPB, SLOT(setDisabled(bool)));
|
|
||||||
connect(useDesktopOpenCB, SIGNAL(toggled(bool)),
|
|
||||||
allExLE, SLOT(setEnabled(bool)));
|
|
||||||
|
|
||||||
setFromPrefs();
|
setFromPrefs();
|
||||||
}
|
}
|
||||||
@ -108,12 +104,6 @@ void UIPrefsDialog::setFromPrefs()
|
|||||||
|
|
||||||
initStartAdvCB->setChecked(prefs.startWithAdvSearchOpen);
|
initStartAdvCB->setChecked(prefs.startWithAdvSearchOpen);
|
||||||
|
|
||||||
// External editor. Can use desktop prefs or internal
|
|
||||||
useDesktopOpenCB->setChecked(prefs.useDesktopOpen);
|
|
||||||
viewActionPB->setEnabled(!prefs.useDesktopOpen);
|
|
||||||
allExLE->setEnabled(prefs.useDesktopOpen);
|
|
||||||
allExLE->setText(QString::fromUtf8(theconfig->getMimeViewerAllEx().c_str()));
|
|
||||||
|
|
||||||
keepSortCB->setChecked(prefs.keepSort);
|
keepSortCB->setChecked(prefs.keepSort);
|
||||||
previewHtmlCB->setChecked(prefs.previewHtml);
|
previewHtmlCB->setChecked(prefs.previewHtml);
|
||||||
switch (prefs.previewPlainPre) {
|
switch (prefs.previewPlainPre) {
|
||||||
@ -255,8 +245,6 @@ void UIPrefsDialog::accept()
|
|||||||
replAbsCB->isChecked();
|
replAbsCB->isChecked();
|
||||||
|
|
||||||
prefs.startWithAdvSearchOpen = initStartAdvCB->isChecked();
|
prefs.startWithAdvSearchOpen = initStartAdvCB->isChecked();
|
||||||
prefs.useDesktopOpen = useDesktopOpenCB->isChecked();
|
|
||||||
theconfig->setMimeViewerAllEx((const char*)allExLE->text().toUtf8());
|
|
||||||
|
|
||||||
prefs.keepSort = keepSortCB->isChecked();
|
prefs.keepSort = keepSortCB->isChecked();
|
||||||
prefs.previewHtml = previewHtmlCB->isChecked();
|
prefs.previewHtml = previewHtmlCB->isChecked();
|
||||||
|
|||||||
@ -6,107 +6,151 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>446</width>
|
<width>632</width>
|
||||||
<height>180</height>
|
<height>726</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Native Viewers</string>
|
<string>Native Viewers</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout">
|
<widget class="QLabel" name="textLabel1">
|
||||||
|
<property name="text">
|
||||||
|
<string>Select one or several mime types then use the controls in the bottom frame to change how they are processed.</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="useDesktopCB">
|
||||||
|
<property name="text">
|
||||||
|
<string>Use Desktop preferences by default</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QTableWidget" name="actionsLV">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Select one or several file types, then use the controls in the frame below to change how they are processed</string>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Sunken</enum>
|
||||||
|
</property>
|
||||||
|
<property name="editTriggers">
|
||||||
|
<set>QAbstractItemView::NoEditTriggers</set>
|
||||||
|
</property>
|
||||||
|
<property name="selectionMode">
|
||||||
|
<enum>QAbstractItemView::ExtendedSelection</enum>
|
||||||
|
</property>
|
||||||
|
<property name="selectionBehavior">
|
||||||
|
<enum>QAbstractItemView::SelectRows</enum>
|
||||||
|
</property>
|
||||||
|
<property name="showGrid">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sortingEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="columnCount">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="allColumnsShowFocus" stdset="0">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="showSortIndicator" stdset="0">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<attribute name="horizontalHeaderDefaultSectionSize">
|
||||||
|
<number>150</number>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
|
||||||
|
<bool>true</bool>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="horizontalHeaderStretchLastSection">
|
||||||
|
<bool>true</bool>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="verticalHeaderVisible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</attribute>
|
||||||
|
<column/>
|
||||||
|
<column/>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFrame" name="frame">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
<property name="lineWidth">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="setExceptCB">
|
||||||
|
<property name="text">
|
||||||
|
<string>Exception to Desktop preferences</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Action (empty -> recoll default)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="newActionLE"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="chgActPB">
|
||||||
|
<property name="text">
|
||||||
|
<string>Apply to current selection</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="textLabel1">
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="closePB">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Select one or several mime types then click "Change Action"<br>You can also close this dialog and check "Use desktop preferences"<br>in the main panel to ignore this list and use your desktop defaults.</string>
|
<string>Close</string>
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QTableWidget" name="actionsLV">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Select one or several file types, then click Change Action to modify the program used to open them</string>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Sunken</enum>
|
|
||||||
</property>
|
|
||||||
<property name="editTriggers">
|
|
||||||
<set>QAbstractItemView::NoEditTriggers</set>
|
|
||||||
</property>
|
|
||||||
<property name="selectionMode">
|
|
||||||
<enum>QAbstractItemView::ExtendedSelection</enum>
|
|
||||||
</property>
|
|
||||||
<property name="selectionBehavior">
|
|
||||||
<enum>QAbstractItemView::SelectRows</enum>
|
|
||||||
</property>
|
|
||||||
<property name="showGrid">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sortingEnabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="columnCount">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<property name="allColumnsShowFocus" stdset="0">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="showSortIndicator" stdset="0">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<attribute name="horizontalHeaderDefaultSectionSize">
|
|
||||||
<number>150</number>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
|
|
||||||
<bool>true</bool>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="horizontalHeaderStretchLastSection">
|
|
||||||
<bool>true</bool>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="verticalHeaderVisible">
|
|
||||||
<bool>false</bool>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="verticalHeaderVisible">
|
|
||||||
<bool>false</bool>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
|
|
||||||
<bool>true</bool>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="horizontalHeaderStretchLastSection">
|
|
||||||
<bool>true</bool>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="horizontalHeaderDefaultSectionSize">
|
|
||||||
<number>150</number>
|
|
||||||
</attribute>
|
|
||||||
<column/>
|
|
||||||
<column/>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="chgActPB">
|
|
||||||
<property name="text">
|
|
||||||
<string>Change Action</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="closePB">
|
|
||||||
<property name="text">
|
|
||||||
<string>Close</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
@ -14,6 +14,9 @@
|
|||||||
* Free Software Foundation, Inc.,
|
* Free Software Foundation, Inc.,
|
||||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -38,12 +41,28 @@ using namespace std;
|
|||||||
void ViewAction::init()
|
void ViewAction::init()
|
||||||
{
|
{
|
||||||
connect(closePB, SIGNAL(clicked()), this, SLOT(close()));
|
connect(closePB, SIGNAL(clicked()), this, SLOT(close()));
|
||||||
connect(chgActPB, SIGNAL(clicked()),
|
connect(chgActPB, SIGNAL(clicked()), this, SLOT(editActions()));
|
||||||
this, SLOT(editActions()));
|
|
||||||
connect(actionsLV,SIGNAL(itemDoubleClicked(QTableWidgetItem *)),
|
connect(actionsLV,SIGNAL(itemDoubleClicked(QTableWidgetItem *)),
|
||||||
this, SLOT(onItemDoubleClicked(QTableWidgetItem *)));
|
this, SLOT(onItemDoubleClicked(QTableWidgetItem *)));
|
||||||
|
useDesktopCB->setChecked(prefs.useDesktopOpen);
|
||||||
|
onUseDesktopCBToggled(prefs.useDesktopOpen);
|
||||||
|
connect(useDesktopCB, SIGNAL(stateChanged(int)),
|
||||||
|
this, SLOT(onUseDesktopCBToggled(int)));
|
||||||
|
connect(setExceptCB, SIGNAL(stateChanged(int)),
|
||||||
|
this, SLOT(onSetExceptCBToggled(int)));
|
||||||
|
resize(QSize(640, 480).expandedTo(minimumSizeHint()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void ViewAction::onUseDesktopCBToggled(int onoff)
|
||||||
|
{
|
||||||
|
prefs.useDesktopOpen = onoff != 0;
|
||||||
fillLists();
|
fillLists();
|
||||||
resize(QSize(640, 250).expandedTo(minimumSizeHint()));
|
setExceptCB->setEnabled(prefs.useDesktopOpen);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ViewAction::onSetExceptCBToggled(int onoff)
|
||||||
|
{
|
||||||
|
newActionLE->setEnabled(onoff != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewAction::fillLists()
|
void ViewAction::fillLists()
|
||||||
@ -54,12 +73,25 @@ void ViewAction::fillLists()
|
|||||||
theconfig->getMimeViewerDefs(defs);
|
theconfig->getMimeViewerDefs(defs);
|
||||||
actionsLV->setRowCount(defs.size());
|
actionsLV->setRowCount(defs.size());
|
||||||
int row = 0;
|
int row = 0;
|
||||||
|
|
||||||
|
set<string> viewerXs;
|
||||||
|
if (prefs.useDesktopOpen) {
|
||||||
|
string s = theconfig->getMimeViewerAllEx();
|
||||||
|
stringToStrings(s, viewerXs);
|
||||||
|
}
|
||||||
for (vector<pair<string, string> >::const_iterator it = defs.begin();
|
for (vector<pair<string, string> >::const_iterator it = defs.begin();
|
||||||
it != defs.end(); it++) {
|
it != defs.end(); it++) {
|
||||||
actionsLV->setItem(row, 0,
|
actionsLV->setItem(row, 0,
|
||||||
new QTableWidgetItem(QString::fromAscii(it->first.c_str())));
|
new QTableWidgetItem(QString::fromAscii(it->first.c_str())));
|
||||||
actionsLV->setItem(row, 1,
|
if (!prefs.useDesktopOpen ||
|
||||||
new QTableWidgetItem(QString::fromAscii(it->second.c_str())));
|
viewerXs.find(it->first) != viewerXs.end()) {
|
||||||
|
actionsLV->setItem(
|
||||||
|
row, 1,
|
||||||
|
new QTableWidgetItem(QString::fromAscii(it->second.c_str())));
|
||||||
|
} else {
|
||||||
|
actionsLV->setItem(
|
||||||
|
row, 1, new QTableWidgetItem(tr("Desktop Default")));
|
||||||
|
}
|
||||||
row++;
|
row++;
|
||||||
}
|
}
|
||||||
QStringList labels(tr("MIME type"));
|
QStringList labels(tr("MIME type"));
|
||||||
@ -78,6 +110,7 @@ void ViewAction::selectMT(const QString& mt)
|
|||||||
actionsLV->setCurrentItem(*it, QItemSelectionModel::Columns);
|
actionsLV->setCurrentItem(*it, QItemSelectionModel::Columns);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewAction::onItemDoubleClicked(QTableWidgetItem * item)
|
void ViewAction::onItemDoubleClicked(QTableWidgetItem * item)
|
||||||
{
|
{
|
||||||
actionsLV->clearSelection();
|
actionsLV->clearSelection();
|
||||||
@ -90,21 +123,30 @@ void ViewAction::onItemDoubleClicked(QTableWidgetItem * item)
|
|||||||
void ViewAction::editActions()
|
void ViewAction::editActions()
|
||||||
{
|
{
|
||||||
QString action0;
|
QString action0;
|
||||||
|
int except0 = -1;
|
||||||
|
|
||||||
|
set<string> viewerXs;
|
||||||
|
string s = theconfig->getMimeViewerAllEx();
|
||||||
|
stringToStrings(s, viewerXs);
|
||||||
|
|
||||||
list<string> mtypes;
|
list<string> mtypes;
|
||||||
bool dowarnmultiple = true;
|
bool dowarnmultiple = true;
|
||||||
for (int row = 0; row < actionsLV->rowCount(); row++) {
|
for (int row = 0; row < actionsLV->rowCount(); row++) {
|
||||||
QTableWidgetItem *item0 = actionsLV->item(row, 0);
|
QTableWidgetItem *item0 = actionsLV->item(row, 0);
|
||||||
if (!item0->isSelected())
|
if (!item0->isSelected())
|
||||||
continue;
|
continue;
|
||||||
mtypes.push_back((const char *)item0->text().toLocal8Bit());
|
string mtype = (const char *)item0->text().toLocal8Bit();
|
||||||
|
mtypes.push_back(mtype);
|
||||||
QTableWidgetItem *item1 = actionsLV->item(row, 1);
|
QTableWidgetItem *item1 = actionsLV->item(row, 1);
|
||||||
QString action = item1->text();
|
QString action = item1->text();
|
||||||
|
int except = viewerXs.find(mtype) != viewerXs.end();
|
||||||
if (action0.isEmpty()) {
|
if (action0.isEmpty()) {
|
||||||
action0 = action;
|
action0 = action;
|
||||||
|
except0 = except;
|
||||||
} else {
|
} else {
|
||||||
if (action != action0 && dowarnmultiple) {
|
if ((action != action0 || except != except0) && dowarnmultiple) {
|
||||||
switch (QMessageBox::warning(0, "Recoll",
|
switch (QMessageBox::warning(0, "Recoll",
|
||||||
tr("Changing actions with "
|
tr("Changing entries with "
|
||||||
"different current values"),
|
"different current values"),
|
||||||
"Continue",
|
"Continue",
|
||||||
"Cancel",
|
"Cancel",
|
||||||
@ -118,17 +160,26 @@ void ViewAction::editActions()
|
|||||||
if (action0.isEmpty())
|
if (action0.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool ok;
|
string sact = (const char *)newActionLE->text().toLocal8Bit();
|
||||||
QString newaction = QInputDialog::getText(this, "Recoll", "Edit action:",
|
trimstring(sact);
|
||||||
QLineEdit::Normal,
|
for (list<string>::const_iterator mit = mtypes.begin();
|
||||||
action0, &ok);
|
mit != mtypes.end(); mit++) {
|
||||||
if (!ok || newaction.isEmpty() )
|
set<string>::iterator xit = viewerXs.find(*mit);
|
||||||
return;
|
if (setExceptCB->isChecked()) {
|
||||||
|
if (xit == viewerXs.end()) {
|
||||||
string sact = (const char *)newaction.toLocal8Bit();
|
viewerXs.insert(*mit);
|
||||||
for (list<string>::const_iterator it = mtypes.begin();
|
}
|
||||||
it != mtypes.end(); it++) {
|
} else {
|
||||||
theconfig->setMimeViewerDef(*it, sact);
|
if (xit != viewerXs.end()) {
|
||||||
|
viewerXs.erase(xit);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// An empty action will restore the default (erase from
|
||||||
|
// topmost conftree)
|
||||||
|
theconfig->setMimeViewerDef(*mit, sact);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s = stringsToString(viewerXs);
|
||||||
|
theconfig->setMimeViewerAllEx(s);
|
||||||
fillLists();
|
fillLists();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,6 +43,8 @@ public:
|
|||||||
public slots:
|
public slots:
|
||||||
virtual void editActions();
|
virtual void editActions();
|
||||||
virtual void onItemDoubleClicked(QTableWidgetItem *);
|
virtual void onItemDoubleClicked(QTableWidgetItem *);
|
||||||
|
virtual void onUseDesktopCBToggled(int);
|
||||||
|
virtual void onSetExceptCBToggled(int);
|
||||||
private:
|
private:
|
||||||
virtual void init();
|
virtual void init();
|
||||||
virtual void fillLists();
|
virtual void fillLists();
|
||||||
|
|||||||
@ -49,7 +49,7 @@
|
|||||||
<li><a href="recoll_XMP/index.html">Indexing PDF
|
<li><a href="recoll_XMP/index.html">Indexing PDF
|
||||||
XMP-metadata</a>: a nice exemple of customizing a Recoll
|
XMP-metadata</a>: a nice exemple of customizing a Recoll
|
||||||
configuration and the PDF filter to use additional
|
configuration and the PDF filter to use additional
|
||||||
metadata.</li>
|
metadata, by Jeffrey Dick.</li>
|
||||||
<li><a href="perfs.html">Index size and indexing performance
|
<li><a href="perfs.html">Index size and indexing performance
|
||||||
data.</a></li>
|
data.</a></li>
|
||||||
<li><a href="custom.html">Result list format samples.</a></li>
|
<li><a href="custom.html">Result list format samples.</a></li>
|
||||||
|
|||||||
@ -80,9 +80,11 @@ journal =
|
|||||||
< '
|
< '
|
||||||
---
|
---
|
||||||
> ' |
|
> ' |
|
||||||
168a200,203
|
168a200,205
|
||||||
> # replace latex with html markup
|
> # replace latex with html markup
|
||||||
> l2html |
|
> l2html |
|
||||||
|
> # replace "Subject" with "Abstract"
|
||||||
|
> sed -e s/\<meta\ name=\"Subject\"/\<meta\ name=\"Abstract\"/g |
|
||||||
> # add markup="html" to author meta element
|
> # add markup="html" to author meta element
|
||||||
> sed -e s/\<meta\ name=\"Author\"/\<meta\ name=\"Author\"\ markup=\"html\"/g
|
> sed -e s/\<meta\ name=\"Author\"/\<meta\ name=\"Author\"\ markup=\"html\"/g
|
||||||
</pre>
|
</pre>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user