Applied patch [ 796736 ] unicode and various warnings fixes for configtool util
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -152,7 +152,7 @@ wxString ctSettings::GenerateFilename(const wxString& rootName)
|
|||||||
while (wxFileExists(fullFilename))
|
while (wxFileExists(fullFilename))
|
||||||
{
|
{
|
||||||
i ++;
|
i ++;
|
||||||
postfixStr.Printf("%d", i);
|
postfixStr.Printf(_T("%d"), i);
|
||||||
fullFilename = filename + postfixStr + wxT(".wxs");
|
fullFilename = filename + postfixStr + wxT(".wxs");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -273,7 +273,7 @@ bool ctSettings::SaveConfig()
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ctSettings::ShowSettingsDialog(const wxString& page)
|
void ctSettings::ShowSettingsDialog(const wxString& WXUNUSED(page))
|
||||||
{
|
{
|
||||||
ctSettingsDialog* dialog = new ctSettingsDialog(wxGetApp().GetTopWindow());
|
ctSettingsDialog* dialog = new ctSettingsDialog(wxGetApp().GetTopWindow());
|
||||||
// if (!page.IsEmpty())
|
// if (!page.IsEmpty())
|
||||||
|
@@ -261,7 +261,7 @@ void ctConfigItem::InitProperties()
|
|||||||
|
|
||||||
/// Do additional actions to apply the property to the internal
|
/// Do additional actions to apply the property to the internal
|
||||||
/// representation.
|
/// representation.
|
||||||
void ctConfigItem::ApplyProperty(ctProperty* prop, const wxVariant& oldValue)
|
void ctConfigItem::ApplyProperty(ctProperty* prop, const wxVariant& WXUNUSED(oldValue))
|
||||||
{
|
{
|
||||||
ctConfigToolDoc* doc = GetDocument();
|
ctConfigToolDoc* doc = GetDocument();
|
||||||
bool oldModified = doc->IsModified();
|
bool oldModified = doc->IsModified();
|
||||||
|
@@ -137,7 +137,7 @@ void ctConfigItemsSelector::CreateControls()
|
|||||||
* Event handler for ID_CONFIG_ADD
|
* Event handler for ID_CONFIG_ADD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void ctConfigItemsSelector::OnConfigAdd( wxCommandEvent& event )
|
void ctConfigItemsSelector::OnConfigAdd( wxCommandEvent& WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
wxListBox* masterList = wxDynamicCast(FindWindow(ID_AVAILABLE_CONFIG_ITEMS), wxListBox);
|
wxListBox* masterList = wxDynamicCast(FindWindow(ID_AVAILABLE_CONFIG_ITEMS), wxListBox);
|
||||||
wxListBox* listBox = wxDynamicCast(FindWindow(ID_CONFIG_ITEMS), wxListBox);
|
wxListBox* listBox = wxDynamicCast(FindWindow(ID_CONFIG_ITEMS), wxListBox);
|
||||||
@@ -159,7 +159,7 @@ void ctConfigItemsSelector::OnConfigAdd( wxCommandEvent& event )
|
|||||||
* Event handler for ID_CONFIG_REMOVE
|
* Event handler for ID_CONFIG_REMOVE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void ctConfigItemsSelector::OnConfigRemove( wxCommandEvent& event )
|
void ctConfigItemsSelector::OnConfigRemove( wxCommandEvent& WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
wxListBox* listBox = wxDynamicCast(FindWindow(ID_CONFIG_ITEMS), wxListBox);
|
wxListBox* listBox = wxDynamicCast(FindWindow(ID_CONFIG_ITEMS), wxListBox);
|
||||||
if (listBox)
|
if (listBox)
|
||||||
|
@@ -112,7 +112,7 @@ bool ctConfigToolView::OnCreate(wxDocument *doc, long WXUNUSED(flags) )
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ctConfigToolView::OnDraw(wxDC *dc)
|
void ctConfigToolView::OnDraw(wxDC *WXUNUSED(dc))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,7 +190,7 @@ void ctConfigToolView::OnUpdate(wxView *WXUNUSED(sender), wxObject *hintObj)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Clean up windows used for displaying the view.
|
// Clean up windows used for displaying the view.
|
||||||
bool ctConfigToolView::OnClose(bool deleteWindow)
|
bool ctConfigToolView::OnClose(bool WXUNUSED(deleteWindow))
|
||||||
{
|
{
|
||||||
if (!GetDocument()->Close())
|
if (!GetDocument()->Close())
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -387,37 +387,37 @@ ctConfigItem* ctConfigToolView::GetSelection()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Add a checkbox item
|
/// Add a checkbox item
|
||||||
void ctConfigToolView::OnAddCheckBoxItem(wxCommandEvent& event)
|
void ctConfigToolView::OnAddCheckBoxItem(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
AddItem(ctTypeBoolCheck, _("New checkbox item"));
|
AddItem(ctTypeBoolCheck, _("New checkbox item"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Add a radiobutton item
|
/// Add a radiobutton item
|
||||||
void ctConfigToolView::OnAddRadioButtonItem(wxCommandEvent& event)
|
void ctConfigToolView::OnAddRadioButtonItem(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
AddItem(ctTypeBoolRadio, _("New radio button item"));
|
AddItem(ctTypeBoolRadio, _("New radio button item"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Add a group item
|
/// Add a group item
|
||||||
void ctConfigToolView::OnAddGroupItem(wxCommandEvent& event)
|
void ctConfigToolView::OnAddGroupItem(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
AddItem(ctTypeGroup, _("New group item"));
|
AddItem(ctTypeGroup, _("New group item"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Add a group option item
|
/// Add a group option item
|
||||||
void ctConfigToolView::OnAddCheckGroupItem(wxCommandEvent& event)
|
void ctConfigToolView::OnAddCheckGroupItem(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
AddItem(ctTypeCheckGroup, _("New check group item"));
|
AddItem(ctTypeCheckGroup, _("New check group item"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Add a group option item
|
/// Add a group option item
|
||||||
void ctConfigToolView::OnAddRadioGroupItem(wxCommandEvent& event)
|
void ctConfigToolView::OnAddRadioGroupItem(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
AddItem(ctTypeRadioGroup, _("New radio group item"));
|
AddItem(ctTypeRadioGroup, _("New radio group item"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Add a string item
|
/// Add a string item
|
||||||
void ctConfigToolView::OnAddStringItem(wxCommandEvent& event)
|
void ctConfigToolView::OnAddStringItem(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
AddItem(ctTypeString, _("New string item"));
|
AddItem(ctTypeString, _("New string item"));
|
||||||
}
|
}
|
||||||
@@ -456,7 +456,7 @@ void ctConfigToolView::AddItem(ctConfigType type, const wxString& msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Delete an item
|
/// Delete an item
|
||||||
void ctConfigToolView::OnDeleteItem(wxCommandEvent& event)
|
void ctConfigToolView::OnDeleteItem(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
ctConfigItem* sel = GetSelection();
|
ctConfigItem* sel = GetSelection();
|
||||||
if (sel)
|
if (sel)
|
||||||
@@ -472,7 +472,7 @@ void ctConfigToolView::OnDeleteItem(wxCommandEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Rename an item
|
/// Rename an item
|
||||||
void ctConfigToolView::OnRenameItem(wxCommandEvent& event)
|
void ctConfigToolView::OnRenameItem(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
ctConfigItem* sel = GetSelection();
|
ctConfigItem* sel = GetSelection();
|
||||||
if (sel)
|
if (sel)
|
||||||
@@ -491,7 +491,7 @@ void ctConfigToolView::OnRenameItem(wxCommandEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Copy an item to the clipboard
|
/// Copy an item to the clipboard
|
||||||
void ctConfigToolView::OnCopy(wxCommandEvent& event)
|
void ctConfigToolView::OnCopy(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
||||||
ctConfigItem* sel = GetSelection();
|
ctConfigItem* sel = GetSelection();
|
||||||
@@ -502,7 +502,7 @@ void ctConfigToolView::OnCopy(wxCommandEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Copy an item to the clipboard and cut the item
|
/// Copy an item to the clipboard and cut the item
|
||||||
void ctConfigToolView::OnCut(wxCommandEvent& event)
|
void ctConfigToolView::OnCut(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
||||||
ctConfigItem* sel = GetSelection();
|
ctConfigItem* sel = GetSelection();
|
||||||
@@ -517,7 +517,7 @@ void ctConfigToolView::OnCut(wxCommandEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Paste an item from the clipboard to the tree
|
/// Paste an item from the clipboard to the tree
|
||||||
void ctConfigToolView::OnPaste(wxCommandEvent& event)
|
void ctConfigToolView::OnPaste(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
||||||
ctConfigItem* sel = GetSelection();
|
ctConfigItem* sel = GetSelection();
|
||||||
@@ -565,7 +565,7 @@ void ctConfigToolView::OnUpdatePaste(wxUpdateUIEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Copy an item to the clipboard
|
/// Copy an item to the clipboard
|
||||||
void ctConfigToolView::OnContextCopy(wxCommandEvent& event)
|
void ctConfigToolView::OnContextCopy(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
||||||
ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
|
ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
|
||||||
@@ -576,7 +576,7 @@ void ctConfigToolView::OnContextCopy(wxCommandEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Copy an item to the clipboard and cut the item
|
/// Copy an item to the clipboard and cut the item
|
||||||
void ctConfigToolView::OnContextCut(wxCommandEvent& event)
|
void ctConfigToolView::OnContextCut(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
||||||
ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
|
ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
|
||||||
@@ -591,7 +591,7 @@ void ctConfigToolView::OnContextCut(wxCommandEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Paste an item from the clipboard to the tree
|
/// Paste an item from the clipboard to the tree
|
||||||
void ctConfigToolView::OnContextPasteBefore(wxCommandEvent& event)
|
void ctConfigToolView::OnContextPasteBefore(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
||||||
ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
|
ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
|
||||||
@@ -608,7 +608,7 @@ void ctConfigToolView::OnContextPasteBefore(wxCommandEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Paste an item from the clipboard to the tree
|
/// Paste an item from the clipboard to the tree
|
||||||
void ctConfigToolView::OnContextPasteAfter(wxCommandEvent& event)
|
void ctConfigToolView::OnContextPasteAfter(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
||||||
ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
|
ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
|
||||||
@@ -625,7 +625,7 @@ void ctConfigToolView::OnContextPasteAfter(wxCommandEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Paste an item from the clipboard to the tree
|
/// Paste an item from the clipboard to the tree
|
||||||
void ctConfigToolView::OnContextPasteAsChild(wxCommandEvent& event)
|
void ctConfigToolView::OnContextPasteAsChild(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
||||||
ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
|
ctConfigItem* sel = wxGetApp().GetMainFrame()->GetConfigTreeCtrl()->GetContextItem();
|
||||||
@@ -685,7 +685,7 @@ void ctConfigToolView::OnUpdateContextPasteAsChild(wxUpdateUIEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Item help
|
/// Item help
|
||||||
void ctConfigToolView::OnItemHelp(wxCommandEvent& event)
|
void ctConfigToolView::OnItemHelp(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
||||||
if ( doc && GetSelection() )
|
if ( doc && GetSelection() )
|
||||||
@@ -706,7 +706,7 @@ void ctConfigToolView::OnUpdateItemHelp(wxUpdateUIEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Add a custom property
|
/// Add a custom property
|
||||||
void ctConfigToolView::OnAddCustomProperty(wxCommandEvent& event)
|
void ctConfigToolView::OnAddCustomProperty(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
||||||
ctConfigItem* sel = GetSelection();
|
ctConfigItem* sel = GetSelection();
|
||||||
@@ -751,7 +751,7 @@ void ctConfigToolView::OnAddCustomProperty(wxCommandEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Edit a custom property
|
/// Edit a custom property
|
||||||
void ctConfigToolView::OnEditCustomProperty(wxCommandEvent& event)
|
void ctConfigToolView::OnEditCustomProperty(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
||||||
ctConfigItem* sel = GetSelection();
|
ctConfigItem* sel = GetSelection();
|
||||||
@@ -823,7 +823,7 @@ void ctConfigToolView::OnEditCustomProperty(wxCommandEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Delete a custom property
|
/// Delete a custom property
|
||||||
void ctConfigToolView::OnDeleteCustomProperty(wxCommandEvent& event)
|
void ctConfigToolView::OnDeleteCustomProperty(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
||||||
ctConfigItem* sel = GetSelection();
|
ctConfigItem* sel = GetSelection();
|
||||||
@@ -908,7 +908,7 @@ void ctConfigToolView::OnTabSelect(wxNotebookEvent& event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ctConfigToolView::OnSaveSetupFile(wxCommandEvent& event)
|
void ctConfigToolView::OnSaveSetupFile(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
||||||
wxString setupStr = doc->GenerateSetup();
|
wxString setupStr = doc->GenerateSetup();
|
||||||
@@ -940,7 +940,7 @@ void ctConfigToolView::OnSaveSetupFile(wxCommandEvent& event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ctConfigToolView::OnSaveConfigureCommand(wxCommandEvent& event)
|
void ctConfigToolView::OnSaveConfigureCommand(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
||||||
wxString configureStr = doc->GenerateConfigureCommand();
|
wxString configureStr = doc->GenerateConfigureCommand();
|
||||||
@@ -983,7 +983,7 @@ void ctConfigToolView::OnUpdateSaveConfigureCommand(wxUpdateUIEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Find text
|
/// Find text
|
||||||
void ctConfigToolView::OnFind(wxCommandEvent& event)
|
void ctConfigToolView::OnFind(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
ctFindReplaceDialog* dialog = wxGetApp().GetMainFrame()->GetFindDialog();
|
ctFindReplaceDialog* dialog = wxGetApp().GetMainFrame()->GetFindDialog();
|
||||||
if (dialog)
|
if (dialog)
|
||||||
@@ -1015,7 +1015,7 @@ void ctConfigToolView::OnUpdateFind(wxUpdateUIEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Save default file type
|
/// Save default file type
|
||||||
void ctConfigToolView::OnGo(wxCommandEvent& event)
|
void ctConfigToolView::OnGo(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
ctConfigToolDoc* doc = (ctConfigToolDoc*) GetDocument();
|
||||||
wxString path = wxGetApp().GetSettings().m_lastSetupSaveDir;
|
wxString path = wxGetApp().GetSettings().m_lastSetupSaveDir;
|
||||||
|
@@ -92,28 +92,28 @@ void ctConfigTreeCtrl::LoadIcons()
|
|||||||
m_iconTable.SetImageList(m_imageList);
|
m_iconTable.SetImageList(m_imageList);
|
||||||
SetImageList(m_imageList);
|
SetImageList(m_imageList);
|
||||||
|
|
||||||
m_iconTable.AddInfo("Group", wxIcon(closedfolder_xpm), 0, TRUE);
|
m_iconTable.AddInfo(_T("Group"), wxIcon(closedfolder_xpm), 0, TRUE);
|
||||||
m_iconTable.AddInfo("Group", wxIcon(closedfolder_dis_xpm), 0, FALSE);
|
m_iconTable.AddInfo(_T("Group"), wxIcon(closedfolder_dis_xpm), 0, FALSE);
|
||||||
|
|
||||||
m_iconTable.AddInfo("Checkbox", wxIcon(checked_xpm), 0, TRUE);
|
m_iconTable.AddInfo(_T("Checkbox"), wxIcon(checked_xpm), 0, TRUE);
|
||||||
m_iconTable.AddInfo("Checkbox", wxIcon(checked_dis_xpm), 0, FALSE);
|
m_iconTable.AddInfo(_T("Checkbox"), wxIcon(checked_dis_xpm), 0, FALSE);
|
||||||
m_iconTable.AddInfo("Checkbox", wxIcon(unchecked_xpm), 1, TRUE);
|
m_iconTable.AddInfo(_T("Checkbox"), wxIcon(unchecked_xpm), 1, TRUE);
|
||||||
m_iconTable.AddInfo("Checkbox", wxIcon(unchecked_dis_xpm), 1, FALSE);
|
m_iconTable.AddInfo(_T("Checkbox"), wxIcon(unchecked_dis_xpm), 1, FALSE);
|
||||||
|
|
||||||
m_iconTable.AddInfo("CheckGroup", wxIcon(checkedfolder_xpm), 0, TRUE);
|
m_iconTable.AddInfo(_T("CheckGroup"), wxIcon(checkedfolder_xpm), 0, TRUE);
|
||||||
m_iconTable.AddInfo("CheckGroup", wxIcon(checkedfolder_dis_xpm), 0, FALSE);
|
m_iconTable.AddInfo(_T("CheckGroup"), wxIcon(checkedfolder_dis_xpm), 0, FALSE);
|
||||||
m_iconTable.AddInfo("CheckGroup", wxIcon(uncheckedfolder_xpm), 1, TRUE);
|
m_iconTable.AddInfo(_T("CheckGroup"), wxIcon(uncheckedfolder_xpm), 1, TRUE);
|
||||||
m_iconTable.AddInfo("CheckGroup", wxIcon(uncheckedfolder_dis_xpm), 1, FALSE);
|
m_iconTable.AddInfo(_T("CheckGroup"), wxIcon(uncheckedfolder_dis_xpm), 1, FALSE);
|
||||||
|
|
||||||
m_iconTable.AddInfo("RadioGroup", wxIcon(radiofolderon_xpm), 0, TRUE);
|
m_iconTable.AddInfo(_T("RadioGroup"), wxIcon(radiofolderon_xpm), 0, TRUE);
|
||||||
m_iconTable.AddInfo("RadioGroup", wxIcon(radiofolderon_dis_xpm), 0, FALSE);
|
m_iconTable.AddInfo(_T("RadioGroup"), wxIcon(radiofolderon_dis_xpm), 0, FALSE);
|
||||||
m_iconTable.AddInfo("RadioGroup", wxIcon(radiofolderoff_xpm), 1, TRUE);
|
m_iconTable.AddInfo(_T("RadioGroup"), wxIcon(radiofolderoff_xpm), 1, TRUE);
|
||||||
m_iconTable.AddInfo("RadioGroup", wxIcon(radiofolderoff_dis_xpm), 1, FALSE);
|
m_iconTable.AddInfo(_T("RadioGroup"), wxIcon(radiofolderoff_dis_xpm), 1, FALSE);
|
||||||
|
|
||||||
m_iconTable.AddInfo("Radiobutton", wxIcon(radioon_xpm), 0, TRUE);
|
m_iconTable.AddInfo(_T("Radiobutton"), wxIcon(radioon_xpm), 0, TRUE);
|
||||||
m_iconTable.AddInfo("Radiobutton", wxIcon(radioon_dis_xpm), 0, FALSE);
|
m_iconTable.AddInfo(_T("Radiobutton"), wxIcon(radioon_dis_xpm), 0, FALSE);
|
||||||
m_iconTable.AddInfo("Radiobutton", wxIcon(radiooff_xpm), 1, TRUE);
|
m_iconTable.AddInfo(_T("Radiobutton"), wxIcon(radiooff_xpm), 1, TRUE);
|
||||||
m_iconTable.AddInfo("Radiobutton", wxIcon(radiooff_dis_xpm), 1, FALSE);
|
m_iconTable.AddInfo(_T("Radiobutton"), wxIcon(radiooff_dis_xpm), 1, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
ctConfigTreeCtrl::~ctConfigTreeCtrl()
|
ctConfigTreeCtrl::~ctConfigTreeCtrl()
|
||||||
@@ -124,7 +124,7 @@ ctConfigTreeCtrl::~ctConfigTreeCtrl()
|
|||||||
delete m_contextMenu;
|
delete m_contextMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ctConfigTreeCtrl::OnSelChanged(wxTreeEvent& event)
|
void ctConfigTreeCtrl::OnSelChanged(wxTreeEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
ctConfigToolDoc* doc = wxGetApp().GetMainFrame()->GetDocument();
|
ctConfigToolDoc* doc = wxGetApp().GetMainFrame()->GetDocument();
|
||||||
if (doc)
|
if (doc)
|
||||||
|
@@ -200,7 +200,7 @@ void ctCustomPropertyDialog::OnUpdatePropertyChoices( wxUpdateUIEvent& event )
|
|||||||
* Event handler for ID_PROPERTY_CHOICE_ADD
|
* Event handler for ID_PROPERTY_CHOICE_ADD
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void ctCustomPropertyDialog::OnPropertyChoiceAdd( wxCommandEvent& event )
|
void ctCustomPropertyDialog::OnPropertyChoiceAdd( wxCommandEvent& WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
wxChoice* choice = (wxChoice* ) FindWindow(ID_CUSTOMPROPERTYTYPE);
|
wxChoice* choice = (wxChoice* ) FindWindow(ID_CUSTOMPROPERTYTYPE);
|
||||||
if ( choice->GetSelection() > -1 && choice->GetStringSelection() == wxT("choice") )
|
if ( choice->GetSelection() > -1 && choice->GetStringSelection() == wxT("choice") )
|
||||||
@@ -229,9 +229,9 @@ void ctCustomPropertyDialog::OnUpdatePropertyChoiceAdd( wxUpdateUIEvent& event )
|
|||||||
* Event handler for ID_PROPERTY_CHOICE_REMOVE
|
* Event handler for ID_PROPERTY_CHOICE_REMOVE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void ctCustomPropertyDialog::OnPropertyChoiceRemove( wxCommandEvent& event )
|
void ctCustomPropertyDialog::OnPropertyChoiceRemove( wxCommandEvent& WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
wxChoice* choice = (wxChoice* ) FindWindow(ID_CUSTOMPROPERTYEDITORTYPE);
|
/* wxChoice* choice = (wxChoice* ) */ FindWindow(ID_CUSTOMPROPERTYEDITORTYPE);
|
||||||
wxListBox* listBox = (wxListBox* ) FindWindow(ID_PROPERTY_CHOICES);
|
wxListBox* listBox = (wxListBox* ) FindWindow(ID_PROPERTY_CHOICES);
|
||||||
if (listBox->GetSelection() > -1)
|
if (listBox->GetSelection() > -1)
|
||||||
{
|
{
|
||||||
|
@@ -198,7 +198,7 @@ void ctMainFrame::OnCloseWindow(wxCloseEvent& event)
|
|||||||
Destroy();
|
Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ctMainFrame::OnAbout(wxCommandEvent& event)
|
void ctMainFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxString msg = wxGetApp().GetSettings().GetAppName() + wxT(" (c) Julian Smart");
|
wxString msg = wxGetApp().GetSettings().GetAppName() + wxT(" (c) Julian Smart");
|
||||||
wxString caption = wxT("About ") + wxGetApp().GetSettings().GetAppName();
|
wxString caption = wxT("About ") + wxGetApp().GetSettings().GetAppName();
|
||||||
@@ -215,12 +215,12 @@ void ctMainFrame::OnNew(wxCommandEvent& event)
|
|||||||
wxGetApp().GetDocManager()->OnFileNew(event);
|
wxGetApp().GetDocManager()->OnFileNew(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ctMainFrame::OnExit(wxCommandEvent& event)
|
void ctMainFrame::OnExit(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ctMainFrame::OnSettings(wxCommandEvent& event)
|
void ctMainFrame::OnSettings(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxGetApp().GetSettings().ShowSettingsDialog();
|
wxGetApp().GetSettings().ShowSettingsDialog();
|
||||||
}
|
}
|
||||||
@@ -359,7 +359,7 @@ wxMenuBar* ctMainFrame::CreateMenuBar()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Handles the Show Toolbar menu event.
|
/// Handles the Show Toolbar menu event.
|
||||||
void ctMainFrame::OnShowToolbar(wxCommandEvent& event)
|
void ctMainFrame::OnShowToolbar(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxGetApp().GetSettings().m_showToolBar = !wxGetApp().GetSettings().m_showToolBar;
|
wxGetApp().GetSettings().m_showToolBar = !wxGetApp().GetSettings().m_showToolBar;
|
||||||
GetToolBar()->Show(wxGetApp().GetSettings().m_showToolBar);
|
GetToolBar()->Show(wxGetApp().GetSettings().m_showToolBar);
|
||||||
@@ -367,19 +367,19 @@ void ctMainFrame::OnShowToolbar(wxCommandEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Handles the Help Contents menu event.
|
/// Handles the Help Contents menu event.
|
||||||
void ctMainFrame::OnHelp(wxCommandEvent& event)
|
void ctMainFrame::OnHelp(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxGetApp().GetHelpController().DisplayContents();
|
wxGetApp().GetHelpController().DisplayContents();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Handles context help
|
/// Handles context help
|
||||||
void ctMainFrame::OnContextHelp(wxCommandEvent& event)
|
void ctMainFrame::OnContextHelp(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxContextHelp contextHelp;
|
wxContextHelp contextHelp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Handles the Help Contents menu event for the reference manual.
|
/// Handles the Help Contents menu event for the reference manual.
|
||||||
void ctMainFrame::OnReferenceHelp(wxCommandEvent& event)
|
void ctMainFrame::OnReferenceHelp(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxGetApp().GetReferenceHelpController().DisplayContents();
|
wxGetApp().GetReferenceHelpController().DisplayContents();
|
||||||
}
|
}
|
||||||
@@ -467,7 +467,7 @@ void ctOutputWindow::CreateWindows()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Copies the text to the clipboard.
|
/// Copies the text to the clipboard.
|
||||||
void ctOutputWindow::OnCopyToClipboard(wxCommandEvent& event)
|
void ctOutputWindow::OnCopyToClipboard(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
// Try to copy the selection first
|
// Try to copy the selection first
|
||||||
long int selFrom, selTo;
|
long int selFrom, selTo;
|
||||||
@@ -517,7 +517,7 @@ void ctOutputWindow::SetFilename(const wxString& filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Saves the file.
|
/// Saves the file.
|
||||||
void ctOutputWindow::OnSaveText(wxCommandEvent& event)
|
void ctOutputWindow::OnSaveText(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
if (m_codeCtrl->IsModified())
|
if (m_codeCtrl->IsModified())
|
||||||
{
|
{
|
||||||
@@ -535,7 +535,7 @@ void ctOutputWindow::OnUpdateSaveText(wxUpdateUIEvent& event)
|
|||||||
event.Enable(m_doc && m_codeCtrl && m_codeCtrl->IsModified());
|
event.Enable(m_doc && m_codeCtrl && m_codeCtrl->IsModified());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ctOutputWindow::OnRegenerate(wxCommandEvent& event)
|
void ctOutputWindow::OnRegenerate(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
if (m_doc)
|
if (m_doc)
|
||||||
{
|
{
|
||||||
|
@@ -163,7 +163,7 @@ void ctPropertyEditor::ClearEditor()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Handles detailed editing event.
|
/// Handles detailed editing event.
|
||||||
void ctPropertyEditor::OnEditDetails(wxCommandEvent& event)
|
void ctPropertyEditor::OnEditDetails(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxWindow* parentFrame = this;
|
wxWindow* parentFrame = this;
|
||||||
while (parentFrame && !parentFrame->IsKindOf(CLASSINFO(wxFrame)))
|
while (parentFrame && !parentFrame->IsKindOf(CLASSINFO(wxFrame)))
|
||||||
@@ -435,7 +435,7 @@ ctProperty* ctPropertyEditor::FindProperty(int row)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Edit the details of this cell appropriately.
|
/// Edit the details of this cell appropriately.
|
||||||
bool ctPropertyEditor::EditDetails(wxWindow* parent)
|
bool ctPropertyEditor::EditDetails(wxWindow* WXUNUSED(parent))
|
||||||
{
|
{
|
||||||
if (CanEditDetails())
|
if (CanEditDetails())
|
||||||
{
|
{
|
||||||
@@ -572,7 +572,7 @@ void ctPropertyEditor::OnChangeCell(wxGridEvent& event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Double-click to show specialised editor.
|
/// Double-click to show specialised editor.
|
||||||
void ctPropertyEditor::OnDClickCell(wxGridEvent& event)
|
void ctPropertyEditor::OnDClickCell(wxGridEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxWindow* parentFrame = this;
|
wxWindow* parentFrame = this;
|
||||||
while (parentFrame && !parentFrame->IsKindOf(CLASSINFO(wxFrame)))
|
while (parentFrame && !parentFrame->IsKindOf(CLASSINFO(wxFrame)))
|
||||||
|
@@ -136,7 +136,7 @@ void ctSettingsDialog::OnCancel( wxCommandEvent& event )
|
|||||||
* Event handler for wxID_HELP
|
* Event handler for wxID_HELP
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void ctSettingsDialog::OnHelp( wxCommandEvent& event )
|
void ctSettingsDialog::OnHelp( wxCommandEvent& WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
wxNotebook* notebook = (wxNotebook*) FindWindow(ID_NOTEBOOK);
|
wxNotebook* notebook = (wxNotebook*) FindWindow(ID_NOTEBOOK);
|
||||||
|
|
||||||
@@ -376,7 +376,7 @@ void ctLocationSettingsDialog::OnUpdateWxwinHierarchy( wxUpdateUIEvent& event )
|
|||||||
* Event handler for ID_CHOOSE_WXWIN_HIERARCHY
|
* Event handler for ID_CHOOSE_WXWIN_HIERARCHY
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void ctLocationSettingsDialog::OnChooseWxwinHierarchy( wxCommandEvent& event )
|
void ctLocationSettingsDialog::OnChooseWxwinHierarchy( wxCommandEvent& WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
wxTextCtrl* textCtrl = (wxTextCtrl*) FindWindow( ID_WXWIN_HIERARCHY );
|
wxTextCtrl* textCtrl = (wxTextCtrl*) FindWindow( ID_WXWIN_HIERARCHY );
|
||||||
wxASSERT( textCtrl != NULL );
|
wxASSERT( textCtrl != NULL );
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
#include "wx/variant.h"
|
#include "wx/variant.h"
|
||||||
#include "wx/cshelp.h"
|
#include "wx/cshelp.h"
|
||||||
#include "wx/cmdline.h"
|
#include "wx/cmdline.h"
|
||||||
|
#include "wx/imaglist.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
@@ -45,17 +46,17 @@ int apDetermineImageType(const wxString& filename)
|
|||||||
wxSplitPath(filename, & path, & name, & ext);
|
wxSplitPath(filename, & path, & name, & ext);
|
||||||
|
|
||||||
ext.MakeLower();
|
ext.MakeLower();
|
||||||
if (ext == "jpg" || ext == "jpeg")
|
if (ext == _T("jpg") || ext == _T("jpeg"))
|
||||||
return wxBITMAP_TYPE_JPEG;
|
return wxBITMAP_TYPE_JPEG;
|
||||||
else if (ext == "gif")
|
else if (ext == _T("gif"))
|
||||||
return wxBITMAP_TYPE_GIF;
|
return wxBITMAP_TYPE_GIF;
|
||||||
else if (ext == "bmp")
|
else if (ext == _T("bmp"))
|
||||||
return wxBITMAP_TYPE_BMP;
|
return wxBITMAP_TYPE_BMP;
|
||||||
else if (ext == "png")
|
else if (ext == _T("png"))
|
||||||
return wxBITMAP_TYPE_PNG;
|
return wxBITMAP_TYPE_PNG;
|
||||||
else if (ext == "pcx")
|
else if (ext == _T("pcx"))
|
||||||
return wxBITMAP_TYPE_PCX;
|
return wxBITMAP_TYPE_PCX;
|
||||||
else if (ext == "tif" || ext == "tiff")
|
else if (ext == _T("tif") || ext == _T("tiff"))
|
||||||
return wxBITMAP_TYPE_TIF;
|
return wxBITMAP_TYPE_TIF;
|
||||||
else
|
else
|
||||||
return -1;
|
return -1;
|
||||||
@@ -158,7 +159,7 @@ wxFont apStringToFont(const wxString& str)
|
|||||||
int apFindNotebookPage(wxNotebook* notebook, const wxString& name)
|
int apFindNotebookPage(wxNotebook* notebook, const wxString& name)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < notebook->GetPageCount(); i++)
|
for (i = 0; i < (int)notebook->GetPageCount(); i++)
|
||||||
if (name == notebook->GetPageText(i))
|
if (name == notebook->GetPageText(i))
|
||||||
return i;
|
return i;
|
||||||
return -1;
|
return -1;
|
||||||
@@ -175,11 +176,11 @@ void apViewHTMLFile(const wxString& url)
|
|||||||
TCHAR szCmdName[1024];
|
TCHAR szCmdName[1024];
|
||||||
DWORD dwType, dw = sizeof(szCmdName);
|
DWORD dwType, dw = sizeof(szCmdName);
|
||||||
LONG lRes;
|
LONG lRes;
|
||||||
lRes = RegOpenKey(HKEY_CLASSES_ROOT, "htmlfile\\shell\\open\\command", &hKey);
|
lRes = RegOpenKey(HKEY_CLASSES_ROOT, _T("htmlfile\\shell\\open\\command"), &hKey);
|
||||||
if(lRes == ERROR_SUCCESS && RegQueryValueEx(hKey,(LPTSTR)NULL, NULL,
|
if(lRes == ERROR_SUCCESS && RegQueryValueEx(hKey,(LPTSTR)NULL, NULL,
|
||||||
&dwType, (LPBYTE)szCmdName, &dw) == ERROR_SUCCESS)
|
&dwType, (LPBYTE)szCmdName, &dw) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
strcat(szCmdName, (const char*) url);
|
wxStrcat(szCmdName, (const wxChar*) url);
|
||||||
PROCESS_INFORMATION piProcInfo;
|
PROCESS_INFORMATION piProcInfo;
|
||||||
STARTUPINFO siStartInfo;
|
STARTUPINFO siStartInfo;
|
||||||
memset(&siStartInfo, 0, sizeof(STARTUPINFO));
|
memset(&siStartInfo, 0, sizeof(STARTUPINFO));
|
||||||
@@ -312,7 +313,31 @@ wxString apFindAppPath(const wxString& argv0, const wxString& cwd, const wxStrin
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Adds a context-sensitive help button, for non-Windows platforms
|
// Adds a context-sensitive help button, for non-Windows platforms
|
||||||
void apAddContextHelpButton(wxWindow* parent, wxSizer* sizer, int sizerFlags, int sizerBorder)
|
void apAddContextHelpButton(wxWindow*
|
||||||
|
#if defined(__WXGTK__) || defined(__WXMAC__)
|
||||||
|
parent
|
||||||
|
#else
|
||||||
|
WXUNUSED(parent)
|
||||||
|
#endif
|
||||||
|
, wxSizer*
|
||||||
|
#if defined(__WXGTK__) || defined(__WXMAC__)
|
||||||
|
sizer
|
||||||
|
#else
|
||||||
|
WXUNUSED(sizer)
|
||||||
|
#endif
|
||||||
|
, int
|
||||||
|
#if defined(__WXGTK__) || defined(__WXMAC__)
|
||||||
|
sizerFlags
|
||||||
|
#else
|
||||||
|
WXUNUSED(sizerFlags)
|
||||||
|
#endif
|
||||||
|
, int
|
||||||
|
#if defined(__WXGTK__) || defined(__WXMAC__)
|
||||||
|
sizerBorder
|
||||||
|
#else
|
||||||
|
WXUNUSED(sizerBorder)
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
#if defined(__WXGTK__) || defined(__WXMAC__)
|
#if defined(__WXGTK__) || defined(__WXMAC__)
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
@@ -458,7 +483,7 @@ wxOutputStream& operator <<(wxOutputStream& stream, long l)
|
|||||||
return stream << str;
|
return stream << str;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxOutputStream& operator <<(wxOutputStream& stream, const char c)
|
wxOutputStream& operator <<(wxOutputStream& stream, const wxChar c)
|
||||||
{
|
{
|
||||||
wxString str;
|
wxString str;
|
||||||
str.Printf(_T("%c"), c);
|
str.Printf(_T("%c"), c);
|
||||||
|
@@ -93,12 +93,12 @@ bool ctApp::OnInit(void)
|
|||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
// If the development version, go up a directory.
|
// If the development version, go up a directory.
|
||||||
if ((m_appDir.Right(5).CmpNoCase("DEBUG") == 0) ||
|
if ((m_appDir.Right(5).CmpNoCase(_T("DEBUG")) == 0) ||
|
||||||
(m_appDir.Right(11).CmpNoCase("DEBUGSTABLE") == 0) ||
|
(m_appDir.Right(11).CmpNoCase(_T("DEBUGSTABLE")) == 0) ||
|
||||||
(m_appDir.Right(7).CmpNoCase("RELEASE") == 0) ||
|
(m_appDir.Right(7).CmpNoCase(_T("RELEASE")) == 0) ||
|
||||||
(m_appDir.Right(13).CmpNoCase("RELEASESTABLE") == 0) ||
|
(m_appDir.Right(13).CmpNoCase(_T("RELEASESTABLE")) == 0) ||
|
||||||
(m_appDir.Right(10).CmpNoCase("RELEASEDEV") == 0) ||
|
(m_appDir.Right(10).CmpNoCase(_T("RELEASEDEV")) == 0) ||
|
||||||
(m_appDir.Right(8).CmpNoCase("DEBUGDEV") == 0)
|
(m_appDir.Right(8).CmpNoCase(_T("DEBUGDEV")) == 0)
|
||||||
)
|
)
|
||||||
m_appDir = wxPathOnly(m_appDir);
|
m_appDir = wxPathOnly(m_appDir);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user