static void toggle_statusbar_cb (MainWindow *mainwin,
guint action,
GtkWidget *widget);
-static void separate_widget_cb(GtkCheckMenuItem *checkitem, guint action);
+static void separate_widget_cb (GtkCheckMenuItem *checkitem,
+ guint action,
+ GtkWidget *widget);
static void addressbook_open_cb (MainWindow *mainwin,
guint action,
{N_("/_Summary/_Sort/Sort by _from"), NULL, sort_summary_cb, SORT_BY_FROM, NULL},
{N_("/_Summary/_Sort/Sort by _subject"),NULL, sort_summary_cb, SORT_BY_SUBJECT, NULL},
{N_("/_Summary/_Sort/Sort by sco_re"), NULL, sort_summary_cb, SORT_BY_SCORE, NULL},
+ {N_("/_Summary/_Sort/Sort by _label"), NULL, sort_summary_cb, SORT_BY_LABEL, NULL},
{N_("/_Summary/_Sort/---"), NULL, NULL, 0, "<Separator>"},
{N_("/_Summary/_Sort/_Attract by subject"),
NULL, attract_by_subject_cb, 0, NULL},
{N_("/_Help"), NULL, NULL, 0, "<LastBranch>"},
{N_("/_Help/_Manual"), NULL, NULL, 0, "<Branch>"},
- {N_("/_Help/_Manual/_English"), NULL, NULL, MANUAL_LANG_EN, NULL},
+ {N_("/_Help/_Manual/_English"), NULL, manual_open_cb, MANUAL_LANG_EN, NULL},
{N_("/_Help/_Manual/_Japanese"), NULL, manual_open_cb, MANUAL_LANG_JA, NULL},
{N_("/_Help/---"), NULL, NULL, 0, "<Separator>"},
{N_("/_Help/_About"), NULL, about_show, 0, NULL}
SummaryView *summaryview;
MessageView *messageview;
GdkColormap *colormap;
- GdkColor color[5];
- gboolean success[5];
+ GdkColor color[4];
+ gboolean success[4];
guint n_menu_entries;
GtkItemFactory *ifactory;
GtkWidget *ac_menu;
summaryview->color_dim.red = summaryview->color_dim.green =
summaryview->color_dim.blue = COLOR_DIM;
- summaryview->color_normal.red = summaryview->color_normal.green =
- summaryview->color_normal.blue = 0;
-
folderview->color_new.red = (guint16)55000;
folderview->color_new.green = folderview->color_new.blue = 15000;
- folderview->color_normal.red = folderview->color_normal.green =
- folderview->color_normal.blue = 0;
+ gtkut_convert_int_to_gdk_color(prefs_common.tgt_folder_col,
+ &folderview->color_op);
summaryview->color_important.red = 0;
summaryview->color_marked.green = 0;
color[0] = summaryview->color_marked;
color[1] = summaryview->color_dim;
- color[2] = summaryview->color_normal;
- color[3] = folderview->color_new;
- color[4] = folderview->color_normal;
+ color[2] = folderview->color_new;
+ color[3] = folderview->color_op;
colormap = gdk_window_get_colormap(window->window);
- gdk_colormap_alloc_colors(colormap, color, 5, FALSE, TRUE, success);
- for (i = 0; i < 5; i++) {
+ gdk_colormap_alloc_colors(colormap, color, 4, FALSE, TRUE, success);
+ for (i = 0; i < 4; i++) {
if (success[i] == FALSE)
g_warning(_("MainWindow: color allocation %d failed\n"), i);
}
gtk_signal_connect(GTK_OBJECT(menuitem), "toggled", GTK_SIGNAL_FUNC(separate_widget_cb),
GUINT_TO_POINTER(SEPARATE_MESSAGE));
- /*
+
menu_set_sensitive(ifactory, "/Summary/Thread view",
prefs_common.enable_thread ? FALSE : TRUE);
menu_set_sensitive(ifactory, "/Summary/Unthread view",
prefs_common.enable_thread ? TRUE : FALSE);
- */
- main_window_set_thread_option(mainwin);
+
+ /*main_window_set_thread_option(mainwin);*/
- menu_set_sensitive(ifactory, "/Help/Manual/English", FALSE);
/* set account selection menu */
ac_menu = gtk_item_factory_get_widget
header_window_init(mainwin->headerwin);
log_window_init(mainwin->logwin);
- {
- GtkStyle *newstyle;
-
- gtk_widget_ensure_style(folderview->ctree);
- newstyle = gtk_widget_get_style(folderview->ctree);
- newstyle = gtk_style_copy(newstyle);
- gtk_widget_set_style(summaryview->ctree, newstyle);
- gtk_widget_ensure_style(summaryview->ctree);
- gtk_widget_realize(summaryview->ctree);
- }
-
mainwin->cursor_count = 0;
if (!watch_cursor)
g_free(path);
return;
}
-
if (!strcmp(path, "Mail"))
folder = folder_new(F_MH, _("Mailbox"), path);
else
folder = folder_new(F_MH, g_basename(path), path);
-
g_free(path);
if (folder->create_tree(folder) < 0) {
menu_set_sensitive(ifactory, "/Message/Reply", sens);
menu_set_sensitive(ifactory, "/Message/Reply to sender", sens);
menu_set_sensitive(ifactory, "/Message/Reply to all", sens);
- menu_set_sensitive(ifactory, "/Message/Forward", sens);
- menu_set_sensitive(ifactory, "/Message/Forward as attachment", sens);
+ menu_set_sensitive(ifactory, "/Message/Forward", TRUE);
+ menu_set_sensitive(ifactory, "/Message/Forward as attachment", TRUE);
menu_set_sensitive(ifactory, "/Message/Open in new window", sens);
menu_set_sensitive(ifactory, "/Message/Show all header", sens);
menu_set_sensitive(ifactory, "/Message/View source", sens);
y %= sy; if (y < 0) y += sy;
gdk_window_move(mainwin->window->window, x, y);
gdk_window_raise(mainwin->window->window);
+ gdk_window_show(mainwin->window->window);
debug_print("window position: x = %d, y = %d\n", x, y);
gdk_window_raise(widget->window);
break;
default:
+ break;
}
}
GtkWidget *compose_type_arrow;
GtkWidget *compose_box;
GtkWidget *compose_label;
+ GtkTooltips *tooltips;
toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL,
GTK_TOOLBAR_BOTH);
compose_mail_btn = gtk_button_new();
gtk_widget_show(compose_mail_btn);
-
+ tooltips = gtk_tooltips_new();
+ gtk_tooltips_set_tip(tooltips, compose_mail_btn,
+ _("Compose email message"),
+ _("email"));
compose_box = gtk_vbox_new(0, 0);
gtk_widget_show(compose_box);
CREATE_TOOLBAR_ICON(stock_mail_compose_xpm);
gtk_box_pack_start(GTK_BOX(compose_box), icon_wid, FALSE, FALSE, 0);
- compose_label = gtk_label_new(_("Compose email"));
+ compose_label = gtk_label_new(_("Email"));
gtk_widget_show(compose_label);
gtk_box_pack_start(GTK_BOX(compose_box), compose_label, FALSE, FALSE, 0);
compose_news_btn = gtk_button_new();
gtk_widget_show(compose_news_btn);
-
+ tooltips = gtk_tooltips_new();
+ gtk_tooltips_set_tip(tooltips, compose_news_btn,
+ _("Compose news article"),
+ _("news"));
compose_box = gtk_vbox_new(0, 0);
gtk_widget_show(compose_box);
CREATE_TOOLBAR_ICON(stock_news_compose_xpm);
gtk_box_pack_start(GTK_BOX(compose_box), icon_wid, FALSE, FALSE, 0);
- compose_label = gtk_label_new(_("Compose news"));
+ compose_label = gtk_label_new(_("News"));
gtk_widget_show(compose_label);
gtk_box_pack_start(GTK_BOX(compose_box), compose_label, FALSE, FALSE, 0);
CREATE_TOOLBAR_ICON(stock_mail_compose_xpm);
compose_mail_btn_plain = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar),
- _("Compose email"),
+ _("Email"),
_("Compose an email message"),
"New",
icon_wid,
CREATE_TOOLBAR_ICON(stock_news_compose_xpm);
compose_news_btn_plain = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar),
- _("Compose news"),
+ _("News"),
_("Compose a news message"),
"New",
icon_wid,
gtk_toolbar_append_widget(GTK_TOOLBAR(toolbar), compose_type_btn,
NULL, NULL);
-#if 0
- CREATE_TOOLBAR_ICON(stock_news_compose_xpm);
- compose_news_btn = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar),
- _("Compose news"),
- _("Compose a news message"),
- "New",
- icon_wid,
- toolbar_compose_news_cb,
- mainwin);
-#endif
-
gtk_toolbar_append_space(GTK_TOOLBAR(toolbar));
CREATE_TOOLBAR_ICON(stock_mail_reply_xpm);
mainwin);
gtk_signal_connect(GTK_OBJECT(compose_mail_btn), "clicked",
- GTK_SIGNAL_FUNC(toolbar_compose_cb),
+ GTK_SIGNAL_FUNC(toolbar_compose_mail_cb),
mainwin);
-
+
+ gtk_signal_connect(GTK_OBJECT(compose_news_btn), "clicked",
+ GTK_SIGNAL_FUNC(toolbar_compose_news_cb),
+ mainwin);
+
mainwin->toolbar = toolbar;
mainwin->get_btn = get_btn;
mainwin->getall_btn = getall_btn;
compose_menu = gtk_menu_new();
- compose_item = gtk_menu_item_new_with_label(_("E-Mail message"));
+ compose_item = gtk_menu_item_new_with_label(_("Email message"));
gtk_widget_show(compose_item);
gtk_menu_append(GTK_MENU(compose_menu), compose_item);
gtk_signal_connect(GTK_OBJECT(compose_item), "activate",
}
}
-static void separate_widget_cb(GtkCheckMenuItem *checkitem, guint action)
+static void separate_widget_cb(GtkCheckMenuItem *checkitem, guint action, GtkWidget *widget)
+
{
MainWindow *mainwin;
SeparateType type;
&& mainwin->summaryview->folder_item->folder->account->protocol == A_NNTP)
compose_new_with_recipient(mainwin->summaryview->folder_item->folder->account, mainwin->summaryview->folder_item->path);
else
- compose_new(mainwin->summaryview->folder_item->folder->account);
+ compose_new_with_folderitem(mainwin->summaryview->folder_item->folder->account, mainwin->summaryview->folder_item);
}
else
compose_new(NULL);
if (mainwin->summaryview->folder_item) {
ac = mainwin->summaryview->folder_item->folder->account;
if (ac && ac->protocol != A_NNTP) {
- compose_new(ac);
+ compose_new_with_folderitem(ac, mainwin->summaryview->folder_item);
return;
}
}
+ if(cur_account && (cur_account->protocol != A_NNTP)) {
+ compose_new_with_folderitem(cur_account, mainwin->summaryview->folder_item);
+ return;
+ }
+
list = account_get_list();
for(cur = list ; cur != NULL ; cur = g_list_next(cur)) {
ac = (PrefsAccount *) cur->data;
if (ac->protocol != A_NNTP) {
- compose_new(ac);
+ compose_new_with_folderitem(ac, mainwin->summaryview->folder_item);
return;
}
}
static void reply_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
{
+ GList *sel = GTK_CLIST(mainwin->summaryview->ctree)->selection;
MsgInfo *msginfo;
msginfo = gtk_ctree_node_get_row_data
TRUE, FALSE);
break;
case COMPOSE_FORWARD:
- compose_forward(NULL, msginfo, FALSE);
- break;
+ if (!sel->next) {
+ compose_forward(NULL, msginfo, FALSE);
+ break;
+ }
+ /* if (sel->next) FALL_THROUGH */
case COMPOSE_FORWARD_AS_ATTACH:
- compose_forward(NULL, msginfo, TRUE);
+ {
+ GSList *msginfo_list = NULL;
+ for ( ; sel != NULL; sel = sel->next)
+ msginfo_list = g_slist_append(msginfo_list,
+ gtk_ctree_node_get_row_data(GTK_CTREE(mainwin->summaryview->ctree),
+ GTK_CTREE_NODE(sel->data)));
+ compose_forward_multiple(NULL, msginfo_list);
+ g_slist_free(msginfo_list);
+ }
break;
default:
g_warning("reply_cb(): invalid action type: %d\n", action);
debug_print(_("forced charset: %s\n"), str ? str : "Auto-Detect");
}
-void main_window_set_thread_option(MainWindow *mainwin)
+/*void main_window_set_thread_option(MainWindow *mainwin)
{
GtkItemFactory *ifactory;
gboolean no_item = FALSE;
"/Summary/Thread view", FALSE);
menu_set_sensitive(ifactory,
"/Summary/Unthread view", TRUE);
- summary_thread_build(mainwin->summaryview);
+ summary_thread_build(mainwin->summaryview, TRUE);
}
else {
menu_set_sensitive(ifactory,
}
prefs_folder_item_save_config(mainwin->summaryview->folder_item);
}
-}
+}*/
static void thread_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
{
- mainwin->summaryview->folder_item->prefs->enable_thread =
+ /*mainwin->summaryview->folder_item->prefs->enable_thread =
!mainwin->summaryview->folder_item->prefs->enable_thread;
main_window_set_thread_option(mainwin);
+ */
+
+ GtkItemFactory *ifactory;
+
+ ifactory = gtk_item_factory_from_widget(widget);
- /*
if (0 == action) {
- summary_thread_build(mainwin->summaryview);
- mainwin->summaryview->folder_item->prefs->enable_thread =
- TRUE;
+ summary_thread_build(mainwin->summaryview, FALSE);
+ prefs_common.enable_thread = TRUE;
menu_set_sensitive(ifactory, "/Summary/Thread view", FALSE);
menu_set_sensitive(ifactory, "/Summary/Unthread view", TRUE);
} else {
summary_unthread(mainwin->summaryview);
- mainwin->summaryview->folder_item->prefs->enable_thread =
- FALSE;
+ prefs_common.enable_thread = FALSE;
menu_set_sensitive(ifactory, "/Summary/Thread view", TRUE);
menu_set_sensitive(ifactory, "/Summary/Unthread view", FALSE);
}
- */
+
}
static void set_display_item_cb(MainWindow *mainwin, guint action,
if (!mainwin->summaryview->folder_item) return;
if (!folderview->opened) return;
+ folder_update_op_count();
+
fitem = gtk_ctree_node_get_row_data(GTK_CTREE(folderview->ctree),
folderview->opened);
if (!fitem) return;