tCList column widths set properly 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 b014ac766babb289830fde877102431d1a517488
(DIR) parent 33aa3c702c9ba3c42f18d2263d5e63e227028c13
(HTM) Author: Ben Webb <ben@salilab.org>
Date: Sun, 13 May 2001 22:05:58 +0000
CList column widths set properly under Win32
Diffstat:
M ChangeLog | 2 +-
M src/gtkport.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
---
(DIR) diff --git a/ChangeLog b/ChangeLog
t@@ -1,4 +1,4 @@
-cvs
+1.5.0 13-05-2001
- Fixes for spurious tipoffs
- High scores should now be written properly on Win32 systems
- Various minor usability fixes on Win32 systems
(DIR) diff --git a/src/gtkport.c b/src/gtkport.c
t@@ -730,7 +730,6 @@ LRESULT CALLBACK GtkPanedProc(HWND hwnd,UINT msg,UINT wParam,LONG lParam) {
RECT rect;
static RECT GhostRect;
HDC hDC;
- HWND parent;
gint newpos;
GtkPaned *paned;
paned=GTK_PANED(GetWindowLong(hwnd,GWL_USERDATA));
t@@ -1595,7 +1594,7 @@ GtkWidget *gtk_clist_new(gint columns) {
clist->ncols=columns;
clist->cols=g_new0(GtkCListColumn,columns);
for (i=0;i<columns;i++) {
- clist->cols[i].width=50;
+ clist->cols[i].width=0;
clist->cols[i].visible=TRUE;
clist->cols[i].resizeable=TRUE;
}
t@@ -2200,7 +2199,6 @@ void gtk_clist_realize(GtkWidget *widget) {
hdl.pwpos = ℘
SendMessage(header,HDM_LAYOUT,0,(LPARAM)&hdl);
clist->header_size=wp.cy;
-/* g_print("Header %p, size %d\n",header,wp.cy);*/
widget->hWnd = CreateWindowEx(WS_EX_CLIENTEDGE,"LISTBOX","",
WS_CHILD|WS_TABSTOP|LBS_DISABLENOSCROLL|
WS_VSCROLL|
t@@ -2294,10 +2292,10 @@ void gtk_clist_update_all_widths(GtkCList *clist) {
SIZE size;
HWND header;
- for (i=0;i<clist->ncols;i++) clist->cols[i].width=0;
header=clist->header;
if (header) for (i=0;i<clist->ncols;i++) {
- if (GetTextSize(header,clist->cols[i].title,&size)) {
+ if (GetTextSize(header,clist->cols[i].title,&size) &&
+ clist->cols[i].width<size.cx+2*LISTHEADERPACK) {
clist->cols[i].width=size.cx+2*LISTHEADERPACK;
}
}