[DEVELOPMENT ENVIRONMENT]

* BUG: Fix the signature of project symbols in the popup help.

[GB.WEB]
* BUG: Remove the Response.Cache property. HTTP caching headers are more 
  complex than I thought first.

[GB.QT4]
* BUG: Background and Foreground colors should now be handled correctly in 
  all controls.

[GB.QT4.EXT]
* BUG: The background color of the Editor control has been fixed, but it 
  has the same problem as the TextBox control one: the frame is not drawn 
  differently from the inside.


git-svn-id: svn://localhost/gambas/trunk@2492 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2009-12-13 15:17:03 +00:00
parent 72d312c97e
commit fb73954f71
11 changed files with 120 additions and 198 deletions

View File

@ -443,7 +443,7 @@ msgstr ""
#: FColorChooser.class:203 FCommit.class:397 FConflict.class:191
#: FConnectionEditor.class:261 FCreateFile.class:885 FDebugInfo.class:490
#: FEditor.class:2098 FFind.class:114 FFindList.class:195
#: FFontChooser.class:86 FForm.class:2831 FGotoLine.class:63
#: FFontChooser.class:86 FForm.class:2830 FGotoLine.class:63
#: FHelpBrowser.class:186 FIconEditor.class:1393 FImportTable.class:38
#: FList.class:155 FMain.class:204 FMakeExecutable.class:144
#: FMakeInstall.class:309 FMenu.class:1098 FNewConnection.class:317
@ -485,31 +485,31 @@ msgid ""
msgstr ""
#: FCommit.class:234 FConflict.class:327 FConnectionEditor.class:1790
#: FEditor.class:3175 FForm.class:3381 FIconEditor.class:2168
#: FEditor.class:3175 FForm.class:3380 FIconEditor.class:2168
#: FOutput.class:473 FTextEditor.class:660
msgid "Cut"
msgstr ""
#: FCommit.class:241 FConflict.class:334 FConnectionEditor.class:1688
#: FEditor.class:3181 FForm.class:3388 FIconEditor.class:2177
#: FEditor.class:3181 FForm.class:3387 FIconEditor.class:2177
#: FOutput.class:480 FTextEditor.class:667
msgid "Copy"
msgstr ""
#: FCommit.class:248 FConflict.class:341 FConnectionEditor.class:1814
#: FEditor.class:3188 FForm.class:3395 FIconEditor.class:2186
#: FEditor.class:3188 FForm.class:3394 FIconEditor.class:2186
#: FOutput.class:487 FTextEditor.class:674
msgid "Paste"
msgstr ""
#: FCommit.class:255 FConflict.class:348 FConnectionEditor.class:1822
#: FEditor.class:3158 FForm.class:3623 FIconEditor.class:2150
#: FEditor.class:3158 FForm.class:3622 FIconEditor.class:2150
#: FOption.class:1189 FOutput.class:455 FTextEditor.class:642
msgid "Undo"
msgstr ""
#: FCommit.class:262 FConflict.class:355 FConnectionEditor.class:1830
#: FEditor.class:3165 FForm.class:3634 FOutput.class:462 FTextEditor.class:649
#: FEditor.class:3165 FForm.class:3633 FOutput.class:462 FTextEditor.class:649
msgid "Redo"
msgstr ""
@ -667,7 +667,7 @@ msgstr ""
msgid "The table '&1' has been modified. Do you want to save it?"
msgstr ""
#: FConnectionEditor.class:261 FEditor.class:3299 FForm.class:3526
#: FConnectionEditor.class:261 FEditor.class:3299 FForm.class:3525
#: FIconEditor.class:1412 FTextEditor.class:755
msgid "Save"
msgstr ""
@ -756,7 +756,7 @@ msgstr ""
msgid "Do you really want to delete table '&1'?"
msgstr ""
#: FConnectionEditor.class:1330 FForm.class:3402 FMain.class:204
#: FConnectionEditor.class:1330 FForm.class:3401 FMain.class:204
#: FNewConnection.class:317 FTranslate.class:606
msgid "Delete"
msgstr ""
@ -789,7 +789,7 @@ msgstr ""
msgid "Connection editor"
msgstr ""
#: FConnectionEditor.class:1547 FEditor.class:2098 FForm.class:2831
#: FConnectionEditor.class:1547 FEditor.class:2098 FForm.class:2830
#: FHelpBrowser.class:193 FIconEditor.class:2032 FTextEditor.class:462
#: FTranslate.class:700
msgid "Reload"
@ -1250,7 +1250,7 @@ msgstr ""
msgid "Open form"
msgstr ""
#: FEditor.class:3124 FForm.class:3309 FMain.class:2328
#: FEditor.class:3124 FForm.class:3308 FMain.class:2328
msgid "&Startup class"
msgstr ""
@ -1418,178 +1418,178 @@ msgstr ""
msgid "Bad form file"
msgstr ""
#: FForm.class:2831
#: FForm.class:2830
msgid ""
"The form has been modified.\n"
"\n"
"All your changes will be lost."
msgstr ""
#: FForm.class:3285 FIconEditor.class:2258
#: FForm.class:3284 FIconEditor.class:2258
msgid "Select"
msgstr ""
#: FForm.class:3290
#: FForm.class:3289
msgid "Event"
msgstr ""
#: FForm.class:3296
#: FForm.class:3295
msgid "Change into"
msgstr ""
#: FForm.class:3302
#: FForm.class:3301
msgid "Open code"
msgstr ""
#: FForm.class:3318
#: FForm.class:3317
msgid "Show tab"
msgstr ""
#: FForm.class:3327
#: FForm.class:3326
msgid "Move tab"
msgstr ""
#: FForm.class:3332
#: FForm.class:3331
msgid "&First"
msgstr ""
#: FForm.class:3339 FTips.class:220
#: FForm.class:3338 FTips.class:220
msgid "&Previous"
msgstr ""
#: FForm.class:3346 FMenu.class:820 FTips.class:226
#: FForm.class:3345 FMenu.class:820 FTips.class:226
msgid "&Next"
msgstr ""
#: FForm.class:3353
#: FForm.class:3352
msgid "&Last"
msgstr ""
#: FForm.class:3365
#: FForm.class:3364
msgid "Select all"
msgstr ""
#: FForm.class:3371
#: FForm.class:3370
msgid "Unselect all"
msgstr ""
#: FForm.class:3412
#: FForm.class:3411
msgid "Arrangement"
msgstr ""
#: FForm.class:3416
#: FForm.class:3415
msgid "Bring to foreground"
msgstr ""
#: FForm.class:3423
#: FForm.class:3422
msgid "Send to background"
msgstr ""
#: FForm.class:3434
#: FForm.class:3433
msgid "Horizontal"
msgstr ""
#: FForm.class:3441
#: FForm.class:3440
msgid "Rows"
msgstr ""
#: FForm.class:3447
#: FForm.class:3446
msgid "Vertical"
msgstr ""
#: FForm.class:3454
#: FForm.class:3453
msgid "Columns"
msgstr ""
#: FForm.class:3460
#: FForm.class:3459
msgid "Alignment"
msgstr ""
#: FForm.class:3464
#: FForm.class:3463
msgid "Align to &left"
msgstr ""
#: FForm.class:3470
#: FForm.class:3469
msgid "Align to &right"
msgstr ""
#: FForm.class:3476
#: FForm.class:3475
msgid "Align to &top"
msgstr ""
#: FForm.class:3482
#: FForm.class:3481
msgid "Align to &bottom"
msgstr ""
#: FForm.class:3492
#: FForm.class:3491
msgid "Same &width"
msgstr ""
#: FForm.class:3498
#: FForm.class:3497
msgid "Same &height"
msgstr ""
#: FForm.class:3509
#: FForm.class:3508
msgid "Menu editor..."
msgstr ""
#: FForm.class:3563 FTextEditor.class:788
#: FForm.class:3562 FTextEditor.class:788
msgid "Code"
msgstr ""
#: FForm.class:3571
#: FForm.class:3570
msgid "Lock form"
msgstr ""
#: FForm.class:3642 FMenu.class:26
#: FForm.class:3641 FMenu.class:26
msgid "Menu editor"
msgstr ""
#: FForm.class:3650
#: FForm.class:3649
msgid "Toggle grid"
msgstr ""
#: FForm.class:3682
#: FForm.class:3681
msgid "Align to top"
msgstr ""
#: FForm.class:3690
#: FForm.class:3689
msgid "Align to bottom"
msgstr ""
#: FForm.class:3698
#: FForm.class:3697
msgid "Align to left"
msgstr ""
#: FForm.class:3706
#: FForm.class:3705
msgid "Align to right"
msgstr ""
#: FForm.class:3714
#: FForm.class:3713
msgid "Same width"
msgstr ""
#: FForm.class:3722
#: FForm.class:3721
msgid "Same height"
msgstr ""
#: FForm.class:3768
#: FForm.class:3767
msgid "Tabstrip"
msgstr ""
#: FForm.class:3773
#: FForm.class:3772
msgid "Move tab first"
msgstr ""
#: FForm.class:3781
#: FForm.class:3780
msgid "Move tab left"
msgstr ""
#: FForm.class:3789
#: FForm.class:3788
msgid "Move tab right"
msgstr ""
#: FForm.class:3797
#: FForm.class:3796
msgid "Move tab last"
msgstr ""

View File

@ -336,7 +336,7 @@ Private Sub MergeSignature(sSign As String, sParentSign As String) As String
End
Public Function GetSignature(Optional iShowArg As Integer = -1) As String
Public Function GetSignature(bBalise As Boolean, Optional iShowArg As Integer = -1) As String
Dim iInd As Integer
Dim sRes As String
@ -428,7 +428,8 @@ Public Function GetSignature(Optional iShowArg As Integer = -1) As String
If sCar = "[" Then
sRes &= $sArgAfter & "<font color=#808080>"
sRes &= $sArgAfter
If bBalise Then sRes &= "<font color=#808080>"
$sArgAfter = ""
Continue
@ -436,7 +437,8 @@ Public Function GetSignature(Optional iShowArg As Integer = -1) As String
If sCar = "]" Then
sRes &= $sArgAfter & "</font>"
sRes &= $sArgAfter
If bBalise Then sRes &= "</font>"
$sArgAfter = ""
Continue
@ -468,9 +470,9 @@ Public Function GetSignature(Optional iShowArg As Integer = -1) As String
If sCar = "." Then
sRes &= $sArgAfter & ", "
NextArg
If $iShowArg >= 0 And If $iShowArg > $iArg Then sRes &= "<u>"
If bBalise And If $iShowArg >= 0 And If $iShowArg > $iArg Then sRes &= "<u>"
sRes &= $sArgBefore & "..."
If $iShowArg >= 0 And If $iShowArg > $iArg Then sRes &= "</u>"
If bBalise And If $iShowArg >= 0 And If $iShowArg > $iArg Then sRes &= "</u>"
Continue
Endif
@ -493,9 +495,9 @@ Public Function GetSignature(Optional iShowArg As Integer = -1) As String
sRes &= $sArgAfter
If Name = "_get" Or Name = "_put" Then
sRes = "<b>[</b>" & sRes & "<b>]</b>"
sRes = If(bBalise, "<b>[</b>", "[") & sRes & If(bBalise, "<b>]</b>", "]")
Else
sRes = "<b>(</b>" & sRes & "<b>)</b>"
sRes = If(bBalise, "<b>(</b>", "(") & sRes & If(bBalise, "<b>)</b>", ")")
Endif
If Type Then sRes &= " " & sKeywordAs & " " & GetType(Type)
@ -546,7 +548,7 @@ Public Function GetDescription(Optional bBalise As Boolean) As String
Endif
If InStr(":m", LCase(Kind)) Then
sSign = GetSignature()
sSign = GetSignature(False)
If sSign Then
sDesc &= sSign
Else
@ -777,15 +779,12 @@ Public Function GetHelpHTML() As String
End Select
Next
sWhere = "gambas://project/" & {Class} & "#" & Me.LineNumber
sHTML = Replace(sHTML, "$(syntax)", sSyntax)
sHTML = Replace(sHTML, "$(help)", sHelp)
sHTML = Replace(sHTML, "$(where)", sWhere)
Return sHTML
End

View File

@ -21,7 +21,7 @@ Public Sub Open(hForm As FEditor, iX As Integer, hSymbol As CSymbolInfo, iArg As
If hForm.Editor <> $hEditor Then HideFrom($hEditor)
$hEditor = hForm.Editor
sSign = hSymbol.GetSignature(iArg)
sSign = hSymbol.GetSignature(True, iArg)
If Not sSign Then Return
Me.Font = $hEditor.Font

View File

@ -1389,8 +1389,6 @@ Private Sub SelectIn(hParent As CControl, X As Integer, Y As Integer, W As Integ
Endif
bFirst = True
For Each hChild In hParent.Control.Children
hCtrl = Control[hChild.Tag]
@ -1406,6 +1404,7 @@ Private Sub SelectIn(hParent As CControl, X As Integer, Y As Integer, W As Integ
Next
bFirst = True
For Each hCtrl In aSelect
hCtrl.Select(Me, bFirst)
bFirst = False

View File

@ -1,5 +1,5 @@
# Gambas Project File 3.0
# Compiled with Gambas 2.99.0 (r2462)
# Compiled with Gambas 2.99.0 (r2485)
Title=gb.web
Startup=Main
Version=2.99.0

View File

@ -5,8 +5,8 @@ Export
Property Buffered As Boolean
Property ContentType As String
Property Status As String
Property LastModified As Date
Property Cache As _ResponseCache
'Property LastModified As Date
'Property Read Cache As _ResponseCache
Private $bBuffered As Boolean
Private $sHeader As String
@ -15,7 +15,7 @@ Private $hFile As File
Private $sContentType As String = "text/html"
Private $sStatus As String
Private $iBegin As Integer
Private $dLastModified As Date
'Private $dLastModified As Date
Public Sub AddHeader(Name As String, Value As String)
@ -177,27 +177,21 @@ Private Sub Status_Write(Value As String)
$sStatus = Value
End
Private Function LastModified_Read() As Date
End
Private Sub LastModified_Write(Value As Date)
End
Private Function CacheControl_Read() As String
End
Private Sub CacheControl_Write(Value As String)
End
'
' Private Function Cache_Read() As _ResponseCache
'
' Return _ResponseCache
'
' End
'
' Private Function LastModified_Read() As Date
'
' Return $dLastModified
'
' End
'
' Private Sub LastModified_Write(Value As Date)
'
' $dLastModified = Value
'
' End

View File

@ -1,71 +1,13 @@
' Gambas module file
Export
'Export
'Create Static
Property MaxAge As Integer
Property ProxyMaxAge As Integer
Property {Public} As Boolean
Property NoCache As Boolean
Property NoStore As Boolean
Property MustRevalidate As Boolean
Property ProxyRevalidate As Boolean
Public MaxAge As Integer
Public ProxyMaxAge As Integer
Public {Public} As Boolean
Public NoCache As Boolean
Public NoStore As Boolean
Public MustRevalidate As Boolean
Public ProxyRevalidate As Boolean
Private Function MaxAge_Read() As Integer
End
Private Sub MaxAge_Write(Value As Integer)
End
Private Function ProxyMaxAge_Read() As Integer
End
Private Sub ProxyMaxAge_Write(Value As Integer)
End
Private Function NoStore_Read() As Boolean
End
Private Sub NoStore_Write(Value As Boolean)
End
Private Function MustRevalidate_Read() As Boolean
End
Private Sub MustRevalidate_Write(Value As Boolean)
End
Private Function ProxyRevalidate_Read() As Boolean
End
Private Sub ProxyRevalidate_Write(Value As Boolean)
End

View File

@ -13,7 +13,6 @@ SearchString=True
[OpenFile]
File[1]="/home/benoit/gambas/3.0/trunk/gb.desktop/src/gb.desktop/.src/Desktop.class:65.2"
Active=2
File[2]="/home/benoit/gambas/3.0/trunk/gb.desktop/src/gb.desktop/.src/Main.module:143.0"
File[3]="/home/benoit/gambas/3.0/trunk/gb.desktop/src/gb.desktop/.src/_DesktopPasswords.class:66.42"
File[4]="/home/benoit/gambas/3.0/trunk/gb.desktop/src/gb.desktop/.src/Form1.form"
@ -27,6 +26,7 @@ File[11]="/home/benoit/gambas/3.0/trunk/gb.desktop/src/gb.desktop/.src/DesktopWi
File[12]="/home/benoit/gambas/3.0/trunk/gb.desktop/src/gb.desktop/.src/Atom.class:0.0"
File[13]="/home/benoit/gambas/3.0/trunk/gb.desktop/src/gb.desktop/.src/_DesktopMenus.class:0.0"
File[14]="/home/benoit/gambas/3.0/trunk/gb.desktop/src/gb.desktop/.src/_DesktopScreenSaver.class:0.0"
Active=15
File[15]="/home/benoit/gambas/3.0/trunk/gb.desktop/src/gb.desktop/.src/_DesktopVirtual.class:0.0"
File[16]="/home/benoit/gambas/3.0/trunk/gb.desktop/src/gb.desktop/.src/DesktopFile.class:36.2"
Count=16

View File

@ -329,6 +329,7 @@ BEGIN_METHOD(CTABSTRIP_new, GB_OBJECT parent)
QObject::connect(wid, SIGNAL(currentChanged(int)), &CTabStrip::manager, SLOT(currentChanged(int)));
THIS->widget.flag.fillBackground = TRUE;
THIS->container = NULL;
THIS->index = -1;

View File

@ -1066,13 +1066,14 @@ END_PROPERTY
static QWidget *get_color_widget(QWidget *w)
{
if (qobject_cast<QAbstractScrollArea *>(w))
return ((QAbstractScrollArea *)w)->viewport();
QWidget *view = get_viewport(w);
if (view)
return view;
else
return w;
}
int get_real_background(CWIDGET *_object)
/*int get_real_background(CWIDGET *_object)
{
CWIDGET *parent = (CWIDGET *)CWIDGET_get_parent(THIS);
if (THIS->bg == COLOR_DEFAULT && parent)
@ -1088,7 +1089,7 @@ int get_real_foreground(CWIDGET *_object)
return get_real_foreground(parent);
else
return THIS->fg;
}
}*/
void CWIDGET_reset_color(CWIDGET *_object)
{
@ -1101,47 +1102,30 @@ void CWIDGET_reset_color(CWIDGET *_object)
if (THIS->bg == COLOR_DEFAULT && THIS->fg == COLOR_DEFAULT)
{
CWIDGET *parent = (CWIDGET *)CWIDGET_get_parent(THIS);
if (parent)
w->setPalette(parent->widget->palette());
else
w->setPalette(QPalette());
//CWIDGET *parent = (CWIDGET *)CWIDGET_get_parent(THIS);
//if (parent)
// w->setPalette(parent->widget->palette());
//else
WIDGET->setPalette(QPalette());
}
else
{
palette = QPalette(); //w->palette();
palette = QPalette(); //w->palette());
bg = THIS->bg;
fg = THIS->fg;
if (bg == COLOR_DEFAULT)
bg = get_real_background(THIS);
if (fg == COLOR_DEFAULT)
fg = get_real_foreground(THIS);
if (bg != COLOR_DEFAULT)
{
palette.setColor(w->backgroundRole(), QColor((QRgb)bg));
/*if (GB.Is(THIS, CLASS_Container))
{
palette.setColor(QPalette::Window, QColor((QRgb)bg));
palette.setColor(QPalette::Base, QColor((QRgb)bg));
palette.setColor(QPalette::Button, QColor((QRgb)bg));
}*/
}
if (fg != COLOR_DEFAULT)
{
palette.setColor(w->foregroundRole(), QColor((QRgb)fg));
/*if (GB.Is(THIS, CLASS_Container))
{
palette.setColor(QPalette::WindowText, QColor((QRgb)fg));
palette.setColor(QPalette::Text, QColor((QRgb)fg));
palette.setColor(QPalette::ButtonText, QColor((QRgb)fg));
}*/
/*palette.setColor(QPalette::WindowText, QColor((QRgb)fg));
palette.setColor(QPalette::Text, QColor((QRgb)fg));
palette.setColor(QPalette::ButtonText, QColor((QRgb)fg));*/
}
w->setPalette(palette);
WIDGET->setPalette(palette);
}
w->setAutoFillBackground(THIS->flag.fillBackground || THIS->bg != COLOR_DEFAULT);
@ -1153,7 +1137,7 @@ void CWIDGET_reset_color(CWIDGET *_object)
if (GB.Is(THIS, CLASS_Window))
CWINDOW_define_mask((CWINDOW *)THIS);
QWidget *container = ((CCONTAINER *)THIS)->container;
/*QWidget *container = ((CCONTAINER *)THIS)->container;
if (!container)
return;
@ -1168,7 +1152,7 @@ void CWIDGET_reset_color(CWIDGET *_object)
continue;
if (widget->fg == COLOR_DEFAULT || widget->bg == COLOR_DEFAULT)
CWIDGET_reset_color(widget);
}
}*/
}
void CWIDGET_set_color(CWIDGET *_object, int bg, int fg)

View File

@ -106,12 +106,15 @@ GEditor::GEditor(QWidget *parent)
setNumCols(1);
setKeyCompression(true);
setFocusPolicy(Qt::WheelFocus);
setPaletteBackgroundColor(defaultColors[GLine::Background]);
setAttribute(Qt::WA_InputMethodEnabled, true);
setMouseTracking(true);
viewport()->setMouseTracking(true);
viewport()->setCursor(Qt::ibeamCursor);
//setBackgroundRole(QPalette::Base);
viewport()->setBackgroundRole(QPalette::Base);
viewport()->setAutoFillBackground(true);
viewport()->setPaletteBackgroundColor(defaultColors[GLine::Background]);
//viewport()->setWFlags(WRepaintNoErase);
x = y = xx = 0;
@ -1723,7 +1726,7 @@ void GEditor::setStyle(int index, GHighlightStyle *style)
if (index == 0)
{
setPaletteBackgroundColor(style->color);
viewport()->setPaletteBackgroundColor(style->color);
redrawContents();
}
else