Package: openstv / 1.6.1-1.1

wxpython3.0.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Description: Update for wxPython 3.0
 These changes should remain compatible with wxPython 2.8.
 .
 SetMaxLength() is not valid on multi-line text controls under wxGTK, but
 the default should be to not limit the length anyway (aside from any limits
 the underlying platform imposes, which you can't get around anyway).
Bug-Debian: https://bugs.debian.org/759055
Forwarded: no
Last-Update: 2014-09-07

Index: openstv-1.6.1/openstv/BFE.py
===================================================================
--- openstv-1.6.1.orig/openstv/BFE.py
+++ openstv-1.6.1/openstv/BFE.py
@@ -58,7 +58,7 @@ class BFEFrame(wx.Frame):
     # Edit an existing ballot file
     elif mode == "old":
       dlg = wx.FileDialog(self, "Edit Ballot File",
-                          style=wx.OPEN|wx.CHANGE_DIR)
+                          style=wx.FD_OPEN|wx.FD_CHANGE_DIR)
       if dlg.ShowModal() != wx.ID_OK:
         dlg.Destroy()
         self.Destroy()
@@ -96,7 +96,6 @@ class BFEFrame(wx.Frame):
     self.log = wx.TextCtrl(nb, -1,
                            style=wx.TE_MULTILINE|wx.TE_READONLY|\
                            wx.TE_WORDWRAP|wx.FIXED)
-    self.log.SetMaxLength(0)
     nb.AddPage(self.log, "Log")
 
     # Initialize
@@ -158,7 +157,7 @@ class BFEFrame(wx.Frame):
 
     # Get the filename of the ballots to be appended
     dlg = wx.FileDialog(self, "Select Ballot File",
-                        style=wx.OPEN|wx.CHANGE_DIR)
+                        style=wx.FD_OPEN|wx.FD_CHANGE_DIR)
     if dlg.ShowModal() != wx.ID_OK:
       dlg.Destroy()
       return
@@ -197,7 +196,7 @@ class BFEFrame(wx.Frame):
 
     # Ask the user to choose the filename.
     dlg = wx.FileDialog(self, "Save Ballot File",
-                        style=wx.SAVE|wx.OVERWRITE_PROMPT|wx.CHANGE_DIR)
+                        style=wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT|wx.FD_CHANGE_DIR)
     if dlg.ShowModal() != wx.ID_OK:
       dlg.Destroy()
       return
@@ -233,7 +232,7 @@ class BFEFrame(wx.Frame):
 
   def OnSaveLogAs(self, event):
     dlg = wx.FileDialog(self, "Save Log to a File",
-                        style=wx.SAVE|wx.OVERWRITE_PROMPT|wx.CHANGE_DIR)
+                        style=wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT|wx.FD_CHANGE_DIR)
     if dlg.ShowModal() != wx.ID_OK:
       dlg.Destroy()
       return
Index: openstv-1.6.1/openstv/OpenSTV.py
===================================================================
--- openstv-1.6.1.orig/openstv/OpenSTV.py
+++ openstv-1.6.1/openstv/OpenSTV.py
@@ -181,7 +181,6 @@ class Frame(wx.Frame):
     self.console = wx.TextCtrl(self.notebook, -1,
                                style=wx.TE_MULTILINE|wx.TE_READONLY|\
                                wx.TE_WORDWRAP|wx.FIXED|wx.TE_RICH2)
-    self.console.SetMaxLength(0)
     ps = self.console.GetFont().GetPointSize()
     font = wx.Font(ps, wx.MODERN, wx.NORMAL, wx.NORMAL)
     self.console.SetFont(font)
@@ -383,7 +382,6 @@ to www.OpenSTV.org, or send an email to
     # create a new notebook page
     tc = wx.TextCtrl(self.notebook, -1,
                      style=wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.FIXED)
-    tc.SetMaxLength(0)
     ps = tc.GetFont().GetPointSize()
     font = wx.Font(ps, wx.MODERN, wx.NORMAL, wx.NORMAL)
     tc.SetFont(font)
@@ -436,7 +434,7 @@ to www.OpenSTV.org, or send an email to
       return
 
     dlg = wx.FileDialog(self, "Save Results in CSV Format",
-                        style=wx.SAVE|wx.OVERWRITE_PROMPT|wx.CHANGE_DIR)
+                        style=wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT|wx.FD_CHANGE_DIR)
     if dlg.ShowModal() != wx.ID_OK:
       dlg.Destroy()
       return
@@ -456,7 +454,7 @@ to www.OpenSTV.org, or send an email to
       return
 
     dlg = wx.FileDialog(self, "Save Results in Text Format",
-                        style=wx.SAVE|wx.OVERWRITE_PROMPT|wx.CHANGE_DIR)
+                        style=wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT|wx.FD_CHANGE_DIR)
     if dlg.ShowModal() != wx.ID_OK:
       dlg.Destroy()
       return
@@ -480,7 +478,7 @@ to www.OpenSTV.org, or send an email to
       return
 
     dlg = wx.FileDialog(self, "Save Results in HTML Format",
-                        style=wx.SAVE|wx.OVERWRITE_PROMPT|wx.CHANGE_DIR)
+                        style=wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT|wx.FD_CHANGE_DIR)
     if dlg.ShowModal() != wx.ID_OK:
       dlg.Destroy()
       return
@@ -636,7 +634,7 @@ See the Help menu for more information a
 
   def OnFilenameSelect(self, event):
     dlg = wx.FileDialog(self, "Select Input File", "",
-                        style=wx.OPEN|wx.CHANGE_DIR)
+                        style=wx.FD_OPEN|wx.FD_CHANGE_DIR)
     if dlg.ShowModal() != wx.ID_OK:
       dlg.Destroy()
       return
@@ -880,7 +878,6 @@ class HTMLFrame(wx.Frame):
 class App(wx.App):
 
   def OnInit(self):
-    wx.InitAllImageHandlers()
 
     # Show a splash screen
     png = os.path.join(getHome(), "Icons", "splash.png")