diff -r df4fdaa07527 -r 1fae1d33285d mainwindow.cpp --- a/mainwindow.cpp Wed May 31 12:27:38 2006 +0000 +++ b/mainwindow.cpp Wed May 31 12:27:38 2006 +0000 @@ -1161,9 +1161,9 @@ actionEditOpenURLTab->addTo ( branchContextMenu ); actionEditURL->addTo ( branchContextMenu ); actionEditHeading2URL->addTo ( branchContextMenu ); + actionEditBugzilla2URL->addTo( branchContextMenu ); if (settings.readBoolEntry( "/vym/mainwindow/showTestMenu",false)) { - actionEditBugzilla2URL->addTo( branchContextMenu ); actionEditFATE2URL->addTo( branchContextMenu ); } branchContextMenu->insertSeparator(); @@ -2230,23 +2230,40 @@ QString url=currentMapEditor()->getURL(); if (url=="") return; QString browser=settings.readEntry("/vym/mainwindow/readerURL" ); - if (browser.contains("konqueror") && procBrowser && procBrowser->isRunning()) + if (procBrowser && procBrowser->isRunning()) { - // Try to open new tab in existing browser - QProcess *p=new QProcess (this); - p->addArgument ("dcop"); - p->addArgument (QString("konqueror-%1").arg(procBrowser->processIdentifier())); - p->addArgument ("konqueror-mainwindow#1"); - p->addArgument ("newTab"); - p->addArgument (url); - if ( !p->start() ) - // try to set browser - QMessageBox::warning(0, - tr("Warning"), - tr("Couldn't start %1 to open a new tab in %2.").arg("dcop").arg("konqueror")); - } else - // Open new browser - editOpenURL(); + if (browser.contains("konqueror")) + { + // Try to open new tab in existing konqueror started previously by vym + QProcess *p=new QProcess (this); + p->addArgument ("dcop"); + p->addArgument (QString("konqueror-%1").arg(procBrowser->processIdentifier())); + p->addArgument ("konqueror-mainwindow#1"); + p->addArgument ("newTab"); + p->addArgument (url); + if ( !p->start() ) + // try to set browser + QMessageBox::warning(0, + tr("Warning"), + tr("Couldn't start %1 to open a new tab in %2.").arg("dcop").arg("konqueror")); + return; + } else if (browser.contains ("firefox") || browser.contains ("mozilla") ) + { + // Try to open new tab in firefox + QProcess *p=new QProcess (this); + p->addArgument (browser); + p->addArgument ("-remote"); + p->addArgument (QString("openurl(%1,new-tab)").arg(url)); + if ( !p->start() ) + // try to set browser + QMessageBox::warning(0, + tr("Warning"), + tr("Couldn't start %1 to open a new tab").arg(browser)); + return; + } + } + // Open new browser + editOpenURL(); } }