Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
digidigital authored Jan 22, 2024
1 parent 6791f5d commit 5fe6603
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions openXJV.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,9 @@ def __loadEmptyViewer(self):

if darkdetect.isDark():
self.url+='?darkmode=True'

self.browser.setUrl(QUrl.fromUserInput(self.url))

def __displayInfo(self):
QMessageBox.information(self, "Information",
"openXJV " + VERSION + "\n"
Expand Down Expand Up @@ -1147,8 +1147,14 @@ def __loadNotes(self):
if self.akte.nachricht['eigeneID']:
filepath = os.path.join(self.dirs.user_data_dir , 'notizen' + self.akte.nachricht['eigeneID'])
if os.path.exists(filepath):
with open(filepath , 'r', encoding = 'utf-8') as notesFile:
self.notizenText.setPlainText(notesFile.read())
try:
with open(filepath , 'r', encoding = 'utf-8') as notesFile:
notes_text=notesFile.read()
except Exception:
# Unter Windows wurden "alte" Notizen ggf. nicht als UTF-8 gespeichert und werfen Fehler
with open(filepath , 'r') as notesFile:
notes_text=notesFile.read()
self.notizenText.setPlainText(notes_text)

def __saveNotes(self):
'''Speichert die Favoriten in einer Datei, deren Dateinamen dem Wert der 'eigeneID' entspricht.'''
Expand Down

0 comments on commit 5fe6603

Please sign in to comment.