{N_("/_File"), NULL, NULL, 0, "<Branch>"},
{N_("/_File/_Add mailbox..."), NULL, add_mailbox_cb, 0, NULL},
{N_("/_File/_Add mbox mailbox..."), NULL, add_mbox_cb, 0, NULL},
- {N_("/_File/_Check for new mails in all folders"),
+ {N_("/_File/_Check for new messages in all folders"),
NULL, update_folderview_cb, 0, NULL},
{N_("/_File/_Folder"), NULL, NULL, 0, "<Branch>"},
{N_("/_File/_Folder/Create _new folder..."),
static GdkGeometry geometry;
- debug_print(_("Creating main window...\n"));
+ debug_print("Creating main window...\n");
mainwin = g_new0(MainWindow, 1);
/* main window */
gtk_widget_show(handlebox);
gtk_box_pack_start(GTK_BOX(vbox), handlebox, FALSE, FALSE, 0);
- /* create the popup menus for the reply buttons specials */
- toolbar_popups_create(mainwin, window);
+ /* link window to mainwin->window to avoid gdk warnings */
+ mainwin->window = window;
+
+ /* create toolbar */
toolbar_create(mainwin, handlebox);
/* vbox that contains body */
messageview->mainwin = mainwin;
- mainwin->window = window;
mainwin->vbox = vbox;
mainwin->menubar = menubar;
mainwin->menu_factory = ifactory;
g_warning(_("MainWindow: color allocation %d failed\n"), i);
}
- debug_print(_("done.\n"));
+ debug_print("done.\n");
messageview->visible = TRUE;
(ifactory, "/View/Show or hide/Status bar");
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem),
prefs_common.show_statusbar);
+
+ gtk_widget_hide(GTK_WIDGET(mainwin->summaryview->hbox_search));
+
+ if (prefs_common.show_searchbar)
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mainwin->summaryview->toggle_search), TRUE);
+
/* set account selection menu */
ac_menu = gtk_item_factory_get_widget
GtkWidget *summary_wid = GTK_WIDGET_PTR(mainwin->summaryview);
GtkWidget *message_wid = GTK_WIDGET_PTR(mainwin->messageview);
- debug_print(_("Changing window separation type from %d to %d\n"),
+ debug_print("Changing window separation type from %d to %d\n",
mainwin->type, type);
if (mainwin->type == type) return;
prefs_common.mainwin_x = x;
prefs_common.mainwin_y = y;
- debug_print(_("window position: x = %d, y = %d\n"), x, y);
+ debug_print("window position: x = %d, y = %d\n", x, y);
}
void main_window_empty_trash(MainWindow *mainwin, gboolean confirm)
state |= M_MSG_EXIST;
if (item && item->path && item->parent && !item->no_select) {
state |= M_EXEC;
- if (item->threaded)
- state |= M_THREADED;
- else
- state |= M_UNTHREADED;
/* if (item->folder->type != F_NEWS) */
state |= M_ALLOW_DELETE;
|| selection != SUMMARY_NONE)
state |= M_HIDE_READ_MSG;
}
+ if (mainwin->summaryview->threaded)
+ state |= M_THREADED;
+ else
+ state |= M_UNTHREADED;
if (selection == SUMMARY_SELECTED_SINGLE ||
selection == SUMMARY_SELECTED_MULTIPLE)
state |= M_TARGET_EXIST;
SensitiveCond state;
gboolean sensitive;
GtkWidget *menuitem;
- FolderItem *item;
+ SummaryView *summaryview;
gchar *menu_path;
gint i;
gchar *const entry;
SensitiveCond cond;
} entry[] = {
- {"/File/Add mailbox..." , M_UNLOCKED},
- {"/File/Add mbox mailbox..." , M_UNLOCKED},
- {"/File/Check for new mails in all folders", M_UNLOCKED},
- {"/File/Folder" , M_UNLOCKED},
- {"/File/Import mbox file..." , M_UNLOCKED},
- {"/File/Export to mbox file...", M_UNLOCKED},
- {"/File/Empty trash" , M_UNLOCKED},
- {"/File/Work offline" , M_UNLOCKED},
+ {"/File/Add mailbox..." , M_UNLOCKED},
+ {"/File/Add mbox mailbox..." , M_UNLOCKED},
+ {"/File/Check for new messages in all folders", M_UNLOCKED},
+ {"/File/Folder" , M_UNLOCKED},
+ {"/File/Import mbox file..." , M_UNLOCKED},
+ {"/File/Export to mbox file..." , M_UNLOCKED},
+ {"/File/Empty trash" , M_UNLOCKED},
+ {"/File/Work offline" , M_UNLOCKED},
+
{"/File/Save as...", M_SINGLE_TARGET_EXIST|M_UNLOCKED},
{"/File/Print..." , M_TARGET_EXIST|M_UNLOCKED},
- /* {"/File/Close", M_UNLOCKED}, */
- {"/File/Exit" , M_UNLOCKED},
+ /* {"/File/Close" , M_UNLOCKED}, */
+ {"/File/Exit" , M_UNLOCKED},
{"/Edit/Select thread" , M_SINGLE_TARGET_EXIST},
{"/View/Sort" , M_EXEC},
SET_CHECK_MENU_ACTIVE("/View/Show or hide/Message view",
messageview_is_visible(mainwin->messageview));
- item = mainwin->summaryview->folder_item;
+ summaryview = mainwin->summaryview;
menu_path = "/View/Sort/Don't sort";
- if (item) {
- switch (item->sort_key) {
- case SORT_BY_NUMBER:
- menu_path = "/View/Sort/by number"; break;
- case SORT_BY_SIZE:
- menu_path = "/View/Sort/by size"; break;
- case SORT_BY_DATE:
- menu_path = "/View/Sort/by date"; break;
- case SORT_BY_FROM:
- menu_path = "/View/Sort/by from"; break;
- case SORT_BY_SUBJECT:
- menu_path = "/View/Sort/by subject"; break;
- case SORT_BY_LABEL:
- menu_path = "/View/Sort/by color label"; break;
- case SORT_BY_MARK:
- menu_path = "/View/Sort/by mark"; break;
- case SORT_BY_UNREAD:
- menu_path = "/View/Sort/by unread"; break;
- case SORT_BY_MIME:
- menu_path = "/View/Sort/by attachment"; break;
- case SORT_BY_SCORE:
- menu_path = "/View/Sort/by score"; break;
- case SORT_BY_LOCKED:
- menu_path = "/View/Sort/by locked"; break;
- case SORT_BY_NONE:
- default:
- menu_path = "/View/Sort/Don't sort"; break;
- }
+
+ switch (summaryview->sort_key) {
+ case SORT_BY_NUMBER:
+ menu_path = "/View/Sort/by number"; break;
+ case SORT_BY_SIZE:
+ menu_path = "/View/Sort/by size"; break;
+ case SORT_BY_DATE:
+ menu_path = "/View/Sort/by date"; break;
+ case SORT_BY_FROM:
+ menu_path = "/View/Sort/by from"; break;
+ case SORT_BY_SUBJECT:
+ menu_path = "/View/Sort/by subject"; break;
+ case SORT_BY_LABEL:
+ menu_path = "/View/Sort/by color label"; break;
+ case SORT_BY_MARK:
+ menu_path = "/View/Sort/by mark"; break;
+ case SORT_BY_UNREAD:
+ menu_path = "/View/Sort/by unread"; break;
+ case SORT_BY_MIME:
+ menu_path = "/View/Sort/by attachment"; break;
+ case SORT_BY_SCORE:
+ menu_path = "/View/Sort/by score"; break;
+ case SORT_BY_LOCKED:
+ menu_path = "/View/Sort/by locked"; break;
+ case SORT_BY_NONE:
+ default:
+ menu_path = "/View/Sort/Don't sort"; break;
}
SET_CHECK_MENU_ACTIVE(menu_path, TRUE);
- if (!item || item->sort_type == SORT_ASCENDING) {
+ if (summaryview->sort_type == SORT_ASCENDING) {
SET_CHECK_MENU_ACTIVE("/View/Sort/Ascending", TRUE);
} else {
SET_CHECK_MENU_ACTIVE("/View/Sort/Descending", TRUE);
}
- if (item && item->sort_key != SORT_BY_NONE) {
+ if (summaryview->sort_key != SORT_BY_NONE) {
menu_set_sensitive(ifactory, "/View/Sort/Ascending", TRUE);
menu_set_sensitive(ifactory, "/View/Sort/Descending", TRUE);
} else {
GtkItemFactory *ifactory = mainwin->menu_factory;
GtkWidget *menuitem;
- debug_print(_("Setting widgets..."));
+ debug_print("Setting widgets...");
/* create separated window(s) if needed */
if (type & SEPARATE_FOLDER) {
mainwin->win.sep_folder.vpaned = vpaned;
gtk_widget_show_all(folderwin);
+
+ /* CLAWS: previous "gtk_widget_show_all" makes noticeview
+ * lose track of its visibility state */
+ if (!noticeview_is_visible(mainwin->messageview->noticeview))
+ gtk_widget_hide(GTK_WIDGET_PTR(mainwin->messageview->noticeview));
break;
case SEPARATE_MESSAGE:
hpaned = gtk_hpaned_new();
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem),
((type & SEPARATE_MESSAGE) != 0));
- debug_print(_("done.\n"));
+ debug_print("done.\n");
}
#if 0
summary_redisplay_msg(mainwin->summaryview);
- debug_print(_("forced charset: %s\n"), str ? str : "Auto-Detect");
+ debug_print("forced charset: %s\n", str ? str : "Auto-Detect");
}
static void hide_read_messages (MainWindow *mainwin, guint action,
if (GTK_CHECK_MENU_ITEM(widget)->active) {
summary_thread_build(mainwin->summaryview);
- mainwin->summaryview->folder_item->threaded = TRUE;
+/* mainwin->summaryview->folder_item->threaded = TRUE; */
} else {
summary_unthread(mainwin->summaryview);
- mainwin->summaryview->folder_item->threaded = FALSE;
+/* mainwin->summaryview->folder_item->threaded = FALSE; */
}
}