Bug 436471 - "Show Statusbar" menu item doesn't work
Summary: "Show Statusbar" menu item doesn't work
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-01 22:09 UTC by popov895
Modified: 2021-08-13 18:21 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 21.12


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description popov895 2021-05-01 22:09:17 UTC
SUMMARY

Toggling the "Show Statusbar" menu item (Settings > Show Statusbar) doesn't change the visibility of the status bar. Also, this menu item is always unchecked after restarting Konsole (if it was toggled before).

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: openSUSE Tumbleweed 2021044428 / X11
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.81.0
KDE Gear: 21.04.0
Qt Version: 5.15.2
Comment 1 Nate Graham 2021-05-03 19:33:26 UTC
Can confirm. Seems to do nothing at all.
Comment 2 popov895 2021-08-01 12:46:39 UTC
Probably, can be closed, since I no longer see this menu item in the master branch.
Comment 4 Ahmad Samir 2021-08-01 13:13:28 UTC
Reading this report's description again, this bug happened because of the first commit I linked above, which basically intercepts the show/hide statusbar menu action.
Comment 5 Kurt Hindenburg 2021-08-02 15:28:39 UTC
Git commit 090356661c92bfedeeeaf6f4f77d294facb3d8c6 by Kurt Hindenburg, on behalf of Ahmad Samir.
Committed on 02/08/2021 at 15:28.
Pushed by hindenburg into branch 'master'.

Fix KXmlGUI toolbars; and Konsole MainWindow size

Call setupGUI(), which will call createGUI (since we set the
KXmlGuiWindow::Create flag), omit the StatusBar flag since we don't have a
statusbar and don't want the "Show StatusBar" menu action.

TabbedViewContainer::sizeHint() calculates an optimum size for itself,
including the sizes of its child widgets; added in efb621d091c05f11 by
Mariusz Glebocki; following the code:
MainWindow creates a ViewManager
ViewManager creates a TabbedViewContainer and then a TerminalDisplay

which means that the first time TabbedViewContainer::sizeHint() is called
the TerminalDisplay widget size is 0, then TabbedViewContainer::sizeHint()
would return 0.

Which is why calling resize() in MainWindow was delayed to the showEvent(),
(and even delayed more by a QTimer::singleShot() call in Application),
at which point all the child widgets have been created and
MainWindow::sizeHint() (which logically takes into account the sizeHint()
of its child widgets) would return a sensible size.
Related: bug 430036, bug 439339

M  +12   -5    src/MainWindow.cpp

https://invent.kde.org/utilities/konsole/commit/090356661c92bfedeeeaf6f4f77d294facb3d8c6
Comment 6 Ahmad Samir 2021-08-13 18:21:53 UTC
Git commit fb7f838fd3138a39aea3bcb2e91f923741587137 by Ahmad Samir.
Committed on 13/08/2021 at 18:21.
Pushed by ahmadsamir into branch 'cherry-pick-09035666'.

Fix KXmlGUI toolbars; and Konsole MainWindow size

Call setupGUI(), which will call createGUI (since we set the
KXmlGuiWindow::Create flag), omit the StatusBar flag since we don't have a
statusbar and don't want the "Show StatusBar" menu action.

TabbedViewContainer::sizeHint() calculates an optimum size for itself,
including the sizes of its child widgets; added in efb621d091c05f11 by
Mariusz Glebocki; following the code:
MainWindow creates a ViewManager
ViewManager creates a TabbedViewContainer and then a TerminalDisplay

which means that the first time TabbedViewContainer::sizeHint() is called
the TerminalDisplay widget size is 0, then TabbedViewContainer::sizeHint()
would return 0.

Which is why calling resize() in MainWindow was delayed to the showEvent(),
(and even delayed more by a QTimer::singleShot() call in Application),
at which point all the child widgets have been created and
MainWindow::sizeHint() (which logically takes into account the sizeHint()
of its child widgets) would return a sensible size.
Related: bug 430036, bug 439339


(cherry picked from commit 090356661c92bfedeeeaf6f4f77d294facb3d8c6)

M  +12   -5    src/MainWindow.cpp

https://invent.kde.org/utilities/konsole/commit/fb7f838fd3138a39aea3bcb2e91f923741587137