From dd856e4f5e80f133f3711bd48eddc39969fb669b Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Sat, 20 Mar 2010 18:28:56 +0000 Subject: [PATCH] 2010-03-20 11:25 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbide/hbide.ch * contrib/hbide/hbide.prg * contrib/hbide/idefunctions.prg * contrib/hbide/idesaveload.prg + Implemented: auto-loading the last "Re-tagged" functions prototype. It may take some time but it is done at the background, so user will never experience the difference. You can start working on any other aspect of hbIDE. --- harbour/ChangeLog | 10 ++++++++++ harbour/contrib/hbide/hbide.ch | 5 +++-- harbour/contrib/hbide/hbide.prg | 3 +++ harbour/contrib/hbide/idefunctions.prg | 26 +++++++++++++++----------- harbour/contrib/hbide/idesaveload.prg | 17 ++++++++++++++++- 5 files changed, 47 insertions(+), 14 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9eefc5d1a2..e008fcaca3 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,16 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-03-20 11:25 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * contrib/hbide/hbide.ch + * contrib/hbide/hbide.prg + * contrib/hbide/idefunctions.prg + * contrib/hbide/idesaveload.prg + + Implemented: auto-loading the last "Re-tagged" functions + prototype. It may take some time but it is done at the + background, so user will never experience the difference. + You can start working on any other aspect of hbIDE. + 2010-03-20 18:51 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * bin/postinst.bat ! Fixed/cleaned latest modification, removed redundancy. diff --git a/harbour/contrib/hbide/hbide.ch b/harbour/contrib/hbide/hbide.ch index 9dd6dba378..dd4a963e9f 100644 --- a/harbour/contrib/hbide/hbide.ch +++ b/harbour/contrib/hbide/hbide.ch @@ -71,9 +71,10 @@ #define INI_RECENTPROJECTS 7 #define INI_FOLDERS 8 #define INI_VIEWS 9 -#define INI_GENERAL 10 +#define INI_TAGGEDPROJECTS 10 +#define INI_GENERAL 11 -#define INI_SECTIONS_COUNT 10 +#define INI_SECTIONS_COUNT 11 /* INI_HBIDE */ diff --git a/harbour/contrib/hbide/hbide.prg b/harbour/contrib/hbide/hbide.prg index 20af267ee5..623cd2901e 100644 --- a/harbour/contrib/hbide/hbide.prg +++ b/harbour/contrib/hbide/hbide.prg @@ -503,6 +503,9 @@ hbide_dbg( "HbIde:create( cProjIni )", "#Params=" ) qSplash:close() //qSplash := NIL + /* Load tags last tagged projects */ + ::oFN:loadTags( ::aINI[ INI_TAGGEDPROJECTS ] ) + DO WHILE .t. ::nEvent := AppEvent( @::mp1, @::mp2, @::oXbp ) diff --git a/harbour/contrib/hbide/idefunctions.prg b/harbour/contrib/hbide/idefunctions.prg index 00ff5f4037..c1b875bf06 100644 --- a/harbour/contrib/hbide/idefunctions.prg +++ b/harbour/contrib/hbide/idefunctions.prg @@ -120,7 +120,7 @@ CLASS IdeFunctions INHERIT IdeObject METHOD jumpToFunction( cWord ) METHOD positionToFunction( cWord, lShowTip ) METHOD buildTags() - METHOD loadTags() + METHOD loadTags( aProjects ) METHOD listProjects() METHOD clearProjects() METHOD getMarkedProjects() @@ -425,20 +425,22 @@ METHOD IdeFunctions:enableControls( lEnable ) ::oUI:q_editFunction:setEnabled( lEnable ) - ::showApplicationCursor( iif( lEnable, NIL, Qt_WaitCursor ) ) + ::showApplicationCursor( iif( lEnable, NIL, Qt_BusyCursor ) ) RETURN Self /*----------------------------------------------------------------------*/ -METHOD IdeFunctions:loadTags() - LOCAL cProjectTitle, cProjFile, cTagFile, aTags, n +METHOD IdeFunctions:loadTags( aProjects ) + LOCAL cProjectTitle, cProjFile, cTagFile, aTags, n, a_ LOCAL lPopulate := .f. - LOCAL a_:= ::getMarkedProjects() - IF empty( a_ ) + DEFAULT aProjects TO ::getMarkedProjects() + + IF empty( aProjects ) RETURN Self ENDIF + a_:= aProjects IF !( ::inAction ) ::enableControls( .f. ) @@ -481,11 +483,13 @@ METHOD IdeFunctions:buildTags() LOCAL cProjectTitle LOCAL a_:= ::getMarkedProjects() - FOR EACH cProjectTitle IN a_ - ::tagProject( cProjectTitle ) - NEXT - - ::clearProjects() + IF !empty( a_ ) + FOR EACH cProjectTitle IN a_ + ::tagProject( cProjectTitle ) + NEXT + ::oIde:aINI[ INI_TAGGEDPROJECTS ] := a_ + ::clearProjects() + ENDIF RETURN Self diff --git a/harbour/contrib/hbide/idesaveload.prg b/harbour/contrib/hbide/idesaveload.prg index 36d5641969..cbb73c73bd 100644 --- a/harbour/contrib/hbide/idesaveload.prg +++ b/harbour/contrib/hbide/idesaveload.prg @@ -204,6 +204,13 @@ hbide_dbg( "hbide_saveINI( oIde )", 0, oIde:nRunMode, oIde:cProjIni ) FOR n := 1 TO len( oIde:aIni[ INI_VIEWS ] ) aadd( txt_, "view_" + hb_ntos( n ) + "=" + oIde:aIni[ INI_VIEWS, n ] ) NEXT + + aadd( txt_, "[TAGGEDPROJECTS]" ) + aadd( txt_, " " ) + FOR n := 1 TO len( oIde:aIni[ INI_TAGGEDPROJECTS ] ) + aadd( txt_, "taggedproject_" + hb_ntos( n ) + "=" + oIde:aIni[ INI_TAGGEDPROJECTS, n ] ) + NEXT + aadd( txt_, " " ) aadd( txt_, "[General]" ) aadd( txt_, " " ) @@ -277,6 +284,9 @@ FUNCTION hbide_loadINI( oIde, cHbideIni ) CASE "[FOLDERS]" nPart := INI_FOLDERS EXIT + CASE "[TAGGEDPROJECTS]" + nPart := INI_TAGGEDPROJECTS + EXIT CASE "[VIEWS]" nPart := INI_VIEWS EXIT @@ -328,7 +338,7 @@ FUNCTION hbide_loadINI( oIde, cHbideIni ) ENDIF CASE nPart == INI_RECENTPROJECTS .OR. ; - nPart == INI_RECENTFILES + nPart == INI_RECENTFILES IF hbide_parseKeyValPair( s, @cKey, @cVal ) IF Len( oIde:aIni[ nPart ] ) < 25 @@ -349,6 +359,11 @@ FUNCTION hbide_loadINI( oIde, cHbideIni ) aadd( oIde:aIni[ nPart ], cVal ) ENDIF + CASE nPart == INI_TAGGEDPROJECTS + IF hbide_parseKeyValPair( s, @cKey, @cVal ) + aadd( oIde:aIni[ nPart ], cVal ) + ENDIF + ENDCASE EXIT ENDSWITCH