VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Forms/MainFrame.h
diff options
context:
space:
mode:
authorUnit 193 <32967979+unit193@users.noreply.github.com>2021-08-15 18:54:21 -0400
committerGitHub <noreply@github.com>2021-08-16 00:54:21 +0200
commit849cd010e8b30060893f0fa39ed2d7742aba6d11 (patch)
tree937ba5cdf841ae770849a44a840f6627ff847c53 /src/Main/Forms/MainFrame.h
parentb1323cabae32a2b0a9a96d7f228c1257c6188058 (diff)
downloadVeraCrypt-849cd010e8b30060893f0fa39ed2d7742aba6d11.tar.gz
VeraCrypt-849cd010e8b30060893f0fa39ed2d7742aba6d11.zip
Add compile-time toggleable support for application indicators, off by default. (#815)
This tries to figure out, via wx-config, if you're using GTK2 or GTK3 and uses the associated Ayatana library.
Diffstat (limited to 'src/Main/Forms/MainFrame.h')
-rw-r--r--src/Main/Forms/MainFrame.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/Main/Forms/MainFrame.h b/src/Main/Forms/MainFrame.h
index 9089ce72..5372adbb 100644
--- a/src/Main/Forms/MainFrame.h
+++ b/src/Main/Forms/MainFrame.h
@@ -13,6 +13,12 @@
#ifndef TC_HEADER_Main_Forms_MainFrame
#define TC_HEADER_Main_Forms_MainFrame
+#ifdef HAVE_INDICATORS
+#define GSocket GlibGSocket
+#include <libayatana-appindicator/app-indicator.h>
+#undef GSocket
+#endif
+
#include "Forms.h"
#include "ChangePasswordDialog.h"
#ifdef TC_MACOSX
@@ -38,6 +44,18 @@ namespace VeraCrypt
static FilePath GetShowRequestFifoPath () { return Application::GetConfigFilePath (L".show-request-queue", true); }
#endif
+ void MountAllFavorites ();
+
+#ifdef HAVE_INDICATORS
+ 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);
+
+#endif
protected:
enum
{
@@ -71,7 +89,6 @@ namespace VeraCrypt
void LoadFavoriteVolumes ();
void LoadPreferences ();
void MountAllDevices ();
- void MountAllFavorites ();
void MountVolume ();
void OnAboutMenuItemSelected (wxCommandEvent& event);
void OnQuit(wxCommandEvent& event) { Close(true); }