fixed a few connections in subdocs aux reslist
This commit is contained in:
parent
cdbf8e6cd3
commit
1ca3d028e6
2 changed files with 29 additions and 11 deletions
|
@ -367,13 +367,19 @@ int main(int argc, char **argv)
|
|||
string rundir;
|
||||
config->getConfParam("idxrundir", rundir);
|
||||
if (!rundir.compare("tmp")) {
|
||||
LOGDEB(("recollindex: changing current directory to [%s]\n",
|
||||
LOGINFO(("recollindex: changing current directory to [%s]\n",
|
||||
tmplocation().c_str()));
|
||||
chdir(tmplocation().c_str());
|
||||
if (chdir(tmplocation().c_str()) < 0) {
|
||||
LOGERR(("chdir(%s) failed, errno %d\n",
|
||||
tmplocation().c_str(), errno));
|
||||
}
|
||||
} else if (!rundir.empty()) {
|
||||
LOGDEB(("recollindex: changing current directory to [%s]\n",
|
||||
rundir.c_str()));
|
||||
chdir(rundir.c_str());
|
||||
LOGINFO(("recollindex: changing current directory to [%s]\n",
|
||||
rundir.c_str()));
|
||||
if (chdir(rundir.c_str()) < 0) {
|
||||
LOGERR(("chdir(%s) failed, errno %d\n",
|
||||
rundir.c_str(), errno));
|
||||
}
|
||||
}
|
||||
|
||||
bool rezero((op_flags & OPT_z) != 0);
|
||||
|
|
|
@ -389,6 +389,10 @@ void ResList::setDocSource(RefCntr<DocSequence> nsource)
|
|||
m_rclmain, SLOT(startPreview(Rcl::Doc)));
|
||||
connect(this, SIGNAL(docEditClicked(Rcl::Doc)),
|
||||
m_rclmain, SLOT(startNativeViewer(Rcl::Doc)));
|
||||
connect(this, SIGNAL(docSaveToFileClicked(Rcl::Doc)),
|
||||
m_rclmain, SLOT(saveDocToFile(Rcl::Doc)));
|
||||
connect(this, SIGNAL(editRequested(Rcl::Doc)),
|
||||
m_rclmain, SLOT(startNativeViewer(Rcl::Doc)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -985,15 +989,16 @@ void ResList::createPopupMenu(const QPoint& pos)
|
|||
|
||||
if (m_popDoc < 0)
|
||||
return;
|
||||
QMenu *popup = new QMenu(this);
|
||||
popup->addAction(tr("&Preview"), this, SLOT(menuPreview()));
|
||||
|
||||
Rcl::Doc doc;
|
||||
bool havedoc = getDoc(m_popDoc, doc);
|
||||
string apptag;
|
||||
if (havedoc)
|
||||
doc.getmeta(Rcl::Doc::keyapptg, &apptag);
|
||||
|
||||
QMenu *popup = new QMenu(this);
|
||||
|
||||
popup->addAction(tr("&Preview"), this, SLOT(menuPreview()));
|
||||
|
||||
if (havedoc &&
|
||||
!theconfig->getMimeViewerDef(doc.mimetype, apptag, 0).empty()) {
|
||||
popup->addAction(tr("&Open"), this, SLOT(menuEdit()));
|
||||
|
@ -1004,7 +1009,9 @@ void ResList::createPopupMenu(const QPoint& pos)
|
|||
popup->addAction(tr("&Write to File"), this, SLOT(menuSaveToFile()));
|
||||
}
|
||||
|
||||
popup->addAction(tr("Find &similar documents"), this, SLOT(menuExpand()));
|
||||
if (m_ismainlist)
|
||||
popup->addAction(tr("Find &similar documents"),
|
||||
this, SLOT(menuExpand()));
|
||||
|
||||
Rcl::Doc pdoc;
|
||||
if (m_source.isNotNull() && m_source->getEnclosing(doc, pdoc))
|
||||
|
@ -1028,8 +1035,13 @@ void ResList::createPopupMenu(const QPoint& pos)
|
|||
void ResList::menuPreview()
|
||||
{
|
||||
Rcl::Doc doc;
|
||||
if (getDoc(m_popDoc, doc))
|
||||
emit docPreviewClicked(m_popDoc, doc, 0);
|
||||
if (getDoc(m_popDoc, doc)) {
|
||||
if (m_ismainlist) {
|
||||
emit docPreviewClicked(m_popDoc, doc, 0);
|
||||
} else {
|
||||
emit previewRequested(doc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ResList::menuSaveToFile()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue