Other signals are received too early when closing tabs.
ViewContainer::viewRemoved is received after the tab count has been
updated.
Protect against the "detach-tab" action when only one left.
Fixes the following behavior:
- Create two tabs
- Close one tab
- Detach the remaining tab through menu or shortcut
- The original window is blank - no terminal display. Adding a tab
to it crashes
This change tries to improve the performance when you are outputting a
lot of text to the screen. Result with a 40M text file for me before was
6 seconds which is now down to about 3.5 seconds with this change.
It can still be improved a lot more.
BUG: 443885
Also uses weak pointers in the cache in ViewManager, to avoid having
them loaded for longer than necessary.
It takes less than a millisecond to load them, and it is nice to pick up
new changes from disk. But we don't want to do it for those currently
used by code elsewhere, so we still cache them with a weak_ptr that will
expire once all other code is done with it.
- 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.