Revert "Moved from external 'notify-send' command to using notify2 library"

This reverts commit 6ccb04632b.
This commit is contained in:
Rinaldus 2017-11-16 16:23:25 +03:00
parent 8fbcb94182
commit 66020b44a5
Signed by: Rinaldus
GPG Key ID: C34E249005178E87
2 changed files with 3 additions and 11 deletions

View File

@ -12,14 +12,9 @@ This is Light weight mail notifier written in PyQt5. It checks your mailbox peri
![MailboxFull](https://raw.github.com/rinaldus/mail-notifier/master/screenshots/screen2.jpg) ![MailboxFull](https://raw.github.com/rinaldus/mail-notifier/master/screenshots/screen2.jpg)
![Settings](https://raw.github.com/rinaldus/mail-notifier/master/screenshots/screen3.jpg) ![Settings](https://raw.github.com/rinaldus/mail-notifier/master/screenshots/screen3.jpg)
## System requirements
- Python 3
- PyQt5
- *(after version 3.01)* [notify2](https://pypi.python.org/pypi/notify2) library
## Install ## Install
Just clone this git repository or download release and copy all files where you want to store this program. No additional installation is required. You need to install PyQt5 as dependency. Then just clone this git repository or download release and copy all files where you want to store this program. No additional installation is required.
*In version 0.10 you also need to edit mail-notifier.py and fill your mailbox credentials in 70-72 rows* *In version 0.10 you also need to edit mail-notifier.py and fill your mailbox credentials in 70-72 rows*
## Launch ## Launch

View File

@ -18,13 +18,11 @@ from PyQt5 import QtCore, QtGui, QtWidgets
import os import os
import socket import socket
import time import time
import notify2
from datetime import datetime, date, time from datetime import datetime, date, time
#variables #variables
programTitle = "Mail Notifier" programTitle = "Mail Notifier"
programVersion = "3.01-dev" programVersion = "3.01"
notify2.init(programTitle)
settings = QSettings(os.path.expanduser("~")+"/.config/mail-notifier/settings.conf", QSettings.NativeFormat) settings = QSettings(os.path.expanduser("~")+"/.config/mail-notifier/settings.conf", QSettings.NativeFormat)
def GlobalSettingsExist(): def GlobalSettingsExist():
if ((settings.contains("CheckInterval") and settings.value("CheckInterval") != "") and if ((settings.contains("CheckInterval") and settings.value("CheckInterval") != "") and
@ -441,8 +439,7 @@ def mail_check():
window.lastCheckCount = mail_count window.lastCheckCount = mail_count
def notify(message): def notify(message):
if settings.value("Notify"): if settings.value("Notify"):
n = notify2.Notification(programTitle, message) subprocess.Popen(['notify-send', programTitle, message])
n.show()
return return