2010-01-06 18:57 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbide/ideactions.prg
* contrib/hbide/ideprojmanager.prg
* contrib/hbide/idestylesheets.prg
! Fixed few more artifacts.
! Recent Files and Projects Menu was growing crazy,
was a result of not deleting the menu item in XbpMenu() class.
More attention is required yet.
! Fixed Viktor's reported bug.
* contrib/hbxbp/xbpmenubar.prg
! Fixed a very bad type, copy/paste syndrome.
This commit is contained in:
@@ -17,6 +17,20 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-01-06 18:57 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbide/ideactions.prg
|
||||
* contrib/hbide/ideprojmanager.prg
|
||||
* contrib/hbide/idestylesheets.prg
|
||||
! Fixed few more artifacts.
|
||||
! Recent Files and Projects Menu was growing crazy,
|
||||
was a result of not deleting the menu item in XbpMenu() class.
|
||||
More attention is required yet.
|
||||
|
||||
! Fixed Viktor's reported bug.
|
||||
|
||||
* contrib/hbxbp/xbpmenubar.prg
|
||||
! Fixed a very bad type, copy/paste syndrome.
|
||||
|
||||
2010-01-06 17:53 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbide/ideprojmanager.prg
|
||||
! Small fix to prev.
|
||||
|
||||
@@ -353,7 +353,7 @@ METHOD IdeActions:buildMainMenu()
|
||||
|
||||
oSubMenu2 := XbpMenu():new( oSubMenu ):create()
|
||||
oSubMenu2:itemSelected := {| nIndex, cFile | cFile := oIde:aIni[ INI_RECENTPROJECTS, nIndex ], ;
|
||||
oIde:loadProjectProperties( cFile, .F., .F., .T. ) }
|
||||
::oPM:loadProperties( cFile, .F., .F., .T. ) }
|
||||
lEmpty := .T.
|
||||
FOR n := 1 TO Len( oIde:aIni[ INI_RECENTPROJECTS ] )
|
||||
f := hbide_pathNormalized( oIde:aIni[ INI_RECENTPROJECTS, n ], .F. )
|
||||
@@ -636,30 +636,21 @@ STATIC FUNCTION mnuNormalizeItem( cCaption )
|
||||
#define QMF_POPUP 1
|
||||
|
||||
STATIC FUNCTION hbide_mnuUpdateMRUpopup( oIde, nType )
|
||||
LOCAL oMenuBar
|
||||
LOCAL lEmpty
|
||||
LOCAL oItem
|
||||
LOCAL cFindStr
|
||||
LOCAL nPos
|
||||
LOCAL n, c
|
||||
LOCAL oMenuBar, oItem, cFindStr, nPos, n, c
|
||||
|
||||
IF Empty(oIde:oDlg )
|
||||
IF Empty( oIde:oDlg )
|
||||
RETURN NIL
|
||||
ENDIF
|
||||
|
||||
oMenuBar := oIde:oDlg:MenuBar()
|
||||
lEmpty := .T.
|
||||
nPos := 0
|
||||
cFindStr := IIF( nType == INI_RECENTFILES, 'RECENT FILES', 'RECENT PROJECTS')
|
||||
cFindStr := iif( nType == INI_RECENTFILES, 'RECENT FILES', 'RECENT PROJECTS' )
|
||||
|
||||
FOR n := 1 TO oMenuBar:numItems()
|
||||
|
||||
IF oMenuBar:aMenuItems[ n, 1 ] != QMF_POPUP
|
||||
LOOP
|
||||
ENDIF
|
||||
|
||||
// msgbox( ToString( oMenuBar:aMenuItems[ n ] ))
|
||||
|
||||
oItem := oMenuBar:aMenuItems[ n ]
|
||||
c := Upper( oItem[ 3 ] )
|
||||
c := StrTran( c, '~', '' )
|
||||
@@ -677,17 +668,17 @@ STATIC FUNCTION hbide_mnuUpdateMRUpopup( oIde, nType )
|
||||
|
||||
oItem[ 4 ]:delAllItems()
|
||||
|
||||
FOR n := 1 TO Len( oIde:aIni[ nType ] )
|
||||
c := hbide_pathNormalized( oIde:aIni[ nType , n ], .F. )
|
||||
lEmpty := .F.
|
||||
IF !empty( oIde:aIni[ nType ] )
|
||||
FOR n := 1 TO Len( oIde:aIni[ nType ] )
|
||||
c := hbide_pathNormalized( oIde:aIni[ nType, n ], .F. )
|
||||
|
||||
oItem[ 4 ]:addItem( { _T( '~' + hb_NumToHex( n ) + '. ' + c ) , nil } )
|
||||
oItem[ 4 ]:addItem( { _T( '~' + hb_NumToHex( n ) + '. ' + c ), nil } )
|
||||
|
||||
IF !hb_FileExists(c)
|
||||
oItem[ 4 ]:disableItem( n )
|
||||
ENDIF
|
||||
NEXT
|
||||
IF lEmpty
|
||||
IF !hb_FileExists( c )
|
||||
oItem[ 4 ]:disableItem( n )
|
||||
ENDIF
|
||||
NEXT
|
||||
ELSE
|
||||
IF nType == INI_RECENTFILES
|
||||
oItem[ 4 ]:addAction( "** No recent files found **" )
|
||||
ELSE
|
||||
@@ -695,6 +686,7 @@ STATIC FUNCTION hbide_mnuUpdateMRUpopup( oIde, nType )
|
||||
ENDIF
|
||||
oItem[ 4 ]:disableItem( 1 )
|
||||
ENDIF
|
||||
|
||||
RETURN nil
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
@@ -711,22 +703,23 @@ FUNCTION hbide_mnuAddFileToMRU( oIde, cFileName, nType )
|
||||
|
||||
cFileName := hbide_pathNormalized( cFileName )
|
||||
|
||||
nPos := aScan( oIde:aIni[ nType ], {|f| hbide_pathNormalized( f ) == cFileName } )
|
||||
|
||||
IF nPos > 0
|
||||
IF ( nPos := aScan( oIde:aIni[ nType ], {|f| hbide_pathNormalized( f ) == cFileName } ) ) > 0
|
||||
hb_aDel( oIde:aIni[ nType ], nPos, .T. )
|
||||
ENDIF
|
||||
|
||||
AAdd( oIde:aIni[ nType ], '' )
|
||||
ASize( oIde:aIni[ nType ], len( oIde:aIni[ nType ] ) + 1 )
|
||||
AIns( oIde:aIni[ nType ], 1 )
|
||||
|
||||
oIde:aIni[ nType,1 ] := cFileName
|
||||
|
||||
IF Len( oIde:aIni[ nType ] ) > 15
|
||||
aSize( oIde:aIni[ nType ], 15 )
|
||||
IF Len( oIde:aIni[ nType ] ) > 25
|
||||
aSize( oIde:aIni[ nType ], 25 )
|
||||
ENDIF
|
||||
|
||||
hbide_mnuUpdateMRUpopup( oIde, nType )
|
||||
hbide_dbg( nPos, cFileName )
|
||||
IF nPos == 0
|
||||
hbide_mnuUpdateMRUpopup( oIde, nType )
|
||||
ENDIF
|
||||
RETURN nil
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
@@ -483,12 +483,14 @@ METHOD IdeProjManager:setCurrentProject( cProjectName )
|
||||
IF !empty( cOldProject )
|
||||
IF !empty( oItem := hbide_findProjTreeItem( ::oIde, cOldProject, "Project Name" ) )
|
||||
oItem:oWidget:setForeground( 0, QBrush():new( "QColor", QColor():new( 0,0,0 ) ) )
|
||||
//oItem:oWidget:setBackground( 0, QBrush():new( "QColor", QColor():new( 255,255,255 ) ) )
|
||||
ENDIF
|
||||
ENDIF
|
||||
/* Set New Color */
|
||||
IF !empty( ::cWrkProject )
|
||||
IF !empty( oItem := hbide_findProjTreeItem( ::oIde, ::cWrkProject, "Project Name" ) )
|
||||
oItem:oWidget:setForeground( 0, ::qBrushWrkProject )
|
||||
//oItem:oWidget:setBackground( 0, ::qBrushWrkProject )
|
||||
hbide_expandChildren( ::oIde, oItem )
|
||||
::oProjTree:oWidget:setCurrentItem( oItem:oWidget )
|
||||
ENDIF
|
||||
|
||||
@@ -170,18 +170,9 @@ FUNCTION GetStyleSheet( cWidget )
|
||||
aadd( txt_, ' QTreeWidget::item:alternate { ' )
|
||||
aadd( txt_, ' background: #EEEEEE; ' )
|
||||
aadd( txt_, ' } ' )
|
||||
aadd( txt_, ' QTreeWidget::item:selected { ' )
|
||||
aadd( txt_, ' border: 1px solid #6a6ea9; ' )
|
||||
aadd( txt_, ' } ' )
|
||||
aadd( txt_, ' QTreeWidget::item:selected:!active { ' )
|
||||
aadd( txt_, ' background: rgba( 255, 127, 127, 255 ); ' )
|
||||
aadd( txt_, ' } ' )
|
||||
aadd( txt_, ' QTreeWidget::item:selected:active { ' )
|
||||
aadd( txt_, ' background: rgba( 127,127,255, 255 ); ' )
|
||||
aadd( txt_, ' } ' )
|
||||
aadd( txt_, ' QTreeWidget::item:hover { ' )
|
||||
aadd( txt_, ' background: rgba( 210,201,210,255 ); ' )
|
||||
aadd( txt_, '} ' )
|
||||
//aadd( txt_, ' QTreeWidget::item:selected { ' )
|
||||
//aadd( txt_, ' border: 1px solid #6a6ea9; ' )
|
||||
//aadd( txt_, ' } ' )
|
||||
|
||||
CASE cWidget == "QTreeWidget"
|
||||
|
||||
|
||||
@@ -278,8 +278,8 @@ METHOD xbpMenuBar:delItem( nItemIndex )
|
||||
//::aMenuItems[ nItemIndex, 4 ]:destroy()
|
||||
ELSE
|
||||
oAction := ::aMenuItems[ nItemIndex, 5 ]
|
||||
Qt_Events_disConnect( ::pEvents, oAction, "triggered(bool)" )
|
||||
Qt_Slots_disConnect( ::pSlots, oAction, "hovered()" )
|
||||
Qt_Slots_disConnect( ::pSlots, oAction, "triggered(bool)" )
|
||||
Qt_Slots_disConnect( ::pSlots, oAction, "hovered()" )
|
||||
oAction:pPtr := 0
|
||||
ENDIF
|
||||
ADEL( ::aMenuItems, nItemIndex )
|
||||
|
||||
Reference in New Issue
Block a user