コード例 #1
0
 def refresh(self):
     self.clearChildren()
     self.scroller = pyos.GUI.ListScrollableContainer(
         (0, 40), width=app.ui.width, height=app.ui.height - 40)
     self.statustxt = pyos.GUI.Text((42, 11), "0 Apps", pyos.DEFAULT, 18)
     self.back = BackBtn((0, 0))
     self.sizesel = SizeSelector((app.ui.width - 100, 0), 100, 40,
                                 self.bgLoad)
     self.addChildren(self.scroller, self.statustxt, self.back,
                      self.sizesel)
     state.getThreadController().addThread(pyos.ParallelTask(self.bgLoad))
コード例 #2
0
 def connectAsk(self, force_new_scheme=False):
     if self.cell == fiapp.currentCell: return
     if self.schemeExists() and not force_new_scheme:
         self.connBtn.setText("...")
         pt = pyos.ParallelTask(self.connect_existing)
         state.getThreadController().addThread(pt)
         return
     if self.cell.encrypted:
         pyos.GUI.AskDialog("Password", "The network "+str(self.cell.ssid)+" is encrypted using "+self.cell.encryption_type+". Enter the password.", self.launchConnectThread).display()
     else:
         self.launchConnectThread(None)
コード例 #3
0
 def refresh(self):
     self.clearChildren()
     self.scroller = pyos.GUI.ListScrollableContainer(
         (0, 40), width=app.ui.width, height=app.ui.height - 40)
     self.statustxt = pyos.GUI.TextEntryField((40, 0),
                                              self.query,
                                              width=self.width - 160,
                                              height=40)
     self.submitbtn = pyos.GUI.Image(
         (self.width - 120, 0),
         surface=state.getIcons().getLoadedIcon("search"),
         onClick=self.setQuery)
     self.back = BackBtn((0, 0))
     self.sizesel = SizeSelector((app.ui.width - 80, 0), 80, 40,
                                 self.bgLoad)
     self.addChildren(self.scroller, self.statustxt, self.submitbtn,
                      self.back, self.sizesel)
     state.getThreadController().addThread(pyos.ParallelTask(self.bgLoad))
コード例 #4
0
ファイル: __init__.py プロジェクト: tarababa/PythonOS
 def loadDir(self, path):
     if not pyos.os.path.exists(path): return
     self.path = path
     self.pages.clearChildren()
     self.containers = []
     self.titleText.setText(path[path.rfind("/") + 1:])
     for path in [
             pyos.os.path.join(self.path, s)
             for s in pyos.os.listdir(self.path)
             if pyos.os.path.isfile(pyos.os.path.join(self.path, s))
     ]:
         if path[path.rfind("."):].lower() not in [
                 e.lower() for e in self.imageViewerApp.parameters["file"]
         ]:
             continue
         tn = GalleryThumbnail((0, 0), self.pages.perColumn,
                               self.pages.perRow, path, self.imageViewerApp)
         self.pages.addChild(tn)
         self.containers.append(tn)
     app.dataStore["path"] = self.path
     state.getThreadController().addThread(
         pyos.ParallelTask(self.loadThumbnails))
コード例 #5
0
 def confirm(self, resp):
     if resp == "Yes":
         self.dialog.display()
         self.dialog.update("Requested install of " + self.name)
         state.getThreadController().addThread(
             pyos.ParallelTask(self.install))
コード例 #6
0
 def bgUpdate(self):
     state.getThreadController().addThread(pyos.ParallelTask(self.update))
コード例 #7
0
 def launchConnectThread(self, pwd):
     pt = pyos.ParallelTask(self.connect, (pwd,))
     state.getThreadController().addThread(pt)