Skip to content

Legible rendering of Function Generator strings in .dissco and GUI view #3

Description

@passyur

Request

Make the XML output for <Fun> tag constructs pretty while keeping the view in the text field legible.

I.e., the text field should not render tabs or new lines (and should disallow their entry via the text field*), the text view (in the Function Generator window) should, and the text view contents (i.e., text including the tabs and new lines) should be written to the .dissco file when saved.

Current state

Currently, the GTK view for Function Generator looks something like this:

Image

And the text field where you access this view (via Insert Function), something like this:

Image

One can imagine formatting it like this in the XML, and have that also appear in the text view for the first attachedimage:

<Fun>
	<Name>EnvLib</Name>
	<Env>1</Env>
	<Scale>1.0</Scale>
</Fun>

But in the .dissco file, the XML will look like:

<Fun><Name>EnvLib</Name><Env>1</Env><Scale>1.0</Scale></Fun>

Which becomes troublesome when you have, say, more than 3 envelopes for a particular Spectrum, since this will appear as

<Fun><Name>EnvLib</Name><Env>1</Env><Scale>1.0</Scale><Name>EnvLib</Name><Env>2</Env><Scale>1.0</Scale><Name>EnvLib</Name><Env>3</Env><Scale>1.0</Scale><Name>EnvLib</Name><Env>4</Env><Scale>1.0</Scale></Fun>

*In GTK, tabs are swallowed for tabbing navigation, and new lines (via Enter) are not accepted already.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GTKRelated to the GTK LASSIE interfaceQtRelated to the Qt LASSIE interfaceenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions