vim: update to 9.1.0969
[oi-userland.git] / components / database / pgadmin / patches / 02-wxw3.patch
blob357c3ce4e761ec82a7dceaee1b50e9b29873dbd7
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
10 @@ -44,7 +44,7 @@
11 SetDefaultCellFont(fntCells);
12 // Set labels font
13 wxFont fntLabel(settings->GetSystemFont());
14 - fntLabel.SetWeight(wxBOLD);
15 + fntLabel.SetWeight(wxFONTWEIGHT_BOLD);
16 SetLabelFont(fntLabel);
17 SetColLabelAlignment(wxALIGN_LEFT, wxALIGN_CENTER);
18 SetRowLabelSize(50);
19 @@ -327,7 +327,7 @@
20 SaveEditControlValue();
23 - SetRowHeight(row, extentWant);
24 + SetRowSize(row, extentWant);
25 EndBatch();
28 @@ -367,7 +367,7 @@
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();
37 @@ -386,7 +386,7 @@
38 HideCellEditControl();
39 SaveEditControlValue();
41 - SetColumnWidth(col, extentWant);
42 + SetRowSize(col, extentWant);
43 EndBatch();
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
48 @@ -110,8 +110,6 @@
49 switch (StrToLong(typoid))
51 case PGOID_TYPE_BOOL:
52 - colClasses[col] = PGTYPCLASS_BOOL;
53 - break;
54 case PGOID_TYPE_INT8:
55 case PGOID_TYPE_INT2:
56 case PGOID_TYPE_INT4:
57 @@ -124,24 +122,18 @@
58 case PGOID_TYPE_MONEY:
59 case PGOID_TYPE_BIT:
60 case PGOID_TYPE_NUMERIC:
61 - colClasses[col] = PGTYPCLASS_NUMERIC;
62 - break;
63 case PGOID_TYPE_BYTEA:
64 case PGOID_TYPE_CHAR:
65 case PGOID_TYPE_NAME:
66 case PGOID_TYPE_TEXT:
67 case PGOID_TYPE_VARCHAR:
68 - colClasses[col] = PGTYPCLASS_STRING;
69 - break;
70 case PGOID_TYPE_TIMESTAMP:
71 case PGOID_TYPE_TIMESTAMPTZ:
72 case PGOID_TYPE_TIME:
73 case PGOID_TYPE_TIMETZ:
74 case PGOID_TYPE_INTERVAL:
75 - colClasses[col] = PGTYPCLASS_DATE;
76 - break;
78 default:
79 - colClasses[col] = PGTYPCLASS_OTHER;
80 break;
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
85 @@ -100,10 +100,10 @@
86 wxString strChoicesAlter[4] = {_("Alter table"), _("Drop, then create"), _("Create table [conflict]"), wxT("No action")};
87 wxArrayString tables;
88 wxArrayInt options;
89 - if(page4->getGrid()->GetRows() > 0)
90 + if(page4->getGrid()->GetNumberRows() > 0)
92 int i;
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
100 @@ -95,11 +95,11 @@
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
108 // width
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
116 @@ -49,7 +49,7 @@
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
127 @@ -532,7 +532,6 @@
128 void gqbColsPopUp::OnPopUpOKClick(wxCommandEvent &event)
130 this->usedGrid->SetCellValue(_row, _col, this->getEditText());
131 - this->MakeModal(false);
132 this->Hide();
133 this->GetParent()->Refresh();
135 @@ -551,7 +550,6 @@
137 this->usedGrid->SetCellValue(_row, _col, _("Set value"));
139 - this->MakeModal(false);
140 this->Hide();
141 this->GetParent()->Refresh();
143 @@ -670,7 +668,6 @@
144 p.y += p2.y + 40;
145 colsPopUp->SetPosition(p);
146 colsPopUp->Show();
147 - colsPopUp->MakeModal(true);
148 colsPopUp->focus();
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)
179 if(selLeft != -1)
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 @@
217 updateJoin();
220 - this->MakeModal(false);
221 this->Hide();
222 this->GetParent()->Refresh();
223 this->join = NULL;
224 @@ -1471,7 +1467,6 @@
226 updateJoin();
228 - this->MakeModal(false);
229 this->Hide();
230 this->GetParent()->Refresh();
231 this->join = NULL;
232 @@ -1569,7 +1564,6 @@
233 p.y += p2.y + 40;
234 joinsPopUp->SetPosition(p);
235 joinsPopUp->Show();
236 - joinsPopUp->MakeModal(true);
237 joinsPopUp->focus();
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();