mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-19 22:40:36 -04:00
Adding a link from the browser now starts RetroShare when it is not running.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4157 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
20fa00c40e
commit
099cc6c11c
5 changed files with 19 additions and 17 deletions
|
@ -91,18 +91,10 @@ bool EventReceiver::start()
|
|||
return result;
|
||||
}
|
||||
|
||||
void EventReceiver::showNoRunningInstanceFound()
|
||||
{
|
||||
QMessageBox mb(QMessageBox::Critical, "RetroShare", QObject::tr("No running instance of RetroShare found."), QMessageBox::Ok);
|
||||
mb.setWindowIcon(QIcon(":/images/rstray3.png"));
|
||||
mb.exec();
|
||||
}
|
||||
|
||||
bool EventReceiver::sendRetroShareLink(const QString& link)
|
||||
{
|
||||
if (!sharedMMemory.attach()) {
|
||||
/* No running instance found */
|
||||
showNoRunningInstanceFound();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -122,7 +114,6 @@ bool EventReceiver::sendRetroShareLink(const QString& link)
|
|||
|
||||
SendMessage((HWND) info->wid, WM_COPYDATA, (WPARAM) 0, (LPARAM) (PCOPYDATASTRUCT) &send);
|
||||
} else {
|
||||
showNoRunningInstanceFound();
|
||||
result = false;
|
||||
}
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue