Filter localizable strings.

Only user facing strings.
This commit is contained in:
SET
2022-10-15 18:54:17 +02:00
parent 1061b744c2
commit f7e210a356
14 changed files with 68 additions and 68 deletions

View File

@@ -79,7 +79,7 @@ void LBoundGrid::ClearGrid()
void LBoundGrid::FillGrid() void LBoundGrid::FillGrid()
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
wxASSERT_MSG(m_rs->GetConnection() != NULL, _T("GetConnection() = NULL.")); wxASSERT_MSG(m_rs->GetConnection() != NULL, _T("GetConnection() = NULL."));
wxGridUpdateLocker locker(this); wxGridUpdateLocker locker(this);
// Starting again, the grid's resultset must free itself from any registered controls. // Starting again, the grid's resultset must free itself from any registered controls.
@@ -138,9 +138,9 @@ void LBoundGrid::CreateCheckBoxColumn(const wxString& newColName,
bool isDualstate, bool isDualstate,
wxString newNullLabel) wxString newNullLabel)
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
const int col = m_rs->GetColumnIndex(newColName); const int col = m_rs->GetColumnIndex(newColName);
wxASSERT_MSG(col > -1, _("Invalid column name : ") + newColName); wxASSERT_MSG(col > -1, _T("Invalid column name : ") + newColName);
wxGridCellAttr * colAtt = m_stringTable->GetAttr(GetGridCursorRow(), col, wxGridCellAttr::Col); wxGridCellAttr * colAtt = m_stringTable->GetAttr(GetGridCursorRow(), col, wxGridCellAttr::Col);
if (colAtt == NULL) colAtt = new wxGridCellAttr(); if (colAtt == NULL) colAtt = new wxGridCellAttr();
LGridCheckEditor * ed = new LGridCheckEditor(newColName, isDualstate, newNullLabel); LGridCheckEditor * ed = new LGridCheckEditor(newColName, isDualstate, newNullLabel);
@@ -158,9 +158,9 @@ void LBoundGrid::CreateComboBoxColumn(const wxString& newColName,
unsigned int width, unsigned int width,
bool readOnly) bool readOnly)
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
const int col = m_rs->GetColumnIndex(newColName); const int col = m_rs->GetColumnIndex(newColName);
wxASSERT_MSG(col > -1, _("Invalid column name : ") + newColName); wxASSERT_MSG(col > -1, _T("Invalid column name : ") + newColName);
wxGridCellAttr * colAtt = m_stringTable->GetAttr(GetGridCursorRow(), col, wxGridCellAttr::Col); wxGridCellAttr * colAtt = m_stringTable->GetAttr(GetGridCursorRow(), col, wxGridCellAttr::Col);
if (colAtt == NULL) colAtt = new wxGridCellAttr(); if (colAtt == NULL) colAtt = new wxGridCellAttr();
LGridComboEditor * ed = new LGridComboEditor(newColName); LGridComboEditor * ed = new LGridComboEditor(newColName);
@@ -178,9 +178,9 @@ void LBoundGrid::CreateDateColumn(const wxString& newColName,
unsigned int width, unsigned int width,
bool readOnly) bool readOnly)
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
const int col = m_rs->GetColumnIndex(newColName); const int col = m_rs->GetColumnIndex(newColName);
wxASSERT_MSG(col > -1, _("Invalid column name : ") + newColName); wxASSERT_MSG(col > -1, _T("Invalid column name : ") + newColName);
wxGridCellAttr * colAtt = m_stringTable->GetAttr(GetGridCursorRow(), col, wxGridCellAttr::Col); wxGridCellAttr * colAtt = m_stringTable->GetAttr(GetGridCursorRow(), col, wxGridCellAttr::Col);
if (colAtt == NULL) colAtt = new wxGridCellAttr(); if (colAtt == NULL) colAtt = new wxGridCellAttr();
LGridDateEditor * ed = new LGridDateEditor(newColName); LGridDateEditor * ed = new LGridDateEditor(newColName);
@@ -200,9 +200,9 @@ void LBoundGrid::CreateTextColumn(const wxString& newColName,
bool newMultiline, bool newMultiline,
bool readOnly) bool readOnly)
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
const int col = m_rs->GetColumnIndex(newColName); const int col = m_rs->GetColumnIndex(newColName);
wxASSERT_MSG(col > -1, _("Invalid column name : ") + newColName); wxASSERT_MSG(col > -1, _T("Invalid column name : ") + newColName);
wxGridCellAttr * colAtt = m_stringTable->GetAttr(GetGridCursorRow(), col, wxGridCellAttr::Col); wxGridCellAttr * colAtt = m_stringTable->GetAttr(GetGridCursorRow(), col, wxGridCellAttr::Col);
if (colAtt == NULL) colAtt = new wxGridCellAttr(); if (colAtt == NULL) colAtt = new wxGridCellAttr();
LGridTextEditor * ed = new LGridTextEditor(newColName, newMultiline); LGridTextEditor * ed = new LGridTextEditor(newColName, newMultiline);
@@ -223,9 +223,9 @@ void LBoundGrid::CreateSpinColumn(const wxString& newColName,
int newInitial, int newInitial,
bool readOnly) bool readOnly)
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
const int col = m_rs->GetColumnIndex(newColName); const int col = m_rs->GetColumnIndex(newColName);
wxASSERT_MSG(col > -1, _("Invalid column name : ") + newColName); wxASSERT_MSG(col > -1, _T("Invalid column name : ") + newColName);
wxGridCellAttr * colAtt = m_stringTable->GetAttr(GetGridCursorRow(), col, wxGridCellAttr::Col); wxGridCellAttr * colAtt = m_stringTable->GetAttr(GetGridCursorRow(), col, wxGridCellAttr::Col);
if (colAtt == NULL) colAtt = new wxGridCellAttr(); if (colAtt == NULL) colAtt = new wxGridCellAttr();
LGridSpinEditor * ed = new LGridSpinEditor(newColName, newMin, newMax, newInitial); LGridSpinEditor * ed = new LGridSpinEditor(newColName, newMin, newMax, newInitial);
@@ -247,9 +247,9 @@ void LBoundGrid::CreateJsonGridColumn(const wxString& newColName,
wxSize popupSize, wxSize popupSize,
bool readOnly) bool readOnly)
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
const int col = m_rs->GetColumnIndex(newColName); const int col = m_rs->GetColumnIndex(newColName);
wxASSERT_MSG(col > -1, _("Invalid column name : ") + newColName); wxASSERT_MSG(col > -1, _T("Invalid column name : ") + newColName);
wxGridCellAttr * colAtt = m_stringTable->GetAttr(GetGridCursorRow(), col, wxGridCellAttr::Col); wxGridCellAttr * colAtt = m_stringTable->GetAttr(GetGridCursorRow(), col, wxGridCellAttr::Col);
if (colAtt == NULL) colAtt = new wxGridCellAttr(); if (colAtt == NULL) colAtt = new wxGridCellAttr();
LGridJsonCellEditor * ed = new LGridJsonCellEditor(newColName, intentLabel, types, popupSize); LGridJsonCellEditor * ed = new LGridJsonCellEditor(newColName, intentLabel, types, popupSize);
@@ -271,9 +271,9 @@ void LBoundGrid::CreateXmlGridColumn(const wxString& newColName,
wxSize popupSize, wxSize popupSize,
bool readOnly) bool readOnly)
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
const int col = m_rs->GetColumnIndex(newColName); const int col = m_rs->GetColumnIndex(newColName);
wxASSERT_MSG(col > -1, _("Invalid column name : ") + newColName); wxASSERT_MSG(col > -1, _T("Invalid column name : ") + newColName);
wxGridCellAttr * colAtt = m_stringTable->GetAttr(GetGridCursorRow(), col, wxGridCellAttr::Col); wxGridCellAttr * colAtt = m_stringTable->GetAttr(GetGridCursorRow(), col, wxGridCellAttr::Col);
if (colAtt == NULL) colAtt = new wxGridCellAttr(); if (colAtt == NULL) colAtt = new wxGridCellAttr();
LGridXmlCellEditor * ed = new LGridXmlCellEditor(newColName, intentLabel, types, popupSize); LGridXmlCellEditor * ed = new LGridXmlCellEditor(newColName, intentLabel, types, popupSize);
@@ -289,7 +289,7 @@ void LBoundGrid::CreateXmlGridColumn(const wxString& newColName,
const wxString LBoundGrid::GetColName(const unsigned int col) const wxString LBoundGrid::GetColName(const unsigned int col)
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
InitEditor(GetGridCursorRow(), col, false); InitEditor(GetGridCursorRow(), col, false);
LGridColEditor * gce = GetColEditor(GetGridCursorRow(), col); LGridColEditor * gce = GetColEditor(GetGridCursorRow(), col);
if (gce == NULL) return wxEmptyString; if (gce == NULL) return wxEmptyString;
@@ -298,7 +298,7 @@ const wxString LBoundGrid::GetColName(const unsigned int col)
int LBoundGrid::GetColIndex(const wxString& colName) int LBoundGrid::GetColIndex(const wxString& colName)
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
for (unsigned int col = 0; col < GetNumberCols(); col++) for (unsigned int col = 0; col < GetNumberCols(); col++)
{ {
LGridColEditor * gce = GetColEditor(GetGridCursorRow(), col); LGridColEditor * gce = GetColEditor(GetGridCursorRow(), col);
@@ -312,8 +312,8 @@ LBoundControl* LBoundGrid::GetBoundControl(const unsigned int row,
const unsigned int col, const unsigned int col,
bool keepRegistered) bool keepRegistered)
{ {
wxASSERT_MSG(row >= 0 && row < GetNumberRows(), _("Invalid row parameter")); wxASSERT_MSG(row >= 0 && row < GetNumberRows(), _T("Invalid row parameter"));
wxASSERT_MSG(col >= 0 && col < GetNumberCols(), _("Invalid col parameter")); wxASSERT_MSG(col >= 0 && col < GetNumberCols(), _T("Invalid col parameter"));
wxObjectDataPtr<wxGridCellAttr> cellAttr; wxObjectDataPtr<wxGridCellAttr> cellAttr;
cellAttr = m_stringTable->GetAttr(row, col, wxGridCellAttr::Col); cellAttr = m_stringTable->GetAttr(row, col, wxGridCellAttr::Col);
if (cellAttr.get() == NULL) return NULL; if (cellAttr.get() == NULL) return NULL;
@@ -326,7 +326,7 @@ LBoundControl* LBoundGrid::GetBoundControl(const unsigned int row,
if (!gce) return NULL; // APP CAN ADD AN UNBOUND COLUMN if (!gce) return NULL; // APP CAN ADD AN UNBOUND COLUMN
if (!keepRegistered) if (!keepRegistered)
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
m_rs->UnRegisterControl(gce->GetBoundControl()); m_rs->UnRegisterControl(gce->GetBoundControl());
} }
return gce->GetBoundControl(); return gce->GetBoundControl();
@@ -336,8 +336,8 @@ LBoundControl* LBoundGrid::GetBoundControl(const unsigned int row,
const wxString& colName, const wxString& colName,
bool keepRegistered) bool keepRegistered)
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
wxASSERT_MSG(row >= 0 && row < GetNumberRows(), _("Invalid row parameter")); wxASSERT_MSG(row >= 0 && row < GetNumberRows(), _T("Invalid row parameter"));
for (int col = 0; col < GetNumberCols(); col++) for (int col = 0; col < GetNumberCols(); col++)
{ {
LGridColEditor * gce = GetColEditor(row, col); LGridColEditor * gce = GetColEditor(row, col);
@@ -353,8 +353,8 @@ LBoundControl* LBoundGrid::GetBoundControl(const unsigned int row,
LGridColEditor* LBoundGrid::GetColEditor(const unsigned int row, const unsigned int col) const LGridColEditor* LBoundGrid::GetColEditor(const unsigned int row, const unsigned int col) const
{ {
wxASSERT_MSG(row >= 0 && row < GetNumberRows(), _("Invalid row parameter")); wxASSERT_MSG(row >= 0 && row < GetNumberRows(), _T("Invalid row parameter"));
wxASSERT_MSG(col >= 0 && col < GetNumberCols(), _("Invalid col parameter")); wxASSERT_MSG(col >= 0 && col < GetNumberCols(), _T("Invalid col parameter"));
wxObjectDataPtr<wxGridCellAttr> cellAttr; wxObjectDataPtr<wxGridCellAttr> cellAttr;
cellAttr = m_stringTable->GetAttr(row, col, wxGridCellAttr::Col); cellAttr = m_stringTable->GetAttr(row, col, wxGridCellAttr::Col);
if (cellAttr.get() == NULL) return NULL; if (cellAttr.get() == NULL) return NULL;
@@ -366,8 +366,8 @@ LGridColEditor* LBoundGrid::GetColEditor(const unsigned int row, const unsigned
wxControl* LBoundGrid::GetFormEditor(const unsigned int col) const wxControl* LBoundGrid::GetFormEditor(const unsigned int col) const
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
wxASSERT_MSG(col >= 0 && col < GetNumberCols(), _("Invalid col parameter")); wxASSERT_MSG(col >= 0 && col < GetNumberCols(), _T("Invalid col parameter"));
int row = m_rs->GetRow(); int row = m_rs->GetRow();
if (m_rs->IsInserting()) row = m_rs->GetRowCount(); if (m_rs->IsInserting()) row = m_rs->GetRowCount();
LGridColEditor* gce = GetColEditor(row, col); LGridColEditor* gce = GetColEditor(row, col);
@@ -377,7 +377,7 @@ wxControl* LBoundGrid::GetFormEditor(const unsigned int col) const
wxControl* LBoundGrid::GetFormEditor(const wxString& colName) wxControl* LBoundGrid::GetFormEditor(const wxString& colName)
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
int row = m_rs->GetRow(); int row = m_rs->GetRow();
if (m_rs->IsInserting()) row = m_rs->GetRowCount(); if (m_rs->IsInserting()) row = m_rs->GetRowCount();
for (int col = 0; col < GetNumberCols(); col++) for (int col = 0; col < GetNumberCols(); col++)
@@ -394,8 +394,8 @@ bool LBoundGrid::InitEditor(const unsigned int row,
const unsigned int col, const unsigned int col,
bool keepRegistered) bool keepRegistered)
{ {
wxASSERT_MSG(row >= 0 && row < GetNumberRows(), _("Invalid row parameter")); wxASSERT_MSG(row >= 0 && row < GetNumberRows(), _T("Invalid row parameter"));
wxASSERT_MSG(col >= 0 && col < GetNumberCols(), _("Invalid col parameter")); wxASSERT_MSG(col >= 0 && col < GetNumberCols(), _T("Invalid col parameter"));
wxObjectDataPtr<wxGridCellAttr> cellAttr; wxObjectDataPtr<wxGridCellAttr> cellAttr;
cellAttr = m_stringTable->GetAttr(row, col, wxGridCellAttr::Col); cellAttr = m_stringTable->GetAttr(row, col, wxGridCellAttr::Col);
if (cellAttr.get() == NULL) return false; if (cellAttr.get() == NULL) return false;
@@ -407,7 +407,7 @@ bool LBoundGrid::InitEditor(const unsigned int row,
ed->Show(false); ed->Show(false);
if (!keepRegistered) if (!keepRegistered)
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
LGridColEditor* gce = dynamic_cast<LGridColEditor*> (ed.get()); LGridColEditor* gce = dynamic_cast<LGridColEditor*> (ed.get());
if (!gce) return false; if (!gce) return false;
m_rs->UnRegisterControl(gce->GetBoundControl()); m_rs->UnRegisterControl(gce->GetBoundControl());
@@ -417,7 +417,7 @@ bool LBoundGrid::InitEditor(const unsigned int row,
void LBoundGrid::InitAllEditors(const unsigned int row, bool keepRegistered) void LBoundGrid::InitAllEditors(const unsigned int row, bool keepRegistered)
{ {
wxASSERT_MSG(row >= 0 && row < GetNumberRows(), _("Invalid row parameter")); wxASSERT_MSG(row >= 0 && row < GetNumberRows(), _T("Invalid row parameter"));
if (m_stringTable == NULL) return; if (m_stringTable == NULL) return;
if (GetNumberCols() > 0) if (GetNumberCols() > 0)
{ {
@@ -435,14 +435,14 @@ void LBoundGrid::AddMenuSeparator()
void LBoundGrid::AddMenuItem(wxMenuItem* newItem) void LBoundGrid::AddMenuItem(wxMenuItem* newItem)
{ {
wxASSERT_MSG(newItem != NULL, _("Menu item is NULL")); wxASSERT_MSG(newItem != NULL, _T("Menu item is NULL"));
if (m_menu->FindItem(newItem->GetItemLabelText()) != wxNOT_FOUND) return; if (m_menu->FindItem(newItem->GetItemLabelText()) != wxNOT_FOUND) return;
m_menu->Append(newItem); m_menu->Append(newItem);
} }
void LBoundGrid::AddSubMenu(wxMenu* newSubMenu, const wxString& label) void LBoundGrid::AddSubMenu(wxMenu* newSubMenu, const wxString& label)
{ {
wxASSERT_MSG(newSubMenu != NULL, _("Submenu is NULL")); wxASSERT_MSG(newSubMenu != NULL, _T("Submenu is NULL"));
if (m_menu->FindItem(newSubMenu->GetTitle()) != wxNOT_FOUND) return; if (m_menu->FindItem(newSubMenu->GetTitle()) != wxNOT_FOUND) return;
m_menu->AppendSubMenu(newSubMenu, label); m_menu->AppendSubMenu(newSubMenu, label);
} }
@@ -491,7 +491,7 @@ void LBoundGrid::ForceSingleLineRange(wxGridRangeSelectEvent& evt)
void LBoundGrid::CellSelected(wxGridEvent& evt) void LBoundGrid::CellSelected(wxGridEvent& evt)
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
// The insert row is somehow un-natural, it exists in the grid but not in the resultset, we manage it separately. // The insert row is somehow un-natural, it exists in the grid but not in the resultset, we manage it separately.
if (!m_rs->IsInserting()) if (!m_rs->IsInserting())
{ {
@@ -645,7 +645,7 @@ void LBoundGrid::MenuAction(wxCommandEvent& evt)
bool LBoundGrid::InitPKEditor(const int row) bool LBoundGrid::InitPKEditor(const int row)
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
for (int c = 0; c < GetNumberCols(); c++) for (int c = 0; c < GetNumberCols(); c++)
{ {
wxObjectDataPtr<wxGridCellAttr> cellAttr; wxObjectDataPtr<wxGridCellAttr> cellAttr;
@@ -668,7 +668,7 @@ bool LBoundGrid::InitPKEditor(const int row)
void LBoundGrid::ShowFormView() void LBoundGrid::ShowFormView()
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
wxDialog * dlg = new wxDialog(this, wxID_ANY, _("Form view"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxMAXIMIZE_BOX | wxRESIZE_BORDER); wxDialog * dlg = new wxDialog(this, wxID_ANY, _("Form view"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxMAXIMIZE_BOX | wxRESIZE_BORDER);
unsigned int row = m_rs->GetRow(); unsigned int row = m_rs->GetRow();
if (m_rs->IsInserting()) row = m_rs->GetRowCount(); if (m_rs->IsInserting()) row = m_rs->GetRowCount();
@@ -790,7 +790,7 @@ void LBoundGrid::ShowFormView()
void LBoundGrid::RestoreEditorControls() void LBoundGrid::RestoreEditorControls()
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
while (m_rs->GetRegisteredControls().GetCount()) while (m_rs->GetRegisteredControls().GetCount())
{ {
LBoundControl * ctrl = static_cast<LBoundControl*> (m_rs->GetRegisteredControls().Item(0)); LBoundControl * ctrl = static_cast<LBoundControl*> (m_rs->GetRegisteredControls().Item(0));

View File

@@ -50,7 +50,7 @@ void LBoundSpinCtrl::SetData(const wxAny& newData)
bool LBoundSpinCtrl::IsDirty() bool LBoundSpinCtrl::IsDirty()
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
wxAny BEData = m_rs->GetData(m_columnName); wxAny BEData = m_rs->GetData(m_columnName);
if (BEData.IsNull() || BEData.As<wxString>().IsEmpty()) if (BEData.IsNull() || BEData.As<wxString>().IsEmpty())
BEData = m_initialValue; BEData = m_initialValue;

View File

@@ -40,7 +40,7 @@ void LBoundTextCtrl::SetData(const wxAny& newData)
bool LBoundTextCtrl::IsDirty() bool LBoundTextCtrl::IsDirty()
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
wxAny BEData = m_rs->GetData(m_columnName); wxAny BEData = m_rs->GetData(m_columnName);
return (GetValue() != BEData.As<wxString>()); return (GetValue() != BEData.As<wxString>());
} }

View File

@@ -35,7 +35,7 @@ const char* LPQConnection::GetLastLibMessage() const
bool LPQConnection::Connect() bool LPQConnection::Connect()
{ {
wxCHECK_MSG(!m_connInfo.IsEmpty(), false, _("Connection string is undefined")); wxCHECK_MSG(!m_connInfo.IsEmpty(), false, _T("Connection string is undefined"));
if (m_conn != NULL) if (m_conn != NULL)
{ {
if (PQstatus(m_conn) == CONNECTION_OK) return true; if (PQstatus(m_conn) == CONNECTION_OK) return true;
@@ -85,7 +85,7 @@ void LPQConnection::Close()
void* LPQConnection::ExecuteSQL(const wxString& newSql) void* LPQConnection::ExecuteSQL(const wxString& newSql)
{ {
InformBeforeExecute(); InformBeforeExecute();
wxCHECK_MSG(IsValid() == true, NULL, _("Invalid connection")); wxCHECK_MSG(IsValid() == true, NULL, _T("Invalid connection"));
const char* cSQL = newSql.utf8_str(); const char* cSQL = newSql.utf8_str();
PGresult * res = PQexec(m_conn, cSQL); PGresult * res = PQexec(m_conn, cSQL);
if (PQresultStatus(res) != PGRES_TUPLES_OK) if (PQresultStatus(res) != PGRES_TUPLES_OK)
@@ -102,7 +102,7 @@ void* LPQConnection::ExecuteSQL(const wxString& newSql)
bool LPQConnection::ExecuteUpdateSQL(const wxString& newSql) bool LPQConnection::ExecuteUpdateSQL(const wxString& newSql)
{ {
InformBeforeExecute(); InformBeforeExecute();
wxCHECK_MSG(IsValid() == true, false, _("Invalid connection")); wxCHECK_MSG(IsValid() == true, false, _T("Invalid connection"));
const char* cSQL = newSql.utf8_str(); const char* cSQL = newSql.utf8_str();
m_retKeys = PQexec(m_conn, cSQL); m_retKeys = PQexec(m_conn, cSQL);
if ((PQresultStatus(m_retKeys) != PGRES_TUPLES_OK) && (PQresultStatus(m_retKeys) != PGRES_COMMAND_OK)) if ((PQresultStatus(m_retKeys) != PGRES_TUPLES_OK) && (PQresultStatus(m_retKeys) != PGRES_COMMAND_OK))

View File

@@ -23,7 +23,7 @@ namespace PQ
{ {
#define RSPQMC wxString(_T("RSPQM")) #define RSPQMC wxString(_T("RSPQM"))
#define RS000C wxString(_T("RS000")) #define RS000C wxString(_T("RS000"))
#define RS000M wxString(_("Result set is NULL.")) #define RS000M wxString(_T("Result set is NULL."))
#define RS001C wxString(_T("RS001")) #define RS001C wxString(_T("RS001"))
#define RS001M wxString(_("Insert started\nPlease SAVE or CANCEL first")) #define RS001M wxString(_("Insert started\nPlease SAVE or CANCEL first"))
#define RS002C wxString(_T("RS002")) #define RS002C wxString(_T("RS002"))
@@ -31,7 +31,7 @@ namespace PQ
#define RS003C wxString(_T("RS003")) #define RS003C wxString(_T("RS003"))
#define RS003M wxString(_("Data altered\nPlease SAVE or CANCEL first")) #define RS003M wxString(_("Data altered\nPlease SAVE or CANCEL first"))
#define RS004C wxString(_T("RS004")) #define RS004C wxString(_T("RS004"))
#define RS004M wxString(_("Invalid column name :\n")) #define RS004M wxString(_T("Invalid column name :\n"))
/** /**
* Scrollable resultset for the PostgreSQL backend. * Scrollable resultset for the PostgreSQL backend.

View File

@@ -78,7 +78,7 @@ void LSQConnection::Close()
void * LSQConnection::ExecuteSQL(const wxString& newSql) void * LSQConnection::ExecuteSQL(const wxString& newSql)
{ {
wxCHECK_MSG(IsValid() == true, NULL, _("Invalid connection")); wxCHECK_MSG(IsValid() == true, NULL, _T("Invalid connection"));
SQresult * res = new SQresult(); SQresult * res = new SQresult();
const char* cSQL = newSql.c_str(); const char* cSQL = newSql.c_str();
m_errMsg = NULL; m_errMsg = NULL;
@@ -95,7 +95,7 @@ void * LSQConnection::ExecuteSQL(const wxString& newSql)
bool LSQConnection::ExecuteUpdateSQL(const wxString& newSql) bool LSQConnection::ExecuteUpdateSQL(const wxString& newSql)
{ {
wxCHECK_MSG(IsValid() == true, false, _("Invalid connection")); wxCHECK_MSG(IsValid() == true, false, _T("Invalid connection"));
const char* cSQL = newSql.c_str(); const char* cSQL = newSql.c_str();
m_errMsg = NULL; m_errMsg = NULL;
int rc = sqlite3_exec(m_conn, cSQL, NULL, NULL, &m_errMsg); int rc = sqlite3_exec(m_conn, cSQL, NULL, NULL, &m_errMsg);

View File

@@ -22,7 +22,7 @@ namespace SQ
{ {
#define RSSQMC wxString(_T("RSSQM")) #define RSSQMC wxString(_T("RSSQM"))
#define RSSQ000C wxString(_T("RS000")) #define RSSQ000C wxString(_T("RS000"))
#define RSSQ000M wxString(_("Result set is NULL.")) #define RSSQ000M wxString(_T("Result set is NULL."))
#define RSSQ001C wxString(_T("RS001")) #define RSSQ001C wxString(_T("RS001"))
#define RSSQ001M wxString(_("Insert started\nPlease SAVE or CANCEL first")) #define RSSQ001M wxString(_("Insert started\nPlease SAVE or CANCEL first"))
#define RSSQ002C wxString(_T("RS002")) #define RSSQ002C wxString(_T("RS002"))
@@ -30,7 +30,7 @@ namespace SQ
#define RSSQ003C wxString(_T("RS003")) #define RSSQ003C wxString(_T("RS003"))
#define RSSQ003M wxString(_("Data altered\nPlease SAVE or CANCEL first")) #define RSSQ003M wxString(_("Data altered\nPlease SAVE or CANCEL first"))
#define RSSQ004C wxString(_T("RS004")) #define RSSQ004C wxString(_T("RS004"))
#define RSSQ004M wxString(_("Invalid column name :\n")) #define RSSQ004M wxString(_T("Invalid column name :\n"))
/** /**
* Scrollable resultset for the SQLite backend. * Scrollable resultset for the SQLite backend.

View File

@@ -70,13 +70,13 @@ void BaseGridPicker::CreateGrid()
void BaseGridPicker::SetIntentLabel(const wxString& intent) void BaseGridPicker::SetIntentLabel(const wxString& intent)
{ {
m_intentLabel = intent; m_intentLabel = intent;
wxASSERT_MSG(m_stringTable != NULL, _("m_stringTable IS NULL")); wxASSERT_MSG(m_stringTable != NULL, _T("m_stringTable IS NULL"));
m_stringTable->SetColLabelValue(0, m_intentLabel); m_stringTable->SetColLabelValue(0, m_intentLabel);
} }
wxString BaseGridPicker::GetIntent() const wxString BaseGridPicker::GetIntent() const
{ {
wxASSERT_MSG(m_stringTable != NULL, _("m_stringTable IS NULL")); wxASSERT_MSG(m_stringTable != NULL, _T("m_stringTable IS NULL"));
for (uint row = 0; row < m_stringTable->GetRowsCount(); row++) for (uint row = 0; row < m_stringTable->GetRowsCount(); row++)
{ {
if (m_stringTable->GetValue(row, 2) != _T("0") if (m_stringTable->GetValue(row, 2) != _T("0")
@@ -138,7 +138,7 @@ void BaseGridPicker::OnPopupHidden(wxShowEvent& evt)
void BaseGridPicker::PreparePreferredCol() void BaseGridPicker::PreparePreferredCol()
{ {
wxASSERT_MSG(m_stringTable != NULL, _("m_stringTable IS NULL")); wxASSERT_MSG(m_stringTable != NULL, _T("m_stringTable IS NULL"));
wxGridCellAttr * colAtt = m_stringTable->GetAttr(m_grid->GetGridCursorRow(), 2, wxGridCellAttr::Col); wxGridCellAttr * colAtt = m_stringTable->GetAttr(m_grid->GetGridCursorRow(), 2, wxGridCellAttr::Col);
if (colAtt == NULL) colAtt = new wxGridCellAttr(); if (colAtt == NULL) colAtt = new wxGridCellAttr();
wxGridCellBoolEditor * ed = new wxGridCellBoolEditor(); wxGridCellBoolEditor * ed = new wxGridCellBoolEditor();
@@ -151,7 +151,7 @@ void BaseGridPicker::PreparePreferredCol()
void BaseGridPicker::PrepareTypeCol() void BaseGridPicker::PrepareTypeCol()
{ {
wxASSERT_MSG(m_stringTable != NULL, _("m_stringTable IS NULL")); wxASSERT_MSG(m_stringTable != NULL, _T("m_stringTable IS NULL"));
wxGridCellAttr * colAtt = m_stringTable->GetAttr(m_grid->GetGridCursorRow(), 1, wxGridCellAttr::Col); wxGridCellAttr * colAtt = m_stringTable->GetAttr(m_grid->GetGridCursorRow(), 1, wxGridCellAttr::Col);
if (colAtt == NULL) colAtt = new wxGridCellAttr(); if (colAtt == NULL) colAtt = new wxGridCellAttr();
wxGridCellChoiceEditor* ed = new wxGridCellChoiceEditor(m_colTypeChoices); wxGridCellChoiceEditor* ed = new wxGridCellChoiceEditor(m_colTypeChoices);
@@ -161,8 +161,8 @@ void BaseGridPicker::PrepareTypeCol()
void BaseGridPicker::PrepareGrid() void BaseGridPicker::PrepareGrid()
{ {
wxASSERT_MSG(m_grid != NULL, _("m_grid IS NULL")); wxASSERT_MSG(m_grid != NULL, _T("m_grid IS NULL"));
wxASSERT_MSG(m_stringTable != NULL, _("m_stringTable IS NULL")); wxASSERT_MSG(m_stringTable != NULL, _T("m_stringTable IS NULL"));
m_grid->AppendCols(4); m_grid->AppendCols(4);
m_grid->AppendRows(m_nbInsertRows); m_grid->AppendRows(m_nbInsertRows);
PreparePreferredCol(); PreparePreferredCol();

View File

@@ -82,7 +82,7 @@ void JsonGridPickerCtrl::SetValue(const wxString& value)
} }
if (!root.IsArray()) if (!root.IsArray())
{ {
wxASSERT_MSG(root.IsArray(), _("JSON data is not an array")); wxASSERT_MSG(root.IsArray(), _T("JSON data is not an array"));
return; return;
} }
for (uint row = 0; row < root.Size(); row++) for (uint row = 0; row < root.Size(); row++)
@@ -117,7 +117,7 @@ wxString JsonGridPickerCtrl::GetValue()
void JsonGridPickerCtrl::FillGrid() void JsonGridPickerCtrl::FillGrid()
{ {
wxASSERT_MSG(m_grid != NULL, _("m_grid IS NULL")); wxASSERT_MSG(m_grid != NULL, _T("m_grid IS NULL"));
wxJSONReader reader(wxJSONREADER_STRICT); wxJSONReader reader(wxJSONREADER_STRICT);
wxJSONValue root; wxJSONValue root;
uint nbErr = reader.Parse(m_value, &root); uint nbErr = reader.Parse(m_value, &root);
@@ -132,7 +132,7 @@ void JsonGridPickerCtrl::FillGrid()
} }
if (!root.IsArray()) if (!root.IsArray())
{ {
wxASSERT_MSG(root.IsArray(), _("JSON data is not an array")); wxASSERT_MSG(root.IsArray(), _T("JSON data is not an array"));
return; return;
} }
@@ -148,8 +148,8 @@ void JsonGridPickerCtrl::FillGrid()
void JsonGridPickerCtrl::DumpGrid() void JsonGridPickerCtrl::DumpGrid()
{ {
wxASSERT_MSG(m_grid != NULL, _("m_grid IS NULL")); wxASSERT_MSG(m_grid != NULL, _T("m_grid IS NULL"));
wxASSERT_MSG(m_stringTable != NULL, _("m_stringTable IS NULL")); wxASSERT_MSG(m_stringTable != NULL, _T("m_stringTable IS NULL"));
if (!m_editable || !m_stringTable || !m_grid) if (!m_editable || !m_stringTable || !m_grid)
return; return;
wxJSONWriter writer; wxJSONWriter writer;

View File

@@ -37,7 +37,7 @@ wxString JsonHelper::GetIntent(const wxString& jsonData)
} }
if (!root.IsArray()) if (!root.IsArray())
{ {
wxASSERT_MSG(root.IsArray(), _("JSON data is not an array")); wxASSERT_MSG(root.IsArray(), _T("JSON data is not an array"));
return wxEmptyString; return wxEmptyString;
} }
for (uint row = 0; row < root.Size(); row++) for (uint row = 0; row < root.Size(); row++)

View File

@@ -59,7 +59,7 @@ void LBoundJsonGridPicker::SetNull()
bool LBoundJsonGridPicker::IsDirty() bool LBoundJsonGridPicker::IsDirty()
{ {
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
wxAny BEData = m_rs->GetData(m_columnName); wxAny BEData = m_rs->GetData(m_columnName);
const wxString ctrlValue = GetValue(); const wxString ctrlValue = GetValue();
/* /*
@@ -85,7 +85,7 @@ bool LBoundJsonGridPicker::IsDirty()
} }
if (!beRoot.IsArray()) if (!beRoot.IsArray())
{ {
wxASSERT_MSG(beRoot.IsArray(), _("Back end JSON data is not an array")); wxASSERT_MSG(beRoot.IsArray(), _T("Back end JSON data is not an array"));
return true; return true;
} }
@@ -105,7 +105,7 @@ bool LBoundJsonGridPicker::IsDirty()
} }
if (!ctrlRoot.IsArray()) if (!ctrlRoot.IsArray())
{ {
wxASSERT_MSG(ctrlRoot.IsArray(), _("Control JSON data is not an array")); wxASSERT_MSG(ctrlRoot.IsArray(), _T("Control JSON data is not an array"));
return false; return false;
} }

View File

@@ -66,7 +66,7 @@ bool LBoundXmlGridPicker::IsDirty()
* canonical XML, AFAIK. * canonical XML, AFAIK.
* Linking to other libraries for this would be an overkill. * Linking to other libraries for this would be an overkill.
*/ */
wxASSERT_MSG(m_rs != NULL, _("RS = NULL")); wxASSERT_MSG(m_rs != NULL, _T("RS = NULL"));
wxAny BEData = m_rs->GetData(m_columnName); wxAny BEData = m_rs->GetData(m_columnName);
return (GetValue() != BEData.As<wxString>()); return (GetValue() != BEData.As<wxString>());
} }

View File

@@ -53,7 +53,7 @@ const wxString LGridJsonCellRenderer::ProcessJsonValue(const wxString& cellValue
} }
if (!root.IsArray()) if (!root.IsArray())
{ {
wxASSERT_MSG(root.IsArray(), _("JSON data is not an array")); wxASSERT_MSG(root.IsArray(), _T("JSON data is not an array"));
return cellValue; return cellValue;
} }
for (uint row = 0; row < root.Size(); row++) for (uint row = 0; row < root.Size(); row++)

View File

@@ -97,7 +97,7 @@ wxString XmlGridPickerCtrl::GetValue()
void XmlGridPickerCtrl::FillGrid() void XmlGridPickerCtrl::FillGrid()
{ {
wxASSERT_MSG(m_grid != NULL, _("m_grid IS NULL")); wxASSERT_MSG(m_grid != NULL, _T("m_grid IS NULL"));
wxXmlDocument doc; wxXmlDocument doc;
wxXmlNode * root = XmlHelper::ValidateXmlValue(doc, m_value); wxXmlNode * root = XmlHelper::ValidateXmlValue(doc, m_value);
if (root == NULL) if (root == NULL)
@@ -121,8 +121,8 @@ void XmlGridPickerCtrl::FillGrid()
void XmlGridPickerCtrl::DumpGrid() void XmlGridPickerCtrl::DumpGrid()
{ {
wxASSERT_MSG(m_grid != NULL, _("m_grid IS NULL")); wxASSERT_MSG(m_grid != NULL, _T("m_grid IS NULL"));
wxASSERT_MSG(m_stringTable != NULL, _("m_stringTable IS NULL")); wxASSERT_MSG(m_stringTable != NULL, _T("m_stringTable IS NULL"));
if (!m_editable || !m_stringTable || !m_grid) if (!m_editable || !m_stringTable || !m_grid)
return; return;
wxXmlDocument doc; wxXmlDocument doc;