How the initial terminal size is set:
* TerminalDisplay calculates size in pixels from requested columns/rows
count, and uses it as the size hint.
* TabbedViewContainer, which wraps TerminalDisplay and QTabBar,
and MainWindow, which wraps TabbedViewContainer, calculates their
sizes from their children's size hints. It is assumed the size
is equal to children's bounding rectangle size, eventually increased
by visible margins.
* TerminalDisplay adjusts its size to fill the window. In this case,
this should change nothing.
QTabWidget's (TabbedViewContainer base class) sizeHint() includes
some (*nonexistent*) margins added by widgets style (by default 2*2,
2*4 in Breeze). Those were propagated to the window size and were
increasing TerminalDisplay size.
Reimplemented TabbedViewContainer::sizeHint() returns the size of its
children's bounding rectangle.
Summary:
Fix the regression about the placement of a new tab:
it is now added either at the end, or next to the
current tab depending on the setting.
BUG: 406409
Test Plan:
In Konsole settings, select 'Put new tab after the
current tab' for the New tab behavior setting.
Open some new tabs and check they are opened at the
proper position.
Reviewers: #konsole, hindenburg, tcanabrava
Reviewed By: tcanabrava
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D20836
Summary:
Session Save / Restore.
The old session code saved the sessions in random order, the restore
order was wrong and it ignored the splits (even the old style splits
where ignored, I'm not talking about the new style). This new session
/ restore code ignores nothing: It will save and restore your whole
Terminal Hierarchy, with splits, splits-in-splits, recursing everything
where needed.
bug: unfocused terminal tabs lacks title untill focused. should be
easy to fix and not a blocker.
Test Plan: - Too many Logouts / Logins to test this.
Reviewers: #konsole, hindenburg, ngraham
Reviewed By: ngraham
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D20224
Summary:
Fixes a few minor memory leaks found with address sanitizer.
The newTabButton and closeTabButton was not passed a parent and is not
deleted in the destructor of TabbedViewContainer which will cause them
to be leaked when closing a tab. Instead pass the TabbedViewContainer as
the parent.
The same goes for the profileMenu, it was not passed a parent pointer at
contruction and the setMenu function doesn't take ownership of it, so
therefore it was also leaked.
Backported the original version
https://phabricator.kde.org/D19634
Summary:
Fixes a few minor memory leaks found with address sanitizer.
The newTabButton and closeTabButton was not passed a parent and is not
deleted in the destructor of TabbedViewContainer which will cause them
to be leaked when closing a tab. Instead pass the TabbedViewContainer as
the parent.
The same goes for the profileMenu, it was not passed a parent pointer at
contruction and the setMenu function doesn't take ownership of it, so
therefore it was also leaked.
Test Plan:
Compile konsole with address sanitizer.
Open and close konsole.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D19634
Summary:
This is what I envision for the Konsole Tab / Splits
management. One tab contain a QSPlitter that can contain
multiple TerminalDisplays / Splits.
You can test this behavior by hitting ctrl + shift + 9
and ctrl + shift + 0 to activate the splits, and ctrl +
shift + t to activate a new tab.
Old:
{F6484123}
New:
{F6484124}
What works:
- Tab Creation
- Split Creation (Even Recursive splitting)
- Terminal Close will close the Split on last split
- Last last split to close will close the tab
- Last tab to close will close konsole
- Detaching
- Tab Renaming
- Closing splits after detach
- Closing windows after detach
- Detach / Reattach works!
This patch series has the commits of Thomas Surrel, Maciej Niedbdalski and Myself.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: luc4, hallas, anthonyfieroni, gennad, ngraham, thsurrel, maciejn, mglb, hindenburg, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D17643
Summary:
Click with the middle mouse click on a tab: close it
Click with the middle click on empty portion of tab bar creates a new tab.
This makes konsole more streamlined with default behavior
found in other tabbed applications like browsers.
GUI option to enable/disable closing tab w/ mouse button. The default
is to have closing tab with button disabled to avoid possible data loss.
Tomaz Canabrava <tcanabrava@kde.org> also coded portion of this.
FEATURE: 398940
FIXED-IN: 19.04
GUI:
Test Plan: {F6618852}
Reviewers: ngraham, hindenburg, tcanabrava
Reviewed By: ngraham, hindenburg
Subscribers: emateli, thsurrel, ngraham, hindenburg, shubham, broulik, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D15742
With this action, two tabs can be jumped back and forth. This
somewhat abuses the stucture used for the "Last Used Tabs" action.
When the "Last Used Tabs" actions are used, the next "Toggle between
two tabs" will be incorrect for the first time.
Idea from https://phabricator.kde.org/D7068
Summary:
This parameter is internal from the TerminalDisplay, no need
to extract it to send to another parameter.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D17625
Summary:
This is needed to clean up a bit of the code later.
being really explicit here removes the need to handle
QWidget pointers, as that could in theory be anything
Handling only TerminalDisplays* we can remove the
SessionController map from the ViewContainer and
add it to the TerminalDisplay class in the future
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D17492
Summary:
Instead of iterating over the sessions to fetch the view and
duplicate the current screen once for each split, ignore all
of them and just create a new terminal view. The only thing
this terminal view shares with the previous current widget
is the profile.
use createView instead of manually trying to create the view
Fixes bug while closing the split
Don't duplicate tabs in the splits
BUG: 385697
BUG: 380455
FIXED-IN: 19.04
Reviewers: thsurrel, hindenburg, gennad, ngraham, #konsole
Reviewed By: thsurrel, hindenburg, ngraham, #konsole
Subscribers: ngraham, hindenburg, gennad, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D17267
Summary:
read all of the information at once instead of concatenating
a QString over and over untill the end of the file. This removes
uneeded memory allocation and speeds up loading complex css files
Reviewers: hindenburg
Reviewed By: hindenburg
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D17329
Summary:
This patch adds the possibility to navigate between the last
accessed tabs with a keyboard shortcut.
Test Plan: Open several tabs, use Ctrl-Tab to switch to the previous used one.
Reviewers: #konsole, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: hindenburg, ngraham, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D16884
Just duplicate code of isKonsolePart() for now
See Differential Revision: https://phabricator.kde.org/D16706
(cherry picked from commit bf71cb54ac4a1099b4884d368d0c427b658435e0)
Summary:
After QTabBar revamp, correct issue where tabs were still
showing in KParts.
Test Plan:
Opened instances of dolphin / kate and looked the kparts output.
Opened konsole, everything seems fine.
Reviewers: hindenburg, #konsole
Reviewed By: hindenburg, #konsole
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D16706
Summary:
If you moved the tabs to splits in a way that you have a different
number of tabs in each split, and started closing it, the count()
of the tabs would be different and we would hit an assert.
The fix is simple: don't separate the logic between tabEmpty and
tabDestroyed, if the tab is empty it will be destroyed but we can
treat everything in the tabEmpty signal, this way we will never hit
a dangling pointer.
Because of that it was possible that a splitView had a invalid
activeWidget for a microsecond, when it's deleting itself, so
instead of asserting if we have no active view, I choose to return
a empty list of properties.
Reviewers: hindenburg, ngraham, sandsmark
Reviewed By: hindenburg
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D15379
Summary:
This continues the patch series of the rewrite
of the Tab handling code to a more modern approach
using QTabWidget.
This fixes the attach and reattach bug on multiple
konsole windows and reworks the drag & drop code
to a more simplified version of it.
Reviewers: hindenburg, ngraham, sandsmark
Reviewed By: hindenburg
Subscribers: lbergdoll, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D15377
Summary:
Show tabbar and hide tabbar got lost in the transition to a modern
QTabBar, this re-enables them. These options will override the
current settings if you use --hide-tabbar or --show-tabbar.
Changing these options in the settings will change these settings.
To use the current preferences just start konsole without --hide-tabbar
or --show-tabbar
Reviewers: #konsole, sandsmark, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: ngraham, konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D14294
Builds have been failing since this new QTabBar code was committed
since QOperatingSystemVersion::currentType() is Qt5.9+. We currently
only require Qt5.6 and I don't want to change that just for this.
ENABLE_DETACHING is only set to false for MacOSX/Darwin.
Summary:
This patch fixes the lack of profile in the new tab button,
and it makes the close button to behave the same way
as the old implementation.
Reviewers: #konsole, sandsmark, hindenburg
Reviewed By: #konsole, hindenburg
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D14295
Summary:
Lambdas don't auto disconnect. Removing that code also
removed one of Nathan's nitpicks on my code.
Reviewers: #konsole, hindenburg, sandsmark
Reviewed By: #konsole, hindenburg
Subscribers: konsole-devel
Tags: #konsole
Differential Revision: https://phabricator.kde.org/D14298
(Detaching is still broken atm)
Move out of the CMake the check for crashes in detaching
It's better to check that in the code - I was quite lost
for a while on why there was a DETACHING_ENABLED definition
as it did not made sense