v1cont / yad

Yet Another Dialog
GNU General Public License v3.0
654 stars 58 forks source link

--multi-progress isn't working #202

Open fearlessgeekmedia opened 1 year ago

fearlessgeekmedia commented 1 year ago

For example, if I copy this from https://smokey01.com/yad

eval exec yad --title="xdf" --image=drive-harddisk --text="Disk\ usage:" --buttons-layout=end --width=650 --multi-progress \ $(df -hT $1 | tail -n +2 | awk '{printf "--bar=\"%s (%s - %s) [%s/%s]\" %s ", $7, $1, $2, $4, $3, $6}')

It does not give me the expected results.

fearlessgeekmedia commented 1 year ago

Ubuntu 22.10 has yad version 0.40.0 which does happen to have this working.

v1cont commented 1 year ago

Use --progress instead of --multi-progress

Sun, 04 Dec 2022 10:24:06 -0800 Michael Williams @.***> написав:

For example, if I copy this from https://smokey01.com/yad

eval exec yad --title="xdf" --image=drive-harddisk --text="Disk\ usage:" --buttons-layout=end --width=650 --multi-progress \ $(df -hT $1 | tail -n +2 | awk '{printf "--bar=\"%s (%s - %s) [%s/%s]\" %s ", $7, $1, $2, $4, $3, $6}')

It does not give me the expected results.

-- wbr Victor Ananjevsky @.***>

fearlessgeekmedia commented 1 year ago

Even if it's a window where you want multiple progress bars?

v1cont commented 1 year ago

yes

fearlessgeekmedia commented 1 year ago

Oh, ok. All of the documentation I'm finding on the internet has --multi-progress, which I guess is not part of the newer versions. Thank you for that info.

fearlessgeekmedia commented 1 year ago

OK, I tried ./yad --progress --progress-text="test1" --progress --progress-text="test2" but only the second progress bar with "test2" showed up. So doing multiple progress bars in one window doesn't seem to work, unless I'm doing something wrong here.

fearlessgeekmedia commented 1 year ago

Ah, I figured it out. I just use --bar like I would have as if it were using --multi-progress in older versions.

wildtruc commented 1 year ago

I've the same. In fact, a default single bar is displayed before the others, which creates a shift. It's very clear with this example:

HD_LIST=$(df -hT $1 | tail -n +2 | awk '{printf  "--bar=\"<b>%s</b> ( %s ) <b>%s</b>\" %s% ", $3, $1, $7, $6}')
eval exec yad --image=drive-harddisk --text="Disk usage" --width=650 --progress  \
${HD_LIST[*]}

the first ghost bar is the default single, then come the others. It's very clear when you launch df -hT separatly.