- the foreground informaton **is** not updated by this function
- not all callers call updateForegroundProcessInfo() afterwards
- other functions have a call to updateForegroundProcessInfo()
inside, so the whole thing is moot
- this commit message is 5x as long as the comment it removes
TerminalColor::onColorsChanged() used to be called updateScrollbarColors(),
now that KColorSchemeManager is integrated in Konsole, users can choose a
colour scheme for the whole window widget style, where tabs, scrollbar,
findbar, right-click context menu are all the same colour as you'd expect
from any KDE application.
This removes dimming of the scrollbar when the "dim when inactive" option is
disabled, the scrollbar is part of the window GUI, it should follow the same
color scheme.
2a71f063f825e07b7e2072d604c6cc
Commit 8de0e6c7 mistakenly removed code to cancel the pending wrap flag
(which in konsole is implemented as having the cursor one past the width
of the screen) before the cursor controls CUU, CUD, CUB and BS.
While the behavior may seem counter-intuitive (specially BS and CUB,
where `printf "A\bB"` at the last column results in `BA`), this is the
behavior of VT100, xterm (without reverse-wraparound mode), and, most
importantly, is expected by ncurses.
CCBUG: 399615
- Call ProfileSettings::slotAccepted() when the parent ConfigurationDialog
is accepted, so that ProfileManager::saveSettings() is called
- don't delete the ProfileSettings dialog on accept, it'll be destroyed when
the parent ConfigurationDialog is destroyed
- save the profiles' shorcuts if they were actually changed
With this commit and the previous one, there is no need for ~Part() or
~Application() to call saveSettings(), shorcuts settings are saved when
the ProfileSettings dialog is accepted and saving the default profile is
done in setDefaultProfile(). This fixes an issue where changing e.g. the
default profile is only saved to the konsolerc file when the main window is
closed.
It doesn't seem useful to delay saving to when the the MainWindow destructor
calls ProfileManager::saveSettings().
This seems to be fallout from a previous refactor to put all the global
settings dialogs in one parent dialog (ConfigurationDialog), because now
nothing actually calls ProfileSettings::slotAccepted().
CSI 28 ; <c> t is a pre-KDE4-era (from the comments) extension to
the control codes, where <c> was supposed to set the text-color
on a tab. It is unimplemented since KDE4, and only generated
a debug-message when used. Remove its implementation and the
TODO's associated with "document the meaning of this parameter".
Because there's no point in documenting an unimplemented thing.
- Don't use a QHash to hold a few profile shortcuts-related items, instead
use a vector of struct.
- Load profile shortcuts after loading the profiles; after commit
50041fd02e, all the profiles are loaded in the ProfileManager constructor.
Now there is no need to store the profile path as a member in ShortcutData;
and when saving the shortcut settings we can use profile->name(), since the
way the ProfileWriter works results in the filename being the
profile name + ".profile". When loading shortcuts, keep backwards
compatibility by checking for both "profile name" and "profile name.profile".
This lets people find Konsole with some common-seeming words that they
might search for if they need to run a script or CLI program and they
aren't super familiar with Konsole or CLI stuff in general.
- More range-for
- Reverse iterators instead of java-style ones with toBack/hasPrevious
- Don't use a QSet (which is based on QHash) to hold a few items
Now all the profiles are loaded in the constructor; I didn't see any
noticeable difference in loading times.
Also all the profiles are loaded anyway because ProfileList calls
ProfileManager::allProfiles() to populate the profiles menu ...etc.
There is an inconsistence in "Find Next/Previous" icons in Edit menu and
the search bar. Make sure they are consistent whenever "Search backwards"
is checked or not.
BUG: 443244
Add a checkbox to the Edit Profile dialog to set/unset the profile as
the default profile. Responds to the Apply and Ok buttons like other
dialog settings. Unchecking (and clicking Apply/Ok) sets the fallback
profile as the default.
- refactor the code
- remove redundant includes
- change the string used in the GUI to "window color scheme", to differentiate
between it and the terminal color schemes
Add AppColorSchemeChooser class which use KColorSchemeManager to change
konsole color scheme. Inspired by KateColorSchemeChooser wrote by
Zhigalin Alexander <alexander@zhigalin.tk>.
I'd used a std::set with a compare function, so that the profiles are always
sorted by name ...etc, but that is wrong, as the Key type in the set is a
QExplicitlySharedDataPointer, if the QESDP is copied, its own address is
going to change, but the address of of the object it's managing (Profile)
is the same, that's why QESDP internally overloads operator== to compare
the address of its d pointer (the one returned by data()).
That meant that multiple QESDP could exist in the set, not good... (a QSet
worked because it uses a hash which is based on the address of the object
returned by data()).
So, use a vector, that is sorted by profile name (we only need to sort it
when allProfiles() is called, and when a profile name is changed).
This fixes an assert in ProfileManager::setDefaultProfile(); to test open
the profile manager and select the built-in profile and click "set default".
Add a unit test.
Reading the upstream code, it looks like setStyleSheet(QString())[1] will
unset any custom style sheet. This seems like a cleaner solution because
setting a stylesheet at all interferes with changing the widget colorscheme
from a dark to a light scheme or vice versa.
To test:
- open konsole
- open systemsettings and change the colorscheme to a dark one, if you're
already using a dark one, change to a light one
- widget colors are changed as expected, except for konsole tabs, which look
odd
Opening a new konsole window seems to clear the issue and the tabs look
normal again.
[1] https://code.woboq.org/qt5/qtbase/src/widgets/kernel/qwidget.cpp.html#_ZN7QWidget13setStyleSheetERK7QString