Commit Graph

121 Commits

Author SHA1 Message Date
Kurt Hindenburg
6e2d3f4e7e Validate initial working directory Profile entry
Verify the Profile's initial working directory exists and is a dir

This applies to KonsolePart as well as Konsole
2016-10-08 16:32:01 -04:00
Kurt Hindenburg
272c8f7fd8 Q_OS_MAC -> Q_OS_OSX
Q_OS_MAC includes OSX and iOS

Patch from rjvbertin gmail com
2016-07-07 15:53:57 -04:00
Martin T. H. Sandsmark
bb6abc0bc8 Implement support for getting the current URL from OSC 7
Implements support for the OSC 7 "standard" for tracking open
directories in the terminal (e. g. for bookmarks).

From the bug report, this is apparently what the osx terminal, iterm and
gnome terminal uses to keep track of stuff. I kept the existing tracking
as a fallback.

REVIEW: 128351
BUG: 336618
2016-07-06 20:30:44 +02:00
Kurt Hindenburg
efca9088a3 Fix previous commits changing some \r to \n
f016a0f874 incorrectly changed all
sendTextToTerminal to send an \n - some previously had \r
2016-06-04 17:05:53 -04:00
Kurt Hindenburg
1cb76ffcbf minor doc/API fix 2016-05-30 20:07:28 -04:00
Kurt Hindenburg
41fc3c35ec Show note about and allow removing sendText/runCommand from D-Bus
There are some security concerns about allowing sendText and runCommand
to be on the public D-Bus.  Now, once upon a Konsole startup, a
notification will popup noting this concern when either of these two
methods are called.  There is a cmake definition that will remove
these methods from the public D-Bus.

Discussion on the KDE security mailing list.
2016-05-28 14:07:44 -04:00
Kurt Hindenburg
f016a0f874 Create new internal session->sendText() replacement method
Standardize all the internal Konsole sendText() calls into a new one.
In preparation for upcoming qdbus sendText changes.
2016-05-28 08:11:36 -04:00
Kurt Hindenburg
e91c8d7768 Fix a few krazy/api issues 2016-05-26 21:47:13 -04:00
Kurt Hindenburg
9076c3af47 Implement xterm's background color request/reply
vim uses control sequence 'echo -e "\033]11;?\a"' to request real
background color -- to detect whether terminal has dark or light
background.

Thanks to Pavel Raiskup praiskup redhat com
REVIEW: 125333
BUG: 352945
FIXED-IN: 15.12
2015-10-03 15:26:58 -04:00
Kurt Hindenburg
90dfa7240a Add const & 2015-09-18 09:10:07 -04:00
Kurt Hindenburg
e2a0701587 Signal currentDirectoryChanged only check session's background process.
Do not check foreground process to determine if current directory has
changed.  Fixes nasty bugs such as 'man ls' changes to man folder.

This changes the BIC so the patch is different than the one committed
in KDE 4.14.x

Thanks to Arjun AK arjunak234 gmail com

.REVIEW: 120763
.BUG: 305085
.FIXED-IN: 14.12

(cherry picked from commit f269c1ad59)
2014-11-01 13:52:22 -04:00
Montel Laurent
6c747d97d6 kdelibs4support-- 2014-10-17 23:31:29 +02:00
Kurt Hindenburg
cb1f25d950 Add Enum to handle meta keys on Mac OS
Part of the rb 120323

René J.V. Bertin rjvberti @gmai .com

(cherry picked from commit b2cf60009e)
2014-10-06 10:14:47 -04:00
Kurt Hindenburg
b6304bcc59 Port KUrl to QUrl
Thanks to Michal Humpula michal humpula hudrydum cz

REVIEW: 120430
2014-10-04 11:41:50 -04:00
Alex Richardson
a3ce74d4eb Convert to Qt5 signal slot syntax
REVIEW: 117482
2014-04-30 19:16:54 +02:00
Kurt Hindenburg
3f26009403 remove unused variable (Session's bool _masterMode) 2013-03-26 11:21:31 -04:00
Kurt Hindenburg
7a2a5beb00 Correct spelling errors/word usage
All these are in the comments - no code changes
2013-01-09 22:07:11 -05:00
Jekyll Wu
131091c983 Adjust including form for some Qt headers as preparation for Qt5
So if someone notices later some Qt header is included in the form
of "#include <Class>" instead of the more common form of "#include
<Module/Class>", do not rush changing it.

REVIEW: 105819
2012-08-14 17:32:06 +08:00
Kurt Hindenburg
a4b08ea190 Add the "Send Signals" menus from KDE 3.5
This reintroduces the "Send Signals" from KDE 3.5.
SIGSTOP/CONT/HUP/INT/TERM/KILL/USR1/USR2

Patch by Kasper Laudrup  laudrup@stacktrace.dk

FIXED-IN: 4.10
FEATURE: 214908
2012-08-04 18:05:09 -04:00
Jekyll Wu
d8647e1b7f Add accessing method autoClose() for completeness 2012-05-20 16:25:06 +08:00
Kurt Hindenburg
3d06b44fc7 minor style fixes - remove empty lines start/end code blocks 2012-05-13 10:52:28 -04:00
Jekyll Wu
3c958a2c97 Rename and remove the no longer needed signal relayer 2012-04-21 11:41:31 +08:00
Jekyll Wu
8ba1e6185a Declare Session::checkProgram() as static method 2012-04-21 11:14:15 +08:00
Jekyll Wu
b7fc365804 Just rename for consistency and readability 2012-04-21 10:27:59 +08:00
Jekyll Wu
00fd222baa Remove one unused signal 2012-04-21 09:42:45 +08:00
Jekyll Wu
50668d65b0 Set the initial/preferred terminal size accroding to profile options
The old code always set the hardcoded 80x40 size.

Two profile options are added under the "General" group:

  * TerminalColumns
  * terminalRows

Note: Due to the way KMainWindow works, those profile options may not
work :(. Do not take this commit as something completed.
2012-04-09 11:37:04 +08:00
Kurt Hindenburg
5b083640ce whitespace and style fixes
Use 'git diff -w --ignore-all-space' to see non-whitespace changes
2012-04-05 11:08:53 -04:00
Jekyll Wu
ba204b1065 Add dbus method runCommand(QString) for running command
Although the existing dbus method sendText(QString) can be used to do
the same job, it is not very friendly since users have to deal with the
problem of how to represent and send the final newline.

FEATURE: 283719
REVIEW: 104398
FIXED-IN: 4.9.0
2012-03-25 03:14:18 +08:00
Jekyll Wu
675dbcb2fe Emit signal currentDirectoryChanged(QString) after current directory changes
Note: the signal is not emitted immediately after the current directory
changes. There is noticable delay (usually below 1 second) at the
moment.

FEATURE: 156919
REVIEW: 104372
FIXED-IN:4.9.0
2012-03-23 22:55:15 +08:00
Kurt Hindenburg
d42633e54d add explicit to constructors with 1 parameter 2012-03-18 16:42:31 -04:00
Kurt Hindenburg
519e2614d6 Style fixes - remove spaces before ; and add spaces in for loops 2012-03-18 15:11:06 -04:00
Kurt Hindenburg
a9fdad1532 minor api doc fix 2012-03-18 09:50:58 -04:00
Jekyll Wu
25b8b5353c Trivial style change: remove extra blank lines 2012-03-17 19:53:21 +08:00
Jekyll Wu
597d0cf71e Rename and move code around 2012-03-04 06:26:28 +08:00
Jekyll Wu
cc1b3a482b Remove unused accessor 2012-03-04 04:54:38 +08:00
Jekyll Wu
9d384f3088 Cleanup comments and style related with OSC seqeunce 2012-02-28 16:49:00 +08:00
Jekyll Wu
38e6f89e4a Add enum entry for the escape code of changing session icon 2012-02-27 21:03:39 +08:00
Jekyll Wu
0331f97b60 Another try of cleaning up of #includes 2012-02-21 05:18:31 +08:00
Jekyll Wu
22ff242506 Remove unused member varibale _modifiedBackground
It is no longer needed for supporting the '\033]11;Color\007' sequence

See enum value TextColor and BackgroundColor
2012-02-14 08:45:00 +08:00
Jekyll Wu
10e1f01fc2 Just rename :) 2012-02-14 08:19:51 +08:00
Jekyll Wu
8621d79fa6 Add missing docstring 2012-02-11 16:22:49 +08:00
Kurt Hindenburg
c350552e48 Minor comment about OSC codes 2012-02-09 23:15:16 -05:00
Jekyll Wu
07cddfe302 Create dbus object for each Konsole window respectively
Its naming scheme is "/Windows/N", similar to "/Sessions/N" for
sessions. That is not the final decision and might change before next
major release.

The old "/Konsole" dbus object is still available at this moment, but
it might disappear or be used for something different in the future, so
it is better to use "/Windows/N" from now on.

For convenience, $KONSOLE_DBUS_WINDOW can be used to refer to the dbus
object corresponding to the Konsole window containing current session.
Note, that environment variable does not work well with detaching and
draging. Maybe it should not be added at all.

CCBUG:276912
CCBUG:281513
CCBUG:292309

REVIEW:103790
2012-02-09 01:50:43 +08:00
Kurt Hindenburg
7427ec83a6 Minor API doc fixes 2012-02-03 10:11:46 -05:00
Jekyll Wu
95b8d5551e Add dbus method for setting and querying history size per session
FEATURE: 120040
FIXED-IN: 4.9
2012-01-26 21:20:09 +08:00
Kurt Hindenburg
73b7f56968 Apply astyle-kdelibs
Over the years, the coding style is all over the place.

Use 'git diff -w --ignore-all-space' to see non-whitespace changes.
2011-12-24 11:18:00 -05:00
Jekyll Wu
125e2c7bd2 Declare pointer and reference in a consistent way
Most code use the "const QString& text" form, instead of the "const
QString &text" form. So change the minority to be consistent with
the majority.
2011-11-06 06:13:28 +08:00
Jekyll Wu
330de6c6f4 Fix some spelling problems 2011-11-06 03:41:20 +08:00
Jekyll Wu
8f1bbd4353 Remove trailing white spaces 2011-11-05 19:49:23 +08:00
Jekyll Wu
6e7b93da0b Add document for some simple methods marked with "document me" 2011-11-03 05:50:02 +08:00