Commit becd1d19 authored by André's avatar André Committed by Philipp Hörist

Move global menu (appmenu) back to menubar

AppMenu was really used by Gnome Shell only. Since its retirement with
Gnome Shell 3.32 there is no need to keep the 'prefers_app_menu' switch.
parent 6517aea1
Pipeline #4954 passed with stages
in 2 minutes and 55 seconds
......@@ -220,12 +220,6 @@ class GajimApplication(Gtk.Application):
from gajim.gtk.util import get_builder
builder = get_builder('application_menu.ui')
menubar = builder.get_object("menubar")
appmenu = builder.get_object("appmenu")
if app.prefers_app_menu():
self.set_app_menu(appmenu)
else:
# Add it to the menubar instead
menubar.prepend_submenu('Gajim', appmenu)
self.set_menubar(menubar)
def _activate(self, _application):
......
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<menu id="menubar">
<submenu>
<attribute name="label">Gajim</attribute>
<section>
<item>
<attribute name="label" translatable="yes">Start Chat</attribute>
<attribute name="action">app.start-chat</attribute>
<attribute name="target"></attribute>
</item>
<item>
<attribute name="label" translatable="yes">Create Group Chat</attribute>
<attribute name="action">app.create-groupchat</attribute>
<attribute name="target"></attribute>
</item>
<item>
<attribute name="label" translatable="yes">History Manager</attribute>
<attribute name="action">app.history-manager</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Plugins</attribute>
<attribute name="action">app.plugins</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Preferences</attribute>
<attribute name="action">app.preferences</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Quit</attribute>
<attribute name="action">app.quit</attribute>
</item>
</section>
</submenu>
<submenu>
<attribute name="label" translatable="yes">Accounts</attribute>
</submenu>
......@@ -65,34 +96,4 @@
</section>
</submenu>
</menu>
<menu id="appmenu">
<section>
<item>
<attribute name="label" translatable="yes">Start Chat</attribute>
<attribute name="action">app.start-chat</attribute>
<attribute name="target"></attribute>
</item>
<item>
<attribute name="label" translatable="yes">Create Group Chat</attribute>
<attribute name="action">app.create-groupchat</attribute>
<attribute name="target"></attribute>
</item>
<item>
<attribute name="label" translatable="yes">History Manager</attribute>
<attribute name="action">app.history-manager</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Plugins</attribute>
<attribute name="action">app.plugins</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Preferences</attribute>
<attribute name="action">app.preferences</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Quit</attribute>
<attribute name="action">app.quit</attribute>
</item>
</section>
</menu>
</interface>
......@@ -718,8 +718,6 @@ def build_accounts_menu():
menubar = app.app.get_menubar()
# Accounts Submenu
menu_position = 1
if app.prefers_app_menu():
menu_position = 0
acc_menu = menubar.get_item_link(menu_position, 'submenu')
acc_menu.remove_all()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment