|
a/src/qtgui/rclmain_w.cpp |
|
b/src/qtgui/rclmain_w.cpp |
|
... |
|
... |
299 |
connect(restable, SIGNAL(editRequested(Rcl::Doc)),
|
299 |
connect(restable, SIGNAL(editRequested(Rcl::Doc)),
|
300 |
this, SLOT(startNativeViewer(Rcl::Doc)));
|
300 |
this, SLOT(startNativeViewer(Rcl::Doc)));
|
301 |
connect(restable, SIGNAL(docSaveToFileClicked(Rcl::Doc)),
|
301 |
connect(restable, SIGNAL(docSaveToFileClicked(Rcl::Doc)),
|
302 |
this, SLOT(saveDocToFile(Rcl::Doc)));
|
302 |
this, SLOT(saveDocToFile(Rcl::Doc)));
|
303 |
|
303 |
|
|
|
304 |
reslist->setRclMain(this);
|
304 |
connect(this, SIGNAL(docSourceChanged(RefCntr<DocSequence>)),
|
305 |
connect(this, SIGNAL(docSourceChanged(RefCntr<DocSequence>)),
|
305 |
reslist, SLOT(setDocSource(RefCntr<DocSequence>)));
|
306 |
reslist, SLOT(setDocSource(RefCntr<DocSequence>)));
|
306 |
connect(firstPageAction, SIGNAL(activated()),
|
307 |
connect(firstPageAction, SIGNAL(activated()),
|
307 |
reslist, SLOT(resultPageFirst()));
|
308 |
reslist, SLOT(resultPageFirst()));
|
308 |
connect(prevPageAction, SIGNAL(activated()),
|
309 |
connect(prevPageAction, SIGNAL(activated()),
|
|
... |
|
... |
1499 |
}
|
1500 |
}
|
1500 |
exefile.clear();
|
1501 |
exefile.clear();
|
1501 |
return false;
|
1502 |
return false;
|
1502 |
}
|
1503 |
}
|
1503 |
|
1504 |
|
1504 |
void RclMain::startNativeViewer(Rcl::Doc doc)
|
1505 |
void RclMain::startNativeViewer(Rcl::Doc doc, int pagenum)
|
1505 |
{
|
1506 |
{
|
|
|
1507 |
LOGDEB(("RclMain::startNativeViewer: page %d\n", pagenum));
|
1506 |
// Look for appropriate viewer
|
1508 |
// Look for appropriate viewer
|
1507 |
string cmdplusattr;
|
1509 |
string cmdplusattr;
|
1508 |
if (prefs.useDesktopOpen) {
|
1510 |
if (prefs.useDesktopOpen) {
|
1509 |
cmdplusattr = theconfig->getMimeViewerDef("application/x-all", "");
|
1511 |
cmdplusattr = theconfig->getMimeViewerDef("application/x-all", "");
|
1510 |
} else {
|
1512 |
} else {
|
|
... |
|
... |
1518 |
tr("No external viewer configured for mime type [")
|
1520 |
tr("No external viewer configured for mime type [")
|
1519 |
+ doc.mimetype.c_str() + "]");
|
1521 |
+ doc.mimetype.c_str() + "]");
|
1520 |
return;
|
1522 |
return;
|
1521 |
}
|
1523 |
}
|
1522 |
|
1524 |
|
1523 |
int pagenum = 1;
|
|
|
1524 |
if (m_source.isNotNull())
|
|
|
1525 |
pagenum = m_source->getFirstMatchPage(doc);
|
|
|
1526 |
if (pagenum == -1)
|
1525 |
if (pagenum == -1) {
|
1527 |
pagenum = 1;
|
1526 |
pagenum = 1;
|
|
|
1527 |
if (m_source.isNotNull())
|
|
|
1528 |
pagenum = m_source->getFirstMatchPage(doc);
|
|
|
1529 |
if (pagenum == -1)
|
|
|
1530 |
pagenum = 1;
|
|
|
1531 |
}
|
1528 |
char cpagenum[20];
|
1532 |
char cpagenum[20];
|
1529 |
sprintf(cpagenum, "%d", pagenum);
|
1533 |
sprintf(cpagenum, "%d", pagenum);
|
1530 |
|
1534 |
|
1531 |
// Extract possible viewer attributes
|
1535 |
// Extract possible viewer attributes
|
1532 |
ConfSimple attrs;
|
1536 |
ConfSimple attrs;
|