47 : m_IgnoreTextEvents(false)
51 XRCCTRL(*
this,
"wxID_OK",
wxButton)->SetDefault();
60 list = XRCCTRL(*
this,
"lstTrustedScripts",
wxListCtrl);
81 for (
size_t i = 0; i < keys.
GetCount(); ++i)
85 if (mgr->
Read(
_T(
"/startup_scripts/") + keys[i], &ser))
108 XRCCTRL(*
this,
"btnDelete",
wxButton)->Enable(en);
109 XRCCTRL(*
this,
"chkEnableScript",
wxCheckBox)->Enable(en);
122 ScriptingManager::TrustedScripts::const_iterator it;
123 for (it = trusts.begin(); it != trusts.end(); ++it)
152 XRCCTRL(*
this,
"btnDeleteTrust",
wxButton)->Enable(en);
153 XRCCTRL(*
this,
"btnValidateTrusts",
wxButton)->Enable(en);
163 ScriptsVector::iterator it;
178 mgr->
Write(
_T(
"CreateFile"), XRCCTRL(*
this,
"chkTouch",
wxCheckBox)->GetValue());
210 se.
menu = XRCCTRL(*
this,
"txtScriptMenu",
wxTextCtrl)->GetValue();
225 long sel =
event.GetIndex();
236 long sel =
event.GetIndex();
317 _(
"Select script file"),
318 XRCCTRL(*
this,
"txtScript",
wxTextCtrl)->GetValue(),
319 XRCCTRL(*
this,
"txtScript",
wxTextCtrl)->GetValue(),
321 wxFD_OPEN | compatibility::wxHideReadonly );
365 if (!
Manager::Get()->GetScriptingManager()->IsScriptTrusted(script))
void EndModal(int retCode)
static wxString GetFolder(SearchDirs dir)
Access one of Code::Blocks' folders.
void SerializeIn(const wxString &s)
ConfigManager * GetConfigManager(const wxString &name_space) const
static Manager * Get()
Use Manager::Get() to get a pointer to its instance Manager::Get() is guaranteed to never return an i...
long GetNextItem(long item, int geometry=wxLIST_NEXT_ALL, int state=wxLIST_STATE_DONTCARE) const
void OnScriptChanged(wxCommandEvent &event)
void OnListDeselection(wxListEvent &event)
Scripts folder in base dir.
void OnAddScript(wxCommandEvent &event)
bool ReadBool(const wxString &name, bool defaultVal=false)
Scripts folder in user's dir.
const TrustedScripts & GetTrustedScripts()
Access the script trusts container (const).
#define wxLIST_STATE_SELECTED
void OnValidateTrusts(wxCommandEvent &event)
#define wxICON_INFORMATION
std::map< wxString, TrustedScriptProps > TrustedScripts
Script trusts container struct.
void OnBrowse(wxCommandEvent &event)
void OnTrustSelection(wxListEvent &event)
bool SetItemState(long item, long state, long stateMask)
bool MakeRelativeTo(const wxString &pathBase=wxEmptyString, wxPathFormat format=wxPATH_NATIVE)
long InsertItem(wxListItem &info)
void Write(const wxString &name, const wxString &value, bool ignoreEmpty=false)
DLLIMPORT wxString UnixFilename(const wxString &filename, wxPathFormat format=wxPATH_NATIVE)
void OnListSelection(wxListEvent &event)
wxString Read(const wxString &key, const wxString &defaultVal=wxEmptyString)
wxString GetItemText(long item, int col=0) const
virtual wxString GetPath() const
void OnRemoveScript(wxCommandEvent &event)
const wxString & _(const wxString &string)
bool DeleteItem(long item)
DLLIMPORT wxString GetFilterString(const wxString &ext=wxEmptyString)
Generates and returns the filter string for use in file dialogs.
void DeleteSubPath(const wxString &strPath)
DLLIMPORT void PlaceWindow(wxTopLevelWindow *w, cbPlaceDialogMode mode=pdlBest, bool enforce=false)
void OnDeleteTrust(wxCommandEvent &event)
long InsertColumn(long col, const wxListItem &info)
Script trusts container struct.
void EndModal(int retCode)
bool StartsWith(const wxString &prefix, wxString *rest=NULL) const
bool SetItem(wxListItem &info)
bool RemoveTrust(const wxString &script)
Remove a script trust.
wxString SerializeOut() const
static wxXmlResource * Get()
ScriptingManager * GetScriptingManager() const
wxString GetFullPath(wxPathFormat format=wxPATH_NATIVE) const
wxArrayString EnumerateKeys(const wxString &path)
ScriptsVector m_ScriptsVector
void OnEnable(wxCommandEvent &event)
static wxString Format(const wxString &format,...)
wxObject * LoadObject(wxWindow *parent, const wxString &name, const wxString &classname)
void OnRegister(wxCommandEvent &event)
DLLIMPORT int cbMessageBox(const wxString &message, const wxString &caption=wxEmptyString, int style=wxOK, wxWindow *parent=NULL, int x=-1, int y=-1)
wxMessageBox wrapper.
#define wxLIST_STATE_FOCUSED