]> git.saurik.com Git - wxWidgets.git/commitdiff
Little tweaks to match recent CVS changes.
authorRobin Dunn <robin@alldunn.com>
Fri, 16 Jul 2004 00:06:11 +0000 (00:06 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 16 Jul 2004 00:06:11 +0000 (00:06 +0000)
Fixed wxFontEnumerator GetFacename and GetEncodings to return an empty
list instead of crashing if the Enumerate function hasn't been called
yet.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/src/_event.i
wxPython/src/_font.i

index ae243a412e48d1e2845dec10d6007df083d977d8..004cc784eec4aff7f0bfd5147ae94327d74d50df 100644 (file)
@@ -1143,6 +1143,7 @@ public:
     void SetCurrentFocus(wxWindow *win);
 
     enum {
     void SetCurrentFocus(wxWindow *win);
 
     enum {
+        IsBackward,
         IsForward,
         WinChange
     };
         IsForward,
         WinChange
     };
index c1d8805762a9e7504de0139664a0c4dfe464e881..2e858aacca0e34cc22e289e065cfb66239e0777e 100644 (file)
@@ -506,7 +506,7 @@ public:
 
     // Unofficial API, don't use
     virtual void SetNoAntiAliasing( bool no = True );
 
     // Unofficial API, don't use
     virtual void SetNoAntiAliasing( bool no = True );
-    virtual bool GetNoAntiAliasing();
+    virtual bool GetNoAntiAliasing() const;
 
     // the default encoding is used for creating all fonts with default
     // encoding parameter
 
     // the default encoding is used for creating all fonts with default
     // encoding parameter
@@ -558,12 +558,18 @@ public:
     %extend {
         PyObject* GetEncodings() {
             wxArrayString* arr = self->GetEncodings();
     %extend {
         PyObject* GetEncodings() {
             wxArrayString* arr = self->GetEncodings();
-            return wxArrayString2PyList_helper(*arr);
+            if (arr)
+                return wxArrayString2PyList_helper(*arr);
+            else
+                return PyList_New(0);
         }
 
         PyObject* GetFacenames() {
             wxArrayString* arr = self->GetFacenames();
         }
 
         PyObject* GetFacenames() {
             wxArrayString* arr = self->GetFacenames();
-            return wxArrayString2PyList_helper(*arr);
+            if (arr)
+                return wxArrayString2PyList_helper(*arr);
+            else
+                return PyList_New(0);
         }
     }
 };
         }
     }
 };