Package: pykaraoke / 0.7.5-1.2

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
Description: Updates for wxPython 3.0
 The third parameter when splitting a window is meant to be an integer, and
 is optional.  If omitted, it defaults to 0, which means "split in half"
 which I assume is what passing 0.5 was intended to do (and 0.5 will get
 cast to an integer, so passing 0.5 is just a confusing way to pass 0 here).
 However, in the second case, for some reason it doesn't split in half with
 wxPython3.0, so I've had to make it calculate half the window size explicitly.
Author: Olly Betts <olly@survex.com>
Bug-Debian: https://bugs.debian.org/758948
Forwarded: no
Last-Update: 2014-08-31

Index: pykaraoke-0.7.5/pykaraoke.py
===================================================================
--- pykaraoke-0.7.5.orig/pykaraoke.py
+++ pykaraoke-0.7.5/pykaraoke.py
@@ -128,13 +128,13 @@
 
 import sys
 
-# Ensure that we have at least wx version 2.6, but also protect
+# Ensure that we have at least wx version 2.8, but also protect
 # wxversion against py2exe (wxversion requires actual wx directories
 # on-disk, so it doesn't work in the py2exe-compiled version used for
 # Windows distribution).
 if not hasattr(sys, 'frozen'):
     import wxversion
-    wxversion.ensureMinimal('2.6')
+    wxversion.ensureMinimal('2.8')
 
 import os, string, wx, time, copy, types
 from pykconstants import *
@@ -944,9 +944,9 @@ class ConfigWindow (wx.Frame):
             parent = self.parent
             parent.splitter.Unsplit()
             if splitVertically:
-                parent.splitter.SplitVertically(parent.leftPanel, parent.rightPanel, 0.5)
+                parent.splitter.SplitVertically(parent.leftPanel, parent.rightPanel)
             else:
-                parent.splitter.SplitHorizontally(parent.leftPanel, parent.rightPanel, 0.5)
+                parent.splitter.SplitHorizontally(parent.leftPanel, parent.rightPanel)
 
         # Save the auto play option
         if self.AutoPlayCheckBox.IsChecked():
@@ -1286,7 +1286,7 @@ class ExportWindow(wx.Frame):
 
         dlg = wx.FileDialog(self, 'Export file',
                             wildcard = 'Text Files (*.txt)|*.txt|All files|*',
-                            style = wx.SAVE | wx.OVERWRITE_PROMPT)
+                            style = wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT)
         result = dlg.ShowModal()
         if result != wx.ID_OK:
             dlg.Destroy()
@@ -3390,9 +3390,9 @@ class PyKaraokeWindow (wx.Frame):
         self.rightPanel.SetSizer(self.RightSizer)
 
         if manager.settings.SplitVertically:
-            self.splitter.SplitVertically(self.leftPanel, self.rightPanel, 0.5)
+            self.splitter.SplitVertically(self.leftPanel, self.rightPanel, self.GetSizeTuple()[0] / 2)
         else:
-            self.splitter.SplitHorizontally(self.leftPanel, self.rightPanel, 0.5)
+            self.splitter.SplitHorizontally(self.leftPanel, self.rightPanel, self.GetSizeTuple()[1] / 2)
         self.splitter.SetMinimumPaneSize(1)
 
         # Default start in Search View
Index: pykaraoke-0.7.5/setup.py
===================================================================
--- pykaraoke-0.7.5.orig/setup.py
+++ pykaraoke-0.7.5/setup.py
@@ -29,7 +29,7 @@ import glob
 from pykenv import *
 
 import wxversion
-wxversion.ensureMinimal('2.6')
+wxversion.ensureMinimal('2.8')
 import wx
 
 # patch distutils if it can't cope with the "classifiers" or