* details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with these librararies and programs; if not, write
+ * License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
{
label = NULL;
header = NULL;
+ value = NULL;
show = other.show;
form_widget = other.form_widget;
label_widget = other.label_widget;
{
DtMailEnv error;
DtMail::Envelope * env;
- int textLen;
+ int textLen = 0;
env = _msgHandle->getEnvelope(error);
storeHeaders();
XtFree(widget_text);
widget_text = NULL;
}
- else
- textLen = strlen(widget_text);
-
+ else if(widget_text) {
+ textLen = strlen(widget_text);
+ }
// Even if textlen is 0 because user has cleared all previous text,
// need to setContents again to clear first BP. Otherwise, deleted
// text will show up.
int slot = lookupHeader(name);
if (slot < 0) {
- // We dont have a place for this information. We may need
+ // We don't have a place for this information. We may need
// to create a new header.
//
if (load_all) {
else {
env->removeHeader(error, hl->header);
}
- if (value) {
- XtFree(value);
- }
+ XtFree(value);
}
}
* There was an error in one or more of the email addresses.
* Ask the user to type in a valid address and try again.
*/
- sprintf(buf, GETMSG(DT_catd, 5, 5,
+ sprintf(buf, "%s", GETMSG(DT_catd, 5, 5,
"Some of the addresses in the message are incorrect,\n\
and do not refer to any known users in the system.\n\
Please make sure all of the addresses are valid and try again."));
* applications so there will be more memory available.
*/
- sprintf(buf, GETMSG(DT_catd, 5, 6,
+ sprintf(buf, "%s", GETMSG(DT_catd, 5, 6,
"Mailer does not have enough memory\n\
available to send this message.\n\
Try quitting other applications and\n\
* There was an error from the mail transport (sendmail).
*/
- sprintf(buf, GETMSG(DT_catd, 5, 7,
+ sprintf(buf, "%s", GETMSG(DT_catd, 5, 7,
"An error occurred while trying to send your message.\n\
Check to make sure the message was received. If not,\n\
you may have to resend this message."));
if (!this->hasAddressee()) {
// Message has no valid addressee. Pop up error dialog.
- sprintf(buf, GETMSG(DT_catd, 5, 8,
+ sprintf(buf, "%s", GETMSG(DT_catd, 5, 8,
"Try Send after specifying recipient(s) of the message in \nthe To:, Cc:, or Bcc: fields."));
helpId = DTMAILHELPNEEDADDRESSEE;
numPendingActions = attachArea->getNumPendingActions();
- sprintf(buf, GETMSG(
+ sprintf(buf, "%s", GETMSG(
DT_catd,
3,
77,
* Mailer ran out of memory. Ask the user to quit some other
* applications so there will be more memory available.
*/
- sprintf(buf, GETMSG(DT_catd, 5, 6,
+ sprintf(buf, "%s", GETMSG(DT_catd, 5, 6,
"Mailer does not have enough memory\n\
available to send this message.\n\
Try quitting other applications and\n\
printHelpId("form", _main_form);
/* add help callback */
- XtAddCallback(_main_form, XmNhelpCallback, HelpCB, DTMAILCOMPOSEWINDOW);
+ XtAddCallback(_main_form, XmNhelpCallback, HelpCB, (void *)DTMAILCOMPOSEWINDOW);
XtVaSetValues(_main_form, XmNallowResize, True, NULL);
{
SendMsgDialog *obj = (SendMsgDialog *)client_data;
obj->include_file(selection);
- if (NULL != selection)
- XtFree(selection);
-
+ XtFree(selection);
}
void
_textPopupMenuList->add( _edit_cut );
_textPopupMenuList->add( _edit_copy );
_textPopupMenuList->add( _edit_paste );
-#ifdef __osf__
- // Work in progress from Mike. This adds the Paste Special to the
- // third mouse button in the compose area of a compose window.
- // Begin Paste Special submenu
- CmdList * subcmdList1 = new CmdList ( "Paste Special", GETMSG(DT_catd, 1, 135 , "Paste Special") );
- subcmdList1->add(_edit_paste_special[0]);
- subcmdList1->add(_edit_paste_special[1]);
- // End Paste Special submenu
- _textPopupMenuList->add( subcmdList1 ); // Add Paste Special submenu
- // (Either way) _textPopupMenuList->add( separator );
- _textPopupMenuList->add( _edit_clear );
-#endif
_textPopupMenuList->add( _edit_delete );
_textPopupMenuList->add( _edit_select_all );
_lastAttBP = NULL; // So just set this to NULL.
// Delete or set to NULL ???
_inclMsgHandle = NULL;
- _inclMsgHasText = NULL;
+ _inclMsgHasText = 0;
for (int clear = 0; clear < _header_list.length(); clear++) {
HeaderList * hl = _header_list[clear];
if (SafeRead(fd, _dead_letter_buf,
(unsigned int) buf.st_size) != buf.st_size) {
- delete _dead_letter_buf;
+ delete [] _dead_letter_buf;
close(fd);
return;
}
if (attachArea->getIconSelectedCount() > 1) {
char *buf = new char[512];
- sprintf(buf, GETMSG(DT_catd, 5, 4, "Select only one attachment\n\
+ sprintf(buf, "%s", GETMSG(DT_catd, 5, 4, "Select only one attachment\n\
and then choose rename"));
_genDialog->setToQuestionDialog(
for (i=0, j=results.length(); i < j; i++) {
PropStringPair * psp = results[i];
int slot = lookupHeader(psp->label);
- // dont allow removal of default headers.
+ // don't allow removal of default headers.
HeaderList * hl = _header_list[slot];
if (!reservedHeader(hl->label)) {
if (slot != -1)