Commit Graph

83 Commits

Author SHA1 Message Date
Robert Knight
480c556a78 If the terminal application is not interested in mouse events and the display's scroll bar is not movable then send Up/Down key press events to the terminal instead.
This makes it possible to scroll up and down in 'less' and other applications using the mouse wheel.  One key press is sent for every 5 degrees of mouse wheel rotation.  Typical mouse wheels operate in steps of 15 degrees which equals 3 lines scrolled per notch.  This default is the same as Vim's default mouse wheel scroll step.

As in gnome-terminal and others, this has side effects such as the mouse wheel scrolling through history results in the shell if the shell is run in a program such as screen.

BUG: 159340

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=786780
2008-03-17 22:21:34 +00:00
Robert Knight
05fdc15109 Re-enable scrolling optimisation with tweaks to get Qt to issue a repaint request for the correct
area of the terminal display widget after the content is scrolled with QWidget::scroll() :

- Set the left edge of the scrolled rect to 0 (instead of the left margin used when
drawing the text)
- Set the right edge of the scrolled rect to width() - width of scroll bar - 1.  If the
right edge of the scrolled rect touches the scroll bar then a full repaint of the widget
is triggered.

These changes are based on experimentation.  I haven't had time to look into Qt to
find out exactly what changed between Qt 4.3 and 4.4.

Update comments to reflect changes and add a mention of Qt's QT_FLUSH_PAINT repaint
monitoring facility.

CCBUG: 158523

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=783788
2008-03-09 15:28:19 +00:00
Robert Knight
732d110380 Revert unintentionally committed debugging changes to TerminalDisplay.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=781015
2008-03-01 21:12:32 +00:00
Robert Knight
08ec730013 Reduce code duplication. Change Profile::property(property).value<T>() to Profile::property<T>(), introduce helper ShouldApplyProperty class to simplify SessionManager::applyProfile()
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=781009
2008-03-01 20:43:07 +00:00
Robert Knight
a610417b61 Temporary fix for scrolling problems when scroll bar is hidden. Disable scrolling optimisation.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=780582
2008-02-29 14:00:55 +00:00
Bill Egert
8bf323e09b No longer use Obsolete Members for QPainter.
drawRoundRect() => drawRoundedRect()  (This function was introduced in Qt 4.4)
matrix() => worldTransform() 
setMatrix() => setWorldTransform()

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=776270
2008-02-17 18:36:37 +00:00
Robert Knight
94eaaa02da Force left to right layout in the terminal display widget. Otherwise Konsole is unusable on RTL desktops.
BUG: 156654


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=766383
2008-01-25 18:07:59 +00:00
Robert Knight
be1acb058d Fix redraw of cursor when terminal display loses and then regains focus with cursor blinking disabled.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=765974
2008-01-25 00:06:29 +00:00
İsmail Dönmez
342e9a35c6 add missing break
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=764527
2008-01-22 00:10:29 +00:00
Robert Knight
30cf067d34 Scroll the terminal display continually when the mouse is held down and then moved outside of the display, rather than requiring continual mouse movement to scroll. Make the scrolling rate proportional to the distance between the edge of the display and the mouse position. Currently suffers from quite noticable flicker when scrolling quickly through a large scrollback buffer because the display is scrolled and repainted before the selection is extended. Stop the cursor from blinking and text from blinking when the display loses focus and restart blinking when the cursor regains focus. Ensure that the cursor is visible in a hollowed-out style when the display does not have focus.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=762055
2008-01-16 00:19:04 +00:00
Robert Knight
1b87d798ab Only show resize notification if the widget is visible when the resizing happens.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=761078
2008-01-14 01:35:05 +00:00
Robert Knight
0e206c9fb9 Show terminal size on resize. Change default bell mode to 'System Notification' so that 'Configure Notifications' works.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=760957
2008-01-13 19:41:22 +00:00
Robert Knight
a86a12c671 Use the normal text color for the Flow Control warning widget. Neutral text on neutral background is not readable.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=760828
2008-01-13 14:18:52 +00:00
Robert Knight
5e52b2c098 Wikipedia article has moved. Update link.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=760460
2008-01-12 17:47:35 +00:00
Robert Knight
5489be9eb5 Fix non-fatal out-of-bounds array access.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=759949
2008-01-11 15:12:21 +00:00
Robert Knight
8ec5cfbdc8 Fix potential crashes if a TerminalDisplay does not have a ScreenWindow.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=758967
2008-01-09 18:16:13 +00:00
Robert Knight
eb3bf43968 Optimize updates when changing the search text or scrolling with the search bar active. Compute the area covered by hotspots before and after the filter processing and then update the union of those two regions.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=756109
2008-01-02 19:27:44 +00:00
Robert Knight
7fe743af04 Add comments to explain one of the changes in the previous commit. Add a TODO for a warning dialog to add about deleting profiles with children when the string freeze is over.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=756105
2008-01-02 19:06:10 +00:00
Robert Knight
2a090c41f4 Fix bug where search result highlights in the terminal display did not move when the display was scrolled. When the search bar is active, update the filters and the view whenever it is scrolled or the output otherwise changes. This has a perceptible (but in future fixable) performance impact when scrolling with the search bar active.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=756104
2008-01-02 19:01:55 +00:00
Robert Knight
2a1ca1d303 Fix bug where bold fonts applied to the terminal were drawn as regular fonts. Take the TerminalDisplay widget's font weight and underline state into consideration when deciding whether to render a particular piece of text as bold or underline.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=755882
2008-01-02 09:53:12 +00:00
Robert Knight
c708aff22c Fix the long standing limitation where multiple views on the same terminal session had to be the same size - the size of the smallest view. This means that it is now possible, for example, to have a large view on a session for browsing and examining output and a smaller view on the same session for input. The underlying terminal does not support the concept of multiple windows, so the size reported to terminal applications is still that of the smallest view. Full-screen applications such as vim and emacs will therefore be the size of the smallest view on all views.
* Add a method in ScreenWindow to set the size of the window (in lines, the number of columns is still ifxed).  
* Call this method in TerminalDisplay to set the window size when the widget is resized or when the screen window of a display is initially set.
* Fix ScreenWindow::getImage() and ScreenWindow::getLineProperties() so that they do not attempt to retrieve information about lines beyond the end of the screen.
* Fix ScreenWindow::getLineProperties() to always return result vector of size windowColumns(), though the number of elements copied from the screen may be less.


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=749874
2007-12-18 04:32:05 +00:00
Robert Knight
ada0d91b82 * Avoid allocating a new buffer to hold character data on every screen update.
Instead a single buffer is created and maintained by ScreenWindow.
* Re-write Screen::getCookedImage() and rename to getImage() to make it possible
  to retrieve an image of a section of the screen which is not the same size as
  the terminal screen.
* Make various non-mutating Screen methods const


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=749864
2007-12-18 03:25:22 +00:00
Robert Knight
684b40c6dd Change default shortcut for decreasing text size to Ctrl+-. This is in line with other applications and fixed the problem of a clash with the Undo action in emacs. Discussed with dfaure back in October but not implemented until now. Remove the code which prevents Ctrl+[Printable character] shortcuts from working.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=748984
2007-12-16 04:41:48 +00:00
Robert Knight
4b29319792 Change default triple click behaviour to select the whole line, rather than just that forwards of the cursor. This is in line with KDE 3. Replaced the API which controls this behaviour in the TerminalDisplay class with a clearer one.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=748979
2007-12-16 03:55:21 +00:00
Robert Knight
e37fe69431 * Fix problem where selection background and other text with non-standard background
colors was not readable with terminal display transparency enabled.

* Transparency works again, but requires --enable-transparency argument passed to command-line
  due to artifacts that appear otherwise.
  Re-enable the code which searches for a suitable display, visual and colormap when
  starting the application in an environment which supports compositing.  Still
  need to resolve with other developers exactly how this will be done in KDE 4.0

* Fix problem where flow control warning banner was always displayed when 
  Ctrl+S, Ctrl+Q were pressed, regardless of whether flow control was 
  actually enabled.

* Fix artifacts when scrolling whilst the flow control warning banner was 
  visible.  Scrolling optimisations in the terminal display are disabled whilst
  the warning banner is being shown.

* Fix links which wrapped over more than one line being cut-off at the end of the line
  (eg. when parsing "http://www.kd <END OF LINE> e.org" the link address would be reported
   as "http://www.kd" instead of "http://www.kde.org").  The link underlining is not yet 
   corrected, only the part of the link on the first line is highlighted.  

* Implement code to load and use a built-in keyboard translator for fallback purposes
  in case no .keytab files exist.  The actual translator text (in DefaultTranslatorText.h)
  is currently incomplete. 

* Replace hard-coded colors for flow control warning label with colors from
  KColorScheme

* Replace hard-coded colors in incremental search line edit when a match is not found
  with colors from KColorScheme

* Remove un-used variables in TerminalDisplay class, rename enums to match
  CamelCase naming style used elsewhere.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=748936
2007-12-15 23:07:20 +00:00
Robert Knight
ba2b7c6a39 Check to prevent possible out-of-bounds array access.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=746132
2007-12-07 23:40:17 +00:00
Robert Knight
08db4867f2 Show normal context menu actions in addition to content-specific ones (eg. 'Open Link', 'Copy Email Address') when right clicking on links.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=744499
2007-12-03 20:22:46 +00:00
Robert Knight
a7c4135b80 Change base class of TerminalDisplay from QFrame to QWidget, since QFrame's features are no longer used.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=743491
2007-12-01 06:58:16 +00:00
Peter Penz
944bed9354 fixed crash when opening the Terminal embedded inside Dolphin
BUG: 153098

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=743223
2007-11-30 06:29:59 +00:00
Robert Knight
4ee7e302f9 Fix left edge of display being filled with the scrollbar's background color if the scrollbar is hidden.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=742434
2007-11-28 00:38:18 +00:00
Robert Knight
2809fc00c9 Remove tooltips for links which are now incorrect. Avoid un-setting the cursor when moving away from a link now that we no longer set the cursor to a pointing hand when moving over it.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=741931
2007-11-26 19:07:07 +00:00
Robert Knight
17202a040f Remove feature that opened the web browser or email client when left-clicking on appropriate URLs because several users found it annoying. Links are still highlighted on mouse-over and can be opened by right-clicking on the link and selecting 'Open Link' or 'Send Email To...' as appropriate.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=741928
2007-11-26 19:00:18 +00:00
Robert Knight
3bdcbb4496 * Fix bug where last column in a line could not be selected if it
was the last line in the selection.
* Do not attempt to reposition the mouse cursor when it moves outside
  of the terminal display area.  This happens in Konsole/KDE 3 as well,
  I had never noticed it before though.
* Remove debugging code


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=740704
2007-11-23 23:08:39 +00:00
Robert Knight
6b56d35484 Fix bug where new lines were being inserted into the selection and copied text. I misunderstood the meaning of the preserveLineBreaks argument passed from the terminal display to the terminal screen when rewriting the terminal characters -> text conversion code. Also removed dead code.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=740173
2007-11-22 18:36:42 +00:00
Robert Knight
e98a26e1f2 Fill the background of the terminal display area behind the scroll-bar using the background color from the scroll-bar's palette. This gives the illusion of the scroll bar being outside the contents area as per other KDE applications and is required for a better looking scrollbar with the Oxygen widget style. CCMAIL:cbr@boemann.dk
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=740161
2007-11-22 17:48:44 +00:00
Andreas Pakulat
f412e5b5aa Merge the KConfig branch. This are the 3 main modules (+kdeadmin), which are
needed now because friday is the last BC day. The rest of the modules will
follow as fast as my laptop allows.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=721704
2007-10-05 22:21:25 +00:00
Robert Knight
7870ea1ea3 Use string_width() to calculate the number of columns needed to draw the preedit text, which != the number of characters in the string.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=714942
2007-09-21 00:21:34 +00:00
Robert Knight
bd8e23ca99 Fix crash when changing between profiles that have different scrollbar visibility settings. TerminalDisplay::updateSize() was being re-entered when the scrollbar was shown or hidden causing a double-deletion.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=710351
2007-09-09 18:09:07 +00:00
Robert Knight
f93d2ea70d Fix another possible index-out-of-bounds when inserting characters. Fix terminal display image buffer overflow when rendering double-height lines.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=709594
2007-09-07 21:50:13 +00:00
Robert Knight
546bf76e48 Return the current line as the 'surrounding text' for input method queries and return the column index of the cursor as the cursor position. Fix link underlines not being erased when moving mouse around links which are adjacent to each other.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=709087
2007-09-06 14:40:16 +00:00
Robert Knight
ee11f41719 Remove the last of the printing code given that Konsole no longer has direct printing support. The web page export facility can be used instead.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=708827
2007-09-05 19:25:16 +00:00
Robert Knight
6db288b385 Fix characters in first column not being updated correctly.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=708378
2007-09-04 17:37:44 +00:00
Robert Knight
55c2c6a3c0 Begin implementation of input method event support. Remove key space to the right of the 'Remove' button in the key binding editor dialog.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=708351
2007-09-04 15:53:33 +00:00
Robert Knight
765fbddbf8 Simplify drag-and-drop of URLs. Remove the popup menu as per BUG:66479 . Also correct the quoting logic to apply regardless of the number of urls.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=707519
2007-09-02 03:49:17 +00:00
Robert Knight
a83983e598 Fix jumping to end of output if new output appears while keyboard scrolling keys are being used. BUG:148505
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=696958
2007-08-06 11:51:34 +00:00
Laurent Montel
53fc966203 Adapt to new KWarning/kFatal/kDebug api
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=695870
2007-08-03 06:40:12 +00:00
Robert Knight
bf308e3216 Fix color of cursor when using cursor shapes other than Block.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=692321
2007-07-25 10:49:40 +00:00
Robert Knight
760d863508 Remove a few unused methods and member variables, more Qt-ish API and naming. Prepend 'virtual' to declarations of re-implementations of virtual methods.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=691162
2007-07-23 03:02:58 +00:00
Robert Knight
35a7a587c8 Possibly controversial. Disabled F1 shortcut for handbook in Konsole because it interferes with terminal programs which need this key. Will review following beta feedback. Remove un-used includes and re-enable DBus adaptor for Session.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=690414
2007-07-21 00:11:09 +00:00
Fredrik Höglund
d330d07e64 Fix a palette issue with the scrollbar.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=683973
2007-07-05 19:23:15 +00:00