guint info,
guint time,
FolderView *folderview);
+static void folderview_scoring_cb(FolderView *folderview, guint action,
+ GtkWidget *widget);
static GtkItemFactoryEntry folderview_mbox_popup_entries[] =
{
{N_("/---"), NULL, NULL, 0, "<Separator>"},
{N_("/Remove _mailbox"), NULL, folderview_remove_mailbox_cb, 0, NULL},
{N_("/---"), NULL, NULL, 0, "<Separator>"},
- {N_("/_Property..."), NULL, NULL, 0, NULL}
+ {N_("/_Property..."), NULL, NULL, 0, NULL},
+ {N_("/_Scoring..."), NULL, folderview_scoring_cb, 0, NULL}
};
static GtkItemFactoryEntry folderview_mail_popup_entries[] =
{N_("/---"), NULL, NULL, 0, "<Separator>"},
{N_("/Remove _mailbox"), NULL, folderview_remove_mailbox_cb, 0, NULL},
{N_("/---"), NULL, NULL, 0, "<Separator>"},
- {N_("/_Property..."), NULL, NULL, 0, NULL}
+ {N_("/_Property..."), NULL, NULL, 0, NULL},
+ {N_("/_Scoring..."), NULL, folderview_scoring_cb, 0, NULL}
};
static GtkItemFactoryEntry folderview_imap_popup_entries[] =
{N_("/---"), NULL, NULL, 0, "<Separator>"},
{N_("/Remove _IMAP4 server"), NULL, folderview_rm_imap_server_cb, 0, NULL},
{N_("/---"), NULL, NULL, 0, "<Separator>"},
- {N_("/_Property..."), NULL, NULL, 0, NULL}
+ {N_("/_Property..."), NULL, NULL, 0, NULL},
+ {N_("/_Scoring..."), NULL, folderview_scoring_cb, 0, NULL}
};
static GtkItemFactoryEntry folderview_news_popup_entries[] =
{N_("/---"), NULL, NULL, 0, "<Separator>"},
{N_("/Remove _news server"), NULL, folderview_rm_news_server_cb, 0, NULL},
{N_("/---"), NULL, NULL, 0, "<Separator>"},
- {N_("/_Property..."), NULL, NULL, 0, NULL}
+ {N_("/_Property..."), NULL, NULL, 0, NULL},
+ {N_("/_Scoring..."), NULL, folderview_scoring_cb, 0, NULL}
};
} else if (folder->type == F_MH && item->stype != F_NORMAL) {
menu_set_sensitive(folderview->mail_factory,
"/Create new folder...", TRUE);
+ menu_set_sensitive(folderview->mail_factory,
+ "/Scoring...", TRUE);
} else if (folder->type == F_MH) {
menu_set_sensitive(folderview->mail_factory,
"/Create new folder...", TRUE);
"/Rename folder...", TRUE);
menu_set_sensitive(folderview->mail_factory,
"/Delete folder", TRUE);
+ menu_set_sensitive(folderview->mail_factory,
+ "/Scoring...", TRUE);
} else if (folder->type == F_IMAP && item->parent == NULL) {
menu_set_sensitive(folderview->imap_factory,
"/Create new folder...", TRUE);
"/Create new folder...", TRUE);
menu_set_sensitive(folderview->imap_factory,
"/Delete folder", TRUE);
+ menu_set_sensitive(folderview->imap_factory,
+ "/Scoring...", TRUE);
} else if (folder->type == F_NEWS && item->parent == NULL) {
menu_set_sensitive(folderview->news_factory,
"/Subscribe to newsgroup...", TRUE);
"/Subscribe to newsgroup...", TRUE);
menu_set_sensitive(folderview->news_factory,
"/Remove newsgroup", TRUE);
+ menu_set_sensitive(folderview->news_factory,
+ "/Scoring...", TRUE);
}
if (folder->type == F_MBOX && item->parent == NULL) {
menu_set_sensitive(folderview->mbox_factory,
} else if (folder->type == F_MBOX && item->stype != F_NORMAL) {
menu_set_sensitive(folderview->mbox_factory,
"/Create new folder...", TRUE);
+ menu_set_sensitive(folderview->mbox_factory,
+ "/Scoring...", TRUE);
} else if (folder->type == F_MBOX) {
menu_set_sensitive(folderview->mbox_factory,
"/Create new folder...", TRUE);
"/Rename folder...", TRUE);
menu_set_sensitive(folderview->mbox_factory,
"/Delete folder", TRUE);
+ menu_set_sensitive(folderview->mbox_factory,
+ "/Scoring...", TRUE);
}
if (folder->type == F_MH)
if (!item->path) return -1;
return strcmp2(g_basename(item->path), name);
}
+
+static void folderview_scoring_cb(FolderView *folderview, guint action,
+ GtkWidget *widget)
+{
+ GtkCTree *ctree = GTK_CTREE(folderview->ctree);
+ FolderItem *item;
+
+ if (!folderview->selected) return;
+
+ item = gtk_ctree_node_get_row_data(ctree, folderview->selected);
+ g_return_if_fail(item != NULL);
+ g_return_if_fail(item->folder != NULL);
+
+ prefs_scoring_open(item);
+}