}
}
if (!prefs_common.summary_quicksearch_sticky
- && !prefs_common.summary_quicksearch_recurse
+ && (!prefs_common.summary_quicksearch_recurse
+ || !quicksearch_is_active(summaryview->quicksearch))
&& !quicksearch_is_running(summaryview->quicksearch)
&& !is_refresh) {
quicksearch_set(summaryview->quicksearch, prefs_common.summary_quicksearch_type, "");
g_free(str);
}
+ summary_set_menu_sensitive(summaryview);
toolbar_main_set_sensitive(summaryview->mainwin);
}
if (!prefs_common.live_dangerously) {
gchar *buf = NULL;
int num = g_list_length(GTK_CLIST(summaryview->ctree)->selection);
- if (num == 1)
- buf = g_strdup_printf(_(
- "Do you really want to delete the selected message?"));
- else
- buf = g_strdup_printf(_(
- "Do you really want to delete the %d selected messages?"),
- num);
+ buf = g_strdup_printf(ngettext(
+ "Do you really want to delete the selected message?",
+ "Do you really want to delete the %d selected messages?", num),
+ num);
aval = alertpanel(_("Delete message(s)"),
buf,
GTK_STOCK_CANCEL, "+"GTK_STOCK_DELETE, NULL);
return;
}
+ if (to_folder->no_select) {
+ alertpanel_error(_("The destination folder can only be used to "
+ "store subfolders."));
+ return;
+ }
+
START_LONG_OPERATION(summaryview, FALSE);
for (cur = GTK_CLIST(summaryview->ctree)->selection;
return;
}
+ if (to_folder->no_select) {
+ alertpanel_error(_("The destination folder can only be used to "
+ "store subfolders."));
+ return;
+ }
+
START_LONG_OPERATION(summaryview, FALSE);
for (cur = GTK_CLIST(summaryview->ctree)->selection;
void summary_add_address(SummaryView *summaryview)
{
- MsgInfo *msginfo;
+ MsgInfo *msginfo, *full_msginfo;
gchar *from;
+ GtkWidget *image = NULL;
+ GdkPixbuf *picture = NULL;
msginfo = gtk_ctree_node_get_row_data(GTK_CTREE(summaryview->ctree),
summaryview->selected);
- if (!msginfo) return;
+ if (!msginfo || !msginfo->from)
+ return;
Xstrdup_a(from, msginfo->from, return);
eliminate_address_comment(from);
extract_address(from);
- addressbook_add_contact(msginfo->fromname, from, NULL);
+
+ full_msginfo = procmsg_msginfo_get_full_info(msginfo);
+ if (full_msginfo &&
+ full_msginfo->extradata &&
+ full_msginfo->extradata->face) {
+ image = face_get_from_header(full_msginfo->extradata->face);
+ }
+#if HAVE_LIBCOMPFACE
+ else if (full_msginfo &&
+ full_msginfo->extradata &&
+ full_msginfo->extradata->xface) {
+ image = xface_get_from_header(full_msginfo->extradata->xface,
+ &summaryview->ctree->style->white,
+ summaryview->mainwin->window->window);
+ }
+#endif
+ procmsg_msginfo_free(full_msginfo);
+ if (image)
+ picture = gtk_image_get_pixbuf(GTK_IMAGE(image));
+
+ addressbook_add_contact(msginfo->fromname, from, NULL, picture);
+
+ if (image)
+ gtk_widget_destroy(image);
}
void summary_select_all(SummaryView *summaryview)
void summary_print(SummaryView *summaryview)
{
GtkCList *clist = GTK_CLIST(summaryview->ctree);
-#ifndef USE_GNOMEPRINT
+#if !defined(USE_GNOMEPRINT) && !GTK_CHECK_VERSION(2,10,0)
GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
MsgInfo *msginfo;
gchar *cmdline = NULL;
g_free(msg);
if (clist->selection == NULL) return;
-#ifndef USE_GNOMEPRINT
+#if !defined(USE_GNOMEPRINT) && !GTK_CHECK_VERSION(2,10,0)
cmdline = input_dialog(_("Print"),
_("Enter the print command line:\n"
"('%s' will be replaced with file name)"),
case GDK_KP_Enter:
handled = TRUE;
if (summaryview->displayed != summaryview->selected) {
+#ifndef MAEMO
summary_display_msg(summaryview,
summaryview->selected);
+#else
+ summary_open_row(NULL, summaryview);
+#endif
break;
}
mimeview_scroll_one_line(messageview->mimeview, mod_pressed);
gchar *mbox = filesel_select_file_save(_("Export to mbox file"), NULL);
gint ret;
- if (mbox == NULL || list == NULL)
+ if (mbox == NULL)
+ return -2;
+ if (list == NULL)
return -1;
ret = export_list_to_mbox(list, mbox);