diff options
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hig/settingsuihelper.py')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hig/settingsuihelper.py | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hig/settingsuihelper.py b/bitbake/lib/bb/ui/crumbs/hig/settingsuihelper.py index e10dd064ab..e0285c93ce 100644 --- a/bitbake/lib/bb/ui/crumbs/hig/settingsuihelper.py +++ b/bitbake/lib/bb/ui/crumbs/hig/settingsuihelper.py @@ -120,97 +120,3 @@ class SettingsUIHelper(): hbox.show_all() return hbox, entry - - def gen_mirror_entry_widget(self, content, index, match_content=""): - hbox = gtk.HBox(False) - entry = gtk.Entry() - content = content[:-2] - entry.set_text(content) - entry.set_size_request(350,30) - - entry_match = gtk.Entry() - entry_match.set_text(match_content) - entry_match.set_size_request(100,30) - - table = gtk.Table(2, 5, False) - table.set_row_spacings(12) - table.set_col_spacings(6) - hbox.pack_start(table, expand=True, fill=True) - - label_configuration = gtk.Label("Configuration") - label_configuration.set_alignment(0.0,0.5) - label_mirror_url = gtk.Label("Mirror URL") - label_mirror_url.set_alignment(0.0,0.5) - label_match = gtk.Label("Match") - label_match.set_alignment(0.0,0.5) - label_replace_with = gtk.Label("Replace with") - label_replace_with.set_alignment(0.0,0.5) - - combo = gtk.combo_box_new_text() - combo.append_text("Standard") - combo.append_text("Custom") - if match_content == "": - combo.set_active(0) - else: - combo.set_active(1) - combo.connect("changed", self.on_combo_changed, index) - combo.set_size_request(100,30) - - delete_button = HobAltButton("Delete") - delete_button.connect("clicked", self.delete_cb, index, entry) - if content == "" and index == 0 and len(self.sstatemirrors_list) == 1: - delete_button.set_sensitive(False) - delete_button.set_size_request(100, 30) - - entry_match.connect("changed", self.insert_entry_match_cb, index) - entry.connect("changed", self.insert_entry_cb, index, delete_button) - - if match_content == "": - table.attach(label_configuration, 1, 2, 0, 1, xoptions=gtk.SHRINK|gtk.FILL) - table.attach(label_mirror_url, 2, 3, 0, 1, xoptions=gtk.SHRINK|gtk.FILL) - table.attach(combo, 1, 2, 1, 2, xoptions=gtk.SHRINK) - table.attach(entry, 2, 3, 1, 2, xoptions=gtk.SHRINK) - table.attach(delete_button, 3, 4, 1, 2, xoptions=gtk.SHRINK) - else: - table.attach(label_configuration, 1, 2, 0, 1, xoptions=gtk.SHRINK|gtk.FILL) - table.attach(label_match, 2, 3, 0, 1, xoptions=gtk.SHRINK|gtk.FILL) - table.attach(label_replace_with, 3, 4, 0, 1, xoptions=gtk.SHRINK|gtk.FILL) - table.attach(combo, 1, 2, 1, 2, xoptions=gtk.SHRINK) - table.attach(entry_match, 2, 3, 1, 2, xoptions=gtk.SHRINK) - table.attach(entry, 3, 4, 1, 2, xoptions=gtk.SHRINK) - table.attach(delete_button, 4, 5, 1, 2, xoptions=gtk.SHRINK) - - hbox.show_all() - return hbox - - def insert_entry_match_cb(self, entry_match, index): - self.sstatemirrors_list[index][2] = entry_match.get_text() - - def insert_entry_cb(self, entry, index, button): - self.sstatemirrors_list[index][1] = entry.get_text() - if entry.get_text() == "" and index == 0: - button.set_sensitive(False) - else: - button.set_sensitive(True) - - def on_combo_changed(self, combo, index): - if combo.get_active_text() == "Standard": - self.sstatemirrors_list[index][0] = 0 - self.sstatemirrors_list[index][2] = "file://(.*)" - else: - self.sstatemirrors_list[index][0] = 1 - self.refresh_shared_state_page() - - def delete_cb(self, button, index, entry): - if index == 0 and len(self.sstatemirrors_list)==1: - entry.set_text("") - else: - self.sstatemirrors_list.pop(index) - self.refresh_shared_state_page() - - def add_mirror(self, button): - tooltip = "Select the pre-built mirror that will speed your build" - index = len(self.sstatemirrors_list) - sm_list = [0, "", "file://(.*)"] - self.sstatemirrors_list.append(sm_list) - self.refresh_shared_state_page() |