From 56b99ad52ec3fe966ab9816a3f2cfea9bf3658ba Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Sat, 25 Oct 2014 19:31:49 -0700 Subject: [PATCH 01/21] 7.1a-2 (applied patches/truecrypt-7.1a-indicator.patch at 05fbed6574be3507dcd2ea55b8fb36e0c79bbc30 in https://github.com/stefansundin/truecrypt.deb.git) --- src/Build/Include/Makefile.inc | 2 +- src/Main/Forms/MainFrame.cpp | 55 ++++++++++++++++++++++++++++++- src/Main/Forms/MainFrame.h | 10 +++++- src/Main/GraphicUserInterface.cpp | 8 +++-- src/Main/Main.make | 2 +- src/Main/TextUserInterface.cpp | 6 ++-- src/Makefile | 7 ++-- 7 files changed, 78 insertions(+), 12 deletions(-) diff --git a/src/Build/Include/Makefile.inc b/src/Build/Include/Makefile.inc index 39395e95..3bd6efb0 100644 --- a/src/Build/Include/Makefile.inc +++ b/src/Build/Include/Makefile.inc @@ -10,7 +10,7 @@ $(NAME): $(NAME).a clean: @echo Cleaning $(NAME) - rm -f $(APPNAME) $(NAME).a $(OBJS) $(OBJS:.o=.d) *.gch + rm -f $(APPNAME) $(NAME).a $(OBJS) $(OBJS:.o=.d) *.gch $(RESOURCES) SystemPrecompiled.d %.o: %.c @echo Compiling $(SetBackgroundMode (!Gui->IsInBackgroundMode()); } + static void IndicatorOnMountAllFavoritesMenuItemSelected (GtkWidget *widget, MainFrame *self) { /*Busy = true;*/ self->MountAllFavorites (); /*Busy = false;*/ } + static void IndicatorOnDismountAllMenuItemSelected (GtkWidget *widget, MainFrame *self) { /*Busy = true;*/ Gui->DismountAllVolumes(); /*Busy = false;*/ } + static void IndicatorOnPreferencesMenuItemSelected (GtkWidget *widget, MainFrame *self) { + /*Busy = true;*/ + PreferencesDialog dialog (self); + dialog.ShowModal(); + /*Busy = false;*/ + } + static void IndicatorOnExitMenuItemSelected (GtkWidget *widget, MainFrame *self) { + /*Busy = true;*/ + if (Core->GetMountedVolumes().empty() || Gui->AskYesNo (LangString ["CONFIRM_EXIT"], false, true)) + self->Close (true); + /*Busy = false;*/ + } + void MainFrame::ShowTaskBarIcon (bool show) { if (!show && mTaskBarIcon->IsIconInstalled()) @@ -1420,8 +1437,44 @@ namespace TrueCrypt else if (show && !mTaskBarIcon->IsIconInstalled()) { #ifndef TC_MACOSX - mTaskBarIcon->SetIcon (Resources::GetTrueCryptIcon(), L"TrueCrypt"); + //mTaskBarIcon->SetIcon (Resources::GetTrueCryptIcon(), L"TrueCrypt"); #endif + if (indicator == NULL) { + indicator = app_indicator_new ("truecrypt", "truecrypt-indicator", APP_INDICATOR_CATEGORY_APPLICATION_STATUS); + app_indicator_set_status (indicator, APP_INDICATOR_STATUS_ACTIVE); + + GtkWidget *menu = gtk_menu_new(); + GtkWidget *item; + + 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()); + + item = gtk_menu_item_new_with_label ("Mount All Favorite Volumes"); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); + g_signal_connect (item, "activate", G_CALLBACK (IndicatorOnMountAllFavoritesMenuItemSelected), this); + + item = gtk_menu_item_new_with_label ("Dismount All Mounted Volumes"); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); + g_signal_connect (item, "activate", G_CALLBACK (IndicatorOnDismountAllMenuItemSelected), this); + + gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new()); + + item = gtk_menu_item_new_with_label ("Preferences..."); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); + g_signal_connect (item, "activate", G_CALLBACK (IndicatorOnPreferencesMenuItemSelected), this); + + gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new()); + + item = gtk_menu_item_new_with_label ("Exit"); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); + g_signal_connect (item, "activate", G_CALLBACK (IndicatorOnExitMenuItemSelected), this); + + gtk_widget_show_all (menu); + app_indicator_set_menu (indicator, GTK_MENU (menu)); + } } } diff --git a/src/Main/Forms/MainFrame.h b/src/Main/Forms/MainFrame.h index 5b775abc..d3c7149f 100644 --- a/src/Main/Forms/MainFrame.h +++ b/src/Main/Forms/MainFrame.h @@ -9,6 +9,10 @@ #ifndef TC_HEADER_Main_Forms_MainFrame #define TC_HEADER_Main_Forms_MainFrame +#define GSocket GlibGSocket +#include +#undef GSocket + #include "Forms.h" #include "ChangePasswordDialog.h" @@ -27,6 +31,11 @@ namespace TrueCrypt static FilePath GetShowRequestFifoPath () { return Application::GetConfigFilePath (L".show-request-queue", true); } #endif + void MountAllFavorites (); + + AppIndicator *indicator; + GtkWidget *indicator_item_showhide; + protected: enum { @@ -60,7 +69,6 @@ namespace TrueCrypt void LoadFavoriteVolumes (); void LoadPreferences (); void MountAllDevices (); - void MountAllFavorites (); void MountVolume (); void OnAboutMenuItemSelected (wxCommandEvent& event); void OnActivate (wxActivateEvent& event); diff --git a/src/Main/GraphicUserInterface.cpp b/src/Main/GraphicUserInterface.cpp index 04426bd4..b1a07e22 100644 --- a/src/Main/GraphicUserInterface.cpp +++ b/src/Main/GraphicUserInterface.cpp @@ -1250,19 +1250,19 @@ namespace TrueCrypt File backupFile; backupFile.Open (*files.front(), File::OpenRead); - uint64 headerSize; + //uint64 headerSize; bool legacyBackup; // Determine the format of the backup file switch (backupFile.Length()) { case TC_VOLUME_HEADER_GROUP_SIZE: - headerSize = TC_VOLUME_HEADER_SIZE; + //headerSize = TC_VOLUME_HEADER_SIZE; legacyBackup = false; break; case TC_VOLUME_HEADER_SIZE_LEGACY * 2: - headerSize = TC_VOLUME_HEADER_SIZE_LEGACY; + //headerSize = TC_VOLUME_HEADER_SIZE_LEGACY; legacyBackup = true; break; @@ -1472,6 +1472,8 @@ namespace TrueCrypt } BackgroundMode = state; + + gtk_menu_item_set_label ((GtkMenuItem*) ((MainFrame*) mMainFrame)->indicator_item_showhide, LangString[Gui->IsInBackgroundMode() ? "SHOW_TC" : "HIDE_TC"].mb_str()); } void GraphicUserInterface::SetListCtrlColumnWidths (wxListCtrl *listCtrl, list columnWidthPermilles, bool hasVerticalScrollbar) const diff --git a/src/Main/Main.make b/src/Main/Main.make index 565ed400..4e0c564e 100644 --- a/src/Main/Main.make +++ b/src/Main/Main.make @@ -105,7 +105,7 @@ TC_VERSION = $(shell grep VERSION_STRING ../Common/Tcdefs.h | head -n 1 | cut -d $(APPNAME): $(LIBS) $(OBJS) @echo Linking $@ - $(CXX) -o $(APPNAME) $(LFLAGS) $(OBJS) $(LIBS) $(FUSE_LIBS) $(WX_LIBS) + $(CXX) -o $(APPNAME) $(LFLAGS) $(OBJS) $(LIBS) $(FUSE_LIBS) $(WX_LIBS) -ldl $(shell pkg-config --libs appindicator-0.1) ifeq "$(TC_BUILD_CONFIG)" "Release" ifndef NOSTRIP diff --git a/src/Main/TextUserInterface.cpp b/src/Main/TextUserInterface.cpp index d9e93e6f..46c9306c 100644 --- a/src/Main/TextUserInterface.cpp +++ b/src/Main/TextUserInterface.cpp @@ -1371,19 +1371,19 @@ namespace TrueCrypt File backupFile; backupFile.Open (filePath, File::OpenRead); - uint64 headerSize; + //uint64 headerSize; bool legacyBackup; // Determine the format of the backup file switch (backupFile.Length()) { case TC_VOLUME_HEADER_GROUP_SIZE: - headerSize = TC_VOLUME_HEADER_SIZE; + //headerSize = TC_VOLUME_HEADER_SIZE; legacyBackup = false; break; case TC_VOLUME_HEADER_SIZE_LEGACY * 2: - headerSize = TC_VOLUME_HEADER_SIZE_LEGACY; + //headerSize = TC_VOLUME_HEADER_SIZE_LEGACY; legacyBackup = true; break; diff --git a/src/Makefile b/src/Makefile index 265bb6f2..8227bede 100644 --- a/src/Makefile +++ b/src/Makefile @@ -35,8 +35,8 @@ export CXX ?= g++ export AS := nasm export RANLIB ?= ranlib -export CFLAGS := -Wall -export CXXFLAGS := -Wall -Wno-unused-parameter +export CFLAGS := -Wall -Wno-sequence-point +export CXXFLAGS := -Wall -Wno-unused-parameter -Wno-narrowing C_CXX_FLAGS := -MMD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -I$(BASE_DIR) -I$(BASE_DIR)/Crypto export ASFLAGS := -Ox -D __GNUC__ export LFLAGS := @@ -50,6 +50,9 @@ export WXCONFIG_CFLAGS := export WXCONFIG_CXXFLAGS := WX_ROOT ?= .. +#export PKCS11_INC := $(BASE_DIR)/PKCS11 + +C_CXX_FLAGS += $(shell pkg-config --cflags appindicator-0.1) export TC_BUILD_CONFIG := Release From aacb3311cc93b7821b500d01025311ee265391cd Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Sat, 25 Oct 2014 19:32:48 -0700 Subject: [PATCH 02/21] 7.1a-3 (applied patches/truecrypt-7.1a-indicator.patch at 1f094f6102c9f6af12f6ec482611dc183da32710 in https://github.com/stefansundin/truecrypt.deb.git) --- src/Main/Forms/MainFrame.cpp | 45 +++++++++++++++++++++--------------- src/Main/Forms/MainFrame.h | 5 ++++ src/Makefile | 2 +- 3 files changed, 32 insertions(+), 20 deletions(-) diff --git a/src/Main/Forms/MainFrame.cpp b/src/Main/Forms/MainFrame.cpp index caa9c272..d39a49d9 100644 --- a/src/Main/Forms/MainFrame.cpp +++ b/src/Main/Forms/MainFrame.cpp @@ -1412,20 +1412,28 @@ namespace TrueCrypt } } + 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) { /*Busy = true;*/ self->MountAllFavorites (); /*Busy = false;*/ } - static void IndicatorOnDismountAllMenuItemSelected (GtkWidget *widget, MainFrame *self) { /*Busy = true;*/ Gui->DismountAllVolumes(); /*Busy = false;*/ } + 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) { - /*Busy = true;*/ + self->SetBusy(true); PreferencesDialog dialog (self); dialog.ShowModal(); - /*Busy = false;*/ + self->SetBusy(false); } static void IndicatorOnExitMenuItemSelected (GtkWidget *widget, MainFrame *self) { - /*Busy = true;*/ + self->SetBusy(true); if (Core->GetMountedVolumes().empty() || Gui->AskYesNo (LangString ["CONFIRM_EXIT"], false, true)) self->Close (true); - /*Busy = false;*/ + self->SetBusy(false); } void MainFrame::ShowTaskBarIcon (bool show) @@ -1444,7 +1452,6 @@ namespace TrueCrypt app_indicator_set_status (indicator, APP_INDICATOR_STATUS_ACTIVE); GtkWidget *menu = gtk_menu_new(); - GtkWidget *item; 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); @@ -1452,25 +1459,25 @@ namespace TrueCrypt gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new()); - item = gtk_menu_item_new_with_label ("Mount All Favorite Volumes"); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); - g_signal_connect (item, "activate", G_CALLBACK (IndicatorOnMountAllFavoritesMenuItemSelected), this); + indicator_item_mountfavorites = gtk_menu_item_new_with_label ("Mount All Favorite Volumes"); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), indicator_item_mountfavorites); + g_signal_connect (indicator_item_mountfavorites, "activate", G_CALLBACK (IndicatorOnMountAllFavoritesMenuItemSelected), this); - item = gtk_menu_item_new_with_label ("Dismount All Mounted Volumes"); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); - g_signal_connect (item, "activate", G_CALLBACK (IndicatorOnDismountAllMenuItemSelected), this); + indicator_item_dismountall = gtk_menu_item_new_with_label ("Dismount All Mounted Volumes"); + 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()); - item = gtk_menu_item_new_with_label ("Preferences..."); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); - g_signal_connect (item, "activate", G_CALLBACK (IndicatorOnPreferencesMenuItemSelected), this); + indicator_item_prefs = gtk_menu_item_new_with_label ("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()); - item = gtk_menu_item_new_with_label ("Exit"); - gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); - g_signal_connect (item, "activate", G_CALLBACK (IndicatorOnExitMenuItemSelected), this); + indicator_item_exit = gtk_menu_item_new_with_label ("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)); diff --git a/src/Main/Forms/MainFrame.h b/src/Main/Forms/MainFrame.h index d3c7149f..76439c57 100644 --- a/src/Main/Forms/MainFrame.h +++ b/src/Main/Forms/MainFrame.h @@ -35,6 +35,11 @@ namespace TrueCrypt AppIndicator *indicator; GtkWidget *indicator_item_showhide; + GtkWidget *indicator_item_mountfavorites; + GtkWidget *indicator_item_dismountall; + GtkWidget *indicator_item_prefs; + GtkWidget *indicator_item_exit; + void SetBusy (bool busy); protected: enum diff --git a/src/Makefile b/src/Makefile index 8227bede..b36003c3 100644 --- a/src/Makefile +++ b/src/Makefile @@ -50,7 +50,7 @@ export WXCONFIG_CFLAGS := export WXCONFIG_CXXFLAGS := WX_ROOT ?= .. -#export PKCS11_INC := $(BASE_DIR)/PKCS11 +#export PKCS11_INC := $(BASE_DIR)/pkcs11 C_CXX_FLAGS += $(shell pkg-config --cflags appindicator-0.1) From a01a66d569793cfaba42724fee9c32b93591688a Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Sun, 12 Apr 2015 17:19:14 -0700 Subject: [PATCH 03/21] Remove unused old tray checkboxes in preferences. Add button to configure autostart in preferences. Combine patches. (applied patches/truecrypt-7.1a-indicator.patch at 8beed59ecfad5c2e5326a75c875d050732989d35 in https://github.com/stefansundin/truecrypt.deb.git) --- src/Main/Forms/Forms.cpp | 23 +++-------- src/Main/Forms/Forms.h | 5 +-- src/Main/Forms/MainFrame.cpp | 58 +--------------------------- src/Main/Forms/PreferencesDialog.cpp | 21 ++++++++-- src/Main/Forms/PreferencesDialog.h | 1 + src/Main/GraphicUserInterface.cpp | 3 -- src/Main/TextUserInterface.cpp | 3 -- src/Main/UserPreferences.cpp | 6 --- src/Main/UserPreferences.h | 8 +--- src/Makefile | 2 +- 10 files changed, 29 insertions(+), 101 deletions(-) diff --git a/src/Main/Forms/Forms.cpp b/src/Main/Forms/Forms.cpp index 5825381c..491df08d 100644 --- a/src/Main/Forms/Forms.cpp +++ b/src/Main/Forms/Forms.cpp @@ -1582,7 +1582,7 @@ NewSecurityTokenKeyfileDialogBase::~NewSecurityTokenKeyfileDialogBase() KeyfileNameTextCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( NewSecurityTokenKeyfileDialogBase::OnKeyfileNameChanged ), NULL, this ); } -PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style & (~wxCLOSE_BOX) ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); this->SetExtraStyle( wxWS_EX_VALIDATE_RECURSIVELY ); @@ -1738,23 +1738,6 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c sbSizer18->Add( CloseBackgroundTaskOnNoVolumesCheckBox, 0, wxALL, 5 ); - wxStaticBoxSizer* sbSizer26; - sbSizer26 = new wxStaticBoxSizer( new wxStaticBox( BackgroundTaskPanel, wxID_ANY, _("Task Icon Menu Items") ), wxVERTICAL ); - - BackgroundTaskMenuMountItemsEnabledCheckBox = new wxCheckBox( BackgroundTaskPanel, wxID_ANY, _("Mount Favorite Volumes"), wxDefaultPosition, wxDefaultSize, 0 ); - - sbSizer26->Add( BackgroundTaskMenuMountItemsEnabledCheckBox, 0, wxALL, 5 ); - - BackgroundTaskMenuOpenItemsEnabledCheckBox = new wxCheckBox( BackgroundTaskPanel, wxID_ANY, _("Open Mounted Volumes"), wxDefaultPosition, wxDefaultSize, 0 ); - - sbSizer26->Add( BackgroundTaskMenuOpenItemsEnabledCheckBox, 0, wxALL, 5 ); - - BackgroundTaskMenuDismountItemsEnabledCheckBox = new wxCheckBox( BackgroundTaskPanel, wxID_ANY, _("Dismount Mounted Volumes"), wxDefaultPosition, wxDefaultSize, 0 ); - - sbSizer26->Add( BackgroundTaskMenuDismountItemsEnabledCheckBox, 0, wxALL, 5 ); - - sbSizer18->Add( sbSizer26, 1, wxEXPAND|wxALL, 5 ); - bSizer62->Add( sbSizer18, 0, wxEXPAND|wxALL, 5 ); bSizer61->Add( bSizer62, 1, wxEXPAND|wxALL, 5 ); @@ -1772,6 +1755,9 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c LogOnSizer = new wxStaticBoxSizer( new wxStaticBox( SystemIntegrationPage, wxID_ANY, _("Actions to Perform when User Logs On") ), wxVERTICAL ); + ConfigureAutostartButton = new wxButton( SystemIntegrationPage, wxID_ANY, _("Configure &Autostart..."), wxDefaultPosition, wxDefaultSize, 0 ); + LogOnSizer->Add( ConfigureAutostartButton, 0, wxALL, 5 ); + StartOnLogonCheckBox = new wxCheckBox( SystemIntegrationPage, wxID_ANY, _("Start TrueCrypt Background Task"), wxDefaultPosition, wxDefaultSize, 0 ); LogOnSizer->Add( StartOnLogonCheckBox, 0, wxALL, 5 ); @@ -2023,6 +2009,7 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c ForceAutoDismountCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnForceAutoDismountCheckBoxClick ), NULL, this ); PreserveTimestampsCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnPreserveTimestampsCheckBoxClick ), NULL, this ); BackgroundTaskEnabledCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnBackgroundTaskEnabledCheckBoxClick ), NULL, this ); + ConfigureAutostartButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnConfigureAutostartButtonClick ), NULL, this ); NoKernelCryptoCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnNoKernelCryptoCheckBoxClick ), NULL, this ); NoHardwareCryptoCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnNoHardwareCryptoCheckBoxClick ), NULL, this ); SelectPkcs11ModuleButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnSelectPkcs11ModuleButtonClick ), NULL, this ); diff --git a/src/Main/Forms/Forms.h b/src/Main/Forms/Forms.h index cbc6f6e1..f90217dc 100644 --- a/src/Main/Forms/Forms.h +++ b/src/Main/Forms/Forms.h @@ -551,11 +551,9 @@ namespace TrueCrypt wxPanel* BackgroundTaskPanel; wxCheckBox* BackgroundTaskEnabledCheckBox; wxCheckBox* CloseBackgroundTaskOnNoVolumesCheckBox; - wxCheckBox* BackgroundTaskMenuMountItemsEnabledCheckBox; - wxCheckBox* BackgroundTaskMenuOpenItemsEnabledCheckBox; - wxCheckBox* BackgroundTaskMenuDismountItemsEnabledCheckBox; wxPanel* SystemIntegrationPage; wxStaticBoxSizer* LogOnSizer; + wxButton* ConfigureAutostartButton; wxCheckBox* StartOnLogonCheckBox; wxCheckBox* MountFavoritesOnLogonCheckBox; wxCheckBox* MountDevicesOnLogonCheckBox; @@ -595,6 +593,7 @@ namespace TrueCrypt virtual void OnForceAutoDismountCheckBoxClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnPreserveTimestampsCheckBoxClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnBackgroundTaskEnabledCheckBoxClick( wxCommandEvent& event ){ event.Skip(); } + virtual void OnConfigureAutostartButtonClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnNoKernelCryptoCheckBoxClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnNoHardwareCryptoCheckBoxClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnSelectPkcs11ModuleButtonClick( wxCommandEvent& event ){ event.Skip(); } diff --git a/src/Main/Forms/MainFrame.cpp b/src/Main/Forms/MainFrame.cpp index d39a49d9..273e35d9 100644 --- a/src/Main/Forms/MainFrame.cpp +++ b/src/Main/Forms/MainFrame.cpp @@ -492,57 +492,6 @@ namespace TrueCrypt 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); - // Favorite volumes - if (Gui->GetPreferences().BackgroundTaskMenuMountItemsEnabled && !Frame->FavoriteVolumesMenuMap.empty()) - { - popup->AppendSeparator(); - typedef pair 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)), - 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 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 volume, mountedVolumes) - { - wxString label = LangString["DISMOUNT"] + 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, _("Preferences..."), this, wxCommandEventHandler (TaskBarIcon::OnPreferencesMenuItemSelected))->Enable (!Busy); #ifndef TC_MACOSX @@ -1444,9 +1393,6 @@ namespace TrueCrypt } else if (show && !mTaskBarIcon->IsIconInstalled()) { -#ifndef TC_MACOSX - //mTaskBarIcon->SetIcon (Resources::GetTrueCryptIcon(), L"TrueCrypt"); -#endif if (indicator == NULL) { indicator = app_indicator_new ("truecrypt", "truecrypt-indicator", APP_INDICATOR_CATEGORY_APPLICATION_STATUS); app_indicator_set_status (indicator, APP_INDICATOR_STATUS_ACTIVE); @@ -1459,11 +1405,11 @@ namespace TrueCrypt gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new()); - indicator_item_mountfavorites = gtk_menu_item_new_with_label ("Mount All Favorite Volumes"); + indicator_item_mountfavorites = gtk_menu_item_new_with_label ("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 ("Dismount All Mounted Volumes"); + indicator_item_dismountall = gtk_menu_item_new_with_label ("Dismount All"); gtk_menu_shell_append (GTK_MENU_SHELL (menu), indicator_item_dismountall); g_signal_connect (indicator_item_dismountall, "activate", G_CALLBACK (IndicatorOnDismountAllMenuItemSelected), this); diff --git a/src/Main/Forms/PreferencesDialog.cpp b/src/Main/Forms/PreferencesDialog.cpp index b10a5cdd..af7490a0 100644 --- a/src/Main/Forms/PreferencesDialog.cpp +++ b/src/Main/Forms/PreferencesDialog.cpp @@ -11,6 +11,7 @@ #ifdef TC_WINDOWS #include #endif +#include "Platform/Unix/Process.h" #include "Common/SecurityToken.h" #include "Main/Main.h" #include "Main/Application.h" @@ -59,9 +60,6 @@ namespace TrueCrypt TC_CHECK_BOX_VALIDATOR (BackgroundTaskEnabled); TC_CHECK_BOX_VALIDATOR (CloseBackgroundTaskOnNoVolumes); CloseBackgroundTaskOnNoVolumesCheckBox->Show (!Core->IsInPortableMode()); - TC_CHECK_BOX_VALIDATOR (BackgroundTaskMenuDismountItemsEnabled); - TC_CHECK_BOX_VALIDATOR (BackgroundTaskMenuMountItemsEnabled); - TC_CHECK_BOX_VALIDATOR (BackgroundTaskMenuOpenItemsEnabled); // Encryption AesHwCpuSupportedStaticText->SetLabel ( @@ -103,7 +101,10 @@ namespace TrueCrypt #endif #ifndef TC_WINDOWS - LogOnSizer->Show (false); + // LogOnSizer->Show (false); + StartOnLogonCheckBox->Show (false); + MountFavoritesOnLogonCheckBox->Show (false); + MountDevicesOnLogonCheckBox->Show (false); MountRemovableCheckBox->Show (false); CloseExplorerWindowsOnDismountCheckBox->Show (false); #endif @@ -272,6 +273,18 @@ namespace TrueCrypt BackgroundTaskEnabledCheckBox->SetValue (!Gui->AskYesNo (LangString["CONFIRM_BACKGROUND_TASK_DISABLED"], false, true)); } + void PreferencesDialog::OnConfigureAutostartButtonClick (wxCommandEvent& event) + { + // Launch "Startup Applications" + try + { + list args; + Process::Execute ("gnome-session-properties", args); + } + // catch (TimeOut&) { } + catch (exception &e) { Gui->ShowError (e); } + } + void PreferencesDialog::OnNoHardwareCryptoCheckBoxClick (wxCommandEvent& event) { if (event.IsChecked()) diff --git a/src/Main/Forms/PreferencesDialog.h b/src/Main/Forms/PreferencesDialog.h index 412d7c44..fa67ac4b 100644 --- a/src/Main/Forms/PreferencesDialog.h +++ b/src/Main/Forms/PreferencesDialog.h @@ -26,6 +26,7 @@ namespace TrueCrypt protected: void OnAssignHotkeyButtonClick (wxCommandEvent& event); void OnBackgroundTaskEnabledCheckBoxClick (wxCommandEvent& event); + void OnConfigureAutostartButtonClick (wxCommandEvent& event); void OnCancelButtonClick (wxCommandEvent& event) { Close(); } void OnClose (wxCloseEvent& event); void OnDismountOnPowerSavingCheckBoxClick (wxCommandEvent& event); diff --git a/src/Main/GraphicUserInterface.cpp b/src/Main/GraphicUserInterface.cpp index b1a07e22..414e6230 100644 --- a/src/Main/GraphicUserInterface.cpp +++ b/src/Main/GraphicUserInterface.cpp @@ -1250,19 +1250,16 @@ namespace TrueCrypt File backupFile; backupFile.Open (*files.front(), File::OpenRead); - //uint64 headerSize; bool legacyBackup; // Determine the format of the backup file switch (backupFile.Length()) { case TC_VOLUME_HEADER_GROUP_SIZE: - //headerSize = TC_VOLUME_HEADER_SIZE; legacyBackup = false; break; case TC_VOLUME_HEADER_SIZE_LEGACY * 2: - //headerSize = TC_VOLUME_HEADER_SIZE_LEGACY; legacyBackup = true; break; diff --git a/src/Main/TextUserInterface.cpp b/src/Main/TextUserInterface.cpp index 46c9306c..852109b4 100644 --- a/src/Main/TextUserInterface.cpp +++ b/src/Main/TextUserInterface.cpp @@ -1371,19 +1371,16 @@ namespace TrueCrypt File backupFile; backupFile.Open (filePath, File::OpenRead); - //uint64 headerSize; bool legacyBackup; // Determine the format of the backup file switch (backupFile.Length()) { case TC_VOLUME_HEADER_GROUP_SIZE: - //headerSize = TC_VOLUME_HEADER_SIZE; legacyBackup = false; break; case TC_VOLUME_HEADER_SIZE_LEGACY * 2: - //headerSize = TC_VOLUME_HEADER_SIZE_LEGACY; legacyBackup = true; break; diff --git a/src/Main/UserPreferences.cpp b/src/Main/UserPreferences.cpp index e0e82336..ec7abaa3 100644 --- a/src/Main/UserPreferences.cpp +++ b/src/Main/UserPreferences.cpp @@ -67,9 +67,6 @@ namespace TrueCrypt #define TC_CONFIG_SET(NAME) SetValue (configMap[L###NAME], NAME) TC_CONFIG_SET (BackgroundTaskEnabled); - TC_CONFIG_SET (BackgroundTaskMenuDismountItemsEnabled); - TC_CONFIG_SET (BackgroundTaskMenuMountItemsEnabled); - TC_CONFIG_SET (BackgroundTaskMenuOpenItemsEnabled); TC_CONFIG_SET (BeepAfterHotkeyMountDismount); SetValue (configMap[L"CachePasswords"], DefaultMountOptions.CachePassword); TC_CONFIG_SET (CloseBackgroundTaskOnNoVolumes); @@ -167,9 +164,6 @@ namespace TrueCrypt #define TC_CONFIG_ADD(NAME) formatter.AddEntry (L###NAME, NAME) TC_CONFIG_ADD (BackgroundTaskEnabled); - TC_CONFIG_ADD (BackgroundTaskMenuDismountItemsEnabled); - TC_CONFIG_ADD (BackgroundTaskMenuMountItemsEnabled); - TC_CONFIG_ADD (BackgroundTaskMenuOpenItemsEnabled); TC_CONFIG_ADD (BeepAfterHotkeyMountDismount); formatter.AddEntry (L"CachePasswords", DefaultMountOptions.CachePassword); TC_CONFIG_ADD (CloseBackgroundTaskOnNoVolumes); diff --git a/src/Main/UserPreferences.h b/src/Main/UserPreferences.h index 0f862ce6..36f1fb4c 100644 --- a/src/Main/UserPreferences.h +++ b/src/Main/UserPreferences.h @@ -20,11 +20,8 @@ namespace TrueCrypt UserPreferences () : BackgroundTaskEnabled (true), - BackgroundTaskMenuDismountItemsEnabled (true), - BackgroundTaskMenuMountItemsEnabled (true), - BackgroundTaskMenuOpenItemsEnabled (true), BeepAfterHotkeyMountDismount (false), - CloseBackgroundTaskOnNoVolumes (true), + CloseBackgroundTaskOnNoVolumes (false), CloseExplorerWindowsOnDismount (true), CloseSecurityTokenSessionsAfterMount (false), DisableKernelEncryptionModeWarning (false), @@ -60,9 +57,6 @@ namespace TrueCrypt MountOptions DefaultMountOptions; bool BackgroundTaskEnabled; - bool BackgroundTaskMenuDismountItemsEnabled; - bool BackgroundTaskMenuMountItemsEnabled; - bool BackgroundTaskMenuOpenItemsEnabled; bool BeepAfterHotkeyMountDismount; bool CloseBackgroundTaskOnNoVolumes; bool CloseExplorerWindowsOnDismount; diff --git a/src/Makefile b/src/Makefile index b36003c3..6605e222 100644 --- a/src/Makefile +++ b/src/Makefile @@ -50,7 +50,7 @@ export WXCONFIG_CFLAGS := export WXCONFIG_CXXFLAGS := WX_ROOT ?= .. -#export PKCS11_INC := $(BASE_DIR)/pkcs11 +# export PKCS11_INC := $(BASE_DIR)/pkcs11 C_CXX_FLAGS += $(shell pkg-config --cflags appindicator-0.1) From 81fb7fc121d0058bbe49f8e0ec8ceda80d72b725 Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Tue, 15 Dec 2015 21:39:54 -0800 Subject: [PATCH 04/21] Split indicator patch into two patches. (applied patches/truecrypt-7.1a-indicator.patch at 0569ec52dbec589af1cb5e9609b4fa9a1afa7994 in https://github.com/stefansundin/truecrypt.deb.git) Conflicts: src/Main/Forms/Forms.h src/Main/Forms/MainFrame.h Additional rebasing corrections: modified: src/Build/Include/Makefile.inc modified: src/Main/Forms/Forms.cpp modified: src/Main/GraphicUserInterface.cpp modified: src/Main/Main.make modified: src/Main/TextUserInterface.cpp modified: src/Makefile --- src/Build/Include/Makefile.inc | 2 +- src/Main/Forms/Forms.cpp | 2 +- src/Main/Forms/Forms.h | 1 + src/Main/Forms/MainFrame.h | 2 +- src/Main/GraphicUserInterface.cpp | 3 +++ src/Main/Main.make | 4 +++- src/Main/TextUserInterface.cpp | 3 +++ src/Makefile | 9 ++++----- 8 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/Build/Include/Makefile.inc b/src/Build/Include/Makefile.inc index 3bd6efb0..39395e95 100644 --- a/src/Build/Include/Makefile.inc +++ b/src/Build/Include/Makefile.inc @@ -10,7 +10,7 @@ $(NAME): $(NAME).a clean: @echo Cleaning $(NAME) - rm -f $(APPNAME) $(NAME).a $(OBJS) $(OBJS:.o=.d) *.gch $(RESOURCES) SystemPrecompiled.d + rm -f $(APPNAME) $(NAME).a $(OBJS) $(OBJS:.o=.d) *.gch %.o: %.c @echo Compiling $(Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnForceAutoDismountCheckBoxClick ), NULL, this ); PreserveTimestampsCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnPreserveTimestampsCheckBoxClick ), NULL, this ); BackgroundTaskEnabledCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnBackgroundTaskEnabledCheckBoxClick ), NULL, this ); - ConfigureAutostartButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnConfigureAutostartButtonClick ), NULL, this ); NoKernelCryptoCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnNoKernelCryptoCheckBoxClick ), NULL, this ); + ConfigureAutostartButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnConfigureAutostartButtonClick ), NULL, this ); NoHardwareCryptoCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnNoHardwareCryptoCheckBoxClick ), NULL, this ); SelectPkcs11ModuleButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnSelectPkcs11ModuleButtonClick ), NULL, this ); HotkeyListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( PreferencesDialogBase::OnHotkeyListItemDeselected ), NULL, this ); diff --git a/src/Main/Forms/Forms.h b/src/Main/Forms/Forms.h index f90217dc..65393285 100644 --- a/src/Main/Forms/Forms.h +++ b/src/Main/Forms/Forms.h @@ -554,6 +554,7 @@ namespace TrueCrypt wxPanel* SystemIntegrationPage; wxStaticBoxSizer* LogOnSizer; wxButton* ConfigureAutostartButton; + wxCheckBox* BackgroundTaskMenuDismountItemsEnabledCheckBox; wxCheckBox* StartOnLogonCheckBox; wxCheckBox* MountFavoritesOnLogonCheckBox; wxCheckBox* MountDevicesOnLogonCheckBox; diff --git a/src/Main/Forms/MainFrame.h b/src/Main/Forms/MainFrame.h index 76439c57..cd43e4e1 100644 --- a/src/Main/Forms/MainFrame.h +++ b/src/Main/Forms/MainFrame.h @@ -12,7 +12,7 @@ #define GSocket GlibGSocket #include #undef GSocket - + #include "Forms.h" #include "ChangePasswordDialog.h" diff --git a/src/Main/GraphicUserInterface.cpp b/src/Main/GraphicUserInterface.cpp index 414e6230..031de637 100644 --- a/src/Main/GraphicUserInterface.cpp +++ b/src/Main/GraphicUserInterface.cpp @@ -1250,16 +1250,19 @@ namespace TrueCrypt File backupFile; backupFile.Open (*files.front(), File::OpenRead); + uint64 headerSize; bool legacyBackup; // Determine the format of the backup file switch (backupFile.Length()) { case TC_VOLUME_HEADER_GROUP_SIZE: + headerSize = TC_VOLUME_HEADER_SIZE; legacyBackup = false; break; case TC_VOLUME_HEADER_SIZE_LEGACY * 2: + headerSize = TC_VOLUME_HEADER_SIZE_LEGACY; legacyBackup = true; break; diff --git a/src/Main/Main.make b/src/Main/Main.make index 4e0c564e..57507429 100644 --- a/src/Main/Main.make +++ b/src/Main/Main.make @@ -59,6 +59,8 @@ ifndef DISABLE_PRECOMPILED_HEADERS PCH := SystemPrecompiled.h.gch endif +LIBS += $(shell pkg-config --libs appindicator-0.1) + RESOURCES := RESOURCES += ../License.txt.h RESOURCES += ../Common/Language.xml.h @@ -105,7 +107,7 @@ TC_VERSION = $(shell grep VERSION_STRING ../Common/Tcdefs.h | head -n 1 | cut -d $(APPNAME): $(LIBS) $(OBJS) @echo Linking $@ - $(CXX) -o $(APPNAME) $(LFLAGS) $(OBJS) $(LIBS) $(FUSE_LIBS) $(WX_LIBS) -ldl $(shell pkg-config --libs appindicator-0.1) + $(CXX) -o $(APPNAME) $(LFLAGS) $(OBJS) $(LIBS) $(FUSE_LIBS) $(WX_LIBS) ifeq "$(TC_BUILD_CONFIG)" "Release" ifndef NOSTRIP diff --git a/src/Main/TextUserInterface.cpp b/src/Main/TextUserInterface.cpp index 852109b4..d9e93e6f 100644 --- a/src/Main/TextUserInterface.cpp +++ b/src/Main/TextUserInterface.cpp @@ -1371,16 +1371,19 @@ namespace TrueCrypt File backupFile; backupFile.Open (filePath, File::OpenRead); + uint64 headerSize; bool legacyBackup; // Determine the format of the backup file switch (backupFile.Length()) { case TC_VOLUME_HEADER_GROUP_SIZE: + headerSize = TC_VOLUME_HEADER_SIZE; legacyBackup = false; break; case TC_VOLUME_HEADER_SIZE_LEGACY * 2: + headerSize = TC_VOLUME_HEADER_SIZE_LEGACY; legacyBackup = true; break; diff --git a/src/Makefile b/src/Makefile index 6605e222..2677bd4d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -35,12 +35,14 @@ export CXX ?= g++ export AS := nasm export RANLIB ?= ranlib -export CFLAGS := -Wall -Wno-sequence-point -export CXXFLAGS := -Wall -Wno-unused-parameter -Wno-narrowing +export CFLAGS := -Wall +export CXXFLAGS := -Wall -Wno-unused-parameter C_CXX_FLAGS := -MMD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -I$(BASE_DIR) -I$(BASE_DIR)/Crypto export ASFLAGS := -Ox -D __GNUC__ export LFLAGS := +C_CXX_FLAGS += $(shell pkg-config --cflags appindicator-0.1) + export PKG_CONFIG_PATH ?= /usr/local/lib/pkgconfig export WX_CONFIG ?= wx-config @@ -50,9 +52,6 @@ export WXCONFIG_CFLAGS := export WXCONFIG_CXXFLAGS := WX_ROOT ?= .. -# export PKCS11_INC := $(BASE_DIR)/pkcs11 - -C_CXX_FLAGS += $(shell pkg-config --cflags appindicator-0.1) export TC_BUILD_CONFIG := Release From 022bf414be3c940ba38217c07a2c603dbd06468b Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Sun, 25 Dec 2016 23:10:54 -0800 Subject: [PATCH 05/21] Update patches. (applied patches/truecrypt-7.1a-indicator.patch at 386879d7773d3a84fa15be49715196bf886796db in https://github.com/stefansundin/truecrypt.deb.git) --- src/Main/Main.make | 5 +++-- src/Makefile | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Main/Main.make b/src/Main/Main.make index 57507429..f2cb4c63 100644 --- a/src/Main/Main.make +++ b/src/Main/Main.make @@ -59,8 +59,6 @@ ifndef DISABLE_PRECOMPILED_HEADERS PCH := SystemPrecompiled.h.gch endif -LIBS += $(shell pkg-config --libs appindicator-0.1) - RESOURCES := RESOURCES += ../License.txt.h RESOURCES += ../Common/Language.xml.h @@ -74,6 +72,9 @@ endif CXXFLAGS += -I$(BASE_DIR)/Main +ifndef TC_NO_GUI +LIBS += $(shell pkg-config --libs appindicator-0.1) +endif #------ wxWidgets configuration ------ diff --git a/src/Makefile b/src/Makefile index 2677bd4d..dd4cb3a1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -41,8 +41,6 @@ C_CXX_FLAGS := -MMD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -I export ASFLAGS := -Ox -D __GNUC__ export LFLAGS := -C_CXX_FLAGS += $(shell pkg-config --cflags appindicator-0.1) - export PKG_CONFIG_PATH ?= /usr/local/lib/pkgconfig export WX_CONFIG ?= wx-config @@ -65,6 +63,8 @@ ifeq "$(origin NOGUI)" "command line" export TC_NO_GUI := 1 C_CXX_FLAGS += -DTC_NO_GUI WX_CONFIGURE_FLAGS += --disable-gui +else + C_CXX_FLAGS += $(shell pkg-config --cflags appindicator-0.1) endif ifdef PKCS11_INC From 7638fbc8f87868852b3ac999d36ecc725e95cb10 Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Tue, 27 Dec 2016 15:19:57 -0800 Subject: [PATCH 06/21] Add gui-fixes patch. (applied patches/truecrypt-7.1a-indicator.patch at 7f9d5e5c221dc824b59f840165004e0ff2287557 in https://github.com/stefansundin/truecrypt.deb.git) --- src/Main/Forms/Forms.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Main/Forms/Forms.cpp b/src/Main/Forms/Forms.cpp index 54291d2b..5b05125b 100644 --- a/src/Main/Forms/Forms.cpp +++ b/src/Main/Forms/Forms.cpp @@ -1582,7 +1582,7 @@ NewSecurityTokenKeyfileDialogBase::~NewSecurityTokenKeyfileDialogBase() KeyfileNameTextCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( NewSecurityTokenKeyfileDialogBase::OnKeyfileNameChanged ), NULL, this ); } -PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style & (~wxCLOSE_BOX) ) +PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); this->SetExtraStyle( wxWS_EX_VALIDATE_RECURSIVELY ); From 0dd9476b7b2b76d69f56a23540c820f070a33187 Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Mon, 13 Feb 2017 23:02:56 -0800 Subject: [PATCH 07/21] Update patches. (applied patches/truecrypt-7.1a-indicator.patch at 8b43b75a6beb27596c1d1bb693258df5ad916f3c in https://github.com/stefansundin/truecrypt.deb.git) From 81333f4984372d96661165b55c3b53f7c84de09a Mon Sep 17 00:00:00 2001 From: Kyle Marek Date: Tue, 29 May 2018 02:36:37 -0400 Subject: [PATCH 08/21] Signed From 07e8cfa7f2a672f84745dbf0771f3a579d4f757d Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Mon, 6 Apr 2015 16:57:26 -0400 Subject: [PATCH 09/21] Drop 003-file-manager.diff and 004-no-preference-x.diff, fixed upstream. Refresh remaining patches. (applied debian/patches/003-indicator-support.diff at d35595e562fd029ba1415ced843cae046e37e113 in https://anonscm.debian.org/git/debian-edu/pkg-team/veracrypt.git) Conflicts: src/Main/Forms/MainFrame.cpp src/Main/Main.make src/Makefile --- src/Build/Include/Makefile.inc | 2 +- src/Main/Main.make | 2 +- src/Makefile | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Build/Include/Makefile.inc b/src/Build/Include/Makefile.inc index 3bd6efb0..39395e95 100644 --- a/src/Build/Include/Makefile.inc +++ b/src/Build/Include/Makefile.inc @@ -10,7 +10,7 @@ $(NAME): $(NAME).a clean: @echo Cleaning $(NAME) - rm -f $(APPNAME) $(NAME).a $(OBJS) $(OBJS:.o=.d) *.gch $(RESOURCES) SystemPrecompiled.d + rm -f $(APPNAME) $(NAME).a $(OBJS) $(OBJS:.o=.d) *.gch %.o: %.c @echo Compiling $( Date: Thu, 6 Aug 2015 20:52:33 -0400 Subject: [PATCH 10/21] Refresh remaining patches. (applied debian/patches/003-indicator-support.diff at 3ce61ae89ebefe27f419ea53d072527aaffe8def in https://anonscm.debian.org/git/debian-edu/pkg-team/veracrypt.git) --- src/Main/GraphicUserInterface.cpp | 6 +++--- src/Main/TextUserInterface.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Main/GraphicUserInterface.cpp b/src/Main/GraphicUserInterface.cpp index b1a07e22..031de637 100644 --- a/src/Main/GraphicUserInterface.cpp +++ b/src/Main/GraphicUserInterface.cpp @@ -1250,19 +1250,19 @@ namespace TrueCrypt File backupFile; backupFile.Open (*files.front(), File::OpenRead); - //uint64 headerSize; + uint64 headerSize; bool legacyBackup; // Determine the format of the backup file switch (backupFile.Length()) { case TC_VOLUME_HEADER_GROUP_SIZE: - //headerSize = TC_VOLUME_HEADER_SIZE; + headerSize = TC_VOLUME_HEADER_SIZE; legacyBackup = false; break; case TC_VOLUME_HEADER_SIZE_LEGACY * 2: - //headerSize = TC_VOLUME_HEADER_SIZE_LEGACY; + headerSize = TC_VOLUME_HEADER_SIZE_LEGACY; legacyBackup = true; break; diff --git a/src/Main/TextUserInterface.cpp b/src/Main/TextUserInterface.cpp index 46c9306c..d9e93e6f 100644 --- a/src/Main/TextUserInterface.cpp +++ b/src/Main/TextUserInterface.cpp @@ -1371,19 +1371,19 @@ namespace TrueCrypt File backupFile; backupFile.Open (filePath, File::OpenRead); - //uint64 headerSize; + uint64 headerSize; bool legacyBackup; // Determine the format of the backup file switch (backupFile.Length()) { case TC_VOLUME_HEADER_GROUP_SIZE: - //headerSize = TC_VOLUME_HEADER_SIZE; + headerSize = TC_VOLUME_HEADER_SIZE; legacyBackup = false; break; case TC_VOLUME_HEADER_SIZE_LEGACY * 2: - //headerSize = TC_VOLUME_HEADER_SIZE_LEGACY; + headerSize = TC_VOLUME_HEADER_SIZE_LEGACY; legacyBackup = true; break; From d165d4a3664f0d4ff2626250511403b08ed532d3 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Mon, 22 Feb 2016 18:46:37 -0500 Subject: [PATCH 11/21] Update my email address. (applied debian/patches/003-indicator-support.diff at 062c7b2da11d5929807d9c0fd87bcc978c510690 in https://anonscm.debian.org/git/debian-edu/pkg-team/veracrypt.git) From cb1f751185fa1150a5b38d3041e6a937cb2e585a Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Mon, 22 Feb 2016 18:50:51 -0500 Subject: [PATCH 12/21] Refresh patches. (applied debian/patches/003-indicator-support.diff at c6f8bd1ef4eb5968b5c3ca6f2b896985a1e22b66 in https://anonscm.debian.org/git/debian-edu/pkg-team/veracrypt.git) From d6f32b3d089d630fe6953d69d1caba75c23f9f7f Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Tue, 23 Aug 2016 17:59:48 -0400 Subject: [PATCH 13/21] Drop upstream patch, refresh remaining patches. (applied debian/patches/003-indicator-support.diff at 7ba7f47917ecfadae27cc7b49fb48173ba5d1fe2 in https://anonscm.debian.org/git/debian-edu/pkg-team/veracrypt.git) From fdbaa209d2811988467e54e6fac28f69a56db282 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Mon, 17 Oct 2016 18:55:30 -0400 Subject: [PATCH 14/21] Refresh patches. (applied debian/patches/003-indicator-support.diff at 7cd5467c6b6196a3d3c0a4b9d2a7ee337647e88d in https://anonscm.debian.org/git/debian-edu/pkg-team/veracrypt.git) From 3fb6b4349a7f08c30c9f1f7885d40ff8f5a1996c Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Mon, 10 Jul 2017 20:31:31 -0400 Subject: [PATCH 15/21] Refresh patches. (applied debian/patches/003-indicator-support.diff at 02990f6671cd9f98bdae5d4733b38f501b24ad29 in https://anonscm.debian.org/git/debian-edu/pkg-team/veracrypt.git) From 05d623674ad3bf7dc9ba6b2e4b25445182e7ffef Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Mon, 10 Jul 2017 20:32:21 -0400 Subject: [PATCH 16/21] d/p/003-indicator-support.diff: Extend to compile with Ayatana indicators. (applied debian/patches/003-indicator-support.diff at c32510dcd73312147899f6f91ba5beb8ef4580b3 in https://anonscm.debian.org/git/debian-edu/pkg-team/veracrypt.git) Conflicts: src/Main/Forms/MainFrame.cpp src/Main/Main.make src/Makefile --- src/Main/Forms/MainFrame.cpp | 10 +++++++++- src/Main/Forms/MainFrame.h | 10 +++++++++- src/Main/GraphicUserInterface.cpp | 2 ++ src/Main/Main.make | 2 +- src/Makefile | 10 +++++++++- 5 files changed, 30 insertions(+), 4 deletions(-) diff --git a/src/Main/Forms/MainFrame.cpp b/src/Main/Forms/MainFrame.cpp index d39a49d9..b28557b6 100644 --- a/src/Main/Forms/MainFrame.cpp +++ b/src/Main/Forms/MainFrame.cpp @@ -37,7 +37,9 @@ namespace TrueCrypt { MainFrame::MainFrame (wxWindow* parent) : MainFrameBase (parent), +#ifdef HAVE_INDICATORS indicator (NULL), +#endif ListItemRightClickEventPending (false), SelectedItemIndex (-1), SelectedSlotNumber (0), @@ -1412,6 +1414,7 @@ namespace TrueCrypt } } +#ifdef HAVE_INDICATORS void MainFrame::SetBusy (bool busy) { gtk_widget_set_sensitive(indicator_item_mountfavorites, !busy); @@ -1436,6 +1439,7 @@ namespace TrueCrypt self->SetBusy(false); } +#endif void MainFrame::ShowTaskBarIcon (bool show) { if (!show && mTaskBarIcon->IsIconInstalled()) @@ -1445,8 +1449,11 @@ namespace TrueCrypt else if (show && !mTaskBarIcon->IsIconInstalled()) { #ifndef TC_MACOSX - //mTaskBarIcon->SetIcon (Resources::GetTrueCryptIcon(), L"TrueCrypt"); +#ifndef HAVE_INDICATORS + mTaskBarIcon->SetIcon (Resources::GetTrueCryptIcon(), L"TrueCrypt"); #endif +#endif +#ifdef HAVE_INDICATORS if (indicator == NULL) { indicator = app_indicator_new ("truecrypt", "truecrypt-indicator", APP_INDICATOR_CATEGORY_APPLICATION_STATUS); app_indicator_set_status (indicator, APP_INDICATOR_STATUS_ACTIVE); @@ -1482,6 +1489,7 @@ namespace TrueCrypt gtk_widget_show_all (menu); app_indicator_set_menu (indicator, GTK_MENU (menu)); } +#endif } } diff --git a/src/Main/Forms/MainFrame.h b/src/Main/Forms/MainFrame.h index 76439c57..73b3f296 100644 --- a/src/Main/Forms/MainFrame.h +++ b/src/Main/Forms/MainFrame.h @@ -9,10 +9,16 @@ #ifndef TC_HEADER_Main_Forms_MainFrame #define TC_HEADER_Main_Forms_MainFrame +#ifdef HAVE_INDICATORS #define GSocket GlibGSocket +#ifdef UBUNTU_INDICATOR #include +#elif AYATANA_INDICATOR +#include +#endif #undef GSocket - +#endif + #include "Forms.h" #include "ChangePasswordDialog.h" @@ -33,6 +39,7 @@ namespace TrueCrypt void MountAllFavorites (); +#ifdef HAVE_INDICATORS AppIndicator *indicator; GtkWidget *indicator_item_showhide; GtkWidget *indicator_item_mountfavorites; @@ -41,6 +48,7 @@ namespace TrueCrypt GtkWidget *indicator_item_exit; void SetBusy (bool busy); +#endif protected: enum { diff --git a/src/Main/GraphicUserInterface.cpp b/src/Main/GraphicUserInterface.cpp index 031de637..b643e188 100644 --- a/src/Main/GraphicUserInterface.cpp +++ b/src/Main/GraphicUserInterface.cpp @@ -1473,7 +1473,9 @@ namespace TrueCrypt BackgroundMode = state; +#ifdef HAVE_INDICATORS gtk_menu_item_set_label ((GtkMenuItem*) ((MainFrame*) mMainFrame)->indicator_item_showhide, LangString[Gui->IsInBackgroundMode() ? "SHOW_TC" : "HIDE_TC"].mb_str()); +#endif } void GraphicUserInterface::SetListCtrlColumnWidths (wxListCtrl *listCtrl, list columnWidthPermilles, bool hasVerticalScrollbar) const diff --git a/src/Main/Main.make b/src/Main/Main.make index 5b63051e..565ed400 100644 --- a/src/Main/Main.make +++ b/src/Main/Main.make @@ -105,7 +105,7 @@ TC_VERSION = $(shell grep VERSION_STRING ../Common/Tcdefs.h | head -n 1 | cut -d $(APPNAME): $(LIBS) $(OBJS) @echo Linking $@ - $(CXX) -o $(APPNAME) $(LFLAGS) $(OBJS) $(LIBS) $(FUSE_LIBS) $(WX_LIBS) $(shell pkg-config --libs appindicator-0.1) + $(CXX) -o $(APPNAME) $(LFLAGS) $(OBJS) $(LIBS) $(FUSE_LIBS) $(WX_LIBS) ifeq "$(TC_BUILD_CONFIG)" "Release" ifndef NOSTRIP diff --git a/src/Makefile b/src/Makefile index 5f5f824f..34b3984f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -50,7 +50,15 @@ export WXCONFIG_CFLAGS := export WXCONFIG_CXXFLAGS := WX_ROOT ?= .. -C_CXX_FLAGS += $(shell pkg-config --cflags appindicator-0.1) +ifeq ($(shell pkg-config --exists appindicator-0.1 && echo $$?),0) + export C_CXX_FLAGS += -DHAVE_INDICATORS -DUBUNTU_INDICATOR + export LIBS += $(shell pkg-config --libs appindicator-0.1) + C_CXX_FLAGS += $(shell pkg-config --cflags appindicator-0.1) +else ifeq ($(shell pkg-config --exists ayatana-appindicator-0.1 && echo $$?),0) + export C_CXX_FLAGS += -DHAVE_INDICATORS -DAYATANA_INDICATOR + export LIBS += $(shell pkg-config --libs ayatana-appindicator-0.1) + C_CXX_FLAGS += $(shell pkg-config --cflags ayatana-appindicator-0.1) +endif export TC_BUILD_CONFIG := Release From e4890c34821350f5d4f3b69460dea79a3c1c452a Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Tue, 13 Feb 2018 06:04:11 -0500 Subject: [PATCH 17/21] d/p/003-indicator-support.diff: Correct the indicator icon name. This caused issues in some notification panels, eg xfce4-statusnotifier-plugin, whereas others such as indicator-application gracefully fell back. (applied debian/patches/003-indicator-support.diff at c5c017eb4aea859694c765a3255222c6920b64f1 in https://anonscm.debian.org/git/debian-edu/pkg-team/veracrypt.git) Conflicts: src/Main/Forms/MainFrame.cpp --- src/Main/Forms/MainFrame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Main/Forms/MainFrame.cpp b/src/Main/Forms/MainFrame.cpp index b28557b6..a82ee3be 100644 --- a/src/Main/Forms/MainFrame.cpp +++ b/src/Main/Forms/MainFrame.cpp @@ -1455,7 +1455,7 @@ namespace TrueCrypt #endif #ifdef HAVE_INDICATORS if (indicator == NULL) { - indicator = app_indicator_new ("truecrypt", "truecrypt-indicator", APP_INDICATOR_CATEGORY_APPLICATION_STATUS); + indicator = app_indicator_new ("truecrypt", "truecrypt", APP_INDICATOR_CATEGORY_APPLICATION_STATUS); app_indicator_set_status (indicator, APP_INDICATOR_STATUS_ACTIVE); GtkWidget *menu = gtk_menu_new(); From f19c37c1caf910b7d7c2c9bcc2570ddcdbd64182 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Fri, 30 Mar 2018 22:32:45 -0400 Subject: [PATCH 18/21] Refresh remaining patches. (applied debian/patches/003-indicator-support.diff at e989fa8ec2a989143a6ba7ad50e3f862ee74c10c in https://anonscm.debian.org/git/debian-edu/pkg-team/veracrypt.git) From 7bde8eff1171017f6feda427d3e6847f3523f80f Mon Sep 17 00:00:00 2001 From: Kyle Marek Date: Tue, 29 May 2018 13:54:46 -0400 Subject: [PATCH 19/21] Signed From a3788ab8cb204834a937edbeaa5a9743c0c71ed0 Mon Sep 17 00:00:00 2001 From: Kyle Marek Date: Wed, 30 May 2018 23:02:39 -0400 Subject: [PATCH 20/21] Partial undo of a01a66d569793cfaba42724fee9c32b93591688a Undoing "Add button to configure autostart in preferences". This is to keep this branch topical to indicator support and address the GNOME-specificness of the autostart configurator independently. --- src/Main/Forms/Forms.cpp | 4 ---- src/Main/Forms/Forms.h | 3 --- src/Main/Forms/PreferencesDialog.cpp | 18 +----------------- src/Main/Forms/PreferencesDialog.h | 1 - src/Main/UserPreferences.h | 2 +- 5 files changed, 2 insertions(+), 26 deletions(-) diff --git a/src/Main/Forms/Forms.cpp b/src/Main/Forms/Forms.cpp index 5b05125b..158deefb 100644 --- a/src/Main/Forms/Forms.cpp +++ b/src/Main/Forms/Forms.cpp @@ -1755,9 +1755,6 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c LogOnSizer = new wxStaticBoxSizer( new wxStaticBox( SystemIntegrationPage, wxID_ANY, _("Actions to Perform when User Logs On") ), wxVERTICAL ); - ConfigureAutostartButton = new wxButton( SystemIntegrationPage, wxID_ANY, _("Configure &Autostart..."), wxDefaultPosition, wxDefaultSize, 0 ); - LogOnSizer->Add( ConfigureAutostartButton, 0, wxALL, 5 ); - StartOnLogonCheckBox = new wxCheckBox( SystemIntegrationPage, wxID_ANY, _("Start TrueCrypt Background Task"), wxDefaultPosition, wxDefaultSize, 0 ); LogOnSizer->Add( StartOnLogonCheckBox, 0, wxALL, 5 ); @@ -2010,7 +2007,6 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c PreserveTimestampsCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnPreserveTimestampsCheckBoxClick ), NULL, this ); BackgroundTaskEnabledCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnBackgroundTaskEnabledCheckBoxClick ), NULL, this ); NoKernelCryptoCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnNoKernelCryptoCheckBoxClick ), NULL, this ); - ConfigureAutostartButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnConfigureAutostartButtonClick ), NULL, this ); NoHardwareCryptoCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnNoHardwareCryptoCheckBoxClick ), NULL, this ); SelectPkcs11ModuleButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnSelectPkcs11ModuleButtonClick ), NULL, this ); HotkeyListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( PreferencesDialogBase::OnHotkeyListItemDeselected ), NULL, this ); diff --git a/src/Main/Forms/Forms.h b/src/Main/Forms/Forms.h index 65393285..b7120b81 100644 --- a/src/Main/Forms/Forms.h +++ b/src/Main/Forms/Forms.h @@ -553,8 +553,6 @@ namespace TrueCrypt wxCheckBox* CloseBackgroundTaskOnNoVolumesCheckBox; wxPanel* SystemIntegrationPage; wxStaticBoxSizer* LogOnSizer; - wxButton* ConfigureAutostartButton; - wxCheckBox* BackgroundTaskMenuDismountItemsEnabledCheckBox; wxCheckBox* StartOnLogonCheckBox; wxCheckBox* MountFavoritesOnLogonCheckBox; wxCheckBox* MountDevicesOnLogonCheckBox; @@ -594,7 +592,6 @@ namespace TrueCrypt virtual void OnForceAutoDismountCheckBoxClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnPreserveTimestampsCheckBoxClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnBackgroundTaskEnabledCheckBoxClick( wxCommandEvent& event ){ event.Skip(); } - virtual void OnConfigureAutostartButtonClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnNoKernelCryptoCheckBoxClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnNoHardwareCryptoCheckBoxClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnSelectPkcs11ModuleButtonClick( wxCommandEvent& event ){ event.Skip(); } diff --git a/src/Main/Forms/PreferencesDialog.cpp b/src/Main/Forms/PreferencesDialog.cpp index af7490a0..c38389f6 100644 --- a/src/Main/Forms/PreferencesDialog.cpp +++ b/src/Main/Forms/PreferencesDialog.cpp @@ -11,7 +11,6 @@ #ifdef TC_WINDOWS #include #endif -#include "Platform/Unix/Process.h" #include "Common/SecurityToken.h" #include "Main/Main.h" #include "Main/Application.h" @@ -101,10 +100,7 @@ namespace TrueCrypt #endif #ifndef TC_WINDOWS - // LogOnSizer->Show (false); - StartOnLogonCheckBox->Show (false); - MountFavoritesOnLogonCheckBox->Show (false); - MountDevicesOnLogonCheckBox->Show (false); + LogOnSizer->Show (false); MountRemovableCheckBox->Show (false); CloseExplorerWindowsOnDismountCheckBox->Show (false); #endif @@ -273,18 +269,6 @@ namespace TrueCrypt BackgroundTaskEnabledCheckBox->SetValue (!Gui->AskYesNo (LangString["CONFIRM_BACKGROUND_TASK_DISABLED"], false, true)); } - void PreferencesDialog::OnConfigureAutostartButtonClick (wxCommandEvent& event) - { - // Launch "Startup Applications" - try - { - list args; - Process::Execute ("gnome-session-properties", args); - } - // catch (TimeOut&) { } - catch (exception &e) { Gui->ShowError (e); } - } - void PreferencesDialog::OnNoHardwareCryptoCheckBoxClick (wxCommandEvent& event) { if (event.IsChecked()) diff --git a/src/Main/Forms/PreferencesDialog.h b/src/Main/Forms/PreferencesDialog.h index fa67ac4b..412d7c44 100644 --- a/src/Main/Forms/PreferencesDialog.h +++ b/src/Main/Forms/PreferencesDialog.h @@ -26,7 +26,6 @@ namespace TrueCrypt protected: void OnAssignHotkeyButtonClick (wxCommandEvent& event); void OnBackgroundTaskEnabledCheckBoxClick (wxCommandEvent& event); - void OnConfigureAutostartButtonClick (wxCommandEvent& event); void OnCancelButtonClick (wxCommandEvent& event) { Close(); } void OnClose (wxCloseEvent& event); void OnDismountOnPowerSavingCheckBoxClick (wxCommandEvent& event); diff --git a/src/Main/UserPreferences.h b/src/Main/UserPreferences.h index 36f1fb4c..10272985 100644 --- a/src/Main/UserPreferences.h +++ b/src/Main/UserPreferences.h @@ -21,7 +21,7 @@ namespace TrueCrypt : BackgroundTaskEnabled (true), BeepAfterHotkeyMountDismount (false), - CloseBackgroundTaskOnNoVolumes (false), + CloseBackgroundTaskOnNoVolumes (true), CloseExplorerWindowsOnDismount (true), CloseSecurityTokenSessionsAfterMount (false), DisableKernelEncryptionModeWarning (false), From d5758d2e05553fcf0e456b08111398d3ddc9187b Mon Sep 17 00:00:00 2001 From: Kyle Marek Date: Sat, 23 Jun 2018 19:34:37 -0400 Subject: [PATCH 21/21] Make choice of icon deliberate (with a default) `make INDICATOR=ayatana-appindicator`: (default) Use indicator compiled against new libayatana-appindicator. `make INDICATOR=appindicator`: Use indicator compiled against original Ubuntu libappindicator. `make INDICATOR=`: Use X system tray icon. --- src/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 34b3984f..37bc0029 100644 --- a/src/Makefile +++ b/src/Makefile @@ -50,11 +50,13 @@ export WXCONFIG_CFLAGS := export WXCONFIG_CXXFLAGS := WX_ROOT ?= .. -ifeq ($(shell pkg-config --exists appindicator-0.1 && echo $$?),0) +INDICATOR := ayatana-appindicator + +ifeq (${INDICATOR},appindicator) export C_CXX_FLAGS += -DHAVE_INDICATORS -DUBUNTU_INDICATOR export LIBS += $(shell pkg-config --libs appindicator-0.1) C_CXX_FLAGS += $(shell pkg-config --cflags appindicator-0.1) -else ifeq ($(shell pkg-config --exists ayatana-appindicator-0.1 && echo $$?),0) +else ifeq (${INDICATOR},ayatana-appindicator) export C_CXX_FLAGS += -DHAVE_INDICATORS -DAYATANA_INDICATOR export LIBS += $(shell pkg-config --libs ayatana-appindicator-0.1) C_CXX_FLAGS += $(shell pkg-config --cflags ayatana-appindicator-0.1)