VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Forms/MainFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main/Forms/MainFrame.cpp')
-rw-r--r--src/Main/Forms/MainFrame.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Main/Forms/MainFrame.cpp b/src/Main/Forms/MainFrame.cpp
index b31f765f..59329e09 100644
--- a/src/Main/Forms/MainFrame.cpp
+++ b/src/Main/Forms/MainFrame.cpp
@@ -508,81 +508,81 @@ namespace VeraCrypt
}
void MainFrame::InitTaskBarIcon ()
{
class TaskBarIcon : public wxTaskBarIcon
{
public:
TaskBarIcon (MainFrame *frame) : Busy (false), Frame (frame)
{
Connect (wxEVT_TASKBAR_LEFT_DOWN, wxTaskBarIconEventHandler (TaskBarIcon::OnLeftButtonDown));
}
wxMenu *CreatePopupMenu ()
{
unique_ptr <wxMenu> popup (new wxMenu);
Gui->AppendToMenu (*popup, LangString[Gui->IsInBackgroundMode() ? "SHOW_TC" : "HIDE_TC"], this, wxCommandEventHandler (TaskBarIcon::OnShowHideMenuItemSelected));
popup->AppendSeparator();
Gui->AppendToMenu (*popup, LangString["IDM_MOUNT_FAVORITE_VOLUMES"], this, wxCommandEventHandler (TaskBarIcon::OnMountAllFavoritesMenuItemSelected))->Enable (!Busy);
- Gui->AppendToMenu (*popup, LangString["HK_DISMOUNT_ALL"], this, wxCommandEventHandler (TaskBarIcon::OnDismountAllMenuItemSelected))->Enable (!Busy);
+ Gui->AppendToMenu (*popup, LangString["HK_UNMOUNT_ALL"], this, wxCommandEventHandler (TaskBarIcon::OnDismountAllMenuItemSelected))->Enable (!Busy);
// Favorite volumes
if (Gui->GetPreferences().BackgroundTaskMenuMountItemsEnabled && !Frame->FavoriteVolumesMenuMap.empty())
{
popup->AppendSeparator();
typedef pair <int, FavoriteVolume> FavMapPair;
foreach (FavMapPair fp, Frame->FavoriteVolumesMenuMap)
{
//TBH Gui->AppendToMenu (*popup, LangString["MOUNT"] + L" " + wstring (fp.second.Path) + (fp.second.MountPoint.IsEmpty() ? L"" : L" " + wstring (fp.second.MountPoint)),
Gui->AppendToMenu (*popup, LangString["MOUNT_BUTTON"] + L" " + wstring (fp.second.Path) + (fp.second.MountPoint.IsEmpty() ? L"" : L" " + wstring (fp.second.MountPoint)),
this, wxCommandEventHandler (TaskBarIcon::OnFavoriteVolumeMenuItemSelected), fp.first)->Enable (!Busy);
}
}
// Mounted volumes
VolumeInfoList mountedVolumes = Core->GetMountedVolumes();
if (!mountedVolumes.empty())
{
if (Gui->GetPreferences().BackgroundTaskMenuOpenItemsEnabled)
{
popup->AppendSeparator();
OpenMap.clear();
foreach (shared_ptr <VolumeInfo> volume, mountedVolumes)
{
if (!volume->MountPoint.IsEmpty())
{
wxString label = LangString["OPEN"] + L" " + wstring (volume->MountPoint) + L" (" + wstring (volume->Path) + L")";
wxMenuItem *item = Gui->AppendToMenu (*popup, label, this, wxCommandEventHandler (TaskBarIcon::OnOpenMenuItemSelected));
OpenMap[item->GetId()] = volume;
}
}
}
if (Gui->GetPreferences().BackgroundTaskMenuDismountItemsEnabled)
{
popup->AppendSeparator();
DismountMap.clear();
foreach (shared_ptr <VolumeInfo> volume, mountedVolumes)
{
- wxString label = LangString["DISMOUNT"] + L" ";
+ wxString label = LangString["UNMOUNT"] + L" ";
if (!volume->MountPoint.IsEmpty())
label += wstring (volume->MountPoint) + L" (" + wstring (volume->Path) + L")";
else
label += wstring (volume->Path);
wxMenuItem *item = Gui->AppendToMenu (*popup, label, this, wxCommandEventHandler (TaskBarIcon::OnDismountMenuItemSelected));
item->Enable (!Busy);
DismountMap[item->GetId()] = volume;
}
}
}
popup->AppendSeparator();
Gui->AppendToMenu (*popup, LangString["IDM_PREFERENCES"], this, wxCommandEventHandler (TaskBarIcon::OnPreferencesMenuItemSelected))->Enable (!Busy);
#ifndef TC_MACOSX
popup->AppendSeparator();
Gui->AppendToMenu (*popup, LangString["EXIT"], this, wxCommandEventHandler (TaskBarIcon::OnExitMenuItemSelected))->Enable (!Busy && Frame->CanExit());
#endif
return popup.release();
@@ -991,57 +991,57 @@ namespace VeraCrypt
{
SecurityToken::CloseAllSessions();
Gui->ShowInfo ("ALL_TOKEN_SESSIONS_CLOSED");
}
catch (exception &e) { Gui->ShowError (e); }
break;
case Hotkey::Id::DismountAll:
case Hotkey::Id::DismountAllWipeCache:
{
if (event.GetId() == Hotkey::Id::DismountAllWipeCache)
WipeCache();
size_t mountedCount = Core->GetMountedVolumes().size();
Gui->DismountAllVolumes();
size_t newMountedCount = Core->GetMountedVolumes().size();
if (newMountedCount < mountedCount)
{
if (newMountedCount == 0 && GetPreferences().DisplayMessageAfterHotkeyDismount)
- Gui->ShowInfo ("MOUNTED_VOLUMES_DISMOUNTED");
+ Gui->ShowInfo ("MOUNTED_VOLUMES_UNMOUNTED");
else if (GetPreferences().BeepAfterHotkeyMountDismount)
MessageBeep((UINT) -1);
}
}
break;
case Hotkey::Id::ForceDismountAllWipeCache:
case Hotkey::Id::ForceDismountAllWipeCacheExit:
{
bool mounted = !Core->GetMountedVolumes().empty();
WipeCache();
Gui->DismountAllVolumes (true, true);
if (mounted && GetPreferences().DisplayMessageAfterHotkeyDismount)
- Gui->ShowInfo ("VOLUMES_DISMOUNTED_CACHE_WIPED");
+ Gui->ShowInfo ("VOLUMES_UNMOUNTED_CACHE_WIPED");
else if (mounted && GetPreferences().BeepAfterHotkeyMountDismount)
MessageBeep((UINT) -1);
if (event.GetId() == Hotkey::Id::ForceDismountAllWipeCacheExit)
Close (true);
}
break;
case Hotkey::Id::MountAllDevices:
case Hotkey::Id::MountAllFavorites:
{
size_t mountedCount = Core->GetMountedVolumes().size();
if (event.GetId() == Hotkey::Id::MountAllDevices)
MountAllDevices();
else
MountAllFavorites();
if (Core->GetMountedVolumes().size() > mountedCount && GetPreferences().BeepAfterHotkeyMountDismount)
MessageBeep((UINT) -1);
@@ -1132,41 +1132,41 @@ namespace VeraCrypt
#ifdef TC_MACOSX
if (SelectedItemIndex != event.GetIndex())
{
SelectedItemIndex = event.GetIndex();
OnListItemSelectionChanged();
}
if (!ListItemRightClickEventPending)
{
ListItemRightClickEventPending = true;
SlotListCtrl->GetEventHandler()->AddPendingEvent (event);
return;
}
ListItemRightClickEventPending = false;
#endif
wxMenu popup;
if (IsMountedSlotSelected())
{
- Gui->AppendToMenu (popup, LangString["DISMOUNT"], this, wxCommandEventHandler (MainFrame::OnDismountVolumeMenuItemSelected));
+ Gui->AppendToMenu (popup, LangString["UNMOUNT"], this, wxCommandEventHandler (MainFrame::OnDismountVolumeMenuItemSelected));
Gui->AppendToMenu (popup, LangString["OPEN"], this, wxCommandEventHandler (MainFrame::OnOpenVolumeMenuItemSelected));
Gui->AppendToMenu (popup, LangString["LINUX_DESELECT"], this, wxCommandEventHandler (MainFrame::OnClearSlotSelectionMenuItemSelected));
popup.AppendSeparator();
Gui->AppendToMenu (popup, LangString["IDPM_ADD_TO_FAVORITES"], this, wxCommandEventHandler (MainFrame::OnAddToFavoritesMenuItemSelected));
popup.AppendSeparator();
Gui->AppendToMenu (popup, LangString["IDPM_CHECK_FILESYS"], this, wxCommandEventHandler (MainFrame::OnCheckFilesystemMenuItemSelected));
Gui->AppendToMenu (popup, LangString["IDPM_REPAIR_FILESYS"], this, wxCommandEventHandler (MainFrame::OnRepairFilesystemMenuItemSelected));
popup.AppendSeparator();
Gui->AppendToMenu (popup, LangString["IDPM_PROPERTIES"], this, wxCommandEventHandler (MainFrame::OnVolumePropertiesButtonClick));
PopupMenu (&popup);
}
else if (IsFreeSlotSelected())
{
Gui->AppendToMenu (popup, LangString["IDM_MOUNT_VOLUME"], this, wxCommandEventHandler (MainFrame::OnMountVolumeMenuItemSelected));
popup.AppendSeparator();
@@ -1604,41 +1604,41 @@ namespace VeraCrypt
mTaskBarIcon->SetIcon (Resources::GetVeraCryptIcon(), L"VeraCrypt");
#endif
#endif
#ifdef HAVE_INDICATORS
if (indicator == NULL) {
indicator = app_indicator_new ("veracrypt", "veracrypt", APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
app_indicator_set_status (indicator, APP_INDICATOR_STATUS_ACTIVE);
GtkWidget *menu = gtk_menu_new();
indicator_item_showhide = gtk_menu_item_new_with_label (LangString[Gui->IsInBackgroundMode() ? "SHOW_TC" : "HIDE_TC"].mb_str());
gtk_menu_shell_append (GTK_MENU_SHELL (menu), indicator_item_showhide);
g_signal_connect (indicator_item_showhide, "activate", G_CALLBACK (IndicatorOnShowHideMenuItemSelected), this);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new());
indicator_item_mountfavorites = gtk_menu_item_new_with_label (LangString["IDM_MOUNT_FAVORITE_VOLUMES"]);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), indicator_item_mountfavorites);
g_signal_connect (indicator_item_mountfavorites, "activate", G_CALLBACK (IndicatorOnMountAllFavoritesMenuItemSelected), this);
- indicator_item_dismountall = gtk_menu_item_new_with_label (LangString["HK_DISMOUNT_ALL"]);
+ indicator_item_dismountall = gtk_menu_item_new_with_label (LangString["HK_UNMOUNT_ALL"]);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), indicator_item_dismountall);
g_signal_connect (indicator_item_dismountall, "activate", G_CALLBACK (IndicatorOnDismountAllMenuItemSelected), this);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new());
indicator_item_prefs = gtk_menu_item_new_with_label (LangString["IDM_PREFERENCES"]);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), indicator_item_prefs);
g_signal_connect (indicator_item_prefs, "activate", G_CALLBACK (IndicatorOnPreferencesMenuItemSelected), this);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new());
indicator_item_exit = gtk_menu_item_new_with_label (LangString["EXIT"]);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), indicator_item_exit);
g_signal_connect (indicator_item_exit, "activate", G_CALLBACK (IndicatorOnExitMenuItemSelected), this);
gtk_widget_show_all (menu);
app_indicator_set_menu (indicator, GTK_MENU (menu));
}
#endif
}