Exemple #1
0
 def on_touch_up(self, *args):
     touch = args[0]
     print("touch", *touch.pos)
     if not self.txt.collide_point(*touch.pos):
         print('touched outside keyboard')
         self.txt.focus = False
         Window.release_keyboard(self.kb)
     return super(TextInput, self.txt).on_touch_up(touch)
Exemple #2
0
    def connect(self, ip, port):
        Window.release_keyboard()

        if self.dropdown:
            self.dropdown.dismiss()

        self.protocol = None
        point = TCP4ClientEndpoint(reactor, ip, int(port))
        d = point.connect(CommandClientFactory())
        d.addCallback(self.got_protocol)
        self.log += u"trying to connect…\n"
        self.leftover = ''

        if ip not in self.config.items('connections'):
            self.config.set('connections', ip, str(port))
Exemple #3
0
    def connect(self, ip, port):
        Window.release_keyboard()

        if self.dropdown:
            self.dropdown.dismiss()

        self.protocol = None
        point = TCP4ClientEndpoint(reactor, ip, int(port))
        d = point.connect(CommandClientFactory())
        d.addCallback(self.got_protocol)
        self.log += u"trying to connect…\n"
        self.leftover = ''

        if ip not in self.config.items('connections'):
            self.config.set('connections', ip, str(port))
Exemple #4
0
    def setMainScreen(self):
        Window.release_keyboard()  # for autoLogin function in loginscreen.py
        Window.softinput_mode = ""

        if self.has_screen("main_screen"):
            self.main_screen.initUI()
            self.current = "main_screen"

        else:
            self.initOptionsScreen()

            self.main_screen = MainScreen(
                con=self.con,
                cursor=self.cursor,
                pg_con=self.pg_con,
                pg_cursor=self.pg_cursor,
                cipher=self.cipher,
                internet_connection=self.internet_connection,
                name="main_screen",
            )
            self.add_widget(self.main_screen)
            self.current = "main_screen"
Exemple #5
0
 def on_dismiss(self):
     STORAGE[self.name] = self.tx.text
     Window.release_keyboard()
     super(MyPopup, self).on_dismiss()
Exemple #6
0
 def on_dismiss(self):
     STORAGE[self.name] = self.tx.text
     Window.release_keyboard()
     super(MyPopup,self).on_dismiss()