<p>In <a href="https://github.com/geany/geany-plugins/pull/383#discussion_r55143645">geanyvc/src/geanyvc.c</a>:</p>
<pre style='color:#555'>>  
>            menubar = GTK_MENU_SHELL(
>                            ui_lookup_widget(geany->main_widgets->window, "menubar1"));
>  
>            menu_vc = gtk_menu_item_new_with_mnemonic(_("_VC"));
> -          gtk_menu_shell_append(menubar, menu_vc);
> +          menubar_children = gtk_container_get_children(GTK_CONTAINER(menubar));
> +          gtk_menu_shell_insert(menubar, menu_vc, g_list_length(menubar_children) - 1);
</pre>
<p>Nice catch! I didn't check it, usually you don't get references from gtk_/g_* calls unless calling constructors.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany-plugins/pull/383/files#r55143645">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ8P5btLgMbDGQcJFx14oyzYRwVsOks5pqwM_gaJpZM4HqOW4.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany-plugins/pull/383/files#r55143645"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>