def show(self, cur_shorts, cur_ing_names, cur_amts, cur_pro, cur_mac, cur_info): for i in range(len(cur_ing_names)): self.new_shorts.append(cur_shorts[i]) self.new_ingredients_list.insert(i, cur_ing_names[i]) self.new_amounts_list.insert(i, cur_amts[i]) self.new_produces_box.insert(0, cur_pro) if cur_mac is not None and cur_mac != "": self.new_machine_box.insert(0, cur_mac) if cur_info is not None and cur_info != "": self.new_info_box.insert(0, cur_info) Modal.show(self) return ( self.new_shorts, self.new_ingredients, self.new_amounts, self.new_produces, self.new_machine, self.new_info, )
def __init__(self, parent=None, title="Add Recipe"): self.shorts = [] self.amounts = None self.ingredients = None Modal.__init__(self, parent, title, geometry="375x410" if system() == "Windows" else "375x350")
def show(self): Modal.show(self) return self.shorts, self.ingredients, self.amounts, self.produces, self.machine, self.info
def show(self, current_name): self.current_name = current_name self.machine_name_box.insert(0, self.current_name) Modal.show(self) return self.new_name
def show(self, current_short_name, current_name, current_amount): self.new_short_box.insert(0, current_short_name) self.new_item_box.insert(0, current_name) self.new_amount_box.insert(0, current_amount) Modal.show(self) return (self.new_short_name, self.new_item_name, self.new_amount)
def __init__(self, parent=None, title="Add Ingredient"): Modal.__init__(self, parent, title, geometry="520x100" if system() == "Windows" else "565x95")
def __init__(self, parent=None, title="Remove Machine"): Modal.__init__(self, parent, title, geometry="500x85" if system() == "Windows" else "395x70")
def show(self): Modal.show(self) return (self.short_name, self.long_name)
def show(self): Modal.show(self) return self.machine_name
def show(self, item_name): self.label.config(text="Remove " + item_name + "?") Modal.show(self) return self.remove
def __init__(self, parent=None, title="Edit Item"): self.current_name = None self.new_name = None Modal.__init__(self, parent, title, geometry="585x105" if system() == "Windows" else "485x95")
def __init__(self, parent=None, title=""): Modal.__init__(self, parent, title, geometry="185x100" if system() == "Windows" else "170x80")
def show(self): Modal.show(self) return self.remove
def __init__(self, parent=None, title="Add Mod"): Modal.__init__(self, parent, title, geometry="675x150" if system() == "Windows" else "525x135")
def show(self): Modal.show(self) return self.item_name
def show(self, machine_name): self.label.config(text="Remove " + machine_name + "?") Modal.show(self) return self.remove
def __init__(self, parent=None, title="Add Item"): Modal.__init__(self, parent, title, geometry="580x110" if system() == "Windows" else "485x95")
def show(self): Modal.show(self) return (self.short_name, self.item_name, self.amount)