small changes, update icon code
This commit is contained in:
@@ -4,18 +4,16 @@ import sys
|
||||
from omegaconf import OmegaConf
|
||||
from PyQt6 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from src.logic import log
|
||||
|
||||
from .dialog_sources.Ui_mail_preview import Ui_eMailPreview as Ui_Dialog
|
||||
|
||||
config = OmegaConf.load("config.yaml")
|
||||
from src.logic.log import MyLogger
|
||||
from src.utils import Icon
|
||||
from src import Icon
|
||||
from .dialog_sources.Ui_mail_preview import Ui_eMailPreview as MailPreviewDialog
|
||||
from .mailTemplate import MailTemplateDialog
|
||||
config = OmegaConf.load("config.yaml")
|
||||
|
||||
logger = MyLogger("Mail")
|
||||
|
||||
|
||||
class Mail_Dialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
class Mail_Dialog(QtWidgets.QDialog, MailPreviewDialog):
|
||||
def __init__(
|
||||
self,
|
||||
app_id,
|
||||
@@ -34,6 +32,7 @@ class Mail_Dialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
# app_subject,
|
||||
# prof_name,
|
||||
)
|
||||
|
||||
self.appid = app_id
|
||||
self.appname = app_name
|
||||
self.subject = app_subject
|
||||
@@ -46,8 +45,9 @@ class Mail_Dialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
self.mail_name.setText(self.prof_mail)
|
||||
self.load_mail_templates()
|
||||
# if none of the radio buttons is checked, disable the accept button of the dialog
|
||||
self.setWindowIcon(Icon("mail").icon)
|
||||
self.btn_okay.setEnabled(False)
|
||||
Icon("edit_note").set_icon(self.newTemplate)
|
||||
Icon("edit_note",self.newTemplate)
|
||||
self.newTemplate.clicked.connect(self.open_new_template)
|
||||
|
||||
if default_mail is not None:
|
||||
@@ -73,6 +73,8 @@ class Mail_Dialog(QtWidgets.QDialog, Ui_Dialog):
|
||||
def open_new_template(self):
|
||||
logger.log_info("Opening new template dialog")
|
||||
# TODO: implement new mail template dialog
|
||||
dialog = MailTemplateDialog()
|
||||
dialog.exec()
|
||||
pass
|
||||
|
||||
def determine_signature(self):
|
||||
|
||||
Reference in New Issue
Block a user