Applied patch [ 875666 ] Warning free configtool util
ABX git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -101,13 +101,11 @@ bool ctConfigToolDoc::OnCloseDocument()
|
|||||||
// Saves the doc
|
// Saves the doc
|
||||||
bool ctConfigToolDoc::Save()
|
bool ctConfigToolDoc::Save()
|
||||||
{
|
{
|
||||||
bool ret = FALSE;
|
|
||||||
|
|
||||||
if (!IsModified() && m_savedYet) return TRUE;
|
if (!IsModified() && m_savedYet) return TRUE;
|
||||||
if (m_documentFile == wxT("") || !m_savedYet)
|
|
||||||
ret = SaveAs();
|
bool ret = (m_documentFile == wxT("") || !m_savedYet) ?
|
||||||
else
|
SaveAs() :
|
||||||
ret = OnSaveDocument(m_documentFile);
|
OnSaveDocument(m_documentFile);
|
||||||
if ( ret )
|
if ( ret )
|
||||||
SetDocumentSaved(TRUE);
|
SetDocumentSaved(TRUE);
|
||||||
return ret;
|
return ret;
|
||||||
|
@@ -98,7 +98,9 @@ ctMainFrame::ctMainFrame(wxDocManager *manager, wxFrame *parent, wxWindowID id,
|
|||||||
m_editMenu = NULL;
|
m_editMenu = NULL;
|
||||||
m_configurePage = NULL;
|
m_configurePage = NULL;
|
||||||
m_setupPage = NULL;
|
m_setupPage = NULL;
|
||||||
|
#ifdef USE_CONFIG_BROWSER_PAGE
|
||||||
m_configBrowserPage = NULL;
|
m_configBrowserPage = NULL;
|
||||||
|
#endif
|
||||||
m_mainNotebook = NULL;
|
m_mainNotebook = NULL;
|
||||||
m_findDialog = NULL;
|
m_findDialog = NULL;
|
||||||
|
|
||||||
@@ -118,13 +120,13 @@ ctMainFrame::ctMainFrame(wxDocManager *manager, wxFrame *parent, wxWindowID id,
|
|||||||
m_configurePage = new ctOutputWindow(m_mainNotebook, -1, wxDefaultPosition, wxSize(300, 200),
|
m_configurePage = new ctOutputWindow(m_mainNotebook, -1, wxDefaultPosition, wxSize(300, 200),
|
||||||
wxNO_BORDER|wxNO_FULL_REPAINT_ON_RESIZE|wxCLIP_CHILDREN);
|
wxNO_BORDER|wxNO_FULL_REPAINT_ON_RESIZE|wxCLIP_CHILDREN);
|
||||||
|
|
||||||
#if 0
|
#ifdef USE_CONFIG_BROWSER_PAGE
|
||||||
m_configBrowserPage = new ctConfigurationBrowserWindow(m_mainNotebook, -1, wxDefaultPosition, wxSize(300, 200),
|
m_configBrowserPage = new ctConfigurationBrowserWindow(m_mainNotebook, -1, wxDefaultPosition, wxSize(300, 200),
|
||||||
wxNO_BORDER|wxNO_FULL_REPAINT_ON_RESIZE|wxCLIP_CHILDREN);
|
wxNO_BORDER|wxNO_FULL_REPAINT_ON_RESIZE|wxCLIP_CHILDREN);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_mainNotebook->AddPage(m_propertyEditor, _T("Properties"));
|
m_mainNotebook->AddPage(m_propertyEditor, _T("Properties"));
|
||||||
#if 0
|
#ifdef USE_CONFIG_BROWSER_PAGE
|
||||||
m_mainNotebook->AddPage(m_configBrowserPage, _T("Configuration Browser"));
|
m_mainNotebook->AddPage(m_configBrowserPage, _T("Configuration Browser"));
|
||||||
#endif
|
#endif
|
||||||
m_mainNotebook->AddPage(m_setupPage, _T("setup.h"));
|
m_mainNotebook->AddPage(m_setupPage, _T("setup.h"));
|
||||||
|
@@ -19,6 +19,8 @@
|
|||||||
#include "wx/imaglist.h"
|
#include "wx/imaglist.h"
|
||||||
#include "wx/docview.h"
|
#include "wx/docview.h"
|
||||||
|
|
||||||
|
// #define USE_CONFIG_BROWSER_PAGE
|
||||||
|
|
||||||
class WXDLLEXPORT wxHtmlWindow;
|
class WXDLLEXPORT wxHtmlWindow;
|
||||||
class WXDLLEXPORT wxSplitterWindow;
|
class WXDLLEXPORT wxSplitterWindow;
|
||||||
class WXDLLEXPORT wxNotebookEvent;
|
class WXDLLEXPORT wxNotebookEvent;
|
||||||
@@ -27,7 +29,9 @@ class ctConfigTreeCtrl;
|
|||||||
class ctPropertyEditor;
|
class ctPropertyEditor;
|
||||||
class ctOutputWindow;
|
class ctOutputWindow;
|
||||||
class ctFindReplaceDialog;
|
class ctFindReplaceDialog;
|
||||||
|
#ifdef USE_CONFIG_BROWSER_PAGE
|
||||||
class ctConfigurationBrowserWindow;
|
class ctConfigurationBrowserWindow;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief The main window of the application.
|
* \brief The main window of the application.
|
||||||
@@ -156,7 +160,9 @@ protected:
|
|||||||
|
|
||||||
// The control panel for browsing, adding and removing
|
// The control panel for browsing, adding and removing
|
||||||
// configurations.
|
// configurations.
|
||||||
|
#ifdef USE_CONFIG_BROWSER_PAGE
|
||||||
ctConfigurationBrowserWindow* m_configBrowserPage;
|
ctConfigurationBrowserWindow* m_configBrowserPage;
|
||||||
|
#endif
|
||||||
|
|
||||||
ctFindReplaceDialog* m_findDialog;
|
ctFindReplaceDialog* m_findDialog;
|
||||||
};
|
};
|
||||||
|
@@ -77,12 +77,9 @@ wxString apColourToHexString(const wxColour& col)
|
|||||||
// Convert 6-digit hex string to a colour
|
// Convert 6-digit hex string to a colour
|
||||||
wxColour apHexStringToColour(const wxString& hex)
|
wxColour apHexStringToColour(const wxString& hex)
|
||||||
{
|
{
|
||||||
unsigned int r = 0;
|
unsigned int r = wxHexToDec(hex.Mid(0, 2));
|
||||||
unsigned int g = 0;
|
unsigned int g = wxHexToDec(hex.Mid(2, 2));
|
||||||
unsigned int b = 0;
|
unsigned int b = wxHexToDec(hex.Mid(4, 2));
|
||||||
r = wxHexToDec(hex.Mid(0, 2));
|
|
||||||
g = wxHexToDec(hex.Mid(2, 2));
|
|
||||||
b = wxHexToDec(hex.Mid(4, 2));
|
|
||||||
|
|
||||||
return wxColour(r, g, b);
|
return wxColour(r, g, b);
|
||||||
}
|
}
|
||||||
@@ -258,13 +255,10 @@ bool apInvokeAppForFile(const wxString& filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxString cmd;
|
wxString cmd;
|
||||||
bool ok = ft->GetOpenCommand(&cmd,
|
ft->GetOpenCommand(&cmd, wxFileType::MessageParameters(filename, _T("")));
|
||||||
wxFileType::MessageParameters(filename, _T("")));
|
|
||||||
delete ft;
|
delete ft;
|
||||||
|
|
||||||
ok = (wxExecute(cmd, FALSE) != 0);
|
return (wxExecute(cmd, FALSE) != 0);
|
||||||
|
|
||||||
return ok;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find the absolute path where this application has been run from.
|
// Find the absolute path where this application has been run from.
|
||||||
@@ -521,11 +515,10 @@ bool ctMatchString(const wxString& matchAgainst, const wxString& matchText, bool
|
|||||||
|
|
||||||
wxString left(matchAgainst);
|
wxString left(matchAgainst);
|
||||||
bool success = FALSE;
|
bool success = FALSE;
|
||||||
int pos = 0;
|
|
||||||
int matchTextLen = (int) matchText.Length();
|
int matchTextLen = (int) matchText.Length();
|
||||||
while (!success && !matchAgainst.IsEmpty())
|
while (!success && !matchAgainst.IsEmpty())
|
||||||
{
|
{
|
||||||
pos = left.Find(matchText);
|
int pos = left.Find(matchText);
|
||||||
if (pos == -1)
|
if (pos == -1)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user