Gtk2 to gtk3 : create a dialog

Hello,

This code come from gtk2 application :

wdlog = Dialog.new(“Logs”,
nil,
0,
[ Stock::OK, Dialog::RESPONSE_NONE ])

How to convert it for gtk3 ?
I try

wdlog = Dialog.new(
title: “Logs”,
parent: nil,
flags: 0,
buttons: [ Stock::OK, Dialog::RESPONSE_NONE ]
)

But that not work :
COMPONENT() : not a Gtk::ResponseType: false :
…/2.0.0/gems/glib2-1.2.6-x86-mingw32/lib/glib2/deprecatable.rb:47:in
add_buttons' ..../2.0.0/gems/glib2-1.2.6-x86-mingw32/lib/glib2/deprecatable.rb:47:ininitialize’
…/2.0.0/gems/glib2-1.2.6-x86-mingw32/lib/glib2/deprecatable.rb:47:in
block in define_deprecated_method_by_hash_args' ...Ruiby/lib/ruiby_gtk/ruiby_dsl3.rb:1324:innew’

Thank you,

Hi,

Am 15.04.2013 18:26, schrieb Regis d’Aubarede:

How to convert it for gtk3 ?
I try

wdlog = Dialog.new(
title: “Logs”,
parent: nil,
flags: 0,
buttons: [ Stock::OK, Dialog::RESPONSE_NONE ]
)

the stock-id’s and response codes have all together to be enclosed in
brackets.

[[id1, respons1], [id2, respons2], [id3, respons3]]

Cheers, detlef

that’s work!
thank you,