バグ #1531 » 0001-revival-settings.patch
core/mui/gtk_form_dsl.rb | ||
---|---|---|
461 | 461 |
# [title] ラベル |
462 | 462 |
# [&block] ブロック |
463 | 463 |
def settings(title, &block) |
464 |
@headings ||= []
|
|
465 |
@headings << title
|
|
466 | ||
467 |
label = Gtk::Label.new @headings.map { |s| "<b>#{s}</b>" }.join ' > '
|
|
468 |
label.use_markup = true
|
|
469 |
label.halign = :start
|
|
470 |
attach_next_to label, nil, :bottom, 2, 1
|
|
471 | ||
472 |
instance_eval(&block)
|
|
473 |
@headings.pop
|
|
464 |
group = Gtk::Frame.new.set_border_width(1)
|
|
465 |
if(title.is_a?(Gtk::Widget))
|
|
466 |
group.set_label_widget(title) |
|
467 |
else
|
|
468 |
group.set_label(title)
|
|
469 |
end
|
|
470 |
box = create_inner_setting.set_border_width(4)
|
|
471 |
box.instance_eval(&block) |
|
472 |
group.add(box)
|
|
473 |
attach_next_to group, nil, :bottom, 2, 1
|
|
474 | 474 | |
475 |
Chainable.new label
|
|
475 |
Chainable.new group
|
|
476 | 476 |
end |
477 | 477 | |
478 | 478 |
# 〜についてダイアログを出すためのボタン。押すとダイアログが出てくる |