|
|
|
@ -22,7 +22,7 @@ from datetime import datetime, date, time
@@ -22,7 +22,7 @@ from datetime import datetime, date, time
|
|
|
|
|
|
|
|
|
|
#variables |
|
|
|
|
programTitle = "Mail Notifier" |
|
|
|
|
programVersion = "3.01" |
|
|
|
|
programVersion = "3.01-dev" |
|
|
|
|
settings = QSettings(os.path.expanduser("~")+"/.config/mail-notifier/settings.conf", QSettings.NativeFormat) |
|
|
|
|
def GlobalSettingsExist(): |
|
|
|
|
if ((settings.contains("CheckInterval") and settings.value("CheckInterval") != "") and |
|
|
|
@ -438,9 +438,12 @@ def mail_check():
@@ -438,9 +438,12 @@ def mail_check():
|
|
|
|
|
# check was successfull, lastCheckCount is updating |
|
|
|
|
window.lastCheckCount = mail_count |
|
|
|
|
def notify(message): |
|
|
|
|
if settings.value("Notify"): |
|
|
|
|
subprocess.Popen(['notify-send', programTitle, message]) |
|
|
|
|
return |
|
|
|
|
try: |
|
|
|
|
if settings.value("Notify"): |
|
|
|
|
subprocess.Popen(['notify-send', programTitle, message]) |
|
|
|
|
return |
|
|
|
|
except: |
|
|
|
|
print(message) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|