[DEVELOPMENT ENVIRONMENT]

* BUG: Always correctly round control coordinates in the form editor when 
  the form Scaled property is set.

[GB.FORM]
* BUG: Clicking inside the FontChooser style ListBox now always works 
  correctly.

[GB.GTK]
* BUG: Setting the Control.Tracking property should work correctly in all 
  cases now.
* BUG: Prevent a crash when creating an Image or a Picture with incorrect
  constructor arguments.

[GB.IMAGE.EFFECT]
* BUG: Use accurate compilation flags.

[GB.NET]
* BUG: Clear the CR / NL input conversion flags when initializing a serial 
  port.

[GB.QT4]
* BUG: Setting MovieBox Path property to NULL does not fail anymore.
* BUG: Do not try to reparent a window in its Show() method when it is 
  already visible.


git-svn-id: svn://localhost/gambas/trunk@2618 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2010-01-20 00:52:50 +00:00
parent 4e17272a76
commit 927a153b22
16 changed files with 88 additions and 59 deletions

View File

@ -261,10 +261,12 @@ AC_DEFUN([GB_INIT],
if test "x$gambas_optimization" = "xyes"; then
AM_CFLAGS_OPT="$AM_CFLAGS -O3"
AM_CFLAGS="$AM_CFLAGS -Os"
AM_CXXFLAGS_OPT="$AM_CXXFLAGS -O3 -fno-omit-frame-pointer"
AM_CXXFLAGS="$AM_CXXFLAGS -Os -fno-omit-frame-pointer"
else
AM_CFLAGS_OPT="$AM_CFLAGS -O0"
AM_CFLAGS="$AM_CFLAGS -O0"
AM_CXXFLAGS_OPT="$AM_CXXFLAGS -O0"
AM_CXXFLAGS="$AM_CXXFLAGS -O0"
fi
@ -274,6 +276,7 @@ AC_DEFUN([GB_INIT],
AC_SUBST(AM_CFLAGS)
AC_SUBST(AM_CFLAGS_OPT)
AC_SUBST(AM_CXXFLAGS)
AC_SUBST(AM_CXXFLAGS_OPT)
rm -f DISABLED
])

View File

@ -33,9 +33,10 @@ File[6]="/home/benoit/gambas/3.0/trunk/app/src/MakeWebSite/news/2009-11-29.html:
File[7]="/home/benoit/gambas/3.0/trunk/app/src/MakeWebSite/news/2010-01-04.html:3.58"
File[8]="/home/benoit/gambas/3.0/trunk/app/src/MakeWebSite/news.html:6.20"
File[9]="/home/benoit/gambas/3.0/trunk/app/src/MakeWebSite/gambas.sourceforge.net/style.css:80.0"
Active=10
File[10]="/home/benoit/gambas/3.0/trunk/app/src/MakeWebSite/gambas.sourceforge.net/style-rtl.css:81.0"
Count=10
Active=11
File[11]="/home/benoit/gambas/3.0/trunk/app/src/MakeWebSite/authors.txt:0.0"
Count=11
[Watches]
Count=0

View File

@ -409,7 +409,7 @@ Private Sub FromString(sData As String, Optional hParent As CControl)
cCoord = Split(Mid$(sLine, 12, -1))
'TRY PRINT cCoord[0]; ","; cCoord[1]; ","; cCoord[2]; ","; cCoord[3]
Try hCtrl.Move(CFloat(cCoord[0]) * Desktop.Scale, CFloat(cCoord[1]) * Desktop.Scale, True)
Try hCtrl.Move(Round(CFloat(cCoord[0]) * Desktop.Scale), Round(CFloat(cCoord[1]) * Desktop.Scale), True)
'TRY hCtrl.SetProperty("X", Val(cCoord[0]))
'TRY hCtrl.SetProperty("Y", Val(cCoord[1]))
If cCoord.Count >= 2 Then
@ -422,12 +422,12 @@ Private Sub FromString(sData As String, Optional hParent As CControl)
If eW = 0 Then
iW = 1
Else
iW = eW * Desktop.Scale
iW = Round(eW * Desktop.Scale)
Endif
If eH = 0 Then
iH = 1
Else
iH = eH * Desktop.Scale
iH = Round(eH * Desktop.Scale)
Endif
Try hCtrl.Resize(iW, iH, True)
Endif

View File

@ -7,7 +7,7 @@
Spacing = True
Padding = 8
{ fchChoose FileChooser
MoveScaled(1,1,75,45)
MoveScaled(1,1,87,47)
Expand = True
ShowBookmark = True
}

View File

@ -118,7 +118,7 @@ msgstr ""
msgid "Show files"
msgstr ""
#: FFocusBug.class:34 FMain.class:56
#: FFocusBug.class:34 FMain.class:63
msgid "TextBox1"
msgstr ""
@ -128,43 +128,43 @@ msgid ""
"A message should appear"
msgstr ""
#: FFontChooser.class:409
#: FFontChooser.class:410
msgid "Family"
msgstr ""
#: FFontChooser.class:424
#: FFontChooser.class:425
msgid "Style"
msgstr ""
#: FFontChooser.class:430
#: FFontChooser.class:431
msgid "Normal"
msgstr ""
#: FFontChooser.class:430
#: FFontChooser.class:431
msgid "Bold"
msgstr ""
#: FFontChooser.class:430
#: FFontChooser.class:431
msgid "Italic"
msgstr ""
#: FFontChooser.class:430
#: FFontChooser.class:431
msgid "Bold Italic"
msgstr ""
#: FFontChooser.class:438
#: FFontChooser.class:440
msgid "Underline"
msgstr ""
#: FFontChooser.class:443
#: FFontChooser.class:445
msgid "Strikeout"
msgstr ""
#: FFontChooser.class:453 FileView.class:78
#: FFontChooser.class:455 FileView.class:78
msgid "Size"
msgstr ""
#: FFontChooser.class:491
#: FFontChooser.class:493
msgid "How quickly daft jumping zebras vex"
msgstr ""
@ -184,23 +184,23 @@ msgstr ""
msgid "Cancel"
msgstr ""
#: FMain.class:35
#: FMain.class:42
msgid "Menu4"
msgstr ""
#: FMain.class:42
#: FMain.class:49
msgid "Action 1"
msgstr ""
#: FMain.class:46
#: FMain.class:53
msgid "Action 2"
msgstr ""
#: FMain.class:50
#: FMain.class:57
msgid "Action 3"
msgstr ""
#: FMain.class:61
#: FMain.class:69
msgid "Button1"
msgstr ""

View File

@ -1,5 +1,5 @@
# Gambas Project File 3.0
# Compiled with Gambas 2.99.0 (r2587)
# Compiled with Gambas 2.99.0 (r2606)
Startup=FMain
StackTrace=1
Version=2.99.0

View File

@ -176,7 +176,8 @@ Public Sub SetFont(sFont As String)
If Bold Then iStyle += 1
If Italic Then iStyle += 2
lstStyle[iStyle].Selected = True
'lstStyle[iStyle].Selected = True
lstStyle.Index = iStyle
chkUnderline.Value = UnderLine
chkStrikeout.Value = StrikeOut

View File

@ -1,18 +1,18 @@
# Gambas Form File 3.0
{ Form Form
MoveScaled(3,26,71.1667,44.1667)
MoveScaled(3,26,71.1429,44.1429)
Text = ("")
Arrangement = Arrange.Vertical
Spacing = 8
Spacing = True
{ HBox1 HBox
MoveScaled(1,1,68,32)
Expand = True
Spacing = 8
Spacing = True
{ VBox1 VBox
MoveScaled(2,2,24,27)
Expand = True
Spacing = 8
Spacing = True
{ lblFamily Label
MoveScaled(2,1,20,3)
Text = ("Family")
@ -24,7 +24,7 @@
}
{ panStyle VBox
MoveScaled(28,2,13,28)
Spacing = 8
Spacing = True
{ lblStyle Label
MoveScaled(2,1,9,3)
Text = ("Style")
@ -35,13 +35,14 @@
List = [("Normal"), ("Bold"), ("Italic"), ("Bold Italic")]
}
{ VBox2 VBox
MoveScaled(1,20,11,7)
MoveScaled(0,19,13,8)
AutoResize = True
{ chkUnderline CheckBox
MoveScaled(0,0,10,4)
MoveScaled(0,0,13,4)
Text = ("Underline")
}
{ chkStrikeOut CheckBox
MoveScaled(0,3,10,4)
MoveScaled(0,3,13,4)
Text = ("Strikeout")
}
}

View File

@ -11,3 +11,9 @@ Public Sub Button1_Click()
Balloon.Info("Bonjour tout le monde !", Last)
End
Public Sub FontChooser1_Activate()
Debug FontChooser1.SelectedFont
End

View File

@ -20,11 +20,15 @@
}
}
{ TextBox1 TextBox
MoveScaled(7,13,39,6)
MoveScaled(9,6,39,6)
Text = ("TextBox1")
}
{ Button1 Button
MoveScaled(21,5,12,5)
MoveScaled(33,1,12,5)
Font = Font["Bold"]
Text = ("Button1")
}
{ FontChooser1 FontChooser
MoveScaled(1,15,71,38)
}
}

View File

@ -167,7 +167,7 @@ END_METHOD
BEGIN_METHOD_VOID(CPICTURE_free)
PICTURE->unref();
if (PICTURE) PICTURE->unref();
END_METHOD

View File

@ -1634,19 +1634,23 @@ void gControl::setTracking(bool v)
{
if (v != _tracking)
{
uint event_mask = gtk_widget_get_events(widget);
_tracking = v;
if (v)
{
uint event_mask = gtk_widget_get_events(widget);
_old_tracking = event_mask & GDK_POINTER_MOTION_MASK;
gtk_widget_set_events(widget, event_mask | GDK_POINTER_MOTION_MASK);
event_mask |= GDK_POINTER_MOTION_MASK;
}
else
{
if (_old_tracking)
gtk_widget_set_events(widget, gtk_widget_get_events(widget) | GDK_POINTER_MOTION_MASK);
else
gtk_widget_set_events(widget, gtk_widget_get_events(widget) & ~GDK_POINTER_MOTION_MASK);
event_mask &= ~GDK_POINTER_MOTION_MASK;
}
if (!_old_tracking)
{
gtk_widget_unrealize(widget);
gtk_widget_set_events(widget, event_mask);
gtk_widget_realize(widget);
}
}
}

View File

@ -391,7 +391,7 @@ int OpenSerialPort(int *fd,int iflow,struct termios *oldtio,char *sName,int nBau
}
// cleaning default options
newtio.c_cflag &= ~(CSIZE | CSTOPB | PARENB | PARODD | CRTSCTS);
newtio.c_iflag &= ~( INPCK | ISTRIP | IGNPAR | IXON | IXOFF | IXANY );
newtio.c_iflag &= ~( INPCK | ISTRIP | IGNPAR | IXON | IXOFF | IXANY | ICRNL | INLCR );
newtio.c_lflag &= ~( ICANON | ECHO | ECHOE | ISIG );
// setting options
newtio.c_cflag= Of_Bits | Of_Stop | Of_Par | CLOCAL | CREAD | HUPCL | HardFlow;

View File

@ -46,24 +46,30 @@ static void free_movie(void *_object)
GB.ReleaseFile(THIS->addr, THIS->len);
GB.StoreString(NULL, &THIS->path);
if (WIDGET)
WIDGET->setText("");
}
static bool load_movie(void *_object, char *path, int len)
{
free_movie(THIS);
//qDebug("load_movie: %.*s", (int)len, path);
if (GB.LoadFile(path, len, &THIS->addr, &THIS->len))
return true;
if (len > 0)
{
//qDebug("load_movie: %.*s", (int)len, path);
if (GB.LoadFile(path, len, &THIS->addr, &THIS->len))
return true;
THIS->ba = new QByteArray();
THIS->ba->fromRawData((const char *)THIS->addr, THIS->len);
THIS->movie = new QMovie(*(THIS->ba));
GB.NewString(&THIS->path, path, len);
//qDebug("setMovie");
WIDGET->setMovie(THIS->movie);
THIS->ba = new QByteArray();
THIS->ba->fromRawData((const char *)THIS->addr, THIS->len);
THIS->movie = new QMovie(*(THIS->ba));
GB.NewString(&THIS->path, path, len);
//qDebug("setMovie");
WIDGET->setMovie(THIS->movie);
}
return false;
}
@ -100,7 +106,7 @@ BEGIN_PROPERTY(CMOVIEBOX_path)
if (load_movie(THIS, PSTRING(), PLENGTH()))
return;
if (!playing)
if (!playing && THIS->movie)
THIS->movie->setPaused(true);
}

View File

@ -1583,10 +1583,13 @@ void MyMainWindow::showActivate(QWidget *transient)
{
newParentWidget = CWINDOW_Current->widget.widget;
if (newParentWidget && parentWidget() != newParentWidget)
if (!isVisible())
{
//qDebug("showActivate");
doReparent(newParentWidget, windowFlags(), pos());
if (newParentWidget && parentWidget() != newParentWidget)
{
//qDebug("showActivate");
doReparent(newParentWidget, windowFlags(), pos());
}
}
}

View File

@ -6,7 +6,7 @@ gblib_LTLIBRARIES = gb.image.effect.la
libimageeffect_la_LIBADD =
libimageeffect_la_LDFLAGS = -module @LD_FLAGS@
libimageeffect_la_CXXFLAGS = -I$(top_srcdir)/share $(AM_CFLAGS_OPT)
libimageeffect_la_CXXFLAGS = -I$(top_srcdir)/share $(AM_CXXFLAGS_OPT)
libimageeffect_la_SOURCES = \
kimageeffect.h kimageeffect.cpp \
@ -14,7 +14,7 @@ libimageeffect_la_SOURCES = \
gb_image_effect_la_LIBADD = libimageeffect.la
gb_image_effect_la_LDFLAGS = -module @LD_FLAGS@
gb_image_effect_la_CXXFLAGS = -I$(top_srcdir)/share $(AM_CFLAGS)
gb_image_effect_la_CXXFLAGS = -I$(top_srcdir)/share $(AM_CXXFLAGS)
gb_image_effect_la_SOURCES = \
main.cpp main.h qt.h \