def create_filepath_hbox(self, label, value, trace, sensitivity_group, constraints=None):
hbox_main = gtk.HBox()
label_text = gtk.Label(label.title())
label_text.set_alignment(0, 0.5)
label_text.set_padding(8,8)
entry_filepath = gtk.Entry()
entry_filepath.set_text(value)
button_select_folder = gtk.ToolButton(
gtk.image_new_from_file(os.path.join(definitions.ICONS_DIR, "open_small.png")))
button_select_folder.connect("clicked", self.select_file, entry_filepath)
hbox_main.pack_start(label_text)
hbox_main.pack_start(entry_filepath)
hbox_main.pack_start(button_select_folder)
self.plugin_config_widgets.append(entry_filepath)
self.plugin_config_traces.append(trace)
sensitivity_group.append(label_text)
sensitivity_group.append(entry_filepath)
sensitivity_group.append(button_select_folder)
return hbox_main
评论列表
文章目录