aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFelix (xq) Queißner <git@mq32.de>2021-03-06 15:32:18 +0100
committerFelix (xq) Queißner <git@mq32.de>2021-03-06 15:32:18 +0100
commit432563d958d001b88fd97cc38f93e592cb21fc0e (patch)
tree725ce1a2889500885bddcecfd6f7e0d30fc1329c /src
parent9457e720f24d8365ed6a1e82b016078b0bc17eb6 (diff)
downloadkristall-432563d958d001b88fd97cc38f93e592cb21fc0e.tar.gz
Closes #190
Diffstat (limited to 'src')
-rw-r--r--src/about/updates.gemini2
-rw-r--r--src/mainwindow.cpp30
-rw-r--r--src/mainwindow.hpp8
3 files changed, 21 insertions, 19 deletions
diff --git a/src/about/updates.gemini b/src/about/updates.gemini
index 46a9445..ddc0dbc 100644
--- a/src/about/updates.gemini
+++ b/src/about/updates.gemini
@@ -20,6 +20,8 @@
* Adds the option to open multiple kristall windows in one session.
* Adds --new-window command line option to open urls into a new kristall window instead of opening them as a new tab
* Adds --isolated command line option to start a separated instance of kristall
+* Adds possibility to open favourites with enter key in addition to double clicking.
+* Adds possibility to open history entries with enter key in addition to double clicking.
## 0.3 - TLS and security
* Adds support for transient client certificates
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 6f39b42..8d78baf 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -365,26 +365,11 @@ void MainWindow::on_browser_tabs_currentChanged(int index)
updateWindowTitle();
}
-void MainWindow::on_favourites_view_doubleClicked(const QModelIndex &index)
-{
- if(auto url = kristall::favourites.getFavourite(index).destination; url.isValid()) {
- this->addNewTab(true, url);
- }
-}
-
void MainWindow::on_browser_tabs_tabCloseRequested(int index)
{
delete tabAt(index);
}
-void MainWindow::on_history_view_doubleClicked(const QModelIndex &index)
-{
- BrowserTab * tab = this->curTab();
- if(tab != nullptr) {
- tab->navigateBack(index);
- }
-}
-
void MainWindow::on_tab_titleChanged(const QString &title)
{
auto * tab = qobject_cast<BrowserTab*>(sender());
@@ -791,3 +776,18 @@ void MainWindow::on_actionClose_Window_triggered()
{
this->deleteLater();
}
+
+void MainWindow::on_favourites_view_activated(const QModelIndex &index)
+{
+ if(auto url = kristall::favourites.getFavourite(index).destination; url.isValid()) {
+ this->addNewTab(true, url);
+ }
+}
+
+void MainWindow::on_history_view_activated(const QModelIndex &index)
+{
+ BrowserTab * tab = this->curTab();
+ if(tab != nullptr) {
+ tab->navigateBack(index);
+ }
+}
diff --git a/src/mainwindow.hpp b/src/mainwindow.hpp
index a268ec7..c89b865 100644
--- a/src/mainwindow.hpp
+++ b/src/mainwindow.hpp
@@ -57,8 +57,6 @@ private slots:
void on_browser_tabs_tabCloseRequested(int index);
- void on_history_view_doubleClicked(const QModelIndex &index);
-
void on_outline_view_clicked(const QModelIndex &index);
void on_actionSettings_triggered();
@@ -95,8 +93,6 @@ private slots:
void on_favourites_view_customContextMenuRequested(const QPoint pos);
- void on_favourites_view_doubleClicked(const QModelIndex &index);
-
void on_actionChangelog_triggered();
void on_actionManage_Certificates_triggered();
@@ -107,6 +103,10 @@ private slots:
void on_actionClose_Window_triggered();
+ void on_favourites_view_activated(const QModelIndex &index);
+
+ void on_history_view_activated(const QModelIndex &index);
+
private: // slots
void on_tab_fileLoaded(DocumentStats const & stats);