How to set gtkdialog window position? (Solved)

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

How to set gtkdialog window position? (Solved)

#1 Post by Argolance »

Bonjour,
How to set only window position using the option --geometry (i.e. without taking window size into account)?
Thank you.

Cordialement.
Last edited by Argolance on Tue 06 May 2014, 09:10, edited 1 time in total.

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#2 Post by SFR »

Hey Argolance

Check this out:

Code: Select all

echo '<button ok></button>' | gtkdialog -s -G +300+300
Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#3 Post by Argolance »

Bonjour,
Thank you SFR!
Questions:
What is this option -s used for? (--stdin? Get the GUI description from standard input?)
I found here :arrow: GtkDialog - tips this:

Code: Select all

gtkdialog -p GUI -G ${1-${WIDTH}x${HEIGHT}+${RIGHT}+${DOWN}}
What is 1 (sometimes 2) used for?
Then:
# gtkdialog --help
Utilisation :
gtkdialog [OPTION...]
Create dialog boxes and windows according to the given dialog description.
For more information try 'info gtkdialog'.

Options de l'aide :
-h, --help Affiche les options de l'aide
--help-all Affiche toutes les options de l'aide
--help-gtk Affiche les options GTK+

Options de l'application :
-v, --version Print version information and exit.
-d, --debug Debug mode prints the processed characters.
-p, --program=variable Get the GUI description from the environment.
-g, --glade-xml=filename Get the GUI description from this Glade file.
-f, --file=filename Get the GUI description from a regular file.
-i, --include=filename Include the given file when executing.
-e, --event-driven=filename Execute the file as an event driven program.
-s, --stdin Get the GUI description from standard input.
-w, --no-warning Suppress warning messages.
-G, --geometry=[XxY][+W+H] The placement and the size of the window.
-c, --center Center the windows on the screen.
--print-ir Print the internal representation and exit.
--space-expand=state The "expand" state for packing all widgets.
--space-fill=state The "fill" state for packing all widgets.
--display=AFFICHAGE Affichage X à utiliser
So, I tried --geometry=[XxY]!
... I was bogging down :wink:

Cordialement.

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#4 Post by SFR »

What is this option -s used for?
Nah, '-s' was used only to make the example as a short one-liner, without exporting the GUI description in a variable. Could be also:

Code: Select all

export GUI='
<button ok>
</button>'

gtkdialog -p GUI --geometry=+300+300

Code: Select all

gtkdialog -p GUI -G ${1-${WIDTH}x${HEIGHT}+${RIGHT}+${DOWN}}
What is 1 (sometimes 2) used for?
Honestly - no idea. Only Zigbert would know. ;)

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#5 Post by Argolance »

Thanks! :wink:

Post Reply