public
Fork of icefox/arora
Description: Cross platform web browser
Homepage: http://arora.googlecode.com/
Clone URL: git://github.com/Arora/arora.git
When you ctrl-click on a bookmark item in the bookmark toolbar open it in a new 
tab
Issue: 82
icefox (author)
Fri Aug 01 10:37:03 -0700 2008
commit  c0fb8a98c3cd3f85c243d2de78c93e11addb44f5
tree    27d1ff202868216ff35645ea92a849bca2e3a000
parent  b5c520901956effe9c425d55da49c3d77d87378f
...
919
920
921
922
923
924
925
926
927
928
929
 
 
 
 
 
 
 
 
 
 
 
930
931
932
...
934
935
936
937
938
939
940
941
942
943
944
...
919
920
921
 
922
923
924
925
926
 
 
927
928
929
930
931
932
933
934
935
936
937
938
939
940
...
942
943
944
 
 
 
 
 
945
946
947
0
@@ -919,14 +919,22 @@ BookmarkToolButton::BookmarkToolButton(QUrl url, QWidget *parent)
0
     : QToolButton(parent)
0
     , m_url(url)
0
 {
0
-    connect(this, SIGNAL(clicked()), this, SLOT(openBookmark()));
0
 }
0
 
0
 void BookmarkToolButton::mouseReleaseEvent(QMouseEvent *event)
0
 {
0
     QToolButton::mouseReleaseEvent(event);
0
-    if (event->button() == Qt::MidButton)
0
-        emit openBookmark(url(), TabWidget::NewTab, text());
0
+    if (hitButton(event->pos())) {
0
+        if (event->button() == Qt::MidButton)
0
+            emit openBookmark(url(), TabWidget::NewTab, text());
0
+        if (event->button() == Qt::LeftButton) {
0
+            TabWidget::Tab openLocation =
0
+                (event->modifiers() & Qt::ControlModifier)
0
+                ? TabWidget::NewTab
0
+                : TabWidget::CurrentTab;
0
+            emit openBookmark(url(), openLocation, text());
0
+        }
0
+    }
0
 }
0
 
0
 QUrl BookmarkToolButton::url() const
0
@@ -934,11 +942,6 @@ QUrl BookmarkToolButton::url() const
0
     return m_url;
0
 }
0
 
0
-void BookmarkToolButton::openBookmark()
0
-{
0
-    emit openBookmark(url(), TabWidget::CurrentTab, text());
0
-}
0
-
0
 BookmarksToolBar::BookmarksToolBar(BookmarksModel *model, QWidget *parent)
0
     : QToolBar(tr("Bookmark"), parent)
0
     , m_bookmarksModel(model)
...
329
330
331
332
333
334
335
336
337
...
329
330
331
 
 
 
332
333
334
0
@@ -329,9 +329,6 @@ public:
0
 protected:
0
     void mouseReleaseEvent(QMouseEvent *event);
0
 
0
-private slots:
0
-    void openBookmark();
0
-
0
 private:
0
     QUrl m_url;
0
 

Comments

gsasha Wed Feb 25 16:04:37 -0800 2009

lemme try