diff options
| author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-02-10 17:22:43 +0100 |
|---|---|---|
| committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-02-10 17:22:43 +0100 |
| commit | 6d0b84cb9963ea8fa761ee575fc8c8505de2f786 (patch) | |
| tree | 4fb3b830e70ba5243db4ad1fcfde6cfedc0301aa /debian/patches | |
| download | veracrypt-6d0b84cb9963ea8fa761ee575fc8c8505de2f786.tar.gz veracrypt-6d0b84cb9963ea8fa761ee575fc8c8505de2f786.tar.bz2 veracrypt-6d0b84cb9963ea8fa761ee575fc8c8505de2f786.zip | |
Import Debian packaging as found at https://launchpad.net/~unit193/+archive/ubuntu/encryption/+packages (2016-02-10).
Diffstat (limited to 'debian/patches')
| -rw-r--r-- | debian/patches/001-user-guide-location.diff | 22 | ||||
| -rw-r--r-- | debian/patches/002-build-flags.diff | 34 | ||||
| -rw-r--r-- | debian/patches/003-indicator-support.diff | 176 | ||||
| -rw-r--r-- | debian/patches/series | 3 |
4 files changed, 235 insertions, 0 deletions
diff --git a/debian/patches/001-user-guide-location.diff b/debian/patches/001-user-guide-location.diff new file mode 100644 index 0000000..f4d6905 --- /dev/null +++ b/debian/patches/001-user-guide-location.diff @@ -0,0 +1,22 @@ +From: Francis Russell <francis@unchartedbackwaters.co.uk> +Date: Mon, 14 Jan 2013 11:44 +Subject: Move manual + +The user manual is installed in /usr/share/doc/veracrypt as opposed to +/usr/share/veracrypt/doc. + +Forwarded: no + +Index: veracrypt/src/Main/GraphicUserInterface.cpp +=================================================================== +--- veracrypt.orig/src/Main/GraphicUserInterface.cpp ++++ veracrypt/src/Main/GraphicUserInterface.cpp +@@ -1217,7 +1217,7 @@ namespace VeraCrypt + #elif defined (TC_MACOSX) + docPath += L"/../Resources/VeraCrypt User Guide.pdf"; + #elif defined (TC_UNIX) +- docPath = L"/usr/share/veracrypt/doc/VeraCrypt User Guide.pdf"; ++ docPath = L"/usr/share/doc/veracrypt/user_guide.pdf"; + #else + # error TC_RESOURCE_DIR undefined + #endif diff --git a/debian/patches/002-build-flags.diff b/debian/patches/002-build-flags.diff new file mode 100644 index 0000000..25f3e69 --- /dev/null +++ b/debian/patches/002-build-flags.diff @@ -0,0 +1,34 @@ +From: Stefan Sundin <stefan@stefansundin.com> +Date: Fri, 12 Sept 2013 +Subject: Add build flags + +Forwarded: no + +Index: veracrypt/src/Makefile +=================================================================== +--- veracrypt.orig/src/Makefile ++++ veracrypt/src/Makefile +@@ -54,6 +54,10 @@ export WXCONFIG_CFLAGS := + export WXCONFIG_CXXFLAGS := + WX_ROOT ?= .. + ++CPPFLAGS+=$(shell dpkg-buildflags --get CPPFLAGS) ++CFLAGS+=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS) -Wno-sequence-point ++CXXFLAGS+=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS) -Wno-narrowing ++LFLAGS+=$(shell dpkg-buildflags --get LDFLAGS) + + export TC_BUILD_CONFIG := Release + +Index: veracrypt/src/Build/Include/Makefile.inc +=================================================================== +--- veracrypt.orig/src/Build/Include/Makefile.inc ++++ veracrypt/src/Build/Include/Makefile.inc +@@ -14,7 +14,7 @@ $(NAME): $(NAME).a + + clean: + @echo Cleaning $(NAME) +- rm -f $(APPNAME) $(NAME).a $(OBJS) $(OBJSEX) $(OBJS:.o=.d) *.gch ++ rm -f $(APPNAME) $(NAME).a $(OBJS) $(OBJS:.o=.d) *.gch $(RESOURCES) SystemPrecompiled.d + + %.o: %.c + @echo Compiling $(<F) diff --git a/debian/patches/003-indicator-support.diff b/debian/patches/003-indicator-support.diff new file mode 100644 index 0000000..4e83780 --- /dev/null +++ b/debian/patches/003-indicator-support.diff @@ -0,0 +1,176 @@ +From: Stefan Sundin <stefan@stefansundin.com> +Date: Fri, 12 Sept 2013 +Subject: Switch from systray to application indicator + +This patch replaces the system tray icon with an application indicator applet. + +Forwarded: no + +Signed-off-by: Unit 193 <unit193@ninthfloor.org> + +Index: veracrypt/src/Main/Main.make +=================================================================== +--- veracrypt.orig/src/Main/Main.make ++++ veracrypt/src/Main/Main.make +@@ -132,7 +132,7 @@ endif + + $(APPNAME): $(LIBS) $(OBJS) + @echo Linking $@ +- $(CXX) -o $(APPNAME) $(OBJS) $(LIBS) $(FUSE_LIBS) $(WX_LIBS) $(LFLAGS) ++ $(CXX) -o $(APPNAME) $(OBJS) $(LIBS) $(FUSE_LIBS) $(WX_LIBS) $(LFLAGS) $(shell pkg-config --libs appindicator-0.1) + + ifeq "$(TC_BUILD_CONFIG)" "Release" + ifndef NOSTRIP +Index: veracrypt/src/Main/Forms/MainFrame.cpp +=================================================================== +--- veracrypt.orig/src/Main/Forms/MainFrame.cpp ++++ veracrypt/src/Main/Forms/MainFrame.cpp +@@ -46,6 +46,7 @@ namespace VeraCrypt + DEFINE_EVENT_TYPE(wxEVT_COMMAND_SHOW_WARNING) + + MainFrame::MainFrame (wxWindow* parent) : MainFrameBase (parent), ++ indicator (NULL), + ListItemRightClickEventPending (false), + SelectedItemIndex (-1), + SelectedSlotNumber (0), +@@ -1552,6 +1553,30 @@ namespace VeraCrypt + } + } + ++ 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); ++ } ++ + void MainFrame::ShowTaskBarIcon (bool show) + { + if (!show && mTaskBarIcon->IsIconInstalled()) +@@ -1561,8 +1586,43 @@ namespace VeraCrypt + else if (show && !mTaskBarIcon->IsIconInstalled()) + { + #ifndef TC_MACOSX +- mTaskBarIcon->SetIcon (Resources::GetVeraCryptIcon(), L"VeraCrypt"); ++ //mTaskBarIcon->SetIcon (Resources::GetVeraCryptIcon(), L"VeraCrypt"); + #endif ++ if (indicator == NULL) { ++ indicator = app_indicator_new ("veracrypt", "veracrypt-indicator", 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 ("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); ++ ++ 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()); ++ ++ 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()); ++ ++ 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)); ++ } + } + } + +Index: veracrypt/src/Main/Forms/MainFrame.h +=================================================================== +--- veracrypt.orig/src/Main/Forms/MainFrame.h ++++ veracrypt/src/Main/Forms/MainFrame.h +@@ -13,6 +13,10 @@ + #ifndef TC_HEADER_Main_Forms_MainFrame + #define TC_HEADER_Main_Forms_MainFrame + ++#define GSocket GlibGSocket ++#include <libappindicator/app-indicator.h> ++#undef GSocket ++ + #include "Forms.h" + #include "ChangePasswordDialog.h" + +@@ -35,6 +39,16 @@ namespace VeraCrypt + static FilePath GetShowRequestFifoPath () { return Application::GetConfigFilePath (L".show-request-queue", true); } + #endif + ++ void MountAllFavorites (); ++ ++ 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 + { +@@ -68,7 +82,6 @@ namespace VeraCrypt + void LoadFavoriteVolumes (); + void LoadPreferences (); + void MountAllDevices (); +- void MountAllFavorites (); + void MountVolume (); + void OnAboutMenuItemSelected (wxCommandEvent& event); + void OnQuit(wxCommandEvent& event) { Close(true); } +Index: veracrypt/src/Main/GraphicUserInterface.cpp +=================================================================== +--- veracrypt.orig/src/Main/GraphicUserInterface.cpp ++++ veracrypt/src/Main/GraphicUserInterface.cpp +@@ -1628,6 +1628,8 @@ namespace VeraCrypt + } + + 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 <int> columnWidthPermilles, bool hasVerticalScrollbar) const +Index: veracrypt/src/Makefile +=================================================================== +--- veracrypt.orig/src/Makefile ++++ veracrypt/src/Makefile +@@ -58,6 +58,7 @@ CPPFLAGS+=$(shell dpkg-buildflags --get + CFLAGS+=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS) -Wno-sequence-point + CXXFLAGS+=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS) -Wno-narrowing + LFLAGS+=$(shell dpkg-buildflags --get LDFLAGS) ++C_CXX_FLAGS += $(shell pkg-config --cflags appindicator-0.1) + + export TC_BUILD_CONFIG := Release + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..2694b0b --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,3 @@ +001-user-guide-location.diff +002-build-flags.diff +003-indicator-support.diff |
