Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KAddressBook
Commits
6f1d3582
Commit
6f1d3582
authored
May 31, 2021
by
Laurent Montel
😁
Browse files
Rename variable
parent
1658ded1
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/mainwindow.cpp
View file @
6f1d3582
...
...
@@ -44,7 +44,7 @@ MainWindow::MainWindow()
setAutoSaveSettings
();
m
Hide
MenuBarAction
->
setChecked
(
Settings
::
self
()
->
showMenuBar
());
m
Show
MenuBarAction
->
setChecked
(
Settings
::
self
()
->
showMenuBar
());
slotToggleMenubar
(
true
);
#ifdef WITH_KUSERFEEDBACK
auto
userFeedBackNotificationPopup
=
new
KUserFeedback
::
NotificationPopup
(
this
);
...
...
@@ -64,7 +64,7 @@ MainWidget *MainWindow::mainWidget() const
void
MainWindow
::
initActions
()
{
KStandardAction
::
quit
(
this
,
&
MainWindow
::
close
,
actionCollection
());
m
Hide
MenuBarAction
=
KStandardAction
::
showMenubar
(
this
,
&
MainWindow
::
slotToggleMenubar
,
actionCollection
());
m
Show
MenuBarAction
=
KStandardAction
::
showMenubar
(
this
,
&
MainWindow
::
slotToggleMenubar
,
actionCollection
());
QAction
*
action
=
KStandardAction
::
keyBindings
(
this
,
&
MainWindow
::
configureKeyBindings
,
actionCollection
());
action
->
setWhatsThis
(
i18nc
(
"@info:whatsthis"
,
...
...
@@ -107,11 +107,11 @@ void MainWindow::newToolbarConfig()
void
MainWindow
::
slotToggleMenubar
(
bool
dontShowWarning
)
{
if
(
menuBar
())
{
if
(
m
Hide
MenuBarAction
->
isChecked
())
{
if
(
m
Show
MenuBarAction
->
isChecked
())
{
menuBar
()
->
show
();
}
else
{
if
(
!
dontShowWarning
)
{
const
QString
accel
=
m
Hide
MenuBarAction
->
shortcut
().
toString
();
const
QString
accel
=
m
Show
MenuBarAction
->
shortcut
().
toString
();
KMessageBox
::
information
(
this
,
i18n
(
"<qt>This will hide the menu bar completely."
" You can show it again by typing %1.</qt>"
,
...
...
@@ -121,6 +121,6 @@ void MainWindow::slotToggleMenubar(bool dontShowWarning)
}
menuBar
()
->
hide
();
}
Settings
::
self
()
->
setShowMenuBar
(
m
Hide
MenuBarAction
->
isChecked
());
Settings
::
self
()
->
setShowMenuBar
(
m
Show
MenuBarAction
->
isChecked
());
}
}
src/mainwindow.h
View file @
6f1d3582
...
...
@@ -32,6 +32,6 @@ private:
void
initActions
();
MainWidget
*
mMainWidget
=
nullptr
;
KToggleAction
*
m
Hide
MenuBarAction
=
nullptr
;
KToggleAction
*
m
Show
MenuBarAction
=
nullptr
;
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment