Package: treeviewx / 0.5.1+git20100823.7e4d0e9-4

wx3.2-compat.patch Patch series | download
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
Description: Fix to work with wxWidgets 3.2
Author: Scott Talbert <swt@techie.net>
Last-Update: 2022-09-16
Bug-Debian: https://bugs.debian.org/1019811
Forwarded: no

--- a/tv.cpp
+++ b/tv.cpp
@@ -486,37 +486,37 @@ void MyFrame::InitToolBar(wxToolBar* too
 	// The toolbar for the Mac is associated with each document window, not the MDI frame,
 	// so we don't display Open and Save as buttons
 #else
-	toolBar->AddTool( wxID_NEW, *(bitmaps[11]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, wxT("New document"));
+	toolBar->AddTool( wxID_NEW, wxEmptyString, *(bitmaps[11]), wxT("New document"));
 	currentX += width + 5;
-	toolBar->AddTool( wxID_OPEN, *(bitmaps[0]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, wxT("Open document"));
+	toolBar->AddTool( wxID_OPEN, wxEmptyString, *(bitmaps[0]), wxT("Open document"));
 	currentX += width + 5;
-	toolBar->AddTool(wxID_SAVEAS, *bitmaps[1], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, wxT("Save document"));
+	toolBar->AddTool(wxID_SAVEAS, wxEmptyString, *bitmaps[1], wxT("Save document"));
 	currentX += width + 5;
 #endif
-	toolBar->AddTool(wxID_COPY, *bitmaps[2], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, wxT("Copy tree to clipboard"));
+	toolBar->AddTool(wxID_COPY, wxEmptyString, *bitmaps[2], wxT("Copy tree to clipboard"));
 	currentX += width + 5;
-	toolBar->AddTool(wxID_PASTE, *bitmaps[10], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, wxT("Paste tree descriiption from clipboard"));
+	toolBar->AddTool(wxID_PASTE, wxEmptyString, *bitmaps[10], wxT("Paste tree descriiption from clipboard"));
 	currentX += width + 5;
 	// --
 	toolBar->AddSeparator();
-	toolBar->AddTool(wxID_PREVIEW, *bitmaps[3], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, wxT("Print preview"));
-	toolBar->AddTool(wxID_PRINT, *bitmaps[4], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, wxT("Print"));
+	toolBar->AddTool(wxID_PREVIEW, wxEmptyString, *bitmaps[3], wxT("Print preview"));
+	toolBar->AddTool(wxID_PRINT, wxEmptyString, *bitmaps[4], wxT("Print"));
 	//--
 	toolBar->AddSeparator();
-	toolBar->AddTool(PREVIOUS_TREE_CMD, *bitmaps[5], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, wxT("Previous tree"));
-	toolBar->AddTool(NEXT_TREE_CMD, *bitmaps[6], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, wxT("Next tree"));
+	toolBar->AddTool(PREVIOUS_TREE_CMD, wxEmptyString, *bitmaps[5], wxT("Previous tree"));
+	toolBar->AddTool(NEXT_TREE_CMD, wxEmptyString, *bitmaps[6], wxT("Next tree"));
 	//--
 	toolBar->AddSeparator();
-	toolBar->AddTool(SLANTED_TREE_CMD, *bitmaps[7], wxNullBitmap, TRUE, currentX, -1, (wxObject *) NULL, wxT("Slanted cladogram"));
-	toolBar->AddTool(RECTANGULAR_TREE_CMD, *bitmaps[8], wxNullBitmap, TRUE, currentX, -1, (wxObject *) NULL, wxT("Rectangular cladogram"));
-	toolBar->AddTool(PHYLOGRAM_CMD, *bitmaps[9], wxNullBitmap, TRUE, currentX, -1, (wxObject *) NULL, wxT("Phylogram"));
+	toolBar->AddTool(SLANTED_TREE_CMD, wxEmptyString, *bitmaps[7], wxT("Slanted cladogram"), wxITEM_CHECK);
+	toolBar->AddTool(RECTANGULAR_TREE_CMD, wxEmptyString, *bitmaps[8], wxT("Rectangular cladogram"), wxITEM_CHECK);
+	toolBar->AddTool(PHYLOGRAM_CMD, wxEmptyString, *bitmaps[9], wxT("Phylogram"), wxITEM_CHECK);
 	//--
  	toolBar->AddSeparator();
-	toolBar->AddTool(INTERNAL_LABELS_CMD, *bitmaps[14], wxNullBitmap, TRUE, currentX, -1, (wxObject *) NULL, wxT("Show internal node labels"));
+	toolBar->AddTool(INTERNAL_LABELS_CMD, wxEmptyString, *bitmaps[14], wxT("Show internal node labels"), wxITEM_CHECK);
 	//--
 	toolBar->AddSeparator();
-	toolBar->AddTool(ZOOM_IN_CMD, *bitmaps[12], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, wxT("Zoom in"));
-	toolBar->AddTool(ZOOM_OUT_CMD, *bitmaps[13], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, wxT("Zoom out"));
+	toolBar->AddTool(ZOOM_IN_CMD, wxEmptyString, *bitmaps[12], wxT("Zoom in"));
+	toolBar->AddTool(ZOOM_OUT_CMD, wxEmptyString, *bitmaps[13], wxT("Zoom out"));
 
 	toolBar->Realize();