2010-07-26 14:57 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbxbp/xbpmenubar.prg
    % Fixed: a nasty bug.
This commit is contained in:
Pritpal Bedi
2010-07-26 21:56:58 +00:00
parent 3c065a8c00
commit 68997e7ec6
2 changed files with 12 additions and 8 deletions

View File

@@ -16,6 +16,10 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-07-26 14:57 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbxbp/xbpmenubar.prg
% Fixed: a nasty bug.
2010-07-26 23:17 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* config/postinst.hbs
! Typo fixed.

View File

@@ -535,22 +535,22 @@ METHOD xbpMenuBar:selectItem( nItemIndex )
METHOD xbpMenuBar:execSlot( cSlot, p )
LOCAL nIndex
IF cSlot == "triggered(bool)"
if ( nIndex := ascan( ::aMenuItems, {|e_| e_[ 2 ] == p } ) ) > 0
IF ! empty( p ) .AND. ( nIndex := ascan( ::aMenuItems, {|e_| iif( hb_isNumeric( e_[ 2 ] ), e_[ 2 ] == p, .f. ) } ) ) > 0
IF cSlot == "triggered(bool)"
IF hb_isBlock( ::aMenuItems[ nIndex,4 ] )
eval( ::aMenuItems[ nIndex,4 ] )
ELSE
::itemSelected( nIndex )
ENDIF
ENDIF
ELSEIF cSlot == "hovered()"
IF !empty( p )
IF ( nIndex := ascan( ::aMenuItems, {|e_| iif( hb_isNumeric( e_[ 2 ] ), e_[ 2 ] == p, .f. ) } ) ) > 0
ENDIF
ELSEIF cSlot == "hovered()"
IF !empty( p )
::itemMarked( nIndex )
ENDIF
ENDIF
ENDIF
RETURN nil