|
|
|
@ -22,6 +22,8 @@
|
|
|
|
|
Additional changes:
|
|
|
|
|
- 2013/10/14 Michele Calgaro
|
|
|
|
|
add "scroll tabs on mouse wheel event" functionality
|
|
|
|
|
- 2013/10/19 Michele Calgaro
|
|
|
|
|
add "move session left/right" to tab popup menu
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
/* The material contained in here more or less directly orginates from */
|
|
|
|
@ -815,8 +817,12 @@ void Konsole::makeGUI()
|
|
|
|
|
m_tabPopupMenu = new TDEPopupMenu( this );
|
|
|
|
|
TDEAcceleratorManager::manage( m_tabPopupMenu );
|
|
|
|
|
|
|
|
|
|
m_tabDetachSession= new TDEAction( i18n("&Detach Session"), SmallIconSet("tab_breakoff"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTabDetachSession()), TQT_TQOBJECT(this) );
|
|
|
|
|
m_tabDetachSession->plug(m_tabPopupMenu);
|
|
|
|
|
if (!m_detachSession)
|
|
|
|
|
{
|
|
|
|
|
m_detachSession = new TDEAction(i18n("&Detach Session"), SmallIconSet("tab_breakoff"), 0, TQT_TQOBJECT(this),
|
|
|
|
|
TQT_SLOT(slotDetachSession()), m_shortcuts, "detach_session");
|
|
|
|
|
}
|
|
|
|
|
m_detachSession->plug(m_tabPopupMenu);
|
|
|
|
|
|
|
|
|
|
m_tabPopupMenu->insertItem( i18n("&Rename Session..."), TQT_TQOBJECT(this),
|
|
|
|
|
TQT_SLOT(slotTabRenameSession()) );
|
|
|
|
@ -836,6 +842,22 @@ void Konsole::makeGUI()
|
|
|
|
|
TQT_SLOT( slotTabToggleMasterMode() ), TQT_TQOBJECT(this));
|
|
|
|
|
m_tabMasterMode->plug(m_tabPopupMenu);
|
|
|
|
|
|
|
|
|
|
m_tabPopupMenu->insertSeparator();
|
|
|
|
|
if (!m_moveSessionLeft)
|
|
|
|
|
{
|
|
|
|
|
m_moveSessionLeft = new TDEAction(i18n("&Move Session Left"), TQApplication::reverseLayout() ? "forward" : "back",
|
|
|
|
|
TQApplication::reverseLayout() ? Qt::CTRL+Qt::SHIFT+Qt::Key_Right : Qt::CTRL+Qt::SHIFT+Qt::Key_Left, TQT_TQOBJECT(this),
|
|
|
|
|
TQT_SLOT(moveSessionLeft()), m_shortcuts, "move_session_left");
|
|
|
|
|
}
|
|
|
|
|
m_moveSessionLeft->plug(m_tabPopupMenu);
|
|
|
|
|
if (!m_moveSessionRight)
|
|
|
|
|
{
|
|
|
|
|
m_moveSessionRight = new TDEAction(i18n("M&ove Session Right"), TQApplication::reverseLayout() ? "back" : "forward",
|
|
|
|
|
TQApplication::reverseLayout() ? Qt::CTRL+Qt::SHIFT+Qt::Key_Left : Qt::CTRL+Qt::SHIFT+Qt::Key_Right, TQT_TQOBJECT(this),
|
|
|
|
|
TQT_SLOT(moveSessionRight()), m_shortcuts, "move_session_right");
|
|
|
|
|
}
|
|
|
|
|
m_moveSessionRight->plug(m_tabPopupMenu);
|
|
|
|
|
|
|
|
|
|
m_tabPopupMenu->insertSeparator();
|
|
|
|
|
m_tabPopupMenu->insertItem( SmallIconSet("colors"), i18n("Select &Tab Color..."), TQT_TQOBJECT(this), TQT_SLOT(slotTabSelectColor()) );
|
|
|
|
|
|
|
|
|
@ -1098,8 +1120,11 @@ void Konsole::makeBasicGUI()
|
|
|
|
|
m_clearAllSessionHistories = new TDEAction(i18n("Clear All H&istories"), "history_clear", 0,
|
|
|
|
|
TQT_TQOBJECT(this), TQT_SLOT(slotClearAllSessionHistories()), m_shortcuts, "clear_all_histories");
|
|
|
|
|
|
|
|
|
|
if (!m_detachSession)
|
|
|
|
|
{
|
|
|
|
|
m_detachSession = new TDEAction(i18n("&Detach Session"), SmallIconSet("tab_breakoff"), 0, TQT_TQOBJECT(this),
|
|
|
|
|
TQT_SLOT(slotDetachSession()), m_shortcuts, "detach_session");
|
|
|
|
|
}
|
|
|
|
|
m_detachSession->setEnabled(false);
|
|
|
|
|
|
|
|
|
|
m_renameSession = new TDEAction(i18n("&Rename Session..."), Qt::CTRL+Qt::ALT+Qt::Key_S, TQT_TQOBJECT(this),
|
|
|
|
@ -1152,12 +1177,18 @@ void Konsole::makeBasicGUI()
|
|
|
|
|
new TDEAction(i18n("Activate Menu"), Qt::CTRL+Qt::ALT+Qt::Key_M, TQT_TQOBJECT(this), TQT_SLOT(activateMenu()), m_shortcuts, "activate_menu");
|
|
|
|
|
new TDEAction(i18n("List Sessions"), 0, TQT_TQOBJECT(this), TQT_SLOT(listSessions()), m_shortcuts, "list_sessions");
|
|
|
|
|
|
|
|
|
|
if (!m_moveSessionLeft)
|
|
|
|
|
{
|
|
|
|
|
m_moveSessionLeft = new TDEAction(i18n("&Move Session Left"), TQApplication::reverseLayout() ? "forward" : "back",
|
|
|
|
|
TQApplication::reverseLayout() ? Qt::CTRL+Qt::SHIFT+Qt::Key_Right : Qt::CTRL+Qt::SHIFT+Qt::Key_Left, TQT_TQOBJECT(this),
|
|
|
|
|
TQT_SLOT(moveSessionLeft()), m_shortcuts, "move_session_left");
|
|
|
|
|
}
|
|
|
|
|
if (!m_moveSessionRight)
|
|
|
|
|
{
|
|
|
|
|
m_moveSessionRight = new TDEAction(i18n("M&ove Session Right"), TQApplication::reverseLayout() ? "back" : "forward",
|
|
|
|
|
TQApplication::reverseLayout() ? Qt::CTRL+Qt::SHIFT+Qt::Key_Left : Qt::CTRL+Qt::SHIFT+Qt::Key_Right, TQT_TQOBJECT(this),
|
|
|
|
|
TQT_SLOT(moveSessionRight()), m_shortcuts, "move_session_right");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
new TDEAction(i18n("Go to Previous Session"), TQApplication::reverseLayout() ? Qt::SHIFT+Qt::Key_Right : Qt::SHIFT+Qt::Key_Left,
|
|
|
|
|
TQT_TQOBJECT(this), TQT_SLOT(prevSession()), m_shortcuts, "previous_session");
|
|
|
|
@ -1321,9 +1352,6 @@ void Konsole::slotTabContextMenu(TQWidget* _te, const TQPoint & pos)
|
|
|
|
|
makeGUI();
|
|
|
|
|
|
|
|
|
|
m_contextMenuSession = sessions.at( tabwidget->indexOf( _te ) );
|
|
|
|
|
|
|
|
|
|
m_tabDetachSession->setEnabled( tabwidget->count()>1 );
|
|
|
|
|
|
|
|
|
|
m_tabMonitorActivity->setChecked( m_contextMenuSession->isMonitorActivity() );
|
|
|
|
|
m_tabMonitorSilence->setChecked( m_contextMenuSession->isMonitorSilence() );
|
|
|
|
|
m_tabMasterMode->setChecked( m_contextMenuSession->isMasterMode() );
|
|
|
|
|