app: create a dedicated UI manager for the quick mask popup.

I don't see a reason why the quick mask menu was sharing the same
manager as the image menu (the main top menu and on-canvas). This was
why it was receiving all notifications to create menu items on <Image>,
as registered by plug-ins.

Giving it its dedicated manager makes sure this doesn't happen.
This commit is contained in:
Jehan 2023-06-09 17:20:11 +02:00
parent 30c5e20ce7
commit 10742367c5
2 changed files with 10 additions and 1 deletions

View File

@ -32,6 +32,7 @@
#include "menus/menus.h"
#include "widgets/gimpcairo-wilber.h"
#include "widgets/gimpmenufactory.h"
#include "widgets/gimpuimanager.h"
#include "gimpcanvasitem.h"
@ -349,8 +350,11 @@ gimp_display_shell_quick_mask_button_press (GtkWidget *widget,
if (window)
{
GimpUIManager *manager = menus_get_image_manager_singleton (shell->display->gimp);
Gimp *gimp;
GimpUIManager *manager;
gimp = shell->display->gimp;
manager = gimp_menu_factory_get_manager (menus_get_global_menu_factory (gimp), "<QuickMask>", gimp);
gimp_ui_manager_ui_popup_at_widget (manager,
"/quick-mask-popup",
NULL, NULL,

View File

@ -91,6 +91,11 @@ menus_init (Gimp *gimp)
NULL,
"/image-menubar",
"image-menu", image_menu_setup,
NULL);
gimp_menu_factory_manager_register (global_menu_factory, "<QuickMask>",
"quick-mask",
NULL,
"/quick-mask-popup",
"quick-mask-menu", NULL,
NULL);