Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-apps/konsole/, kde-apps/konsole/files/
Date: Tue, 24 Aug 2021 13:39:20
Message-Id: 1629812238.6e8bd8fe46daf2e09b95c3abdeab0e2ad4ce6845.asturm@gentoo
1 commit: 6e8bd8fe46daf2e09b95c3abdeab0e2ad4ce6845
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 24 12:20:34 2021 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 24 13:37:18 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e8bd8fe
7
8 kde-apps/konsole: Don't close the whole window if there are splits
9
10 Closes: https://bugs.gentoo.org/808510
11 Package-Manager: Portage-3.0.22, Repoman-3.0.3
12 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
13
14 ...ole-21.04.3-dont-close-window-while-split.patch | 76 ++++++++++++++++++++++
15 ...21.04.3-r1.ebuild => konsole-21.04.3-r2.ebuild} | 5 +-
16 ...21.08.0-r3.ebuild => konsole-21.08.0-r4.ebuild} | 1 +
17 3 files changed, 81 insertions(+), 1 deletion(-)
18
19 diff --git a/kde-apps/konsole/files/konsole-21.04.3-dont-close-window-while-split.patch b/kde-apps/konsole/files/konsole-21.04.3-dont-close-window-while-split.patch
20 new file mode 100644
21 index 00000000000..20762b10957
22 --- /dev/null
23 +++ b/kde-apps/konsole/files/konsole-21.04.3-dont-close-window-while-split.patch
24 @@ -0,0 +1,76 @@
25 +From 2591a9489a4d3a43c7a7f00764e9f84822d4946c Mon Sep 17 00:00:00 2001
26 +From: Ahmad Samir <a.samirh78@×××××.com>
27 +Date: Sun, 15 Aug 2021 15:51:33 +0200
28 +Subject: [PATCH] When closing a session, don't close the whole window if there
29 + are splits
30 +
31 +When closing a session, we check if that is the last tab, and make the code
32 +close the whole window, but we also need to make sure it's the last view,
33 +i.e. no split views.
34 +
35 +CCBUG: 440976
36 +FIXED-IN: 21.08.1
37 +(cherry picked from commit 4a3cab03f5d853f4dd48531979fc3fb57dde5e2e)
38 +---
39 + src/ViewManager.cpp | 6 +++---
40 + src/widgets/ViewContainer.cpp | 9 +++++++++
41 + src/widgets/ViewContainer.h | 6 ++++++
42 + 3 files changed, 18 insertions(+), 3 deletions(-)
43 +
44 +diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp
45 +index 9c006e2bd..426040b78 100644
46 +--- a/src/ViewManager.cpp
47 ++++ b/src/ViewManager.cpp
48 +@@ -494,9 +494,9 @@ void ViewManager::sessionFinished()
49 + return;
50 + }
51 +
52 +- // The last session/tab? emit empty() so that close() is called in
53 +- // MainWindow, fixes #432077
54 +- if (_viewContainer->count() == 1) {
55 ++ // The last session/tab, and only one view (no splits), emit empty()
56 ++ // so that close() is called in MainWindow, fixes #432077
57 ++ if (_viewContainer->count() == 1 && _viewContainer->currentTabViewCount() == 1) {
58 + Q_EMIT empty();
59 + return;
60 + }
61 +diff --git a/src/widgets/ViewContainer.cpp b/src/widgets/ViewContainer.cpp
62 +index 2d7bfd13b..b25c00cdd 100644
63 +--- a/src/widgets/ViewContainer.cpp
64 ++++ b/src/widgets/ViewContainer.cpp
65 +@@ -145,6 +145,15 @@ ViewSplitter *TabbedViewContainer::viewSplitterAt(int index)
66 + return qobject_cast<ViewSplitter*>(widget(index));
67 + }
68 +
69 ++int TabbedViewContainer::currentTabViewCount()
70 ++{
71 ++ if (auto *splitter = activeViewSplitter()) {
72 ++ return splitter->findChildren<TerminalDisplay*>().count();
73 ++ }
74 ++
75 ++ return 1;
76 ++}
77 ++
78 + void TabbedViewContainer::moveTabToWindow(int index, QWidget *window)
79 + {
80 + auto splitter = viewSplitterAt(index);
81 +diff --git a/src/widgets/ViewContainer.h b/src/widgets/ViewContainer.h
82 +index 3cbacf2cf..8e0a0986a 100644
83 +--- a/src/widgets/ViewContainer.h
84 ++++ b/src/widgets/ViewContainer.h
85 +@@ -135,6 +135,12 @@ public:
86 + */
87 + ViewSplitter *viewSplitterAt(int index);
88 +
89 ++ /**
90 ++ * Returns the number of split views (i.e. TerminalDisplay widgets)
91 ++ * in this tab; if there are no split views, 1 is returned.
92 ++ */
93 ++ int currentTabViewCount();
94 ++
95 + void connectTerminalDisplay(TerminalDisplay *display);
96 + void disconnectTerminalDisplay(TerminalDisplay *display);
97 + void moveTabLeft();
98 +--
99 +GitLab
100 +
101
102 diff --git a/kde-apps/konsole/konsole-21.04.3-r1.ebuild b/kde-apps/konsole/konsole-21.04.3-r2.ebuild
103 similarity index 92%
104 rename from kde-apps/konsole/konsole-21.04.3-r1.ebuild
105 rename to kde-apps/konsole/konsole-21.04.3-r2.ebuild
106 index 42e9362243d..c95192f968c 100644
107 --- a/kde-apps/konsole/konsole-21.04.3-r1.ebuild
108 +++ b/kde-apps/konsole/konsole-21.04.3-r2.ebuild
109 @@ -51,7 +51,10 @@ DEPEND="
110 "
111 RDEPEND="${DEPEND}"
112
113 -PATCHES=( "${FILESDIR}/${P}-no-flash-on-session-close.patch" ) # bug 807933
114 +PATCHES=(
115 + "${FILESDIR}/${P}-no-flash-on-session-close.patch" # bug 807933
116 + "${FILESDIR}/${P}-dont-close-window-while-split.patch" # bug 808510
117 +)
118
119 src_prepare() {
120 ecm_src_prepare
121
122 diff --git a/kde-apps/konsole/konsole-21.08.0-r3.ebuild b/kde-apps/konsole/konsole-21.08.0-r4.ebuild
123 similarity index 96%
124 rename from kde-apps/konsole/konsole-21.08.0-r3.ebuild
125 rename to kde-apps/konsole/konsole-21.08.0-r4.ebuild
126 index fe8cab4b97f..d4600f096a8 100644
127 --- a/kde-apps/konsole/konsole-21.08.0-r3.ebuild
128 +++ b/kde-apps/konsole/konsole-21.08.0-r4.ebuild
129 @@ -52,6 +52,7 @@ RDEPEND="${DEPEND}"
130
131 PATCHES=(
132 "${FILESDIR}/${PN}-21.04.3-no-flash-on-session-close.patch" # bug 807933
133 + "${FILESDIR}/${PN}-21.04.3-dont-close-window-while-split.patch" # bug 808510
134 "${FILESDIR}/${P}-fix-crash-w-blur.patch" # bug 807905, fixed in 21.08.1
135 "${FILESDIR}/${P}-fix-KXmlGUI-toolbars-and-MainWindow-size.patch" # KDE-bugs 430036, 439339
136 "${FILESDIR}/${P}-fix-MainWindow-size-w-o-saved-size.patch" # KDE-bug 437791