Commit Graph

208 Commits

Author SHA1 Message Date
Jekyll Wu
d12aead588 No need to lookup executable PATH when absolute path is given 2012-11-01 12:01:15 +08:00
Jekyll Wu
150de7797e Remove the hack of resetting working directory to $HOME
That hack is added due to the the "single process" model used by konsole.
However, That hack seems to make the thing more confusing as reflected in bug
302903

So here is a known issue: if you set konsole as the terminal emulator
used in pcmanfm, pressing F4 twice in different folder will open two
konsole window in the same folder.
2012-10-03 16:54:25 +08:00
Kurt Hindenburg
69dcbd3406 astyle fixes - spaces/{ 2012-09-02 17:28:43 -04: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
09fd58de95 Move the code for setting various Pty properties out of Pty:start()
It feels strange that those properties are set again in Pty::start()
after they (should) have already been set before Pty::start() is called
2012-06-04 22:07:47 +08:00
Jekyll Wu
045284c405 Swap the order of column(width) and line(height) in method signature
It is more natural to use column x line.

TODO: The current code is inconsistent with itself regarding this issue
2012-06-04 13:49:04 +08:00
Jekyll Wu
d8647e1b7f Add accessing method autoClose() for completeness 2012-05-20 16:25:06 +08:00
Kurt Hindenburg
5ed56f0b18 remove () around case stmts 2012-05-13 13:06:27 -04:00
Kurt Hindenburg
bee9aa8f78 minor style fixes - remove empty lines start/end code blocks 2012-05-13 10:08:05 -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
b95997b85e Make the connect statements more consistent in style 2012-04-21 10:47:49 +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
b7c7fdb4f3 Make Session::openTeletype a little more readable 2012-04-21 09:24:36 +08:00
Jekyll Wu
ebcab3c307 Use $PWD as the fallback value for setting initial working directory
This means running "konsole" literally in a terminal will open a konsole
which starts in the same directory as the current terminal. "konsole
--workdir ." is no more needed. This makes Konsole behave like most
other emulators.

Another befinit is it is now easier to use konsole for the "Open
terminal here" feature provided in file managers other than dolphin.
Note: due to the "single process" model of konsole, konsole sometimes
does not open the expected the direcotory when used by this "Open
terminal here" feature.

REVIEW: 104518
BUG: 187754
FIXED-IN: 4.9.0
2012-04-11 00:36:39 +08:00
Kurt Hindenburg
3ceb32461c Allow non-English for program names; useful w/ -e
The old code used Latin1() to check program names and also used
QFile::encodeName().

Thanks to Eugene Shalygin for report and research.

Example:
cp `which vi` ./编辑器
konsole -e ./编辑器
BUG: 297529
FIXED-IN: 2.8.3
2012-04-10 11:27:32 -04:00
Jekyll Wu
5f8d203baa Increase the short delay to 500 usecs 2012-04-09 23:22:36 +08:00
Jekyll Wu
4a5a7d156f fix typo in comment
Why do I keep making those mistakes? :(
2012-04-09 19:56:03 +08:00
Jekyll Wu
ccfc3f859c Introduce small delay to avoid updating Pty size too quickly
Some terminal application does not update its display when Pty size
changes quickly in a row.  Zsh seems a typical example.

Thanks to Franz Fellner<alpine.art.de@googlemail.com> for the research
and solution.

BUG: 164099
BUG: 250212
FIXED-IN: 4.8.3
2012-04-09 19:34:36 +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
ba34c4ebe2 normalize SIGNALS
It is annoying that kdelibs-style and Qt normalize conflict
2012-04-06 08:57:47 -04: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
Kurt Hindenburg
f130699f76 Minor krazy fix for using ' for single chars 2012-03-25 10:40:10 -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
Jekyll Wu
d8f7fd88b0 Make sure SLOT Session::done() is only triggered once.
For some strange reason, that slot might be triggered for the second
time when Session is being destructed. That could introduce crash.

So this is more like a workaround than a perfect fix.

BUG: 296239
FIXED-IN: 4.8.2
2012-03-23 21:17:03 +08:00
Kurt Hindenburg
e0862c603a Style fixes - separte commands - remove 2 ; - align { elses 2012-03-18 15:57:48 -04:00
Kurt Hindenburg
519e2614d6 Style fixes - remove spaces before ; and add spaces in for loops 2012-03-18 15:11:06 -04:00
Jekyll Wu
25b8b5353c Trivial style change: remove extra blank lines 2012-03-17 19:53:21 +08:00
Jekyll Wu
8e43f4128c Less old style casting 2012-03-16 10:44:07 +08:00
Jekyll Wu
1c275207e0 Rename and constify 2012-03-12 15:35:35 +08:00
Jekyll Wu
7dee255b14 Add workaround for the problem that Session::processId() might return 0
That was not an actual problem before KDE 4.8, because the old code
guaranteed when Session::processId() was called, the session had
already started running so it wouldn't return 0.

Since KDE 4.8, that guarantee was not there any more since a hard-coded
200ms delay is introduced to avoid the session starting "too quickly".
In short, this is another side effect of the fix for infameous BKO #176902.

See https://bugzilla.novell.com/show_bug.cgi?id=745954 for one concrete
issue caused by this underlying problem
2012-03-11 13:13:38 +08:00
Jekyll Wu
507619dff2 Emit signal on receiving escape sequence for changing terminal size
This is just one needed prerequisite for supporting the resizing
escape sequence. I still have no clear clue of adding the support
correctly
2012-03-09 15:16:42 +08:00
Jekyll Wu
f4fb943132 Most of time we only need <KLocalizedString> instead of <KLocale> 2012-03-07 06:48:26 +08:00
Jekyll Wu
d49da53277 Avoid redundant information in warning messages 2012-03-06 21:35:01 +08:00
Jekyll Wu
d81e355b54 Session does not need to know about internal detail of Pty 2012-03-06 21:24:55 +08:00
Jekyll Wu
78dbf8f1c1 Remove the left-over & unused code for supporting "Scroll Lock" key
It is decided to not reimplement this feature in KDE4 konsole:

  * It is non-trivial work to implement it correctly
  * It annoyed some users when it was available in KDE3 konsole
  * Not many users want this feature back

This is a follow up of commit cee0ce539b

CCBUG:172271
REVIEW:104156
2012-03-05 08:29:12 +08:00
Jekyll Wu
ac291d69d6 Add extra safeguard for calling kill() 2012-03-04 06:32:22 +08:00
Jekyll Wu
a6e40263e1 Add extra safeguard for calling kill() 2012-03-04 06:28:16 +08:00
Jekyll Wu
597d0cf71e Rename and move code around 2012-03-04 06:26:28 +08:00
Jekyll Wu
f57cf2fd10 No need to check _emulation for Null explicitly
That _emulation must have been initialized in the constructor.
2012-03-04 05:21:17 +08:00
Jekyll Wu
cc1b3a482b Remove unused accessor 2012-03-04 04:54:38 +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
363a270177 Allow changing tab title through escape sequence
Users can now change the tab title through "\e]30;Tab Title\a" .

This is a feature previously available in KDE3 konsole.

FEATURE: 179142
FIXED-IN: 4.9.0

REVIEW: 103862
2012-02-24 21:21:07 +08:00
Jekyll Wu
3b7e953523 Yet another around of cleaning up #includes 2012-02-22 07:18:30 +08:00
Jekyll Wu
0331f97b60 Another try of cleaning up of #includes 2012-02-21 05:18:31 +08:00
Jekyll Wu
f42fd4721b Clean up unneeded #includes 2012-02-20 19:41:38 +08:00
Jekyll Wu
10e1f01fc2 Just rename :) 2012-02-14 08:19:51 +08:00