Commit Graph

64 Commits

Author SHA1 Message Date
Kurt Hindenburg
2c686b7afe Minor warning fixes when running under FreeBSD 2013-02-23 10:00:25 -05:00
Jekyll Wu
1a26982427 "#ifdef(XYZ)" -> "#if defined(XYZ)"
Use one form consistently in all code
2012-11-20 11:42:12 +08:00
Jekyll Wu
0909c34405 Make code a little more consistent 2012-06-04 22:25:14 +08: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
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
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
8412c8c2d6 /s/0L/0 2012-03-21 08:20:39 -04:00
Jekyll Wu
25b8b5353c Trivial style change: remove extra blank lines 2012-03-17 19:53:21 +08:00
Jekyll Wu
bd9e7bfe3b Remove unneeded #includes 2012-03-07 00:22:49 +08:00
Kurt Hindenburg
4d774b6137 -Wshadow fixes to parameter names and variable names 2012-03-06 09:00:25 -05: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
cf1a4d0ea5 Invert the boolean logic to make the code more natural 2012-03-06 10:55:46 +08:00
Jekyll Wu
b60d33c64e Reduce code duplication 2012-03-06 10:48:23 +08:00
Jekyll Wu
8d8454a1cc Move code around for better readability 2012-03-06 10:16:32 +08:00
Jekyll Wu
90469a094a Add more constness 2012-03-06 02:00:15 +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
f42fd4721b Clean up unneeded #includes 2012-02-20 19:41:38 +08:00
Jekyll Wu
1db95618c9 QLatin1String ==> QLatin1Char 2012-02-10 03:28:28 +08:00
Jekyll Wu
c1cbab0f01 Make sure the $TERM envirable is always set
The existing code sometimes fails to set $TERM. For example, when
the selected profile on disk contains this line :

    Environment=FOO=BAR

Konsole fails to set $TERM
2012-02-10 03:00:38 +08:00
Jekyll Wu
7e6916d57c Move some environment varibale settings from Pty to Session
I failed to see the intention of adding some environment variables in
class Session while adding some other environment variables in class
Pty. The current way makes Pty::start() contain too many parameters,
which looks ugly and is not easy to understand.

The only side effect of this commit is dbus method environment() will
return more. I don't think that would be harmful.
2012-02-10 02:38:04 +08:00
Jekyll Wu
d9dfcdb9f0 Make the code a little more readable 2012-02-09 22:48:15 +08:00
Jekyll Wu
fdca5195cc Remove trailing slash when settings initial working directory
BUG:293710
FIXED-IN: 2.8.1
2012-02-09 22:00:43 +08:00
Jekyll Wu
6b6a5944f6 Prefer foreach(...) over while(...) for simplicity and readability 2012-01-22 10:21:45 +08:00
Kurt Hindenburg
cca04c279c Don't pollute the namespace - only "using" what is required. 2011-12-26 20:52:24 -05:00
Kurt Hindenburg
46c27663aa 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:09:15 -05:00
Jekyll Wu
cf92cece2b Remove leading white spaces in blank lines to make them really empty 2011-11-05 07:29:21 +08:00
Jekyll Wu
ad256b632c Avoid setting $PWD as "."
That would cause strange result. For example, run "konsole --workdir .",
then bash or zsh would report its current dir as "."

This is a follow up of commit 790e835c6f
2011-11-03 00:19:07 +08:00
Jekyll Wu
790e835c6f Do not resolve the symlink for initial working directory.
The patch is from Danny Daemonic <DannyDaemonic@gmail.com>

FEATURE: 242114
FIXED-IN: 4.8
2011-09-30 23:56:19 +08:00
Jekyll Wu
5c59f17871 Fix a stupid mistake introduced in recent commit. 2011-09-27 15:17:19 +08:00
Jekyll Wu
195abc0324 Rename erase char related methods in class Pty.
erase()    ==> eraseChar()
setErase() ==> setEraseChar()
2011-09-27 13:27:38 +08:00
Jekyll Wu
afeb04c469 Make the code slightly more readable. 2011-09-27 12:52:57 +08:00
Jekyll Wu
4075c3b9d4 Invert the predication in 'if' statement.
"if (enable)"  is more natural than " if (!enable)" .
2011-09-27 12:33:56 +08:00
Jekyll Wu
b7d8843b54 Rename for clarity: cols ==> columns 2011-09-27 12:21:57 +08:00
Jekyll Wu
30110d124a adjust indentation to 4 spaces. 2011-08-21 17:57:49 +08:00
Kurt Hindenburg
cacfb081bb Use KDE::'s stat and chmod 2011-04-01 10:37:53 -04: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
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
1f562d0238 Use KDE_ instead of system calls; EBN Krazy fixes.
CCMAIL: konsole-devel@kde.org

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=847535
2008-08-15 15:39:54 +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
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
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
039d1c4f6f Support use of existing pty in embedded terminal via openTeletype(int fd) slot.
No new methods have been added to the TerminalInterface class in kdelibs to avoid breaking
binary compatibility so the slot must be invoked via QMetaObject::invokeMethod() for now.

See tests/PartTest.cpp

CCMAIL:jr@jriddell.org

Squashed commit of the following:

commit 0759e22dc26b7c1c28e0d8a9b0d245d909629237
Author: Robert Knight <robertknight@gmail.com>
Date:   Fri Apr 18 20:43:20 2008 +0100

    Adapt test to kdelibs changes.  Add a label to explain what the user should expect to see.

commit b67be2fd20178625f01f8f135751849082eddf04
Author: Robert Knight <robertknight@gmail.com>
Date:   Fri Apr 18 00:47:32 2008 +0100

    Export Pty, Session, KeyboardTranslator classes for use in tests.

commit 6dd28bf628fe1036c59f3383aba27ba98e23152c
Author: Robert Knight <robertknight@gmail.com>
Date:   Fri Apr 18 00:46:27 2008 +0100

    Build test

commit 0a9e1c9dc158f73e6bf9f7ef2fe7d4ea936a8066
Author: Robert Knight <robertknight@gmail.com>
Date:   Fri Apr 18 00:46:10 2008 +0100

    Remove temp file

commit 8e69bd56fef267ac0c31c989a4959453a8e3359e
Author: Robert Knight <robertknight@gmail.com>
Date:   Fri Apr 18 00:45:28 2008 +0100

    Add a test for using existing file descriptors with the Konsole part.

commit f1f5b8a7684e88db64769324496a5fa67dd4920b
Author: Robert Knight <robertknight@gmail.com>
Date:   Tue Apr 15 18:36:14 2008 +0100

    Add support in the KPart to use an existing terminal rather than opening a new one.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=798661
2008-04-18 19:47:32 +00:00
Albert Astals Cid
cf93c4c562 less typos
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=796410
2008-04-13 14:39:33 +00:00
Robert Knight
5685b2c673 Fix Ctrl+C not killing applications on some users' systems. Reset all signal handlers to the default (SIG_DFL) in the child process after forking.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=771570
2008-02-06 12:28:49 +00:00
Adriaan de Groot
30b21cac1f Use the right kWarning() calls
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=764626
2008-01-22 07:20:56 +00:00
Robert Knight
781d0dea53 Remove redundant signal/slot in Konsole::Pty and connect to QProcess::finished() directly in Konsole::Session.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=760892
2008-01-13 16:43:34 +00:00
Robert Knight
ac9eec4193 Remove Konsole's internal buffering since KPtyDevice provides its own. Check result of waitForStarted() after starting process and return failure in Konsole::Pty::start() if it returns false. Send correct signal to process when killing it in Session::sendSignal(). Use KPtyProcess's setUseUtmp() to add process to utmpter if enabled in Konsole. CCMAIL:ossi@kde.org
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=760890
2008-01-13 16:38:53 +00:00
Robert Knight
905304b4f1 Port from K3Process to KProcess. Removed dependancy on KDE 3 Support library. This breaks flow control, as changes to kdelibs appear to be needed first. Removed some of the status messages that KNotify may report when a process exits. Bump version number in trunk to 2.1
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=760614
2008-01-13 04:16:22 +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