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.cpp174
1 files changed, 127 insertions, 47 deletions
diff --git a/src/Main/Forms/MainFrame.cpp b/src/Main/Forms/MainFrame.cpp
index 9abe2552..07b876ac 100644
--- a/src/Main/Forms/MainFrame.cpp
+++ b/src/Main/Forms/MainFrame.cpp
@@ -46,6 +46,9 @@ namespace VeraCrypt
DEFINE_EVENT_TYPE(wxEVT_COMMAND_SHOW_WARNING)
MainFrame::MainFrame (wxWindow* parent) : MainFrameBase (parent),
+#ifdef HAVE_INDICATORS
+ indicator (NULL),
+#endif
ListItemRightClickEventPending (false),
SelectedItemIndex (-1),
SelectedSlotNumber (0),
@@ -99,6 +102,9 @@ namespace VeraCrypt
Connect( wxID_ANY, wxEVT_COMMAND_PREF_UPDATED, wxCommandEventHandler( MainFrame::OnPreferencesUpdated ) );
Connect( wxID_ANY, wxEVT_COMMAND_OPEN_VOLUME_REQUEST, wxCommandEventHandler( MainFrame::OnOpenVolumeSystemRequest ) );
+#ifdef TC_MACOSX
+ Connect( wxID_ANY, wxEVT_MOVE, wxMoveEventHandler( MainFrame::OnMoveHandler ) );
+#endif
}
MainFrame::~MainFrame ()
@@ -119,6 +125,9 @@ namespace VeraCrypt
Disconnect( wxID_ANY, wxEVT_COMMAND_UPDATE_VOLUME_LIST, wxCommandEventHandler( MainFrame::OnUpdateVolumeList ) );
Disconnect( wxID_ANY, wxEVT_COMMAND_PREF_UPDATED, wxCommandEventHandler( MainFrame::OnPreferencesUpdated ) );
Disconnect( wxID_ANY, wxEVT_COMMAND_OPEN_VOLUME_REQUEST, wxCommandEventHandler( MainFrame::OnOpenVolumeSystemRequest ) );
+#ifdef TC_MACOSX
+ Disconnect( wxID_ANY, wxEVT_MOVE, wxMoveEventHandler( MainFrame::OnMoveHandler ) );
+#endif
Core->VolumeMountedEvent.Disconnect (this);
Core->VolumeDismountedEvent.Disconnect (this);
Gui->OpenVolumeSystemRequestEvent.Disconnect (this);
@@ -213,7 +222,7 @@ namespace VeraCrypt
L"cmd.exe", args.c_str(), nullptr, SW_SHOW);
#else
# ifdef TC_MACOSX
- Gui->ShowInfo (_("Disk Utility will be launched after you press 'OK'.\n\nPlease select your volume in the Disk Utility window and press 'Verify Disk' or 'Repair Disk' button on the 'First Aid' page."));
+ Gui->ShowInfo (LangString["LINUX_FIRST_AID"]);
# endif
Core->CheckFilesystem (selectedVolume, repair);
UpdateVolumeList();
@@ -276,15 +285,15 @@ namespace VeraCrypt
VolumeStaticBoxSizer->Detach (VolumeGridBagSizer);
VolumeStaticBoxSizer->Add (VolumeGridBagSizer, 1, wxEXPAND, 0);
- ExitButton->SetLabel (_("Close"));
- MountAllDevicesButton->SetLabel (_("Mount All Devices"));
+ ExitButton->SetLabel (LangString["IDCLOSE"]);
+ MountAllDevicesButton->SetLabel (LangString["LINUX_MOUNT_ALL_DEV"]);
#endif
#ifdef TC_WINDOWS
SlotListCtrl->InsertColumn (ColumnSlot, LangString["DRIVE"], wxLIST_FORMAT_LEFT, 1);
colPermilles.push_back (75);
#else
- SlotListCtrl->InsertColumn (ColumnSlot, _("Slot"), wxLIST_FORMAT_LEFT, 1);
+ SlotListCtrl->InsertColumn (ColumnSlot, LangString["TOKEN_SLOT_ID"], wxLIST_FORMAT_LEFT, 1);
colPermilles.push_back (82);
#endif
@@ -487,7 +496,7 @@ namespace VeraCrypt
catch (exception &e)
{
Gui->ShowError (e);
- Gui->ShowError (_("Error while loading configuration files located in ") + wstring (Application::GetConfigFilePath (L"")));
+ Gui->ShowError (LangString["LINUX_ERROR_LOADING_CONFIG"] + wstring (Application::GetConfigFilePath (L"")));
}
}
@@ -503,13 +512,13 @@ namespace VeraCrypt
wxMenu *CreatePopupMenu ()
{
- auto_ptr <wxMenu> popup (new wxMenu);
+ 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, _("Mount All Favorite Volumes"), this, wxCommandEventHandler (TaskBarIcon::OnMountAllFavoritesMenuItemSelected))->Enable (!Busy);
- Gui->AppendToMenu (*popup, _("Dismount All Mounted Volumes"), this, wxCommandEventHandler (TaskBarIcon::OnDismountAllMenuItemSelected))->Enable (!Busy);
+ 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);
// Favorite volumes
if (Gui->GetPreferences().BackgroundTaskMenuMountItemsEnabled && !Frame->FavoriteVolumesMenuMap.empty())
@@ -518,7 +527,8 @@ namespace VeraCrypt
typedef pair <int, FavoriteVolume> FavMapPair;
foreach (FavMapPair fp, Frame->FavoriteVolumesMenuMap)
{
- Gui->AppendToMenu (*popup, LangString["MOUNT"] + L" " + wstring (fp.second.Path) + (fp.second.MountPoint.IsEmpty() ? L"" : L" " + wstring (fp.second.MountPoint)),
+ //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);
}
}
@@ -563,10 +573,10 @@ namespace VeraCrypt
}
popup->AppendSeparator();
- Gui->AppendToMenu (*popup, _("Preferences..."), this, wxCommandEventHandler (TaskBarIcon::OnPreferencesMenuItemSelected))->Enable (!Busy);
+ Gui->AppendToMenu (*popup, LangString["IDM_PREFERENCES"], this, wxCommandEventHandler (TaskBarIcon::OnPreferencesMenuItemSelected))->Enable (!Busy);
#ifndef TC_MACOSX
popup->AppendSeparator();
- Gui->AppendToMenu (*popup, _("Exit"), this, wxCommandEventHandler (TaskBarIcon::OnExitMenuItemSelected))->Enable (!Busy && Frame->CanExit());
+ Gui->AppendToMenu (*popup, LangString["EXIT"], this, wxCommandEventHandler (TaskBarIcon::OnExitMenuItemSelected))->Enable (!Busy && Frame->CanExit());
#endif
return popup.release();
}
@@ -632,13 +642,9 @@ namespace VeraCrypt
try
{
MountOptions mountOptions (GetPreferences().DefaultMountOptions);
- if (CmdLine->ArgTrueCryptMode)
- {
- mountOptions.TrueCryptMode = CmdLine->ArgTrueCryptMode;
- }
if (CmdLine->ArgHash)
{
- mountOptions.Kdf = Pkcs5Kdf::GetAlgorithm (*CmdLine->ArgHash, mountOptions.TrueCryptMode);
+ mountOptions.Kdf = Pkcs5Kdf::GetAlgorithm (*CmdLine->ArgHash);
}
if (CmdLine->ArgPim > 0)
{
@@ -661,19 +667,15 @@ namespace VeraCrypt
try
{
MountOptions mountOptions (GetPreferences().DefaultMountOptions);
- if (CmdLine->ArgTrueCryptMode)
- {
- mountOptions.TrueCryptMode = CmdLine->ArgTrueCryptMode;
- }
if (CmdLine->ArgHash)
{
- mountOptions.Kdf = Pkcs5Kdf::GetAlgorithm (*CmdLine->ArgHash, mountOptions.TrueCryptMode);
+ mountOptions.Kdf = Pkcs5Kdf::GetAlgorithm (*CmdLine->ArgHash);
}
if (CmdLine->ArgPim > 0)
{
mountOptions.Pim = CmdLine->ArgPim;
}
-
+ mountOptions.EMVSupportEnabled = GetPreferences().EMVSupportEnabled;
Gui->MountAllFavoriteVolumes (mountOptions);
}
catch (exception &e)
@@ -686,7 +688,7 @@ namespace VeraCrypt
{
if (!IsFreeSlotSelected())
{
- Gui->ShowWarning (_("Please select a free drive slot from the list."));
+ Gui->ShowWarning (LangString["LINUX_SELECT_FREE_SLOT"]);
return;
}
@@ -696,18 +698,15 @@ namespace VeraCrypt
MountOptions mountOptions (GetPreferences().DefaultMountOptions);
mountOptions.SlotNumber = SelectedSlotNumber;
mountOptions.Path = GetSelectedVolumePath();
- if (CmdLine->ArgTrueCryptMode)
- {
- mountOptions.TrueCryptMode = CmdLine->ArgTrueCryptMode;
- }
if (CmdLine->ArgHash)
{
- mountOptions.Kdf = Pkcs5Kdf::GetAlgorithm (*CmdLine->ArgHash, mountOptions.TrueCryptMode);
+ mountOptions.Kdf = Pkcs5Kdf::GetAlgorithm (*CmdLine->ArgHash);
}
if (CmdLine->ArgPim > 0)
{
mountOptions.Pim = CmdLine->ArgPim;
}
+ mountOptions.EMVSupportEnabled = GetPreferences().EMVSupportEnabled;
try
{
@@ -725,6 +724,7 @@ namespace VeraCrypt
#ifdef TC_MACOSX
if (Gui->IsInBackgroundMode())
Gui->SetBackgroundMode (false);
+ EnsureVisible ();
#endif
AboutDialog dialog (this);
dialog.ShowModal();
@@ -737,6 +737,7 @@ namespace VeraCrypt
#ifdef TC_MACOSX
if (event.GetActive() && Gui->IsInBackgroundMode())
Gui->SetBackgroundMode (false);
+ EnsureVisible();
#endif
event.Skip();
}
@@ -952,13 +953,9 @@ namespace VeraCrypt
SetVolumePath (favorite.Path);
MountOptions mountOptions (GetPreferences().DefaultMountOptions);
- if (CmdLine->ArgTrueCryptMode)
- {
- mountOptions.TrueCryptMode = CmdLine->ArgTrueCryptMode;
- }
if (CmdLine->ArgHash)
{
- mountOptions.Kdf = Pkcs5Kdf::GetAlgorithm (*CmdLine->ArgHash, mountOptions.TrueCryptMode);
+ mountOptions.Kdf = Pkcs5Kdf::GetAlgorithm (*CmdLine->ArgHash);
}
if (CmdLine->ArgPim > 0)
{
@@ -1071,6 +1068,17 @@ namespace VeraCrypt
dialog.ShowModal();
}
+ void MainFrame::OnLanguageMenuItemSelected (wxCommandEvent& event)
+ {
+#ifdef TC_MACOSX
+ if (Gui->IsInBackgroundMode())
+ Gui->SetBackgroundMode (false);
+#endif
+ PreferencesDialog dialog (this);
+ dialog.SelectPage (dialog.LanguagesPage);
+ dialog.ShowModal();
+ }
+
void MainFrame::OnLegalNoticesMenuItemSelected (wxCommandEvent& event)
{
#ifdef TC_MACOSX
@@ -1136,10 +1144,10 @@ namespace VeraCrypt
{
Gui->AppendToMenu (popup, LangString["DISMOUNT"], this, wxCommandEventHandler (MainFrame::OnDismountVolumeMenuItemSelected));
Gui->AppendToMenu (popup, LangString["OPEN"], this, wxCommandEventHandler (MainFrame::OnOpenVolumeMenuItemSelected));
- Gui->AppendToMenu (popup, _("Deselect"), this, wxCommandEventHandler (MainFrame::OnClearSlotSelectionMenuItemSelected));
+ Gui->AppendToMenu (popup, LangString["LINUX_DESELECT"], this, wxCommandEventHandler (MainFrame::OnClearSlotSelectionMenuItemSelected));
popup.AppendSeparator();
- Gui->AppendToMenu (popup, _("Add to Favorites..."), this, wxCommandEventHandler (MainFrame::OnAddToFavoritesMenuItemSelected));
+ 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));
@@ -1152,7 +1160,7 @@ namespace VeraCrypt
}
else if (IsFreeSlotSelected())
{
- Gui->AppendToMenu (popup, _("Mount Volume"), this, wxCommandEventHandler (MainFrame::OnMountVolumeMenuItemSelected));
+ Gui->AppendToMenu (popup, LangString["IDM_MOUNT_VOLUME"], this, wxCommandEventHandler (MainFrame::OnMountVolumeMenuItemSelected));
popup.AppendSeparator();
@@ -1161,7 +1169,7 @@ namespace VeraCrypt
popup.AppendSeparator();
- Gui->AppendToMenu (popup, _("Deselect"), this, wxCommandEventHandler (MainFrame::OnClearSlotSelectionMenuItemSelected));
+ Gui->AppendToMenu (popup, LangString["LINUX_DESELECT"], this, wxCommandEventHandler (MainFrame::OnClearSlotSelectionMenuItemSelected));
PopupMenu (&popup);
}
@@ -1476,21 +1484,21 @@ namespace VeraCrypt
wxMenu popup;
- Gui->AppendToMenu (popup, _("Change Volume Password..."), this, wxCommandEventHandler (MainFrame::OnChangePasswordMenuItemSelected));
+ Gui->AppendToMenu (popup, LangString["IDM_CHANGE_PASSWORD"], this, wxCommandEventHandler (MainFrame::OnChangePasswordMenuItemSelected));
popup.AppendSeparator ();
- Gui->AppendToMenu (popup, _("Add/Remove Keyfiles to/from Volume..."), this, wxCommandEventHandler (MainFrame::OnChangeKeyfilesMenuItemSelected));
- Gui->AppendToMenu (popup, _("Remove All Keyfiles from Volume..."), this, wxCommandEventHandler (MainFrame::OnRemoveKeyfilesMenuItemSelected));
+ Gui->AppendToMenu (popup, LangString["IDM_ADD_REMOVE_VOL_KEYFILES"], this, wxCommandEventHandler (MainFrame::OnChangeKeyfilesMenuItemSelected));
+ Gui->AppendToMenu (popup, LangString["IDM_REMOVE_ALL_KEYFILES_FROM_VOL"], this, wxCommandEventHandler (MainFrame::OnRemoveKeyfilesMenuItemSelected));
popup.AppendSeparator ();
- Gui->AppendToMenu (popup, _("Change Header Key Derivation Algorithm..."), this, wxCommandEventHandler (MainFrame::OnChangePkcs5PrfMenuItemSelected));
+ Gui->AppendToMenu (popup, LangString["IDM_CHANGE_SYS_HEADER_KEY_DERIV_ALGO"], this, wxCommandEventHandler (MainFrame::OnChangePkcs5PrfMenuItemSelected));
popup.AppendSeparator ();
- Gui->AppendToMenu (popup, _("Backup Volume Header..."), this, wxCommandEventHandler (MainFrame::OnBackupVolumeHeadersMenuItemSelected));
- Gui->AppendToMenu (popup, _("Restore Volume Header..."), this, wxCommandEventHandler (MainFrame::OnRestoreVolumeHeaderMenuItemSelected));
+ Gui->AppendToMenu (popup, LangString["IDM_BACKUP_VOL_HEADER"], this, wxCommandEventHandler (MainFrame::OnBackupVolumeHeadersMenuItemSelected));
+ Gui->AppendToMenu (popup, LangString["IDM_RESTORE_VOL_HEADER"], this, wxCommandEventHandler (MainFrame::OnRestoreVolumeHeaderMenuItemSelected));
PopupMenu (&popup, VolumeToolsButton->GetPosition().x + 2, VolumeToolsButton->GetPosition().y + 2);
}
@@ -1550,6 +1558,32 @@ namespace VeraCrypt
}
}
+#ifdef HAVE_INDICATORS
+ void MainFrame::SetBusy (bool busy)
+ {
+ gtk_widget_set_sensitive(indicator_item_mountfavorites, !busy);
+ gtk_widget_set_sensitive(indicator_item_dismountall, !busy);
+ gtk_widget_set_sensitive(indicator_item_prefs, !busy);
+ gtk_widget_set_sensitive(indicator_item_exit, !busy /*&& CanExit()*/);
+ }
+
+ static void IndicatorOnShowHideMenuItemSelected (GtkWidget *widget, MainFrame *self) { Gui->SetBackgroundMode (!Gui->IsInBackgroundMode()); }
+ static void IndicatorOnMountAllFavoritesMenuItemSelected (GtkWidget *widget, MainFrame *self) { self->SetBusy(true); self->MountAllFavorites (); self->SetBusy(false); }
+ static void IndicatorOnDismountAllMenuItemSelected (GtkWidget *widget, MainFrame *self) { self->SetBusy(true); Gui->DismountAllVolumes(); self->SetBusy(false); }
+ static void IndicatorOnPreferencesMenuItemSelected (GtkWidget *widget, MainFrame *self) {
+ self->SetBusy(true);
+ PreferencesDialog dialog (self);
+ dialog.ShowModal();
+ self->SetBusy(false);
+ }
+ static void IndicatorOnExitMenuItemSelected (GtkWidget *widget, MainFrame *self) {
+ self->SetBusy(true);
+ if (Core->GetMountedVolumes().empty() || Gui->AskYesNo (LangString ["CONFIRM_EXIT"], false, true))
+ self->Close (true);
+ self->SetBusy(false);
+ }
+
+#endif
void MainFrame::ShowTaskBarIcon (bool show)
{
if (!show && mTaskBarIcon->IsIconInstalled())
@@ -1559,8 +1593,47 @@ namespace VeraCrypt
else if (show && !mTaskBarIcon->IsIconInstalled())
{
#ifndef TC_MACOSX
+#ifndef HAVE_INDICATORS
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"]);
+ 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
}
}
@@ -1580,7 +1653,7 @@ namespace VeraCrypt
{
bool mounted = IsMountedSlotSelected();
- VolumeButton->SetLabel (mounted ? LangString["DISMOUNT"] : wxString (_("Mount")));
+ VolumeButton->SetLabel (mounted ? LangString["UNMOUNT_BUTTON"] : LangString["MOUNT_BUTTON"]);
VolumePropertiesButton->Enable (mounted);
DismountVolumeMenuItem->Enable (mounted);
@@ -1629,7 +1702,7 @@ namespace VeraCrypt
#endif
fields[ColumnPath] = volume->Path;
fields[ColumnSize] = Gui->SizeToString (volume->Size);
- fields[ColumnType] = Gui->VolumeTypeToString (volume->Type, volume->TrueCryptMode, volume->Protection);
+ fields[ColumnType] = Gui->VolumeTypeToString (volume->Type, volume->Protection);
if (volume->HiddenVolumeProtectionTriggered)
{
@@ -1639,7 +1712,7 @@ namespace VeraCrypt
bool slotUpdated = false;
if (itemIndex == -1)
{
- Gui->InsertToListCtrl (SlotListCtrl, ++prevItemIndex, fields, 0, (void *) volume->SlotNumber);
+ Gui->InsertToListCtrl (SlotListCtrl, ++prevItemIndex, fields, 0, (void *)(intptr_t) volume->SlotNumber);
OnListItemInserted (prevItemIndex);
listChanged |= true;
@@ -1674,7 +1747,7 @@ namespace VeraCrypt
{
if (itemIndex == -1)
{
- Gui->InsertToListCtrl (SlotListCtrl, ++prevItemIndex, fields, 0, (void *) slotNumber);
+ Gui->InsertToListCtrl (SlotListCtrl, ++prevItemIndex, fields, 0, (void *)(intptr_t) slotNumber);
OnListItemInserted (prevItemIndex);
listChanged |= true;
}
@@ -1722,4 +1795,11 @@ namespace VeraCrypt
Core->WipePasswordCache();
UpdateWipeCacheButton();
}
+
+#ifdef TC_MACOSX
+ void MainFrame::OnMoveHandler(wxMoveEvent& event)
+ {
+ EnsureVisible (true);
+ }
+#endif
}