2010-06-18 18:14 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/hbide.ch
* contrib/hbide/hbide.prg
* contrib/hbide/ideactions.prg
* contrib/hbide/idedocks.prg
* contrib/hbide/ideeditor.prg
* contrib/hbide/ideenviron.prg
* contrib/hbide/idefindreplace.prg
* contrib/hbide/idefunctions.prg
* contrib/hbide/ideobject.prg
* contrib/hbide/ideprojmanager.prg
* contrib/hbide/idesaveload.prg
* contrib/hbide/ideshortcuts.prg
* contrib/hbide/idesources.prg
* contrib/hbide/idetools.prg
+ Remodelled: ::aINI - hbide.ini variables container.
It is now encapsulated in a object - ::aINI => ::oINI.
This implementation has made this construct extendible to
any extent. Earlier it was a real mess to add one more
option on top of the existing one.
This commit is contained in:
@@ -16,6 +16,27 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2010-06-18 18:14 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbide/hbide.ch
|
||||
* contrib/hbide/hbide.prg
|
||||
* contrib/hbide/ideactions.prg
|
||||
* contrib/hbide/idedocks.prg
|
||||
* contrib/hbide/ideeditor.prg
|
||||
* contrib/hbide/ideenviron.prg
|
||||
* contrib/hbide/idefindreplace.prg
|
||||
* contrib/hbide/idefunctions.prg
|
||||
* contrib/hbide/ideobject.prg
|
||||
* contrib/hbide/ideprojmanager.prg
|
||||
* contrib/hbide/idesaveload.prg
|
||||
* contrib/hbide/ideshortcuts.prg
|
||||
* contrib/hbide/idesources.prg
|
||||
* contrib/hbide/idetools.prg
|
||||
+ Remodelled: ::aINI - hbide.ini variables container.
|
||||
It is now encapsulated in a object - ::aINI => ::oINI.
|
||||
This implementation has made this construct extendible to
|
||||
any extent. Earlier it was a real mess to add one more
|
||||
option on top of the existing one.
|
||||
|
||||
2010-06-18 16:12 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/rtl/filesys.c
|
||||
* include/hbapifs.h
|
||||
|
||||
@@ -68,58 +68,6 @@
|
||||
#define HBIDE_RUN_MODE_HBP 2
|
||||
#define HBIDE_RUN_MODE_PRG 3
|
||||
|
||||
#define INI_HBIDE 1
|
||||
#define INI_PROJECTS 2
|
||||
#define INI_FILES 3
|
||||
#define INI_FIND 4
|
||||
#define INI_REPLACE 5
|
||||
#define INI_RECENTFILES 6
|
||||
#define INI_RECENTPROJECTS 7
|
||||
#define INI_FOLDERS 8
|
||||
#define INI_VIEWS 9
|
||||
#define INI_TAGGEDPROJECTS 10
|
||||
#define INI_GENERAL 11
|
||||
#define INI_TOOLS 12
|
||||
#define INI_USERTOOLBARS 13
|
||||
|
||||
#define INI_SECTIONS_COUNT 13
|
||||
|
||||
|
||||
/* INI_HBIDE */
|
||||
#define MainWindowGeometry 1
|
||||
#define ProjectTreeVisible 2
|
||||
#define ProjectTreeGeometry 3
|
||||
#define FunctionListVisible 4
|
||||
#define FunctionListGeometry 5
|
||||
#define RecentTabIndex 6
|
||||
#define CurrentProject 7
|
||||
#define GotoDialogGeometry 8
|
||||
#define PropsDialogGeometry 9
|
||||
#define FindDialogGeometry 10
|
||||
#define ThemesDialogGeometry 11
|
||||
#define CurrentTheme 12
|
||||
#define CurrentCodec 13
|
||||
#define PathMk2 14
|
||||
#define PathEnv 15
|
||||
#define CurrentEnvironment 16
|
||||
#define FindInFilesDialogGeometry 17
|
||||
#define CurrentFind 18
|
||||
#define CurrentFolderFind 19
|
||||
#define CurrentReplace 20
|
||||
#define CurrentView 21
|
||||
#define CurrentHarbour 22
|
||||
#define CurrentShortcuts 23
|
||||
#define TextFileExtensions 24
|
||||
#define CurrentLineHighlightMode 25
|
||||
#define LineNumbersDisplayMode 26
|
||||
#define HorzRulerDisplayMode 27
|
||||
#define ToolsDialogGeometry 28
|
||||
#define IdeTheme 29
|
||||
#define IdeAnimated 30
|
||||
|
||||
|
||||
#define INI_HBIDE_VRBLS 30
|
||||
|
||||
/* .hbi structure constants */
|
||||
#define PRJ_PRP_PROPERTIES 1
|
||||
#define PRJ_PRP_FLAGS 2
|
||||
|
||||
@@ -156,7 +156,6 @@ CLASS HbIde
|
||||
DATA mp1, mp2, oXbp, nEvent
|
||||
|
||||
DATA aTabs INIT {}
|
||||
DATA aINI INIT {}
|
||||
DATA aViews INIT {}
|
||||
DATA aProjData INIT {}
|
||||
DATA aPrpObjs INIT {}
|
||||
@@ -298,9 +297,10 @@ CLASS HbIde
|
||||
METHOD new( aParams )
|
||||
METHOD create( aParams )
|
||||
METHOD destroy()
|
||||
METHOD setPosAndSizeByIni( qWidget, nPart )
|
||||
METHOD setPosByIni( qWidget, nPart )
|
||||
METHOD setSizeByIni( qWidget, nPart )
|
||||
//
|
||||
METHOD setPosAndSizeByIniEx( qWidget, cParams )
|
||||
METHOD setPosByIniEx( qWidget, cParams )
|
||||
//
|
||||
METHOD manageFocusInEditor()
|
||||
METHOD removeProjectTree( aPrj )
|
||||
METHOD updateProjectTree( aPrj )
|
||||
@@ -347,7 +347,7 @@ METHOD HbIde:new( aParams )
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD HbIde:create( aParams )
|
||||
LOCAL qPixmap, qSplash, n, cView
|
||||
LOCAL qPixmap, qSplash, cView
|
||||
|
||||
qPixmap := QPixmap():new( hb_dirBase() + "resources" + hb_osPathSeparator() + "hbidesplash.png" )
|
||||
qSplash := QSplashScreen():new()
|
||||
@@ -357,14 +357,6 @@ METHOD HbIde:create( aParams )
|
||||
::showApplicationCursor( Qt_BusyCursor )
|
||||
QApplication():new():processEvents()
|
||||
|
||||
/* Initiate the place holders */
|
||||
::aINI := array( INI_SECTIONS_COUNT )
|
||||
::aINI[ 1 ] := afill( array( INI_HBIDE_VRBLS ), "" )
|
||||
//
|
||||
FOR n := 2 TO INI_SECTIONS_COUNT
|
||||
::aIni[ n ] := array( 0 )
|
||||
NEXT
|
||||
|
||||
DEFAULT aParams TO ::aParams
|
||||
::aParams := aParams
|
||||
::parseParams()
|
||||
@@ -391,10 +383,12 @@ METHOD HbIde:create( aParams )
|
||||
IF ::nRunMode == HBIDE_RUN_MODE_INI
|
||||
::oINI:load( ::cProjIni )
|
||||
ENDIF
|
||||
#if 0
|
||||
/* Load IDE Settings */ /* TODO: delete */
|
||||
IF ::nRunMode == HBIDE_RUN_MODE_INI
|
||||
hbide_loadINI( Self, ::cProjIni )
|
||||
ENDIF
|
||||
#endif
|
||||
|
||||
/* Load User Dictionaries */
|
||||
hbide_loadUserDictionaries( Self )
|
||||
@@ -403,22 +397,11 @@ METHOD HbIde:create( aParams )
|
||||
::oSC := IdeShortcuts():new( Self ):create()
|
||||
|
||||
/* Insert command line projects */
|
||||
aeval( ::aHbpOnCmdLine, {|e| aadd( ::aINI[ INI_PROJECTS ], e ) } )
|
||||
// aeval( ::aHbpOnCmdLine, {|e| aadd( ::aINI[ INI_PROJECTS ], e ) } )
|
||||
aeval( ::aHbpOnCmdLine, {|e| aadd( ::oINI:aProjFiles, e ) } )
|
||||
/* Insert command line sources */
|
||||
aeval( ::aSrcOnCmdLine, {|e| aadd( ::aINI[ INI_FILES ], hbide_parseSourceComponents( e ) ) } )
|
||||
|
||||
/* Set variables from last session */
|
||||
::cWrkTheme := ::aINI[ INI_HBIDE, CurrentTheme ]
|
||||
::cWrkCodec := ::aINI[ INI_HBIDE, CurrentCodec ]
|
||||
::cWrkEnvironment := ::aINI[ INI_HBIDE, CurrentEnvironment ]
|
||||
::cWrkFind := ::aINI[ INI_HBIDE, CurrentFind ]
|
||||
::cWrkFolderFind := ::aINI[ INI_HBIDE, CurrentFolderFind ]
|
||||
::cWrkReplace := ::aINI[ INI_HBIDE, CurrentReplace ]
|
||||
::cWrkView := ::aINI[ INI_HBIDE, CurrentView ]
|
||||
::cWrkHarbour := ::aINI[ INI_HBIDE, CurrentHarbour ]
|
||||
::lCurrentLineHighlightEnabled := iif( ::aINI[ INI_HBIDE, CurrentLineHighlightMode ] == "NO", .f., .t. )
|
||||
::lLineNumbersVisible := iif( ::aINI[ INI_HBIDE, LineNumbersDisplayMode ] == "NO", .f., .t. )
|
||||
::lHorzRulerVisible := iif( ::aINI[ INI_HBIDE, HorzRulerDisplayMode ] == "NO", .f., .t. )
|
||||
// aeval( ::aSrcOnCmdLine, {|e| aadd( ::aINI[ INI_FILES ], hbide_parseSourceComponents( e ) ) } )
|
||||
aeval( ::aSrcOnCmdLine, {|e| aadd( ::oINI:aFiles, hbide_parseSourceComponents( e ) ) } )
|
||||
|
||||
/* Store to restore when all preliminary operations are completed */
|
||||
cView := ::cWrkView
|
||||
@@ -475,13 +458,12 @@ METHOD HbIde:create( aParams )
|
||||
::oHM := IdeHome():new():create( Self )
|
||||
|
||||
/* Fill various elements of the IDE */
|
||||
::cWrkProject := ::aINI[ INI_HBIDE, CurrentProject ]
|
||||
::oPM:populate()
|
||||
::oSM:loadSources()
|
||||
#if 0
|
||||
::oDK:setView( ::cWrkView )
|
||||
IF !empty( ::aIni[ INI_FILES ] )
|
||||
::oEM:setSourceVisibleByIndex( max( 0, val( ::aIni[ INI_HBIDE, RecentTabIndex ] ) )
|
||||
IF !empty( ::oIni:aFiles )
|
||||
::oEM:setSourceVisibleByIndex( max( 0, val( ::oIni:cRecentTabIndex ) )
|
||||
ENDIF
|
||||
#endif
|
||||
|
||||
@@ -514,8 +496,8 @@ METHOD HbIde:create( aParams )
|
||||
/* Request Main Window to Appear on the Screen */
|
||||
::oHM:refresh()
|
||||
|
||||
::oDK:animateComponents( val( ::aINI[ INI_HBIDE, IdeAnimated ] ) )
|
||||
::oSetup:setSystemStyle( ::aINI[ INI_HBIDE, IdeTheme ] )
|
||||
::oDK:animateComponents( val( ::oINI:cIdeAnimated ) )
|
||||
::oSetup:setSystemStyle( ::oINI:cIdeTheme )
|
||||
|
||||
::oDlg:Show()
|
||||
IF ::nRunMode == HBIDE_RUN_MODE_PRG
|
||||
@@ -534,7 +516,7 @@ METHOD HbIde:create( aParams )
|
||||
qSplash:close()
|
||||
|
||||
/* Load tags last tagged projects */
|
||||
::oFN:loadTags( ::aINI[ INI_TAGGEDPROJECTS ] )
|
||||
::oFN:loadTags( ::oINI:aTaggedProjects )
|
||||
|
||||
#if 0 /* Can be controlled through setup */
|
||||
hbide_loadPlugins( Self, "1.0" )
|
||||
@@ -545,13 +527,15 @@ METHOD HbIde:create( aParams )
|
||||
|
||||
IF ::nEvent == xbeP_Quit
|
||||
HB_TRACE( HB_TR_ALWAYS, "---------------- xbeP_Quit" )
|
||||
hbide_saveINI( Self ) ; ::oINI:save()
|
||||
//hbide_saveINI( Self ) ; ::oINI:save()
|
||||
::oINI:save()
|
||||
EXIT
|
||||
ENDIF
|
||||
|
||||
IF ::nEvent == xbeP_Close
|
||||
HB_TRACE( HB_TR_ALWAYS, "================ xbeP_Close" )
|
||||
hbide_saveINI( Self ) ; ::oINI:save()
|
||||
//hbide_saveINI( Self ) ; ::oINI:save()
|
||||
::oINI:save()
|
||||
::oSM:closeAllSources()
|
||||
EXIT
|
||||
|
||||
@@ -994,11 +978,11 @@ METHOD HbIde:execProjectAction( cKey )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD HbIde:setPosAndSizeByIni( qWidget, nPart )
|
||||
METHOD HbIde:setPosAndSizeByIniEx( qWidget, cParams )
|
||||
LOCAL aRect
|
||||
|
||||
IF !empty( ::aIni[ INI_HBIDE, nPart ] )
|
||||
aRect := hb_atokens( ::aIni[ INI_HBIDE, nPart ], "," )
|
||||
IF !empty( cParams )
|
||||
aRect := hb_atokens( cParams, "," )
|
||||
aeval( aRect, {|e,i| aRect[ i ] := val( e ) } )
|
||||
|
||||
qWidget:move( aRect[ 1 ], aRect[ 2 ] )
|
||||
@@ -1009,11 +993,11 @@ METHOD HbIde:setPosAndSizeByIni( qWidget, nPart )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD HbIde:setPosByIni( qWidget, nPart )
|
||||
METHOD HbIde:setPosByIniEx( qWidget, cParams )
|
||||
LOCAL aRect
|
||||
|
||||
IF !empty( ::aIni[ INI_HBIDE, nPart ] )
|
||||
aRect := hb_atokens( ::aIni[ INI_HBIDE, nPart ], "," )
|
||||
IF !empty( cParams )
|
||||
aRect := hb_atokens( cParams, "," )
|
||||
aeval( aRect, {|e,i| aRect[ i ] := val( e ) } )
|
||||
|
||||
qWidget:move( aRect[ 1 ], aRect[ 2 ] )
|
||||
@@ -1023,19 +1007,6 @@ METHOD HbIde:setPosByIni( qWidget, nPart )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD HbIde:setSizeByIni( qWidget, nPart )
|
||||
LOCAL aRect
|
||||
|
||||
IF !empty( ::aIni[ INI_HBIDE, nPart ] )
|
||||
aRect := hb_atokens( ::aIni[ INI_HBIDE, nPart ], "," )
|
||||
aeval( aRect, {|e,i| aRect[ i ] := val( e ) } )
|
||||
qWidget:resize( aRect[ 3 ], aRect[ 4 ] )
|
||||
ENDIF
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD HbIde:manageFocusInEditor()
|
||||
LOCAL qEdit
|
||||
|
||||
|
||||
@@ -407,11 +407,11 @@ METHOD IdeActions:buildMainMenu()
|
||||
hbide_menuAddSep( oSubMenu )
|
||||
|
||||
oSubMenu2 := XbpMenu():new( oSubMenu ):create()
|
||||
oSubMenu2:itemSelected := {| nIndex, cFile | cFile := oIde:aIni[ INI_RECENTFILES, nIndex ], ;
|
||||
oSubMenu2:itemSelected := {| nIndex, cFile | cFile := oIde:oIni:aRecentFiles[ nIndex ], ;
|
||||
oIde:oEM:editSource( cFile ) }
|
||||
IF !empty( oIde:aIni[ INI_RECENTFILES ] )
|
||||
FOR n := 1 TO Len( oIde:aIni[ INI_RECENTFILES ] )
|
||||
f := hbide_pathNormalized( oIde:aIni[ INI_RECENTFILES, n ], .F. )
|
||||
IF !empty( oIde:oIni:aRecentFiles )
|
||||
FOR n := 1 TO Len( oIde:oIni:aRecentFiles )
|
||||
f := hbide_pathNormalized( oIde:oIni:aRecentFiles[ n ], .F. )
|
||||
oSubMenu2:addItem( { _T( '~' + hb_NumToHex(n) + '. ' + f ), nil } )
|
||||
IF !hb_FileExists( f )
|
||||
oSubMenu2:disableItem( n )
|
||||
@@ -424,11 +424,11 @@ METHOD IdeActions:buildMainMenu()
|
||||
oMenuBar:addItem( { oSubMenu2, _T( "Recent Files" ) } )
|
||||
|
||||
oSubMenu2 := XbpMenu():new( oSubMenu ):create()
|
||||
oSubMenu2:itemSelected := {| nIndex, cFile | cFile := oIde:aIni[ INI_RECENTPROJECTS, nIndex ], ;
|
||||
oSubMenu2:itemSelected := {| nIndex, cFile | cFile := oIde:oIni:aRecentProjects[ nIndex ], ;
|
||||
::oPM:loadProperties( cFile, .F., .F., .T. ) }
|
||||
IF !empty( oIde:aIni[ INI_RECENTPROJECTS ] )
|
||||
FOR n := 1 TO Len( oIde:aIni[ INI_RECENTPROJECTS ] )
|
||||
f := hbide_pathNormalized( oIde:aIni[ INI_RECENTPROJECTS, n ], .F. )
|
||||
IF !empty( oIde:oIni:aRecentProjects )
|
||||
FOR n := 1 TO Len( oIde:oIni:aRecentProjects )
|
||||
f := hbide_pathNormalized( oIde:oIni:aRecentProjects[ n ], .F. )
|
||||
oSubMenu2:addItem( { _T( '~' + hb_NumToHex( n ) + '. ' + f ) , nil } )
|
||||
IF !hb_FileExists( f )
|
||||
oSubMenu2:disableItem( n )
|
||||
@@ -768,30 +768,31 @@ STATIC FUNCTION mnuNormalizeItem( cCaption )
|
||||
* Add a file name to MRU menu item.
|
||||
* 02/01/2010 - 23:23:22 - vailtom
|
||||
*/
|
||||
FUNCTION hbide_mnuAddFileToMRU( oIde, cFileName, nType )
|
||||
LOCAL nPos, cFileNormal
|
||||
|
||||
IF nType != INI_RECENTPROJECTS .AND. nType != INI_RECENTFILES
|
||||
RETURN nil
|
||||
ENDIF
|
||||
FUNCTION hbide_mnuAddFileToMRU( oIde, cFileName, cType )
|
||||
LOCAL nPos, cFileNormal, a_
|
||||
|
||||
cFileNormal := hbide_pathNormalized( cFileName )
|
||||
|
||||
IF ( nPos := aScan( oIde:aIni[ nType ], {|f| hbide_pathNormalized( f ) == cFileNormal } ) ) > 0
|
||||
hb_aDel( oIde:aIni[ nType ], nPos, .T. )
|
||||
IF cType == "recent_projects"
|
||||
a_:= oIde:oINI:aRecentProjects
|
||||
ELSE
|
||||
a_:= oIde:oINI:aRecentFiles
|
||||
ENDIF
|
||||
|
||||
ASize( oIde:aIni[ nType ], len( oIde:aIni[ nType ] ) + 1 )
|
||||
AIns( oIde:aIni[ nType ], 1 )
|
||||
IF ( nPos := aScan( a_, {|f| hbide_pathNormalized( f ) == cFileNormal } ) ) > 0
|
||||
hb_aDel( a_, nPos, .T. )
|
||||
ENDIF
|
||||
|
||||
oIde:aIni[ nType,1 ] := cFileName
|
||||
ASize( a_, len( a_ ) + 1 )
|
||||
AIns( a_, 1 )
|
||||
a_[ 1 ] := cFileName
|
||||
|
||||
IF Len( oIde:aIni[ nType ] ) > 25
|
||||
aSize( oIde:aIni[ nType ], 25 )
|
||||
IF Len( a_ ) > 25
|
||||
aSize( a_, 25 )
|
||||
ENDIF
|
||||
|
||||
IF nPos == 0
|
||||
hbide_mnuUpdateMRUpopup( oIde, nType )
|
||||
hbide_mnuUpdateMRUpopup( oIde, cType )
|
||||
ENDIF
|
||||
RETURN nil
|
||||
|
||||
@@ -801,16 +802,22 @@ FUNCTION hbide_mnuAddFileToMRU( oIde, cFileName, nType )
|
||||
*/
|
||||
#define QMF_POPUP 1
|
||||
|
||||
STATIC FUNCTION hbide_mnuUpdateMRUpopup( oIde, nType )
|
||||
LOCAL oMenuBar, oItem, cFindStr, nPos, n, c
|
||||
STATIC FUNCTION hbide_mnuUpdateMRUpopup( oIde, cType )
|
||||
LOCAL oMenuBar, oItem, cFindStr, nPos, n, c, a_
|
||||
|
||||
IF Empty( oIde:oDlg )
|
||||
RETURN NIL
|
||||
ENDIF
|
||||
|
||||
IF cType == "recent_projects"
|
||||
a_:= oIde:oINI:aRecentProjects
|
||||
ELSE
|
||||
a_:= oIde:oINI:aRecentFiles
|
||||
ENDIF
|
||||
|
||||
oMenuBar := oIde:oDlg:MenuBar()
|
||||
nPos := 0
|
||||
cFindStr := iif( nType == INI_RECENTFILES, 'RECENT FILES', 'RECENT PROJECTS' )
|
||||
cFindStr := iif( cType == "recent_files", 'RECENT FILES', 'RECENT PROJECTS' )
|
||||
|
||||
FOR n := 1 TO oMenuBar:numItems()
|
||||
IF oMenuBar:aMenuItems[ n, 1 ] != QMF_POPUP
|
||||
@@ -834,9 +841,9 @@ STATIC FUNCTION hbide_mnuUpdateMRUpopup( oIde, nType )
|
||||
|
||||
oItem[ 4 ]:delAllItems()
|
||||
|
||||
IF !empty( oIde:aIni[ nType ] )
|
||||
FOR n := 1 TO Len( oIde:aIni[ nType ] )
|
||||
c := hbide_pathNormalized( oIde:aIni[ nType, n ], .F. )
|
||||
IF !empty( a_ )
|
||||
FOR n := 1 TO Len( a_ )
|
||||
c := hbide_pathNormalized( a_[ n ], .F. )
|
||||
|
||||
oItem[ 4 ]:addItem( { _T( '~' + hb_NumToHex( n ) + '. ' + c ), nil } )
|
||||
|
||||
@@ -845,7 +852,7 @@ STATIC FUNCTION hbide_mnuUpdateMRUpopup( oIde, nType )
|
||||
ENDIF
|
||||
NEXT
|
||||
ELSE
|
||||
IF nType == INI_RECENTFILES
|
||||
IF cType == "recent_files"
|
||||
oItem[ 4 ]:addAction( "** No recent files found **" )
|
||||
ELSE
|
||||
oItem[ 4 ]:addAction( "** No recent projects found **" )
|
||||
|
||||
@@ -251,9 +251,7 @@ METHOD IdeDocks:buildDialog()
|
||||
aSize := AppDesktop():currentSize()
|
||||
::oDlg:setPos( { ( aSize[ 1 ] - ::oDlg:currentSize()[ 1 ] ) / 2, ;
|
||||
( aSize[ 2 ] - ::oDlg:currentSize()[ 2 ] ) / 2 } )
|
||||
|
||||
::oIde:setPosAndSizeByIni( ::oDlg:oWidget, MainWindowGeometry )
|
||||
//::oDlg:Show()
|
||||
::oIde:setPosAndSizeByIniEx( ::oDlg:oWidget, ::oINI:cMainWindowGeometry )
|
||||
|
||||
/* StatusBar */
|
||||
::buildStatusBar()
|
||||
@@ -276,7 +274,7 @@ METHOD IdeDocks:buildDialog()
|
||||
/* View Panels */
|
||||
::buildViewWidget( "Stats" ) /* At stayrtup displaying various statistics */
|
||||
::buildViewWidget( "Main" ) /* Main Panel to hold editor tabs */
|
||||
FOR EACH s IN ::aINI[ INI_VIEWS ]
|
||||
FOR EACH s IN ::oINI:aViews
|
||||
::buildViewWidget( s ) /* All other panels user created */
|
||||
NEXT
|
||||
|
||||
@@ -516,10 +514,10 @@ METHOD IdeDocks:setView( cView )
|
||||
CASE "New..."
|
||||
cView := hbide_fetchAString( ::qViewsCombo, cView, "Name the View", "New View" )
|
||||
IF cView != "New..." .AND. cView != "Stats" .AND. cView != "Main"
|
||||
IF ascan( ::aINI[ INI_VIEWS ], {|e| e == cView } ) > 0
|
||||
IF ascan( ::oINI:aViews, {|e| e == cView } ) > 0
|
||||
MsgBox( "View: " + cView + ", already exists" )
|
||||
ELSE
|
||||
aadd( ::aINI[ INI_VIEWS ], cView )
|
||||
aadd( ::oIde:oINI:aViews, cView )
|
||||
::oTM:addPanelsMenu( cView )
|
||||
::buildViewWidget( cView )
|
||||
::addPanelButton( cView )
|
||||
@@ -640,7 +638,7 @@ METHOD IdeDocks:buildToolBarPanels()
|
||||
::oDlg:oWidget:addToolBar( Qt_LeftToolBarArea, ::qTBarPanels )
|
||||
|
||||
::addPanelButton( "Main" )
|
||||
FOR EACH s IN ::aINI[ INI_VIEWS ]
|
||||
FOR EACH s IN ::oINI:aViews
|
||||
::addPanelButton( s )
|
||||
NEXT
|
||||
|
||||
@@ -1264,7 +1262,7 @@ METHOD IdeDocks:animateComponents( nMode )
|
||||
nMode := ::nAnimantionMode
|
||||
ENDIF
|
||||
::oIde:nAnimantionMode := nMode
|
||||
::oIde:aINI[ INI_HBIDE, IdeAnimated ] := hb_ntos( ::nAnimantionMode )
|
||||
::oIde:oINI:cIdeAnimated := hb_ntos( ::nAnimantionMode )
|
||||
|
||||
::oDlg:menubar():setStyleSheet( GetStyleSheet( "QMenuBar", nMode ) )
|
||||
|
||||
|
||||
@@ -947,9 +947,9 @@ METHOD IdeEditsManager:goto( nLine )
|
||||
qGo:setLabelText( "Goto Line Number [1-" + hb_ntos( nRows ) + "]" )
|
||||
qGo:setWindowTitle( "Harbour" )
|
||||
|
||||
::setPosByIni( qGo, GotoDialogGeometry )
|
||||
::oIde:setPosByIniEx( qGo, ::oINI:cGotoDialogGeometry )
|
||||
qGo:exec()
|
||||
::aIni[ INI_HBIDE, GotoDialogGeometry ] := hbide_posAndSize( qGo )
|
||||
::oIde:oINI:cGotoDialogGeometry := hbide_posAndSize( qGo )
|
||||
nLine := qGo:intValue()
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ METHOD IdeEnvironments:create( oIDE, cEnvFile )
|
||||
::cEnvFile := cEnvFile
|
||||
|
||||
IF empty( ::cEnvFile )
|
||||
cFile := ::oIde:aINI[ INI_HBIDE, PathEnv ]
|
||||
cFile := ::oINI:cPathEnv
|
||||
cFile := iif( empty( cFile ), cFile, hbide_pathAppendLastSlash( cFile ) )
|
||||
IF empty( cFile )
|
||||
cFile := oIde:cProjIni
|
||||
@@ -130,7 +130,7 @@ METHOD IdeEnvironments:create( oIDE, cEnvFile )
|
||||
|
||||
hb_fNameSplit( ::cEnvFile, @cPath )
|
||||
::oIDE:cWrkPathEnv := hbide_pathNormalized( cPath, .f. )
|
||||
::oIde:aINI[ INI_HBIDE, PathEnv ] := ::oIDE:cWrkPathEnv
|
||||
::oIde:oINI:cPathEnv := ::oIDE:cWrkPathEnv
|
||||
|
||||
IF !empty( ::cEnvFile ) .AND. hb_fileExists( ::cEnvFile )
|
||||
::parse( ::cEnvFile )
|
||||
@@ -257,9 +257,9 @@ METHOD IdeEnvironments:show()
|
||||
#endif
|
||||
ENDIF
|
||||
|
||||
::oUI:q_editPathMk2 :setText( ::aINI[ INI_HBIDE, PathMk2 ] )
|
||||
::oUI:q_editPathEnv :setText( ::aINI[ INI_HBIDE, PathEnv ] )
|
||||
::oUI:q_editCompilers:setPlainText( hb_memoread( hbide_pathFile( ::aINI[ INI_HBIDE, PathEnv ], "hbide.env" ) ) )
|
||||
::oUI:q_editPathMk2 :setText( ::oINI:cPathMk2 )
|
||||
::oUI:q_editPathEnv :setText( ::oINI:cPathEnv )
|
||||
::oUI:q_editCompilers:setPlainText( hb_memoread( hbide_pathFile( ::oINI:cPathEnv, "hbide.env" ) ) )
|
||||
|
||||
RETURN Self
|
||||
|
||||
@@ -305,8 +305,8 @@ METHOD IdeEnvironments:saveEnv()
|
||||
cPathMk2 := oUIEnv:q_editPathMk2:text()
|
||||
cPathEnv := oUIEnv:q_editPathEnv:text()
|
||||
|
||||
::oIDE:aINI[ INI_HBIDE, PathMk2 ] := cPathMk2
|
||||
::oIDE:aINI[ INI_HBIDE, PathEnv ] := cPathEnv
|
||||
::oIDE:oINI:cPathMk2 := cPathMk2
|
||||
::oIDE:oINI:cPathEnv := cPathEnv
|
||||
//
|
||||
::oIDE:cWrkPathMk2 := cPathMk2
|
||||
::oIDE:cWrkPathEnv := cPathEnv
|
||||
|
||||
@@ -460,8 +460,8 @@ METHOD IdeFindReplace:create( oIde )
|
||||
::oUI := HbQtUI():new( hbide_uic( "finddialog" ), ::oIde:oDlg:oWidget ):build()
|
||||
::oUI:setWindowFlags( Qt_Sheet )
|
||||
|
||||
aeval( ::oIde:aIni[ INI_FIND ], {|e| ::oUI:q_comboFindWhat:addItem( e ) } )
|
||||
aeval( ::oIde:aIni[ INI_REPLACE ], {|e| ::oUI:q_comboReplaceWith:addItem( e ) } )
|
||||
aeval( ::oINI:aFind , {|e| ::oUI:q_comboFindWhat:addItem( e ) } )
|
||||
aeval( ::oINI:aReplace, {|e| ::oUI:q_comboReplaceWith:addItem( e ) } )
|
||||
|
||||
::oUI:q_radioFromCursor:setChecked( .t. )
|
||||
::oUI:q_radioDown:setChecked( .t. )
|
||||
@@ -469,8 +469,7 @@ METHOD IdeFindReplace:create( oIde )
|
||||
::oUI:signal( "buttonFind" , "clicked()", {|| ::onClickFind() } )
|
||||
::oUI:signal( "buttonReplace", "clicked()", {|| ::onClickReplace() } )
|
||||
::oUI:signal( "buttonClose" , "clicked()", ;
|
||||
{|| ::oIde:aIni[ INI_HBIDE, FindDialogGeometry ] := hbide_posAndSize( ::oUI:oWidget ), ;
|
||||
::oUI:hide() } )
|
||||
{|| ::oIde:oINI:cFindDialogGeometry := hbide_posAndSize( ::oUI:oWidget ), ::oUI:hide() } )
|
||||
|
||||
::oUI:signal( "comboFindWhat", "editTextChanged(QString)", {|| ::oUI:q_radioEntire:setChecked( .t. ) } )
|
||||
|
||||
@@ -495,7 +494,7 @@ METHOD IdeFindReplace:show()
|
||||
::oUI:q_checkGlobal:setEnabled( .f. )
|
||||
::oUI:q_checkNoPrompting:setEnabled( .f. )
|
||||
::oUI:q_checkListOnly:setChecked( .f. )
|
||||
::oIde:setPosByIni( ::oUI:oWidget, FindDialogGeometry )
|
||||
::oIde:setPosByIniEx( ::oUI:oWidget, ::oINI:cFindDialogGeometry )
|
||||
::oUI:q_comboFindWhat:setFocus()
|
||||
|
||||
IF !empty( cText := ::oEM:getSelectedText() )
|
||||
@@ -636,8 +635,8 @@ METHOD IdeFindReplace:updateFindReplaceData( cMode )
|
||||
IF cMode == "find"
|
||||
cData := QLineEdit():configure( ::oUI:q_comboFindWhat:lineEdit() ):text()
|
||||
IF !empty( cData )
|
||||
IF ascan( ::oIde:aIni[ INI_FIND ], {|e| e == cData } ) == 0
|
||||
hb_ains( ::oIde:aIni[ INI_FIND ], 1, cData, .t. )
|
||||
IF ascan( ::oINI:aFind, {|e| e == cData } ) == 0
|
||||
hb_ains( ::oINI:aFind, 1, cData, .t. )
|
||||
::oUI:q_comboFindWhat:insertItem( 0, cData )
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -646,8 +645,8 @@ METHOD IdeFindReplace:updateFindReplaceData( cMode )
|
||||
ELSE
|
||||
cData := QLineEdit():configure( ::oUI:q_comboReplaceWith:lineEdit() ):text()
|
||||
IF !empty( cData )
|
||||
IF ascan( ::oIde:aIni[ INI_REPLACE ], cData ) == 0
|
||||
hb_ains( ::oIde:aIni[ INI_REPLACE ], 1, cData, .t. )
|
||||
IF ascan( ::oINI:aReplace, cData ) == 0
|
||||
hb_ains( ::oINI:aReplace, 1, cData, .t. )
|
||||
::oUI:q_comboReplaceWith:insertItem( 0, cData )
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -777,17 +776,17 @@ METHOD IdeFindInFiles:buildUI()
|
||||
|
||||
::oUI:q_buttonFolder:setIcon( ::resPath + "folder.png" )
|
||||
|
||||
aeval( ::oIde:aIni[ INI_FIND ], {|e| ::oUI:q_comboExpr:addItem( e ) } )
|
||||
aeval( ::oIde:aIni[ INI_REPLACE ], {|e| ::oUI:q_comboRepl:addItem( e ) } )
|
||||
aeval( ::oIde:aIni[ INI_FOLDERS ], {|e| ::oUI:q_comboFolder:addItem( e ) } )
|
||||
aeval( ::oINI:aFind , {|e| ::oUI:q_comboExpr:addItem( e ) } )
|
||||
aeval( ::oINI:aReplace, {|e| ::oUI:q_comboRepl:addItem( e ) } )
|
||||
aeval( ::oINI:aFolders, {|e| ::oUI:q_comboFolder:addItem( e ) } )
|
||||
|
||||
n := ascan( ::oIde:aIni[ INI_FIND ], {|e| e == ::cWrkFind } )
|
||||
n := ascan( ::oINI:aFind, {|e| e == ::cWrkFind } )
|
||||
::oUI:q_comboExpr:setCurrentIndex( n-1 )
|
||||
|
||||
n := ascan( ::oIde:aIni[ INI_REPLACE ], {|e| e == ::cWrkReplace } )
|
||||
n := ascan( ::oINI:aReplace, {|e| e == ::cWrkReplace } )
|
||||
::oUI:q_comboRepl:setCurrentIndex( n - 1 )
|
||||
|
||||
n := ascan( ::oIde:aIni[ INI_FOLDERS ], {|e| e == ::cWrkFolderFind } )
|
||||
n := ascan( ::oIni:aFolders, {|e| e == ::cWrkFolderFind } )
|
||||
::oUI:q_comboFolder:setCurrentIndex( n - 1 )
|
||||
::oUI:q_comboFolder:setEnabled( .f. )
|
||||
::oUI:q_checkFolders:setChecked( .f. )
|
||||
@@ -895,8 +894,8 @@ METHOD IdeFindInFiles:execEvent( cEvent, p )
|
||||
|
||||
qLineEdit := QLineEdit():configure( ::oUI:q_comboFolder:lineEdit() )
|
||||
qLineEdit:setText( cPath )
|
||||
IF ascan( ::oIde:aIni[ INI_FOLDERS ], {|e| e == cPath } ) == 0
|
||||
hb_ains( ::oIde:aIni[ INI_FOLDERS ], 1, cPath, .t. )
|
||||
IF ascan( ::oINI:aFolders, {|e| e == cPath } ) == 0
|
||||
hb_ains( ::oINI:aFolders, 1, cPath, .t. )
|
||||
ENDIF
|
||||
::oUI:q_comboFolder:insertItem( 0, cPath )
|
||||
ENDIF
|
||||
@@ -1185,8 +1184,8 @@ METHOD IdeFindInFiles:find()
|
||||
::oUI:q_buttonFind:setEnabled( .t. )
|
||||
|
||||
IF ::nFounds > 0
|
||||
IF ascan( ::oIde:aIni[ INI_FIND ], {|e| e == ::cOrigExpr } ) == 0
|
||||
hb_ains( ::oIde:aIni[ INI_FIND ], 1, ::cOrigExpr, .t. )
|
||||
IF ascan( ::oINI:aFind, {|e| e == ::cOrigExpr } ) == 0
|
||||
hb_ains( ::oINI:aFind, 1, ::cOrigExpr, .t. )
|
||||
::oUI:q_comboFolder:insertItem( 0, ::cOrigExpr )
|
||||
ENDIF
|
||||
::oIde:cWrkFind := ::cOrigExpr
|
||||
|
||||
@@ -488,7 +488,7 @@ METHOD IdeFunctions:buildTags()
|
||||
FOR EACH cProjectTitle IN a_
|
||||
::tagProject( cProjectTitle )
|
||||
NEXT
|
||||
::oIde:aINI[ INI_TAGGEDPROJECTS ] := a_
|
||||
::oIde:oINI:aTaggedProjects := a_
|
||||
::clearProjects()
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -149,7 +149,6 @@ CLASS IdeObject
|
||||
ACCESS nAnimantionMode INLINE ::oIde:nAnimantionMode
|
||||
|
||||
ACCESS aProjects INLINE ::oIde:aProjects
|
||||
ACCESS aINI INLINE ::oIde:aINI
|
||||
ACCESS aSources INLINE ::oIde:aSources
|
||||
ACCESS aEditorPath INLINE ::oIde:aEditorPath
|
||||
ACCESS aProjData INLINE ::oIde:aProjData
|
||||
|
||||
@@ -182,11 +182,11 @@ METHOD IdeProject:new( oIDE, aProps )
|
||||
::dotHbp := ""
|
||||
::compilers := ""
|
||||
|
||||
IF !empty( oIDE:aINI[ INI_HBIDE, PathMk2 ] )
|
||||
::cPathMk2 := oIDE:aINI[ INI_HBIDE, PathMk2 ]
|
||||
IF !empty( oIDE:oINI:cPathMk2 )
|
||||
::cPathMk2 := oIDE:oINI:cPathMk2
|
||||
ENDIF
|
||||
IF !empty( oIDE:aINI[ INI_HBIDE, PathEnv ] )
|
||||
::cPathEnv := oIDE:aINI[ INI_HBIDE, PathEnv ]
|
||||
IF !empty( oIDE:oINI:cPathEnv )
|
||||
::cPathEnv := oIDE:oINI:cPathEnv
|
||||
ENDIF
|
||||
|
||||
FOR EACH cSource IN ::sources
|
||||
@@ -305,7 +305,7 @@ METHOD IdeProjManager:destroy()
|
||||
METHOD IdeProjManager:populate()
|
||||
LOCAL cProject
|
||||
|
||||
FOR EACH cProject IN ::aINI[ INI_PROJECTS ]
|
||||
FOR EACH cProject IN ::oINI:aProjFiles
|
||||
::loadProperties( cProject, .f., .f., .T. )
|
||||
NEXT
|
||||
|
||||
@@ -389,7 +389,7 @@ METHOD IdeProjManager:loadProperties( cProjFileName, lNew, lFetch, lUpdateTree )
|
||||
IF lUpdateTree
|
||||
::oIDE:updateProjectTree( ::aPrjProps )
|
||||
ENDIF
|
||||
hbide_mnuAddFileToMRU( ::oIDE, cProjFileName, INI_RECENTPROJECTS )
|
||||
hbide_mnuAddFileToMRU( ::oIDE, cProjFileName, "recent_projects" )
|
||||
ELSE
|
||||
::aProjects[ nAlready, 3 ] := aclone( ::aPrjProps )
|
||||
IF lUpdateTree
|
||||
@@ -579,7 +579,7 @@ METHOD IdeProjManager:save( lCanClose )
|
||||
IF ::lUpdateTree
|
||||
::oIDE:updateProjectTree( ::aPrjProps )
|
||||
ENDIF
|
||||
hbide_mnuAddFileToMRU( ::oIDE, ::cSaveTo, INI_RECENTPROJECTS )
|
||||
hbide_mnuAddFileToMRU( ::oIDE, ::cSaveTo, "recent_projects" )
|
||||
ELSE
|
||||
::aProjects[ nAlready, 3 ] := aclone( ::aPrjProps )
|
||||
IF ::lUpdateTree
|
||||
@@ -1137,7 +1137,7 @@ METHOD IdeProjManager:removeProject( cProjectTitle )
|
||||
nPos := ascan( ::aProjects, {|e_| e_[ 2 ] == cProjFileName } )
|
||||
IF nPos > 0
|
||||
hb_adel( ::aProjects, nPos, .T. )
|
||||
hbide_saveINI( ::oIDE )
|
||||
::oINI:save()
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -292,9 +292,9 @@ METHOD IdeShortcuts:show()
|
||||
IF empty( ::oUI )
|
||||
::buildUI()
|
||||
::populateData( 1 )
|
||||
::oIde:setPosAndSizeByIni( ::oUI:oWidget, FindInFilesDialogGeometry )
|
||||
ENDIF
|
||||
|
||||
::oIde:setPosAndSizeByIniEx( ::oUI:oWidget, ::oINI:cShortcutsDialogGeometry )
|
||||
::oUI:show()
|
||||
::oUI:raise()
|
||||
|
||||
@@ -557,7 +557,7 @@ METHOD IdeShortcuts:buildUI()
|
||||
|
||||
::oUI:oWidget:installEventFilter( ::pEvents )
|
||||
|
||||
Qt_Events_Connect( ::pEvents, ::oUI:oWidget, QEvent_Close, {|| ::oIde:aIni[ INI_HBIDE, FindInFilesDialogGeometry ] := hbide_posAndSize( ::oUI:oWidget ) } )
|
||||
Qt_Events_Connect( ::pEvents, ::oUI:oWidget, QEvent_Close, {|| ::oIde:oINI:cShortcutsDialogGeometry := hbide_posAndSize( ::oUI:oWidget ) } )
|
||||
|
||||
oTbl := ::oUI:q_tableMacros /* Build Table Header */
|
||||
QHeaderView():from( oTbl:verticalHeader() ):hide()
|
||||
|
||||
@@ -113,13 +113,13 @@ METHOD IdeSourcesManager:create( oIde )
|
||||
METHOD IdeSourcesManager:loadSources()
|
||||
LOCAL a_
|
||||
|
||||
IF !empty( ::aIni[ INI_FILES ] )
|
||||
FOR EACH a_ IN ::aIni[ INI_FILES ]
|
||||
IF !empty( ::oIni:aFiles )
|
||||
FOR EACH a_ IN ::oIni:aFiles
|
||||
/* File nPos nVPos nHPos cTheme cView lAlert lVisible, aBookMarks */
|
||||
::editSource( a_[ 1 ], a_[ 2 ], a_[ 3 ], a_[ 4 ], a_[ 5 ], a_[ 6 ], .t., .f., a_[ 7 ] )
|
||||
NEXT
|
||||
::oDK:setView( ::cWrkView )
|
||||
::oEM:setSourceVisibleByIndex( max( 0, val( ::aIni[ INI_HBIDE, RecentTabIndex ] ) ) )
|
||||
::oEM:setSourceVisibleByIndex( max( 0, val( ::oIni:cRecentTabIndex ) ) )
|
||||
ENDIF
|
||||
|
||||
RETURN Self
|
||||
@@ -275,7 +275,7 @@ METHOD IdeSourcesManager:editSource( cSourceFile, nPos, nHPos, nVPos, cTheme, cV
|
||||
ENDIF
|
||||
|
||||
IF !Empty( cSourceFile ) .AND. !hbide_isSourcePPO( cSourceFile )
|
||||
hbide_mnuAddFileToMRU( Self, cSourceFile, INI_RECENTFILES )
|
||||
hbide_mnuAddFileToMRU( Self, cSourceFile, "recent_files" )
|
||||
ENDIF
|
||||
|
||||
RETURN .t.
|
||||
|
||||
@@ -85,8 +85,8 @@ CLASS IdeToolsManager INHERIT IdeObject
|
||||
DATA aBtns INIT {}
|
||||
DATA aToolbars INIT { NIL,NIL,NIL,NIL,NIL }
|
||||
|
||||
ACCESS aTools INLINE ::aINI[ INI_TOOLS ]
|
||||
ACCESS aUserToolBars INLINE ::aINI[ INI_USERTOOLBARS ]
|
||||
ACCESS aTools INLINE ::oINI:aTools
|
||||
ACCESS aUserToolBars INLINE ::oINI:aUserToolbars
|
||||
|
||||
METHOD new( oIde )
|
||||
METHOD create( oIde )
|
||||
@@ -132,13 +132,13 @@ METHOD IdeToolsManager:create( oIde )
|
||||
oAct:setMenu( QMenu():new() )
|
||||
ENDIF
|
||||
|
||||
IF empty( ::aINI[ INI_USERTOOLBARS ] )
|
||||
asize( ::aINI[ INI_USERTOOLBARS ], 5 )
|
||||
DEFAULT ::aINI[ INI_USERTOOLBARS, 1 ] TO { "","YES","","","YES","YES","YES" }
|
||||
DEFAULT ::aINI[ INI_USERTOOLBARS, 2 ] TO { "","YES","","","YES","YES","YES" }
|
||||
DEFAULT ::aINI[ INI_USERTOOLBARS, 3 ] TO { "","YES","","","YES","YES","YES" }
|
||||
DEFAULT ::aINI[ INI_USERTOOLBARS, 4 ] TO { "","YES","","","YES","YES","YES" }
|
||||
DEFAULT ::aINI[ INI_USERTOOLBARS, 5 ] TO { "","YES","","","YES","YES","YES" }
|
||||
IF empty( ::oINI:aUserToolbars )
|
||||
asize( ::oINI:aUserToolbars, 5 )
|
||||
DEFAULT ::oINI:aUserToolbars[ 1 ] TO { "","YES","","","YES","YES","YES" }
|
||||
DEFAULT ::oINI:aUserToolbars[ 2 ] TO { "","YES","","","YES","YES","YES" }
|
||||
DEFAULT ::oINI:aUserToolbars[ 3 ] TO { "","YES","","","YES","YES","YES" }
|
||||
DEFAULT ::oINI:aUserToolbars[ 4 ] TO { "","YES","","","YES","YES","YES" }
|
||||
DEFAULT ::oINI:aUserToolbars[ 5 ] TO { "","YES","","","YES","YES","YES" }
|
||||
ENDIF
|
||||
|
||||
RETURN Self
|
||||
@@ -274,9 +274,9 @@ METHOD IdeToolsManager:show()
|
||||
ENDIF
|
||||
|
||||
::clearList()
|
||||
::populateList( ::aINI[ INI_TOOLS ] )
|
||||
::populateList( ::oINI:aTools )
|
||||
::oUI:q_listNames:setCurrentRow( 0 )
|
||||
::oIde:setPosByIni( ::oUI:oWidget, ToolsDialogGeometry )
|
||||
::oIde:setPosByIniEx( ::oUI:oWidget, ::oINI:cToolsDialogGeometry )
|
||||
::oUI:show()
|
||||
|
||||
RETURN Nil
|
||||
@@ -285,7 +285,7 @@ METHOD IdeToolsManager:show()
|
||||
|
||||
METHOD IdeToolsManager:execEvent( cMode, p )
|
||||
LOCAL cFile, cFileName, nIndex, qItem, cName, nRow
|
||||
LOCAL aTools := ::aINI[ INI_TOOLS ]
|
||||
LOCAL aTools := ::oINI:aTools
|
||||
|
||||
HB_SYMBOL_UNUSED( p )
|
||||
|
||||
@@ -337,7 +337,7 @@ METHOD IdeToolsManager:execEvent( cMode, p )
|
||||
qItem := QListWidgetItem():from( ::oUI:q_listNames:currentItem() )
|
||||
cName := qItem:text()
|
||||
IF ( nIndex := ascan( aTools, {|e_| e_[ 1 ] == cName } ) ) > 0
|
||||
hb_adel( ::aINI[ INI_TOOLS ], nIndex, .t. )
|
||||
hb_adel( ::oINI:aTools, nIndex, .t. )
|
||||
::clearList()
|
||||
::populateList()
|
||||
ENDIF
|
||||
@@ -379,7 +379,7 @@ METHOD IdeToolsManager:execEvent( cMode, p )
|
||||
ENDIF
|
||||
EXIT
|
||||
CASE "buttonClose_clicked"
|
||||
::oIde:aIni[ INI_HBIDE, ToolsDialogGeometry ] := hbide_posAndSize( ::oUI:oWidget )
|
||||
::oIde:oINI:cToolsDialogGeometry := hbide_posAndSize( ::oUI:oWidget )
|
||||
::oUI:done( 1 )
|
||||
EXIT
|
||||
CASE "User_Toolbar_clicked"
|
||||
@@ -557,11 +557,11 @@ METHOD IdeToolsManager:ini2controls( nIndex )
|
||||
METHOD IdeToolsManager:controls2ini( nIndex )
|
||||
|
||||
IF empty( nIndex )
|
||||
aadd( ::aINI[ INI_TOOLS ], {} )
|
||||
nIndex := len( ::aINI[ INI_TOOLS ] )
|
||||
aadd( ::oINI:aTools, {} )
|
||||
nIndex := len( ::oINI:aTools )
|
||||
ENDIF
|
||||
|
||||
::aINI[ INI_TOOLS, nIndex ] := { ::oUI:q_editName:text() , ;
|
||||
::oINI:aTools[ nIndex ] := { ::oUI:q_editName:text() , ;
|
||||
hbide_pathNormalized( ::oUI:q_editCmdLine:text() ), ;
|
||||
hbide_pathNormalized( ::oUI:q_editParams:text() ), ;
|
||||
hbide_pathNormalized( ::oUI:q_editStayIn:text() ), ;
|
||||
@@ -588,7 +588,7 @@ METHOD IdeToolsManager:clearList()
|
||||
METHOD IdeToolsManager:populateList( aList )
|
||||
LOCAL a_
|
||||
|
||||
DEFAULT aList TO ::aINI[ INI_TOOLS ]
|
||||
DEFAULT aList TO ::oINI:aTools
|
||||
|
||||
FOR EACH a_ IN aList
|
||||
::oUI:q_listNames:addItem( a_[ 1 ] )
|
||||
@@ -624,7 +624,7 @@ METHOD IdeToolsManager:buildPanelsButton()
|
||||
|
||||
::qPanelsMenu := QMenu():new()
|
||||
::addPanelsMenu( "Main" )
|
||||
FOR EACH cView IN ::aINI[ INI_VIEWS ]
|
||||
FOR EACH cView IN ::oINI:aViews
|
||||
::addPanelsMenu( cView )
|
||||
NEXT
|
||||
::qPanelsButton := QToolButton():new()
|
||||
|
||||
Reference in New Issue
Block a user