struct command_list_dialog_t : public ModalDialog
{
command_list_dialog_t()
- : m_close_button( *this, eIDCANCEL ), m_list( NULL ), m_command_iter(), m_model( NULL ), m_waiting_for_key( false ){
+ : m_close_button( *this, eIDCANCEL ), m_list( ui::null ), m_command_iter(), m_model( ui::null ), m_waiting_for_key( false ){
}
ModalDialogButton m_close_button;
return;
}
dialog.m_command_iter = iter;
- dialog.m_model = ui::TreeModel(model);
+ dialog.m_model = ui::TreeModel::from(model);
// 2. disallow changing the row
//gtk_widget_set_sensitive(dialog.m_list, false);
StringOutputStream msg;
msg << "The command " << name << " is already assigned to the key " << accelerator << ".\n\n"
<< "Do you want to unassign " << name << " first?";
- auto r = widget.window().alert( msg.c_str(), "Key already used", ui::alert_type::YESNOCANCEL );
+ auto r = ui::alert( widget.window(), msg.c_str(), "Key already used", ui::alert_type::YESNOCANCEL );
if ( r == ui::alert_response::YES ) {
// clear the ACTUAL accelerator too!
disconnect_accelerator( name );
hbox.pack_start( scr, TRUE, TRUE, 0 );
{
- ui::ListStore store = ui::ListStore(gtk_list_store_new( 4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_INT ));
+ auto store = ui::ListStore::from(gtk_list_store_new( 4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_INT ));
- auto view = ui::TreeView(ui::TreeModel(store));
+ auto view = ui::TreeView(ui::TreeModel::from(store._handle));
dialog.m_list = view;
gtk_tree_view_set_enable_search(view, false ); // annoying