fprintf(fp, "Subject: Disposition notification: %s\n", buf);
/* Message ID */
- generate_msgid(account->address, buf, sizeof buf);
+ generate_msgid(buf, sizeof(buf));
fprintf(fp, "Message-ID: <%s>\n", buf);
if (fclose(fp) == EOF) {
if (messageview->msginfo != msginfo) {
procmsg_msginfo_free(messageview->msginfo);
messageview->msginfo = procmsg_msginfo_get_full_info(msginfo);
+ if (!messageview->msginfo)
+ messageview->msginfo = procmsg_msginfo_copy(msginfo);
}
headerview_show(messageview->headerview, messageview->msginfo);
{
gchar *filename = NULL;
MsgInfo *msginfo;
- gchar *src, *dest;
+ gchar *src, *dest, *tmp;
if (!messageview->msginfo) return;
msginfo = messageview->msginfo;
src = procmsg_get_message_file(msginfo);
if (copy_file(src, dest, TRUE) < 0) {
- alertpanel_error(_("Can't save the file `%s'."),
- g_basename(dest));
+ tmp = g_path_get_basename(dest);
+ alertpanel_error(_("Can't save the file `%s'."), tmp);
+ g_free(tmp);
}
+ g_free(dest);
g_free(src);
}
noticeview_set_text(noticeview, _("This message asks for a return receipt."));
noticeview_set_button_text(noticeview, _("Send receipt"));
noticeview_set_button_press_callback(noticeview,
- GTK_SIGNAL_FUNC(return_receipt_send_clicked),
+ G_CALLBACK(return_receipt_send_clicked),
(gpointer) msginfo);
noticeview_show(noticeview);
}
g_free(text);
noticeview_set_button_text(noticeview, button1);
noticeview_set_button_press_callback(noticeview,
- GTK_SIGNAL_FUNC(button1_cb), (gpointer) msginfo);
+ G_CALLBACK(button1_cb), (gpointer) msginfo);
noticeview_set_2ndbutton_text(noticeview, button2);
noticeview_set_2ndbutton_press_callback(noticeview,
- GTK_SIGNAL_FUNC(button2_cb), (gpointer) msginfo);
+ G_CALLBACK(button2_cb), (gpointer) msginfo);
noticeview_show(noticeview);
}
GtkItemFactory *ifactory;
GtkWidget *menuitem;
- if (!messageview && !messageview->new_window)
+ if (!messageview || !messageview->new_window)
return;
/* do some smart things */
if (!messageview->menubar) return;