Code Monkey home page Code Monkey logo

guid's People

Stargazers

 avatar

Watchers

 avatar

guid's Issues

Can't add text only in forms

We can set the form label with --text and it'll be displayed at the top of the dialog, but we can't add text without field anywhere in the form.

Set font underline

We should be able to set font underline using an argument --underline.

Add arguments about text formatting

Even if we can manually add text formatting (ex.: --add-text="<strong>Lorem ipsum</strong>"), it would be useful to have arguments to set it easily:

  • --bold
  • --italics
  • --font-size=SIZE
  • --foreground-color=COLOR
  • --background-color=COLOR

Example:

guid --forms --add-text="Lorem ipsum" --bold --italics --font-size=12 --foreground-color="#0000FF" --background-color="#FFFF00"

Since the main label is in bold by default, we should have an option to disable bold:

guid --forms --text="Form description/Main label" --no-bold

Argument to set curl path

With --text-info, we can get text from a remote location like this:

guid --text-info --html --url="https://github.com"

curl is used to get content, but it's assumed that curl is in PATH. We should be able to specify a custom path to the curl binary.

Argument to set list height

We should be able to set the height of lists created with --list or inside forms with --forms --add-list=LABEL.

Argument to set variable prefix before field output

We should be able to set variable prefix before each field output. For example, instead of this output:

2020-12-12|Abcde

it could be:

date=2020-12-12|pseudo=Abcde

using a new argument --var=NAME:

guid --forms --add-calendar="Choose a date" --var="date" --add-entry="Type your pseudo" --var="pseudo"

Can't add scales inside forms

Scales can be added individually as independent dialogs with --scale but we can't add them as fields inside forms.

Allow to set text alignment

When adding text displayed alone in a row, we can't set alignment. Example:

$ guid --entry --text="Text"

Example inside forms:

$ guid --forms --add-entry="Entry text" --text="Text"

Text is always left aligned.

Option to return all values from a list

Instead of returning only selected rows in a list, we should be able to return all rows. It would be useful with editable lists to get all values, updated or not.

Add argument to set list row separator

The property guid_separator can be set with the argument --separator. Example:

if (args.at(i) == "--separator")
    dlg->setProperty("guid_separator", NEXT_ARG);

It's used to separate field values on the console output. Example:

$ zenity --forms \
         --add-entry="Field 1" \
         --add-entry="Field 2"
field 1 value|field 2 value
$ zenity --forms \
         --add-entry="Field 1" \
         --add-entry="Field 2" \
         --separator=";"
field 1 value;field 2 value

Let's say our form contains a list. The list itself is only a field, like any other one added with --add-FIELD_TYPE:

$ zenity --forms \
         --add-entry="Field 1" \
         --add-entry="Field 2" \
         --add-list="Field 3" --list-values="f3v1|f3v2|f3v3|f3v4" --column-values="f3c1|f3c2"
field 1 value|field 2 value|f3v3f3v4
$ zenity --forms \
         --add-entry="Field 1" \
         --add-entry="Field 2" \
         --add-list="Field 3" --list-values="f3v1|f3v2|f3v3|f3v4" --column-values="f3c1|f3c2" \
         --separator=";"
field 1 value;field 2 value;f3v3f3v4

The "no separator" bug (f3v3f3v4) was fixed with #2, so we now have:

$ guid --forms \
       --add-entry="Field 1" \
       --add-entry="Field 2" \
       --add-list="Field 3" --list-values="f3v1|f3v2|f3v3|f3v4" --column-values="f3c1|f3c2"
field 1 value|field 2 value|f3v3,f3v4
$ guid --forms \
       --add-entry="Field 1" \
       --add-entry="Field 2" \
       --add-list="Field 3" --list-values="f3v1|f3v2|f3v3|f3v4" --column-values="f3c1|f3c2" \
       --separator=";"
field 1 value;field 2 value;f3v3,f3v4

Thanks to #4, the argument --multiple can be used with lists inside forms. With Zenity, we had:

$ zenity --forms \
         --add-entry="Field 1" \
         --add-entry="Field 2" \
         --add-list="Field 3" --list-values="f3v1|f3v2|f3v3|f3v4" --column-values="f3c1|f3c2" \
         --multiple
--multiple is not supported for this dialog

With guid, the argument --multiple can be used. Commas (,) are used to separate values from the same row. The GUI dialog is like this:

Field 1: [          ] <----- First text field
Field 2: [          ] <----- Second text field
Field 3: f3c1 | f3c2  <----- List column header for field 3
         -----------
         f3v1 | f3v2  <----- First list row for field 3
         f3v3 | f3v4  <----- Second list row for field 3

The result:

$ guid --forms \
       --add-entry="Field 1" \
       --add-entry="Field 2" \
       --add-list="Field 3" --list-values="f3v1|f3v2|f3v3|f3v4" --column-values="f3c1|f3c2" \
       --multiple
field 1 value|field 2 value|f3v1,f3v2,f3v3,f3v4

When multiple rows are selected, we should be able to separate them while keeping a specific separator for list values (,) and for fields (| by default). A new argument --list-row-separator could be created. Example:

$ guid --forms \
       --add-entry="Field 1" \
       --add-entry="Field 2" \
       --add-list="Field 3" --list-values="f3v1|f3v2|f3v3|f3v4" --column-values="f3c1|f3c2" \
       --multiple \
       --separator=";" \
       --list-row-separator="~"
field 1 value;field 2 value;f3v1,f3v2~f3v3,f3v4

Can't add fields in a two-column layout

We can add fields one after the other, each on its own row:

Label 1    [                    ]
Label 2    [                    ]
Label 3    [                    ]
Label 4    [                    ]

but we can't add two fields on the same row:

Label 1    [                    ]
Label 2    [                    ]    Label 3    [                    ]
Label 4    [                    ]

Set text entry width

We can use the argument --width to set the window width, but there's no argument to set a text entry width.

Align text set with `--add-text`

The argument --align can only be used to align the dialog label (added with --text). We should be able to align text added with --add-text.

Add an argument to set image and text in a QLabel

We can add a new label with image and text, but it must be done manually by adding HTML content in the label created. We should have a shortcut to ease the process, for example a new argument --add-image-text.

Output prefix

We should be able to set a prefix before each line output to the console, with a specific prefix for stdout and another for stderr.

Monitor file changes for combo and list values

When a combo or a list gets values from a file specified with --combo-values-from-file=PATH or --list-values-from-file=PATH, we should have an option to monitor file changes and update the combo or the list.

Separator for list values in forms

Zenity is inconsistent about separators between list values in forms:

Example without separator (Value 3Value 4):

$ zenity --forms --add-entry="Test entry 1" --add-list="Test list" --column-values="Column 1|Column 2" --list-values="Value 1|Value 2|Value 3|Value 4"
entry 1|Value 3Value 4

Example with separator (Value 3,Value 4,):

$ zenity --forms --add-entry="Test entry 1" --add-list="Test list" --column-values="Column 1|Column 2" --list-values="Value 1|Value 2|Value 3|Value 4" --add-entry="Test entry 2"
entry 1|Value 3,Value 4,|entry 2

With guid, both examples currently return no separator:

$ guid --forms --add-entry="Test entry 1" --add-list="Test list" --column-values="Column 1|Column 2" --list-values="Value 1|Value 2|Value 3|Value 4"
entry 1|Value 3Value 4 
$ guid --forms --add-entry="Test entry 1" --add-list="Test list" --column-values="Column 1|Column 2" --list-values="Value 1|Value 2|Value 3|Value 4" --add-entry="Test entry 2"
entry 1|Value 3Value 4|entry 2

Example outside forms:

$ zenity --list --text="Test list" --column="Column 1" --column="Column 2" "Value 1" "Value 2" "Value 3" "Value 4" --print-column=ALL
Value 3|Value 4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.