#include "import.h"
#include "export.h"
#include "edittags.h"
+#include "password.h"
#include "prefs_common.h"
#include "prefs_actions.h"
#include "prefs_filtering.h"
static void forget_session_passwords_cb (GtkAction *action,
gpointer data );
-
+#ifndef PASSWORD_CRYPTO_OLD
+static void forget_master_passphrase_cb (GtkAction *action,
+ gpointer data );
+#endif
static gboolean mainwindow_focus_in_event (GtkWidget *widget,
GdkEventFocus *focus,
gpointer data);
{"Tools/NetworkLog", NULL, N_("Network _Log"), "<shift><control>L", NULL, G_CALLBACK(log_window_show_cb) },
/* {"Tools/---", NULL, "---", NULL, NULL, NULL }, */
{"Tools/ForgetSessionPasswords", NULL, N_("_Forget all session passwords"), NULL, NULL, G_CALLBACK(forget_session_passwords_cb) },
+#ifndef PASSWORD_CRYPTO_OLD
+ {"Tools/ForgetMasterPassphrase", NULL, N_("Forget _master passphrase"), NULL, NULL, G_CALLBACK(forget_master_passphrase_cb) },
+#endif
/* Configuration menu */
{"Configuration/ChangeAccount", NULL, N_("C_hange current account") },
static GtkToggleActionEntry mainwin_toggle_entries[] = {
{"File/OfflineMode", NULL, N_("Offline _mode"), "<control>W", NULL, G_CALLBACK(toggle_work_offline_cb) }, /*toggle*/
- {"View/ShowHide/MenuBar", NULL, N_("Men_ubar"), "F12", NULL, G_CALLBACK(toggle_menubar_cb) }, /* toggle */
+ {"View/ShowHide/MenuBar", NULL, N_("Men_ubar"), "<control>F12", NULL, G_CALLBACK(toggle_menubar_cb) }, /* toggle */
{"View/ShowHide/MessageView", NULL, N_("_Message view"), "V", NULL, G_CALLBACK(toggle_message_cb) }, /* toggle */
#ifndef GENERIC_UMPC
{"View/ShowHide/StatusBar", NULL, N_("Status _bar"), NULL, NULL, G_CALLBACK(toggle_statusbar_cb) }, /* toggle */
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "NetworkLog", "Tools/NetworkLog", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "Separator8", "Tools/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "ForgetSessionPasswords", "Tools/ForgetSessionPasswords", GTK_UI_MANAGER_MENUITEM)
+#ifndef PASSWORD_CRYPTO_OLD
+ MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "ForgetMasterPassphrase", "Tools/ForgetMasterPassphrase", GTK_UI_MANAGER_MENUITEM)
+#endif
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "Separator9", "Tools/---", GTK_UI_MANAGER_SEPARATOR)
/* Configuration menu */
gtk_widget_set_size_request(progressbar, 120, 1);
gtk_box_pack_start(GTK_BOX(hbox_stat), progressbar, FALSE, FALSE, 0);
- online_pixmap = stock_pixmap_widget(hbox_stat, STOCK_PIXMAP_ONLINE);
- offline_pixmap = stock_pixmap_widget(hbox_stat, STOCK_PIXMAP_OFFLINE);
+ online_pixmap = stock_pixmap_widget(STOCK_PIXMAP_ONLINE);
+ offline_pixmap = stock_pixmap_widget(STOCK_PIXMAP_OFFLINE);
online_switch = gtk_button_new ();
gtkut_widget_set_can_focus(online_switch, FALSE);
CLAWS_SET_TIP(online_switch,
addressbook_reflect_prefs_pixmap_theme();
#endif
#ifndef GENERIC_UMPC
- pixmap = stock_pixmap_widget(mainwin->hbox_stat, STOCK_PIXMAP_ONLINE);
+ pixmap = stock_pixmap_widget(STOCK_PIXMAP_ONLINE);
gtk_container_remove(GTK_CONTAINER(mainwin->online_switch),
mainwin->online_pixmap);
gtk_container_add (GTK_CONTAINER(mainwin->online_switch), pixmap);
gtk_widget_show(pixmap);
mainwin->online_pixmap = pixmap;
- pixmap = stock_pixmap_widget(mainwin->hbox_stat, STOCK_PIXMAP_OFFLINE);
+ pixmap = stock_pixmap_widget(STOCK_PIXMAP_OFFLINE);
gtk_container_remove(GTK_CONTAINER(mainwin->offline_switch),
mainwin->offline_pixmap);
gtk_container_add (GTK_CONTAINER(mainwin->offline_switch), pixmap);
if (mainwin->summaryview->folder_item &&
mainwin->summaryview->folder_item->stype == F_TRASH)
- gtk_widget_grab_focus(mainwin->folderview->ctree);
+ folderview_grab_focus(mainwin->folderview);
return TRUE;
}
break;
}
}
+
+#ifndef PASSWORD_CRYPTO_OLD
+ if (master_passphrase_is_entered()) {
+ UPDATE_STATE(M_MASTER_PASSPHRASE);
+ }
+#endif
#undef UPDATE_STATE
return state;
gint i;
gboolean mimepart_selected = FALSE;
-#define N_ENTRIES 84
+#define N_ENTRIES 85
static struct {
const gchar *entry;
SensitiveCondMask cond;
FILL_TABLE("Menu/Tools/Execute", M_DELAY_EXEC);
FILL_TABLE("Menu/Tools/Expunge", M_DELETED_EXISTS);
FILL_TABLE("Menu/Tools/ForgetSessionPasswords", M_SESSION_PASSWORDS);
+#ifndef PASSWORD_CRYPTO_OLD
+ FILL_TABLE("Menu/Tools/ForgetMasterPassphrase", M_MASTER_PASSPHRASE);
+#endif
FILL_TABLE("Menu/Tools/DeleteDuplicates/SelFolder", M_MSG_EXIST, M_ALLOW_DELETE);
FILL_TABLE("Menu/Configuration", M_UNLOCKED);
fgtn), fgtn, accs);
}
+#ifndef PASSWORD_CRYPTO_OLD
+static void forget_master_passphrase_cb(GtkAction *action, gpointer data)
+{
+ MainWindow *mainwin = (MainWindow *)data;
+
+ main_window_lock(mainwin);
+ master_passphrase_forget();
+ main_window_unlock(mainwin);
+}
+#endif
+
void mainwindow_learn (MainWindow *mainwin, gboolean is_spam)
{
summary_mark_as_spam(mainwin->summaryview, is_spam, NULL);
return;
}
- msg = strrchr(tmp, G_DIR_SEPARATOR);
+ msg = strrchr(tmp, '/');
if (msg) {
*msg++ = '\0';
if ((item = folder_find_item_from_identifier(tmp))) {
if (prefs_common.layout_mode == SMALL_LAYOUT) {
folderview_close_opened(mainwin->folderview);
mainwin_paned_show_first(GTK_PANED(mainwin->hpaned));
- gtk_widget_grab_focus(mainwin->folderview->ctree);
+ folderview_grab_focus(mainwin->folderview);
}
mainwin->in_folder = FALSE;
main_window_set_menu_sensitive(mainwin);