Skip to content

Commit

Permalink
2019-05-16 11:35 UTC+0300 Alexander Kresin <alex@kresin.ru>
Browse files Browse the repository at this point in the history
  • Loading branch information
alkresin committed May 16, 2019
1 parent 546d960 commit 01692da
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
4 changes: 4 additions & 0 deletions Changelog
@@ -1,4 +1,8 @@

2019-05-16 11:35 UTC+0300 Alexander Kresin <alex@kresin.ru>
* guiserver.prg
* Support for mutiply logical columns in a browse added.

2019-04-26 14:55 UTC+0300 Alexander Kresin <alex@kresin.ru>
* guiserver.prg
* Support for SelectFolder added.
Expand Down
21 changes: 10 additions & 11 deletions source/guiserver.prg
Expand Up @@ -869,7 +869,6 @@ STATIC FUNCTION SetProperty( cWidgName, cPropName, xProp )
ELSE
oWnd:aColumns := {}
hwg_CREATEARLIST( oWnd, xProp )
l := 0
FOR j := 1 TO Len(xProp[1])
IF Valtype(xProp[1,j]) == "C" .AND. (xProp[1,j] == "t" .OR. xProp[1,j] == "f")
l := j
Expand All @@ -879,17 +878,17 @@ STATIC FUNCTION SetProperty( cWidgName, cPropName, xProp )
EXIT
ENDIF
NEXT
ENDIF
NEXT
IF l > 0
IF l > 0
#ifdef __GTK__
o := HBitmap():AddStandard( "gtk-apply" )
o := HBitmap():AddStandard( "gtk-apply" )
#else
o := HBitmap():AddStandard( OBM_CHECK )
o := HBitmap():AddStandard( OBM_CHECK )
#endif
oWnd:aColumns[l]:aBitmaps := { { {|c|c=='t'}, o } }
oWnd:bKeyDown := SetCB1( l )
ENDIF
oWnd:aColumns[l]:aBitmaps := { { {|c|c=='t'}, o } }
oWnd:bKeyDown := SetCB1( l )
ENDIF
ENDIF
NEXT
ENDIF
oWnd:Refresh()
ENDIF
Expand Down Expand Up @@ -1087,8 +1086,8 @@ STATIC FUNCTION SetProperty( cWidgName, cPropName, xProp )

STATIC FUNCTION SetCB1( nCol )
LOCAL block := {|o,key|
IF key == 32
o:aArray[o:nCurrent,nCol] := Iif(o:aArray[o:nCurrent,nCol]=='t','f','t')
IF key == 32 .AND. !Empty( o:aColumns[o:ColPos]:aBitmaps )
o:aArray[o:nCurrent,o:ColPos] := Iif(o:aArray[o:nCurrent,o:ColPos]=='t','f','t')
o:RefreshLine()
ENDIF
RETURN .T.
Expand Down

0 comments on commit 01692da

Please sign in to comment.