Changeset View
Changeset View
Standalone View
Standalone View
src/SessionController.cpp
Show First 20 Lines • Show All 224 Lines • ▼ Show 20 Line(s) | 125 | { | |||
---|---|---|---|---|---|
225 | 225 | | |||
226 | _profileList = ProfileManager::instance()->getProfileList(); | 226 | _profileList = ProfileManager::instance()->getProfileList(); | ||
227 | connect(_profileList, &ProfileList::actionsChanged, this, &Konsole::SessionController::prepareSwitchProfileMenu); | 227 | connect(_profileList, &ProfileList::actionsChanged, this, &Konsole::SessionController::prepareSwitchProfileMenu); | ||
228 | prepareSwitchProfileMenu(); | 228 | prepareSwitchProfileMenu(); | ||
229 | } | 229 | } | ||
230 | 230 | | |||
231 | SessionController::~SessionController() | 231 | SessionController::~SessionController() | ||
232 | { | 232 | { | ||
233 | if (!_view.isNull()) { | | |||
234 | _view->setScreenWindow(nullptr); | | |||
235 | } | | |||
236 | | ||||
237 | _allControllers.remove(this); | 233 | _allControllers.remove(this); | ||
238 | 234 | | |||
239 | if (!_editProfileDialog.isNull()) { | 235 | if (!_editProfileDialog.isNull()) { | ||
240 | delete _editProfileDialog.data(); | 236 | delete _editProfileDialog.data(); | ||
241 | } | 237 | } | ||
242 | } | 238 | } | ||
243 | void SessionController::trackOutput(QKeyEvent* event) | 239 | void SessionController::trackOutput(QKeyEvent* event) | ||
244 | { | 240 | { | ||
▲ Show 20 Lines • Show All 289 Lines • ▼ Show 20 Line(s) | |||||
534 | } | 530 | } | ||
535 | 531 | | |||
536 | void SessionController::setupCommonActions() | 532 | void SessionController::setupCommonActions() | ||
537 | { | 533 | { | ||
538 | KActionCollection* collection = actionCollection(); | 534 | KActionCollection* collection = actionCollection(); | ||
539 | 535 | | |||
540 | // Close Session | 536 | // Close Session | ||
541 | QAction* action = collection->addAction(QStringLiteral("close-session"), this, SLOT(closeSession())); | 537 | QAction* action = collection->addAction(QStringLiteral("close-session"), this, SLOT(closeSession())); | ||
542 | if (isKonsolePart()) { | | |||
543 | action->setText(i18n("&Close Session")); | 538 | action->setText(i18n("&Close Session")); | ||
544 | } else { | | |||
545 | action->setText(i18n("&Close Tab")); | | |||
546 | } | | |||
547 | 539 | | |||
548 | action->setIcon(QIcon::fromTheme(QStringLiteral("tab-close"))); | 540 | action->setIcon(QIcon::fromTheme(QStringLiteral("tab-close"))); | ||
549 | collection->setDefaultShortcut(action, Konsole::ACCEL + Qt::SHIFT + Qt::Key_W); | 541 | collection->setDefaultShortcut(action, Konsole::ACCEL + Qt::SHIFT + Qt::Key_W); | ||
550 | 542 | | |||
551 | // Open Browser | 543 | // Open Browser | ||
552 | action = collection->addAction(QStringLiteral("open-browser"), this, SLOT(openBrowser())); | 544 | action = collection->addAction(QStringLiteral("open-browser"), this, SLOT(openBrowser())); | ||
553 | action->setText(i18n("Open File Manager")); | 545 | action->setText(i18n("Open File Manager")); | ||
554 | action->setIcon(QIcon::fromTheme(QStringLiteral("system-file-manager"))); | 546 | action->setIcon(QIcon::fromTheme(QStringLiteral("system-file-manager"))); | ||
▲ Show 20 Lines • Show All 1252 Lines • Show Last 20 Lines |