Example #1
0
    def __init__(self,
                 mail=None,
                 server='localhost',
                 show_to=True,
                 show_cc=True,
                 show_bcc=False):
        """
        Create a new editor window. All arguments are passed to the
        underlying MailWidget.

        @type  mail: Exscript.util.mail.Mail
        @param mail: An optional email object to attach.
        @type  server: string
        @param server: The address of the mailserver.
        @type  show_to: bool
        @param show_to: Whether to show the "To:" entry box.
        @type  show_cc: bool
        @param show_cc: Whether to show the "Cc:" entry box.
        @type  show_bcc: bool
        @param show_bcc: Whether to show the "Bcc:" entry box.
        """
        self.widget = None
        Frame.__init__(self)
        self.pack(expand=True, fill=BOTH)

        self.widget = MailWidget(self,
                                 mail,
                                 server=server,
                                 show_to=show_to,
                                 show_cc=show_cc,
                                 show_bcc=show_bcc,
                                 on_subject_changed=self._update_subject)
        self.widget.pack(expand=True, fill=BOTH, padx=6, pady=6)
        self._on_subject_changed(None)