예제 #1
0
 def __init__(self, master):
     self.master = master
     feednames = [x.getName() for x in SupplyFeed.getAll()]
     cols = max(2, math.ceil(len(feednames) / 7))
     super(ByIngredientScreen,
           self).__init__(master,
                          feednames,
                          labeltext="Find drinks by ingredient:",
                          cols=cols)
예제 #2
0
 def __init__(self, master):
     super(DumpScreen, self).__init__(master)
     self.master = master
     self.lbl = Label(self, text="Dumping all feeds")
     self.backbtn = RectButton(self, text="Stop", command=self.handle_button_back)
     self.lbl.pack(side=TOP, fill=BOTH, expand=1)
     self.backbtn.pack(side=BOTTOM, fill=X, padx=10, pady=10)
     for feed in SupplyFeed.getAll():
         feed.startFeed()
예제 #3
0
 def handle_button_back(self):
     for feed in SupplyFeed.getAll():
         feed.stopFeed()
     self.master.screen_pop()