summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrell Anderson <humanreadable@yahoo.com>2012-03-07 17:46:51 -0600
committerDarrell Anderson <humanreadable@yahoo.com>2012-03-07 17:46:51 -0600
commit769054446b8e43589e94869240e8642e5b93e9df (patch)
tree22c3eb329e49db5d2838cdd0bb4cd06c3f6eff29
parent0a382195c4b1822d4120a50d8a6c1269467386ac (diff)
downloadtdebase-769054446b8e43589e94869240e8642e5b93e9df.tar.gz
tdebase-769054446b8e43589e94869240e8642e5b93e9df.zip
Restore Open in background tab context menu.
This closes bug report 245.
m---------cmake0
-rw-r--r--konqueror/konq_guiclients.cc9
-rw-r--r--konqueror/konq_mainwindow.cc18
-rw-r--r--konqueror/konq_mainwindow.h1
4 files changed, 24 insertions, 4 deletions
diff --git a/cmake b/cmake
-Subproject 6868254e6c10ba5b95ef622b25c39144f3d1161
+Subproject 6b3a1fc54f258941ae7ae10909a23d32afee9df
diff --git a/konqueror/konq_guiclients.cc b/konqueror/konq_guiclients.cc
index caf909d68..5a9742ae4 100644
--- a/konqueror/konq_guiclients.cc
+++ b/konqueror/konq_guiclients.cc
@@ -104,8 +104,8 @@ PopupMenuGUIClient::PopupMenuGUIClient( KonqMainWindow *mainWindow,
openInSameWindow.setAttribute( "name", "sameview" );
openInSameWindow.setAttribute( "group", "tabhandling" );
menu.appendChild( openInSameWindow );
-
- TQDomElement openInWindow = m_doc.createElement( "action" );
+
+ TQDomElement openInWindow = m_doc.createElement( "action" );
openInWindow.setAttribute( "name", "newview" );
openInWindow.setAttribute( "group", "tabhandling" );
menu.appendChild( openInWindow );
@@ -115,6 +115,11 @@ PopupMenuGUIClient::PopupMenuGUIClient( KonqMainWindow *mainWindow,
openInTabElement.setAttribute( "group", "tabhandling" );
menu.appendChild( openInTabElement );
+ TQDomElement openInTabFrontElement = m_doc.createElement( "action" );
+ openInTabFrontElement.setAttribute( "name", "openintabfront" );
+ openInTabFrontElement.setAttribute( "group", "tabhandling" );
+ menu.appendChild( openInTabFrontElement );
+
TQDomElement separatorElement = m_doc.createElement( "separator" );
separatorElement.setAttribute( "group", "tabhandling" );
menu.appendChild( separatorElement );
diff --git a/konqueror/konq_mainwindow.cc b/konqueror/konq_mainwindow.cc
index f6f4759e9..bc9bc4135 100644
--- a/konqueror/konq_mainwindow.cc
+++ b/konqueror/konq_mainwindow.cc
@@ -2726,6 +2726,14 @@ void KonqMainWindow::slotPopupThisWindow()
openURL( 0L, popupItems.getFirst()->url() );
}
+void KonqMainWindow::slotPopupNewTabAtFront()
+{
+ KConfig *config = KGlobal::config();
+ KConfigGroupSaver cs( config, TQString::fromLatin1("FMSettings") );
+ bool openAfterCurrentPage = config->readBoolEntry( "OpenAfterCurrentPage", false );
+ popupNewTab(true, openAfterCurrentPage);
+}
+
void KonqMainWindow::slotPopupNewTab()
{
bool openAfterCurrentPage = KonqSettings::openAfterCurrentPage();
@@ -4782,8 +4790,14 @@ void KonqMainWindow::slotPopupMenu( KXMLGUIClient *client, const TQPoint &_globa
else
tab_new_x = "tab_new_bg" ;
- actNewTab = new KAction( i18n( "Open in &New Tab" ), tab_new_x, 0, TQT_TQOBJECT(this), TQT_SLOT( slotPopupNewTab() ), konqyMenuClient->actionCollection(), "openintab" );
- actNewTab->setToolTip( i18n( "Open the document in a new tab" ) );
+ KAction *actNewTab = new KAction( i18n( "Open in &Background Tab" ), "tab_new_bg", 0, TQT_TQOBJECT(this), TQT_SLOT( slotPopupNewTab() ), actionCollection(), "openintab" );
+ actNewTab->setStatusText( i18n( "Open the document in a new background tab" ) );
+ KAction *actNewTabFront = new KAction( i18n( "Open in &New Tab" ), "tab_new", 0, TQT_TQOBJECT(this), TQT_SLOT( slotPopupNewTabAtFront() ), actionCollection(), "openintabfront" );
+ actNewTabFront->setStatusText( i18n( "Open the document in a new foreground tab" ) );
+ actNewTab = new KAction( i18n( "Open in &Background Tab" ), tab_new_x, 0, TQT_TQOBJECT(this), TQT_SLOT( slotPopupNewTab() ), konqyMenuClient->actionCollection(), "openintab" );
+ actNewTabFront = new KAction( i18n( "Open in &New Tab" ), tab_new_x, 0, TQT_TQOBJECT(this), TQT_SLOT( slotPopupNewTabAtFront() ), konqyMenuClient->actionCollection(), "openintabfront" );
+ actNewTab->setToolTip( i18n( "Open the document in a new background tab" ) );
+ actNewTabFront->setToolTip( i18n( "Open the document in a new foreground tab" ) );
doTabHandling = true;
}
diff --git a/konqueror/konq_mainwindow.h b/konqueror/konq_mainwindow.h
index f5068d98f..12e7d8df4 100644
--- a/konqueror/konq_mainwindow.h
+++ b/konqueror/konq_mainwindow.h
@@ -444,6 +444,7 @@ protected slots:
void slotPopupNewWindow();
void slotPopupThisWindow();
void slotPopupNewTab();
+ void slotPopupNewTabAtFront();
void slotPopupNewTabRight();
void slotPopupPasteTo();
void slotRemoveView();