2 this patch was sent upstream using:
4 https://github.com/allentc/pgadmin3-lts/pull/24
6 on: Tue Mar 28 21:05:10 CEST 2023
8 --- pgadmin3-lts-master-20220717/pgadmin/ctl/ctlSQLGrid.cpp.orig 2022-07-17 11:06:47.000000000 +0200
9 +++ pgadmin3-lts-master-20220717/pgadmin/ctl/ctlSQLGrid.cpp 2023-03-25 12:28:12.397362540 +0100
11 SetDefaultCellFont(fntCells);
13 wxFont fntLabel(settings->GetSystemFont());
14 - fntLabel.SetWeight(wxBOLD);
15 + fntLabel.SetWeight(wxFONTWEIGHT_BOLD);
16 SetLabelFont(fntLabel);
17 SetColLabelAlignment(wxALIGN_LEFT, wxALIGN_CENTER);
20 SaveEditControlValue();
23 - SetRowHeight(row, extentWant);
24 + SetRowSize(row, extentWant);
29 extentWant += EXTRAEXTENT_WIDTH;
30 extentWant = wxMax(extentWant, GetColMinimalAcceptableWidth());
31 extentWant = wxMin(extentWant, maxWidth * 3 / 4);
32 - int currentWidth = GetColumnWidth(col);
33 + int currentWidth = GetColSize(col);
35 if (currentWidth >= maxWidth * 3 / 4 || currentWidth == extentWant)
36 extentWant = GetColMinimalAcceptableWidth();
38 HideCellEditControl();
39 SaveEditControlValue();
41 - SetColumnWidth(col, extentWant);
42 + SetRowSize(col, extentWant);
44 colSizes[GetColKeyValue(col)] = extentWant;
46 --- pgadmin3-lts-master-20220717/pgadmin/db/pgSet.cpp.orig 2022-07-17 11:06:47.000000000 +0200
47 +++ pgadmin3-lts-master-20220717/pgadmin/db/pgSet.cpp 2023-03-25 15:43:56.650411006 +0100
49 switch (StrToLong(typoid))
52 - colClasses[col] = PGTYPCLASS_BOOL;
58 case PGOID_TYPE_MONEY:
60 case PGOID_TYPE_NUMERIC:
61 - colClasses[col] = PGTYPCLASS_NUMERIC;
63 case PGOID_TYPE_BYTEA:
67 case PGOID_TYPE_VARCHAR:
68 - colClasses[col] = PGTYPCLASS_STRING;
70 case PGOID_TYPE_TIMESTAMP:
71 case PGOID_TYPE_TIMESTAMPTZ:
73 case PGOID_TYPE_TIMETZ:
74 case PGOID_TYPE_INTERVAL:
75 - colClasses[col] = PGTYPCLASS_DATE;
79 - colClasses[col] = PGTYPCLASS_OTHER;
83 --- pgadmin3-lts-master-20220717/pgadmin/dd/ddmodel/ddGenerationWizard.cpp.orig 2022-07-17 11:06:47.000000000 +0200
84 +++ pgadmin3-lts-master-20220717/pgadmin/dd/ddmodel/ddGenerationWizard.cpp 2023-03-25 16:05:13.535286705 +0100
86 wxString strChoicesAlter[4] = {_("Alter table"), _("Drop, then create"), _("Create table [conflict]"), wxT("No action")};
89 - if(page4->getGrid()->GetRows() > 0)
90 + if(page4->getGrid()->GetNumberRows() > 0)
93 - for(i = page4->getGrid()->GetRows() - 1; i >= 0; i--)
94 + for(i = page4->getGrid()->GetNumberRows() - 1; i >= 0; i--)
96 tables.Add(page4->getGrid()->GetCellValue(i, 0));
97 wxString value = page4->getGrid()->GetCellValue(i, 1);
98 --- pgadmin3-lts-master-20220717/pgadmin/debugger/dlgDirectDbg.cpp.orig 2022-07-17 11:06:47.000000000 +0200
99 +++ pgadmin3-lts-master-20220717/pgadmin/debugger/dlgDirectDbg.cpp 2023-03-25 16:16:31.619757309 +0100
101 grdParams->GetClientSize(&width, &height);
102 for (int i = 0; i < grdParams->GetNumberCols(); i++)
104 - totalWidth += grdParams->GetColumnWidth(i);
105 + totalWidth += grdParams->GetColSize(i);
107 // Total client width - total six column widths - the first (an empty) column
109 - grdParams->SetColumnWidth(COL_DEF_VAL, width - totalWidth - 100);
110 + grdParams->SetColSize(COL_DEF_VAL, width - totalWidth - 100);
114 --- pgadmin3-lts-master-20220717/pgadmin/debugger/frmDebugger.cpp.orig 2022-07-17 11:06:47.000000000 +0200
115 +++ pgadmin3-lts-master-20220717/pgadmin/debugger/frmDebugger.cpp 2023-03-25 16:20:30.715500914 +0100
117 EVT_STC_MARGINCLICK(wxID_ANY, frmDebugger::OnMarginClick)
118 EVT_STC_UPDATEUI(wxID_ANY, frmDebugger::OnPositionStc)
119 EVT_LISTBOX(wxID_ANY, frmDebugger::OnSelectFrame)
120 - EVT_GRID_CELL_CHANGE( frmDebugger::OnVarChange)
121 + EVT_GRID_CELL_CHANGED( frmDebugger::OnVarChange)
123 EVT_MENU(MNU_EXIT, frmDebugger ::OnExit)
124 EVT_MENU(MENU_ID_VIEW_TOOLBAR, frmDebugger::OnToggleToolBar)
125 --- pgadmin3-lts-master-20220717/pgadmin/gqb/gqbViewPanels.cpp.orig 2022-07-17 11:06:47.000000000 +0200
126 +++ pgadmin3-lts-master-20220717/pgadmin/gqb/gqbViewPanels.cpp 2023-03-25 17:59:50.885155563 +0100
128 void gqbColsPopUp::OnPopUpOKClick(wxCommandEvent &event)
130 this->usedGrid->SetCellValue(_row, _col, this->getEditText());
131 - this->MakeModal(false);
133 this->GetParent()->Refresh();
137 this->usedGrid->SetCellValue(_row, _col, _("Set value"));
139 - this->MakeModal(false);
141 this->GetParent()->Refresh();
145 colsPopUp->SetPosition(p);
147 - colsPopUp->MakeModal(true);
149 colsPopUp->setUsedCell(restrictionsGrid, row, col);
151 @@ -1017,7 +1014,7 @@
153 void gqbOrderPanel::OnButtonRemove(wxCommandEvent &)
155 - if(usedColumns->GetRows() > 0)
156 + if(usedColumns->GetNumberRows() > 0)
158 if(selRightTop != -1)
160 @@ -1032,9 +1029,9 @@
162 void gqbOrderPanel::OnButtonRemoveAll(wxCommandEvent &)
164 - if(usedColumns->GetRows() > 0)
165 + if(usedColumns->GetNumberRows() > 0)
167 - for(int i = usedColumns->GetRows() - 1; i >= 0; i--)
168 + for(int i = usedColumns->GetNumberRows() - 1; i >= 0; i--)
170 gqbColumn *col = (gqbColumn *) tableRight->getObjectAt(i, 0);
171 gqbQueryObject *colParent = (gqbQueryObject *) tableRight->getObjectAt(i, 1);
172 @@ -1047,14 +1044,14 @@
174 void gqbOrderPanel::OnButtonAdd(wxCommandEvent &)
176 - if(availableColumns->GetRows() > 0)
177 + if(availableColumns->GetNumberRows() > 0)
181 gqbColumn *col = (gqbColumn *) tableLeft->getObjectAt(selLeft, 0);
182 gqbQueryObject *colParent = (gqbQueryObject *) tableLeft->getObjectAt(selLeft, 1);
183 tableRight->AppendItem(col, colParent, 'A');
184 - usedColumns->SetCellRenderer((usedColumns->GetRows() - 1), 1, new wxGridCellButtonRenderer);
185 + usedColumns->SetCellRenderer((usedColumns->GetNumberRows() - 1), 1, new wxGridCellButtonRenderer);
186 tableLeft->removeRowAt(selLeft);
189 @@ -1063,14 +1060,14 @@
191 void gqbOrderPanel::OnButtonAddAll(wxCommandEvent &)
193 - if(availableColumns->GetRows() > 0)
194 + if(availableColumns->GetNumberRows() > 0)
196 - for(int i = availableColumns->GetRows() - 1; i >= 0; i--)
197 + for(int i = availableColumns->GetNumberRows() - 1; i >= 0; i--)
199 gqbColumn *col = (gqbColumn *) tableLeft->getObjectAt(i, 0);
200 gqbQueryObject *colParent = (gqbQueryObject *) tableLeft->getObjectAt(i, 1);
201 tableRight->AppendItem(col, colParent, 'A');
202 - usedColumns->SetCellRenderer((usedColumns->GetRows() - 1), 1, new wxGridCellButtonRenderer);
203 + usedColumns->SetCellRenderer((usedColumns->GetNumberRows() - 1), 1, new wxGridCellButtonRenderer);
204 tableLeft->removeRowAt(i);
207 @@ -1085,7 +1082,7 @@
209 wxObject *object = ev.GetEventObject();
210 wxGrid *grid = wxDynamicCast( object, wxGrid );
211 - if(grid->GetCols() == 1) // Left Grid
212 + if(grid->GetNumberCols() == 1) // Left Grid
214 selLeft = ev.GetRow();
216 @@ -1402,7 +1399,6 @@
220 - this->MakeModal(false);
222 this->GetParent()->Refresh();
224 @@ -1471,7 +1467,6 @@
228 - this->MakeModal(false);
230 this->GetParent()->Refresh();
232 @@ -1569,7 +1564,6 @@
234 joinsPopUp->SetPosition(p);
236 - joinsPopUp->MakeModal(true);
238 joinsPopUp->setUsedCell(joinsGrid, row, col);
240 --- pgadmin3-1.22.2/pgadmin/frm/frmEditGrid.cpp.orig 2016-01-07 13:47:32.000000000 +0100
241 +++ pgadmin3-1.22.2/pgadmin/frm/frmEditGrid.cpp 2023-03-24 18:47:35.979822880 +0100
242 @@ -1276,7 +1276,7 @@
244 void frmEditGrid::OnGridSelectCells(wxGridRangeSelectEvent &event)
246 - if (sqlGrid->GetEditable())
247 + if (sqlGrid->IsEditable())
249 wxArrayInt rows = sqlGrid->GetSelectedRows();