[gimp] app: remove unused gimp_tool_palette_initialize_tools().



commit 0753296b6c81fb1d3f7261eddc84c4cfdc995d89
Author: Jehan <jehan girinstud io>
Date:   Sun Mar 12 17:07:39 2017 +0100

    app: remove unused gimp_tool_palette_initialize_tools().
    
    The function has been unused since commit b5cc2a9.
    Its work is now divided into gimp_tool_palette_set_toolbox() and
    gimp_tool_palette_hierarchy_changed().

 app/widgets/gimptoolpalette.c |   88 -----------------------------------------
 1 files changed, 0 insertions(+), 88 deletions(-)
---
diff --git a/app/widgets/gimptoolpalette.c b/app/widgets/gimptoolpalette.c
index 727eb5b..119508d 100644
--- a/app/widgets/gimptoolpalette.c
+++ b/app/widgets/gimptoolpalette.c
@@ -475,94 +475,6 @@ gimp_tool_palette_tool_button_press (GtkWidget       *widget,
 }
 
 static void
-gimp_tool_palette_initialize_tools (GimpToolPalette *palette)
-{
-  GimpContext            *context;
-  GimpToolInfo           *active_tool;
-  GList                  *list;
-  GSList                 *item_group = NULL;
-  GimpToolPalettePrivate *private    = GET_PRIVATE(palette);
-  GtkWidget              *group;
-
-  group = gtk_tool_item_group_new (_("Tools"));
-  gtk_tool_item_group_set_label_widget (GTK_TOOL_ITEM_GROUP (group), NULL);
-  gtk_container_add (GTK_CONTAINER (palette), group);
-  gtk_widget_show (group);
-
-  context     = gimp_toolbox_get_context (private->toolbox);
-  active_tool = gimp_context_get_tool (context);
-
-  for (list = gimp_get_tool_info_iter (context->gimp);
-       list;
-       list = g_list_next (list))
-    {
-      GimpToolInfo  *tool_info = list->data;
-      GtkToolItem   *item;
-      const gchar   *icon_name;
-      GimpUIManager *ui_manager;
-
-      icon_name = gimp_viewable_get_icon_name (GIMP_VIEWABLE (tool_info));
-
-      item = gtk_radio_tool_button_new (item_group);
-      gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), icon_name);
-      item_group = gtk_radio_tool_button_get_group (GTK_RADIO_TOOL_BUTTON (item));
-      gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
-      gtk_widget_show (GTK_WIDGET (item));
-
-      g_object_bind_property (tool_info, "visible",
-                              item,      "visible-horizontal",
-                              G_BINDING_SYNC_CREATE);
-      g_object_bind_property (tool_info, "visible",
-                              item,      "visible-vertical",
-                              G_BINDING_SYNC_CREATE);
-
-      g_object_set_data (G_OBJECT (tool_info), TOOL_BUTTON_DATA_KEY, item);
-      g_object_set_data (G_OBJECT (item)  ,    TOOL_INFO_DATA_KEY,   tool_info);
-
-      if (tool_info == active_tool)
-        gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (item), TRUE);
-
-      g_signal_connect (item, "toggled",
-                        G_CALLBACK (gimp_tool_palette_tool_button_toggled),
-                        palette);
-
-      g_signal_connect (gtk_bin_get_child (GTK_BIN (item)), "button-press-event",
-                        G_CALLBACK (gimp_tool_palette_tool_button_press),
-                        palette);
-
-      ui_manager = gimp_dock_get_ui_manager (GIMP_DOCK (private->toolbox));
-      if (ui_manager)
-        {
-          GtkAction   *action     = NULL;
-          const gchar *identifier = NULL;
-          gchar       *tmp        = NULL;
-          gchar       *name       = NULL;
-
-          identifier = gimp_object_get_name (tool_info);
-
-          tmp = g_strndup (identifier + strlen ("gimp-"),
-                           strlen (identifier) - strlen ("gimp--tool"));
-          name = g_strdup_printf ("tools-%s", tmp);
-          g_free (tmp);
-
-          action = gimp_ui_manager_find_action (ui_manager, "tools", name);
-          g_free (name);
-
-          if (action)
-            gimp_widget_set_accel_help (GTK_WIDGET (item), action);
-          else
-            gimp_help_set_help_data (GTK_WIDGET (item),
-                                     tool_info->help, tool_info->help_id);
-        }
-    }
-
-  /* We only need to initialize tools once */
-  g_signal_handlers_disconnect_by_func (private->toolbox,
-                                        gimp_tool_palette_initialize_tools,
-                                        palette);
-}
-
-static void
 gimp_tool_palette_icon_size_notify (GimpGuiConfig   *config,
                                     GParamSpec      *pspec,
                                     GimpToolPalette *palette)


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