<div style="font-family: Arial, sans-serif; font-size: 14px;"><span>Yes, as explained in the comments in <span><a target="_blank" rel="noreferrer nofollow noopener" href="https://gitlab.xfce.org/apps/mousepad/-/blob/master/mousepad/resources/gtk/menus-common.ui?ref_type=heads">https://gitlab.xfce.org/apps/mousepad/-/blob/master/mousepad/resources/gtk/menus-common.ui</a></span> , unfortunately there is no syntax for sharing GMenu elements/sections in GtkBuilder, so I cobbled one together using what I had available: the ability to specify arbitrary attributes. Then there’s still a bit of work to do in C to set all of this up (and update it as needed): GMenu is a fairly low-level API.</span><div><br></div><div><span>Sharing doesn’t just happen between the menu bar and the toolbar; there’s also the tab menu and the text view’s context menu.</span></div></div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div>
<div style="font-family: Arial, sans-serif; font-size: 14px;" class="protonmail_signature_block">
<div class="protonmail_signature_block-user">
Cheers,<br>Gaël</div></div>
<div style="font-family: Arial, sans-serif; font-size: 14px;"><br><div class="protonmail_quote">
On Thursday, June 25th, 2026 at 8:20 PM, Robert <user6402088@gmail.com> wrote:<br>
<blockquote class="protonmail_quote" type="cite">
<div dir="ltr">Good day,<div><br></div><div>in mousepad there are various "shared menu" lines of code. Can you confirm that this concept is because some menu items are also toolbar items. <span style="background-color: transparent;">Also the code in mousepad-application.c -> mousepad_application_set_shared_menu_parts is used to wire-up the shared menus?</span></div><div><br></div><div>e.g. File -> New is also on the toolbar "Create a new document"? </div><div><br></div><div><img alt="image.png" width="511" height="366" class="proton-embedded" src="cid:ii_mqtwvauu0"><br></div><div><br></div><div>Or in case that is wrong what are shared menu parts? </div><div><br></div><div>Here links to some of the code that I am refering to</div><div><br></div><div><code>mousepad_application_set_shared_menu_parts</code></div><div><a href="https://gitlab.xfce.org/apps/mousepad/-/blob/master/mousepad/mousepad-application.c?ref_type=heads#L1420" style="word-break: break-word;" target="_blank" rel="noreferrer nofollow noopener">https://gitlab.xfce.org/apps/mousepad/-/blob/master/mousepad/mousepad-application.c?ref_type=heads#L1420</a></div><div><img alt="image.png" width="511" height="35" class="proton-embedded" src="cid:ii_mqtwxzzj1"><br></div><div><br></div><div>menus.ui</div><div><a href="https://gitlab.xfce.org/apps/mousepad/-/blob/master/mousepad/resources/gtk/menus.ui?ref_type=heads#L23" style="word-break: break-word;" target="_blank" rel="noreferrer nofollow noopener">https://gitlab.xfce.org/apps/mousepad/-/blob/master/mousepad/resources/gtk/menus.ui?ref_type=heads#L23</a> </div><div></div><img alt="image.png" width="511" height="75" class="proton-embedded" src="cid:ii_mqtx3gk33"><br><div></div><div><div><br></div><div>Kind regards and thanks in advance for helping</div><div>Robert</div></div></div>
</blockquote><br>
</div></div>