summaryrefslogtreecommitdiff
path: root/source/kde/kdebase/konsole_right_click-185466.patch
blob: a3e19ab58a17c4786c186c4805a4a00df5a088f4 (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
Index: tmp/kdebase-4.5.5/apps/konsole/src/MainWindow.cpp
===================================================================
--- tmp.orig/kdebase-4.5.5/apps/konsole/src/MainWindow.cpp
+++ tmp/kdebase-4.5.5/apps/konsole/src/MainWindow.cpp
@@ -86,6 +86,8 @@ MainWindow::MainWindow()
     connect( _viewManager , SIGNAL(empty()) , this , SLOT(close()) );
     connect( _viewManager , SIGNAL(activeViewChanged(SessionController*)) , this ,
             SLOT(activeViewChanged(SessionController*)) );
+    connect( _viewManager , SIGNAL(unplugController(SessionController*)) , this ,
+            SLOT(disconnectController(SessionController*)) );
     connect( _viewManager , SIGNAL(viewPropertiesChanged(const QList<ViewProperties*>&)) ,
            bookmarkHandler() , SLOT(setViews(const QList<ViewProperties*>&)) );
 
Index: tmp/kdebase-4.5.5/apps/konsole/src/MainWindow.h
===================================================================
--- tmp.orig/kdebase-4.5.5/apps/konsole/src/MainWindow.h
+++ tmp/kdebase-4.5.5/apps/konsole/src/MainWindow.h
@@ -161,6 +161,7 @@ class MainWindow : public KXmlGuiWindow
         void showShortcutsDialog();
         void newFromProfile(Profile::Ptr profile);
         void activeViewChanged(SessionController* controller);
+        void disconnectController(SessionController* controller);
         void activeViewTitleChanged(ViewProperties*);
 
         void sessionListChanged(const QList<QAction*>& actions);
@@ -179,7 +180,6 @@ class MainWindow : public KXmlGuiWindow
         void setupActions();
         void setupWidgets();
         QString activeSessionDir() const;
-        void disconnectController(SessionController* controller);
 
         // sets the active shortcuts of actions in 'dest' to the shortcuts of actions
         // with the same name in 'source' (see KAction::ActiveShortcut)
Index: tmp/kdebase-4.5.5/apps/konsole/src/ViewManager.cpp
===================================================================
--- tmp.orig/kdebase-4.5.5/apps/konsole/src/ViewManager.cpp
+++ tmp/kdebase-4.5.5/apps/konsole/src/ViewManager.cpp
@@ -376,6 +376,10 @@ void ViewManager::sessionFinished()
         }
     }
 
+    // This is needed to remove this controller from factory() in
+    // order to prevent BUG: 185466 - disappearing menu popup
+    if (_pluggedController)
+        emit unplugController(_pluggedController);
 }
 
 void ViewManager::focusActiveView()
@@ -744,6 +748,9 @@ void ViewManager::viewCloseRequest(QWidg
         focusActiveView();
         updateDetachViewState();
     }
+    if (_pluggedController)
+        emit unplugController(_pluggedController);
+
 }
 
 TerminalDisplay* ViewManager::createTerminalDisplay(Session* session)
Index: tmp/kdebase-4.5.5/apps/konsole/src/ViewManager.h
===================================================================
--- tmp.orig/kdebase-4.5.5/apps/konsole/src/ViewManager.h
+++ tmp/kdebase-4.5.5/apps/konsole/src/ViewManager.h
@@ -175,6 +175,12 @@ signals:
     void activeViewChanged(SessionController* controller);
 
     /**
+     * Emitted when the current session needs to be unplugged from factory().
+     * @param controller The controller associated with the view
+     */
+    void unplugController(SessionController* controller);
+
+    /**
      * Emitted when the list of view properties ( as returned by viewProperties() ) changes.
      * This occurs when views are added to or removed from the active container, or 
      * if the active container is changed.
Index: tmp/kdebase-4.5.5/apps/konsole/src/ViewContainer.cpp
===================================================================
--- tmp.orig/kdebase-4.5.5/apps/konsole/src/ViewContainer.cpp
+++ tmp/kdebase-4.5.5/apps/konsole/src/ViewContainer.cpp
@@ -448,6 +448,7 @@ TabbedViewContainer::TabbedViewContainer
     _closeTabButton->setIcon(KIcon("tab-close"));
     _closeTabButton->adjustSize();
     _closeTabButton->setHidden(true);
+    _closeTabButton->setEnabled(false);
 
     connect( _tabBar , SIGNAL(currentChanged(int)) , this , SLOT(currentTabChanged(int)) );
     connect( _tabBar , SIGNAL(tabDoubleClicked(int)) , this , SLOT(tabDoubleClicked(int)) );
@@ -500,9 +501,11 @@ TabbedViewContainer::TabbedViewContainer
         i18nc("@action:inmenu", "&Rename Tab..."), this,
         SLOT(tabContextMenuRenameTab()));
 
+/* bug 185466
     _contextPopupMenu->addAction(KIcon("tab-close"),
         i18nc("@action:inmenu", "&Close Tab"), this,
         SLOT(tabContextMenuCloseTab()));
+*/
 
 }
 void TabbedViewContainer::setNewViewMenu(QMenu* menu)