rpms/kdebase/F-9 kdebase-4.1.2-konsole-kde#156636.patch, NONE, 1.1 kdebase.spec, 1.336, 1.337

Kevin Kofler kkofler at fedoraproject.org
Thu Oct 16 21:18:03 UTC 2008


Author: kkofler

Update of /cvs/pkgs/rpms/kdebase/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19536/F-9

Modified Files:
	kdebase.spec 
Added Files:
	kdebase-4.1.2-konsole-kde#156636.patch 
Log Message:
* Thu Oct 16 2008 Kevin Kofler <Kevin at tigcc.ticalc.org> 4.1.2-5
- backport kbd actions for switching to Nth tab in Konsole from 4.2 (kde#156636)

kdebase-4.1.2-konsole-kde#156636.patch:

--- NEW FILE kdebase-4.1.2-konsole-kde#156636.patch ---
Index: apps/konsole/src/ViewManager.h
===================================================================
--- apps/konsole/src/ViewManager.h	(revision 837724)
+++ apps/konsole/src/ViewManager.h	(revision 837725)
@@ -239,6 +239,9 @@
     void moveActiveViewLeft();
     // moves active view to the right
     void moveActiveViewRight();
+    // switches to the view at visual position 'index' 
+    // in the current container
+    void switchToView(int index);
 
 	// called when a SessionController gains focus
 	void controllerChanged(SessionController* controller);
Index: apps/konsole/src/ViewManager.cpp
===================================================================
--- apps/konsole/src/ViewManager.cpp	(revision 837724)
+++ apps/konsole/src/ViewManager.cpp	(revision 837725)
@@ -201,6 +201,19 @@
         collection->addAction("next-container",nextContainerAction);
         collection->addAction("move-view-left",moveViewLeftAction);
         collection->addAction("move-view-right",moveViewRightAction);
+
+        // Switch to tab N shortcuts
+        const int SWITCH_TO_TAB_COUNT = 10;
+        QSignalMapper* switchToTabMapper = new QSignalMapper(this);
+        connect(switchToTabMapper,SIGNAL(mapped(int)),this,SLOT(switchToView(int)));
+        for (int i=0;i < SWITCH_TO_TAB_COUNT;i++)
+        {
+            KAction* switchToTabAction = new KAction(i18n("Switch to Tab %1",i+1),this);
+            switchToTabMapper->setMapping(switchToTabAction,i);
+            connect(switchToTabAction,SIGNAL(triggered()),switchToTabMapper,
+                    SLOT(map()));
+            collection->addAction(QString("switch-to-tab-%1").arg(i),switchToTabAction);
+        }
     }
 
     QListIterator<QAction*> iter(multiViewOnlyActions);
@@ -235,7 +248,16 @@
     connect( moveViewRightAction , SIGNAL(triggered()) , this , SLOT(moveActiveViewRight()) );
     _viewSplitter->addAction(moveViewRightAction);
 }
-
+void ViewManager::switchToView(int index)
+{
+    Q_ASSERT(index >= 0);
+    ViewContainer* container = _viewSplitter->activeContainer();
+    Q_ASSERT( container );
+    QList<QWidget*> containerViews = container->views();
+    if (index >= containerViews.count())
+        return;
+    container->setActiveView(containerViews.at(index));
+}
 void ViewManager::updateDetachViewState()
 {
 	if (!_actionCollection)


Index: kdebase.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kdebase/F-9/kdebase.spec,v
retrieving revision 1.336
retrieving revision 1.337
diff -u -r1.336 -r1.337
--- kdebase.spec	6 Oct 2008 18:56:29 -0000	1.336
+++ kdebase.spec	16 Oct 2008 21:17:33 -0000	1.337
@@ -1,7 +1,7 @@
 
 Summary: K Desktop Environment 4 - Core Files
 Version: 4.1.2
-Release: 4%{?dist}
+Release: 5%{?dist}
 
 %if 0%{?fedora} > 8
 Name: kdebase
@@ -31,6 +31,9 @@
 Patch3:   kdebase-4.1.2-konsole-session-1.patch
 
 ## upstream patches
+# http://bugs.kde.org/show_bug.cgi?id=156636 (from 4.2)
+# Add keyboard actions for switching to the 1st-10th tab in Konsole
+Patch100: kdebase-4.1.2-konsole-kde#156636.patch
 
 BuildRequires: kde-filesystem >= 4
 %{?_kde4_macros_api:Requires: kde4-macros(api) = %{_kde4_macros_api} }
@@ -129,6 +132,7 @@
 %patch1 -p0 -b .nsplugins-paths
 %patch2 -p1 -b .konsole-session
 %patch3 -p1 -b .konsole-session-1
+%patch100 -p0 -b .kde#156636
 
 # fix incorrect assumption that we're building in a combined kdebase tree
 sed -i -e 's/EXISTS "${kdebase_SOURCE_DIR}"/0/g' apps/CMakeLists.txt
@@ -309,6 +313,9 @@
 
 
 %changelog
+* Thu Oct 16 2008 Kevin Kofler <Kevin at tigcc.ticalc.org> 4.1.2-5
+- backport kbd actions for switching to Nth tab in Konsole from 4.2 (kde#156636)
+
 * Mon Oct 06 2008 Kevin Kofler <Kevin at tigcc.ticalc.org> 4.1.2-4
 - updated konsole session management patch from Stefan Becker
 




More information about the fedora-extras-commits mailing list