diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 43ed1add23..2556e63938 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,11 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-01-07 10:34 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * contrib/hbide/idethemes.prg + * contrib/hbide/resources/selectionlist.ui + ! selectionlist.ui updated to have buttons. + 2010-01-07 09:28 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbide/idethemes.prg + Added "Bare Minimum" theme. diff --git a/harbour/contrib/hbide/idethemes.prg b/harbour/contrib/hbide/idethemes.prg index 9f2ba57958..74d379bb3a 100644 --- a/harbour/contrib/hbide/idethemes.prg +++ b/harbour/contrib/hbide/idethemes.prg @@ -581,7 +581,9 @@ METHOD IdeThemes:selectTheme() oSL:qObj[ "listOptions" ]:setModel( oStrModel ) - Qt_Slots_Connect( pSlots, oSL:qObj[ "listOptions" ], "doubleClicked(QModelIndex)", {|o,p| ::selectThemeProc( p, oSL, @cTheme, o ) } ) + Qt_Slots_Connect( pSlots, oSL:qObj[ "listOptions" ], "doubleClicked(QModelIndex)", {|o,p| ::selectThemeProc( 1, p, oSL, @cTheme, o ) } ) + Qt_Slots_Connect( pSlots, oSL:qObj[ "buttonOk" ], "clicked()" , {|o,p| ::selectThemeProc( 2, p, oSL, @cTheme, o ) } ) + Qt_Slots_Connect( pSlots, oSL:qObj[ "buttonCancel" ], "clicked()" , {|o,p| ::selectThemeProc( 3, p, oSL, o ) } ) nDone := oSL:exec() @@ -591,14 +593,24 @@ METHOD IdeThemes:selectTheme() /*----------------------------------------------------------------------*/ -METHOD IdeThemes:selectThemeProc( p, oSL, cTheme ) - LOCAL nRow, qModalIndex := QModelIndex():configure( p ) +METHOD IdeThemes:selectThemeProc( nMode, p, oSL, cTheme ) + LOCAL qModalIndex - nRow := qModalIndex:row() + 1 + DO CASE + CASE nMode == 1 + qModalIndex := QModelIndex():configure( p ) + cTheme := ::aThemes[ qModalIndex:row() + 1, 1 ] + oSL:done( 1 ) - cTheme := ::aThemes[ nRow, 1 ] + CASE nMode == 2 + qModalIndex := QModelIndex():configure( oSL:qObj[ "listOptions" ]:currentIndex() ) + cTheme := ::aThemes[ qModalIndex:row() + 1, 1 ] + oSL:done( 1 ) - oSL:done( 1 ) + CASE nMode == 3 + oSL:done( 0 ) + + ENDCASE RETURN Nil @@ -670,7 +682,6 @@ METHOD IdeThemes:parseINI( lAppend ) IF ( n := at( ":", s ) ) > 0 cKey := alltrim( strtran( substr( s, n+1 ), "]" ) ) ENDIF -// HB_TRACE( HB_TR_ALWAYS, cKey ) IF !empty( cKey ) nPart := 3 IF ( nTheme := ascan( ::aThemes, {|e_| e_[ 1 ] == cKey } ) ) == 0 diff --git a/harbour/contrib/hbide/resources/selectionlist.ui b/harbour/contrib/hbide/resources/selectionlist.ui index 06bf9ea61d..423558810e 100644 --- a/harbour/contrib/hbide/resources/selectionlist.ui +++ b/harbour/contrib/hbide/resources/selectionlist.ui @@ -7,7 +7,7 @@ 0 0 221 - 188 + 285 @@ -17,7 +17,7 @@ - + @@ -27,6 +27,49 @@ + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 77 + 25 + + + + OK + + + + + + + + 77 + 25 + + + + Cancel + + + + +