Summary:
There are (more or less) valid cases when currentTerminalDisplay can be
not set:
* konsole started with `--background-mode`, `sendText` called via D-Bus
* text send through KPart's `sendInput()`
It can be assumed read-only is not set in this case.
This patch should also fix TerminalInterfaceTest. Currently the shell
probably doesn't get commands send through sendInput.
Test Plan:
* Run `konsole --background-mode --nofork & ; sleep 2; qdbus org.kde.konsole-$! /Sessions/1 sendText $'echo test\n'`
* Press Ctrl+Shift+F12
* The terminal should show `echo test` command and its result
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D11762
Summary:
Allow to use scrolling (Shift+Up/Down/PgUp/PgDown/Home/End) and a key
for showing URL hints when the view is in read-only mode.
Test Plan:
* Prepare
* Turn on scrollback
* Set at least one modifier key for "Show URL hints" (edit profile → advanced)
* Generate a few screens of text in Konsole
* Display some URL (e.g. `echo 'www.kde.org'`)
* Display current time every second: `while sleep 1; do printf '\r%s' "$(date)"; done`
* Turn on read-only mode
* Patch tests
* Hold down URL hint key - the URL should be underlined with square and a digit on the left
* Press <URL-hint-key>+1 - the URL should open in a web browser
* Scroll the view with Shift+Up/Down/PgUp/PgDown/Home/End - the view should scroll
* Split the view, do previous test in each split - only currently active split should scroll
* Regressions tests
* Press different keys (including Ctrl+C, Ctrl+Z, etc; skip those mapped to Konsole actions) - nothing in terminal should happen
* Press Ctrl+S - the time should not stop updating
* Use IME to enter text - nothing in terminal should be shown
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D11668
This reverts the Ctrl+S/Q/C not sending to a read-only/locked session.
This portion is causing tests to fail on ASAN; which might be the tests
fault, but for now revert.
Summary:
Allow to use scrolling (Shift+Up/Down/PgUp/PgDown/Home/End) and a key
for showing URL hints when the view is in read-only mode.
Test Plan:
* Prepare
* Turn on scrollback
* Set at least one modifier key for "Show URL hints" (edit profile → advanced)
* Generate a few screens of text in Konsole
* Display some URL (e.g. `echo 'www.kde.org'`)
* Display current time every second: `while sleep 1; do printf '\r%s' "$(date)"; done`
* Turn on read-only mode
* Patch tests
* Scroll the view with Shift+Up/Down/PgUp/PgDown/Home/End - the view should scroll
* Hold down URL hint key - the URL should be underlined with square and a digit on the left
* Press <URL-hint-key>+1 - the URL should open in a web browser
* Regressions tests
* Press different keys (including Ctrl+C, Ctrl+Z, etc; skip those mapped to Konsole actions) - nothing in terminal should happen
* Press Ctrl+S - the time should not stop updating
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D11668
Summary:
The first column in the key binding editor dialog usually has long lines of
text, to improve usability set a minimum size of 480x430 for that dialog
and an initial size of 500x500. Also set the initial width of that column
to 300.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: ngraham, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D11637
Summary:
This patch addresses the following points:
- Ignore most DBus methods
- Disable the following actions:
clear-history, clear-history-and-reset, edit-current-profile, switch-profile
adjust-history, send-signal, zmodem-upload, edit-rename (tab bar)
- Session updates all views correctly when readonly changes
{F5754353}
Test Plan:
- Actions do not show when locked
- DBus methods are ignored when locked
- Multiple views in one session get correctly updated
Reviewers: hindenburg, #konsole
Reviewed By: hindenburg, #konsole
Subscribers: ngraham, hindenburg, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D11341
Summary:
Include top margin in the rectangle's vertical position, so it will
be drawn in correct position when TerminalCenter is set and/or
TerminalMargin is larget than 0.
Preview:
{F5756612}
Test Plan:
- Run `konsole -p TerminalMargin=8`
- Display something
- Run search and search for something
- The blue rectangle should cover current result line
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D11412
Summary:
When applying profile changes don't touch tab titles explicilty set by
the user (via the rename tab dialog); the same goes when previewing
color schemes.
Update the tab text only if the user actually changed the the tab title
fomart in the rename tab dialog.
BUG: 354403
FIXED-IN: 18.04
Test Plan:
- In a konsole window with 2 or more tabs, rename a tab using the
rename-tab dialog
- Open the Edit Profile dialog and change some settings and save, also
try previewing some color schemes; note that the tab title changes
are kept
- In the Edit Profile dialog, change the tab format on the Tabs page,
and apply; note that the tab title the was renamed by the user isn't
changed but the tab(s) whose name wasn't changed are affected by the
tab title format setting change
- Open the rename-tab dialog, don't change anything and click OK; now
konsole doesn't count that as a tab title change
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D11363
Summary: It clutters the UI and can still be permanently enabled in settings if so desired.
Test Plan:
Konsole looks a lot cleaner out of the box now
{F5750441}
Reviewers: #vdg, mart, hindenburg
Reviewed By: hindenburg
Subscribers: ahmadsamir, romangg, ngraham, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D11258
Summary:
Call setDefaultRendition() before switching to the alternate screen
Quitting vim after using a color scheme which sets the character
background color doesn't clear that attribute in the alternate screen.
This affects other programs which use the alternate screen when run
right after quitting vim, e.g. less.
This issue appears to only happen with certain graphics cards/drivers.
BUG: 328287
FIXED-IN: 18.04
Reviewers: hindenburg, #konsole
Reviewed By: hindenburg, #konsole
Subscribers: #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D11246
Summary:
D10935 introduced KMessageWidgets in TerminalDisplay for the "resume"
and "read-only" messages. This patch restores the default close button
and makes use of animateShow/animateHide. A nice plus is that I also
removed some code which has become obsolete AND that the messages
are now animated.
{F5749781}
Test Plan:
Show/hide works like before.
Also still works if readonly and suspended at the same time.
Detaching works.
Reviewers: ach, #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, ach, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D11241
Summary:
Konsole sends up/down key press events for mouse scrolls for apps that
aren't interested in mouse events, such as less. Only do this when the
terminal is using the alternate screen.
Now scrolling up/down will be translated to up/down key presses only
when the terminal is using the alternate screen but scrolling in a terminal
using the primary screen will only scroll using the scrollbar, now it does
not cycle through the shell history.
Now the behavior matches xterm and and gnome-terminal.
BUG: 355106
FIXED-IN: 18.04
Reviewers: hindenburg
Reviewed By: hindenburg
Subscribers: rkflx, ngraham, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D11146
Summary:
As discussed with VDG, color the scrollbar with the same colors as
the terminal color scheme itself. It looks way cleaner and modern
Test Plan: tested with several color schemes and several styles
Reviewers: #konsole, #vdg, hindenburg
Reviewed By: #konsole, #vdg, hindenburg
Subscribers: hindenburg, zzag, ngraham
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D11184
It is unclear what causes the session to be invalid when detaching
tabs, but there are enough BRs with the same backtraces to confirm it.
For now, check to prevent crashes.
CCBUG: 390736
Summary:
Depends on D10862
Before:
{F5734372}
After:
{F5734369}
Read-only:
{F5734370}
Both:
{F5734371}
This also fixes the overlapped scrollbar (see first screenshot).
Test Plan: Tested before and after, behaviour is the same.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: herrold, hindenburg, ngraham
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D10935
Summary:
This patch adds a read-only option for TerminalDisplays. When active,
all keyboard events are eaten. Mouse input is not affected and works like before.
The setting is not persisted and only lasts for the duration of the session.
Screenshots:
{F5730786}
{F5730788}
{F5730789}
VDG input is highly appreciated. Also, I'm not sure if I can just change the rc-files without bumping the version?
FEATURE: 126930
Test Plan:
- Shortcuts still work
- Paste and drop actions are disabled when readonly
- Switching between read-only and normal tabs works as expected
- Mouse input works like before
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, ngraham, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D10862
Recent Qt5 versions use unnamed temporary files by default when
available; force to use named files. Any type of scroll/history
debugging w/o named files is a waste of time.
using okButton->setShortcut(Konsole::ACCEL | Qt::Key_Return); causes
the Alt+O to not work on the OK button. Both Ctrl+Return and Alt+O
now work to close the dialog.
BUG: 364716
FIXED-IN: 18.04
Summary:
schemes are supplied by `Konsole Color Scheme` category on store.kde.org
https://store.kde.org/p/1216368/
- new manager helpers to unload a theme and check a file's name validity
- new Get New.. button to start the KNS download dialog
- upon KNS completion we'll attempt to load all installed files as schemes
- for KNS entities which failed to load anything we'll show a warning as
the theme is malformed
- for removal we'll first try to remove schemes through KNS to avoid its
registry going out of sync with the on-disk "installedness" of an entity
- properly disable copying of the scheme manager (needs to be private)
FEATURE: 18.04.0
CHANGELOG: Support for downloading color schemes from the KDE store
Test Plan:
category is T8053 (can also use `KDE Color Scheme KDE4` for testing)
- get new -> install scheme -> close -> shows up in list
- remove from list -> get new -> not listed as installed
- install random stuff from kde color scheme category -> close ->
warning should be displayed
- install scheme -> get new -> remove scheme via dialog -> close ->
not listed as installed
Reviewers: hindenburg
Subscribers: #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D10766
Summary:
When a profile property is changed via the command line or an ESC sequence
a new temp profile is created and applied, this resets the zoom values in
the views connected to the session.
Save zoom font sizes and restore them after the new profile is applied.
BUG: 386643
FIXED-IN: 18.04
Reviewers: hindenburg
Reviewed By: hindenburg
Subscribers: ngraham, #konsole
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D10650
Summary:
Change the default keyboard translator to match xterm behaviour:
- Pressing Backspace without any modifiers sends '^?', ASCII DEL
character
- Pressing Control+Backspace sends '^H', BS character
BUG: 391075
Test Plan:
- Before applying the patch pressing Ctrl+V (to insert verbatim) then
Backspace, sends '^?'; the same happens with Ctrl+Backspace
- With the patch:
- pressing Ctrl+V then Backspace sends '^?'
- pressing Ctrl+V then Ctrl+Backspace sends '^H'
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: ngraham
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D10884