diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 414a9c17ef..39fa205ae4 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,20 @@ The license applies to all entries newer than 2009-04-28. */ +2011-02-11 13:52 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbide/dbstruct.ui + * contrib/hbide/idebrowse.prg + * contrib/hbide/ideharbourhelp.prg + * contrib/hbide/idehome.prg + ! Fixed: "Welcom" tab - tooltip and links were broken sometimes. + + Added: "ideBrowse" - "Structure" dialog - button. + Click results in structure of the current table structure + be pasted on the clipboard under this format: + . LOCAL aStruct := { { "Name", "C", 20, 0 },; + { "Code", "C", 8, 0 } } + % Tried to fix "nix" dependant path cases. Hopefully + "Documents Viewer" be avialble on "nixes". + 2011-02-11 21:57 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbqt/qtcore/hbqt_pointer.cpp * contrib/hbqt/qtcore/hbqt.h diff --git a/harbour/contrib/hbide/dbstruct.ui b/harbour/contrib/hbide/dbstruct.ui index 57473af099..6cb2724185 100644 --- a/harbour/contrib/hbide/dbstruct.ui +++ b/harbour/contrib/hbide/dbstruct.ui @@ -313,6 +313,19 @@ + + + + 204 + 360 + 75 + 23 + + + + Copy Struct + + diff --git a/harbour/contrib/hbide/idebrowse.prg b/harbour/contrib/hbide/idebrowse.prg index 456dff67f9..adff2daa15 100644 --- a/harbour/contrib/hbide/idebrowse.prg +++ b/harbour/contrib/hbide/idebrowse.prg @@ -486,7 +486,7 @@ METHOD IdeBrowseManager:setPanel( cPanel ) /*----------------------------------------------------------------------*/ METHOD IdeBrowseManager:execEvent( cEvent, p, p1 ) - LOCAL cTable, cPath, cPanel, qEvent, qMime, qList, i, cExt, qUrl + LOCAL cTable, cPath, cPanel, qEvent, qMime, qList, i, cExt, qUrl, aStruct, cTmp HB_SYMBOL_UNUSED( p ) HB_SYMBOL_UNUSED( p1 ) @@ -667,6 +667,22 @@ METHOD IdeBrowseManager:execEvent( cEvent, p, p1 ) EXIT CASE "buttonZaptable_clicked" EXIT + CASE "buttonCopyStruct_clicked" + IF !empty( aStruct := ::oCurBrw:dbStruct() ) + i := 0 + aeval( aStruct, {|e_| iif( len( e_[ 1 ] ) > i, i := len( e_[ 1 ] ), NIL ) } ) + i += 2 + + cTmp := " LOCAL aStruct := {" + aeval( aStruct, {|e_,n| cTmp += iif( n == 1, ' { ', space( 20 ) + ' { ' ) + ; + pad( '"' + e_[ 1 ] + '"', i ) + ', "' + e_[ 2 ] + '", ' + ; + str( e_[ 3 ], 4, 0 ) + ', ' + ; + str( e_[ 4 ], 2, 0 ) + ' }' + ; + iif( len( aStruct ) == n, " }", ",;" ) + hb_eol() } ) + + QClipboard():setText( cTmp ) + ENDIF + EXIT /* End - left-toolbar actions */ ENDSWITCH @@ -854,6 +870,9 @@ METHOD IdeBrowseManager:buildUiStruct() ::qStruct:q_comboType:addItem( "Logical" ) oTbl:connect( "itemSelectionChanged()", {|| ::execEvent( "fieldsTable_itemSelectionChanged" ) } ) + + ::qStruct:q_buttonCopyStruct:connect( "clicked()", {|| ::execEvent( "buttonCopyStruct_clicked" ) } ) + RETURN Self /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbide/ideharbourhelp.prg b/harbour/contrib/hbide/ideharbourhelp.prg index 578a537c95..a9cbbae47d 100644 --- a/harbour/contrib/hbide/ideharbourhelp.prg +++ b/harbour/contrib/hbide/ideharbourhelp.prg @@ -676,11 +676,13 @@ STATIC FUNCTION hbide_buildFoldersTree( aNodes, aPaths ) FOR i := 1 TO len( aSubs ) IF !empty( aSubs[ i ] ) cCPath := hbide_buildPathFromSubs( aSubs, i ) - n := ascan( aNodes, {|e_| hb_FileMatch( hbide_pathNormalized( e_[ 4 ], .t. ), hbide_pathNormalized( cRoot + cCPath, .t. ) ) } ) + //n := ascan( aNodes, {|e_| hb_FileMatch( hbide_pathNormalized( e_[ 4 ], .t. ), hbide_pathNormalized( cRoot + cCPath, .t. ) ) } ) + n := ascan( aNodes, {|e_| hb_FileMatch( hbide_pathNormalized( e_[ 4 ], .f. ), hbide_pathNormalized( cRoot + cCPath, .f. ) ) } ) IF n == 0 cPPath := hbide_buildPathFromSubs( aSubs, i - 1 ) - nP := ascan( aNodes, {|e_| hb_FileMatch( hbide_pathNormalized( e_[ 4 ], .t. ), hbide_pathNormalized( cRoot + cPPath, .t. ) ) } ) + //nP := ascan( aNodes, {|e_| hb_FileMatch( hbide_pathNormalized( e_[ 4 ], .t. ), hbide_pathNormalized( cRoot + cPPath, .t. ) ) } ) + nP := ascan( aNodes, {|e_| hb_FileMatch( hbide_pathNormalized( e_[ 4 ], .f. ), hbide_pathNormalized( cRoot + cPPath, .f. ) ) } ) oParent := aNodes[ nP, 1 ] diff --git a/harbour/contrib/hbide/idehome.prg b/harbour/contrib/hbide/idehome.prg index f20fbc5325..99d94c4415 100644 --- a/harbour/contrib/hbide/idehome.prg +++ b/harbour/contrib/hbide/idehome.prg @@ -174,22 +174,22 @@ METHOD IdeHome:execEvent( nMode, p ) LOCAL cAct, qUrl, cText, cExt DO CASE - CASE nMode == tabWidget_currentChanged + CASE nMode == "tabWidget_currentChanged" IF p == 0 ::qCurBrowser := ::qWelcomeBrowser ELSEIF p == 1 ::qCurBrowser := ::qFaqBrowser ENDIF - CASE nMode == browserStat_anchorClicked + CASE nMode == "browserStat_anchorClicked" qUrl := QUrlFromPointer( p ) - cText := lower( qUrl:toString() ) + cText := qUrl:toString() - IF "prj-" $ cText + IF "prj-" $ lower( cText ) ::cClickedProject := substr( cText, 5 ) ::buildProjectDetails( ::cClickedProject ) - ELSEIF "fle-" $ cText + ELSEIF "fle-" $ lower( cText ) ::cClickedSource := substr( cText, 5 ) /* Send it for Editing */ @@ -203,7 +203,7 @@ METHOD IdeHome:execEvent( nMode, p ) ::buildProjectDetails( ::cClickedProject ) ENDIF - CASE nMode == browserWelcome_contextMenuRequested .OR. nMode == browserFaq_contextMenuRequested + CASE nMode == "browserWelcome_contextMenuRequested" .OR. nMode == "browserFaq_contextMenuRequested" IF !empty( cAct := hbide_popupBrwContextMenu( ::qCurBrowser, p ) ) IF cAct $ "Back,Forward,Home" @@ -289,8 +289,8 @@ METHOD IdeHome:buildWelcomeTab() ::qWelcomeBrowser := qBrw ::qCurBrowser := qBrw - qBrw:connect( "anchorClicked(QUrl)" , {|p| ::execEvent( browserStat_anchorClicked , p ) } ) - qBrw:connect( "customContextMenuRequested(QPoint)", {|p| ::execEvent( browserWelcome_contextMenuRequested, p ) } ) + qBrw:connect( "anchorClicked(QUrl)" , {|p| ::execEvent( "browserStat_anchorClicked" , p ) } ) + qBrw:connect( "customContextMenuRequested(QPoint)", {|p| ::execEvent( "browserWelcome_contextMenuRequested", p ) } ) qSList := QStringList() qSList:append( "docs" ) @@ -488,7 +488,7 @@ METHOD IdeHome:buildFaqTab() qBrw:setContextMenuPolicy( Qt_CustomContextMenu ) ::setStyleSheetTextBrowser( qBrw ) - qBrw:connect( "customContextMenuRequested(QPoint)", {|p| ::execEvent( browserFaq_contextMenuRequested, p ) } ) + qBrw:connect( "customContextMenuRequested(QPoint)", {|p| ::execEvent( "browserFaq_contextMenuRequested", p ) } ) ::oFaqTab := oTab ::qFaqBrowser := qBrw