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_("/_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[3];
- gboolean success[3];
+ GdkColor color[4];
+ gboolean success[4];
guint n_menu_entries;
GtkItemFactory *ifactory;
GtkWidget *ac_menu;
folderview->color_new.red = (guint16)55000;
folderview->color_new.green = folderview->color_new.blue = 15000;
+ gtkut_convert_int_to_gdk_color(prefs_common.tgt_folder_col,
+ &folderview->color_op);
+
summaryview->color_important.red = 0;
summaryview->color_marked.green = 0;
summaryview->color_important.blue = (guint16)65535;
color[0] = summaryview->color_marked;
color[1] = summaryview->color_dim;
color[2] = folderview->color_new;
+ color[3] = folderview->color_op;
colormap = gdk_window_get_colormap(window->window);
- gdk_colormap_alloc_colors(colormap, color, 3, FALSE, TRUE, success);
- for (i = 0; i < 3; 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) {
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);
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,
}
}
-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(cur_account);
+ compose_new_with_folderitem(cur_account, mainwin->summaryview->folder_item);
return;
}
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;
}
}
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;