diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a0626555ea..826c48da13 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2011-05-01 12:06 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * src/rtl/tmenusys.prg + * src/rtl/tmenuitm.prg + ! accept extended popupmenu + 2011-05-01 09:38 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbpgsql/tests/simple.prg ! typo diff --git a/harbour/src/rtl/tmenuitm.prg b/harbour/src/rtl/tmenuitm.prg index 7765688e33..8c8d7572eb 100644 --- a/harbour/src/rtl/tmenuitm.prg +++ b/harbour/src/rtl/tmenuitm.prg @@ -124,7 +124,7 @@ METHOD data( boData ) CLASS MENUITEM IF ISBLOCK( boData ) ::boData := boData ELSE - ::boData := __eInstVar53( Self, "DATA", boData, "O", 1001, {|| boData:ClassName() == "POPUPMENU" } ) + ::boData := __eInstVar53( Self, "DATA", boData, "O", 1001, {|| boData:ClassName() $ "POPUPMENU|HB_POPUPMENU" } ) ENDIF ENDIF @@ -171,7 +171,7 @@ METHOD style( cStyle ) CLASS MENUITEM RETURN ::cStyle METHOD isPopUp() CLASS MENUITEM - RETURN ISOBJECT( ::data ) .AND. ::data:ClassName() == "POPUPMENU" + RETURN ISOBJECT( ::data ) .AND. ::data:ClassName() $ "POPUPMENU|HB_POPUPMENU" METHOD New( cCaption, boData, nShortcut, cMessage, nID ) CLASS MENUITEM diff --git a/harbour/src/rtl/tmenusys.prg b/harbour/src/rtl/tmenusys.prg index b9a4e46ace..34ba2c6d3f 100644 --- a/harbour/src/rtl/tmenusys.prg +++ b/harbour/src/rtl/tmenusys.prg @@ -321,7 +321,7 @@ METHOD Modal( nSelection, nMsgRow, nMsgLeft, nMsgRight, cMsgColor, GetList ) CLA ::ShowMsg( .T. ) ELSE - IF ::oMenu:ClassName() == "POPUPMENU" + IF ::oMenu:ClassName() $ "POPUPMENU|HB_POPUPMENU" ::oMenu:close() ENDIF @@ -337,14 +337,14 @@ METHOD Modal( nSelection, nMsgRow, nMsgLeft, nMsgRight, cMsgColor, GetList ) CLA IF GetList != NIL .AND. HitTest( GetList, MRow(), MCol(), ::GetMsgArray() ) != 0 GetActive():ExitState := GE_MOUSEHIT ReadStats( SNLASTEXIT, GE_MOUSEHIT ) // Reset Get System values - IF ::oMenu:ClassName() == "POPUPMENU" + IF ::oMenu:ClassName() $ "POPUPMENU|HB_POPUPMENU" ::PopMenu() ENDIF nReturn := -1 EXIT ENDIF - IF ::oMenu:ClassName() == "POPUPMENU" + IF ::oMenu:ClassName() $ "POPUPMENU|HB_POPUPMENU" ::PopMenu() ENDIF @@ -417,7 +417,7 @@ METHOD Modal( nSelection, nMsgRow, nMsgLeft, nMsgRight, cMsgColor, GetList ) CLA GetActive():ExitState := GE_SHORTCUT ReadStats( SNNEXTGET, nNewItem ) // Reset Get System values - IF ::oMenu:ClassName() == "POPUPMENU" + IF ::oMenu:ClassName() $ "POPUPMENU|HB_POPUPMENU" ::PopMenu() ENDIF @@ -547,7 +547,7 @@ METHOD Execute() CLASS HBMenuSys // Execute the Data block if selected MenuItem is !IsPopUp: IF ISOBJECT( oNewMenu ) .AND. !oNewMenu:IsPopUp - IF ::oMenu:ClassName() $ "TOPBARMENU|POPUPMENU" + IF ::oMenu:ClassName() $ "TOPBARMENU|POPUPMENU|HB_POPUPMENU" SetPos( ::nOldRow, ::nOldCol ) SetCursor( ::nOldCursor ) Eval( oNewMenu:data, oNewMenu ) @@ -559,7 +559,7 @@ METHOD Execute() CLASS HBMenuSys ::oMenu:select( iif( ::PopMenu(), ::oMenu:current, 0 ) ) // Display newly selected current menu item: - IF ::oMenu:ClassName() == "POPUPMENU" .AND. ; + IF ::oMenu:ClassName() $ "POPUPMENU|HB_POPUPMENU" .AND. ; ::nMenuLevel == 1 .AND. ; !::oMenu:isOpen