summaryrefslogtreecommitdiffstats
path: root/redhat/tdebase/kdebase-3.5.13-konq_menu_tab_background.patch
blob: 483b259c1ec1549c09d0b736c1e9476096030375 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
diff -urN /dev/shm/kdebase/kcontrol/konqhtml/advancedTabDialog.cpp /dev/shm/kdebase.new/kcontrol/konqhtml/advancedTabDialog.cpp
--- kdebase/kcontrol/konqhtml/advancedTabDialog.cpp	2011-03-12 00:57:45.000000000 -0600
+++ kdebase.new/kcontrol/konqhtml/advancedTabDialog.cpp	2011-12-03 17:25:40.297586593 -0600
@@ -58,7 +58,6 @@
     layout->addSpacing( 20 );
     layout->addStretch();
 
-    connect(m_advancedWidget->m_pNewTabsInBackground, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
     connect(m_advancedWidget->m_pOpenAfterCurrentPage, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
     connect(m_advancedWidget->m_pTabConfirm, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
     connect(m_advancedWidget->m_pTabCloseActivatePrevious, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
@@ -76,7 +75,6 @@
 void advancedTabDialog::load()
 {
     m_pConfig->setGroup("FMSettings");
-    m_advancedWidget->m_pNewTabsInBackground->setChecked( ! (m_pConfig->readBoolEntry( "NewTabsInFront", false )) );
     m_advancedWidget->m_pOpenAfterCurrentPage->setChecked( m_pConfig->readBoolEntry( "OpenAfterCurrentPage", false ) );
     m_advancedWidget->m_pPermanentCloseButton->setChecked( m_pConfig->readBoolEntry( "PermanentCloseButton", false ) );
     m_advancedWidget->m_pKonquerorTabforExternalURL->setChecked( m_pConfig->readBoolEntry( "KonquerorTabforExternalURL", false ) );
@@ -92,7 +90,6 @@
 void advancedTabDialog::save()
 {
     m_pConfig->setGroup("FMSettings");
-    m_pConfig->writeEntry( "NewTabsInFront", !(m_advancedWidget->m_pNewTabsInBackground->isChecked()) );
     m_pConfig->writeEntry( "OpenAfterCurrentPage", m_advancedWidget->m_pOpenAfterCurrentPage->isChecked() );
     m_pConfig->writeEntry( "PermanentCloseButton", m_advancedWidget->m_pPermanentCloseButton->isChecked() );
     m_pConfig->writeEntry( "KonquerorTabforExternalURL", m_advancedWidget->m_pKonquerorTabforExternalURL->isChecked() );
diff -urN /dev/shm/kdebase/kcontrol/konqhtml/advancedTabOptions.ui /dev/shm/kdebase.new/kcontrol/konqhtml/advancedTabOptions.ui
--- kdebase/kcontrol/konqhtml/advancedTabOptions.ui	2011-03-12 00:57:45.000000000 -0600
+++ kdebase.new/kcontrol/konqhtml/advancedTabOptions.ui	2011-12-03 17:24:25.987334444 -0600
@@ -51,17 +51,6 @@
                 </property>
                 <widget class="TQCheckBox">
                     <property name="name">
-                        <cstring>m_pNewTabsInBackground</cstring>
-                    </property>
-                    <property name="text">
-                        <string>O&amp;pen new tabs in the background</string>
-                    </property>
-                    <property name="whatsThis" stdset="0">
-                        <string>This will open a new tab in the background, instead of in the foreground.</string>
-                    </property>
-                </widget>
-                <widget class="TQCheckBox">
-                    <property name="name">
                         <cstring>m_pOpenAfterCurrentPage</cstring>
                     </property>
                     <property name="text">
diff -urN /dev/shm/kdebase/konqueror/konq_guiclients.cc /dev/shm/kdebase.new/konqueror/konq_guiclients.cc
--- kdebase/konqueror/konq_guiclients.cc	2011-08-11 00:25:53.000000000 -0500
+++ kdebase.new/konqueror/konq_guiclients.cc	2011-12-03 17:24:25.987334444 -0600
@@ -104,8 +104,8 @@
         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 @@
         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 -urN /dev/shm/kdebase/konqueror/konq_mainwindow.cc /dev/shm/kdebase.new/konqueror/konq_mainwindow.cc
--- kdebase/konqueror/konq_mainwindow.cc	2011-08-20 02:14:06.000000000 -0500
+++ kdebase.new/konqueror/konq_mainwindow.cc	2011-12-03 17:24:25.994334609 -0600
@@ -2726,15 +2726,23 @@
     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();
     bool newTabsInFront = KonqSettings::newTabsInFront();
 
-    if (KApplication::keyboardMouseState() & TQt::ShiftButton)
+    if (KApplication::keyboardMouseState() & ShiftButton)
       newTabsInFront = !newTabsInFront;
 
-    popupNewTab(newTabsInFront, openAfterCurrentPage);
+    popupNewTab(false, openAfterCurrentPage);
 }
 
 void KonqMainWindow::slotPopupNewTabRight()
@@ -2754,17 +2762,13 @@
   KFileItemListIterator it ( popupItems );
   KonqOpenURLRequest req;
   req.newTab = true;
-  req.newTabInFront = false;
+  req.newTabInFront = infront;
   req.openAfterCurrentPage = openAfterCurrentPage;
   req.args = popupUrlArgs;
 
   for ( ; it.current(); ++it )
   {
-    if ( infront && it.atLast() )
-    {
-      req.newTabInFront = true;
-    }
-    openURL( 0L, (*it)->url(), TQString::null, req );
+    openURL( 0L, (*it)->url(), QString::null, req );
   }
 }
 
@@ -3926,7 +3930,7 @@
   reloadShortcut.append(KKey(CTRL + Key_R));
   m_paReload = new KAction( i18n( "&Reload" ), "reload", reloadShortcut, TQT_TQOBJECT(this), TQT_SLOT( slotReload() ), actionCollection(), "reload" );
   m_paReloadAllTabs = new KAction( i18n( "&Reload All Tabs" ), "reload_all_tabs", SHIFT+Key_F5, TQT_TQOBJECT(this), TQT_SLOT( slotReloadAllTabs() ), actionCollection(), "reload_all_tabs" );
-  
+
   m_paReloadStop = new KAction( i18n( "&Reload/Stop" ), "reload", 0, TQT_TQOBJECT(this), TQT_SLOT( slotReloadStop() ), actionCollection(), "reload_stop" );
 
   m_paUndo = KStdAction::undo( KonqUndoManager::self(), TQT_SLOT( undo() ), actionCollection(), "undo" );
@@ -4782,8 +4786,14 @@
       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 -urN /dev/shm/kdebase/konqueror/konq_mainwindow.h /dev/shm/kdebase.new/konqueror/konq_mainwindow.h
--- kdebase/konqueror/konq_mainwindow.h	2011-03-12 00:58:18.000000000 -0600
+++ kdebase.new/konqueror/konq_mainwindow.h	2011-12-03 17:24:25.995334564 -0600
@@ -444,6 +444,7 @@
   void slotPopupNewWindow();
   void slotPopupThisWindow();
   void slotPopupNewTab();
+  void slotPopupNewTabAtFront();
   void slotPopupNewTabRight();
   void slotPopupPasteTo();
   void slotRemoveView();