best practice with ArrayHandle



Hi,

I'm currently preparing my code to be Windows-friendly. I wrote the following lines to enable Windows-style buttons ordering in a dialog and I wondered if there is a simplest way to do it :

dial.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
dial.add_button(Gtk::Stock::ADD, Gtk::RESPONSE_ACCEPT);
int altbut[] = { Gtk::RESPONSE_ACCEPT, Gtk::RESPONSE_CANCEL };
dial.set_alternative_button_order_from_array(Glib::ArrayHandle<int>(altbut, 2, Glib::OWNERSHIP_NONE));

Thanks!


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]