1. 08 Apr, 2018 2 commits
    • Martin Tobias Holmedahl Sandsmark's avatar
      Convert & to & for HTML decoder · cd67c348
      Martin Tobias Holmedahl Sandsmark authored
      Differential Revision: https://phabricator.kde.org/D11956
      
      (cherry picked from commit d93aba54)
      cd67c348
    • Mariusz Glebocki's avatar
      Do not resize new screen lines · b7f40e0f
      Mariusz Glebocki authored
      Summary:
      The lines are resized when something is put in them. Resizing them
      here filled them with spaces (default value), later those trailing
      spaces were put into history, and eventually into saved output or
      clipboard (because it is assumed lines in history do not contain
      trailing spaces).
      
      BUG: 392419
      
      Test Plan:
      * Enable "Trim trailing spaces" in Profile Settings → Mouse
      * Set window size to about 100x100px
      * Clear terminal (Ctrl-Shift-K by default)
      * Run:
      ```
      seq $(( $(tput lines) * 2 )); \
      printf '*** resize ***'; read -s; printf '\n'; \
      seq $(( $(tput lines) * 2 ))
      ```
      * When "resize" show up, resize the window to about 500x500px
      * Press enter
      * Select and copy lines below `*** resize ***`
      * Paste it in a text editor which allows to show trailing spaces
      
      Expected result: lines should not contain trailing spaces
      Actual result: lines added when resizing the window have trailing spaces
      
      Reviewers: #konsole, hindenburg
      
      Reviewed By: #konsole, hindenburg
      
      Subscribers: #konsole
      
      Tags: #konsole
      
      Differential Revision: https://phabricator.kde.org/D11893
      
      (cherry picked from commit 61069543)
      b7f40e0f
  2. 02 Apr, 2018 2 commits
    • Christoph Feck's avatar
    • Mariusz Glebocki's avatar
      Properly handle mouse in read-only mode · 52f1c015
      Mariusz Glebocki authored
      Summary:
      * Do not send mouse events and emulated up/down keys to programs when
         read-only mode is enabled.
      * Set the currentTerminalDisplay before sending key events, like in
         keyPressEvent.
      * wheelEvent code is restructured a bit to easily separate code not
         allowed in read-only mode.
      
      Test Plan:
      * Start Konsole
      * Run `man man`, do not press any key after enter
      * Turn on read only mode
      * Try to scroll using mouse wheel.
      * Expected result: scrolling does not work in read-only mode
      * Actual result: scrolling works in read only mode (but only when no key
         has been pressed before on 2nd terminal screen)
      
      * Start konsole
      * Run a program which uses mouse events, e.g. `vim`
         (enable mouse with `:set mouse=a`)
      * Make the program state suitable for using mouse events, e.g. enter a few
         lines of text
      * Confirm that mouse events (clicks, selection, wheel) work in the program
      * Turn on read-only mode
      * Try:
        * Click (left/right/middle button), double click
        * Mouse wheel
        * Click and move (selecting)
      * Expected result: mouse events are not passed to the program in read-only
         mode; nothing happens
      * Actual result: mouse events are passed to the program
      
      Reviewers: #konsole, hindenburg
      
      Reviewed By: #konsole, hindenburg
      
      Subscribers: hindenburg, #konsole
      
      Tags: #konsole
      
      Differential Revision: https://phabricator.kde.org/D11763
      
      (cherry picked from commit 0ca1391c)
      52f1c015
  3. 01 Apr, 2018 2 commits
  4. 31 Mar, 2018 2 commits
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · 2e038bc4
      Script Kiddy authored
      In case of conflict in i18n, keep the version of the branch "ours"
      To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
      2e038bc4
    • Ahmad Samir's avatar
      Fix crash when using resetColorScheme() · 4d00e0d9
      Ahmad Samir authored
      Summary:
      After the KNewStuff changes that were added to
      EditProfileDialog::removeColorScheme(), now when
      resetColorScheme() calls removeColorScheme() Konsole crashes.
      Change resetColorScheme() to call ColorSchemeManager::deleteColorScheme()
      directly; this is more logical since there's no need to delete the row
      from the color schemes list as reseting the color scheme just deletes
      the relevant color scheme from the user's home dir and "re-adds" the
      original one from the system-wide location.
      
      Reviewers: #konsole, hindenburg
      
      Reviewed By: #konsole, hindenburg
      
      Subscribers: #konsole
      
      Tags: #konsole
      
      Differential Revision: https://phabricator.kde.org/D11821
      
      (cherry picked from commit 914d12a0)
      4d00e0d9
  5. 30 Mar, 2018 1 commit
  6. 28 Mar, 2018 4 commits
    • Mariusz Glebocki's avatar
      Process key event even without active TerminalDisplay · 594368b5
      Mariusz Glebocki authored
      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
      
      (cherry picked from commit c0a46e2b)
      594368b5
    • Kurt Hindenburg's avatar
      add check for valid screen; fixes test · 521592c4
      Kurt Hindenburg authored
      (cherry picked from commit 98b05633)
      521592c4
    • Mariusz Glebocki's avatar
      Allow view-controlling keys in read-only mode · d6e7512b
      Mariusz Glebocki authored
      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
      
      (cherry picked from commit 2e086c85)
      d6e7512b
    • Kurt Hindenburg's avatar
      initialize _currentTerminalDisplay · 7cf147d2
      Kurt Hindenburg authored
      (cherry picked from commit 474db53f)
      7cf147d2
  7. 27 Mar, 2018 1 commit
  8. 25 Mar, 2018 6 commits
    • Kurt Hindenburg's avatar
      Mostly revert of "Allow view-controlling keys in read-only mode" · 9fdff87b
      Kurt Hindenburg authored
      I should have just reverted the entire commit.
      
      (cherry picked from commit 4c68ff3f)
      9fdff87b
    • Kurt Hindenburg's avatar
      Partial revert of "Allow view-controlling keys in read-only mode" · 7f2af0da
      Kurt Hindenburg authored
      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.
      
      (cherry picked from commit 1f2128ea)
      7f2af0da
    • Mariusz Glebocki's avatar
      Allow view-controlling keys in read-only mode · b94162c1
      Mariusz Glebocki authored
      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
      
      (cherry picked from commit 6635190c)
      b94162c1
    • Ahmad Samir's avatar
      Make the key binding editor dialog bigger · fefd2e56
      Ahmad Samir authored
      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
      
      (cherry picked from commit bd560c56)
      fefd2e56
    • Kurt Hindenburg's avatar
      fix spelling issue · 3b79409e
      Kurt Hindenburg authored
      (cherry picked from commit da9e86e3)
      3b79409e
    • Joshua Noack's avatar
      Disable menu actions when read-only/locked · 429ad275
      Joshua Noack authored
      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
      
      (cherry picked from commit 3a1d350b)
      429ad275
  9. 19 Mar, 2018 1 commit
  10. 17 Mar, 2018 1 commit
    • Mariusz Glebocki's avatar
      Fix search result rectangle position · 6b8cf60a
      Mariusz Glebocki authored
      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
      6b8cf60a
  11. 16 Mar, 2018 2 commits
    • Kurt Hindenburg's avatar
      fix argument names to match declarations · a9aad431
      Kurt Hindenburg authored
      a9aad431
    • Ahmad Samir's avatar
      Preserve tab titles set by the user, when applying profile changes · 78beb596
      Ahmad Samir authored
      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
      78beb596
  12. 15 Mar, 2018 1 commit
  13. 14 Mar, 2018 1 commit
    • Kai Uwe Broulik's avatar
      Default to show tab bar only when needed · 7f8baec6
      Kai Uwe Broulik authored
      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
      7f8baec6
  14. 13 Mar, 2018 2 commits
  15. 12 Mar, 2018 5 commits
  16. 11 Mar, 2018 5 commits
  17. 10 Mar, 2018 2 commits