2012-08-28 14:13 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/dict.prg
* contrib/hbide/functions.prg
* contrib/hbide/saveload.prg
+ Added: to load HbIDE created {project_name}.tag files
for "Dictionaries" implementation.The options earlier were
.hbx, .dic, .txt. It will save you a lot of time to create
disctionaries manually.
This commit is contained in:
@@ -16,6 +16,15 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-08-28 14:13 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbide/dict.prg
|
||||
* contrib/hbide/functions.prg
|
||||
* contrib/hbide/saveload.prg
|
||||
+ Added: to load HbIDE created {project_name}.tag files
|
||||
for "Dictionaries" implementation.The options earlier were
|
||||
.hbx, .dic, .txt. It will save you a lot of time to create
|
||||
disctionaries manually.
|
||||
|
||||
2012-08-28 12:46 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbqt/qtgui/hbqt_init.cpp
|
||||
! Fixed: QTableWidgetItem => QTableWidgetItem*
|
||||
|
||||
@@ -111,10 +111,6 @@ FUNCTION hbide_loadUserDictionaries( oIde )
|
||||
LOCAL aDict := oIde:oINI:aDictionaries
|
||||
LOCAL oDict, i
|
||||
|
||||
IF Empty( aDict )
|
||||
AAdd( aDict, "C:\harbour\contrib\hbide\projects\my.dic;YES;.PRG.C.CPP;ASIS;NO;NO;NO;NO;{0,0,0};{122,133,233};" ) /* Testing */
|
||||
ENDIF
|
||||
|
||||
FOR i := 1 TO Len( aDict )
|
||||
oDict := IdeDictionary():new( oIde ):create()
|
||||
oDict:load( aDict[ i ] )
|
||||
@@ -148,6 +144,7 @@ CLASS IdeDictionary INHERIT IdeObject
|
||||
DATA lBgColor INIT .F.
|
||||
DATA cTxtColor INIT ""
|
||||
DATA cBgColor INIT ""
|
||||
DATA aRawLines INIT {}
|
||||
|
||||
DATA hItems INIT {=>}
|
||||
|
||||
@@ -242,9 +239,19 @@ METHOD IdeDictionary:load( cDict )
|
||||
IF !empty( ::cFilename ) .AND. hb_fileExists( ::cFilename )
|
||||
IF Lower( hb_FNameExt( ::cFilename ) ) == ".hbx"
|
||||
b_:= hbide_getHbxFunctions( hb_MemoRead( ::cFilename ) )
|
||||
ELSEIF Lower( hb_FNameExt( ::cFilename ) ) == ".tag"
|
||||
c_:= hb_deserialize( hb_memoRead( ::cFilename ) )
|
||||
IF Empty( c_ ) .OR. ! HB_ISARRAY( c_ )
|
||||
c_:= {}
|
||||
ENDIF
|
||||
b_:= {}
|
||||
FOR EACH s IN c_
|
||||
AAdd( b_, s[ 5 ] )
|
||||
NEXT
|
||||
ELSE
|
||||
b_:= hbide_readSource( ::cFilename )
|
||||
ENDIF
|
||||
::aRawLines := b_
|
||||
FOR EACH s IN b_
|
||||
s := alltrim( s )
|
||||
IF empty( s )
|
||||
@@ -324,7 +331,7 @@ METHOD IdeDictionary:populateUI( oUI )
|
||||
oUI:radioDictAsIn : setChecked( ::cConvMode == "ASIS" )
|
||||
|
||||
oUI:plainKeywords : clear()
|
||||
oUI:plainKeywords : setPlainText( hb_MemoRead( ::cFileName ) )
|
||||
oUI:plainKeywords : setPlainText( hbide_arrayToMemo( ::aRawLines ) )
|
||||
|
||||
::setButtonColors( oUI )
|
||||
|
||||
|
||||
@@ -146,13 +146,13 @@ METHOD IdeFunctions:create( oIde )
|
||||
|
||||
::buildHeader()
|
||||
|
||||
::oUI:editFunction :connect( "textChanged(QString)" , {|p| ::execEvent( __editFunc_textChanged__ , p ) } )
|
||||
::oUI:editFunction :connect( "returnPressed()" , {| | ::execEvent( __editFunc_returnPressed__ ) } )
|
||||
::oUI:buttonMark :connect( "clicked()" , {| | ::execEvent( __buttonMark_clicked__ ) } )
|
||||
::oUI:buttonLoad :connect( "clicked()" , {| | ::execEvent( __buttonLoad_clicked__ ) } )
|
||||
::oUI:buttonTag :connect( "clicked()" , {| | ::execEvent( __buttonTag_clicked__ ) } )
|
||||
::oUI:buttonClose :connect( "clicked()" , {| | ::execEvent( __buttonClose_clicked__ ) } )
|
||||
::oUI:tableFuncList:connect( "itemSelectionChanged()" , {| | ::execEvent( __tableFuncList_itemSelectionChanged__ ) } )
|
||||
::oUI:editFunction :connect( "textChanged(QString)" , {|p| ::execEvent( __editFunc_textChanged__ , p ) } )
|
||||
::oUI:editFunction :connect( "returnPressed()" , {| | ::execEvent( __editFunc_returnPressed__ ) } )
|
||||
::oUI:buttonMark :connect( "clicked()" , {| | ::execEvent( __buttonMark_clicked__ ) } )
|
||||
::oUI:buttonLoad :connect( "clicked()" , {| | ::execEvent( __buttonLoad_clicked__ ) } )
|
||||
::oUI:buttonTag :connect( "clicked()" , {| | ::execEvent( __buttonTag_clicked__ ) } )
|
||||
::oUI:buttonClose :connect( "clicked()" , {| | ::execEvent( __buttonClose_clicked__ ) } )
|
||||
::oUI:tableFuncList:connect( "itemSelectionChanged()" , {| | ::execEvent( __tableFuncList_itemSelectionChanged__ ) } )
|
||||
::oUI:tableFuncList:connect( "itemDoubleClicked(QTableWidgetItem*)", {|p| ::execEvent( __tableFuncList_itemDoubleClicked__, p ) } )
|
||||
|
||||
RETURN Self
|
||||
|
||||
@@ -2262,7 +2262,11 @@ METHOD IdeSetup:execEvent( nEvent, p, p1 )
|
||||
EXIT
|
||||
CASE __buttonDictAdd_clicked__
|
||||
cFile := hbide_fetchAFile( ::oDlg, "Open a Dictionary", ;
|
||||
{ {"HBX Files", "*.hbx"}, {"Text Files", "*.txt"}, {"Dictionary Files", "*.dic"}, {"All Files", "*" } } /*, cDftDir, cDftSuffix, lAllowMulti*/ )
|
||||
{ { "HBX Files" , "*.hbx" }, ;
|
||||
{ "HbIDE .tag Files", "*.tag" }, ;
|
||||
{ "Text Files" , "*.txt" }, ;
|
||||
{ "Dictionary Files", "*.dic" }, ;
|
||||
{ "All Files" , "*" } } /*, cDftDir, cDftSuffix, lAllowMulti*/ )
|
||||
IF ! Empty( cFile )
|
||||
oDict := IdeDictionary():new( ::oIde ):create()
|
||||
oDict:load( cFile )
|
||||
|
||||
Reference in New Issue
Block a user