Commit 86548693 authored by Constantin Berzan's avatar Constantin Berzan
Browse files

* Get rid of an unused/duplicate property in Profile.

* Make it possible to rename a session by double-clicking on (one of) its tab(s).
* Make double-clicking on the empty tabbar area launch a new session.


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=711160
parent 71c9209f
......@@ -74,7 +74,6 @@ const Profile::PropertyNamePair Profile::DefaultPropertyNames[] =
, { HistoryMode , "HistoryMode" }
, { HistorySize , "HistorySize" }
, { ScrollBarPosition , "ScrollBarPosition" }
, { SelectWordCharacters , "SelectWordCharacters" }
, { BlinkingTextEnabled , "BlinkingTextEnabled" }
, { FlowControlEnabled , "FlowControlEnabled" }
, { AllowProgramsToResizeWindow , "AllowProgramsToResizeWindow" }
......
......@@ -126,9 +126,6 @@ public:
*/
ScrollBarPosition,
/** TODO Document me*/
// FIXME - Is this a duplicate of WordCharacters?
SelectWordCharacters,
/** (bool) Specifies whether text in terminal displays is allowed to blink. */
BlinkingTextEnabled,
/** (bool) Specifies whether the flow control keys ( typically Ctrl+S , Ctrl+Q )
......@@ -158,7 +155,6 @@ public:
/** (QString) A string consisting of the characters used to delimit words when
* selecting text in the terminal display.
*/
// FIXME - Is this a duplicate of SelectWordCharacters?
WordCharacters,
/** (TabBarPositionEnum) Position of the tab-bar relative to the terminal displays. */
......
......@@ -261,6 +261,11 @@ KUrl SessionController::url() const
return KUrl( path );
}
void SessionController::rename()
{
renameSession();
}
void SessionController::openUrl( const KUrl& url )
{
// handle local paths
......
......@@ -117,6 +117,7 @@ public:
// reimplemented
virtual KUrl url() const;
virtual QString currentDir() const;
virtual void rename();
// Reimplemented to watch for events happening to the view
virtual bool eventFilter(QObject* watched , QEvent* event);
......
......@@ -467,7 +467,8 @@ TabbedViewContainerV2::TabbedViewContainerV2(NavigationPosition position , QObje
_tabBar->setDrawBase(true);
connect( _tabBar , SIGNAL(currentChanged(int)) , this , SLOT(currentTabChanged(int)) );
connect( _tabBar , SIGNAL(mouseDoubleClick(int)) , this , SLOT(tabDoubleClicked(int)) );
connect( _tabBar , SIGNAL(tabDoubleClicked(int)) , this , SLOT(tabDoubleClicked(int)) );
connect( _tabBar , SIGNAL(newTabRequest()) , this , SIGNAL(newViewRequest()) );
_layout = new TabbedViewContainerV2Layout;
_layout->setSpacing(0);
......@@ -568,12 +569,7 @@ TabbedViewContainerV2::~TabbedViewContainerV2()
}
void TabbedViewContainerV2::tabDoubleClicked(int tab)
{
qDebug() << __FUNCTION__ << ", tab index =" << tab;
if ( tab < 0 )
{
//emit duplicateRequest();
}
viewProperties( views()[tab] )->rename();
}
void TabbedViewContainerV2::moveViewWidget( int fromIndex , int toIndex )
{
......
......@@ -239,6 +239,9 @@ signals:
/** Emitted when the user requests to close a view */
void closeRequest(QWidget* activeView);
/** Emitted when the user requests to open a new view */
void newViewRequest();
/** Emitted when the active view changes */
void activeViewChanged( QWidget* view );
......
......@@ -35,7 +35,6 @@
#include <KXMLGUIFactory>
// Konsole
#include "BookmarkHandler.h"
#include "ColorScheme.h"
#include "Session.h"
#include "TerminalDisplay.h"
......@@ -531,6 +530,7 @@ ViewContainer* ViewManager::createContainer(const QString& profileKey)
SLOT(map()) );
_containerSignalMapper->setMapping(container,container);
connect( container, SIGNAL(newViewRequest()), _actionCollection->action("new-tab"), SLOT(trigger()) );
connect( container , SIGNAL(viewRemoved(QWidget*)) , this , SLOT(viewCloseRequest(QWidget*)) );
connect( container , SIGNAL(closeRequest(QWidget*)) , this , SLOT(viewCloseRequest(QWidget*)) );
connect( container , SIGNAL(activeViewChanged(QWidget*)) , this , SLOT(viewActivated(QWidget*)));
......
......@@ -45,6 +45,10 @@ void ViewProperties::fireActivity()
emit activity(this);
}
void ViewProperties::rename()
{
}
void ViewProperties::setTitle(const QString& title)
{
if ( title != _title )
......
......@@ -81,6 +81,14 @@ signals:
/** Emitted when activity has occurred in this view. */
void activity(ViewProperties* item);
public slots:
/**
* Requests the renaming of this view.
*
* The default implementation does nothing.
*/
virtual void rename();
protected slots:
/**
* Emits the activity() signal.
......
Supports Markdown
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