_currentTerminalDisplay was not set until some interaction was made with
the TerminalDisplay widget. Set it as soon as Session->addView() is
called.
BUG: 439529
It is not unchecking the "Show SSH Manager" when closing the
dockWidget with the Close icon.
It is not checking the the box when the dockWidget opens with the
konsole.
Having a checkable menu item combined with changing texts
is confusing. "Hide SSH Manager" in checked state would indicate
that the hidden state is active, which is not actually the case.
The menu item text should either indicate an action, in which case
renaming is okay but no checkbox should be added, or the
unchanging text should name the state that's either
active/checked or inactive/unchecked.
In the spirit of "Settings" -> "Show Menubar" / "Show Statusbar",
I'm picking the latter, so the text always remains
"Show SSH Manager" and only the checkbox state gets toggled.
When the last line in history was marked as wrapped, the history reflow
algorithm could try to make an out-of-bound access.
These were found via repeteadly zooming-in and out in the amp.rs editor
(available through Rust's cargo tool). amp.rs writes in the normal
buffer (not in the alternate buffer).
While at it, add a Q_ASSERT in HistoryScrollFile::startOfLine() to
ensure parameters are in range. Note that after an addCells()/addLine()
pair, HistoryScrollFile::startOfLine(getLines) always has the same value
as _cells.len().
BUG: 436916
This plugin adds a SSH Manager, just like PuTTY, for Konsole.
It reads and parses the ~/.ssh/config file and generates entries
based on that, it also accepts entries manually.
The file used to store the information is a json, stored locally.
Clicking on the entry: request to connect to the server
Middle click on the entry: new tab, request to connect to the server
You can also filter entries, and disable / enable the view by
the new Plugins submenu.
This commit introduces a plugins sytem for konsole, so we can
extend the application without touching the core. Currently
there's a testcase plugin (in the next commit) that handles
ssh connections and will serve as a base introduction on how
to write plugins for konsole.
Things we need to keep in mind when developing a plugin for
konsole:
- We can have more than a mainwindow, so if the plugin creates
widgets, it needs to create the widget per window
- We can have multiple tabs / multiple TerminalDisplays so always
check what terminal display you are triggering the action (using
activeTerminalDisplay())
From the mainWindow you can get the activeTerminalDisplay, from
the terminalDisplay you can get the Session, the VT102Emulation and
the Screen.
Then you can go crazy.
The recent change of blending the background/foreground colours for text
selection doesn't work everywhere, users with vision impairment or
colour-blindness would probably find it hard to distinguish text selection
colours; and the current code can't possibly cover all variations of colour
schemes out there. The same goes with certain displays and viewing angles,
some display types are notoriously awful when viewed at an angle.
BUG: 435309
FIXED-IN: 21.08
- Add a type alias for QPointer<Session>
- Use TerminalDisplay::setSessionController() as early as possible
- Use Screen::setCurrentTerminalDisplay() in TerminalDisplay::mousePressEvent(),
this matches what's being done in keyPressEvent()
- Add convenience function TerminalDisplay::currentSession()
- More const
This test currently is bogus, as soon as I reflow the Screen
object, the data is not correct. If anyone can check what I'm
doing wrong here it's appreciated.
The idea is that I pass a large string "aaa bbb ccc ddd" then
force a reflow for:
"aaa bbb
ccc ddd"
then I could copy only the column
bbb
ddd
Because the setSize did not work for that, the test is bogus.
but it's a start.