Commit 76943a4b authored by Robert Knight's avatar Robert Knight

Use correct 'terminal is using the mouse' status in newly added views.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=700303
parent 012b92b2
......@@ -67,10 +67,11 @@ Emulation::Emulation() :
_currentScreen(0),
_codec(0),
_decoder(0),
_keyTranslator(0)
_keyTranslator(0),
_usesMouse(false)
{
//initialize screens with a default size
// create screens with a default size
_screen[0] = new Screen(40,80);
_screen[1] = new Screen(40,80);
_currentScreen = _screen[0];
......@@ -78,7 +79,22 @@ Emulation::Emulation() :
QObject::connect(&_bulkTimer1, SIGNAL(timeout()), this, SLOT(showBulk()) );
QObject::connect(&_bulkTimer2, SIGNAL(timeout()), this, SLOT(showBulk()) );
setKeyBindings(0); // Default keymap
// default keymap
setKeyBindings(0);
// listen for mouse status changes
connect( this , SIGNAL(programUsesMouseChanged(bool)) ,
SLOT(usesMouseChanged(bool)) );
}
bool Emulation::programUsesMouse() const
{
return _usesMouse;
}
void Emulation::usesMouseChanged(bool usesMouse)
{
_usesMouse = usesMouse;
}
ScreenWindow* Emulation::createWindow()
......
......@@ -427,8 +427,11 @@ private slots:
// view
void showBulk();
void usesMouseChanged(bool usesMouse);
private:
bool _usesMouse;
QTimer _bulkTimer1;
QTimer _bulkTimer2;
......
......@@ -120,10 +120,7 @@ void MainWindow::activeViewChanged(SessionController* controller)
connect( bookmarkHandler() , SIGNAL(openUrl(const KUrl&)) , controller ,
SLOT(openUrl(const KUrl&)) );
// set the current session's search bar
controller->setSearchBar( searchBar() );
controller->setShowMenuAction( _toggleMenuBarAction );
// listen for title changes from the current session
if ( _pluggedController )
{
......@@ -139,6 +136,10 @@ void MainWindow::activeViewChanged(SessionController* controller)
guiFactory()->addClient(controller);
// set the current session's search bar
controller->setSearchBar( searchBar() );
controller->setShowMenuAction( _toggleMenuBarAction );
// update session title to match newly activated session
activeViewTitleChanged(controller);
......
......@@ -207,6 +207,8 @@ void Session::addView(TerminalDisplay* widget)
// indicates whether or not it is interested in mouse signals
connect( _emulation , SIGNAL(programUsesMouseChanged(bool)) , widget ,
SLOT(setUsesMouse(bool)) );
widget->setUsesMouse( _emulation->programUsesMouse() );
widget->setScreenWindow(_emulation->createWindow());
}
......
......@@ -645,10 +645,12 @@ void SessionController::searchClosed()
_searchToggleAction->toggle();
}
#if 0
void SessionController::searchHistory()
{
searchHistory(true);
}
#endif
// searchHistory() may be called either as a result of clicking a menu item or
// as a result of changing the search bar widget
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment