Add menu item to clear the history and the current display in one step.

svn path=/branches/work/konsole-split-view/; revision=637910
wilder-portage
Robert Knight 19 years ago
parent af98f966e4
commit 96aa3f454f
  1. 1
      desktop/sessionui.rc
  2. 13
      konsole/SessionController.cpp
  3. 5
      konsole/SessionController.h

@ -19,6 +19,7 @@
<Action name="save-history" group="session-history-operations"/>
<Separator group="session-history-operations"/>
<Action name="clear-history" group="session-history-operations"/>
<Action name="clear-history-and-reset" group="session-history-operations"/>
</Menu>
<Menu name="view"><text>View</text>
<Action name="monitor-silence" group="session-view-operations" />

@ -114,6 +114,8 @@ void SessionController::setSearchBar(IncrementalSearchBar* searchBar)
_searchBar = searchBar;
connect( _searchBar , SIGNAL(closeClicked()) , this , SLOT(searchClosed()) );
connect( _searchBar , SIGNAL(findNextClicked()) , this , SLOT(findNextInHistory()) );
connect( _searchBar , SIGNAL(findPreviousClicked()) , this , SLOT(findPreviousInHistory()) );
}
IncrementalSearchBar* SessionController::searchBar() const
{
@ -184,6 +186,10 @@ void SessionController::setupActions()
action->setText( i18n("Clear History") );
connect( action , SIGNAL(triggered()) , this , SLOT(clearHistory()) );
action = collection->addAction("clear-history-and-reset");
action->setText( i18n("Clear History && Reset") );
connect( action , SIGNAL(triggered()) , this , SLOT(clearHistoryAndReset()) );
// debugging tools
action = collection->addAction("debug-process");
action->setText( "Get Foreground Process" );
@ -276,9 +282,11 @@ void SessionController::searchHistory(bool showSearchBar)
}
void SessionController::findNextInHistory()
{
qDebug() << "find next";
}
void SessionController::findPreviousInHistory()
{
qDebug() << "find previous";
}
void SessionController::saveHistory()
{
@ -291,6 +299,11 @@ void SessionController::clearHistory()
{
_session->clearHistory();
}
void SessionController::clearHistoryAndReset()
{
clearAndReset();
clearHistory();
}
void SessionController::monitorActivity(bool monitor)
{
_session->setMonitorActivity(monitor);

@ -103,17 +103,20 @@ private slots:
void clear();
void clearAndReset();
void searchHistory(bool showSearchBar);
void searchClosed();
void findNextInHistory();
void findPreviousInHistory();
void saveHistory();
void clearHistory();
void clearHistoryAndReset();
void closeSession();
void monitorActivity(bool monitor);
void monitorSilence(bool monitor);
// other
void sessionStateChanged(TESession* session,int state);
void sessionTitleChanged();
void searchClosed(); // called when the user clicks on the
// history search bar's close button
// debugging slots
void debugProcess();

Loading…
Cancel
Save