Commit Graph

52 Commits

Author SHA1 Message Date
Jekyll Wu
9971d3d117 prefer using convenient method KStandardDirs::locate() . 2011-09-03 16:37:05 +08:00
Jaime Torres
f1ae6db882 return the rigth value for the rigth value
Use the right command value instead of a duplicated.
2011-08-31 19:20:48 +02:00
Kurt Hindenburg
9cf9557c8f Add shortcuts to jump to top & bottom of history.
The shortcut of jumping to top of history is for the request of #45950

The shortcut of jumping to bottom of history is added not only for
consistency, but also to be used for #38390, especially its comment #9
 and #10.

Patch by Jekyll Wu <adaptee@gmail.com>

FEATURE: 38390
FEATURE: 45950
FIXED-IN: 4.8
REVIEW: 102124
2011-08-01 23:19:08 -04:00
Kurt Hindenburg
19a60fc577 Use kWarnings for error messages
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1148435
2010-07-10 16:49:58 +00:00
Kurt Hindenburg
c4e62b067b Move the defaultTranslatorText to QByteArray and put it inside the .cpp file.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1108108
2010-03-27 20:41:17 +00:00
Friedrich W. H. Kossebau
1cf6ef9365 changed: made static const data symbols really static const
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1080302
2010-01-26 02:57:09 +00:00
Robert Knight
2780a44d4a Fix crash if key bindings specified in profile cannot be found. Improve
KeyboardTranslator::defaultTranslator() to try loading "default.keytab" if
first before falling back to the hard-coded one.

BUG:181205


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=913176
2009-01-18 21:30:24 +00:00
Albert Astals Cid
b3c542cf08 qDelete knows how to delete the values without creating a temporary list
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=890897
2008-11-30 16:08:47 +00:00
Robert Knight
91c507a816 Add support for 'AnyModifier' and 'AppCursorKeys' as alternative names for 'AnyMod' and 'AppCuKeys' flags in keyboard translator files.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=864900
2008-09-25 21:34:32 +00:00
Robert Knight
433f520781 Tidy up keyboard translator code.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=864317
2008-09-24 13:07:38 +00:00
Robert Knight
c705a18b27 Allow bindings for +-.* keys to be defined in keyboard translator file.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=864011
2008-09-23 18:24:05 +00:00
Robert Knight
e97de774be Add support for producing different output when keypad buttons are
pressed in Application or Normal mode (set using 'ESC =' and 'ESC >' escape sequences.)

Added support for 'AppKeypad' modifier in keyboard translator files to specify that the 
sequence only applies when the terminal is in application keypad mode (+AppKeyPad) or is 
not in application keypad mode (-AppKeyPad) 

Added support for producing different output from number keys along top of keyboard versus
keypad keys via new 'keypad' modifier in keyboard translator files (+KeyPad to require keypad 
key, -KeyPad to require a non-keypad key or left out to accept either)

CCBUG: 170220
CCBUG: 37652
CCBUG: 165169


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=863985
2008-09-23 17:12:37 +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
Robert Knight
cc78f9909b Better comment parsing in keyboard binding files.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=808721
2008-05-17 12:23:55 +00:00
Dirk Mueller
06785749a0 fix scanf format string warning
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=808158
2008-05-15 20:13:11 +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
Albert Astals Cid
f52cceaf9e remove duplicate includes
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=796409
2008-04-13 14:38:26 +00:00
Robert Knight
75ac16607a Replace qWarning() with kWarning(), which provides additional information about the context of the warnings.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=754559
2007-12-30 08:32:50 +00:00
Robert Knight
46cfc108d3 * Replace all usage of qDebug() with kDebug(), since kDebug() provides information about
which part of the code the message came from and allows filtering of output
  using kdebugdialog
* Remove explicit creation of singleton classes SessionManager,ColorSchemeManager and
  KeyboardTranslatorManager and automate it with K_GLOBAL_STATIC.
  This ensures that the singleton destructors are called appropriately by KPart clients
  when they unload the libkonsolepart library.


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=754334
2007-12-29 16:07:31 +00:00
Robert Knight
c0b14ce83e Add support for 'Erase' command in .keytab files which echos the OS/terminal type appropriate erase character to the terminal, previously always '\b' in Konsole.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=750287
2007-12-19 02:43:41 +00:00
Robert Knight
7b77ff1684 When checking for a match against an entry with the AnyModifier state, the keypad modifier is not counted.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=748997
2007-12-16 07:06:17 +00:00
Robert Knight
f93ae9c23a Add support for the keypad modifier in .keytab files. This makes it possible to produce different output for a key on the keypad and its semantic equivalent elsewhere on the keyboard. The modifier can be required or banned using 'key+keypad','key-keypad' etc. in the key bindings list, as with any other modifier.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=748996
2007-12-16 06:59:47 +00:00
Robert Knight
a140e9078f Fix Ctrl+Space key combination with default keytab: Fixed bug where unescaping the character sequences '\x0' or '\x00' from a .keytab entry failed because the result was '0', which was also the value used to mean that escaping the sequence failed. Use a separate boolean variable to track whether the escaping succeeds or not instead.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=748987
2007-12-16 05:00: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
Adriaan de Groot
8928e03af4 __FUNCTION__ is a gcc-ism
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=746921
2007-12-10 16:25:20 +00:00
Robert Knight
8171d4872f * Do not remove color schemes / key bindings from list if the
call to delete the file fails.
* Make deletion of color schemes, key bindings and profiles
  atomic operations from the point of view of outside classes.
* Fix various warning produced by the -Woverloaded-virtual flag.


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=746168
2007-12-08 01:51:37 +00:00
Robert Knight
9863b5508b Bug fixes for the Appearance and Key Bindings tabs in the
Edit Profile dialog:

* Fix selection of color schemes and key bindings not being
  remembered after the color scheme/key binding list is changed
  (eg. due to adding a new color scheme or editing an existing one).

  This also fixes the preview not being updated when mousing outside 
  the list after adding a new color scheme.

  -> After updates to the color scheme / key bindings list the model
     was being deleted and a new model was created.  This caused the
     selection model to be changed without the signal-slot connections
     from the selection model to the dialog being re-established.

     This commit changes that so that the model is not replaced but
     simply cleared when the color scheme / key binding list is updated.

* Disable the Edit, Remove buttons on the Appearance and 
  Key Bindings tabs when there is no selection.
* Fix crash when clicking 'New' button on the Appearance tab
  if the color scheme list is empty.
* Fix crash when loading the Appearance tab if the color scheme
  associated with the profile does not exist
* Fix crash when loading the Key Bindings tab if the key binding
  associated with the profile does not exist
* Fix crash when attempting to load a color scheme with no name, 
  instead the color scheme is simply not loaded.
* Fix all colors except one being set to black when making changes 
  to a color scheme which was based on the default fallback color scheme.

  -> When creating a new array inside the ColorScheme class to hold color
     entries, initialize its elements with values from the default color
     array.

* Use qWarning() instead of qDebug() to print out error message if attempting
  to delete a color scheme fails.

* Minor formatting changes in Session.cpp,SessionController.h


Known bugs introduced by this commit:
    
* Attempting to create a new keyboard translator when no existing translator
  is selected will crash because KeyboardTranslator::defaultTranslator() has
  not been implemented yet.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=746071
2007-12-07 18:42:36 +00:00
Robert Knight
645d82ec1e Fix character sequences produced by <Ctrl/Alt/Ctrl+Alt> + <Left Arrow/Right Arrow> key inputs. Implement support for wild card '*' characters in the result string for keyboard translator entries.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=743477
2007-12-01 03:25:14 +00:00
Robert Knight
42dce0374c Changes:
* Add a passive warning widget which is displayed when a color scheme is selected which 
  uses transparency but the system does not support transparency 
* Always show the vertical scroll bar in the color scheme list
* Remove quotes around links and email addresses in mouse-over tooltip

Bug Fixes:

* Fix a few odd behaviours with the live color scheme preview
* Fix the 'Show in Menu' status of newly added profiles not being
  saved when Konsole exits.

  ( Update Profile's path property when saving the profile to 
    a new location )


Internal: 

* Removed many debugging statements and dead / commented out code
* Fix several unused parameter warnings
* API documentation corrections in Emulation class

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=706986
2007-08-31 17:56:35 +00:00
Arto Hytönen
d0e0ca3c4f this should clean-up kdebase of all of overkills of krazy:exclude of QString::null lines.
as long as C++ std clause 6.8 states (if I get it right), the diff should be OK, still can only compile with gcc-4.2...

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=701136
2007-08-17 12:14:28 +00:00
Arto Hytönen
7021299cfb further elimination/cancellation of QString::null.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=700742
2007-08-16 10:44:18 +00:00
Robert Knight
503fdd023e Fix several memory leaks and uninitialized variables found with valgrind.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=696508
2007-08-05 05:53:05 +00:00
Robert Knight
1c370c2d6c Simplify changing the current color scheme and current key bindings in the profile editor. There is no longer a distinction between the color scheme selected for removal/editing and the color scheme selected for use by the profile. Also select the current color scheme, current key binding when the relevant pages of the profile editor are shown.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=686299
2007-07-11 00:49:21 +00:00
Robert Knight
8ac498d34c i18n fixes from Stefan Asserhall.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=685630
2007-07-09 10:54:44 +00:00
Robert Knight
72241ef4a6 * Comment out many debugging messages
* Experimental optimization, disable kerning since this is not required
  with the mono-spaced fonts which are used in the terminal.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=682702
2007-07-03 09:14:21 +00:00
Robert Knight
4a35037a25 Use type-safe QFlags for State and Command enums and Qt::KeyboardModifiers instead of Qt::KeyboardModifier where appropriate.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=680117
2007-06-25 13:10:49 +00:00
Robert Knight
bb696c3cbf Allow removal of existing entries and adding of new entries in the key binding editor. Fix binding table referring to old entries when making changes.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=677166
2007-06-18 15:37:56 +00:00
Robert Knight
c2412a1c12 Do not allow duplicates when searching for translators. Return null if a translator cannot be loaded, instead of returning an empty translator.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=677134
2007-06-18 14:25:01 +00:00
Robert Knight
ffda8d3ccc Implement saving of key binding changes. Adapt Pty changes to use Konsole's more verbose variable naming style.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=676902
2007-06-17 22:05:45 +00:00
Robert Knight
b2ff3cd0dc Fix escaping of character sequences in key binding entry. (Arguments to QByteArray was wrong way round and off-by-one error in loop)
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=676788
2007-06-17 17:59:34 +00:00
Robert Knight
d3a6171501 Correct capitalization of LineFont file name. Move default.keytab header to /old as it is no longer used. Remove MakeDefaults as it is no longer used. Start of code to escape key binding output for use in key binding editor.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=676647
2007-06-17 10:54:04 +00:00
Robert Knight
5872b79ef1 Replace old key translator with new key translator. Lightly tested. Fix some bugs in the new translator's decoding.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=676512
2007-06-17 01:01:53 +00:00
Robert Knight
140b672865 Make key binding test area work. Fix copying of KeyboardTranslator instances.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=676300
2007-06-16 15:34:47 +00:00
Robert Knight
431ba05b1f Add facility to translate a key binding entry's result back to a string and use it in the key binding editor.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=676126
2007-06-16 04:52:16 +00:00
Robert Knight
1f8e6395f2 Handle the 'Any Modifier' state flag in keytab files.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=676123
2007-06-16 04:44:39 +00:00
Robert Knight
df184a19ae Code to translate new key translator entry into a string for use in the key bindings editor.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=676121
2007-06-16 04:24:56 +00:00
Robert Knight
e938b1f864 Work in progress on new keyboard translator. Support cases where a modifier or state is not wanted. Don't try to use QKeySequence to do all the translation, only use it to get the key code. Untested implementation of KeyboardTranslator::Entry::matches()
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=676118
2007-06-16 03:57:18 +00:00
Dirk Mueller
9ea3227384 include cleanup
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=663054
2007-05-09 22:23:52 +00:00
Robert Knight
33c913383d EBN fixes. Mostly copyright and implementations including their own headers first.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=662726
2007-05-09 00:01:01 +00:00
Robert Knight
63bc8dcf3d Fix unpreview on exit. Attempt #2. Remove properties from the 'to unpreview' list when saving changes.
svn path=/branches/work/konsole-split-view/; revision=661585
2007-05-06 00:38:14 +00:00