Philipp Hörist pushed to branch layout at gajim / gajim


Commits:
4cc414d0 by Philipp Hörist at 2025-06-17T20:43:11+02:00
change: Menu: Move help menu into header bar button

- - - - -


2 changed files:

- gajim/data/gui/main.ui
- gajim/gtk/menus.py


Changes:

=====================================
gajim/data/gui/main.ui
=====================================
@@ -1,9 +1,53 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <requires lib="gtk" version="4.0"/>
+  <menu id='help-menu'>
+    <section>
+      <item>
+        <attribute name='label' translatable='yes'>_Wiki (Online)</attribute>
+        <attribute name='action'>app.content</attribute>
+      </item>
+      <item>
+        <attribute name='label' translatable='yes'>FA_Q (Online)</attribute>
+        <attribute name='action'>app.faq</attribute>
+      </item>
+      <item>
+        <attribute name='label' translatable='yes'>_Privacy Policy 
(Online)</attribute>
+        <attribute name='action'>app.privacy-policy</attribute>
+      </item>
+      <item>
+        <attribute name='label' translatable='yes'>_Join Support 
Chat</attribute>
+        <attribute name='action'>app.join-support-chat</attribute>
+      </item>
+      <item>
+        <attribute name='label' translatable='yes'>_Keyboard 
Shortcuts</attribute>
+        <attribute name='action'>app.shortcuts</attribute>
+      </item>
+      <item>
+        <attribute name='label' translatable='yes'>_Features</attribute>
+        <attribute name='action'>app.features</attribute>
+      </item>
+      <item>
+        <attribute name='label' translatable='yes'>_About</attribute>
+        <attribute name='action'>app.about</attribute>
+      </item>
+    </section>
+  </menu>
   <object class="AdwToolbarView" id="main_view">
     <child type="top">
-      <object class="AdwHeaderBar" />
+      <object class="AdwHeaderBar">
+        <child type="end">
+          <object class="GtkMenuButton">
+            <property name="tooltip-text">Help</property>
+            <property name="icon-name">help-faq-symbolic</property>
+            <property name="popover">
+              <object class="GtkPopoverMenu">
+                <property name="menu-model">help-menu</property>
+              </object>
+            </property>
+          </object>
+        </child>
+      </object>
     </child>
     <property name="content">
       <object class="GtkGrid" id="main_grid">


=====================================
gajim/gtk/menus.py
=====================================
@@ -111,17 +111,6 @@ def get_main_menu() -> GajimMenu:
 
     main_menu.add_submenu(_("_Accounts"))
 
-    help_menu_items: MenuItemListT = [
-        (_("_Wiki (Online)"), "app.content", None),
-        (_("FA_Q (Online)"), "app.faq", None),
-        (_("_Privacy Policy (Online)"), "app.privacy-policy", None),
-        (_("Join Support Chat"), "app.join-support-chat", None),
-        (_("_Keyboard Shortcuts"), "app.shortcuts", None),
-        (_("_Features"), "app.features", None),
-        (_("_About"), "app.about", None),
-    ]
-    main_menu.append_submenu(_("_Help"), GajimMenu.from_list(help_menu_items))
-
     return main_menu
 
 



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/4cc414d0c2bf8500e492593e7028f9fe41358ebf

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/4cc414d0c2bf8500e492593e7028f9fe41358ebf
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to