dialog with 2 buttons vertically

770 views
Skip to first unread message

Oliver Häßler

unread,
Nov 19, 2015, 8:16:47 AM11/19/15
to yad-common
Hi,

I am trying to get the following dialog to have 2 buttons next to each other.

If you run the following command:

yad --center --align=center --form --field=" Welcome to the final setup Steps of your Notebook. \n Please complete the below steps. \n":LBL --field "Set your Hard drive encryption Password":fbtn --field "Setup your Token":fbtn --field " <b>OR</b> ":LBL --field "<b>I do not</b> need to setup a Token":fbtn --field "Setup your Backup":fbtn --field "\n <b>Optional</b> for technical Users ":LBL --field "Need sudo or extra Packages?":fbtn "" "bash -c luks_cmd" "bash -c token_cmd" "" "bash -c no_token_cmd" "bash -c spideroak_cmd" "" "bash -c sudo_cmd"

I would like to have the "Setup your Token" and "I do not need to setup a Token" next to each other.

I tried to use --columns, but this is not working, as it destroys the whole format.

Any ideas would be great.

Running yad-0.31.3

Thanks
Oliver

Julio C. Neves

unread,
Nov 19, 2015, 9:48:42 AM11/19/15
to yad-c...@googlegroups.com
$ yad --center --align=center --form --field=" Welcome to the final setup Steps of your Notebook. \n Please complete the below steps. ":LBL --field "Set your Hard drive encryption Password":fbtn --field "Setup your Token":fbtn --field " <b>OR</b> ":LBL --field "<b>I do not</b> need to setup a Token":fbtn --field "Setup your Backup":fbtn --field '':LBL '' --field "\n <b>Optional</b> for technical Users ":LBL --field "Need sudo or extra Packages?":fbtn "" "bash -c luks_cmd" "bash -c token_cmd" "" "bash -c no_token_cmd" "bash -c spideroak_cmd" "" "bash -c sudo_cmd" --columns 3

And you can change --field '':LBL '' for a text

Abcs,
Julio
@juliobash

P
róximos cursos de Shell
Cidade         Local Período
São Paulo 4Linux 07/12 a 11/12
Dou treinamento de Shell em qualquer cidade.
Para mais detalhes, me mande um e-mail.


--
You received this message because you are subscribed to the Google Groups "yad-common" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yad-common+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Julio C. Neves

unread,
Nov 19, 2015, 9:55:37 AM11/19/15
to yad-c...@googlegroups.com
Other layout:

$ yad --center --align=center --form --field=" Welcome to the final setup Steps of your Notebook. \n Please complete the below steps. ":LBL --field "Set your Hard drive encryption Password":fbtn --field "Setup your Token":fbtn --field " <b>OR</b> ":LBL --field "<b>I do not</b> need to setup a Token":fbtn --field "Setup your Backup":fbtn --field '<big><b>Optional</b></big>':LBL '' --field '<big><b>for technical Users</b></big>':LBL --field "Need sudo or extra Packages?":fbtn "" "bash -c luks_cmd" "bash -c token_cmd" "" "bash -c no_token_cmd" "bash -c spideroak_cmd" "" "bash -c sudo_cmd" --columns 3


Abcs,
Julio
@juliobash

P
róximos cursos de Shell
Cidade         Local Período
São Paulo 4Linux 07/12 a 11/12
Dou treinamento de Shell em qualquer cidade.
Para mais detalhes, me mande um e-mail.


2015-11-19 11:16 GMT-02:00 Oliver Häßler <o.hae...@gmail.com>:

--

Oliver Häßler

unread,
Nov 19, 2015, 9:58:46 AM11/19/15
to yad-common
Thanks Julio,

as mentioned in the original post, thats what I tried, but does not give me the exact layout that I would like to present.

I also thought about a form inside a form.. so create the 2 buttons as a seperate form, but thats also not working.

Victor Ananjevsky

unread,
Nov 19, 2015, 10:08:56 AM11/19/15
to yad-c...@googlegroups.com
hi

i don't know what your scripts doing at all but maybe checkbox and button with
one script would be a better solution then two buttons with two separate scripts?

you can get a current state of checkbox in script by passing agrument %N to it

В Thu, 19 Nov 2015 06:58:45 -0800 (PST)
Oliver Häßler <o.hae...@gmail.com> писал:

> Thanks Julio,
>
> as mentioned in the original post, thats what I tried, but does not give me
> the exact layout that I would like to present.
>
> I also thought about a form inside a form.. so create the 2 buttons as a
> seperate form, but thats also not working.
>
> On Thursday, November 19, 2015 at 3:55:37 PM UTC+1, @juliobash wrote:
> >
> > Other layout:
> >
> > $ yad --center --align=center --form --field=" Welcome to the final setup
> > Steps of your Notebook. \n Please complete the below steps. ":LBL --field
> > "Set your Hard drive encryption Password":fbtn --field "Setup your
> > Token":fbtn --field " <b>OR</b> ":LBL --field "<b>I do not</b> need to
> > setup a Token":fbtn --field "Setup your Backup":fbtn --field
> > '<big><b>Optional</b></big>':LBL '' --field '<big><b>for technical
> > Users</b></big>':LBL --field "Need sudo or extra Packages?":fbtn "" "bash
> > -c luks_cmd" "bash -c token_cmd" "" "bash -c no_token_cmd" "bash -c
> > spideroak_cmd" "" "bash -c sudo_cmd" --columns 3
> >
> >
> > Abcs,
> > Julio
> > *@juliobash*
> >
> > *Próximos cursos de Shell*
> > *Cidade Local Período*
> > *São Paulo 4Linux
> > <http://www.4linux.com.br/cursos/programacao-em-shell-script> 07**/12** a
> > 11/12 *
> > Dou treinamento de *Shell* em qualquer cidade.
> > Para mais detalhes, me mande um e-mail <javascript:>.
> >
> >
> > 2015-11-19 11:16 GMT-02:00 Oliver Häßler <o.hae...@gmail.com <javascript:>
> > >:
> >
> >> Hi,
> >>
> >> I am trying to get the following dialog to have 2 buttons next to each
> >> other.
> >>
> >> If you run the following command:
> >>
> >> yad --center --align=center --form --field=" Welcome to the final setup
> >> Steps of your Notebook. \n Please complete the below steps. \n":LBL --field
> >> "Set your Hard drive encryption Password":fbtn --field "Setup your
> >> Token":fbtn --field " <b>OR</b> ":LBL --field "<b>I do not</b> need to
> >> setup a Token":fbtn --field "Setup your Backup":fbtn --field "\n
> >> <b>Optional</b> for technical Users ":LBL --field "Need sudo or extra
> >> Packages?":fbtn "" "bash -c luks_cmd" "bash -c token_cmd" "" "bash -c
> >> no_token_cmd" "bash -c spideroak_cmd" "" "bash -c sudo_cmd"
> >>
> >> I would like to have the "Setup your Token" and "I do not need to setup a
> >> Token" next to each other.
> >>
> >> I tried to use --columns, but this is not working, as it destroys the
> >> whole format.
> >>
> >> Any ideas would be great.
> >>
> >> Running yad-0.31.3
> >>
> >> Thanks
> >> Oliver
> >>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "yad-common" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an
> >> email to yad-common+...@googlegroups.com <javascript:>.
> >> For more options, visit https://groups.google.com/d/optout.
> >>
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups "yad-common" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to yad-common+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


--
Victor Ananjevsky <anan...@gmail.com>

Oliver Häßler

unread,
Nov 19, 2015, 10:26:46 AM11/19/15
to yad-common
So the idea is if you get a new computer, and log in you get this dialog presented.

Pressing each of the buttons executes a application (like the Token one starts firefox). If you close firefox, I set a variable and mark the button as done (with a little image before the text). So the user knows what he alread did. Also the button than will work no longer.

If you have pressed the first  3 (4) buttons, a new button will appear at the end of the dialog to close the setup window. So using a checkbox, would not work this way.

I can use it the way it is, was just curious if there is a way to align the buttons in any way.
Reply all
Reply to author
Forward
0 new messages