X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d07d2bc9d05408c58b76c53a0a291915b88e5064..6d44273eec68072ac46006e8de055f89ef99670a:/wxPython/src/_config.i diff --git a/wxPython/src/_config.i b/wxPython/src/_config.i index a0a2bf2660..f3f4d306a8 100644 --- a/wxPython/src/_config.i +++ b/wxPython/src/_config.i @@ -24,12 +24,14 @@ %{ static PyObject* __EnumerationHelper(bool flag, wxString& str, long index) { + wxPyBlock_t blocked = wxPyBeginBlockThreads(); PyObject* ret = PyTuple_New(3); if (ret) { PyTuple_SET_ITEM(ret, 0, PyInt_FromLong(flag)); PyTuple_SET_ITEM(ret, 1, wx2PyString(str)); PyTuple_SET_ITEM(ret, 2, PyInt_FromLong(index)); } + wxPyEndBlockThreads(blocked); return ret; } %} @@ -85,14 +87,15 @@ public: }; + %disownarg( wxConfigBase *config ); DocDeclStr( static wxConfigBase *, Set(wxConfigBase *config), "Sets the global config object (the one returned by Get) and returns a reference to the previous global config object.", ""); - + %cleardisown( wxConfigBase *config ); DocDeclStr( - static wxConfigBase *, Get(bool createOnDemand = True), + static wxConfigBase *, Get(bool createOnDemand = true), "Returns the current global config object, creating one if neccessary.", ""); @@ -192,12 +195,12 @@ GetNextGroup to fetch the next item.", ""); DocDeclStr( - virtual size_t , GetNumberOfEntries(bool recursive = False) const, + virtual size_t , GetNumberOfEntries(bool recursive = false) const, "Get the number of entries in the current group, with or without its subgroups.", ""); DocDeclStr( - virtual size_t , GetNumberOfGroups(bool recursive = False) const, + virtual size_t , GetNumberOfGroups(bool recursive = false) const, "Get the number of subgroups in the current group, with or without its subgroups.", ""); @@ -249,7 +252,7 @@ subgroups.", ""); DocStr(ReadBool, "Returns the value of key if it exists, defaultVal otherwise.", ""); - bool ReadBool(const wxString& key, bool defaultVal = False) { + bool ReadBool(const wxString& key, bool defaultVal = false) { bool rv; self->Read(key, &rv, defaultVal); return rv; @@ -279,7 +282,7 @@ subgroups.", ""); DocDeclStr( - virtual bool , Flush(bool currentOnly = False), + virtual bool , Flush(bool currentOnly = false), "permanently writes all changes", ""); @@ -300,7 +303,7 @@ name is already taken by an existing entry)", ""); // it was the last key in it and the second parameter is True DocDeclStr( virtual bool , DeleteEntry(const wxString& key, - bool deleteGroupIfEmpty = True), + bool deleteGroupIfEmpty = true), "Deletes the specified entry and the group it belongs to if it was the last key in it and the second parameter is True", ""); @@ -318,7 +321,7 @@ primarly intended for use by deinstallation routine.", ""); DocDeclStr( - void , SetExpandEnvVars(bool doIt = True), + void , SetExpandEnvVars(bool doIt = true), "We can automatically expand environment variables in the config entries this option is on by default, you can turn it on/off at any time)", ""); @@ -329,7 +332,7 @@ time)", ""); DocDeclStr( - void , SetRecordDefaults(bool doIt = True), + void , SetRecordDefaults(bool doIt = true), "Set whether the config objec should record default values.", ""); DocDeclStr( @@ -368,6 +371,17 @@ time)", ""); long , GetStyle() const, "", ""); + %property(AppName, GetAppName, SetAppName, doc="See `GetAppName` and `SetAppName`"); + %property(EntryType, GetEntryType, doc="See `GetEntryType`"); + %property(FirstEntry, GetFirstEntry, doc="See `GetFirstEntry`"); + %property(FirstGroup, GetFirstGroup, doc="See `GetFirstGroup`"); + %property(NextEntry, GetNextEntry, doc="See `GetNextEntry`"); + %property(NextGroup, GetNextGroup, doc="See `GetNextGroup`"); + %property(NumberOfEntries, GetNumberOfEntries, doc="See `GetNumberOfEntries`"); + %property(NumberOfGroups, GetNumberOfGroups, doc="See `GetNumberOfGroups`"); + %property(Path, GetPath, SetPath, doc="See `GetPath` and `SetPath`"); + %property(Style, GetStyle, SetStyle, doc="See `GetStyle` and `SetStyle`"); + %property(VendorName, GetVendorName, SetVendorName, doc="See `GetVendorName` and `SetVendorName`"); };