diff --git a/harbour/ChangeLog b/harbour/ChangeLog
index 3362cbeed6..5603f4f452 100644
--- a/harbour/ChangeLog
+++ b/harbour/ChangeLog
@@ -16,6 +16,16 @@
The license applies to all entries newer than 2009-04-28.
*/
+2012-08-21 10:02 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
+ * contrib/hbide/actions.prg
+ - Removed: some options which cannot be implemented, at least
+ from here.
+ * contrib/hbide/dict.prg
+ * contrib/hbide/saveload.prg
+ * contrib/hbide/setup.ui
+ * contrib/hbide/themes.prg
+ + Advanced: User-Dictionaries.
+
2012-08-20 20:01 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/dict.prg
+ Added: line number to the Book-Mark button's tooltip.
diff --git a/harbour/contrib/hbide/actions.prg b/harbour/contrib/hbide/actions.prg
index 01edddec06..7cc45cc901 100644
--- a/harbour/contrib/hbide/actions.prg
+++ b/harbour/contrib/hbide/actions.prg
@@ -579,11 +579,13 @@ METHOD IdeActions:buildMainMenu()
oSubMenu := XbpMenu():new( oMenuBar, , .t. ):create()
oSubMenu:title := "~Project"
oSubMenu:addItem( { ::getAction( "Properties" ), {|| oIde:execAction( "Properties" ) } } )
+#if 0
hbide_menuAddSep( oSubMenu )
oSubMenu:addItem( { ::getAction( "ProjAddSource" ), {|| oIde:execAction( "ProjAddSource" ) } } )
oSubMenu:addItem( { ::getAction( "ProjRemSource" ), {|| oIde:execAction( "ProjRemSource" ) } } )
oSubMenu:addItem( { ::getAction( "ProjMainModule" ), {|| oIde:execAction( "ProjMainModule" ) } } )
oSubMenu:disableItem( oSubMenu:numItems )
+#endif
hbide_menuAddSep( oSubMenu )
oSubMenu:addItem( { ::getAction( "SelectProject" ), {|| oIde:execAction( "SelectProject" ) } } )
oSubMenu:addItem( { ::getAction( "CloseProject" ), {|| oIde:execAction( "CloseProject" ) } } )
diff --git a/harbour/contrib/hbide/dict.prg b/harbour/contrib/hbide/dict.prg
index b0a31efc6c..b82053891a 100644
--- a/harbour/contrib/hbide/dict.prg
+++ b/harbour/contrib/hbide/dict.prg
@@ -1,4 +1,4 @@
-/*
+ /*
* $Id$
*/
@@ -72,6 +72,26 @@
/*----------------------------------------------------------------------*/
+#define __checkDictToPrg_stateChanged__ 2056
+#define __checkDictToC_stateChanged__ 2057
+#define __checkDictToCpp_stateChanged__ 2058
+#define __checkDictToCh_stateChanged__ 2059
+#define __checkDictToH_stateChanged__ 2060
+#define __checkDictToIni_stateChanged__ 2061
+#define __checkDictToTxt_stateChanged__ 2062
+#define __checkDictToHbp_stateChanged__ 2063
+#define __checkDictActive_stateChanged__ 2064
+#define __checkDictCaseSens_stateChanged__ 2065
+#define __checkDictBold_stateChanged__ 2066
+#define __checkDictItalic_stateChanged__ 2067
+#define __checkDictULine_stateChanged__ 2068
+#define __checkDictColorText_stateChanged__ 2069
+#define __checkDictColorBack_stateChanged__ 2070
+#define __radioDictConvNone_clicked__ 2071
+#define __radioDictToLower_clicked__ 2072
+#define __radioDictToUpper_clicked__ 2073
+#define __radioDictAsIn_clicked__ 2074
+
#define DIC_FILENAME 1
#define DIC_ACTIVE 2
#define DIC_APPLYTO 3
@@ -90,7 +110,7 @@
FUNCTION hbide_loadUserDictionaries( oIde )
// File , Active, Applyto, ConvMode=asis upper lower, CaseSensitive, bold, italic, uline, txtcolor, bgColor
#if 1
- LOCAL aDict := { "E:\harbour\contrib\hbide\projects\my.dic;YES;PRG.C.CPP;ASIS;NO;NO;NO;NO;{0,0,0};{122,133,233}" }
+ LOCAL aDict := { "C:\harbour\contrib\hbide\projects\my.dic;YES;.PRG.C.CPP;ASIS;NO;NO;NO;NO;{0,0,0};{122,133,233}" }
#else
LOCAL aDict := {}
#endif
@@ -122,24 +142,30 @@ CLASS IdeDictionary INHERIT IdeObject
DATA lToTxt INIT .F.
DATA lToHbp INIT .F.
DATA cConvMode INIT "ASIS"
- DATA lCaseSensitive INIT .F.
+ DATA lCaseSens INIT .F.
DATA lBold INIT .F.
DATA lItalic INIT .F.
DATA lULine INIT .F.
+ DATA lTxtColor INIT .F.
+ DATA lBgColor INIT .F.
DATA cTxtColor INIT ""
DATA cBgColor INIT ""
- DATA qTxtColor
- DATA qBgColor
-
DATA aItems INIT {}
+ DATA aTxtRGB INIT {}
+ DATA aBgRGB INIT {}
+
METHOD new( oIde )
METHOD create( oIde )
METHOD destroy() VIRTUAL
METHOD load( cDict )
METHOD toString()
METHOD populateUI( oUI )
+ METHOD execColorDialog( oUI, cMode )
+ METHOD setButtonColors( oUI )
+ METHOD checkStateChanged( oUI, p, p1 )
+ METHOD radioButtonClicked( oUI, p )
ENDCLASS
@@ -181,24 +207,34 @@ METHOD IdeDictionary:load( cDict )
::cFilename := a_[ DIC_FILENAME ]
::lActive := a_[ DIC_ACTIVE ] == "YES"
::cApplyTo := a_[ DIC_APPLYTO ]
+ ::lToPRG := ".PRG" $ a_[ DIC_APPLYTO ]
+ ::lToC := ".C" $ a_[ DIC_APPLYTO ]
+ ::lToCPP := ".CPP" $ a_[ DIC_APPLYTO ]
+ ::lToCH := ".CH" $ a_[ DIC_APPLYTO ]
+ ::lToH := ".H" $ a_[ DIC_APPLYTO ]
+ ::lToIni := ".INI" $ a_[ DIC_APPLYTO ]
+ ::lToTxt := ".TXT" $ a_[ DIC_APPLYTO ]
+ ::lToHbp := ".HBP" $ a_[ DIC_APPLYTO ]
::cConvMode := a_[ DIC_CONVMODE ]
- ::lCaseSensitive := a_[ DIC_CASESENSTITIVE ] == "YES"
+ ::lCaseSens := a_[ DIC_CASESENSTITIVE ] == "YES"
::lBold := a_[ DIC_BOLD ] == "YES"
::lItalic := a_[ DIC_ITALIC ] == "YES"
::lULine := a_[ DIC_UNDERLINE ] == "YES"
+ ::lTxtColor := ! Empty( a_[ DIC_TXTCOLOR ] )
+ ::lBgColor := ! Empty( a_[ DIC_BGCOLOR ] )
::cTxtColor := a_[ DIC_TXTCOLOR ]
::cBgColor := a_[ DIC_BGCOLOR ]
IF ! Empty( ::cTxtColor )
- c_:= hbide_evalAsIs( ::cBgColor )
+ c_:= hbide_evalAsIs( ::cTxtColor )
IF HB_ISARRAY( c_ ) .AND. Len( c_ ) == 3
- ::qTxtColor := QColor( c_[ 1 ], c_[ 2 ], c_[ 3 ] )
+ ::aTxtRGB := AClone( c_ )
ENDIF
ENDIF
IF ! Empty( ::cBgColor )
c_:= hbide_evalAsIs( ::cBgColor )
IF HB_ISARRAY( c_ ) .AND. Len( c_ ) == 3
- ::qBgColor := QColor( c_[ 1 ], c_[ 2 ], c_[ 3 ] )
+ ::aBgRGB := AClone( c_ )
ENDIF
ENDIF
@@ -236,32 +272,160 @@ METHOD IdeDictionary:load( cDict )
/*----------------------------------------------------------------------*/
METHOD IdeDictionary:toString()
- LOCAL cDict := ""
+// LOCAL aDict := { "C:\harbour\contrib\hbide\projects\my.dic;YES;.PRG.C.CPP;ASIS;NO;NO;NO;NO;{0,0,0};{122,133,233}" }
- RETURN cDict
+ ::cDictInfo := ::cFilename + ";" + ;
+ iif( ::lActive , "YES", "NO" ) + ";" + ;
+ iif( ::lToPRG , ".PRG", "" ) + ;
+ iif( ::lToC , ".C" , "" ) + ;
+ iif( ::lToCPP , ".CPP", "" ) + ;
+ iif( ::lToCH , ".CPP", "" ) + ;
+ iif( ::lToH , ".H" , "" ) + ;
+ iif( ::lToIni , ".INI", "" ) + ;
+ iif( ::lToTxt , ".TXT", "" ) + ;
+ iif( ::lToHbp , ".HBP", "" ) + ";" + ;
+ ::cConvMode + ";" + ;
+ iif( ::lCaseSens, "YES", "NO" ) + ";" + ;
+ iif( ::lBold , "YES", "NO" ) + ";" + ;
+ iif( ::lItalic , "YES", "NO" ) + ";" + ;
+ iif( ::lULine , "YES", "NO" ) + ";" + ;
+ ::cTxtColor + ";" + ;
+ ::cBgColor
+HB_TRACE( HB_TR_ALWAYS, ::cDictInfo )
+ RETURN ::cDictInfo
/*----------------------------------------------------------------------*/
METHOD IdeDictionary:populateUI( oUI )
- oUI:checkDictToPrg : setChecked( ".PRG" $ ::cApplyTo )
- oUI:checkDictToC : setChecked( ".C" $ ::cApplyTo )
- oUI:checkDictToCpp : setChecked( ".CPP" $ ::cApplyTo )
- oUI:checkDictToCh : setChecked( ".CH" $ ::cApplyTo )
- oUI:checkDictToh : setChecked( ".H" $ ::cApplyTo )
- oUI:checkDictToIni : setChecked( ".INI" $ ::cApplyTo )
- oUI:checkDictToTxt : setChecked( ".TXT" $ ::cApplyTo )
- oUI:checkDictToHbp : setChecked( ".HBP" $ ::cApplyTo )
+ oUI:checkDictToPrg : setChecked( ".PRG" $ ::cApplyTo )
+ oUI:checkDictToC : setChecked( ".C" $ ::cApplyTo )
+ oUI:checkDictToCpp : setChecked( ".CPP" $ ::cApplyTo )
+ oUI:checkDictToCh : setChecked( ".CH" $ ::cApplyTo )
+ oUI:checkDictToh : setChecked( ".H" $ ::cApplyTo )
+ oUI:checkDictToIni : setChecked( ".INI" $ ::cApplyTo )
+ oUI:checkDictToTxt : setChecked( ".TXT" $ ::cApplyTo )
+ oUI:checkDictToHbp : setChecked( ".HBP" $ ::cApplyTo )
oUI:checkDictActive : setChecked( ::lActive )
- oUI:checkDictCaseSens : setChecked( ::lCaseSensitive )
- oUI:checkDictBold : setChecked( ::lBold )
+ oUI:checkDictCaseSens : setChecked( ::lCaseSens )
+ oUI:checkDictBold : setChecked( ::lBold )
oUI:checkDictItalic : setChecked( ::lItalic )
- oUI:checkDictULine : setChecked( ::lULine )
+ oUI:checkDictULine : setChecked( ::lULine )
oUI:checkDictColorText : setChecked( ! Empty( ::cTxtColor ) )
- oUI:checkDictColorBack : setChecked( ! Empty( ::cBgColor ) )
+ oUI:checkDictColorBack : setChecked( ! Empty( ::cBgColor ) )
+
+ oUI:radioDictConvNone : setChecked( ::cConvMode == "NONE" )
+ oUI:radioDictToLower : setChecked( ::cConvMode == "LOWER" )
+ oUI:radioDictToUpper : setChecked( ::cConvMode == "UPPER" )
+ oUI:radioDictAsIn : setChecked( ::cConvMode == "ASIS" )
+
+ oUI:plainKeywords : clear()
+ oUI:plainKeywords : setPlainText( hb_MemoRead( ::cFileName ) )
+
+ ::setButtonColors( oUI )
RETURN NIL
/*----------------------------------------------------------------------*/
+METHOD IdeDictionary:setButtonColors( oUI )
+
+ oUI:btnDictColorText:setStyleSheet( "" )
+ oUI:btnDictColorBack:setStyleSheet( "" )
+ IF ! Empty( ::aTxtRGB )
+ oUI:btnDictColorText: setStyleSheet( "background-color: rgb(" + hb_ntos( ::aTxtRGB[ 1 ] ) + "," + hb_ntos( ::aTxtRGB[ 2 ] ) + "," + hb_ntos( ::aTxtRGB[ 3 ] ) + ");" )
+ ENDIF
+ IF ! Empty( ::aBgRGB )
+ oUI:btnDictColorBack: setStyleSheet( "background-color: rgb(" + hb_ntos( ::aBgRGB[ 1 ] ) + "," + hb_ntos( ::aBgRGB[ 2 ] ) + "," + hb_ntos( ::aBgRGB[ 3 ] ) + ");" )
+ ENDIF
+
+ RETURN NIL
+
+/*----------------------------------------------------------------------*/
+
+METHOD IdeDictionary:execColorDialog( oUI, cMode )
+ LOCAL qColorDlg := QColorDialog( oUI:oWidget )
+ LOCAL nRet, qColor
+
+ IF cMode == "back" .AND. ! Empty( ::aBgRGB )
+ qColorDlg:SetCurrentColor( QColor( ::aBgRGB[ 1 ], ::aBgRGB[ 2 ], ::aBgRGB[ 3 ] ) )
+ ELSEIF cMode == "text" .AND. ! Empty( ::aTxtRGB )
+ qColorDlg:SetCurrentColor( QColor( ::aTxtRGB[ 1 ], ::aTxtRGB[ 2 ], ::aTxtRGB[ 3 ] ) )
+ ENDIF
+
+ nRet := qColorDlg:exec()
+
+ IF nRet == QDialog_Accepted
+ qColor := qColorDlg:selectedColor()
+ IF cMode == "back"
+ ::aBgRGB[ 1 ] := qColor:red()
+ ::aBgRGB[ 2 ] := qColor:green()
+ ::aBgRGB[ 3 ] := qColor:blue()
+ ::cBgColor := "{" + hb_ntos( ::aBgRGB[ 1 ] ) + "," + hb_ntos( ::aBgRGB[ 2 ] ) + hb_ntos( ::aBgRGB[ 3 ] ) + "}"
+ ELSE
+ ::aTxtRGB[ 1 ] := qColor:red()
+ ::aTxtRGB[ 2 ] := qColor:green()
+ ::aTxtRGB[ 3 ] := qColor:blue()
+ ::cTxtColor := "{" + hb_ntos( ::aTxtRGB[ 1 ] ) + "," + hb_ntos( ::aTxtRGB[ 2 ] ) + hb_ntos( ::aTxtRGB[ 3 ] ) + "}"
+ ENDIF
+ ::setButtonColors( oUI )
+ ENDIF
+ qColorDlg:setParent( QWidget() )
+
+ RETURN NIL
+
+/*----------------------------------------------------------------------*/
+
+METHOD IdeDictionary:checkStateChanged( oUI, p, p1 )
+ LOCAL lChecked := p1 != 0
+
+ SWITCH p
+ CASE __checkDictActive_stateChanged__ ; ::lActive := lChecked ; EXIT
+ CASE __checkDictToPrg_stateChanged__ ; ::lToPrg := lChecked ; EXIT
+ CASE __checkDictToC_stateChanged__ ; ::lToC := lChecked ; EXIT
+ CASE __checkDictToCpp_stateChanged__ ; ::lToCPP := lChecked ; EXIT
+ CASE __checkDictToCh_stateChanged__ ; ::lToCH := lChecked ; EXIT
+ CASE __checkDictToH_stateChanged__ ; ::lToH := lChecked ; EXIT
+ CASE __checkDictToIni_stateChanged__ ; ::lToIni := lChecked ; EXIT
+ CASE __checkDictToTxt_stateChanged__ ; ::lToTxt := lChecked ; EXIT
+ CASE __checkDictToHbp_stateChanged__ ; ::lToHbp := lChecked ; EXIT
+ CASE __checkDictActive_stateChanged__ ; ::lActive := lChecked ; EXIT
+ CASE __checkDictCaseSens_stateChanged__ ; ::lCaseSens := lChecked ; EXIT
+ CASE __checkDictBold_stateChanged__ ; ::lBold := lChecked ; EXIT
+ CASE __checkDictItalic_stateChanged__ ; ::lItalic := lChecked ; EXIT
+ CASE __checkDictULine_stateChanged__ ; ::lULine := lChecked ; EXIT
+ CASE __checkDictColorText_stateChanged__ ; ::lTxtColor := lChecked ; EXIT
+ CASE __checkDictColorBack_stateChanged__ ; ::lBgColor := lChecked ; EXIT
+ ENDSWITCH
+
+ IF ! ::lTxtColor
+ ::aTxtRGB := {}
+ ::cTxtColor := ""
+ ENDIF
+ IF ! ::lBgColor
+ ::aBgRGB := {}
+ ::cBgColor := ""
+ ENDIF
+ ::setButtonColors( oUI )
+
+ ::toString()
+
+ RETURN NIL
+
+/*----------------------------------------------------------------------*/
+
+METHOD IdeDictionary:radioButtonClicked( oUI, p )
+
+ SWITCH p
+ CASE __radioDictConvNone_clicked__ ; ::cConvMode := "NONE" ; EXIT
+ CASE __radioDictToLower_clicked__ ; ::cConvMode := "LOWER" ; EXIT
+ CASE __radioDictToUpper_clicked__ ; ::cConvMode := "UPPER" ; EXIT
+ CASE __radioDictAsIn_clicked__ ; ::cConvMode := "ASIS" ; EXIT
+ ENDSWITCH
+
+ ::toString( oUI )
+
+ RETURN NIL
+
+/*----------------------------------------------------------------------*/
diff --git a/harbour/contrib/hbide/saveload.prg b/harbour/contrib/hbide/saveload.prg
index a8035a736e..616a3e47c2 100644
--- a/harbour/contrib/hbide/saveload.prg
+++ b/harbour/contrib/hbide/saveload.prg
@@ -129,6 +129,27 @@
#define __buttonEditorClose_clicked__ 2050
#define __tableVar_keyPress__ 2051
#define __listDictNames_currentRowChanged__ 2052
+#define __btnDictColorText_clicked__ 2053
+#define __btnDictColorBack_clicked__ 2054
+#define __checkDictToPrg_stateChanged__ 2056
+#define __checkDictToC_stateChanged__ 2057
+#define __checkDictToCpp_stateChanged__ 2058
+#define __checkDictToCh_stateChanged__ 2059
+#define __checkDictToH_stateChanged__ 2060
+#define __checkDictToIni_stateChanged__ 2061
+#define __checkDictToTxt_stateChanged__ 2062
+#define __checkDictToHbp_stateChanged__ 2063
+#define __checkDictActive_stateChanged__ 2064
+#define __checkDictCaseSens_stateChanged__ 2065
+#define __checkDictBold_stateChanged__ 2066
+#define __checkDictItalic_stateChanged__ 2067
+#define __checkDictULine_stateChanged__ 2068
+#define __checkDictColorText_stateChanged__ 2069
+#define __checkDictColorBack_stateChanged__ 2070
+#define __radioDictConvNone_clicked__ 2071
+#define __radioDictToLower_clicked__ 2072
+#define __radioDictToUpper_clicked__ 2073
+#define __radioDictAsIn_clicked__ 2074
/*----------------------------------------------------------------------*/
//
@@ -1477,7 +1498,32 @@ METHOD IdeSetup:connectSlots()
::oUI:tableVar :connect( "itemActivated(QTableWidgetItem*)", {|p| ::execEvent( __tableVar_keyPress__, p ) } )
+ /* User Dictionaries */
::oUI:listDictNames :connect( "currentRowChanged(int)" , {|i| ::execEvent( __listDictNames_currentRowChanged__ , i ) } )
+// ::oUI:listDictNames :connect( "currentItemChanged(QListWidgetItem*,QListWidgetItem*)" , {|p,p1| ::execEvent( __listDictNames_currentRowChanged__ , p,p1 ) } )
+ ::oUI:btnDictColorText :connect( "clicked()" , {| | ::execEvent( __btnDictColorText_clicked__ ) } )
+ ::oUI:btnDictColorBack :connect( "clicked()" , {| | ::execEvent( __btnDictColorBack_clicked__ ) } )
+
+ ::oUI:checkDictActive :connect( "stateChanged(int)" , {|i| ::execEvent( __checkDictActive_stateChanged__ , i ) } )
+ ::oUI:checkDictToPrg :connect( "stateChanged(int)" , {|i| ::execEvent( __checkDictToPrg_stateChanged__ , i ) } )
+ ::oUI:checkDictToC :connect( "stateChanged(int)" , {|i| ::execEvent( __checkDictToC_stateChanged__ , i ) } )
+ ::oUI:checkDictToCpp :connect( "stateChanged(int)" , {|i| ::execEvent( __checkDictToCpp_stateChanged__ , i ) } )
+ ::oUI:checkDictToCh :connect( "stateChanged(int)" , {|i| ::execEvent( __checkDictToCh_stateChanged__ , i ) } )
+ ::oUI:checkDictToH :connect( "stateChanged(int)" , {|i| ::execEvent( __checkDictToH_stateChanged__ , i ) } )
+ ::oUI:checkDictToIni :connect( "stateChanged(int)" , {|i| ::execEvent( __checkDictToIni_stateChanged__ , i ) } )
+ ::oUI:checkDictToTxt :connect( "stateChanged(int)" , {|i| ::execEvent( __checkDictToTxt_stateChanged__ , i ) } )
+ ::oUI:checkDictToHbp :connect( "stateChanged(int)" , {|i| ::execEvent( __checkDictToHbp_stateChanged__ , i ) } )
+ ::oUI:checkDictActive :connect( "stateChanged(int)" , {|i| ::execEvent( __checkDictActive_stateChanged__ , i ) } )
+ ::oUI:checkDictCaseSens :connect( "stateChanged(int)" , {|i| ::execEvent( __checkDictCaseSens_stateChanged__ , i ) } )
+ ::oUI:checkDictBold :connect( "stateChanged(int)" , {|i| ::execEvent( __checkDictBold_stateChanged__ , i ) } )
+ ::oUI:checkDictItalic :connect( "stateChanged(int)" , {|i| ::execEvent( __checkDictItalic_stateChanged__ , i ) } )
+ ::oUI:checkDictULine :connect( "stateChanged(int)" , {|i| ::execEvent( __checkDictULine_stateChanged__ , i ) } )
+ ::oUI:checkDictColorText :connect( "stateChanged(int)" , {|i| ::execEvent( __checkDictColorText_stateChanged__, i ) } )
+ ::oUI:checkDictColorBack :connect( "stateChanged(int)" , {|i| ::execEvent( __checkDictColorBack_stateChanged__, i ) } )
+ ::oUI:radioDictConvNone :connect( "clicked()" , {| | ::execEvent( __radioDictConvNone_clicked__ ) } )
+ ::oUI:radioDictToLower :connect( "clicked()" , {| | ::execEvent( __radioDictToLower_clicked__ ) } )
+ ::oUI:radioDictToUpper :connect( "clicked()" , {| | ::execEvent( __radioDictToUpper_clicked__ ) } )
+ ::oUI:radioDictAsIn :connect( "clicked()" , {| | ::execEvent( __radioDictAsIn_clicked__ ) } )
RETURN Self
@@ -2150,12 +2196,53 @@ METHOD IdeSetup:execEvent( nEvent, p, p1 )
::oDK:setToolbarSize( val( ::oINI:cToolbarSize ) )
EXIT
+ CASE __btnDictColorBack_clicked__
+ p := ::oUI:listDictNames:currentRow()
+ IF p >= 0 .AND. p < Len( ::oIde:aUserDict )
+ ::oIde:aUserDict[ p + 1 ]:execColorDialog( ::oUI, "back" )
+ ENDIF
+ EXIT
+ CASE __btnDictColorText_clicked__
+ p := ::oUI:listDictNames:currentRow()
+ IF p >= 0 .AND. p < Len( ::oIde:aUserDict )
+ ::oIde:aUserDict[ p + 1 ]:execColorDialog( ::oUI, "text" )
+ ENDIF
+ EXIT
CASE __listDictNames_currentRowChanged__
IF p >= 0 .AND. p < Len( ::oIde:aUserDict )
::oIde:aUserDict[ p + 1 ]:populateUI( ::oUI )
ENDIF
EXIT
-
+ CASE __checkDictActive_stateChanged__
+ CASE __checkDictToPrg_stateChanged__
+ CASE __checkDictToC_stateChanged__
+ CASE __checkDictToCpp_stateChanged__
+ CASE __checkDictToCh_stateChanged__
+ CASE __checkDictToH_stateChanged__
+ CASE __checkDictToIni_stateChanged__
+ CASE __checkDictToTxt_stateChanged__
+ CASE __checkDictToHbp_stateChanged__
+ CASE __checkDictActive_stateChanged__
+ CASE __checkDictCaseSens_stateChanged__
+ CASE __checkDictBold_stateChanged__
+ CASE __checkDictItalic_stateChanged__
+ CASE __checkDictULine_stateChanged__
+ CASE __checkDictColorText_stateChanged__
+ CASE __checkDictColorBack_stateChanged__
+ nRow := ::oUI:listDictNames:currentRow()
+ IF nRow >= 0 .AND. nRow < Len( ::oIde:aUserDict )
+ ::oIde:aUserDict[ nRow + 1 ]:checkStateChanged( ::oUI, p, p1 )
+ ENDIF
+ EXIT
+ CASE __radioDictConvNone_clicked__
+ CASE __radioDictToLower_clicked__
+ CASE __radioDictToUpper_clicked__
+ CASE __radioDictAsIn_clicked__
+ p := ::oUI:listDictNames:currentRow()
+ IF p >= 0 .AND. p < Len( ::oIde:aUserDict )
+ ::oIde:aUserDict[ p + 1 ]:radioButtonClicked( ::oUI, p )
+ ENDIF
+ EXIT
ENDSWITCH
RETURN Self
diff --git a/harbour/contrib/hbide/setup.ui b/harbour/contrib/hbide/setup.ui
index e16df3430e..40341dc27d 100644
--- a/harbour/contrib/hbide/setup.ui
+++ b/harbour/contrib/hbide/setup.ui
@@ -44,7 +44,7 @@
- 1
+ 6
@@ -2044,7 +2044,7 @@
44
104
- 237
+ 261
20
@@ -2153,6 +2153,9 @@
143
+
+ QPlainTextEdit::NoWrap
+
@@ -2370,8 +2373,11 @@
20
+
+ Click to define text color for keywords in this dictionary.
+
- ...
+
@@ -2383,8 +2389,11 @@
20
+
+ Click to define background color for keywords in this dictionary.
+
- ...
+
diff --git a/harbour/contrib/hbide/themes.prg b/harbour/contrib/hbide/themes.prg
index 06760792c6..234aab3d86 100644
--- a/harbour/contrib/hbide/themes.prg
+++ b/harbour/contrib/hbide/themes.prg
@@ -510,11 +510,10 @@ METHOD IdeThemes:setSyntaxHilighting( qEdit, cTheme, lNew, lSetEditor )
/*----------------------------------------------------------------------*/
METHOD IdeThemes:mergeUserDictionaries( qHiliter, cTheme )
- LOCAL oDict, s, aAttr, qFormat, qRegExp, cName, a_, aDict
+ LOCAL oDict, s, aAttr, qFormat, qRegExp, cName, a_
- aDict := ::oIde:aUserDict
- FOR EACH oDict IN aDict
- IF !empty( oDict:aItems )
+ FOR EACH oDict IN ::oIde:aUserDict
+ IF oDict:lActive .AND. ! empty( oDict:aItems )
cName := "UserDictionary" + hb_ntos( oDict:__enumIndex() )
s := ""
@@ -531,14 +530,19 @@ METHOD IdeThemes:mergeUserDictionaries( qHiliter, cTheme )
aAttr := ::getThemeAttribute( "UserDictionary", cTheme ) // cName after slots are implemented
qFormat := QTextCharFormat()
- qFormat:setFontItalic( aAttr[ THM_ATR_ITALIC ] )
- IF aAttr[ THM_ATR_BOLD ]
+ qFormat:setFontItalic( oDict:lItalic )
+ IF oDict:lBold
qFormat:setFontWeight( 1000 )
ENDIF
- qFormat:setFontUnderline( aAttr[ THM_ATR_ULINE ] )
- qFormat:setForeground( QBrush( QColor( aAttr[ THM_ATR_R ], aAttr[ THM_ATR_G ], aAttr[ THM_ATR_B ] ) ) )
- IF !empty( oDict:qBgColor )
- qFormat:setBackground( QBrush( oDict:qBgColor ) )
+ qFormat:setFontUnderline( oDict:lULine )
+
+ IF ! empty( oDict:aTxtRGB )
+ qFormat:setForeground( QBrush( QColor( oDict:aTxtRGB[ 1 ], oDict:aTxtRGB[ 2 ], oDict:aTxtRGB[ 3 ] ) ) )
+ ELSE
+ qFormat:setForeground( QBrush( QColor( aAttr[ THM_ATR_R ], aAttr[ THM_ATR_G ], aAttr[ THM_ATR_B ] ) ) )
+ ENDIF
+ IF ! empty( oDict:aBgRGB )
+ qFormat:setBackground( QBrush( QColor( oDict:aBgRGB[ 1 ], oDict:aBgRGB[ 2 ], oDict:aBgRGB[ 3 ] ) ) )
ENDIF
qHiliter:hbSetRuleWithRegExp( cName, qRegExp, qFormat )