<p>In <a href="https://github.com/geany/geany-plugins/pull/324#discussion_r49946891">lineoperations/src/lineoperations.c</a>:</p>
<pre style='color:#555'>> +    gtk_menu_shell_append(GTK_MENU_SHELL(submenu), rmemtyln_item);
> +  gtk_menu_shell_append(GTK_MENU_SHELL(submenu), rmwhspln_item);
> +  gtk_menu_shell_append(GTK_MENU_SHELL(submenu), sep2);
> +  gtk_menu_shell_append(GTK_MENU_SHELL(submenu), sortasc_item);
> +  gtk_menu_shell_append(GTK_MENU_SHELL(submenu), sortdesc_item);
> +
> +  gtk_menu_item_set_submenu(GTK_MENU_ITEM(main_menu_item), submenu);
> +
> +  gtk_container_add(GTK_CONTAINER(geany->main_widgets->tools_menu), main_menu_item);
> +
> +
> +  g_signal_connect(rmdupst_item, "activate", G_CALLBACK(action_rmdupst_item), NULL);
> +  g_signal_connect(rmdupln_item, "activate", G_CALLBACK(action_rmdupln_item), NULL);
> +  g_signal_connect(rmunqln_item, "activate", G_CALLBACK(action_rmunqln_item), NULL);
> +  g_signal_connect(rmemtyln_item, "activate", G_CALLBACK(action_rmemtyln_item), NULL);
> +  g_signal_connect(rmwhspln_item, "activate", G_CALLBACK(action_rmwhspln_item), NULL);
</pre>
<p>Done in <a href="https://github.com/b4n/geany-plugins/commit/f05a05b67e8451d619ec90aa41ebb7c54f6b0039" class="commit-link">b4n@<tt>f05a05b</tt></a> if you're interested.  The patch however depends on the simplified menu building, so you might want to apply it afterward, or just use this as inspiration (or not at all).</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/324/files#r49946891">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ9rcefu6hWJs_oYj9_-dN68TjzqPks5pa5sUgaJpZM4HBhj7.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/324/files#r49946891"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>