]> git.saurik.com Git - wxWidgets.git/commitdiff
Added wx.StandardPaths.GetTmpDir
authorRobin Dunn <robin@alldunn.com>
Tue, 24 Oct 2006 20:30:32 +0000 (20:30 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 24 Oct 2006 20:30:32 +0000 (20:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/demo/StandardPaths.py
wxPython/docs/CHANGES.txt
wxPython/src/_stdpaths.i
wxPython/src/gtk/_misc.py
wxPython/src/gtk/_misc_wrap.cpp
wxPython/src/mac/_misc.py
wxPython/src/mac/_misc_wrap.cpp
wxPython/src/msw/_misc.py
wxPython/src/msw/_misc_wrap.cpp

index 6502c5c8a943aaf5f5c8b7000a7cd48b1a2abf50..a90a9b5045c231e902e006e805531097cc615bf2 100644 (file)
@@ -8,7 +8,7 @@ class TestPanel(wx.Panel):
         self.log = log
         wx.Panel.__init__(self, parent, -1)
 
-        sizer = wx.FlexGridSizer(0, 3, 2, 2)
+        sizer = wx.FlexGridSizer(0, 3, 5, 5)
         box = wx.BoxSizer(wx.VERTICAL)
         fs = self.GetFont().GetPointSize()
         bf = wx.Font(fs+4, wx.SWISS, wx.NORMAL, wx.BOLD)
@@ -54,6 +54,7 @@ class TestPanel(wx.Panel):
                   'GetPluginsDir',
                   'GetInstallPrefix',
                   'GetResourcesDir',
+                  'GetTempDir',
                   ]:
             makeitem(x)
 
index 819390eb874c3564af8d787cac9cf1037c626167..2499fb6399e186a62bf7f7e1342a024b319092f5 100644 (file)
@@ -15,7 +15,7 @@ switch your programs over to the wx package.
 Fixed wx.glcanvas.GLCanvas.SetCurrent to be compatible with prevoius
 versons. 
 
-
+Added wx.StandardPaths.GetTmpDir.
 
 
 
index 2b38bdd13c3c256006a876043d314c1f92f0d179..f76a03d2d916a246c8c11e56e7bdf0e1073f0f7e 100644 (file)
@@ -165,7 +165,10 @@ standard prefix/share/locale/lang/LC_MESSAGES.)", "");
 C:\Documents and Settings\username\Documents under Windows,
 $HOME under Unix and ~/Documents under Mac", "");
     
-       
+    DocDeclStr(
+        virtual wxString , GetTempDir() const,
+        "Return the user's directory for temporary files.", "");
+    
     
     DocStr(SetInstallPrefix,
            "Set the program installation directory which is /usr/local by default.
index 944da9b0f3365fdf05f3c80f7a2c31cbbbf3e574..91f5d9c4cb1a23001f715193791abba3ca6cbf5c 100644 (file)
@@ -6129,6 +6129,14 @@ class StandardPaths(object):
         """
         return _misc_.StandardPaths_GetDocumentsDir(*args, **kwargs)
 
+    def GetTempDir(*args, **kwargs):
+        """
+        GetTempDir(self) -> String
+
+        Return the user's directory for temporary files.
+        """
+        return _misc_.StandardPaths_GetTempDir(*args, **kwargs)
+
     def SetInstallPrefix(*args, **kwargs):
         """
         SetInstallPrefix(self, String prefix)
index 88815d09adf73cda59b89f6b35493bff2abee334..2b0edad6aaefa0e672895c854c0f7158dca81f17 100644 (file)
@@ -37124,6 +37124,40 @@ fail:
 }
 
 
+SWIGINTERN PyObject *_wrap_StandardPaths_GetTempDir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  wxStandardPaths *arg1 = (wxStandardPaths *) 0 ;
+  wxString result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject *swig_obj[1] ;
+  
+  if (!args) SWIG_fail;
+  swig_obj[0] = args;
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxStandardPaths, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StandardPaths_GetTempDir" "', expected argument " "1"" of type '" "wxStandardPaths const *""'"); 
+  }
+  arg1 = reinterpret_cast< wxStandardPaths * >(argp1);
+  {
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    result = ((wxStandardPaths const *)arg1)->GetTempDir();
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) SWIG_fail;
+  }
+  {
+#if wxUSE_UNICODE
+    resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
+#else
+    resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
+#endif
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
 SWIGINTERN PyObject *_wrap_StandardPaths_SetInstallPrefix(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   PyObject *resultobj = 0;
   wxStandardPaths *arg1 = (wxStandardPaths *) 0 ;
@@ -39916,6 +39950,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"StandardPaths_GetResourcesDir", (PyCFunction)_wrap_StandardPaths_GetResourcesDir, METH_O, NULL},
         { (char *)"StandardPaths_GetLocalizedResourcesDir", (PyCFunction) _wrap_StandardPaths_GetLocalizedResourcesDir, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"StandardPaths_GetDocumentsDir", (PyCFunction)_wrap_StandardPaths_GetDocumentsDir, METH_O, NULL},
+        { (char *)"StandardPaths_GetTempDir", (PyCFunction)_wrap_StandardPaths_GetTempDir, METH_O, NULL},
         { (char *)"StandardPaths_SetInstallPrefix", (PyCFunction) _wrap_StandardPaths_SetInstallPrefix, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"StandardPaths_GetInstallPrefix", (PyCFunction)_wrap_StandardPaths_GetInstallPrefix, METH_O, NULL},
         { (char *)"StandardPaths_swigregister", StandardPaths_swigregister, METH_VARARGS, NULL},
index e8738b0e3d41dcece99d926b2fb0cc399868a4c2..4c29575658d08917fca9dbc62e175412b8dc4829 100644 (file)
@@ -6137,6 +6137,14 @@ class StandardPaths(object):
         """
         return _misc_.StandardPaths_GetDocumentsDir(*args, **kwargs)
 
+    def GetTempDir(*args, **kwargs):
+        """
+        GetTempDir(self) -> String
+
+        Return the user's directory for temporary files.
+        """
+        return _misc_.StandardPaths_GetTempDir(*args, **kwargs)
+
     def SetInstallPrefix(*args, **kwargs):
         """
         SetInstallPrefix(self, String prefix)
index 3c3054f8372dcdb71bf5ad1f9cfa18f5a287c6b0..87d200eb20d9d196d8ca32b6d6e73b6b4f0f84a4 100644 (file)
@@ -37185,6 +37185,40 @@ fail:
 }
 
 
+SWIGINTERN PyObject *_wrap_StandardPaths_GetTempDir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  wxStandardPaths *arg1 = (wxStandardPaths *) 0 ;
+  wxString result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject *swig_obj[1] ;
+  
+  if (!args) SWIG_fail;
+  swig_obj[0] = args;
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxStandardPaths, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StandardPaths_GetTempDir" "', expected argument " "1"" of type '" "wxStandardPaths const *""'"); 
+  }
+  arg1 = reinterpret_cast< wxStandardPaths * >(argp1);
+  {
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    result = ((wxStandardPaths const *)arg1)->GetTempDir();
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) SWIG_fail;
+  }
+  {
+#if wxUSE_UNICODE
+    resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
+#else
+    resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
+#endif
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
 SWIGINTERN PyObject *_wrap_StandardPaths_SetInstallPrefix(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   PyObject *resultobj = 0;
   wxStandardPaths *arg1 = (wxStandardPaths *) 0 ;
@@ -39979,6 +40013,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"StandardPaths_GetResourcesDir", (PyCFunction)_wrap_StandardPaths_GetResourcesDir, METH_O, NULL},
         { (char *)"StandardPaths_GetLocalizedResourcesDir", (PyCFunction) _wrap_StandardPaths_GetLocalizedResourcesDir, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"StandardPaths_GetDocumentsDir", (PyCFunction)_wrap_StandardPaths_GetDocumentsDir, METH_O, NULL},
+        { (char *)"StandardPaths_GetTempDir", (PyCFunction)_wrap_StandardPaths_GetTempDir, METH_O, NULL},
         { (char *)"StandardPaths_SetInstallPrefix", (PyCFunction) _wrap_StandardPaths_SetInstallPrefix, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"StandardPaths_GetInstallPrefix", (PyCFunction)_wrap_StandardPaths_GetInstallPrefix, METH_O, NULL},
         { (char *)"StandardPaths_swigregister", StandardPaths_swigregister, METH_VARARGS, NULL},
index e8738b0e3d41dcece99d926b2fb0cc399868a4c2..4c29575658d08917fca9dbc62e175412b8dc4829 100644 (file)
@@ -6137,6 +6137,14 @@ class StandardPaths(object):
         """
         return _misc_.StandardPaths_GetDocumentsDir(*args, **kwargs)
 
+    def GetTempDir(*args, **kwargs):
+        """
+        GetTempDir(self) -> String
+
+        Return the user's directory for temporary files.
+        """
+        return _misc_.StandardPaths_GetTempDir(*args, **kwargs)
+
     def SetInstallPrefix(*args, **kwargs):
         """
         SetInstallPrefix(self, String prefix)
index ba1831119b355b21389528ee07558677dbbefe40..8a229111560cfd5277c47d30e1007aed2af30921 100644 (file)
@@ -37185,6 +37185,40 @@ fail:
 }
 
 
+SWIGINTERN PyObject *_wrap_StandardPaths_GetTempDir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  wxStandardPaths *arg1 = (wxStandardPaths *) 0 ;
+  wxString result;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  PyObject *swig_obj[1] ;
+  
+  if (!args) SWIG_fail;
+  swig_obj[0] = args;
+  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxStandardPaths, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StandardPaths_GetTempDir" "', expected argument " "1"" of type '" "wxStandardPaths const *""'"); 
+  }
+  arg1 = reinterpret_cast< wxStandardPaths * >(argp1);
+  {
+    PyThreadState* __tstate = wxPyBeginAllowThreads();
+    result = ((wxStandardPaths const *)arg1)->GetTempDir();
+    wxPyEndAllowThreads(__tstate);
+    if (PyErr_Occurred()) SWIG_fail;
+  }
+  {
+#if wxUSE_UNICODE
+    resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len());
+#else
+    resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len());
+#endif
+  }
+  return resultobj;
+fail:
+  return NULL;
+}
+
+
 SWIGINTERN PyObject *_wrap_StandardPaths_SetInstallPrefix(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
   PyObject *resultobj = 0;
   wxStandardPaths *arg1 = (wxStandardPaths *) 0 ;
@@ -39979,6 +40013,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"StandardPaths_GetResourcesDir", (PyCFunction)_wrap_StandardPaths_GetResourcesDir, METH_O, NULL},
         { (char *)"StandardPaths_GetLocalizedResourcesDir", (PyCFunction) _wrap_StandardPaths_GetLocalizedResourcesDir, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"StandardPaths_GetDocumentsDir", (PyCFunction)_wrap_StandardPaths_GetDocumentsDir, METH_O, NULL},
+        { (char *)"StandardPaths_GetTempDir", (PyCFunction)_wrap_StandardPaths_GetTempDir, METH_O, NULL},
         { (char *)"StandardPaths_SetInstallPrefix", (PyCFunction) _wrap_StandardPaths_SetInstallPrefix, METH_VARARGS | METH_KEYWORDS, NULL},
         { (char *)"StandardPaths_GetInstallPrefix", (PyCFunction)_wrap_StandardPaths_GetInstallPrefix, METH_O, NULL},
         { (char *)"StandardPaths_swigregister", StandardPaths_swigregister, METH_VARARGS, NULL},