[gimp/wip/Jehan/layers-dockable-refresh: 33/74] app: one more select_items() implementation which I had forgotten.




commit e839ad6c720842dd82f66cd1e55fae269a8c9f88
Author: Jehan <jehan girinstud io>
Date:   Fri Jun 11 20:21:00 2021 +0200

    app: one more select_items() implementation which I had forgotten.

 app/widgets/gimptooleditor.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
---
diff --git a/app/widgets/gimptooleditor.c b/app/widgets/gimptooleditor.c
index d0ffb355cd..0bc7f52905 100644
--- a/app/widgets/gimptooleditor.c
+++ b/app/widgets/gimptooleditor.c
@@ -79,6 +79,9 @@ static void            gimp_tool_editor_constructed               (GObject
 static gboolean        gimp_tool_editor_select_item               (GimpContainerView          *view,
                                                                    GimpViewable               *viewable,
                                                                    gpointer                    insert_data);
+static gboolean        gimp_tool_editor_select_items              (GimpContainerView          *view,
+                                                                   GList                      *items,
+                                                                   GList                      *paths);
 static void            gimp_tool_editor_set_container             (GimpContainerView          
*container_view,
                                                                    GimpContainer              *container);
 static void            gimp_tool_editor_set_context               (GimpContainerView          
*container_view,
@@ -170,6 +173,7 @@ gimp_tool_editor_view_iface_init (GimpContainerViewInterface *iface)
     parent_view_iface = g_type_default_interface_peek (GIMP_TYPE_CONTAINER_VIEW);
 
   iface->select_item   = gimp_tool_editor_select_item;
+  iface->select_items  = gimp_tool_editor_select_items;
   iface->set_container = gimp_tool_editor_set_container;
   iface->set_context   = gimp_tool_editor_set_context;
 }
@@ -294,6 +298,22 @@ gimp_tool_editor_select_item (GimpContainerView *container_view,
   return result;
 }
 
+static gboolean
+gimp_tool_editor_select_items (GimpContainerView   *container_view,
+                               GList               *viewables,
+                               GList               *paths)
+{
+  GimpToolEditor *tool_editor = GIMP_TOOL_EDITOR (container_view);
+  gboolean        result;
+
+  result = parent_view_iface->select_items (container_view,
+                                            viewables, paths);
+
+  gimp_tool_editor_update_sensitivity (tool_editor);
+
+  return result;
+}
+
 static void
 gimp_tool_editor_set_container (GimpContainerView *container_view,
                                 GimpContainer     *container)


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