diff --git a/acinclude.m4 b/acinclude.m4 index 488a711e4..393163576 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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 ]) diff --git a/app/src/MakeWebSite/.settings b/app/src/MakeWebSite/.settings index 3274f9d3b..871e2ab31 100644 --- a/app/src/MakeWebSite/.settings +++ b/app/src/MakeWebSite/.settings @@ -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 diff --git a/app/src/gambas3/.src/Editor/Form/FForm.class b/app/src/gambas3/.src/Editor/Form/FForm.class index 966a2882f..593d48c77 100644 --- a/app/src/gambas3/.src/Editor/Form/FForm.class +++ b/app/src/gambas3/.src/Editor/Form/FForm.class @@ -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 diff --git a/comp/src/gb.form.dialog/.src/FFileDialog.form b/comp/src/gb.form.dialog/.src/FFileDialog.form index 446bda7f6..c384303f8 100644 --- a/comp/src/gb.form.dialog/.src/FFileDialog.form +++ b/comp/src/gb.form.dialog/.src/FFileDialog.form @@ -7,7 +7,7 @@ Spacing = True Padding = 8 { fchChoose FileChooser - MoveScaled(1,1,75,45) + MoveScaled(1,1,87,47) Expand = True ShowBookmark = True } diff --git a/comp/src/gb.form/.lang/.pot b/comp/src/gb.form/.lang/.pot index 1c4b7b6c2..62a279ff7 100644 --- a/comp/src/gb.form/.lang/.pot +++ b/comp/src/gb.form/.lang/.pot @@ -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 "" diff --git a/comp/src/gb.form/.project b/comp/src/gb.form/.project index 3252ff85a..1865331fe 100644 --- a/comp/src/gb.form/.project +++ b/comp/src/gb.form/.project @@ -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 diff --git a/comp/src/gb.form/.src/FFontChooser.class b/comp/src/gb.form/.src/FFontChooser.class index 9c90cbadb..8fe1657ac 100644 --- a/comp/src/gb.form/.src/FFontChooser.class +++ b/comp/src/gb.form/.src/FFontChooser.class @@ -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 diff --git a/comp/src/gb.form/.src/FFontChooser.form b/comp/src/gb.form/.src/FFontChooser.form index eedd32405..88a5c75a9 100644 --- a/comp/src/gb.form/.src/FFontChooser.form +++ b/comp/src/gb.form/.src/FFontChooser.form @@ -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") } } diff --git a/comp/src/gb.form/.src/FMain.class b/comp/src/gb.form/.src/FMain.class index 002b9513b..549980839 100644 --- a/comp/src/gb.form/.src/FMain.class +++ b/comp/src/gb.form/.src/FMain.class @@ -11,3 +11,9 @@ Public Sub Button1_Click() Balloon.Info("Bonjour tout le monde !", Last) End + +Public Sub FontChooser1_Activate() + + Debug FontChooser1.SelectedFont + +End diff --git a/comp/src/gb.form/.src/FMain.form b/comp/src/gb.form/.src/FMain.form index f082bc583..26ca78200 100644 --- a/comp/src/gb.form/.src/FMain.form +++ b/comp/src/gb.form/.src/FMain.form @@ -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) + } } diff --git a/gb.gtk/src/CPicture.cpp b/gb.gtk/src/CPicture.cpp index 215ea987e..7669a6805 100644 --- a/gb.gtk/src/CPicture.cpp +++ b/gb.gtk/src/CPicture.cpp @@ -167,7 +167,7 @@ END_METHOD BEGIN_METHOD_VOID(CPICTURE_free) - PICTURE->unref(); + if (PICTURE) PICTURE->unref(); END_METHOD diff --git a/gb.gtk/src/gcontrol.cpp b/gb.gtk/src/gcontrol.cpp index 5c23b7070..405f15250 100644 --- a/gb.gtk/src/gcontrol.cpp +++ b/gb.gtk/src/gcontrol.cpp @@ -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); } } } diff --git a/gb.net/src/tools.c b/gb.net/src/tools.c index 8e7257708..bee20ef71 100644 --- a/gb.net/src/tools.c +++ b/gb.net/src/tools.c @@ -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; diff --git a/gb.qt4/src/CMovieBox.cpp b/gb.qt4/src/CMovieBox.cpp index f313a8b94..ec2827849 100644 --- a/gb.qt4/src/CMovieBox.cpp +++ b/gb.qt4/src/CMovieBox.cpp @@ -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); } diff --git a/gb.qt4/src/CWindow.cpp b/gb.qt4/src/CWindow.cpp index 721a179ef..6fc33f7e9 100644 --- a/gb.qt4/src/CWindow.cpp +++ b/gb.qt4/src/CWindow.cpp @@ -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()); + } } } diff --git a/main/lib/image.effect/Makefile.am b/main/lib/image.effect/Makefile.am index b254d669e..9798c1f9f 100644 --- a/main/lib/image.effect/Makefile.am +++ b/main/lib/image.effect/Makefile.am @@ -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 \