Commit Graph

105 Commits

Author SHA1 Message Date
Jekyll Wu
f4fb943132 Most of time we only need <KLocalizedString> instead of <KLocale> 2012-03-07 06:48:26 +08:00
Jekyll Wu
dccfaf1b54 Remove one unneeded #include 2012-02-29 02:08:54 +08:00
Jekyll Wu
f42fd4721b Clean up unneeded #includes 2012-02-20 19:41:38 +08:00
Jekyll Wu
9bfac3b509 Krazy2 fix for foreach(...)
Well, I don't think there is actually problem here for POD types.
Anyway, just change it to make krazy happy :)
2012-02-15 02:44:59 +08:00
Jekyll Wu
f0529c1c02 Prefer foreach(..) over iterating manually for readability 2012-02-13 21:28:48 +08:00
Jekyll Wu
13bdd4c611 Minor changes 2012-02-10 21:00:29 +08:00
Jekyll Wu
5044ebb263 SessionManager::loadProfile should return immediately with non-existing path 2012-02-07 05:40:13 +08:00
Kurt Hindenburg
0bd1927585 Select right profile name in saveFavorites()
Do not use "profile->name()" for retrieve profile name, but take it
from profile path.

When a profile name is changed (ex. test -> test2):
profile->path() (/home/xxxx/.../test.profile)
profile->name() (test2.profile)

Thanks to Francesco Cecconi (francesco.cecconi@gmail.com ) for patch

BUG: 292637
REVIEW: 103807
FIXED-IN: 4.9
2012-01-28 11:49:19 -05:00
Jekyll Wu
debfec2eb3 Add environment variable $KONSOLE_PROFILE_NAME
It records the name of the profile used in current tab/session.

FEATURE: 227296
FIXED-IN:4.9
2012-01-24 20:23:32 +08:00
Jekyll Wu
d33056c178 Rename: type ==> profile for more specific meaning 2012-01-22 10:21:45 +08:00
Jekyll Wu
6b6a5944f6 Prefer foreach(...) over while(...) for simplicity and readability 2012-01-22 10:21:45 +08:00
Kurt Hindenburg
8240973baf Use relative paths in config file
konsolerc uses in 'Favorites Profiles' and 'Profile Shortcuts' the full
path.  Changing this to relative path (if in a KDE location) allows
one user can copy then to another.

FIXED-IN: 4.9
BUG: 283102
REVIEW: 102749
2012-01-21 16:28:59 -05:00
Jekyll Wu
dcc57fce24 Split the exisint setDefaultProfile() methods into two methods 2012-01-16 20:55:38 +08:00
Jekyll Wu
81167d1084 Move the logic of ensuring all profiles are loaded into SessionManager itself.
The idea of delaying loading all profiles until needed is an internal
optimization, and should be hidden to the users of SessionManager.
2012-01-16 14:58:46 +08:00
Jekyll Wu
40f8bf736a Rename for clarity: closeAll() ==> closeAllSessions() 2012-01-16 13:31:04 +08:00
Jekyll Wu
3d8da1f878 Make 'foreach(...)' more readable 2012-01-14 22:54:56 +08:00
Jekyll Wu
562e949b52 Remove the code for reading KDE3 profile.
See BKO 218655.
2012-01-11 23:51:04 +08:00
Kurt Hindenburg
fa187da0c6 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:22:18 -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
cf92cece2b Remove leading white spaces in blank lines to make them really empty 2011-11-05 07:29:21 +08:00
Jekyll Wu
099a728206 Remove one FIXME which seems not a problem 2011-11-02 07:51:30 +08:00
Jekyll Wu
3f1e01802d Move code around for better understanding 2011-11-02 04:33:42 +08:00
Jekyll Wu
7572e517e4 Add static declaration for some internal functions 2011-11-02 04:20:27 +08:00
Jekyll Wu
aaa01fd854 Remove unused #include for ShellCommand.h 2011-10-28 02:35:35 +08:00
Jekyll Wu
7ad55af1fc Implement the "Seconds to detect silence" option from KDE3 konsole.
FEATURE: 195978
FIXED-IN:4.8
REVIEW:102823
2011-10-11 12:30:05 +08:00
Jekyll Wu
2b72a67faf Rename appConfig to konsoleConfig for clarity. 2011-10-06 19:53:15 +08:00
Jekyll Wu
ae44eb4c4b Save default-profile/favorites/shortcuts settings into disk ASAP.
Those settings are now synced into disk right after the
ManageProfilesDialog is closed.

BUG: 200987
FIXED-IN: 4.8
REVIEW:102781
2011-10-06 17:48:25 +08:00
Jekyll Wu
0be347a97c Previous commit was meant to close BKO 251062. Typo. 2011-10-05 14:29:46 +08:00
Jekyll Wu
9b63c034a6 Always read/write the 'DefaultProfile' entry from/into 'konsolerc'.
That means the default profile is shared among konsole and all host
apps of konsole kpart. That is not ideal enough, but much better than
current inconsistent read/write for the 'DefaultProfile' entry.

BUG:251602
FIXED-IN: 4.8
2011-10-05 14:15:14 +08:00
Jekyll Wu
e5fabd05ba Minor change on indentation. 2011-10-03 17:30:57 +08:00
Jekyll Wu
eee7eb7dd6 Rename _types to _profiles since it really store profiles. 2011-10-02 20:44:16 +08:00
Jekyll Wu
221cde8b9d Don't lookup available KDE3 profiles since they are not actually loaded.
TODO: should class KDE3ProfileReader be removed?
2011-10-02 19:42:14 +08:00
Kurt Hindenburg
3e75622bd8 To clarify code, s/info/profile/g
In SessionManger, rename info to profile to better show what's going on.

Patch by Gu Rui <chaos.proton@gmail.com>
REVIEW: 102603
2011-09-24 11:22:56 -04:00
Jekyll Wu
272ac9850e Include KDE headers consistently in the from of "#include <KSomething>" .
However, some KDE headers are still only available in the form of
"#include <ksomething.h>"

krun.h              ==>     KRun
kicon.h             ==>     KIcon
kdebug.h            ==>     KDebug
kshell.h            ==>     KShell
kdialog.h           ==>     KDialog
kconfig.h           ==>     KConfig
klocale.h           ==>     KLocale
kglobal.h           ==>     KGlobal
kcolorutils.h       ==>     KColorUtils
kconfiggroup.h      ==>     KConfigGroup
kdesktopfile.h      ==>     KDesktopFile
kcolorscheme.h      ==>     KColorScheme
kstandarddirs.h     ==>     KStandardDirs
ktemporaryfile.h    ==>     KTemporaryFile
klocalizedstring.h  ==>     KLocalizedString
2011-09-23 05:04:46 +08:00
Jekyll Wu
49c107966b Konsole should never save a profile with empty name into disk.
BUG: 281268
FIXED-IN: 4.8
REVIEW:102559
2011-09-14 23:31:47 +08:00
Jekyll Wu
b916dd22d0 Rename 'persistant' to 'persistent'.
This is a common misspelling.
2011-09-04 13:24:56 +08:00
Jekyll Wu
9971d3d117 prefer using convenient method KStandardDirs::locate() . 2011-09-03 16:37:05 +08:00
Jekyll Wu
afea863b2a Stop tracking the session/profile pair after a session is closed.
The patch(slightly modified) is from Gu Rui <chaos.proton@gmail.com>

REVIEW: 102507
2011-09-02 10:01:16 +08:00
Jekyll Wu
a5eaba7f76 Create runtime profile only once per session.
The patch is provied by Gu Rui <chaos.proton@gmail.com>

REVIEW: 102506
2011-09-02 09:06:25 +08:00
Jekyll Wu
69281f05a3 Delete some commented off and never-used code. 2011-08-26 03:05:04 +08:00
Jekyll Wu
cb6a87a9b4 When loading profile, do not initially set default profile as parent.
The old code will cause problem if the loaded profile does not specify
its parent explicitly. That loaded profile will have current default
profile as its parent, which means its behavior changes if another
profile is set as the default profile . A good example is the 'Shell'
profile.

The new code initially sets fallback profile as parent, which guarantees
the behavior of 'Shell' profile is stable.

BUG: 279863
2011-08-11 15:47:01 +08:00
Albert Astals Cid
3913792ce6 Add some const to make the code easier to follow 2011-06-26 16:23:59 +01:00
Kurt Hindenburg
23062bcc0d Allow profile filenames to have multiple '.'s.
After this hostname.local.profile will work with --profile and
--list-profiles.  Also, the profile path file is checked if it is a
directory.
BUG: 250399
FIXED-IN: 4.6.3
2011-04-24 00:06:02 -04:00
Kurt Hindenburg
d1ae639d4a Add some context for i18n translations. These 2 messages are not
currently displayed.
2011-04-17 18:51:30 -04:00
Kurt Hindenburg
d6512d95ac Temp fix for some crashes when changing profiles in Konsole Part.
CCBUG: 256357

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1200790
2010-11-25 19:31:47 +00:00
Sascha Peilicke
45d27ec764 Second chunk of menubar changes, see http://reviewboard.kde.org/r/3875/ for details.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1122683
2010-05-04 13:31:46 +00:00
Robert Knight
5c55fd0154 Greatly reduce memory usage required by Konsole's scrollback buffer and improve releasing of scrollback memory to OS when no longer needed.
* Reduce amount of memory required for representing characters in scrollback buffer by not storing formatting data for each character.  Instead store UTF-16 characters and formatting ranges
* Allocate memory for scrollback buffer use a custom mmap-based memory pool - this allows the memory to be released to the OS sooner when freed.

There is a small performance cost when printing a large number of lines - see bug report for figures.

Patch by Michael Meier

REVIEW: http://reviewboard.kde.org/r/802/
BUG:176974


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=987102
2009-06-25 15:33:20 +00:00
Kurt Hindenburg
bc9d65ec79 Add support for reading the profiles' menu index (favorites) from the profile file.
This patch doesn't write the index, only reads.

CCBUG: 18530

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=959584
2009-04-26 15:40:18 +00:00
Kurt Hindenburg
8aa7acde0b Use QLatin1String instread of const char *
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=952497
2009-04-12 02:02:20 +00:00
Albert Astals Cid
0814346bfe const & for foreach
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=952188
2009-04-11 11:20:13 +00:00