File: img2py-no-display.patch

package info (click to toggle)
wxpython3.0 3.0.2.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 482,760 kB
  • ctags: 518,293
  • sloc: cpp: 2,127,226; python: 294,045; makefile: 51,942; ansic: 19,033; sh: 3,013; xml: 1,629; perl: 17
file content (28 lines) | stat: -rw-r--r-- 844 bytes parent folder | download | duplicates (3)
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
Description: Allow img2py to work without requiring an X display
Author: Nicolas Boulenguez
Bug-Debian: http://bugs.debian.org/698198
Bug: http://trac.wxwidgets.org/ticket/15483
Forwarded: http://trac.wxwidgets.org/ticket/15483
Last-Update: 2014-09-17

--- a/wxPython/wx/tools/img2py.py	2010-04-15 06:26:37.000000000 +0200
+++ b/wxPython/wx/tools/img2py.py	2013-01-15 03:39:32.000000000 +0100
@@ -95,7 +95,6 @@
 except AttributeError:
     b64encode = base64.encodestring
 
-app = None
 DEFAULT_APPEND = False
 DEFAULT_COMPRESSED = True
 DEFAULT_MASKCLR = None
@@ -145,10 +144,6 @@
     if functionCompatibile != -1:
         functionCompatible = functionCompatibile
         
-    global app
-    if not wx.GetApp():
-        app = wx.App()
-        
     # convert the image file to a temporary file
     tfname = tempfile.mktemp()
     try: