diff options
author | Michele Calgaro <[email protected]> | 2016-02-08 16:39:21 +0700 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2016-02-08 16:39:21 +0700 |
commit | 099c8a8821e896884180f57dda94af5fdbd87aaa (patch) | |
tree | c83cf391dddd78128d29d2a9279d99ff815c73e6 /kate/app/katesessionpanel.cpp | |
parent | de91a161b1555bca58c4c30c6367dcc38750ca17 (diff) | |
download | tdebase-099c8a8821e896884180f57dda94af5fdbd87aaa.tar.gz tdebase-099c8a8821e896884180f57dda94af5fdbd87aaa.zip |
Disabled the old session manager and switched permanently to the new one. Lot of functionality still missing.
It is possible to switch sessions from the session panel (either by the activate pushbutton or by executing a listview item).
Kate's session settings are currently not yet supported (last session is saved and restored by default).
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'kate/app/katesessionpanel.cpp')
-rw-r--r-- | kate/app/katesessionpanel.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/kate/app/katesessionpanel.cpp b/kate/app/katesessionpanel.cpp index 93bca5d06..7bb61a308 100644 --- a/kate/app/katesessionpanel.cpp +++ b/kate/app/katesessionpanel.cpp @@ -62,7 +62,8 @@ KateSessionPanel::KateSessionPanel(KateMainWindow *mainWindow, KateViewManager * m_listview->setColumnAlignment(2, TQt::AlignCenter); m_listview->setMinimumWidth(m_listview->sizeHint().width()); m_listview->setSorting(-1); - //m_listview->setRootIsDecorated(true); // to enable after inserting doc list + //m_listview->setRootIsDecorated(true); // MIKE to enable after inserting doc list + connect(m_listview, TQT_SIGNAL(executed(TQListViewItem*)), TQT_SLOT(itemExecuted(TQListViewItem*))); TQPtrList<KateSession>& sessions = m_sessionManager->getSessionsList(); for (int idx = sessions.count()-1; idx >= 0; --idx) @@ -210,3 +211,16 @@ void KateSessionPanel::sessionMoveDown() { //TODO } + +void KateSessionPanel::itemExecuted(TQListViewItem *item) +{ + if (!item) + return; + + // First level items are sessions. Executing one, will switch to that session + if (!item->parent()) + { + sessionActivate(); + return; + } +} |