Skip to content

Commit f18b97e

Browse files
committed
Fix build on wxWidgets 3.0
1 parent cd7c7e9 commit f18b97e

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

pgadmin/dlg/dlgMainConfig.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ dlgMainConfig::dlgMainConfig(pgFrame *parent, pgSettingItem *_item) :
107107
txtComment->SetValue(item->newLine->comment);
108108

109109
wxFont fntLabel = stName->GetFont();
110+
#if wxCHECK_VERSION(3, 1, 2)
110111
fntLabel.SetWeight(wxFONTWEIGHT_EXTRABOLD);
112+
#else
113+
fntLabel.SetWeight(wxFONTWEIGHT_BOLD);
114+
#endif
111115
stName->SetFont(fntLabel);
112116
stName->SetLabel(item->name);
113117

pgadmin/frm/frmQuery.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2349,7 +2349,11 @@ void frmQuery::OnExecScript(wxCommandEvent &event)
23492349

23502350
// Clear markers and indicators
23512351
sqlQuery->MarkerDeleteAll(0);
2352+
#if wxCHECK_VERSION(3, 1, 2)
23522353
sqlQuery->StartStyling(0);
2354+
#else
2355+
sqlQuery->StartStyling(0, wxSTC_INDICS_MASK);
2356+
#endif
23532357
sqlQuery->SetStyling(sqlQuery->GetText().Length(), 0);
23542358

23552359
// Menu stuff to initialize
@@ -2504,7 +2508,11 @@ void frmQuery::execQuery(const wxString &query, int resultToRetrieve, bool singl
25042508

25052509
// Clear markers and indicators
25062510
sqlQuery->MarkerDeleteAll(0);
2511+
#if wxCHECK_VERSION(3, 1, 2)
25072512
sqlQuery->StartStyling(0);
2513+
#else
2514+
sqlQuery->StartStyling(0, wxSTC_INDICS_MASK);
2515+
#endif
25082516
sqlQuery->SetStyling(sqlQuery->GetText().Length(), 0);
25092517

25102518
if (!sqlQuery->IsChanged())
@@ -2880,7 +2888,11 @@ void frmQuery::OnQueryComplete(pgQueryResultEvent &ev)
28802888

28812889
// Set an indicator on the error word (break on any kind of bracket, a space or full stop)
28822890
int sPos = errPos + selStart - 1, wEnd = 1;
2891+
#if wxCHECK_VERSION(3, 1, 2)
28832892
sqlQueryExec->StartStyling(0);
2893+
#else
2894+
sqlQueryExec->StartStyling(0, wxSTC_INDICS_MASK);
2895+
#endif
28842896
int c = sqlQueryExec->GetCharAt(sPos + wEnd);
28852897
size_t len = sqlQueryExec->GetText().Length();
28862898
while(c != ' ' && c != '(' && c != '{' && c != '[' && c != '.' &&

0 commit comments

Comments
 (0)