2010-15-16 23:02 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbide/hbide.prg
* contrib/hbide/idemisc.prg
* contrib/hbide/ideobject.prg
* contrib/hbide/ideprojmanager.prg
* contrib/hbide/idesources.prg
+ Implemented: "new" source opens a file save dialog to provide
a valid name with extention. Syntax highlighting will be based on that.
+ Implemented: "new" project opens a Select Path dialog to
designate the project location. The path obtained as such is
posted in the "Project Location field of "Project Properties".
This commit is contained in:
@@ -17,6 +17,18 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2010-15-16 23:02 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbide/hbide.prg
|
||||
* contrib/hbide/idemisc.prg
|
||||
* contrib/hbide/ideobject.prg
|
||||
* contrib/hbide/ideprojmanager.prg
|
||||
* contrib/hbide/idesources.prg
|
||||
+ Implemented: "new" source opens a file save dialog to provide
|
||||
a valid name with extention. Syntax highlighting will be based on that.
|
||||
+ Implemented: "new" project opens a Select Path dialog to
|
||||
designate the project location. The path obtained as such is
|
||||
posted in the "Project Location field of "Project Properties".
|
||||
|
||||
2010-15-16 21:05 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
|
||||
* contrib/hbide/resources/tabreadonly.png
|
||||
! Changed: to reflect clearly visible readonly status.
|
||||
|
||||
@@ -229,6 +229,7 @@ CLASS HbIde
|
||||
DATA lLineNumbersVisible INIT .t.
|
||||
DATA lCurrentLineHighlightEnabled INIT .t.
|
||||
|
||||
DATA cWrkFolderLast INIT ""
|
||||
DATA cWrkProject INIT ""
|
||||
DATA cWrkTheme INIT ""
|
||||
DATA cWrkCodec INIT ""
|
||||
|
||||
@@ -551,6 +551,11 @@ FUNCTION hbide_pathStripLastSlash( cPath )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
FUNCTION hbide_pathAppendLastSlash( cPath )
|
||||
RETURN iif( right( cPath, 1 ) $ "\/", cPath, cPath + hb_osPathSeparator() )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
FUNCTION hbide_pathToOSPath( cPath )
|
||||
LOCAL n
|
||||
|
||||
@@ -1980,3 +1985,21 @@ FUNCTION hbide_parseToolComponents( cCompositeTool )
|
||||
RETURN a_
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
FUNCTION hbide_SetWrkFolderLast( cPathFile )
|
||||
LOCAL cPth, cOldPath
|
||||
|
||||
STATIC cPath
|
||||
IF empty( cPath )
|
||||
cPath := hb_dirBase()
|
||||
ENDIF
|
||||
cOldPath := cPath
|
||||
|
||||
IF hb_isChar( cPathFile )
|
||||
hb_fNameSplit( cPathFile, @cPth )
|
||||
cPath := cPth
|
||||
ENDIF
|
||||
RETURN cOldPath
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -139,6 +139,7 @@ CLASS IdeObject
|
||||
ACCESS cWrkHarbour INLINE ::oIde:cWrkHarbour
|
||||
ACCESS cPathShortcuts INLINE ::oIde:cPathShortcuts
|
||||
ACCESS cTextExtensions INLINE ::oIde:cTextExtensions
|
||||
ACCESS cWrkFolderLast INLINE ::oIde:cWrkFolderLast
|
||||
//
|
||||
ACCESS resPath INLINE ::oIde:resPath
|
||||
ACCESS pathSep INLINE ::oIde:pathSep
|
||||
|
||||
@@ -324,7 +324,7 @@ METHOD IdeProjManager:getProperties()
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeProjManager:loadProperties( cProjFileName, lNew, lFetch, lUpdateTree )
|
||||
LOCAL nAlready
|
||||
LOCAL nAlready, cProjPath
|
||||
|
||||
DEFAULT cProjFileName TO ""
|
||||
DEFAULT lNew TO .F.
|
||||
@@ -364,8 +364,17 @@ METHOD IdeProjManager:loadProperties( cProjFileName, lNew, lFetch, lUpdateTree )
|
||||
ENDIF
|
||||
|
||||
IF lFetch
|
||||
IF lNew
|
||||
IF empty( cProjPath := hbide_fetchADir( ::oDlg, "Project Path", hbide_SetWrkFolderLast() ) )
|
||||
RETURN Self
|
||||
ENDIF
|
||||
cProjPath := hbide_pathAppendLastSlash( cProjPath )
|
||||
hbide_SetWrkFolderLast( cProjPath )
|
||||
ENDIF
|
||||
/* Access/Assign via this object */
|
||||
::oProject := IdeProject():new( ::oIDE, ::aPrjProps )
|
||||
::oProject:location := cProjPath
|
||||
::oProject:projPath := cProjPath
|
||||
//
|
||||
::oPropertiesDock:hide()
|
||||
::oPropertiesDock:show()
|
||||
@@ -627,7 +636,6 @@ METHOD IdeProjManager:updateHbp( iIndex )
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeProjManager:fetchProperties()
|
||||
LOCAL cPrjLoc := hb_dirBase() + "projects"
|
||||
|
||||
IF empty( ::oProject )
|
||||
::oProject := IdeProject():new( ::oIDE, ::aPrjProps )
|
||||
@@ -641,7 +649,7 @@ METHOD IdeProjManager:fetchProperties()
|
||||
::oUI:q_comboPrjType:setCurrentIndex( 0 )
|
||||
|
||||
::oUI:q_editPrjTitle :setText( "" )
|
||||
::oUI:q_editPrjLoctn :setText( hbide_pathNormalized( cPrjLoc, .F. ) )
|
||||
::oUI:q_editPrjLoctn :setText( hbide_pathNormalized( ::oProject:location, .F. ) )
|
||||
::oUI:q_editWrkFolder:setText( "" )
|
||||
::oUI:q_editDstFolder:setText( "" )
|
||||
::oUI:q_editBackup :setText( "" )
|
||||
|
||||
@@ -232,15 +232,24 @@ METHOD IdeSourcesManager:saveSource( nTab, lCancel, lAs )
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeSourcesManager:editSource( cSourceFile, nPos, nHPos, nVPos, cTheme, cView, lAlert, lVisible, aBookMarks )
|
||||
LOCAL lNew
|
||||
|
||||
DEFAULT lAlert TO .T.
|
||||
DEFAULT lVisible TO .T.
|
||||
|
||||
IF ( lNew := empty( cSourceFile ) )
|
||||
cSourceFile := hbide_saveAFile( ::oDlg, "Provide source filename", /*aFltr*/, hbide_SetWrkFolderLast(), /*cDftSuffix*/ )
|
||||
IF empty( cSourceFile )
|
||||
RETURN Self
|
||||
ENDIF
|
||||
hbide_SetWrkFolderLast( cSourceFile )
|
||||
ENDIF
|
||||
|
||||
IF !Empty( cSourceFile )
|
||||
IF !( hbide_isValidText( cSourceFile ) )
|
||||
MsgBox( 'File type unknown or unsupported: ' + cSourceFile )
|
||||
RETURN .f.
|
||||
ELSEIF !hb_FileExists( cSourceFile )
|
||||
ELSEIF ! lNew .AND. ! hb_FileExists( cSourceFile )
|
||||
MsgBox( 'File not found: ' + cSourceFile )
|
||||
RETURN .f.
|
||||
ENDIF
|
||||
|
||||
Reference in New Issue
Block a user