[Github-comments] [geany-plugins] Use gtk_menu_shell_insert() to add the VC menu item to the menubar (#383)

Colomban Wendling notifications at xxxxx
Sun Mar 6 16:19:46 UTC 2016


>  
>  		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);

leaks `menubar_children` https://developer.gnome.org/gtk3/stable/GtkContainer.html#gtk-container-get-children

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/383/files#r55143127
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160306/0e912f2c/attachment.html>


More information about the Github-comments mailing list