[gimp] app: allow plug-ins to register procedures in the <MyPaintBrushes> menu



commit 784b37d11526852454fac445688d2c769b7d1658
Author: Michael Natterer <mitch gimp org>
Date:   Sat Jan 2 00:53:32 2016 +0100

    app: allow plug-ins to register procedures in the <MyPaintBrushes> menu

 app/menus/plug-in-menus.c         |    5 +++++
 app/plug-in/gimppluginprocedure.c |   20 +++++++++++---------
 2 files changed, 16 insertions(+), 9 deletions(-)
---
diff --git a/app/menus/plug-in-menus.c b/app/menus/plug-in-menus.c
index 8da0ca4..3f9ddd9 100644
--- a/app/menus/plug-in-menus.c
+++ b/app/menus/plug-in-menus.c
@@ -323,6 +323,11 @@ plug_in_menus_menu_path_added (GimpPlugInProcedure *plug_in_proc,
           plug_in_menus_add_proc (manager, "/dynamics-popup",
                                   plug_in_proc, menu_path);
         }
+      else if (! strcmp (manager->name, "<MyPaintBrushes>"))
+        {
+          plug_in_menus_add_proc (manager, "/mypaint-brushes-popup",
+                                  plug_in_proc, menu_path);
+        }
       else if (! strcmp (manager->name, "<Gradients>"))
         {
           plug_in_menus_add_proc (manager, "/gradients-popup",
diff --git a/app/plug-in/gimppluginprocedure.c b/app/plug-in/gimppluginprocedure.c
index 238e537..8cfc08a 100644
--- a/app/plug-in/gimppluginprocedure.c
+++ b/app/plug-in/gimppluginprocedure.c
@@ -607,13 +607,14 @@ gimp_plug_in_procedure_add_menu_path (GimpPlugInProcedure  *proc,
           goto failure;
         }
     }
-  else if (g_str_has_prefix (menu_path, "<Brushes>")     ||
-           g_str_has_prefix (menu_path, "<Dynamics>")    ||
-           g_str_has_prefix (menu_path, "<Gradients>")   ||
-           g_str_has_prefix (menu_path, "<Palettes>")    ||
-           g_str_has_prefix (menu_path, "<Patterns>")    ||
-           g_str_has_prefix (menu_path, "<ToolPresets>") ||
-           g_str_has_prefix (menu_path, "<Fonts>")       ||
+  else if (g_str_has_prefix (menu_path, "<Brushes>")        ||
+           g_str_has_prefix (menu_path, "<Dynamics>")       ||
+           g_str_has_prefix (menu_path, "<MyPaintBrushes>") ||
+           g_str_has_prefix (menu_path, "<Gradients>")      ||
+           g_str_has_prefix (menu_path, "<Palettes>")       ||
+           g_str_has_prefix (menu_path, "<Patterns>")       ||
+           g_str_has_prefix (menu_path, "<ToolPresets>")    ||
+           g_str_has_prefix (menu_path, "<Fonts>")          ||
            g_str_has_prefix (menu_path, "<Buffers>"))
     {
       if ((procedure->num_args < 1) ||
@@ -634,8 +635,9 @@ gimp_plug_in_procedure_add_menu_path (GimpPlugInProcedure  *proc,
                    "Use either \"<Image>\", "
                    "\"<Layers>\", \"<Channels>\", \"<Vectors>\", "
                    "\"<Colormap>\", \"<Brushes>\", \"<Dynamics>\", "
-                   "\"<Gradients>\", \"<Palettes>\", \"<Patterns>\", "
-                   "\"<ToolPresets>\", \"<Fonts>\" or \"<Buffers>\".",
+                   "\"<MyPaintBrushes>\", \"<Gradients>\", \"<Palettes>\", "
+                   "\"<Patterns>\", \"<ToolPresets>\", \"<Fonts>\" "
+                   "or \"<Buffers>\".",
                    basename, gimp_file_get_utf8_name (proc->file),
                    gimp_object_get_name (proc),
                    menu_path);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]