Skip to content

Commit

Permalink
Fixed:
Browse files Browse the repository at this point in the history
bug verhinder Anzeigen von Tabellen nach Änderung der Einstellungen;
Zurück Knopf führt jz aus der Tabelle zur Tablennen Übersicht, statt die App zu beenden;
  • Loading branch information
5ila5 committed Mar 4, 2021
1 parent b11afc3 commit ca93060
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
5 changes: 3 additions & 2 deletions buildozer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ package.domain = org.silas
source.dir = .

# (list) Source files to include (let empty to include all the files)
source.include_exts = py,png,jpg,kv,atlas,json,html,kv,txt
source.include_exts = py,png,jpg,kv,atlas,kv #,txt,json


# (list) List of inclusions using pattern matching
#source.include_patterns = assets/*,images/*.png
Expand All @@ -28,7 +29,7 @@ source.include_exts = py,png,jpg,kv,atlas,json,html,kv,txt
#source.exclude_patterns = license,images/*/*.jpg

# (str) Application versioning (method 1)
version = 0.1
version = 0.1.2

# (str) Application versioning (method 2)
# version.regex = __version__ = ['"](.*)['"]
Expand Down
3 changes: 2 additions & 1 deletion getDSB.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ def getContent(total=False,*args):
with open(configPath,"r" , encoding="utf-8") as datei:
conf=json.loads(datei.read())
dsb = pydsb.PyDSB(conf["benutzer"],conf["passwort"])
klassen = conf["klassen"].split(",")
klassen = conf["klassen"].replace(" ","").split(",")
print(klassen)
try:
timetables=dsb.get_plans()
except:
Expand Down
31 changes: 31 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ def anmPopUp(self):
os.remove("Tables/"+file)
with open(configPath, "w", encoding="utf-8") as confFile:
confFile.write(json.dumps(conf))
with open("Tables/lastUpdate.txt", "w", encoding="utf-8") as lUp:
lUp.write("01.01.2000 00:00")
with open("Tables/lastUpdateFull.txt", "w", encoding="utf-8") as lUp:
lUp.write("01.01.2000 00:00")
threading.Thread(target=DSBgetMethod).start()
return True
else:
Expand Down Expand Up @@ -257,8 +261,19 @@ class Table (Screen):
rowcount = NumericProperty(2)
colcount = NumericProperty(2)
data_items = ListProperty()
tabName = ""

def Android_back_click(self, window, key, *largs):
if key == 27:
if self.tabName[:6] == "Total_":
sm.current = "gesTabel"
else:
sm.current = "lockedArea" # you can create a method here to cache in a list the number of screens and then pop the last visited screen.
return True

def __init__(self,tableName="", **kwargs):
self.tabName = tableName
Window.bind(on_keyboard=self.Android_back_click)
super(Table, self).__init__(**kwargs)
self.gridLay.bind(minimum_height=self.gridLay.setter('height'))
print("GUTEN TAG")
Expand Down Expand Up @@ -489,7 +504,10 @@ def DSBgetMethod(*args):


class DSBApp(App):

def build(self):


'''try:
vibrator.vibrate(10)
except:
Expand All @@ -507,6 +525,19 @@ def build(self):
#print("hi")
if __name__ == "__main__":
print("hi2")
if not os.path.exists("config.json"):
conf = {
"benutzer": "",
"passwort": "",
"klassen": ""
}
with open("config.json", "w")as confFile:
confFile.write(json.dumps(conf))
if not os.path.exists("Tables/lastUpdate.txt") or not os.path.exists("Tables/lastUpdateFull.txt"):
with open("Tables/lastUpdate.txt", "w", encoding="utf-8") as lUp:
lUp.write("01.01.2000 00:00")
with open("Tables/lastUpdateFull.txt", "w", encoding="utf-8") as lUp:
lUp.write("01.01.2000 00:00")
threading.Thread(target=DSBgetMethod).start()
DSBApp().run()

0 comments on commit ca93060

Please sign in to comment.