From ee8c43310c9e932ddf942b3283c02aa5f04f7590 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Wed, 8 Jun 2011 01:17:31 +0000 Subject: [PATCH] 2011-06-07 18:15 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbide/ideactions.prg * contrib/hbide/idemain.prg ! Reverted: latest changes affecting sub-menu. --- harbour/ChangeLog | 5 +++++ harbour/contrib/hbide/ideactions.prg | 12 ++++++------ harbour/contrib/hbide/idemain.prg | 7 +------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a6138487a1..74320304ed 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2011-06-07 18:15 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbide/ideactions.prg + * contrib/hbide/idemain.prg + ! Reverted: latest changes affecting sub-menu. + 2011-06-08 00:27 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * examples/superlib/superlib.hbp * examples/ps32/ps32.hbp diff --git a/harbour/contrib/hbide/ideactions.prg b/harbour/contrib/hbide/ideactions.prg index e05860a049..4b7b552089 100644 --- a/harbour/contrib/hbide/ideactions.prg +++ b/harbour/contrib/hbide/ideactions.prg @@ -843,7 +843,7 @@ STATIC FUNCTION hbide_buildCDPMenu( oIde, oMenu ) oSubMenu := XbpMenu():new( oMenu, , .t. ):create() FOR EACH cdp IN get_list_of_real_codepages() - oSubMenu:addItem( { cdp[ 1 ] + ":" + cdp[ 2 ], get_cdp_block( oIde, cdp[ 1 ] ) } ) + oSubMenu:addItem( { hb_cdpUniID( cdp ), get_cdp_block( oIde, hb_cdpUniID( cdp ) ) } ) NEXT RETURN oSubMenu @@ -857,9 +857,9 @@ STATIC FUNCTION get_list_of_real_codepages() STATIC s_uni IF empty( s_uni ) - s_uni := {} + s_uni := { => } FOR EACH cdp IN hb_cdpList() - aadd( s_uni, { cdp, hb_cdpUniID( cdp ) } ) + s_uni[ hb_cdpUniID( cdp ) ] := cdp NEXT ENDIF @@ -868,9 +868,9 @@ STATIC FUNCTION get_list_of_real_codepages() FUNCTION hbide_getCDPforID( cCodec ) LOCAL cdp - FOR EACH cdp IN get_list_of_real_codepages() - IF cdp[ 1 ] == cCodec - RETURN cdp[ 2 ] + FOR EACH cdp IN hb_cdpList() + IF hb_cdpUniID( cdp ) == cCodec + RETURN cdp ENDIF NEXT diff --git a/harbour/contrib/hbide/idemain.prg b/harbour/contrib/hbide/idemain.prg index d03d5680a7..7d0e7f10d6 100644 --- a/harbour/contrib/hbide/idemain.prg +++ b/harbour/contrib/hbide/idemain.prg @@ -1593,15 +1593,10 @@ METHOD HbIde:updateTitleBar() /*----------------------------------------------------------------------*/ METHOD HbIde:setCodec( cCodec ) - LOCAL n DEFAULT cCodec TO ::cWrkCodec - IF ( n := at( ":", cCodec ) ) > 0 - cCodec := substr( cCodec, 1, n-1 ) - ENDIF - - ::cWrkCodec := cCodec + ::cWrkCodec := hbide_getCDPforID( cCodec ) ::oDK:setStatusText( SB_PNL_CODEC, ::cWrkCodec + ":" + hb_cdpUniID( ::cWrkCodec ) )