summaryrefslogtreecommitdiff
path: root/sci-biology/treeviewx/files/treeviewx-0.5.1-wx30.patch
diff options
context:
space:
mode:
Diffstat (limited to 'sci-biology/treeviewx/files/treeviewx-0.5.1-wx30.patch')
-rw-r--r--sci-biology/treeviewx/files/treeviewx-0.5.1-wx30.patch78
1 files changed, 78 insertions, 0 deletions
diff --git a/sci-biology/treeviewx/files/treeviewx-0.5.1-wx30.patch b/sci-biology/treeviewx/files/treeviewx-0.5.1-wx30.patch
new file mode 100644
index 000000000000..b1db5749990c
--- /dev/null
+++ b/sci-biology/treeviewx/files/treeviewx-0.5.1-wx30.patch
@@ -0,0 +1,78 @@
+ tv.cpp | 4 ++--
+ tview.cpp | 12 ++++++++----
+ 2 files changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/tv.cpp b/tv.cpp
+old mode 100755
+new mode 100644
+index 1abe90b..0df45a8
+--- a/tv.cpp
++++ b/tv.cpp
+@@ -163,9 +163,9 @@ bool MyApp::OnInit(void)
+ {
+ // Optional command line argument is name of file to open
+ #if wxUSE_UNICODE
+- wchar_t *InputFile = NULL;
++ const wchar_t *InputFile = NULL;
+ #else
+- char *InputFile = NULL;
++ const char *InputFile = NULL;
+ #endif
+ // Read input/output files
+ if (argc > 1)
+diff --git a/tview.cpp b/tview.cpp
+old mode 100755
+new mode 100644
+index 93972c3..4b2d593
+--- a/tview.cpp
++++ b/tview.cpp
+@@ -62,9 +62,13 @@
+ #ifdef __WXMSW__
+ #else
+ #ifdef USE_SVG
++#if wxMAJOR_VERSION >= 3
++ #include <wx/dcsvg.h>
++#else
+ #include <wx/svg/dcsvg.h>
+ #endif
+ #endif
++#endif
+
+ // GUI interface
+ #include "tv.h"
+@@ -186,7 +190,7 @@ void TView::OnSavePicture (wxCommandEvent& WXUNUSED(event))
+ wxFrame *f = GetMainFrame();
+ wxFileDialog dialog((wxWindow *)f, wxT("Save Picture as"), wxT(""),
+ pictureFileName, wxT("Enhanced metafile (*.emf)|*.emf"),
+- wxSAVE|wxOVERWRITE_PROMPT);
++ wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
+
+ if (dialog.ShowModal() == wxID_OK)
+ {
+@@ -206,7 +210,7 @@ void TView::OnSavePicture (wxCommandEvent& WXUNUSED(event))
+ #endif
+ wxFileDialog dialog((wxWindow *)f, wxT("Save Picture as"), wxT(""),
+ pictureFileName, wxT("SVG vector picture files (*.svg)|*.svg"),
+- wxSAVE|wxOVERWRITE_PROMPT);
++ wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
+
+ if (dialog.ShowModal() == wxID_OK)
+ {
+@@ -361,7 +365,7 @@ bool TView::OnClose(bool deleteWindow)
+
+ // Clear the canvas in case we're in single-window mode,
+ // and the canvas stays.
+-#if (wxMINOR_VERSION > 4) // from 2.5 Clear is deprecated
++#if (wxMAJOR_VERSION >= 3 || wxMINOR_VERSION > 4) // from 2.5 Clear is deprecated
+ canvas->ClearBackground();
+ #else
+ canvas->Clear();
+@@ -686,7 +690,7 @@ void TView::OnLeafFont (wxCommandEvent& WXUNUSED(event))
+ wxFontData data;
+ data.SetInitialFont (LeafFont);
+
+-#ifdef __WXMAC__
++#if wxMAJOR_VERSION >= 3 || defined __WXMAC__
+ wxFontDialog dialog((wxWindow *)GetFrame(), data);
+ #else
+ wxFontDialog dialog((wxWindow *)GetMainFrame(), &data);