34 m_FileGroupsAndMasksCopy(*fgam),
35 m_pFileGroupsAndMasks(fgam),
36 m_LastListSelection(0)
39 XRCCTRL(*
this,
"wxID_OK",
wxButton)->SetDefault();
56 if (pList->GetCount() != 0)
66 int sel = XRCCTRL(*
this,
"lstCategories",
wxListBox)->GetSelection();
81 int sel = XRCCTRL(*
this,
"lstCategories",
wxListBox)->GetSelection();
83 XRCCTRL(*
this,
"btnEdit",
wxButton)->Enable(sel >= 0);
84 XRCCTRL(*
this,
"btnDelete",
wxButton)->Enable(sel >= 0);
95 pList->Append(groupName);
96 pList->SetSelection(pList->GetCount() - 1);
98 XRCCTRL(*
this,
"txtFileMasks",
wxTextCtrl)->SetFocus();
104 wxString oldName = pList->GetStringSelection();
106 _(
"Edit group"), oldName);
107 if (!groupName.
IsEmpty() && groupName != oldName)
110 pList->SetString(pList->GetSelection(), groupName);
117 wxString name = pList->GetStringSelection();
119 caption.
Printf(
_(
"Are you sure you want to delete the group \"%s\"?"), name.
c_str());
void EndModal(int retCode)
void EndModal(int retCode) override
void OnAdd(wxCommandEvent &event)
FilesGroupsAndMasks m_FileGroupsAndMasksCopy
DLLIMPORT wxString cbGetTextFromUser(const wxString &message, const wxString &caption=cbGetTextFromUserPromptStr, const wxString &default_value=wxEmptyString, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord, bool centre=true)
FilesGroupsAndMasks * m_pFileGroupsAndMasks
void OnDelete(wxCommandEvent &event)
void OnUpdateUI(wxUpdateUIEvent &event)
unsigned int GetGroupsCount() const
Return total number of groups.
void OnListChanged(wxCommandEvent &event)
void OnEdit(wxCommandEvent &event)
wxString GetFileMasks(unsigned int group) const
Return a specific group file mask.
~ProjectsFileMasksDlg() override
void CopyFrom(const FilesGroupsAndMasks &rhs)
copy ctor helper
void SetFileMasks(unsigned int group, const wxString &masks)
Set file mask for a group (e.g.
const wxString & _(const wxString &string)
void RenameGroup(unsigned int group, const wxString &newName)
Rename a group.
void SetDefault(bool do_clear=true)
Set the default file groups and masks.
static wxXmlResource * Get()
wxString GetGroupName(unsigned int group) const
Return a specific group name.
int Printf(const wxString &pszFormat,...)
wxObject * LoadObject(wxWindow *parent, const wxString &name, const wxString &classname)
DLLIMPORT int cbMessageBox(const wxString &message, const wxString &caption=wxEmptyString, int style=wxOK, wxWindow *parent=NULL, int x=-1, int y=-1)
wxMessageBox wrapper.
void DeleteGroup(unsigned int group)
Delete a group.
void OnSetDefault(wxCommandEvent &event)
unsigned int AddGroup(const wxString &name)
Add a file group.