def _build_format_section(self, radio_button_label, format_labels,
callback_radio=None, callback_combo=None,
radio_group=None):
"""
"""
radio_button = Gtk.RadioButton(
radio_button_label, group=radio_group)
if callback_radio:
radio_button.connect("toggled", callback_radio)
text_label = Gtk.Label("Format : ")
combo_box = Gtk.ComboBoxText()
for label in format_labels:
combo_box.append_text(label)
combo_box.set_active(0)
# This version accept only one format for each stream type.
# There is not point to allow user to use this combo box.
# That way the format is displayed as information.
combo_box.set_sensitive(False)
if callback_combo:
combo_box.connect("changed", callback_combo)
hbox = Gtk.Box(Gtk.Orientation.HORIZONTAL)
hbox.set_margin_left(24)
_pack_widgets(hbox, text_label, combo_box)
return (radio_button, hbox, combo_box)
评论列表
文章目录