Skip to content

Commit

Permalink
removed button_box
Browse files Browse the repository at this point in the history
  • Loading branch information
sodomon2 committed Jan 26, 2021
1 parent aa1b2ee commit 6130376
Showing 1 changed file with 29 additions and 31 deletions.
60 changes: 29 additions & 31 deletions src/moonterm-dialog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,39 @@ dialog_config = Gtk.Dialog {
}

content = Gtk.Box {
orientation = 'HORIZONTAL',
orientation = 'VERTICAL',
spacing = 5,
border_width = 5,
Gtk.Label {
label = " Interpreter : ",
use_markup = true,
Gtk.Box {
orientation = 'HORIZONTAL',
Gtk.Label {
label = " Interpreter : ",
use_markup = true,
},
Gtk.Entry {
id = 'entry_interpreter'
}
},
Gtk.Entry {
id = 'entry_interpreter'
Gtk.Box {
orientation = 'HORIZONTAL',
homogeneous = true,
spacing = 5,
Gtk.Button {
id = 'btn_apply',
label = "Apply",
on_clicked = function ()
conf.moonterm.interpreter = content.child.entry_interpreter.text
inifile:save(('%s/moonterm.ini'):format(dir), conf)
dialog_config:hide()
end
},
Gtk.Button {
id = 'btn_cancel',
label = "Cancel",
on_clicked = function () dialog_config:hide() end,
}
}
}

button_box = Gtk.Box {
orientation = 'HORIZONTAL',
homogeneous = true,
spacing = 5,
border_width = 5,
Gtk.Button {
id = 'btn_apply',
label = "Apply",
on_clicked = function ()
conf.moonterm.interpreter = content.child.entry_interpreter.text
inifile:save(('%s/moonterm.ini'):format(dir), conf)
dialog_config:hide()
end
},
Gtk.Button {
id = 'btn_cancel',
label = "Cancel",
on_clicked = function ()
dialog_config:hide()
end
},
}

dialog_config:get_content_area():add(content)
dialog_config:get_content_area():add(button_box)
content.child.entry_interpreter:grab_focus()
content.child.entry_interpreter:grab_focus()

0 comments on commit 6130376

Please sign in to comment.