tFix bug introduced by the previous commit; auto-sizing GtkCList columns which are filled with data before realization now work again under Win32. - vaccinewars - be a doctor and try to vaccinate the world
(HTM) git clone git://src.adamsgaard.dk/vaccinewars
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 735b2bb32d3ab493d1c802717a6b94aea606084f
(DIR) parent 4323ff1587a674f386772595ab5a536a0f5cedbc
(HTM) Author: Ben Webb <ben@salilab.org>
Date: Sun, 29 Sep 2002 19:14:55 +0000
Fix bug introduced by the previous commit; auto-sizing GtkCList columns
which are filled with data before realization now work again under Win32.
Diffstat:
M src/gtkport/clist.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/src/gtkport/clist.c b/src/gtkport/clist.c
t@@ -274,15 +274,18 @@ void gtk_clist_realize(GtkWidget *widget)
GWL_WNDPROC, (LONG)ListWndProc);
gtk_set_default_font(widget->hWnd);
- gtk_clist_update_all_widths(clist);
for (rows = clist->rowdata; rows; rows = g_slist_next(rows)) {
row = (GtkCListRow *)rows->data;
if (row) {
mySendMessage(widget->hWnd, LB_ADDSTRING, 0, 1);
}
}
+ gtk_clist_update_all_widths(clist);
for (i = 0; i < clist->cols; i++) {
+ if (clist->coldata[i].auto_resize) {
+ clist->coldata[i].width = clist->coldata[i].optimal_width;
+ }
hdi.mask = HDI_TEXT | HDI_FORMAT | HDI_WIDTH;
hdi.pszText = clist->coldata[i].title;
if (hdi.pszText) {