def handle_button_ingr_add(self): currfeeds = [ingr.feed.name for ingr in self.recipe.ingredients] feeds = [ feed for feed in SupplyFeed.getNames() if feed not in currfeeds ] self.master.screen_push( SelectScreen(self.master, feeds, labeltext="Select the ingredient:", callback=self.add_ingredient_step1))
def item_del(self, idx, txt, feed): self.sel_feed = feed recipes = Recipe.getRecipesByFeed(feed) if recipes: self.master.screen_push( NotifyScreen( self.master, text="That feed is currently in use by one or more recipes." )) else: self.master.screen_push( SelectScreen(self.master, ["Confirm"], labeltext='Delete feed "%s"?' % txt, callback=self._item_del_finish))
def item_del(self, idx, txt, feed): self.sel_feed = feed recipes = Recipe.getRecipesByFeed(feed) if recipes: self.master.screen_push( NotifyScreen( self.master, text= "Diese Zutat wird gerade durch eines oder mehrtere Rezepte verwendet." )) else: self.master.screen_push( SelectScreen(self.master, ["Confirm"], labeltext='Lösche Zutat "%s"?' % txt, callback=self._item_del_finish))
def handle_button_retype(self): self.master.screen_push( SelectScreen(self.master, Recipe.getPossibleTypeNames(), labeltext="Select the recipe type:", callback=self.retype_complete))
def handle_button_ingr_del(self): self.master.screen_push( SelectScreen( self.master, ["Confirm"], labeltext="Are you sure you want to delete that ingredient?", callback=self.del_ingredient_step1))
def item_del(self, idx, txt, recipe): self.sel_recipe = recipe self.master.screen_push(SelectScreen(self.master, ["Bestätigen"], labeltext='Lösche das Rezept "%s"?' % txt, callback=self._item_del_finish))
def handle_button_ingr_del(self): self.master.screen_push( SelectScreen( self.master, ["Bestätigen"], labeltext="Bist Du sicher, dass Du diese Zutat löschen willst?", callback=self.del_ingredient_step1))