Commit Graph

125 Commits

Author SHA1 Message Date
Christoph Feck
4c4284f414 Disconnect timers early
When a TerminalDisplay is destroyed, the timers are still active
until they are deleted by QObject, so they could fire when anything
in the QWidget or QObject destructor processes events.

BUG: 208199

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1082643
2010-01-31 01:40:27 +00:00
Kurt Hindenburg
533599ab1e Don't copy an empty string to the clipboard. Ideally this should be handled by disable-ing the menu/shortcuts for Copy/Cut/Paste (Wish 203768).
BUG: 188725

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1076289
2010-01-17 22:59:59 +00:00
Christoph Feck
8d037b7673 Use sizeHint() instead of pixelMetric() to get scroll bar size
BUG: 194088

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1070887
2010-01-07 00:01:14 +00:00
Darío Andrés Rodríguez
b8a3bdd833 - Reduce the ammount of unused vars/parameters warnings
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1049628
2009-11-15 15:41:16 +00:00
Christoph Feck
568095c482 Fix scrollbar coloring when changing system colors
BUG: 170760

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1047721
2009-11-11 22:11:46 +00:00
Kurt Hindenburg
31aea137a8 Fix some build warning and a krazy issue.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1033923
2009-10-11 15:42:12 +00:00
Shawn Starr
6484ae926a CCMAIL:robertknight@gmail.com Make cursor blinking respect Qt cursor blink value. Leave text blinking to existing value
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1016562
2009-08-28 03:38:35 +00:00
Harald Fernengel
fd3ea74f5d optimization: One malloc+memcpy less when drawing a line
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=994710
2009-07-11 09:11:26 +00:00
Kurt Hindenburg
d4bb1e1a68 Correct spelling using US English.
SVN_SILENT

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=989146
2009-06-29 15:16:28 +00:00
Kurt Hindenburg
eb7b47c567 Correct underlining URLs when scrollbar is on the left.
BUG: 187555

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=965773
2009-05-09 18:42:05 +00:00
Kurt Hindenburg
0a6ef8e77f Fix issue where terminal text is locked at 0,0.
BUG: 163178

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=963912
2009-05-05 15:21:29 +00:00
Kurt Hindenburg
5d0b809e84 revert 930286
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=935429
2009-03-05 06:12:37 +00:00
Kurt Hindenburg
a0f187a785 Allow the disabling of blinking text.
BUG: 182414

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=932642
2009-02-27 05:47:30 +00:00
Kurt Hindenburg
0f99f532e6 Allow double-click selection to check for word boundaries.
BUG: 176273

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=930286
2009-02-22 23:24:16 +00:00
Wang Kai
b986ccbac4 BUG: 154689
use QRegion instead of QRect to represent each HotSpot's valid region 
when a link spans over multiple lines
calculate the unites of QRects as this HotSpot's region
so the link get underlined properly

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=906906
2009-01-07 02:45:46 +00:00
Rick Xing
773993a4e3 Just EBN fixes
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=894687
2008-12-09 06:59:31 +00:00
Frederik Schwarzer
ebbdfe6968 let me introduce: typo of the year "the the"
mostly seen as
"the the" -> "the"
"the the" -> "to the"
and in its best case
"a the the" -> "" :)

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=864814
2008-09-25 15:05:22 +00:00
Robert Knight
28b84379b2 Make the 'bold' property for each color entry in the current terminal palette a tri-state which allows text drawn in that color to be forced to bold, non-bold (normal) or to use the current formatting specified by the terminal application.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=863401
2008-09-22 01:44:06 +00:00
Robert Knight
3ba3ae8f20 Refactor TerminalDisplay::event(). Move shortcut handling code into handleShortcutOverrideEvent() method.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=863337
2008-09-21 21:05:35 +00:00
Robert Knight
7a63547cdf Tidy up SessionController::showDisplayContextMenu(). Remove unused parameters and unnecessary pointer checks.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=863331
2008-09-21 20:45:05 +00:00
Robert Knight
956277c014 Convert tabs to 4 spaces to match kdelibs conventions. Previously
there was a mix of tabs and spaces for indentation.

CCMAIL:Stefan.Becker@nokia.com


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=863326
2008-09-21 20:06:58 +00:00
Kurt Hindenburg
e07a268661 EBM krazy fixes; please double-check to avoid introducing problems.
CC: konsole-devel@kde.org

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=845404
2008-08-11 15:56:36 +00:00
Kurt Hindenburg
0c6c59aca7 ebn krazy fixes
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=845380
2008-08-11 15:14:21 +00:00
Laurent Montel
d31c37c404 guard #warning
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=843396
2008-08-07 06:57:13 +00:00
Robert Knight
243e5da7e4 ScreenWindow API doc updates.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=837724
2008-07-25 15:04:45 +00:00
Robert Knight
08fa3ef8f5 Fix scrolling corruption when scrollbar is placed on the left-side of the display.
Take into account the scrollbar position when computing the region of the 
display widget to do an optimised scroll on.

BUG: 162958


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=815891
2008-06-02 19:38:20 +00:00
Robert Knight
73f5324561 Do not show flow control warning widget if terminal application (eg. Emacs) disables
flow control.  Check current terminal flow control settings when Ctrl+S is pressed and only 
show the warning if the warning is enabled in profile settings and Xon/Xoff is 
enabled in the terminal.

BUG: 162173
CCMAIL: jriddell@ubuntu.com


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=808588
2008-05-16 23:59:16 +00:00
Dirk Mueller
54cee5ca30 allocate standard color table only once
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=808156
2008-05-15 20:12:26 +00:00
Rafał Miłecki
5aa053f08d Fix compilation warning: "suggest parentheses around && within ||"
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=802759
2008-04-30 14:06:06 +00:00
Robert Knight
5d9997446e Update copyright year to 2008. Remove '(C)' from copyright lines.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=800631
2008-04-24 14:53:43 +00:00
Robert Knight
7ab78f2c49 Remove the custom Alt+[Letter] handling from the terminal. Leave it up to the host to decide whether or not to override it.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=799802
2008-04-22 11:46:06 +00:00
Robert Knight
d4e2edeab2 Allow the terminal display's host to decide whether shortcut keypresses
which are also valid terminal key sequences should be overridden and sent
to the terminal instead.

Default behaviour in the standalone Konsole is never to override shortcuts.  Default
behaviour in the terminal part is to always override shortcuts.

Shortcuts which are not valid terminal key sequences (eg. because they have more than
two modifiers) are never overridden.

Add an overrideShortcut() signal to the Part to expose this functionality to clients.

CCMAIL: kde-core-devel@kde.org

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=799577
2008-04-21 22:06:12 +00:00
Robert Knight
e9fe2b1b11 Support drag-and-drop of tabs between windows and containers, with drop indicator
arrow and 'torn-off' tab while moving.

(Drag and drop between windows is supported only for windows within the same process,
which will be all windows opened from a GUI)

Some of this functionality could be moved to kdelibs / KTabBar for the benefit of other
applications.

BUG: 75653

Squashed commit of the following:

commit 1e5b628b74f4c7182b1aed159088f0d449bf6f1f
Author: Robert Knight <robertknight@gmail.com>
Date:   Tue Apr 15 11:32:04 2008 +0100

    Set drop indicator label to same size as pixmap.

commit 59ad9200465cfb76651ce81abd3ba20e2fdd3067
Author: Robert Knight <robertknight@gmail.com>
Date:   Tue Apr 15 11:14:41 2008 +0100

    Adjust drop indicator for north and south tabs.

commit 01ba5bca9457bc19156f5a87ad6967fac7cc3c1e
Author: Robert Knight <robertknight@gmail.com>
Date:   Tue Apr 15 11:06:52 2008 +0100

    Display a drop indicator arrow at the position where the tab will be dropped.

commit 137ade01d70d75d26f3c14624ec2c096c8c50eba
Author: Robert Knight <robertknight@gmail.com>
Date:   Tue Apr 15 10:01:28 2008 +0100

    Update detach view action state when moving tabs between windows.

commit 412c2d16844afda3f0427a5583d653c2214722fb
Author: Robert Knight <robertknight@gmail.com>
Date:   Tue Apr 15 09:56:37 2008 +0100

    Move mimetype definition to ViewProperties

commit dc31499351ef564cfe75c25124c3549b5dc75e16
Author: Robert Knight <robertknight@gmail.com>
Date:   Tue Apr 15 02:26:03 2008 +0100

    Hack around crash which can occur after a drag-and-drop tab move causes a view container to be destroyed, taking the QDrag object with it.  Fix this by setting the QDrag's parent object to 0 before calling removeView().  This leaks the QDrag however.

commit df057fd06988bcd2b4c0f21e1d746543e7cfe1c5
Author: Robert Knight <robertknight@gmail.com>
Date:   Tue Apr 15 02:24:21 2008 +0100

    Fix jumps based on uninitialized variables.

commit 864bfcc2e8c63e2c8a9b6e9c96bc4d90d3dacd7e
Author: Robert Knight <robertknight@gmail.com>
Date:   Tue Apr 15 00:20:12 2008 +0100

    Make the initiator of the tab drag event remove the view.  Change newViewRequest() -> moveViewRequest().  Do not delete the view if the tab is dropped onto another application which blindly accepts it.

commit b922858420d4b61ad2727c64bc885042280d65f4
Author: Robert Knight <robertknight@gmail.com>
Date:   Mon Apr 14 23:29:18 2008 +0100

    Add support for drag-and-drop moving of tabs between any two tab bars in the same process.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=797287
2008-04-15 10:37:55 +00:00
Diego Iastrubni
f04dccea56 Final touches to the BiDirection disabling patch as requested by Robert. I am still missing a global shortcut, and when I find how to code this properly I will commit
(lazy lazy...). 

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=795807
2008-04-11 13:36:39 +00:00
Robert Knight
f9139b741e Fix calculation of required display size given (lines,columns) in
TerminalDisplay widget.  Include width of vertical scrollbar (if visible)
and top/left margins.  Konsole will now start with a default width of 80 columns
on most systems if no window size has been saved in konsolerc

The initial size of Konsole is specified as 80x40 internally.  Qt constrains
the size of top-level windows on their first automatic resize to a
maximum of 2/3rds of the screen size (see QWidgetPrivate::adjustedSize()).
This means that the display might not get the 80x40 columns that it asks
for, depending on the desktop size.

CCBUG: 160422

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=793964
2008-04-05 19:16:42 +00:00
Robert Knight
25bdf5fca9 Fix terminal display jumping to bottom of screen when trying to scroll up with the scrollbar already at the top. Spotted by Matthew Woehlke.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=792354
2008-03-31 21:18:31 +00:00
Robert Knight
61d1e13da8 Fix consecutive non-word characters being treated as a single word.
TerminalDisplay::charClass() used to return one of three values to indicate whether
the input was a space, "word character" (letter, number or character from the wordCharacters() array)
or something else.  When double clicking a 'word' was taken to be a run of
characters which had the same charClass().  Fix this by returning the input character
in charClass() if it is not a space or word character.

CCBUG:155416

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=791732
2008-03-30 05:22:35 +00:00
Diego Iastrubni
60f0a0a59e New backport (??) from KDE3: now each profile can enable/disable BiDi rendering in the display. We need this since many console based application (vim, emacs, fribidi etc)
implement their own BiDi algorithm. There is also another reason: comatibility. All terminals are *not* aware of the BiDi issue and do not re-order the chars
(gnome-terminal, xterm, konsole, etc). It is possible to enable the BiDi rendering on each profile, so this is not a huge lost. I am still missing the keyboard shortcut to
quickly enable/disable it (alt+control+b in konsole3), but I am not sure what is the best way for doing it.

A quick note about the implementation:
In QPainter3, there was an option to draw a text and tell the painter "please do not implement BiDi". In QPainter4 (up to 4.4) there is no such option. I am forcing it by
drawing  "painter.drawText(rect,0,QChar(0x202D)+text)" (that is &LRO;), and it does seem to work, but I find it kinda "hackish". I will open a task in Trolltech and
request that new feature. Hopefully by Qt4.5/KDE4.2 I will be able to change the implementation.


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=791374
2008-03-29 10:35:29 +00:00
Robert Knight
3b552b6174 Add support for setting background and foreground colors of a session's displays
using the Xterm Operating System Controls escape sequences.

See the "Operating System Controls" section on this page:
http://rtfm.etla.org/xterm/ctlseq.html

Other colors and multiple color sequences are not supported.

xtermcontrol --fg=<color> --bg=<color> now work as expected.

In addition to standard color names ("green","blue","red") etc, Qt
also accepts SVG color names:

http://www.w3.org/TR/SVG/types.html#ColorKeywords

BUG: 155801

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=787355
2008-03-19 03:04:32 +00:00
Robert Knight
288ebd7770 Print a warning to the terminal if the display's font is set to a font which is not fixed-width.
CCBUG: 159037

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=787054
2008-03-18 15:16:16 +00:00
Robert Knight
cecafa0f51 Add test for null resize widget.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=787009
2008-03-18 13:19:58 +00:00
Robert Knight
1f5cb2b5a1 Hide terminal size label when scrolling display to prevent the label itself being scrolled.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=787008
2008-03-18 13:19:55 +00:00
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