From 45d27ec764521d718eea776c4e20b0a35632d252 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Tue, 4 May 2010 13:31:46 +0000 Subject: [PATCH] Second chunk of menubar changes, see http://reviewboard.kde.org/r/3875/ for details. svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1122683 --- desktop/konsoleui.rc | 12 +-- desktop/partui.rc | 4 +- desktop/sessionui.rc | 26 +++--- src/MainWindow.cpp | 77 ++++++++-------- src/MainWindow.h | 1 - src/ManageProfilesDialog.cpp | 2 + src/SessionController.cpp | 166 +++++++++++++++-------------------- src/SessionController.h | 3 - src/SessionManager.cpp | 2 +- src/TerminalDisplay.cpp | 2 +- src/ViewManager.cpp | 20 ++--- 11 files changed, 141 insertions(+), 174 deletions(-) diff --git a/desktop/konsoleui.rc b/desktop/konsoleui.rc index 02b910cf1..1332ec555 100644 --- a/desktop/konsoleui.rc +++ b/desktop/konsoleui.rc @@ -16,12 +16,12 @@ View Split View - - - - - - + + + + + + diff --git a/desktop/partui.rc b/desktop/partui.rc index 802364288..158a1c558 100644 --- a/desktop/partui.rc +++ b/desktop/partui.rc @@ -10,15 +10,15 @@ - - + + diff --git a/desktop/sessionui.rc b/desktop/sessionui.rc index 74e961993..5d7601464 100644 --- a/desktop/sessionui.rc +++ b/desktop/sessionui.rc @@ -1,6 +1,6 @@ - + @@ -28,34 +28,28 @@ - - - + + + - - - - - - - - - + + - - + + - + + diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 3ab693605..b91f82712 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -230,31 +230,27 @@ void MainWindow::setupActions() KActionCollection* collection = actionCollection(); // File Menu - _newTabMenuAction = new KActionMenu(KIcon("tab-new"), i18n("New &Tab"), collection); + _newTabMenuAction = new KActionMenu(KIcon("tab-new"), i18n("&New Tab"), collection); + _newTabMenuAction->setShortcut( QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_T) ); + connect(_newTabMenuAction, SIGNAL(triggered()), this, SLOT(newTab())); collection->addAction("new-tab", _newTabMenuAction); - _defaultProfileAction = collection->addAction("default-profile"); - _defaultProfileAction->setIcon(KIcon("utilities-terminal")); - _defaultProfileAction->setText(i18n("&Default Profile")); - _defaultProfileAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_N)); - connect(_defaultProfileAction, SIGNAL(triggered()), this, SLOT(newTab())); + KAction* action = collection->addAction("new-window"); + action->setIcon( KIcon("window-new") ); + action->setText( i18n("New &Window") ); + action->setShortcut( QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_N) ); + connect( action , SIGNAL(triggered()) , this , SLOT(newWindow()) ); - KAction* newWindowAction = collection->addAction("new-window"); - newWindowAction->setIcon( KIcon("window-new") ); - newWindowAction->setText( i18n("New &Window") ); - newWindowAction->setShortcut( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_M) ); - connect( newWindowAction , SIGNAL(triggered()) , this , SLOT(newWindow()) ); + action = collection->addAction("remote-connection"); + action->setText( i18n("Remote Connection...") ); + action->setIcon( KIcon("network-connect") ); + action->setShortcut( QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_R) ); + connect( action , SIGNAL(triggered()) , this , SLOT(showRemoteConnectionDialog()) ); - KAction* remoteConnectionAction = collection->addAction("remote-connection"); - remoteConnectionAction->setText( i18n("Remote Connection...") ); - remoteConnectionAction->setIcon( KIcon("network-connect") ); - remoteConnectionAction->setShortcut( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_R) ); - connect( remoteConnectionAction , SIGNAL(triggered()) , this , SLOT(showRemoteConnectionDialog()) ); - - KAction* quitAction = KStandardAction::quit( this , SLOT(close()) , collection ); + action = KStandardAction::quit( this , SLOT(close()) , collection ); // the default shortcut for quit is typically Ctrl+[Some Letter, usually Q] but that is reserved for // use by terminal applications - quitAction->setShortcut(Qt::CTRL+Qt::SHIFT+Qt::Key_Q); + action->setShortcut( QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_Q) ); // Bookmark Menu KActionMenu* bookmarkMenu = new KActionMenu(i18n("&Bookmarks") , collection ); @@ -263,36 +259,31 @@ void MainWindow::setupActions() connect( _bookmarkHandler , SIGNAL(openUrls(QList)) , this , SLOT(openUrls(QList)) ); - //TODO - The 'Add Bookmark' menu action currently has a Ctrl+B shortcut by - // default which cannot be overridden + //TODO: The 'Add Bookmark' menu action currently has a Ctrl+B shortcut by + // default which cannot be overridden + //NOTE: This is currently handled by correctShortcuts() // View Menu - _toggleMenuBarAction = new KToggleAction(this); - _toggleMenuBarAction->setText( i18n("Show Menu Bar") ); - _toggleMenuBarAction->setIcon( KIcon("show-menu") ); + _toggleMenuBarAction = KStandardAction::showMenubar(menuBar(), SLOT(setVisible(bool)), collection); + _toggleMenuBarAction->setShortcut( QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_M) ); _toggleMenuBarAction->setChecked( !menuBar()->isHidden() ); - connect( _toggleMenuBarAction , SIGNAL(toggled(bool)) , menuBar() , SLOT(setVisible(bool)) ); - collection->addAction("show-menubar",_toggleMenuBarAction); // Hide the Show/Hide menubar item if the menu bar is a MacOS-style menu bar if ( menuBar()->isTopLevelMenu() ) _toggleMenuBarAction->setVisible(false); // Full Screen - KToggleFullScreenAction* fullScreenAction = new KToggleFullScreenAction(this); - fullScreenAction->setWindow(this); - fullScreenAction->setShortcut( Qt::CTRL + Qt::SHIFT + Qt::Key_F11 ); - collection->addAction("view-full-screen",fullScreenAction); - connect( fullScreenAction , SIGNAL(toggled(bool)) , this , SLOT(viewFullScreen(bool)) ); + action = KStandardAction::fullScreen(this, SLOT(viewFullScreen(bool)), this, collection); + action->setShortcut( QKeySequence() ); // Settings Menu KStandardAction::configureNotifications( this , SLOT(configureNotifications()) , collection ); KStandardAction::keyBindings( this , SLOT(showShortcutsDialog()) , collection ); - KAction* manageProfilesAction = collection->addAction("configure-profiles"); - manageProfilesAction->setText( i18n("Configure Profiles...") ); - manageProfilesAction->setIcon( KIcon("configure") ); - connect( manageProfilesAction , SIGNAL(triggered()) , this , SLOT(showManageProfilesDialog()) ); + action = collection->addAction("configure-profiles"); + action->setText( i18n("Configure Profiles...") ); + action->setIcon( KIcon("configure") ); + connect( action, SIGNAL(triggered()) , this , SLOT(showManageProfilesDialog()) ); } @@ -323,17 +314,25 @@ void MainWindow::setSessionList(ProfileList* list) void MainWindow::sessionListChanged(const QList& actions) { unplugActionList("favorite-profiles"); - plugActionList("favorite-profiles",actions); + plugActionList("favorite-profiles", actions); // Update the 'New Tab' KActionMenu KMenu *newTabMenu = _newTabMenuAction->menu(); newTabMenu->clear(); - newTabMenu->addAction(_defaultProfileAction); - newTabMenu->setDefaultAction(_defaultProfileAction); - newTabMenu->addSeparator(); foreach (QAction *action, actions) { newTabMenu->addAction(action); + + // NOTE: _defaultProfile seems to not work here, sigh. + Profile::Ptr profile = SessionManager::instance()->defaultProfile(); + if (profile && profile->name() == action->text()) { + action->setIcon(KIcon(profile->icon(), NULL, QStringList("emblem-favorite"))); + newTabMenu->setDefaultAction(action); + QFont font = action->font(); + font.setBold(true); + action->setFont(font); + } } + } QString MainWindow::activeSessionDir() const diff --git a/src/MainWindow.h b/src/MainWindow.h index 576017dc9..21aadea3d 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -187,7 +187,6 @@ class MainWindow : public KXmlGuiWindow BookmarkHandler* _bookmarkHandler; KToggleAction* _toggleMenuBarAction; KActionMenu *_newTabMenuAction; - KAction *_defaultProfileAction; QPointer _pluggedController; diff --git a/src/ManageProfilesDialog.cpp b/src/ManageProfilesDialog.cpp index 3a4074326..ae0e49c03 100644 --- a/src/ManageProfilesDialog.cpp +++ b/src/ManageProfilesDialog.cpp @@ -260,11 +260,13 @@ void ManageProfilesDialog::updateDefaultItem() if ( isDefault && !font.bold() ) { + item->setIcon(KIcon(defaultProfile->icon(), NULL, QStringList("emblem-favorite"))); font.setBold(true); item->setFont(font); } else if ( !isDefault && font.bold() ) { + item->setIcon(KIcon(defaultProfile->icon())); font.setBold(false); item->setFont(font); } diff --git a/src/SessionController.cpp b/src/SessionController.cpp index 04bd698be..a54bd52f9 100644 --- a/src/SessionController.cpp +++ b/src/SessionController.cpp @@ -183,7 +183,7 @@ void SessionController::trackOutput(QKeyEvent* event) { Q_ASSERT( _view->screenWindow() ); - // jump to the end of the scrollback buffer unless the key pressed + // jump to the end of the history buffer unless the key pressed // is one of the three main modifiers, as these are used to select // the selection mode (eg. Ctrl+Alt+ for column/block selection) switch (event->key()) @@ -390,98 +390,89 @@ void SessionController::setupActions() KActionCollection* collection = actionCollection(); // Close Session - action = collection->addAction("close-session"); - action->setIcon( KIcon("tab-close") ); - action->setText( i18n("&Close Tab") ); - action->setShortcut( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_W) ); - connect( action , SIGNAL(triggered()) , this , SLOT(closeSession()) ); + action = collection->addAction("close-session", this, SLOT(closeSession())); + action->setIcon(KIcon("tab-close")); + action->setText(i18n("&Close Tab")); + action->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_W)); // Open Browser - action = collection->addAction("open-browser"); - action->setText( i18n("Open File Manager") ); - action->setIcon( KIcon("system-file-manager") ); - connect( action, SIGNAL(triggered()), this, SLOT(openBrowser()) ); + action = collection->addAction("open-browser", this, SLOT(openBrowser())); + action->setText(i18n("Open File Manager")); + action->setIcon(KIcon("system-file-manager")); // Copy and Paste action = KStandardAction::copy(this, SLOT(copy()), collection); - action->setShortcut( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_C) ); + action->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_C)); action = KStandardAction::paste(this, SLOT(paste()), collection); KShortcut pasteShortcut = action->shortcut(); - pasteShortcut.setPrimary( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_V) ); - pasteShortcut.setAlternate( QKeySequence(Qt::SHIFT+Qt::Key_Insert) ); + pasteShortcut.setPrimary(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_V)); + pasteShortcut.setAlternate(QKeySequence(Qt::SHIFT + Qt::Key_Insert)); action->setShortcut(pasteShortcut); - action = collection->addAction("paste-selection"); - action->setText( i18n("Paste Selection") ); - action->setShortcut( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_Insert) ); - connect( action , SIGNAL(triggered()) , this , SLOT(pasteSelection()) ); + action = collection->addAction("paste-selection", this, SLOT(pasteSelection())); + action->setText(i18n("Paste Selection")); + action->setShortcut(QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_Insert)); // Rename Session - action = collection->addAction("rename-session"); + action = collection->addAction("rename-session", this, SLOT(renameSession())); action->setText( i18n("&Rename Tab...") ); action->setShortcut( QKeySequence(Qt::CTRL+Qt::ALT+Qt::Key_S) ); - connect( action , SIGNAL(triggered()) , this , SLOT(renameSession()) ); // Copy Input To -> All Tabs in Current Window - _copyToAllTabsAction = collection->addAction("copy-input-to-all-tabs"); - _copyToAllTabsAction->setShortcut( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_Comma) ); - _copyToAllTabsAction->setText(i18n("&All Tabs in Current Window") ); + _copyToAllTabsAction = collection->addAction("copy-input-to-all-tabs", this, SLOT(copyInputToAllTabs())); + _copyToAllTabsAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_Comma)); + _copyToAllTabsAction->setText(i18n("&All Tabs in Current Window")); _copyToAllTabsAction->setCheckable(true); - connect( _copyToAllTabsAction , SIGNAL(triggered()) , this , SLOT(copyInputToAllTabs()) ); // Copy Input To -> Select Tabs - _copyToSelectedAction = collection->addAction("copy-input-to-selected-tabs"); - _copyToSelectedAction->setShortcut( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_Period) ); - _copyToSelectedAction->setText( i18n("&Select Tabs...") ); + _copyToSelectedAction = collection->addAction("copy-input-to-selected-tabs", this, SLOT(copyInputToSelectedTabs())); + _copyToSelectedAction->setShortcut( QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_Period) ); + _copyToSelectedAction->setText(i18n("&Select Tabs...")); _copyToSelectedAction->setCheckable(true); - connect( _copyToSelectedAction , SIGNAL(triggered()) , this , SLOT(copyInputToSelectedTabs()) ); // Copy Input To -> None - _copyToNoneAction = collection->addAction("copy-input-to-none"); - _copyToNoneAction->setShortcut( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_Slash) ); - _copyToNoneAction->setText( i18n("&None") ); + _copyToNoneAction = collection->addAction("copy-input-to-none", this, SLOT(copyInputToNone())); + _copyToNoneAction->setText(i18n("&None")); + _copyToNoneAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_Slash)); _copyToNoneAction->setCheckable(true); _copyToNoneAction->setChecked(true); - connect( _copyToNoneAction , SIGNAL(triggered()) , this , SLOT(copyInputToNone()) ); - // Clear and Reset - action = collection->addAction("clear-and-reset"); - action->setText( i18n("Clear and Reset") ); - action->setIcon( KIcon("edit-clear-history") ); - connect( action , SIGNAL(triggered()) , this , SLOT(clearAndReset()) ); + action = collection->addAction("zmodem-upload", this, SLOT(zmodemUpload())); + action->setText(i18n("&ZModem Upload...")); + action->setIcon(KIcon("document-open")); + action->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_U)); - action = collection->addAction("zmodem-upload"); - action->setText( i18n( "&ZModem Upload..." ) ); - action->setIcon( KIcon("document-open") ); - action->setShortcut( QKeySequence(Qt::CTRL+Qt::ALT+Qt::Key_U) ); - connect( action , SIGNAL(triggered()) , this , SLOT(zmodemUpload()) ); - // Monitor toggleAction = new KToggleAction(i18n("Monitor for &Activity"),this); - toggleAction->setShortcut( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_A) ); - action = collection->addAction("monitor-activity",toggleAction); - connect( action , SIGNAL(toggled(bool)) , this , SLOT(monitorActivity(bool)) ); + toggleAction->setShortcut(QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_A)); + action = collection->addAction("monitor-activity", toggleAction); + connect(action, SIGNAL(toggled(bool)), this, SLOT(monitorActivity(bool))); toggleAction = new KToggleAction(i18n("Monitor for &Silence"),this); - toggleAction->setShortcut( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_I) ); - action = collection->addAction("monitor-silence",toggleAction); - connect( action , SIGNAL(toggled(bool)) , this , SLOT(monitorSilence(bool)) ); + toggleAction->setShortcut(QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_I)); + action = collection->addAction("monitor-silence", toggleAction); + connect(action, SIGNAL(toggled(bool)), this, SLOT(monitorSilence(bool))); // Character Encoding - _codecAction = new KCodecAction(i18n("Character Encoding"),this); - collection->addAction("character-encoding",_codecAction); - connect( _codecAction->menu() , SIGNAL(aboutToShow()) , this , SLOT(updateCodecAction()) ); - connect( _codecAction , SIGNAL(triggered(QTextCodec*)) , this , SLOT(changeCodec(QTextCodec*)) ); + _codecAction = new KCodecAction(i18n("Set &Encoding"),this); + _codecAction->setIcon(KIcon("character-set")); + collection->addAction("set-encoding", _codecAction); + connect(_codecAction->menu(), SIGNAL(aboutToShow()), this, SLOT(updateCodecAction())); + connect(_codecAction, SIGNAL(triggered(QTextCodec*)), this, SLOT(changeCodec(QTextCodec*))); // Text Size - action = KStandardAction::zoomIn(this, SLOT(increaseTextSize()), collection); + action = collection->addAction("enlarge-font", this, SLOT(increaseTextSize())); action->setText(i18n("Enlarge Font")); + action->setIcon(KIcon("format-font-size-more")); + action->setShortcut(QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_Plus)); - action = KStandardAction::zoomOut(this, SLOT(decreaseTextSize()), collection); + action = collection->addAction("shrink-font", this, SLOT(decreaseTextSize())); action->setText(i18n("Shrink Font")); + action->setIcon(KIcon("format-font-size-less")); + action->setShortcut(QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_Minus)); - // Scrollback + // History _searchToggleAction = KStandardAction::find(this, NULL, collection); _searchToggleAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_F)); _searchToggleAction->setCheckable(true); @@ -495,41 +486,37 @@ void SessionController::setupActions() _findPreviousAction->setEnabled(false); action = KStandardAction::saveAs(this, SLOT(saveHistory()), collection); - action->setText(i18n("Save Output As...")); + action->setText(i18n("Save Output &As...")); - action = collection->addAction("configure-history"); - action->setText( i18n("Scrollback Options") ); - action->setIcon( KIcon("configure") ); - connect( action , SIGNAL(triggered()) , this , SLOT(showHistoryOptions()) ); + action = collection->addAction("configure-history", this, SLOT(showHistoryOptions())); + action->setText(i18n("Configure Scrollback...")); + action->setIcon(KIcon("configure")); - action = collection->addAction("clear-history-and-reset"); - action->setText( i18n("Clear Scrollback and Reset") ); - action->setIcon( KIcon("edit-clear-history") ); - action->setShortcut( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_X) ); - connect( action , SIGNAL(triggered()) , this , SLOT(clearHistoryAndReset()) ); + action = collection->addAction("clear-history", this, SLOT(clearHistory())); + action->setText(i18n("Clear Scrollback")); + action->setIcon(KIcon("edit-clear-history")); + action->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_X)); // Profile Options - action = collection->addAction("edit-current-profile"); - action->setText( i18n("Edit Current Profile...") ); - action->setIcon( KIcon("document-properties") ); - connect( action , SIGNAL(triggered()) , this , SLOT(editCurrentProfile()) ); + action = collection->addAction("edit-current-profile", this, SLOT(editCurrentProfile())); + action->setText(i18n("Configure Current Profile...")); + action->setIcon(KIcon("document-properties") ); _changeProfileMenu = new KActionMenu(i18n("Change Profile"), _view); collection->addAction("change-profile", _changeProfileMenu); - connect( _changeProfileMenu->menu() , SIGNAL(aboutToShow()) , this , SLOT(prepareChangeProfileMenu()) ); - + connect(_changeProfileMenu->menu(), SIGNAL(aboutToShow()), this, SLOT(prepareChangeProfileMenu())); } + void SessionController::changeProfile(Profile::Ptr profile) { - SessionManager::instance()->setSessionProfile(_session,profile); + SessionManager::instance()->setSessionProfile(_session,profile); } + void SessionController::prepareChangeProfileMenu() { - if ( _changeProfileMenu->menu()->isEmpty() ) - { + if (_changeProfileMenu->menu()->isEmpty()) { _profileList = new ProfileList(false,this); - connect( _profileList , SIGNAL(profileSelected(Profile::Ptr)) , - this , SLOT(changeProfile(Profile::Ptr)) ); + connect(_profileList, SIGNAL(profileSelected(Profile::Ptr)), this, SLOT(changeProfile(Profile::Ptr))); } _changeProfileMenu->menu()->clear(); @@ -537,8 +524,9 @@ void SessionController::prepareChangeProfileMenu() } void SessionController::updateCodecAction() { - _codecAction->setCurrentCodec( QString(_session->emulation()->codec()->name()) ); + _codecAction->setCurrentCodec(QString(_session->emulation()->codec()->name())); } + void SessionController::changeCodec(QTextCodec* codec) { _session->setCodec(codec); @@ -551,6 +539,7 @@ void SessionController::editCurrentProfile() dialog->setProfile(SessionManager::instance()->sessionProfile(_session)); dialog->show(); } + void SessionController::renameSession() { QPointer guard(_session); @@ -770,19 +759,6 @@ void SessionController::copyInputToNone() _copyToNoneAction->setChecked(true); } -void SessionController::clear() -{ - Emulation* emulation = _session->emulation(); - - emulation->clearEntireScreen(); -} -void SessionController::clearAndReset() -{ - Emulation* emulation = _session->emulation(); - - emulation->reset(); - _session->refresh(); -} void SessionController::searchClosed() { _searchToggleAction->toggle(); @@ -995,15 +971,13 @@ void SessionController::saveHistory() task->addSession( _session ); task->execute(); } + void SessionController::clearHistory() { _session->clearHistory(); + _view->updateImage(); // To reset view scrollbar } -void SessionController::clearHistoryAndReset() -{ - clearAndReset(); - clearHistory(); -} + void SessionController::increaseTextSize() { QFont font = _view->getVTFont(); @@ -1012,6 +986,7 @@ void SessionController::increaseTextSize() //TODO - Save this setting as a session default } + void SessionController::decreaseTextSize() { static const qreal MinimumFontSize = 6; @@ -1022,6 +997,7 @@ void SessionController::decreaseTextSize() //TODO - Save this setting as a session default } + void SessionController::monitorActivity(bool monitor) { _session->setMonitorActivity(monitor); diff --git a/src/SessionController.h b/src/SessionController.h index 3884e40c5..22b0aed9b 100644 --- a/src/SessionController.h +++ b/src/SessionController.h @@ -165,8 +165,6 @@ private slots: void copy(); void paste(); void pasteSelection(); // shortcut only - void clear(); - void clearAndReset(); void copyInputToAllTabs(); void copyInputToSelectedTabs(); void copyInputToNone(); @@ -178,7 +176,6 @@ private slots: void saveHistory(); void showHistoryOptions(); void clearHistory(); - void clearHistoryAndReset(); void closeSession(); void monitorActivity(bool monitor); void monitorSilence(bool monitor); diff --git a/src/SessionManager.cpp b/src/SessionManager.cpp index 29a06e1eb..8f6c0b8ce 100644 --- a/src/SessionManager.cpp +++ b/src/SessionManager.cpp @@ -503,7 +503,7 @@ void SessionManager::applyProfile(Session* session, const Profile::Ptr info , bo session->setTabTitleFormat( Session::RemoteTabTitle , info->property(Profile::RemoteTabTitleFormat)); - // Scrollback / history + // History if ( apply.shouldApply(Profile::HistoryMode) || apply.shouldApply(Profile::HistorySize) ) { int mode = info->property(Profile::HistoryMode); diff --git a/src/TerminalDisplay.cpp b/src/TerminalDisplay.cpp index dd47d496e..48a214b6c 100644 --- a/src/TerminalDisplay.cpp +++ b/src/TerminalDisplay.cpp @@ -1918,7 +1918,7 @@ void TerminalDisplay::extendSelection( const QPoint& position ) if ( oldpos.y() < textBounds.top() ) { linesBeyondWidget = (textBounds.top()-oldpos.y()) / _fontHeight; - _scrollBar->setValue(_scrollBar->value()-linesBeyondWidget-1); // scrollback + _scrollBar->setValue(_scrollBar->value()-linesBeyondWidget-1); // history } int charColumn = 0; diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp index ab3ee63a2..089aecfd5 100644 --- a/src/ViewManager.cpp +++ b/src/ViewManager.cpp @@ -151,13 +151,13 @@ void ViewManager::setupActions() KAction* splitLeftRightAction = new KAction( KIcon("view-split-left-right"), i18nc("@action:inmenu", "Split View Left/Right"), this ); - splitLeftRightAction->setShortcut( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_L) ); + splitLeftRightAction->setShortcut( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_ParenLeft) ); collection->addAction("split-view-left-right",splitLeftRightAction); connect( splitLeftRightAction , SIGNAL(triggered()) , this , SLOT(splitLeftRight()) ); KAction* splitTopBottomAction = new KAction( KIcon("view-split-top-bottom") , i18nc("@action:inmenu", "Split View Top/Bottom"),this); - splitTopBottomAction->setShortcut( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_T) ); + splitTopBottomAction->setShortcut( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_ParenRight) ); collection->addAction("split-view-top-bottom",splitTopBottomAction); connect( splitTopBottomAction , SIGNAL(triggered()) , this , SLOT(splitTopBottom())); @@ -167,8 +167,8 @@ void ViewManager::setupActions() closeActiveAction->setEnabled(false); collection->addAction("close-active-view",closeActiveAction); connect( closeActiveAction , SIGNAL(triggered()) , this , SLOT(closeActiveView()) ); - - multiViewOnlyActions << closeActiveAction; + + multiViewOnlyActions << closeActiveAction; KAction* closeOtherAction = new KAction( i18nc("@action:inmenu Close Other Views", "Close Others") , this ); closeOtherAction->setShortcut( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_O) ); @@ -179,15 +179,15 @@ void ViewManager::setupActions() multiViewOnlyActions << closeOtherAction; KAction* detachViewAction = collection->addAction("detach-view"); - detachViewAction->setIcon( KIcon("tab-detach") ); - detachViewAction->setText( i18n("&Detach View") ); + detachViewAction->setIcon(KIcon("tab-detach")); + detachViewAction->setText(i18n("D&etach Current Tab")); // Ctrl+Shift+D is not used as a shortcut by default because it is too close // to Ctrl+D - which will terminate the session in many cases - detachViewAction->setShortcut( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_H) ); - - connect( this , SIGNAL(splitViewToggle(bool)) , this , SLOT(updateDetachViewState()) ); + detachViewAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_H)); + + connect( this , SIGNAL(splitViewToggle(bool)) , this , SLOT(updateDetachViewState()) ); connect( detachViewAction , SIGNAL(triggered()) , this , SLOT(detachActiveView()) ); - + // Expand & Shrink Active View KAction* expandActiveAction = new KAction( i18nc("@action:inmenu", "Expand View") , this ); expandActiveAction->setShortcut( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_BracketRight) );