mirror of https://github.com/GNOME/gimp.git
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:
parent
30c5e20ce7
commit
10742367c5
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue