mirror of
https://github.com/KDE/konsole.git
synced 2026-06-09 22:45:03 -04:00
Add the context menu options to split the view left-right and top-bottom
FEATURE: 415724
This commit is contained in:
committed by
Kurt Hindenburg
parent
44501778fe
commit
d3fa26f65b
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE gui SYSTEM "kpartgui.dtd">
|
||||
|
||||
<gui name="session" version="32">
|
||||
<gui name="session" version="33">
|
||||
<MenuBar>
|
||||
<Menu name="file">
|
||||
<Action name="file_save_as" group="session-operations"/>
|
||||
@@ -57,6 +57,11 @@
|
||||
<Action name="web-search"/>
|
||||
<Action name="open-browser"/>
|
||||
<Separator/>
|
||||
<Menu name="view-split"><text>Split View</text>
|
||||
<Action name="split-view-left-right"/>
|
||||
<Action name="split-view-top-bottom"/>
|
||||
</Menu>
|
||||
<Separator/>
|
||||
<Action name="set-encoding"/>
|
||||
<Action name="clear-history"/>
|
||||
<Action name="adjust-history"/>
|
||||
|
||||
@@ -820,6 +820,8 @@ SessionController *ViewManager::createController(Session *session, TerminalDispl
|
||||
connect(session, &Konsole::Session::selectionChanged, controller, &Konsole::SessionController::selectionChanged);
|
||||
connect(view, &Konsole::TerminalDisplay::destroyed, controller, &Konsole::SessionController::deleteLater);
|
||||
connect(controller, &Konsole::SessionController::viewDragAndDropped, this, &Konsole::ViewManager::forgetController);
|
||||
connect(controller, &Konsole::SessionController::requestSplitViewLeftRight, this, &Konsole::ViewManager::splitLeftRight);
|
||||
connect(controller, &Konsole::SessionController::requestSplitViewTopBotton, this, &Konsole::ViewManager::splitTopBottom);
|
||||
|
||||
// if this is the first controller created then set it as the active controller
|
||||
if (_pluggedController.isNull()) {
|
||||
|
||||
@@ -672,6 +672,14 @@ void SessionController::setupCommonActions()
|
||||
action->setVisible(false);
|
||||
connect(action, &QAction::triggered, this, &SessionController::copy);
|
||||
|
||||
action = collection->addAction(QStringLiteral("split-view-left-right"));
|
||||
action->setText(i18n("Split View Left-Right"));
|
||||
connect(action, &QAction::triggered, this, &SessionController::requestSplitViewLeftRight);
|
||||
|
||||
action = collection->addAction(QStringLiteral("split-view-top-bottom"));
|
||||
action->setText(i18n("Split View Top-Bottom"));
|
||||
connect(action, &QAction::triggered, this, &SessionController::requestSplitViewTopBotton);
|
||||
|
||||
action = collection->addAction(QStringLiteral("edit_copy_contextmenu_in_out"));
|
||||
action->setText(i18n("Copy except prompts"));
|
||||
action->setIcon(QIcon::fromTheme(QStringLiteral("edit-copy")));
|
||||
|
||||
@@ -157,6 +157,13 @@ Q_SIGNALS:
|
||||
|
||||
void rawTitleChanged();
|
||||
|
||||
/*
|
||||
* Emitted when the user requests to split the view from the context menu.
|
||||
*/
|
||||
|
||||
void requestSplitViewLeftRight();
|
||||
void requestSplitViewTopBotton();
|
||||
|
||||
/**
|
||||
* Emitted when the current working directory of the session associated with
|
||||
* the controller is changed.
|
||||
|
||||
Reference in New Issue
Block a user