]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blobdiff - src/windows/BrowserWindow.cpp
Open new tabs adjacent to the current tab. https://redmine.stoutner.com/issues/1110
[PrivacyBrowserPC.git] / src / windows / BrowserWindow.cpp
index 99fc2fac5f92d8f9a3d628d678443426ac822e26..394340bb9ba56c996e9b2f90c4bcc159cf1e287a 100644 (file)
@@ -625,9 +625,9 @@ void BrowserWindow::addFinalBookmarkFolderMenuActions(QMenu *menuPointer, double
             // Get all the folder URLs.
             QList<QString> *folderUrlsListPointer = BookmarksDatabase::getAllFolderUrls(folderId);
 
-            // Open the URLs in new tabs.  `true` removes the URL line edit focus, `false` does not load a background tab.
+            // Open the URLs in new tabs.  `true` removes the URL line edit focus, `true` opens the new tabs in an adjacent tab.  `false` does not load a background tab.
             for (QString url : *folderUrlsListPointer)
-                tabWidgetPointer->addTab(true, false, url);
+                tabWidgetPointer->addTab(true, true, false, url);
         }
     );
 
@@ -638,9 +638,9 @@ void BrowserWindow::addFinalBookmarkFolderMenuActions(QMenu *menuPointer, double
             // Get all the folder URLs.
             QList<QString> *folderUrlsListPointer = BookmarksDatabase::getAllFolderUrls(folderId);
 
-            // Open the URLs in new tabs.  `true` removes the URL line edit focus, `true` loads a background tab.
+            // Open the URLs in new tabs.  `true` removes the URL line edit focus, `true` opens the new tabs in an adjacent tab.  `true` loads a background tab.
             for (QString url : *folderUrlsListPointer)
-                tabWidgetPointer->addTab(true, true, url);
+                tabWidgetPointer->addTab(true, true, true, url);
         }
     );
 
@@ -656,9 +656,9 @@ void BrowserWindow::addFinalBookmarkFolderMenuActions(QMenu *menuPointer, double
             // Get a count of the folder URLs.
             const int folderUrls = folderUrlsListPointer->count();
 
-            // Load all the other URLs.  `true` removes the URL line edit focus, `true` loads a background tab.
+            // Load all the other URLs.  `true` removes the URL line edit focus, `false` does not load the new tabs in adjacent tabs.  `true` loads a background tab.
             for (int i = 1; i < folderUrls; ++i)
-                browserWindowPointer->tabWidgetPointer->addTab(true, true, folderUrlsListPointer->value(i));
+                browserWindowPointer->tabWidgetPointer->addTab(true, false, true, folderUrlsListPointer->value(i));
 
             // Show the new browser window.
             browserWindowPointer->show();
@@ -1322,8 +1322,8 @@ void BrowserWindow::showBookmarkContextMenu(const QPoint &point)
                     // Get the bookmark.
                     BookmarkStruct *bookmarkStructPointer = BookmarksDatabase::getBookmark(databaseId);
 
-                    // Open the bookmark in a new tab.  `true` removes the URL line edit focus, `false` does not load a background tab.
-                    tabWidgetPointer->addTab(true, false, bookmarkStructPointer->url);
+                    // Open the bookmark in a new tab.  `true` removes the URL line edit focus, `true` opens the new tab in an adjacent tab.  `false` does not load a background tab.
+                    tabWidgetPointer->addTab(true, true, false, bookmarkStructPointer->url);
                 }
             );
 
@@ -1333,8 +1333,8 @@ void BrowserWindow::showBookmarkContextMenu(const QPoint &point)
                     // Get the bookmark.
                     BookmarkStruct *bookmarkStructPointer = BookmarksDatabase::getBookmark(databaseId);
 
-                    // Open the bookmark in a new tab.  `true` removes the URL line edit focus, `true` loads a background tab.
-                    tabWidgetPointer->addTab(true, true, bookmarkStructPointer->url);
+                    // Open the bookmark in a new tab.  `true` removes the URL line edit focus, `true` opens the new tab in an adjacent tab.  `true` loads a background tab.
+                    tabWidgetPointer->addTab(true, true, true, bookmarkStructPointer->url);
                 }
             );
 
@@ -1823,8 +1823,8 @@ void BrowserWindow::toggleViewSourceInNewTab() const
         url = url.prepend(QLatin1String("view-source:"));
     }
 
-    // Add the new tab.  `true` removes the URL line edit focus, `false` does not open a background tab.
-    tabWidgetPointer->addTab(true, false, url);
+    // Add the new tab.  `true` removes the URL line edit focus, `true` opens the new tab in an adjacent tab.  `false` does not open a background tab.
+    tabWidgetPointer->addTab(true, true, false, url);
 }
 
 void BrowserWindow::updateBookmarkedAction() const