From 9d6b8b3896a71098978c7fe38c4c57b11e7908ef Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Thu, 26 May 2011 00:17:23 +0000 Subject: [PATCH] 2011-05-25 17:11 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbide/hbide.hbp * contrib/hbide/hbide.qrc * contrib/hbide/ideactions.prg + contrib/hbide/idechangelog.prg * contrib/hbide/idemain.prg * contrib/hbide/idemisc.prg * contrib/hbide/ideobject.prg + contrib/hbide/resources/memo.png + Added: option. This is announced ChangeLog Manager which simply constructs the changelog entry and inserts at the top of specified ChangeLog file. It is a work-in-progress and this is a just initial commit, but can faily understand what I mean. --- harbour/ChangeLog | 15 +++ harbour/contrib/hbide/hbide.hbp | 2 + harbour/contrib/hbide/hbide.qrc | 1 + harbour/contrib/hbide/ideactions.prg | 7 +- harbour/contrib/hbide/idechangelog.prg | 157 +++++++++++++++++++++++ harbour/contrib/hbide/idemain.prg | 20 ++- harbour/contrib/hbide/idemisc.prg | 3 +- harbour/contrib/hbide/ideobject.prg | 1 + harbour/contrib/hbide/resources/memo.png | Bin 0 -> 423 bytes 9 files changed, 197 insertions(+), 9 deletions(-) create mode 100644 harbour/contrib/hbide/idechangelog.prg create mode 100644 harbour/contrib/hbide/resources/memo.png diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c7f0d56cea..530667fb7f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,21 @@ The license applies to all entries newer than 2009-04-28. */ +2011-05-25 17:11 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbide/hbide.hbp + * contrib/hbide/hbide.qrc + * contrib/hbide/ideactions.prg + + contrib/hbide/idechangelog.prg + * contrib/hbide/idemain.prg + * contrib/hbide/idemisc.prg + * contrib/hbide/ideobject.prg + + contrib/hbide/resources/memo.png + + Added: option. + This is announced ChangeLog Manager which simply constructs + the changelog entry and inserts at the top of specified + ChangeLog file. It is a work-in-progress and this is a just + initial commit, but can faily understand what I mean. + 2011-05-25 12:48 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/gtwvg/wvgpaint.prg ! Fixed: focus was not set to the window from where a modal diff --git a/harbour/contrib/hbide/hbide.hbp b/harbour/contrib/hbide/hbide.hbp index ab0f3f8ce5..7d739b9609 100644 --- a/harbour/contrib/hbide/hbide.hbp +++ b/harbour/contrib/hbide/hbide.hbp @@ -57,6 +57,7 @@ idebrowse.prg hbqreportsmanager.prg hbqtoolbar.prg ideformat.prg +idechangelog.prg ideparseexpr.c docviewgenerator.ui @@ -87,6 +88,7 @@ fetchdate.ui tables.ui updown_v.ui format.ui +changelog.ui hbide.qrc diff --git a/harbour/contrib/hbide/hbide.qrc b/harbour/contrib/hbide/hbide.qrc index 1a9e4a97a4..d8c90a6fab 100644 --- a/harbour/contrib/hbide/hbide.qrc +++ b/harbour/contrib/hbide/hbide.qrc @@ -281,5 +281,6 @@ resources/rp_linediagleft.png resources/rp_ellipse.png resources/rp_shapes.png +resources/memo.png diff --git a/harbour/contrib/hbide/ideactions.prg b/harbour/contrib/hbide/ideactions.prg index d1b18cbb5d..5043cabe3b 100644 --- a/harbour/contrib/hbide/ideactions.prg +++ b/harbour/contrib/hbide/ideactions.prg @@ -311,6 +311,7 @@ METHOD IdeActions:loadActions() aadd( aAct, { "Shortcuts" , "Keyboard Mappings" , "keyboardmappings","" , "No", "Yes" } ) aadd( aAct, { "Setup" , "hbIDE Setup" , "idepreferences" , "" , "No", "Yes" } ) * aadd( aAct, { "Tools" , "Tools and Utilities" , "tools" , "" , "No", "Yes" } ) + aadd( aAct, { "ChangeLog" , "Manage ChangeLog(s)" , "memo" , "" , "No", "Yes" } ) RETURN aAct @@ -624,11 +625,13 @@ METHOD IdeActions:buildMainMenu() hbide_menuAddSep( oSubMenu ) oSubMenu:addItem( { ::getAction( "TB_Tools" ), {|| oIde:execAction( "Tools" ) } } ) hbide_menuAddSep( oSubMenu ) - #if 1 + oSubMenu:addItem( { ::getAction( "ChangeLog" ), {|| oIde:execAction( "ChangeLog" ) } } ) + hbide_menuAddSep( oSubMenu ) + oSubMenu2 := hbide_buildCDPMenu( oIde, oSubMenu ) //hbide_buildCodecMenu( oIde, oSubMenu ) oSubMenu2:title := "~CodePage" oSubMenu:addItem( { oSubMenu2, NIL } ) - #endif + oMenuBar:addItem( { oSubMenu, NIL } ) /*----------------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbide/idechangelog.prg b/harbour/contrib/hbide/idechangelog.prg new file mode 100644 index 0000000000..9acfbbf2aa --- /dev/null +++ b/harbour/contrib/hbide/idechangelog.prg @@ -0,0 +1,157 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * + * Copyright 2011 Pritpal Bedi + * www - http://harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ +/* + * EkOnkar + * ( The LORD is ONE ) + * + * Harbour-Qt IDE + * + * Pritpal Bedi + * 25May2011 + */ +/*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ + +#include "hbide.ch" +#include "common.ch" +#include "hbclass.ch" +#include "hbqtgui.ch" + +/*----------------------------------------------------------------------*/ + +CLASS IdeChangeLog INHERIT IdeObject + + METHOD new( oIde ) + METHOD create( oIde ) + METHOD destroy() + METHOD show() + METHOD execEvent( cEvent, p ) + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD IdeChangeLog:new( oIde ) + + ::oIde := oIde + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeChangeLog:create( oIde ) + + DEFAULT oIde TO ::oIde + ::oIde := oIde + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeChangeLog:destroy() + + IF !empty( ::oUI ) + ::oUI:q_buttonNew :disconnect( "clicked()" ) + + ::oUI:destroy() + ENDIF + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeChangeLog:show() + + IF empty( ::oUI ) + ::oUI := hbide_getUI( "changelog" ) + ::oUI:setWindowFlags( Qt_Sheet ) + ::oUI:setWindowIcon( hbide_image( "hbide" ) ) + + ::oUI:q_buttonChangelog :setIcon( hbide_image( "dc_folder" ) ) + ::oUI:q_buttonAddSrc :setIcon( hbide_image( "dc_plus" ) ) + + ::oUI:q_buttonChangelog :connect( "clicked()", {|| ::execEvent( "buttonChangelog_clicked" ) } ) + + ENDIF + + ::oUI:show() + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeChangeLog:execEvent( cEvent, p ) + LOCAL cPath + + HB_SYMBOL_UNUSED( p ) + + SWITCH cEvent + + CASE "buttonChangelog_clicked" + cPath := hbide_fetchAFile( ::oDlg, "Select a ChangeLog File" ) + IF !empty( cPath ) + ::oUI:q_editChangelog:setText( cPath ) + + ::oUI:q_plainChangelog:clear() + ::oUI:q_plainChangelog:setPlainText( memoread( cPath ) ) + ENDIF + EXIT + + ENDSWITCH + + RETURN NIL + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbide/idemain.prg b/harbour/contrib/hbide/idemain.prg index 0b8df59e64..59b072c52b 100644 --- a/harbour/contrib/hbide/idemain.prg +++ b/harbour/contrib/hbide/idemain.prg @@ -175,6 +175,7 @@ CLASS HbIde DATA oSetup /* Setup Manager */ DATA oINI /* INI Manager */ DATA oFmt /* Code Formatter Manager */ + DATA oCL /* ChangeLog Manager */ DATA nRunMode INIT HBIDE_RUN_MODE_INI DATA nAnimantionMode INIT HBIDE_ANIMATION_NONE @@ -626,24 +627,27 @@ METHOD HbIde:create( aParams ) /* Main Menu */ ::oAC:buildMainMenu() + /* Initialize ChangeLog Manager */ + ::oCL := IdeChangeLog():new():create( Self ) + /* Initialize Doc Writer Manager */ - ::oDW := IdeDocWriter():new( Self ):create() + ::oDW := IdeDocWriter():new():create( Self ) /* Once create Find/Replace dialog */ - ::oFR := IdeFindReplace():new( Self ):create() - ::oFF := IdeFindInFiles():new( Self ):create() + ::oFR := IdeFindReplace():new():create( Self ) + ::oFF := IdeFindInFiles():new():create( Self ) /* Sources Manager */ - ::oSM := IdeSourcesManager():new( Self ):create() + ::oSM := IdeSourcesManager():new():create( Self ) /* Edits Manager */ - ::oEM := IdeEditsManager():new( Self ):create() + ::oEM := IdeEditsManager():new():create( Self ) /* Harbour Help Object */ ::oHL := ideHarbourHelp():new():create( Self ) /* Load Environments */ - ::oEV := IdeEnvironments():new( Self ):create() + ::oEV := IdeEnvironments():new():create( Self ) /* Home Implementation */ ::oHM := IdeHome():new():create( Self ) @@ -850,6 +854,10 @@ METHOD HbIde:execAction( cKey ) ::qStatusBarAction:setChecked( ::lStatusBarVisible ) EXIT + CASE "ChangeLog" + ::oCL:show() + EXIT + CASE "Tools" ::oTM:show() EXIT diff --git a/harbour/contrib/hbide/idemisc.prg b/harbour/contrib/hbide/idemisc.prg index 66c87764fc..32167795aa 100644 --- a/harbour/contrib/hbide/idemisc.prg +++ b/harbour/contrib/hbide/idemisc.prg @@ -280,7 +280,7 @@ FUNCTION hbide_fetchAFile( oWnd, cTitle, aFlt, cDftDir, cDftSuffix ) LOCAL oDlg, cFile DEFAULT cTitle TO "Please Select a File" - DEFAULT aFlt TO { { "All Files", "*.*" } } + DEFAULT aFlt TO { { "All Files", "*" } } DEFAULT cDftDir TO hb_dirBase() oDlg := XbpFileDialog():new():create( oWnd, , { 10,10 } ) @@ -1951,6 +1951,7 @@ FUNCTION hbide_getUI( cUI, qParent ) CASE "fetchdate" ; RETURN hbqtui_FetchDate( qParent ) CASE "tables" ; RETURN hbqtui_Tables( qParent ) CASE "format" ; RETURN hbqtui_Format( qParent ) + CASE "changelog" ; RETURN hbqtui_Changelog( qParent ) ENDSWITCH ENDIF diff --git a/harbour/contrib/hbide/ideobject.prg b/harbour/contrib/hbide/ideobject.prg index 89d176a082..32aef59e0f 100644 --- a/harbour/contrib/hbide/ideobject.prg +++ b/harbour/contrib/hbide/ideobject.prg @@ -101,6 +101,7 @@ CLASS IdeObject ACCESS oSetup INLINE ::oIde:oSetup ACCESS oINI INLINE ::oIde:oINI ACCESS oFmt INLINE ::oIde:oFmt + ACCESS oCL INLINE ::oIde:oCL ACCESS aMeta INLINE ::oIde:aMeta ACCESS aTags INLINE ::oIde:aTags diff --git a/harbour/contrib/hbide/resources/memo.png b/harbour/contrib/hbide/resources/memo.png new file mode 100644 index 0000000000000000000000000000000000000000..84f9b30d391910e8f1ea25acf90d1752653c261e GIT binary patch literal 423 zcmV;Y0a*TtP)fy1~ud*;l#L)CQ+-(V7k z;kt>&$b3)Jv}NzjX0xfwvK&RsZMa6)E$RFH4m3@}?RF!)UaxSuT;O~@!|8N_BuNMn z^Z6XoG&OwRUw18_0D__@I2;b}dM3CQ1c5wbAw^MOzuz0K>%wZaT2Asj?~4U>F7@NrK&OXE=@nod7zBKCkSU R8NmPm002ovPDHLkV1nBhyk7tS literal 0 HcmV?d00001