static void gimp_gegl_tool_operation_changed (GtkWidget *widget, GimpGeglTool *tool) { GtkTreeModel *model; GtkTreeIter iter; gchar *operation; if (! gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter)) return; model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget)); gtk_tree_model_get (model, &iter, COLUMN_NAME, &operation, -1); if (operation) { const gchar *description; description = gegl_operation_get_key (operation, "description"); if (description) { gtk_label_set_text (GTK_LABEL (tool->description_label), description); gtk_widget_show (tool->description_label); } else { gtk_widget_hide (tool->description_label); } gimp_operation_tool_set_operation (GIMP_OPERATION_TOOL (tool), operation, NULL); g_free (operation); } }
static void gimp_gegl_tool_operation_changed (GtkWidget *widget, GimpGeglTool *tool) { GtkTreeModel *model; GtkTreeIter iter; gchar *operation; if (! gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter)) return; model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget)); gtk_tree_model_get (model, &iter, COLUMN_NAME, &operation, -1); if (operation) { gimp_operation_tool_set_operation (GIMP_OPERATION_TOOL (tool), operation, NULL); g_free (operation); } }