Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
476757c8
Commit
476757c8
authored
Sep 24, 2022
by
Christoph Cullmann
🍨
Browse files
use XMLGUI to add hamburger menu
works for KWrite, fails for Kate
parent
ceb24b01
Pipeline
#236438
passed with stage
in 5 minutes and 34 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
apps/lib/data/kateui.rc
View file @
476757c8
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE gui SYSTEM "kpartgui.dtd">
<gui
name=
"kate"
version=
"
98
"
translationDomain=
"kate"
>
<gui
name=
"kate"
version=
"
100
"
translationDomain=
"kate"
>
<MenuBar>
<Menu
name=
"file"
noMerge=
"1"
>
<text>
&
File
</text>
...
...
@@ -151,6 +151,8 @@
<DefineGroup
name=
"find_operations"
/>
<Separator/>
<DefineGroup
name=
"zoom_operations"
/>
<Spacer/>
<Action
name=
"hamburger_menu"
/>
</ToolBar>
<Menu
name=
"ktexteditor_popup"
noMerge=
"1"
>
<DefineGroup
name=
"popup_operations"
/>
...
...
apps/lib/katemainwindow.cpp
View file @
476757c8
...
...
@@ -259,9 +259,7 @@ void KateMainWindow::setupImportantActions()
a
->
setWhatsThis
(
i18n
(
"Open a form to quick open documents."
));
// enable hamburger menu
auto
hamburgerMenu
=
KStandardAction
::
hamburgerMenu
(
nullptr
,
nullptr
,
actionCollection
());
QAction
*
const
seperator
=
toolBar
()
->
addSeparator
();
toolBar
()
->
insertAction
(
seperator
,
hamburgerMenu
);
auto
hamburgerMenu
=
static_cast
<
KHamburgerMenu
*>
(
actionCollection
()
->
addAction
(
KStandardAction
::
HamburgerMenu
,
QStringLiteral
(
"hamburger_menu"
)));
hamburgerMenu
->
setMenuBar
(
menuBar
());
hamburgerMenu
->
setShowMenuBarAction
(
m_paShowMenuBar
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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