summaryrefslogtreecommitdiff
blob: a1cfd906f1762dfaedba7441d18583738f9a59a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
--- a/tv.cpp
+++ b/tv.cpp
@@ -163,9 +163,9 @@
 {
 	// 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)
--- 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 @@
 	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 @@
 	#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) && (p.GetNumTrees() != 0))
     {
@@ -361,7 +365,7 @@
 
 	// 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 @@
 	wxFontData data;
 	data.SetInitialFont (LeafFont);
 
-#ifdef __WXMAC__
+#if wxMAJOR_VERSION >= 3 || defined __WXMAC__
 	wxFontDialog dialog((wxWindow *)GetFrame(), data);
 #else
 	wxFontDialog dialog((wxWindow *)GetMainFrame(), &data);