2011-06-15 11:53 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbide/changelog.ui
  * contrib/hbide/idechangelog.prg
  * contrib/hbide/idesaveload.prg
    * Changed: "Manage ChangeLog(s)" dialog - <Title> and <Sources>
      entry fields are now editable drop-down combo boxes. They retain 
      the entered text for next run. The retained entries are inserted
      alphabetically to retreive fast.
This commit is contained in:
Pritpal Bedi
2011-06-15 18:58:14 +00:00
parent 413e2f0fa6
commit a95eccfd4d
4 changed files with 92 additions and 20 deletions

View File

@@ -16,6 +16,15 @@
The license applies to all entries newer than 2009-04-28.
*/
2011-06-15 11:53 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/changelog.ui
* contrib/hbide/idechangelog.prg
* contrib/hbide/idesaveload.prg
* Changed: "Manage ChangeLog(s)" dialog - <Title> and <Sources>
entry fields are now editable drop-down combo boxes. They retain
the entered text for next run. The retained entries are inserted
alphabetically to retreive fast.
2011-06-14 22:09 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* tests/ac_test.prg
! warnings

View File

@@ -68,41 +68,48 @@
<property name="margin">
<number>0</number>
</property>
<item row="1" column="1" colspan="4">
<widget class="QLineEdit" name="editTitle">
<property name="readOnly">
<bool>false</bool>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Title</string>
</property>
</widget>
</item>
<item row="3" column="0">
<item row="1" column="1" colspan="3">
<widget class="QComboBox" name="comboTitle">
<property name="editable">
<bool>true</bool>
</property>
<property name="insertPolicy">
<enum>QComboBox::InsertAlphabetically</enum>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Source:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="editSource"/>
</item>
<item row="3" column="3">
<item row="4" column="2">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Action:</string>
</property>
</widget>
</item>
<item row="3" column="4">
<item row="4" column="3">
<widget class="QComboBox" name="comboAction"/>
</item>
<item row="4" column="0" colspan="5">
<item row="5" column="0" colspan="4">
<widget class="QPlainTextEdit" name="plainCurrentLog">
<property name="lineWrapMode">
<enum>QPlainTextEdit::NoWrap</enum>
</property>
</widget>
</item>
<item row="5" column="0" colspan="5">
<item row="6" column="0" colspan="4">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QPushButton" name="buttonTitle">
@@ -154,10 +161,19 @@
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Title</string>
<item row="4" column="1">
<widget class="QComboBox" name="comboSources">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="editable">
<bool>true</bool>
</property>
<property name="insertPolicy">
<enum>QComboBox::InsertAlphabetically</enum>
</property>
</widget>
</item>

View File

@@ -172,6 +172,12 @@ METHOD IdeChangeLog:show()
::oINI:cUserChangeLog := hbide_fetchAString( ::oDlg:oWidget, ::oINI:cUserChangeLog, , "Developer Name" )
ENDIF
aeval( ::oINI:aLogTitle , {|e| ::oUI:q_comboTitle:insertItem( 0,e ) } )
aeval( ::oINI:aLogSources, {|e| ::oUI:q_comboSources:insertItem( 0,e ) } )
::oUI:q_comboTitle:setCurrentIndex( -1 )
::oUI:q_comboSources:setCurrentIndex( -1 )
::oUI:q_plainChangelog :setFont( ::oFont:oWidget )
::oUI:q_plainLogEntry :setFont( ::oFont:oWidget )
::oUI:q_plainCurrentLog :setFont( ::oFont:oWidget )
@@ -228,15 +234,23 @@ METHOD IdeChangeLog:execEvent( cEvent, p )
SWITCH cEvent
CASE "buttonTitle_clicked"
IF ! empty( cTmp := ::oUI:q_editTitle:text() )
IF ! empty( cTmp := ::oUI:q_comboTitle:currentText() )
::addToLog( { "Title", cTmp, "" } )
::refresh()
IF ascan( ::oINI:aLogTitle, {|e| upper( e ) == cTmp } ) == 0
aadd( ::oINI:aLogTitle, cTmp )
::oUI:q_comboTitle:insertItem( 0,cTmp )
ENDIF
ENDIF
EXIT
CASE "buttonSource_clicked"
IF ! empty( cTmp := ::oUI:q_editSource:text() )
IF ! empty( cTmp := ::oUI:q_comboSources:currentText() )
::addToLog( { "Source", cTmp, "" } )
::refresh()
IF ascan( ::oINI:aLogSources, {|e| upper( e ) == cTmp } ) == 0
aadd( ::oINI:aLogSources, cTmp )
::oUI:q_comboSources:insertItem( 0,cTmp )
ENDIF
ENDIF
EXIT
CASE "buttonDesc_clicked"
@@ -247,7 +261,7 @@ METHOD IdeChangeLog:execEvent( cEvent, p )
ENDIF
EXIT
CASE "buttonSrcDesc_clicked"
IF ! empty( cTmp := ::oUI:q_editSource:text() )
IF ! empty( cTmp := ::oUI:q_comboSources:currentText() )
::addToLog( { "Source", cTmp, "" } )
ENDIF
IF ! empty( cTmp := ::oUI:q_plainCurrentLog:toPlainText() )
@@ -306,6 +320,7 @@ METHOD IdeChangeLog:execEvent( cEvent, p )
EXIT
CASE "editChangelog_textChanged"
IF ! empty( p ) .AND. hb_fileExists( p )
::oINI:cChangeLog := p
::oUI:q_editChangelog:setStyleSheet( "" )
::updateLog()
ELSE

View File

@@ -134,6 +134,8 @@ CLASS IdeINI INHERIT IdeObject
DATA aDbuPanelNames INIT {}
DATA aDbuPanelsInfo INIT {}
DATA aDictionaries INIT {}
DATA aLogTitle INIT {}
DATA aLogSources INIT {}
DATA cFontName INIT "Courier New"
DATA nPointSize INIT 10
@@ -543,6 +545,20 @@ METHOD IdeINI:save( cHbideIni )
NEXT
aadd( txt_, " " )
aadd( txt_, "[LOGTITLE]" )
aadd( txt_, " " )
FOR n := 1 TO len( ::aLogTitle )
aadd( txt_, "logtitle_" + hb_ntos( n ) + "=" + ::aLogTitle[ n ] )
NEXT
aadd( txt_, " " )
aadd( txt_, "[LOGSOURCES]" )
aadd( txt_, " " )
FOR n := 1 TO len( ::aLogSources )
aadd( txt_, "logsources_" + hb_ntos( n ) + "=" + ::aLogSources[ n ] )
NEXT
aadd( txt_, " " )
aadd( txt_, "[General]" )
aadd( txt_, " " )
@@ -620,6 +636,12 @@ METHOD IdeINI:load( cHbideIni )
CASE "[DICTIONARIES]"
nPart := "INI_DICTIONARIES"
EXIT
CASE "[LOGTITLE]"
nPart := "INI_LOGTITLE"
EXIT
CASE "[LOGSOURCES]"
nPart := "INI_LOGSOURCES"
EXIT
OTHERWISE
DO CASE
CASE Left( s, 1 ) $ '#['
@@ -799,6 +821,16 @@ METHOD IdeINI:load( cHbideIni )
aadd( ::aDictioaries, cVal )
ENDIF
CASE nPart == "INI_LOGTITLE"
IF hbide_parseKeyValPair( s, @cKey, @cVal )
aadd( ::aLogTitle, cVal )
ENDIF
CASE nPart == "INI_LOGSOURCES"
IF hbide_parseKeyValPair( s, @cKey, @cVal )
aadd( ::aLogSources, cVal )
ENDIF
ENDCASE
EXIT
ENDSWITCH
@@ -1480,12 +1512,12 @@ METHOD IdeSetup:show()
::setIcons()
::connectSlots()
::oUI:q_stackedWidget:setCurrentIndex( 0 )
::oUI:hide()
ENDIF
::populate()
::oIde:setPosByIniEx( ::oUI:oWidget, ::oINI:cSetupDialogGeometry )
//::oUI:exec()
::oUI:show()
RETURN Self