# HG changeset patch
# Node ID 15bff6c63437
# Parent  e82d07ed6862
diff --git a/pidgin/pidginconversationwindow.c b/pidgin/pidginconversationwindow.c
--- a/pidgin/pidginconversationwindow.c
+++ b/pidgin/pidginconversationwindow.c
@@ -161,9 +161,6 @@
 
 static void
 pidgin_conversation_window_init(PidginConversationWindow *window) {
-	GtkBuilder *builder = NULL;
-	GtkWidget *menubar = NULL;
-	GMenuModel *model = NULL;
 	GtkEventController *key = NULL;
 
 	gtk_widget_init_template(GTK_WIDGET(window));
@@ -171,17 +168,6 @@
 	gtk_window_set_application(GTK_WINDOW(window),
 	                           GTK_APPLICATION(g_application_get_default()));
 
-	/* setup our menu */
-	builder = gtk_builder_new_from_resource("/im/pidgin/Pidgin3/Conversations/menu.ui");
-
-	model = (GMenuModel *)gtk_builder_get_object(builder, "conversation");
-	menubar = gtk_menu_bar_new_from_model(model);
-
-	gtk_box_pack_start(GTK_BOX(window->vbox), menubar, FALSE, FALSE, 0);
-	gtk_widget_show(menubar);
-
-	g_object_unref(G_OBJECT(builder));
-
 	key = gtk_event_controller_key_new(GTK_WIDGET(window));
 	gtk_event_controller_set_propagation_phase(key, GTK_PHASE_CAPTURE);
 	g_signal_connect(G_OBJECT(key), "key-pressed",
diff --git a/pidgin/resources/BuddyList/window.ui b/pidgin/resources/BuddyList/window.ui
--- a/pidgin/resources/BuddyList/window.ui
+++ b/pidgin/resources/BuddyList/window.ui
@@ -50,42 +50,6 @@
                     <property name="visible">True</property>
                     <property name="can-focus">False</property>
                     <child>
-                      <object class="GtkMenuItem" id="new_message">
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                        <property name="action-name">app.new-message</property>
-                        <property name="label" translatable="yes">New Instant _Message...</property>
-                        <property name="use-underline">True</property>
-                        <accelerator key="m" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="join_chat">
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                        <property name="action-name">app.join-chat</property>
-                        <property name="label" translatable="yes">Join a _Chat...</property>
-                        <property name="use-underline">True</property>
-                        <accelerator key="c" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="get_user_info">
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                        <property name="action-name">app.get-user-info</property>
-                        <property name="label" translatable="yes">Get User _Info...</property>
-                        <property name="use-underline">True</property>
-                        <accelerator key="i" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkSeparatorMenuItem">
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                      </object>
-                    </child>
-                    <child>
                       <object class="GtkMenuItem">
                         <property name="visible">True</property>
                         <property name="can-focus">False</property>
@@ -152,56 +116,6 @@
                         <property name="use-underline">True</property>
                       </object>
                     </child>
-                    <child>
-                      <object class="GtkSeparatorMenuItem">
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="add_buddy">
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                        <property name="action-name">app.add-buddy</property>
-                        <property name="label" translatable="yes">_Add Buddy...</property>
-                        <property name="use-underline">True</property>
-                        <accelerator key="b" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="add_chat">
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                        <property name="action-name">app.add-chat</property>
-                        <property name="label" translatable="yes">Add C_hat...</property>
-                        <property name="use-underline">True</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="add_group">
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                        <property name="action-name">app.add-group</property>
-                        <property name="label" translatable="yes">Add _Group...</property>
-                        <property name="use-underline">True</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkSeparatorMenuItem">
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="quit">
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                        <property name="action-name">app.quit</property>
-                        <property name="label" translatable="yes">_Quit</property>
-                        <property name="use-underline">True</property>
-                        <accelerator key="q" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                      </object>
-                    </child>
                   </object>
                 </child>
               </object>
@@ -215,83 +129,6 @@
               </object>
             </child>
             <child>
-              <object class="GtkMenuItem">
-                <property name="visible">True</property>
-                <property name="can-focus">False</property>
-                <property name="label" translatable="yes">_Tools</property>
-                <property name="use-underline">True</property>
-                <child type="submenu">
-                  <object class="GtkMenu">
-                    <property name="visible">True</property>
-                    <property name="can-focus">False</property>
-                    <child>
-                      <object class="GtkMenuItem" id="preferences">
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                        <property name="action-name">app.preferences</property>
-                        <property name="label" translatable="yes">Pr_eferences</property>
-                        <property name="use-underline">True</property>
-                        <accelerator key="p" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="privacy">
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                        <property name="action-name">app.privacy</property>
-                        <property name="label" translatable="yes">Pr_ivacy</property>
-                        <property name="use-underline">True</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="set_mood">
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                        <property name="action-name">app.set-mood</property>
-                        <property name="label" translatable="yes">Set _Mood</property>
-                        <property name="use-underline">True</property>
-                        <accelerator key="d" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="status_manager">
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                        <property name="action-name">app.status-manager</property>
-                        <property name="label" translatable="yes">_Statuses</property>
-                        <property name="use-underline">True</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkSeparatorMenuItem">
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="file_transfers">
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                        <property name="action-name">app.file-transfers</property>
-                        <property name="label" translatable="yes">_File Transfers</property>
-                        <property name="use-underline">True</property>
-                        <accelerator key="t" signal="activate" modifiers="GDK_CONTROL_MASK"/>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="room_list">
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                        <property name="action-name">app.room-list</property>
-                        <property name="label" translatable="yes">R_oom List</property>
-                        <property name="use-underline">True</property>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-              </object>
-            </child>
-            <child>
               <object class="GtkMenuItem" id="plugins">
                 <property name="visible">True</property>
                 <property name="can-focus">False</property>
@@ -299,47 +136,6 @@
                 <property name="use-underline">True</property>
               </object>
             </child>
-            <child>
-              <object class="GtkMenuItem">
-                <property name="visible">True</property>
-                <property name="can-focus">False</property>
-                <property name="label" translatable="yes">_Help</property>
-                <property name="use-underline">True</property>
-                <child type="submenu">
-                  <object class="GtkMenu">
-                    <property name="visible">True</property>
-                    <property name="can-focus">False</property>
-                    <child>
-                      <object class="GtkMenuItem" id="online_help">
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                        <property name="action-name">app.online-help</property>
-                        <property name="label" translatable="yes">Online _Help</property>
-                        <property name="use-underline">True</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="debug">
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                        <property name="action-name">app.debug</property>
-                        <property name="label" translatable="yes">_Debug Window</property>
-                        <property name="use-underline">True</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="about">
-                        <property name="visible">True</property>
-                        <property name="can-focus">False</property>
-                        <property name="action-name">app.about</property>
-                        <property name="label" translatable="yes">_About</property>
-                        <property name="use-underline">True</property>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-              </object>
-            </child>
           </object>
           <packing>
             <property name="expand">False</property>
diff --git a/pidgin/resources/Conversations/menu.ui b/pidgin/resources/gtk/menus.ui
rename from pidgin/resources/Conversations/menu.ui
rename to pidgin/resources/gtk/menus.ui
--- a/pidgin/resources/Conversations/menu.ui
+++ b/pidgin/resources/gtk/menus.ui
@@ -4,10 +4,10 @@
 Pidgin - Internet Messenger
 Copyright (C) Pidgin Developers <devel@pidgin.im>
 
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,9 +15,7 @@
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-
+along with this program; if not, see <https://www.gnu.org/licenses/>.
 -->
 <interface>
   <requires lib="gtk+" version="3.22"/>
@@ -25,9 +23,54 @@
   <!-- interface-name Pidgin -->
   <!-- interface-description Internet Messenger -->
   <!-- interface-copyright Pidgin Developers <devel@pidgin.im> -->
-  <menu id="conversation">
+  <menu id="menubar">
+    <submenu>
+      <attribute name="label" translatable="yes">_Buddies</attribute>
+
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">New Instant _Message</attribute>
+          <attribute name="action">app.new-message</attribute>
+          <attribute name="accel">&lt;Primary&gt;M</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">Join a _Chat...</attribute>
+          <attribute name="action">app.join-chat</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">Get User _Info...</attribute>
+          <attribute name="action">app.get-user-info</attribute>
+          <attribute name="accel">&lt;Primary&gt;I</attribute>
+        </item>
+      </section>
+
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">_Add Buddy...</attribute>
+          <attribute name="action">app.add-buddy</attribute>
+          <attribute name="accel">&lt;Primary&gt;B</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">_Add Chat...</attribute>
+          <attribute name="action">app.add-chat</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">_Add Group...</attribute>
+          <attribute name="action">app.add-group</attribute>
+        </item>
+      </section>
+
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">_Quit</attribute>
+          <attribute name="action">app.quit</attribute>
+          <attribute name="accel">&lt;Primary&gt;Q</attribute>
+        </item>
+      </section>
+    </submenu>
     <submenu>
       <attribute name="label" translatable="yes">_Conversation</attribute>
+
       <section>
         <item>
           <attribute name="label" translatable="yes">New Instant _Message...</attribute>
@@ -39,6 +82,7 @@
           <attribute name="action">app.join-chat</attribute>
         </item>
       </section>
+
       <section>
         <item>
           <attribute name="label" translatable="yes">_Find...</attribute>
@@ -51,9 +95,11 @@
           <attribute name="accel">&lt;Primary&gt;L</attribute>
         </item>
       </section>
+
       <section>
         <submenu>
           <attribute name="label" translatable="yes">M_edia</attribute>
+
           <section>
             <item>
               <attribute name="label" translatable="yes">_Audio Call</attribute>
@@ -70,6 +116,7 @@
           </section>
         </submenu>
       </section>
+
       <section>
         <item>
           <attribute name="label" translatable="yes">Se_nd File...</attribute>
@@ -86,9 +133,11 @@
         </item>
         <submenu>
           <attribute name="label" translatable="yes">M_ore</attribute>
+
           <section id="more"></section>
         </submenu>
       </section>
+
       <section>
         <item>
           <attribute name="label" translatable="yes">Al_ias...</attribute>
@@ -103,6 +152,7 @@
           <attribute name="action">win.save-contact</attribute>
         </item>
       </section>
+
       <section>
         <item>
           <attribute name="label" translatable="yes">Insert Lin_k...</attribute>
@@ -113,6 +163,7 @@
           <attribute name="action">win.insert-image</attribute>
         </item>
       </section>
+
       <section>
         <item>
           <attribute name="label" translatable="yes">_Close</attribute>
@@ -121,5 +172,59 @@
         </item>
       </section>
     </submenu>
+    <submenu>
+      <attribute name="label" translatable="yes">_Tools</attribute>
+
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">Pr_eferences</attribute>
+          <attribute name="action">app.preferences</attribute>
+          <attribute name="accel">&lt;Primary&gt;P</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">Pr_ivacy</attribute>
+          <attribute name="action">app.privacy</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">Set _Mood</attribute>
+          <attribute name="action">app.set-mood</attribute>
+          <attribute name="accel">&lt;Primary&gt;D</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">_Statuses</attribute>
+          <attribute name="action">app.status-manager</attribute>
+        </item>
+      </section>
+
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">_File Transfers</attribute>
+          <attribute name="action">app.file-transfers</attribute>
+          <attribute name="accel">&lt;Primary&gt;T</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">R_oom List</attribute>
+          <attribute name="action">app.room-list</attribute>
+        </item>
+      </section>
+    </submenu>
+    <submenu>
+      <attribute name="label" translatable="yes">_Help</attribute>
+
+      <section>
+        <item>
+          <attribute name="label" translatable="yes">Online _Help</attribute>
+          <attribute name="action">app.online-help</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">_Debug Window</attribute>
+          <attribute name="action">app.debug</attribute>
+        </item>
+        <item>
+          <attribute name="label" translatable="yes">_About</attribute>
+          <attribute name="action">app.about</attribute>
+        </item>
+      </section>
+    </submenu>
   </menu>
 </interface>
diff --git a/pidgin/resources/pidgin.gresource.xml b/pidgin/resources/pidgin.gresource.xml
--- a/pidgin/resources/pidgin.gresource.xml
+++ b/pidgin/resources/pidgin.gresource.xml
@@ -14,7 +14,6 @@
     <file compressed="true">BuddyList/window.ui</file>
     <file compressed="true">Conversations/infopane.ui</file>
     <file compressed="true">Conversations/invite_dialog.ui</file>
-    <file compressed="true">Conversations/menu.ui</file>
     <file compressed="true">Conversations/tab-label.css</file>
     <file compressed="true">Conversations/window.ui</file>
     <file compressed="true">Debug/debug.ui</file>
@@ -34,6 +33,7 @@
     <file compressed="true">Whiteboard/whiteboard.ui</file>
     <file compressed="true">Xfer/xfer.ui</file>
     <file compressed="true">closebutton.ui</file>
+    <file compressed="true">gtk/menus.ui</file>
     <file>icons/16x16/status/pidgin-user-available.png</file>
     <file>icons/16x16/status/pidgin-user-away.png</file>
     <file>icons/16x16/status/pidgin-user-busy.png</file>
