diff --git a/harbour/ChangeLog b/harbour/ChangeLog index ed1dc38cec..a079bacb3e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,17 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-01-27 18:45 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * contrib/hbide/hbide.prg + * contrib/hbide/ideactions.prg + * contrib/hbide/idefindreplace.prg + * contrib/hbide/resources/findinfiles.ui + + Started implementation of "Find in Files" option. + Just to have a glimpse what components it will contain, + click on "Search" button along-side "Find" buttons. + It is not working but it may prompt you which feature + I missed to include. Just play. + 2010-01-27 08:58 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbide/hbide.prg * contrib/hbide/idemisc.prg diff --git a/harbour/contrib/hbide/hbide.prg b/harbour/contrib/hbide/hbide.prg index 3b01de8eab..f75e91d494 100644 --- a/harbour/contrib/hbide/hbide.prg +++ b/harbour/contrib/hbide/hbide.prg @@ -470,6 +470,7 @@ METHOD HbIde:execAction( cKey ) CASE "BlockComment" CASE "StreamComment" CASE "switchReadOnly" + CASE "Search" CASE "Find" CASE "SetMark" CASE "GotoMark" @@ -544,6 +545,9 @@ METHOD HbIde:execEditorAction( cKey ) ::oFR:show() ENDIF EXIT + CASE "Search" + IdeFindInFiles():new( Self ):create():show() + EXIT CASE "SetMark" ::oEM:setMark() EXIT diff --git a/harbour/contrib/hbide/ideactions.prg b/harbour/contrib/hbide/ideactions.prg index baa8ab2d26..ef77ad9800 100644 --- a/harbour/contrib/hbide/ideactions.prg +++ b/harbour/contrib/hbide/ideactions.prg @@ -230,7 +230,7 @@ METHOD IdeActions:loadActions() aadd( aAct, { "SelectAll" , "Select ~All" , "selectall" , "" , "No", "Yes" } ) aadd( aAct, { "SelectionMode" , "Toggle Selection Mode" , "stream" , "" , "No", "Yes" } ) aadd( aAct, { "Find" , "~Find / Replace" , "find" , "^F" , "No", "Yes" } ) - aadd( aAct, { "Search" , "Search" , "search" , "" , "No", "Yes" } ) + aadd( aAct, { "Search" , "F~ind in Files" , "search" , "" , "No", "Yes" } ) aadd( aAct, { "SetMark" , "Set Mark" , "placeremovemark", "" , "No", "Yes" } ) aadd( aAct, { "GotoMark" , "Goto Mark" , "gotomark" , "" , "No", "Yes" } ) aadd( aAct, { "Goto" , "~Goto Line" , "gotoline" , "^G" , "No", "Yes" } ) @@ -451,6 +451,7 @@ METHOD IdeActions:buildMainMenu() oSubMenu:addItem( { ::getAction( "SelectAll" ), {|| oIde:execAction( "SelectAll" ) } } ) hbide_menuAddSep( oSubMenu ) oSubMenu:addItem( { ::getAction( "Find" ), {|| oIde:execAction( "Find" ) } } ) + oSubMenu:addItem( { ::getAction( "FindInFiles" ), {|| oIde:execAction( "FindInFiles" ) } } ) oSubMenu:addItem( { ::getAction( "Goto" ), {|| oIde:execAction( "Goto" ) } } ) hbide_menuAddSep( oSubMenu ) oSubMenu:addItem( { ::getAction( "DuplicateLine" ), {|| oIde:execAction( "DuplicateLine" ) } } ) diff --git a/harbour/contrib/hbide/idefindreplace.prg b/harbour/contrib/hbide/idefindreplace.prg index 90e9f8e1ad..ee24227be2 100644 --- a/harbour/contrib/hbide/idefindreplace.prg +++ b/harbour/contrib/hbide/idefindreplace.prg @@ -131,6 +131,7 @@ METHOD IdeFindReplace:create( oIde ) METHOD IdeFindReplace:destroy() ::oUI:hide() + ::oUI:destroy() ::oUI:oWidget:pPtr := 0 RETURN Self @@ -305,4 +306,67 @@ METHOD IdeFindReplace:updateFindReplaceData( cMode ) RETURN Self /*----------------------------------------------------------------------*/ +// +// Class IdeFindInFiles +// +/*----------------------------------------------------------------------*/ + +CLASS IdeFindInFiles INHERIT IdeObject + + METHOD new( oIde ) + METHOD create( oIde ) + METHOD destroy() + METHOD show() + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD IdeFindInFiles:new( oIde ) + + ::oIde := oIde + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeFindInFiles:create( oIde ) + + DEFAULT oIde TO ::oIde + + ::oIde := oIde + + ::oUI := HbpQtUI():new( ::oIde:oDlg ) + ::oUI:file := ::oIde:resPath + "findinfiles.ui" + ::oUI:create() + //::oUI:setWindowFlags( Qt_Sheet ) + ::oUI:exec() + + ::destroy() + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeFindInFiles:destroy() + + ::oUI:hide() + + ::oUI:destroy() + + ::oUI:oWidget:pPtr := 0 + ::oUI:oWidget:pPtr := NIL + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeFindInFiles:show() + + ::oUI:show() + + RETURN Self + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbide/resources/findinfiles.ui b/harbour/contrib/hbide/resources/findinfiles.ui new file mode 100644 index 0000000000..7e035a2763 --- /dev/null +++ b/harbour/contrib/hbide/resources/findinfiles.ui @@ -0,0 +1,342 @@ + + + Dialog + + + + 0 + 0 + 364 + 472 + + + + Dialog + + + + + + + 60 + 16777215 + + + + Projects: + + + + + + + QAbstractItemView::NoEditTriggers + + + QAbstractItemView::MultiSelection + + + true + + + + + + + Qt::Vertical + + + + + + + + 0 + 0 + + + + Check all + + + + + + + Qt::Horizontal + + + + + + + + 0 + 0 + + + + *.* + + + + + + + + 0 + 0 + + + + *.prg + + + + + + + + 0 + 0 + + + + *.c + + + + + + + + 0 + 0 + + + + *.cpp + + + + + + + + 0 + 0 + + + + *.ch + + + + + + + + 0 + 0 + + + + *.h + + + + + + + + 60 + 16777215 + + + + Folder: + + + + + + + Include sub-projects + + + + + + + + 0 + 0 + + + + *.rc + + + + + + + + + + + 0 + 0 + + + + *.hbi + + + + + + + Include sub-folders + + + + + + + Include Opened tabs + + + + + + + + 0 + 0 + + + + *.hbp + + + + + + + Qt::Horizontal + + + + + + + + 60 + 16777215 + + + + Expression + + + + + + + + + + Match case + + + + + + + List only + + + + + + + + 60 + 16777215 + + + + Replace: + + + + + + + + + + Qt::Horizontal + + + + + + + + 77 + 16777215 + + + + Find + + + + + + + + 77 + 16777215 + + + + Close + + + + + + + false + + + false + + + + 1 + + + + + + + + + 77 + 16777215 + + + + Stop + + + + + + + +