Hello guys
Im learning GTK and im doing ruby project with GTK2 so how to use GTK2
with my ruby script?
I create windows for the user but when the user cliked on the buttom i
would like the result appear in the same GTK windows.
For example this is a part of my script which work fine without GTK in a
simply shell:
def menu
puts “~~~~~~~~~~~~~~~~~~ 0 - start”
puts “~~~~~~~~~~~~~~~~~~ 1 - see”
puts “~~~~~~~~~~~~~~~~~~ 2 - take”
puts “~~~~~~~~~~~~~~~~~~ 3 - more?”
puts “~~~~~~~~~~~~~~~~~~ 4 - Convert GIF to PNG”
puts “~~~~~~~~~~~~~~~~~~ 5 -Convert PNG to GIF”
puts “~~~~~~~~~~~~~~~~~~ 6 - Choose mor options”
end
menu
opt=""
while (opt!=“0” && opt!=“1” && opt!=“2” && opt!=“3” && opt!=“4” &&
opt!=“5” && opt!=“6”)
puts “Choose your option (between 0 et 6)”
opt=gets.chomp
end
So now i would like to have six windows in GTK2 for the user wich using
“gets.chomp” or another like this to save the user option and starting
it.
I don’t know start a command of the script with GTK.So help me please im
beginner
Thanx you.