Exemplo n.º 1
0
void Window::triggerAction(int identifier, const QVariantMap &parameters)
{
	if (parameters.contains(QLatin1String("isBounced")))
	{
		AddressWidget *addressWidget = NULL;
		SearchWidget *searchWidget = NULL;

		if (identifier == ActionsManager::ActivateAddressFieldAction || identifier == ActionsManager::ActivateSearchFieldAction)
		{
			addressWidget = findAddressWidget();

			for (int i = 0; i < m_searchWidgets.count(); ++i)
			{
				if (m_searchWidgets.at(i) && m_searchWidgets.at(i)->isVisible())
				{
					searchWidget = m_searchWidgets.at(i);

					break;
				}
			}
		}

		if (identifier == ActionsManager::ActivateSearchFieldAction && searchWidget)
		{
			searchWidget->activate(Qt::ShortcutFocusReason);
		}
		else if (addressWidget)
		{
			if (identifier == ActionsManager::ActivateAddressFieldAction)
			{
				addressWidget->activate(Qt::ShortcutFocusReason);
			}
			else if (identifier == ActionsManager::ActivateSearchFieldAction)
			{
				addressWidget->setText(QLatin1String("? "));
				addressWidget->activate(Qt::OtherFocusReason);
			}
			else if (identifier == ActionsManager::GoAction)
			{
				addressWidget->handleUserInput(addressWidget->getText(), WindowsManager::CurrentTabOpen);

				return;
			}
		}
		else if (identifier == ActionsManager::ActivateAddressFieldAction || identifier == ActionsManager::ActivateSearchFieldAction)
		{
			OpenAddressDialog dialog(this);

			if (identifier == ActionsManager::ActivateSearchFieldAction)
			{
				dialog.setText(QLatin1String("? "));
			}

			connect(&dialog, SIGNAL(requestedLoadUrl(QUrl,WindowsManager::OpenHints)), this, SLOT(handleOpenUrlRequest(QUrl,WindowsManager::OpenHints)));
			connect(&dialog, SIGNAL(requestedOpenBookmark(BookmarksItem*,WindowsManager::OpenHints)), this, SIGNAL(requestedOpenBookmark(BookmarksItem*,WindowsManager::OpenHints)));
			connect(&dialog, SIGNAL(requestedSearch(QString,QString,WindowsManager::OpenHints)), this, SLOT(handleSearchRequest(QString,QString,WindowsManager::OpenHints)));

			dialog.exec();
		}
Exemplo n.º 2
0
void AddressWidget::notifyRequestedLoadUrl()
{
	const QString url = text().trimmed();

	if (isAddress(url))
	{
		emit requestedLoadUrl(getUrl());
	}
}
Exemplo n.º 3
0
void MainWindow::actionGoToPage()
{
	OpenAddressDialog dialog(this);

	connect(&dialog, SIGNAL(requestedLoadUrl(QUrl,OpenHints)), m_windowsManager, SLOT(open(QUrl,OpenHints)));
	connect(&dialog, SIGNAL(requestedOpenBookmark(BookmarksItem*,OpenHints)), m_windowsManager, SLOT(open(BookmarksItem*,OpenHints)));
	connect(&dialog, SIGNAL(requestedSearch(QString,QString,OpenHints)), m_windowsManager, SLOT(search(QString,QString,OpenHints)));

	dialog.exec();
}
Exemplo n.º 4
0
void AddressWidget::verifyLookup(const QHostInfo &host)
{
	killTimer(m_lookupTimer);

	m_lookupTimer = 0;

	if (host.error() == QHostInfo::NoError)
	{
		emit requestedLoadUrl(getUrl());
	}
	else
	{
		emit requestedSearch(m_lookupQuery, SettingsManager::getValue(QLatin1String("Search/DefaultSearchEngine")).toString());
	}

	m_lookupQuery.clear();
}
void OpenAddressDialog::handleUserInput()
{
	if (m_addressWidget->lineEdit()->text().trimmed().isEmpty())
	{
		close();
	}
	else if (!m_inputInterpreter)
	{
		m_inputInterpreter = new InputInterpreter(this);

		connect(m_inputInterpreter, SIGNAL(requestedOpenBookmark(BookmarksItem*,OpenHints)), this, SIGNAL(requestedOpenBookmark(BookmarksItem*,OpenHints)));
		connect(m_inputInterpreter, SIGNAL(requestedOpenUrl(QUrl,OpenHints)), this, SIGNAL(requestedLoadUrl(QUrl,OpenHints)));
		connect(m_inputInterpreter, SIGNAL(requestedSearch(QString,QString,OpenHints)), this, SIGNAL(requestedSearch(QString,QString,OpenHints)));
		connect(m_inputInterpreter, SIGNAL(destroyed()), this, SLOT(accept()));

		m_inputInterpreter->interpret(m_addressWidget->lineEdit()->text(), WindowsManager::calculateOpenHints(QGuiApplication::keyboardModifiers(), Qt::LeftButton, CurrentTabOpen));
	}
Exemplo n.º 6
0
void AddressWidget::mouseReleaseEvent(QMouseEvent *event)
{
	if (text().isEmpty() && event->button() == Qt::MiddleButton && !QApplication::clipboard()->text().isEmpty())
	{
		const QString text = QApplication::clipboard()->text().trimmed();

		if (isAddress(text))
		{
			emit requestedLoadUrl(QUrl(text));
		}

		event->accept();
	}
	else
	{
		QLineEdit::mouseReleaseEvent(event);
	}
}
Exemplo n.º 7
0
void Window::triggerAction(int identifier, const QVariantMap &parameters)
{
	if (parameters.contains(QLatin1String("isBounced")))
	{
		if (identifier == ActionsManager::ActivateSearchFieldAction && !m_searchWidgets.isEmpty() && m_searchWidgets.at(0))
		{
			m_searchWidgets.at(0)->activate(Qt::ShortcutFocusReason);
		}
		else if (!m_addressWidgets.isEmpty() && m_addressWidgets.at(0))
		{
			if (identifier == ActionsManager::ActivateAddressFieldAction)
			{
				m_addressWidgets.at(0)->activate(Qt::ShortcutFocusReason);
			}
			else if (identifier == ActionsManager::ActivateSearchFieldAction)
			{
				m_addressWidgets.at(0)->setText(QLatin1String("? "));
				m_addressWidgets.at(0)->activate(Qt::OtherFocusReason);
			}
			else if (identifier == ActionsManager::GoAction)
			{
				m_addressWidgets.at(0)->handleUserInput(m_addressWidgets.at(0)->getText(), WindowsManager::CurrentTabOpen);

				return;
			}
		}
		else if (identifier == ActionsManager::ActivateAddressFieldAction || identifier == ActionsManager::ActivateSearchFieldAction)
		{
			OpenAddressDialog dialog(this);

			if (identifier == ActionsManager::ActivateSearchFieldAction)
			{
				dialog.setText(QLatin1String("? "));
			}

			connect(&dialog, SIGNAL(requestedLoadUrl(QUrl,WindowsManager::OpenHints)), this, SLOT(handleOpenUrlRequest(QUrl,WindowsManager::OpenHints)));
			connect(&dialog, SIGNAL(requestedOpenBookmark(BookmarksItem*,WindowsManager::OpenHints)), this, SIGNAL(requestedOpenBookmark(BookmarksItem*,WindowsManager::OpenHints)));
			connect(&dialog, SIGNAL(requestedSearch(QString,QString,WindowsManager::OpenHints)), this, SLOT(handleSearchRequest(QString,QString,WindowsManager::OpenHints)));

			dialog.exec();
		}
	}
Exemplo n.º 8
0
void AddressWidget::handleUserInput(const QString &text)
{
	const BookmarkInformation *bookmark = BookmarksManager::getBookmarkByKeyword(text);

	if (bookmark)
	{
		WindowsManager *windowsManager = SessionsManager::getWindowsManager();

		if (windowsManager)
		{
			windowsManager->open(bookmark);

			return;
		}
	}

	if (text == QString(QLatin1Char('~')) || text.startsWith(QLatin1Char('~') + QDir::separator()))
	{
		const QStringList locations = QStandardPaths::standardLocations(QStandardPaths::HomeLocation);

		if (!locations.isEmpty())
		{
			emit requestedLoadUrl(QUrl(locations.first() + text.mid(1)));

			return;
		}
	}

	const QUrl url = QUrl::fromUserInput(text);

	if (url.isValid() && (url.isLocalFile() || QRegularExpression(QLatin1String("^(\\w+\\:\\S+)|([\\w\\-]+\\.[a-zA-Z]{2,}(/\\S*)?$)")).match(text).hasMatch()))
	{
		emit requestedLoadUrl(url);

		return;
	}

	const QString shortcut = text.section(QLatin1Char(' '), 0, 0);
	const QStringList engines = SearchesManager::getSearchEngines();
	SearchInformation *engine = NULL;

	for (int i = 0; i < engines.count(); ++i)
	{
		engine = SearchesManager::getSearchEngine(engines.at(i));

		if (engine && shortcut == engine->shortcut)
		{
			emit requestedSearch(text.section(QLatin1Char(' '), 1), engine->identifier);

			return;
		}
	}

	const int lookupTimeout = SettingsManager::getValue(QLatin1String("AddressField/HostLookupTimeout")).toInt();

	if (url.isValid() && lookupTimeout > 0)
	{
		if (text == m_lookupQuery)
		{
			return;
		}

		m_lookupQuery = text;

		if (m_lookupTimer != 0)
		{
			QHostInfo::abortHostLookup(m_lookupID);

			killTimer(m_lookupTimer);

			m_lookupTimer = 0;
		}

		m_lookupID = QHostInfo::lookupHost(url.host(), this, SLOT(verifyLookup(QHostInfo)));

		m_lookupTimer = startTimer(lookupTimeout);

		return;
	}

	emit requestedSearch(text, SettingsManager::getValue(QLatin1String("Search/DefaultSearchEngine")).toString());
}
Exemplo n.º 9
0
void Window::triggerAction(int identifier, const QVariantMap &parameters)
{
	switch (identifier)
	{
		case ActionsManager::CloneTabAction:
			if (canClone())
			{
				m_mainWindow->addWindow(clone(true, m_mainWindow));
			}

			break;
		case ActionsManager::PinTabAction:
			setPinned(!isPinned());

			break;
		case ActionsManager::DetachTabAction:
			if (m_mainWindow->getWindowCount() > 1)
			{
				m_mainWindow->moveWindow(this);
			}

			break;
		case ActionsManager::SuspendTabAction:
			if (!m_contentsWidget || m_contentsWidget->close())
			{
				m_session = getSession();

				setContentsWidget(nullptr);
			}

			break;
		case ActionsManager::CloseTabAction:
			if (!isPinned())
			{
				requestClose();
			}

			break;
		case ActionsManager::GoAction:
		case ActionsManager::ActivateAddressFieldAction:
		case ActionsManager::ActivateSearchFieldAction:
			{
				AddressWidget *addressWidget(findAddressWidget());
				SearchWidget *searchWidget(nullptr);

				for (int i = 0; i < m_searchWidgets.count(); ++i)
				{
					if (m_searchWidgets.at(i) && m_searchWidgets.at(i)->isVisible())
					{
						searchWidget = m_searchWidgets.at(i);

						break;
					}
				}

				if (identifier == ActionsManager::ActivateSearchFieldAction && searchWidget)
				{
					searchWidget->activate(Qt::ShortcutFocusReason);
				}
				else if (addressWidget)
				{
					if (identifier == ActionsManager::ActivateAddressFieldAction)
					{
						addressWidget->activate(Qt::ShortcutFocusReason);
					}
					else if (identifier == ActionsManager::ActivateSearchFieldAction)
					{
						addressWidget->setText(QLatin1String("? "));
						addressWidget->activate(Qt::OtherFocusReason);
					}
					else if (identifier == ActionsManager::GoAction)
					{
						addressWidget->handleUserInput(addressWidget->text(), SessionsManager::CurrentTabOpen);

						return;
					}
				}
				else if (identifier == ActionsManager::ActivateAddressFieldAction || identifier == ActionsManager::ActivateSearchFieldAction)
				{
					OpenAddressDialog dialog(this);

					if (identifier == ActionsManager::ActivateSearchFieldAction)
					{
						dialog.setText(QLatin1String("? "));
					}

					connect(&dialog, SIGNAL(requestedLoadUrl(QUrl,SessionsManager::OpenHints)), this, SLOT(handleOpenUrlRequest(QUrl,SessionsManager::OpenHints)));
					connect(&dialog, SIGNAL(requestedOpenBookmark(BookmarksItem*,SessionsManager::OpenHints)), this, SIGNAL(requestedOpenBookmark(BookmarksItem*,SessionsManager::OpenHints)));
					connect(&dialog, SIGNAL(requestedSearch(QString,QString,SessionsManager::OpenHints)), this, SLOT(handleSearchRequest(QString,QString,SessionsManager::OpenHints)));

					dialog.exec();
				}
			}

			break;
		case ActionsManager::PrintAction:
			{
				QPrinter printer;
				printer.setCreator(QStringLiteral("Otter Browser %1").arg(Application::getFullVersion()));

				QPrintDialog printDialog(&printer, this);
				printDialog.setWindowTitle(tr("Print Page"));

				if (printDialog.exec() != QDialog::Accepted)
				{
					break;
				}

				getContentsWidget()->print(&printer);
			}

			break;
		case ActionsManager::PrintPreviewAction:
			{
				QPrintPreviewDialog printPreviewDialog(this);
				printPreviewDialog.printer()->setCreator(QStringLiteral("Otter Browser %1").arg(Application::getFullVersion()));
				printPreviewDialog.setWindowFlags(printPreviewDialog.windowFlags() | Qt::WindowMaximizeButtonHint | Qt::WindowMinimizeButtonHint);
				printPreviewDialog.setWindowTitle(tr("Print Preview"));

				if (QApplication::activeWindow())
				{
					printPreviewDialog.resize(QApplication::activeWindow()->size());
				}

				connect(&printPreviewDialog, SIGNAL(paintRequested(QPrinter*)), getContentsWidget(), SLOT(print(QPrinter*)));

				printPreviewDialog.exec();
			}

			break;
		case ActionsManager::BookmarkPageAction:
			{
				const QUrl url((parameters.contains(QLatin1String("url")) ? parameters[QLatin1String("url")].toUrl() : getUrl()).adjusted(QUrl::RemovePassword));

				if (url.isEmpty())
				{
					break;
				}

				const QVector<BookmarksItem*> bookmarks(BookmarksManager::getModel()->getBookmarks(url));

				if (bookmarks.isEmpty())
				{
					BookmarkPropertiesDialog dialog(url, (parameters.contains(QLatin1String("title")) ? parameters[QLatin1String("title")].toString() : getTitle()), parameters[QLatin1String("description")].toString(), nullptr, -1, true, this);
					dialog.exec();
				}
				else
				{
					BookmarkPropertiesDialog dialog(bookmarks.at(0), this);
					dialog.exec();
				}
			}

			break;
		case ActionsManager::FullScreenAction:
			if (m_addressBar)
			{
				m_addressBar->setVisible(m_addressBar->shouldBeVisible(m_mainWindow->isFullScreen()));
			}

			if (m_contentsWidget)
			{
				m_contentsWidget->triggerAction(identifier, parameters);
			}

			break;
		default:
			getContentsWidget()->triggerAction(identifier, parameters);

			break;
	}
Exemplo n.º 10
0
void OpenAddressDialog::handleUserInput()
{
	if (m_addressWidget->text().trimmed().isEmpty())
	{
		close();
	}
	else if (!m_inputInterpreter)
	{
		m_inputInterpreter = new InputInterpreter(this);

		connect(m_inputInterpreter, SIGNAL(requestedOpenBookmark(BookmarksItem*,SessionsManager::OpenHints)), this, SIGNAL(requestedOpenBookmark(BookmarksItem*,SessionsManager::OpenHints)));
		connect(m_inputInterpreter, SIGNAL(requestedOpenUrl(QUrl,SessionsManager::OpenHints)), this, SIGNAL(requestedLoadUrl(QUrl,SessionsManager::OpenHints)));
		connect(m_inputInterpreter, SIGNAL(requestedSearch(QString,QString,SessionsManager::OpenHints)), this, SIGNAL(requestedSearch(QString,QString,SessionsManager::OpenHints)));
		connect(m_inputInterpreter, SIGNAL(destroyed()), this, SLOT(accept()));

		m_inputInterpreter->interpret(m_addressWidget->text(), SessionsManager::calculateOpenHints(SessionsManager::CurrentTabOpen));
	}
Exemplo n.º 11
0
void MainWindow::triggerAction(int identifier, const QVariantMap &parameters)
{
	switch (identifier)
	{
		case ActionsManager::NewWindowAction:
			emit requestedNewWindow(false, false, QUrl());

			break;
		case ActionsManager::NewWindowPrivateAction:
			emit requestedNewWindow(true, false, QUrl());

			break;
		case ActionsManager::OpenAction:
			{
				const QUrl url = QFileDialog::getOpenFileUrl(this, tr("Open File"));

				if (url.isValid())
				{
					m_windowsManager->open(url);
				}
			}

			break;
		case ActionsManager::ClosePrivateTabsPanicAction:
			if (SessionsManager::isPrivate())
			{
				Application::getInstance()->close();
			}
			else
			{
				const QList<MainWindow*> windows = SessionsManager::getWindows();

				for (int i = 0; i < windows.count(); ++i)
				{
					if (windows[i]->getWindowsManager()->isPrivate())
					{
						windows[i]->close();
					}
					else
					{
						windows[i]->getWindowsManager()->triggerAction(ActionsManager::ClosePrivateTabsAction);
					}
				}
			}

			break;
		case ActionsManager::MaximizeTabAction:
		case ActionsManager::MinimizeTabAction:
		case ActionsManager::RestoreTabAction:
		case ActionsManager::AlwaysOnTopTabAction:
		case ActionsManager::MaximizeAllAction:
		case ActionsManager::MinimizeAllAction:
		case ActionsManager::RestoreAllAction:
		case ActionsManager::CascadeAllAction:
		case ActionsManager::TileAllAction:
			m_workspace->triggerAction(identifier, parameters);

			break;
		case ActionsManager::CloseWindowAction:
			close();

			break;
		case ActionsManager::SessionsAction:
			{
				SessionsManagerDialog dialog(this);
				dialog.exec();
			}

			break;
		case ActionsManager::SaveSessionAction:
			{
				SaveSessionDialog dialog(this);
				dialog.exec();
			}

			break;
		case ActionsManager::GoToPageAction:
			{
				OpenAddressDialog dialog(this);

				connect(&dialog, SIGNAL(requestedLoadUrl(QUrl,WindowsManager::OpenHints)), m_windowsManager, SLOT(open(QUrl,WindowsManager::OpenHints)));
				connect(&dialog, SIGNAL(requestedOpenBookmark(BookmarksItem*,WindowsManager::OpenHints)), m_windowsManager, SLOT(open(BookmarksItem*,WindowsManager::OpenHints)));
				connect(&dialog, SIGNAL(requestedSearch(QString,QString,WindowsManager::OpenHints)), m_windowsManager, SLOT(search(QString,QString,WindowsManager::OpenHints)));

				dialog.exec();
			}

			break;
		case ActionsManager::GoToHomePageAction:
			{
				const QString homePage = SettingsManager::getValue(QLatin1String("Browser/HomePage")).toString();

				if (!homePage.isEmpty())
				{
					m_windowsManager->open(QUrl(homePage), WindowsManager::CurrentTabOpen);
				}
			}

			break;
		case ActionsManager::BookmarksAction:
			{
				const QUrl url(QLatin1String("about:bookmarks"));

				if (!SessionsManager::hasUrl(url, true))
				{
					m_windowsManager->open(url);
				}
			}

			break;
		case ActionsManager::AddBookmarkAction:
			addBookmark(QUrl(), QString(), QString(), true);

			break;
		case ActionsManager::QuickBookmarkAccessAction:
			{
				OpenBookmarkDialog dialog(this);

				connect(&dialog, SIGNAL(requestedOpenBookmark(BookmarksItem*)), m_windowsManager, SLOT(open(BookmarksItem*)));

				dialog.exec();
			}

			break;
		case ActionsManager::WorkOfflineAction:
			SettingsManager::setValue(QLatin1String("Network/WorkOffline"), parameters);

			break;
		case ActionsManager::FullScreenAction:
			if (isFullScreen())
			{
				restoreWindowState();
			}
			else
			{
				storeWindowState();
				showFullScreen();
			}

			break;
		case ActionsManager::ShowTabSwitcherAction:
			if (!m_tabSwitcher)
			{
				m_tabSwitcher = new TabSwitcherWidget(m_windowsManager, this);
			}

			m_tabSwitcher->raise();
			m_tabSwitcher->resize(size());
			m_tabSwitcher->show(TabSwitcherWidget::ActionReason);

			break;
		case ActionsManager::ShowMenuBarAction:
			{
				ToolBarDefinition definition = ToolBarsManager::getToolBarDefinition(ToolBarsManager::MenuBar);
				definition.visibility = (parameters.value(QLatin1String("isChecked")).toBool() ? AlwaysVisibleToolBar : AlwaysHiddenToolBar);

				ToolBarsManager::setToolBar(definition);
			}

			break;
		case ActionsManager::ShowTabBarAction:
			{
				ToolBarDefinition definition = ToolBarsManager::getToolBarDefinition(ToolBarsManager::TabBar);
				definition.visibility = (parameters.value(QLatin1String("isChecked")).toBool() ? AlwaysVisibleToolBar : AlwaysHiddenToolBar);

				ToolBarsManager::setToolBar(definition);
			}

			break;
		case ActionsManager::ShowSidebarAction:
			SettingsManager::setValue(QLatin1String("Sidebar/Visible"), parameters.value(QLatin1String("isChecked")).toBool());

			break;
		case ActionsManager::OpenPanelAction:
			if (m_sidebar && m_sidebar->getCurrentPanel())
			{
				m_windowsManager->open(m_sidebar->getCurrentPanel()->getUrl(), WindowsManager::NewTabOpen);
			}

			break;
		case ActionsManager::ClosePanelAction:
			SettingsManager::setValue(QLatin1String("Sidebar/CurrentPanel"), QString());

			break;
		case ActionsManager::ShowErrorConsoleAction:
			m_ui->consoleDockWidget->setVisible(parameters.value(QLatin1String("isChecked")).toBool());

			break;
		case ActionsManager::LockToolBarsAction:
			ToolBarsManager::setToolBarsLocked(parameters.value(QLatin1String("isChecked")).toBool());

			break;
		case ActionsManager::ContentBlockingAction:
			{
				ContentBlockingDialog dialog(this);
				dialog.exec();
			}

			break;
		case ActionsManager::HistoryAction:
			{
				const QUrl url(QLatin1String("about:history"));

				if (!SessionsManager::hasUrl(url, true))
				{
					m_windowsManager->open(url);
				}
			}

			break;
		case ActionsManager::ClearHistoryAction:
			{
				ClearHistoryDialog dialog(SettingsManager::getValue(QLatin1String("History/ManualClearOptions")).toStringList(), false, this);
				dialog.exec();
			}

			break;
		case ActionsManager::NotesAction:
			{
				const QUrl url(QLatin1String("about:notes"));

				if (!SessionsManager::hasUrl(url, true))
				{
					m_windowsManager->open(url);
				}
			}

			break;
		case ActionsManager::TransfersAction:
			{
				const QUrl url(QLatin1String("about:transfers"));

				if (!SessionsManager::hasUrl(url, true))
				{
					m_windowsManager->open(url);
				}
			}

			break;
		case ActionsManager::CookiesAction:
			{
				const QUrl url(QLatin1String("about:cookies"));

				if (!SessionsManager::hasUrl(url, true))
				{
					m_windowsManager->open(url);
				}
			}

			break;
		case ActionsManager::PreferencesAction:
			{
				PreferencesDialog dialog(QLatin1String("general"), this);
				dialog.exec();
			}

			break;
		case ActionsManager::SwitchApplicationLanguageAction:
			{
				LocaleDialog dialog(this);
				dialog.exec();
			}

			break;
		case ActionsManager::CheckForUpdatesAction:
			{
				UpdateCheckerDialog *dialog = new UpdateCheckerDialog(this);
				dialog->show();
			}

			break;
		case ActionsManager::DiagnosticReportAction:
			{
				ReportDialog *dialog = new ReportDialog(this);
				dialog->show();
			}

			break;
		case ActionsManager::AboutApplicationAction:
			{
				WebBackend *backend = AddonsManager::getWebBackend();
				QString about = tr("<b>Otter %1</b><br>Web browser controlled by the user, not vice-versa.").arg(Application::getInstance()->getFullVersion());
				about.append(QLatin1String("<br><br>") + tr("Web backend: %1 %2.").arg(backend->getTitle()).arg(backend->getEngineVersion()) + QLatin1String("<br><br>"));

				if (QSslSocket::supportsSsl())
				{
					 about.append(tr("SSL library version: %1.").arg(QSslSocket::sslLibraryVersionString()));
				}
				else
				{
					about.append(tr("SSL library not available."));
				}

				QMessageBox::about(this, QLatin1String("Otter"), about);
			}

			break;
		case ActionsManager::AboutQtAction:
			Application::getInstance()->aboutQt();

			break;
		case ActionsManager::ExitAction:
			Application::getInstance()->close();

			break;
		default:
			m_windowsManager->triggerAction(identifier, parameters);

			break;
	}
}