Changeset View
Changeset View
Standalone View
Standalone View
src/ViewContainer.cpp
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | |||||
42 | #include "IncrementalSearchBar.h" | 42 | #include "IncrementalSearchBar.h" | ||
43 | #include "ViewProperties.h" | 43 | #include "ViewProperties.h" | ||
44 | #include "ProfileList.h" | 44 | #include "ProfileList.h" | ||
45 | #include "ViewManager.h" | 45 | #include "ViewManager.h" | ||
46 | #include "KonsoleSettings.h" | 46 | #include "KonsoleSettings.h" | ||
47 | #include "SessionController.h" | 47 | #include "SessionController.h" | ||
48 | #include "DetachableTabBar.h" | 48 | #include "DetachableTabBar.h" | ||
49 | #include "TerminalDisplay.h" | 49 | #include "TerminalDisplay.h" | ||
50 | #include "ViewSplitter.h" | ||||
50 | 51 | | |||
51 | // TODO Perhaps move everything which is Konsole-specific into different files | 52 | // TODO Perhaps move everything which is Konsole-specific into different files | ||
52 | 53 | | |||
53 | using namespace Konsole; | 54 | using namespace Konsole; | ||
54 | 55 | | |||
55 | 56 | | |||
56 | TabbedViewContainer::TabbedViewContainer(ViewManager *connectedViewManager, QWidget *parent) : | 57 | TabbedViewContainer::TabbedViewContainer(ViewManager *connectedViewManager, QWidget *parent) : | ||
57 | QTabWidget(parent), | 58 | QTabWidget(parent), | ||
Show All 22 Lines | 65 | { | |||
80 | _closeTabButton->setAutoRaise(true); | 81 | _closeTabButton->setAutoRaise(true); | ||
81 | connect(_closeTabButton, &QToolButton::clicked, this, [this]{ | 82 | connect(_closeTabButton, &QToolButton::clicked, this, [this]{ | ||
82 | closeCurrentTab(); | 83 | closeCurrentTab(); | ||
83 | }); | 84 | }); | ||
84 | 85 | | |||
85 | connect(tabBar(), &QTabBar::tabBarDoubleClicked, this, | 86 | connect(tabBar(), &QTabBar::tabBarDoubleClicked, this, | ||
86 | &Konsole::TabbedViewContainer::tabDoubleClicked); | 87 | &Konsole::TabbedViewContainer::tabDoubleClicked); | ||
87 | connect(tabBar(), &QTabBar::customContextMenuRequested, this, | 88 | connect(tabBar(), &QTabBar::customContextMenuRequested, this, | ||
88 | &Konsole::TabbedViewContainer::openTabContextMenu); | 89 | &Konsole::TabbedViewContainer::openTabContextMenu); | ||
89 | connect(tabBarWidget, &DetachableTabBar::detachTab, this, [this](int idx) { | 90 | | ||
90 | emit detachTab(this, terminalAt(idx)); | 91 | //TODO: Fix Detach. | ||
91 | }); | 92 | // connect(tabBarWidget, &DetachableTabBar::detachTab, this, [this](int idx) { | ||
93 | // emit detachTab(this, terminalAt(idx)); | ||||
94 | //}); | ||||
95 | | ||||
anthonyfieroniUnsubmitted Done anthonyfieroni: ```
connect(tabBarWidget, &DetachableTabBar::detachTab, this, &TabbedViewContainer::detachTab)… | |||||
92 | connect(this, &TabbedViewContainer::currentChanged, this, &TabbedViewContainer::currentTabChanged); | 96 | connect(this, &TabbedViewContainer::currentChanged, this, &TabbedViewContainer::currentTabChanged); | ||
anthonyfieroni: Connecting signal to signal should work, same as above. | |||||
93 | 97 | | |||
94 | // The context menu of tab bar | 98 | // The context menu of tab bar | ||
95 | _contextPopupMenu = new QMenu(tabBar()); | 99 | _contextPopupMenu = new QMenu(tabBar()); | ||
96 | connect(_contextPopupMenu, &QMenu::aboutToHide, this, [this]() { | 100 | connect(_contextPopupMenu, &QMenu::aboutToHide, this, [this]() { | ||
97 | // Remove the read-only action when the popup closes | 101 | // Remove the read-only action when the popup closes | ||
98 | for (auto &action : _contextPopupMenu->actions()) { | 102 | for (auto &action : _contextPopupMenu->actions()) { | ||
99 | if (action->objectName() == QStringLiteral("view-readonly")) { | 103 | if (action->objectName() == QStringLiteral("view-readonly")) { | ||
100 | _contextPopupMenu->removeAction(action); | 104 | _contextPopupMenu->removeAction(action); | ||
101 | break; | 105 | break; | ||
102 | } | 106 | } | ||
103 | } | 107 | } | ||
104 | }); | 108 | }); | ||
105 | 109 | | |||
106 | #if defined(ENABLE_DETACHING) | 110 | #if defined(ENABLE_DETACHING) | ||
111 | /* TODO FIX DETACH | ||||
107 | auto detachAction = _contextPopupMenu->addAction( | 112 | auto detachAction = _contextPopupMenu->addAction( | ||
108 | QIcon::fromTheme(QStringLiteral("tab-detach")), | 113 | QIcon::fromTheme(QStringLiteral("tab-detach")), | ||
109 | i18nc("@action:inmenu", "&Detach Tab"), this, | 114 | i18nc("@action:inmenu", "&Detach Tab"), this, | ||
110 | [this] { emit detachTab(this, terminalAt(_contextMenuTabIndex)); } | 115 | [this] { emit detachTab(this, terminalAt(_contextMenuTabIndex)); } | ||
111 | ); | 116 | ); | ||
112 | detachAction->setObjectName(QStringLiteral("tab-detach")); | 117 | detachAction->setObjectName(QStringLiteral("tab-detach")); | ||
118 | */ | ||||
113 | #endif | 119 | #endif | ||
114 | 120 | | |||
115 | auto editAction = _contextPopupMenu->addAction( | 121 | auto editAction = _contextPopupMenu->addAction( | ||
116 | QIcon::fromTheme(QStringLiteral("edit-rename")), | 122 | QIcon::fromTheme(QStringLiteral("edit-rename")), | ||
117 | i18nc("@action:inmenu", "&Rename Tab..."), this, | 123 | i18nc("@action:inmenu", "&Rename Tab..."), this, | ||
118 | [this]{ renameTab(_contextMenuTabIndex); } | 124 | [this]{ renameTab(_contextMenuTabIndex); } | ||
119 | ); | 125 | ); | ||
120 | editAction->setObjectName(QStringLiteral("edit-rename")); | 126 | editAction->setObjectName(QStringLiteral("edit-rename")); | ||
Show All 19 Lines | |||||
140 | TabbedViewContainer::~TabbedViewContainer() | 146 | TabbedViewContainer::~TabbedViewContainer() | ||
141 | { | 147 | { | ||
142 | for(int i = 0, end = count(); i < end; i++) { | 148 | for(int i = 0, end = count(); i < end; i++) { | ||
143 | auto view = widget(i); | 149 | auto view = widget(i); | ||
144 | disconnect(view, &QWidget::destroyed, this, &Konsole::TabbedViewContainer::viewDestroyed); | 150 | disconnect(view, &QWidget::destroyed, this, &Konsole::TabbedViewContainer::viewDestroyed); | ||
145 | } | 151 | } | ||
146 | } | 152 | } | ||
147 | 153 | | |||
148 | TerminalDisplay *TabbedViewContainer::terminalAt(int index) | 154 | ViewSplitter *TabbedViewContainer::activeViewSplitter() | ||
149 | { | 155 | { | ||
150 | return qobject_cast<TerminalDisplay*>(widget(index)); | 156 | return viewSplitterAt(currentIndex()); | ||
157 | } | ||||
158 | | ||||
159 | ViewSplitter *TabbedViewContainer::viewSplitterAt(int index) | ||||
160 | { | ||||
161 | return qobject_cast<ViewSplitter*>(widget(index)); | ||||
151 | } | 162 | } | ||
152 | 163 | | |||
153 | void TabbedViewContainer::moveTabToWindow(int index, QWidget *window) | 164 | void TabbedViewContainer::moveTabToWindow(int index, QWidget *window) | ||
154 | { | 165 | { | ||
166 | // TODO: Fix Detaching. | ||||
167 | /* | ||||
155 | const int id = terminalAt(index)->sessionController()->identifier(); | 168 | const int id = terminalAt(index)->sessionController()->identifier(); | ||
156 | // This one line here will be removed as soon as I finish my new split handling. | 169 | // This one line here will be removed as soon as I finish my new split handling. | ||
157 | // it's hacky but it works. | 170 | // it's hacky but it works. | ||
158 | const auto widgets = window->findChildren<TabbedViewContainer*>(); | 171 | const auto widgets = window->findChildren<TabbedViewContainer*>(); | ||
159 | const auto currentPos = QCursor::pos(); | 172 | const auto currentPos = QCursor::pos(); | ||
160 | for(const auto dropWidget : widgets) { | 173 | for(const auto dropWidget : widgets) { | ||
161 | if (dropWidget->rect().contains(dropWidget->mapFromGlobal(currentPos))) { | 174 | if (dropWidget->rect().contains(dropWidget->mapFromGlobal(currentPos))) { | ||
162 | emit dropWidget->moveViewRequest(-1, id); | 175 | emit dropWidget->moveViewRequest(-1, id); | ||
163 | removeView(terminalAt(index)); | 176 | removeView(terminalAt(index)); | ||
164 | } | 177 | } | ||
165 | } | 178 | } | ||
179 | */ | ||||
166 | } | 180 | } | ||
167 | 181 | | |||
168 | void TabbedViewContainer::konsoleConfigChanged() | 182 | void TabbedViewContainer::konsoleConfigChanged() | ||
169 | { | 183 | { | ||
170 | // don't show tabs if we are in KParts mode. | 184 | // don't show tabs if we are in KParts mode. | ||
171 | // This is a hack, and this needs to be rewritten. | 185 | // This is a hack, and this needs to be rewritten. | ||
172 | // The container should not be part of the KParts, perhaps just the | 186 | // The container should not be part of the KParts, perhaps just the | ||
173 | // TerminalDisplay should. | 187 | // TerminalDisplay should. | ||
▲ Show 20 Lines • Show All 53 Lines • ▼ Show 20 Line(s) | 229 | { | |||
227 | setCss(in.readAll()); | 241 | setCss(in.readAll()); | ||
228 | } | 242 | } | ||
229 | 243 | | |||
230 | void TabbedViewContainer::moveActiveView(MoveDirection direction) | 244 | void TabbedViewContainer::moveActiveView(MoveDirection direction) | ||
231 | { | 245 | { | ||
232 | const int currentIndex = indexOf(currentWidget()); | 246 | const int currentIndex = indexOf(currentWidget()); | ||
233 | int newIndex = direction == MoveViewLeft ? qMax(currentIndex - 1, 0) : qMin(currentIndex + 1, count() - 1); | 247 | int newIndex = direction == MoveViewLeft ? qMax(currentIndex - 1, 0) : qMin(currentIndex + 1, count() - 1); | ||
234 | 248 | | |||
235 | auto swappedWidget = terminalAt(newIndex); | 249 | auto swappedWidget = viewSplitterAt(newIndex); | ||
236 | auto currentWidget = terminalAt(currentIndex); | 250 | auto swappedTitle = tabBar()->tabText(newIndex); | ||
237 | auto swappedContext = swappedWidget->sessionController(); | 251 | auto swappedIcon = tabBar()->tabIcon(newIndex); | ||
238 | auto currentContext = currentWidget->sessionController(); | 252 | | ||
253 | auto currentWidget = viewSplitterAt(currentIndex); | ||||
254 | auto currentTitle = tabBar()->tabText(currentIndex); | ||||
255 | auto currentIcon = tabBar()->tabIcon(currentIndex); | ||||
239 | 256 | | |||
240 | if (newIndex < currentIndex) { | 257 | if (newIndex < currentIndex) { | ||
241 | insertTab(newIndex, currentWidget, currentContext->icon(), currentContext->title()); | 258 | insertTab(newIndex, currentWidget, currentIcon, currentTitle); | ||
242 | insertTab(currentIndex, swappedWidget, swappedContext->icon(), swappedContext->title()); | 259 | insertTab(currentIndex, swappedWidget, swappedIcon, swappedTitle); | ||
243 | } else { | 260 | } else { | ||
244 | insertTab(currentIndex, swappedWidget, swappedContext->icon(), swappedContext->title()); | 261 | insertTab(currentIndex, swappedWidget, swappedIcon, swappedTitle); | ||
245 | insertTab(newIndex, currentWidget, currentContext->icon(), currentContext->title()); | 262 | insertTab(newIndex, currentWidget, currentIcon, currentTitle); | ||
246 | } | 263 | } | ||
247 | setCurrentIndex(newIndex); | 264 | setCurrentIndex(newIndex); | ||
248 | } | 265 | } | ||
249 | 266 | | |||
250 | void TabbedViewContainer::addView(TerminalDisplay *view, int index) | 267 | void TabbedViewContainer::addView(TerminalDisplay *view, int index) | ||
251 | { | 268 | { | ||
269 | auto viewSplitter = new ViewSplitter(); | ||||
270 | viewSplitter->addTerminalDisplay(view, Qt::Horizontal); | ||||
252 | auto item = view->sessionController(); | 271 | auto item = view->sessionController(); | ||
253 | if (index == -1) { | 272 | if (index == -1) { | ||
254 | addTab(view, item->icon(), item->title()); | 273 | addTab(viewSplitter, item->icon(), item->title()); | ||
255 | } else { | 274 | } else { | ||
256 | insertTab(index, view, item->icon(), item->title()); | 275 | insertTab(index, viewSplitter, item->icon(), item->title()); | ||
257 | } | 276 | } | ||
258 | 277 | | |||
259 | _tabHistory.append(view); | 278 | _tabHistory.append(view); | ||
260 | connect(item, &Konsole::ViewProperties::titleChanged, this, | 279 | connect(item, &Konsole::ViewProperties::titleChanged, this, | ||
261 | &Konsole::TabbedViewContainer::updateTitle); | 280 | &Konsole::TabbedViewContainer::updateTitle); | ||
262 | connect(item, &Konsole::ViewProperties::iconChanged, this, | 281 | connect(item, &Konsole::ViewProperties::iconChanged, this, | ||
263 | &Konsole::TabbedViewContainer::updateIcon); | 282 | &Konsole::TabbedViewContainer::updateIcon); | ||
264 | connect(item, &Konsole::ViewProperties::activity, this, | 283 | connect(item, &Konsole::ViewProperties::activity, this, | ||
265 | &Konsole::TabbedViewContainer::updateActivity); | 284 | &Konsole::TabbedViewContainer::updateActivity); | ||
266 | connect(view, &QWidget::destroyed, this, | 285 | | ||
267 | &Konsole::TabbedViewContainer::viewDestroyed); | 286 | connect(viewSplitter, &ViewSplitter::destroyed, this, &TabbedViewContainer::viewDestroyed); | ||
268 | emit viewAdded(view); | 287 | emit viewAdded(view); | ||
269 | } | 288 | } | ||
270 | 289 | | |||
271 | void TabbedViewContainer::viewDestroyed(QObject *view) | 290 | void TabbedViewContainer::viewDestroyed(QObject *view) | ||
272 | { | 291 | { | ||
273 | auto widget = static_cast<TerminalDisplay*>(view); | 292 | auto widget = static_cast<ViewSplitter*>(view); | ||
274 | const auto idx = indexOf(widget); | 293 | const auto idx = indexOf(widget); | ||
275 | 294 | | |||
276 | removeTab(idx); | 295 | removeTab(idx); | ||
277 | forgetView(widget); | 296 | forgetView(widget); | ||
278 | } | 297 | } | ||
279 | 298 | | |||
280 | void TabbedViewContainer::forgetView(TerminalDisplay *view) | 299 | void TabbedViewContainer::forgetView(ViewSplitter *view) | ||
281 | { | 300 | { | ||
282 | updateTabHistory(view, true); | 301 | //TODO: Fix updateTabHistory | ||
283 | emit viewRemoved(view); | 302 | // updateTabHistory(view, true); | ||
303 | // emit viewRemoved(view); | ||||
284 | if (count() == 0) { | 304 | if (count() == 0) { | ||
285 | emit empty(this); | 305 | emit empty(this); | ||
286 | } | 306 | } | ||
287 | } | 307 | } | ||
288 | 308 | | |||
289 | void TabbedViewContainer::removeView(TerminalDisplay *view) | 309 | void TabbedViewContainer::removeView(TerminalDisplay *view) | ||
290 | { | 310 | { | ||
291 | const int idx = indexOf(view); | 311 | const int idx = indexOf(view); | ||
292 | disconnect(view, &QWidget::destroyed, this, &Konsole::TabbedViewContainer::viewDestroyed); | 312 | disconnect(view, &QWidget::destroyed, this, &Konsole::TabbedViewContainer::viewDestroyed); | ||
293 | removeTab(idx); | 313 | removeTab(idx); | ||
294 | forgetView(view); | 314 | // forgetView(view); | ||
295 | } | 315 | } | ||
296 | 316 | | |||
297 | void TabbedViewContainer::activateNextView() | 317 | void TabbedViewContainer::activateNextView() | ||
298 | { | 318 | { | ||
299 | QWidget *active = currentWidget(); | 319 | QWidget *active = currentWidget(); | ||
300 | int index = indexOf(active); | 320 | int index = indexOf(active); | ||
301 | setCurrentIndex(index == count() - 1 ? 0 : index + 1); | 321 | setCurrentIndex(index == count() - 1 ? 0 : index + 1); | ||
302 | } | 322 | } | ||
▲ Show 20 Lines • Show All 79 Lines • ▼ Show 20 Line(s) | 401 | if (index >= 0) { | |||
382 | renameTab(index); | 402 | renameTab(index); | ||
383 | } else { | 403 | } else { | ||
384 | emit newViewRequest(this); | 404 | emit newViewRequest(this); | ||
385 | } | 405 | } | ||
386 | } | 406 | } | ||
387 | 407 | | |||
388 | void TabbedViewContainer::renameTab(int index) | 408 | void TabbedViewContainer::renameTab(int index) | ||
389 | { | 409 | { | ||
410 | /* TODO: Fix renaming. | ||||
411 | The problem with the renaming right now is that many Terminals can be at a tab. | ||||
412 | */ | ||||
413 | | ||||
390 | if (index != -1) { | 414 | if (index != -1) { | ||
391 | terminalAt(index)->sessionController()->rename(); | 415 | // terminalAt(index)->sessionController()->rename(); | ||
392 | } | 416 | } | ||
393 | } | 417 | } | ||
394 | 418 | | |||
395 | void TabbedViewContainer::openTabContextMenu(const QPoint &point) | 419 | void TabbedViewContainer::openTabContextMenu(const QPoint &point) | ||
396 | { | 420 | { | ||
397 | if (point.isNull()) { | 421 | if (point.isNull()) { | ||
398 | return; | 422 | return; | ||
399 | } | 423 | } | ||
400 | 424 | | |||
401 | _contextMenuTabIndex = tabBar()->tabAt(point); | 425 | _contextMenuTabIndex = tabBar()->tabAt(point); | ||
402 | if (_contextMenuTabIndex < 0) { | 426 | if (_contextMenuTabIndex < 0) { | ||
403 | return; | 427 | return; | ||
404 | } | 428 | } | ||
405 | 429 | | |||
406 | //TODO: add a countChanged signal so we can remove this for. | 430 | //TODO: add a countChanged signal so we can remove this for. | ||
407 | // Detaching in mac causes crashes. | 431 | // Detaching in mac causes crashes. | ||
408 | #if defined(ENABLE_DETACHING) | 432 | #if defined(ENABLE_DETACHING) | ||
409 | for(auto action : _contextPopupMenu->actions()) { | 433 | for(auto action : _contextPopupMenu->actions()) { | ||
410 | if (action->objectName() == QStringLiteral("tab-detach")) { | 434 | if (action->objectName() == QStringLiteral("tab-detach")) { | ||
411 | action->setEnabled(count() > 1); | 435 | action->setEnabled(count() > 1); | ||
412 | } | 436 | } | ||
413 | } | 437 | } | ||
414 | #endif | 438 | #endif | ||
415 | 439 | | |||
440 | /* This needs to nove away fro the tab or to lock every thing inside of it. | ||||
441 | * for now, disable. | ||||
442 | * */ | ||||
443 | // | ||||
So the tab right click menu no longer has 'Read Only' - do you plan on fixing this before this is committed? hindenburg: So the tab right click menu no longer has 'Read Only' - do you plan on fixing this before this… | |||||
Yes and no: the read only should apply to a TerminalDisplay, if it's in the Tab does it make sense to apply to all of the TerminalDisplays or just to the currently focused one? I'll add it to the context menu for the TerminalDisplay. tcanabrava: Yes and no: the read only should apply to a TerminalDisplay, if it's in the Tab does it make… | |||||
416 | // Add the read-only action | 444 | // Add the read-only action | ||
417 | auto controller = terminalAt(_contextMenuTabIndex)->sessionController(); | 445 | #if 0 | ||
418 | auto sessionController = qobject_cast<SessionController*>(controller); | 446 | auto sessionController = terminalAt(_contextMenuTabIndex)->sessionController(); | ||
419 | 447 | | |||
420 | if (sessionController != nullptr) { | 448 | if (sessionController != nullptr) { | ||
421 | auto collection = sessionController->actionCollection(); | 449 | auto collection = sessionController->actionCollection(); | ||
422 | auto readonlyAction = collection->action(QStringLiteral("view-readonly")); | 450 | auto readonlyAction = collection->action(QStringLiteral("view-readonly")); | ||
423 | if (readonlyAction != nullptr) { | 451 | if (readonlyAction != nullptr) { | ||
424 | const auto readonlyActions = _contextPopupMenu->actions(); | 452 | const auto readonlyActions = _contextPopupMenu->actions(); | ||
425 | _contextPopupMenu->insertAction(readonlyActions.last(), readonlyAction); | 453 | _contextPopupMenu->insertAction(readonlyActions.last(), readonlyAction); | ||
426 | } | 454 | } | ||
427 | 455 | | |||
428 | // Disable tab rename | 456 | // Disable tab rename | ||
429 | for (auto &action : _contextPopupMenu->actions()) { | 457 | for (auto &action : _contextPopupMenu->actions()) { | ||
430 | if (action->objectName() == QStringLiteral("edit-rename")) { | 458 | if (action->objectName() == QStringLiteral("edit-rename")) { | ||
431 | action->setEnabled(!sessionController->isReadOnly()); | 459 | action->setEnabled(!sessionController->isReadOnly()); | ||
432 | break; | 460 | break; | ||
433 | } | 461 | } | ||
434 | } | 462 | } | ||
435 | } | 463 | } | ||
436 | 464 | #endif | |||
437 | _contextPopupMenu->exec(tabBar()->mapToGlobal(point)); | 465 | _contextPopupMenu->exec(tabBar()->mapToGlobal(point)); | ||
438 | } | 466 | } | ||
439 | 467 | | |||
440 | void TabbedViewContainer::currentTabChanged(int index) | 468 | void TabbedViewContainer::currentTabChanged(int index) | ||
441 | { | 469 | { | ||
442 | if (index != -1) { | 470 | if (index != -1) { | ||
443 | auto *view = terminalAt(index); | 471 | auto view = widget(index)->findChild<TerminalDisplay*>(); | ||
444 | view->setFocus(); | 472 | view->setFocus(); | ||
445 | updateTabHistory(view); | 473 | updateTabHistory(view); | ||
446 | emit activeViewChanged(view); | 474 | emit activeViewChanged(view); | ||
447 | setTabActivity(index, false); | 475 | setTabActivity(index, false); | ||
448 | } else { | 476 | } else { | ||
449 | deleteLater(); | 477 | deleteLater(); | ||
450 | } | 478 | } | ||
451 | } | 479 | } | ||
▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | |||||
501 | void TabbedViewContainer::updateIcon(ViewProperties *item) | 529 | void TabbedViewContainer::updateIcon(ViewProperties *item) | ||
502 | { | 530 | { | ||
503 | auto controller = qobject_cast<SessionController*>(item); | 531 | auto controller = qobject_cast<SessionController*>(item); | ||
504 | const int index = indexOf(controller->view()); | 532 | const int index = indexOf(controller->view()); | ||
505 | setTabIcon(index, item->icon()); | 533 | setTabIcon(index, item->icon()); | ||
506 | } | 534 | } | ||
507 | 535 | | |||
508 | void TabbedViewContainer::closeTerminalTab(int idx) { | 536 | void TabbedViewContainer::closeTerminalTab(int idx) { | ||
509 | terminalAt(idx)->sessionController()->closeSession(); | 537 | //TODO: This for should probably go to the ViewSplitter | ||
538 | for (auto terminal : viewSplitterAt(idx)->findChildren<TerminalDisplay*>()) { | ||||
539 | terminal->sessionController()->closeSession(); | ||||
540 | } | ||||
510 | } | 541 | } | ||
511 | 542 | | |||
512 | ViewManager *TabbedViewContainer::connectedViewManager() | 543 | ViewManager *TabbedViewContainer::connectedViewManager() | ||
513 | { | 544 | { | ||
514 | return _connectedViewManager; | 545 | return _connectedViewManager; | ||
515 | } | 546 | } | ||
516 | 547 | | |||
517 | void TabbedViewContainer::setNavigationVisibility(ViewManager::NavigationVisibility navigationVisibility) { | 548 | void TabbedViewContainer::setNavigationVisibility(ViewManager::NavigationVisibility navigationVisibility) { | ||
Show All 11 Lines |