[INTERPRETER]
* OPT: The blocking state of streams is cached now, so that the fcntl() system call is less used. [GB.FORM] * BUG: Stock icons work correctly again. [GB.QT4] * NEW: When drawing on a DrawingArea, Draw and Paint dimension properties always return the size of the DrawingArea, even if it is cached. * BUG: DrawingArea contents is not assume to be static anymore. Resizing them always send a full repaint event. git-svn-id: svn://localhost/gambas/trunk@2724 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
d181359d0a
commit
cd5bf4cc70
12 changed files with 4589 additions and 4427 deletions
|
@ -2000,7 +2000,7 @@ msgstr ""
|
|||
msgid "&Insert"
|
||||
msgstr ""
|
||||
|
||||
#: FList.class:282 FMenu.class:855 FTranslate.class:1649
|
||||
#: FList.class:282 FMenu.class:855 FTranslate.class:1634
|
||||
msgid "&Delete"
|
||||
msgstr ""
|
||||
|
||||
|
@ -2890,7 +2890,7 @@ msgstr ""
|
|||
msgid "Table '&1' already exists."
|
||||
msgstr ""
|
||||
|
||||
#: FNewTranslation.class:59 FTranslate.class:1634
|
||||
#: FNewTranslation.class:59 FTranslate.class:1619
|
||||
msgid "New translation"
|
||||
msgstr ""
|
||||
|
||||
|
@ -2910,7 +2910,7 @@ msgstr ""
|
|||
msgid "Recent"
|
||||
msgstr ""
|
||||
|
||||
#: FOpenProject.class:421 FWelcome.class:531
|
||||
#: FOpenProject.class:421 FWelcome.class:529
|
||||
msgid "Sort by path"
|
||||
msgstr ""
|
||||
|
||||
|
@ -3599,75 +3599,75 @@ msgstr ""
|
|||
msgid "Project translation"
|
||||
msgstr ""
|
||||
|
||||
#: FTranslate.class:1511
|
||||
#: FTranslate.class:1508
|
||||
msgid "Save translation"
|
||||
msgstr ""
|
||||
|
||||
#: FTranslate.class:1518
|
||||
#: FTranslate.class:1514
|
||||
msgid "Clear this translation"
|
||||
msgstr ""
|
||||
|
||||
#: FTranslate.class:1525
|
||||
#: FTranslate.class:1520
|
||||
msgid "This string must not be translated"
|
||||
msgstr ""
|
||||
|
||||
#: FTranslate.class:1532
|
||||
#: FTranslate.class:1526
|
||||
msgid "Copy untranslated string"
|
||||
msgstr ""
|
||||
|
||||
#: FTranslate.class:1539
|
||||
#: FTranslate.class:1532
|
||||
msgid "Verify the translation"
|
||||
msgstr ""
|
||||
|
||||
#: FTranslate.class:1546
|
||||
#: FTranslate.class:1538
|
||||
msgid "Find next untranslated string"
|
||||
msgstr ""
|
||||
|
||||
#: FTranslate.class:1553
|
||||
#: FTranslate.class:1544
|
||||
msgid "Find previous untranslated string"
|
||||
msgstr ""
|
||||
|
||||
#: FTranslate.class:1570
|
||||
#: FTranslate.class:1559
|
||||
msgid "Find a string in translation"
|
||||
msgstr ""
|
||||
|
||||
#: FTranslate.class:1613
|
||||
#: FTranslate.class:1598
|
||||
msgid "Statistics"
|
||||
msgstr ""
|
||||
|
||||
#: FTranslate.class:1635
|
||||
#: FTranslate.class:1620
|
||||
msgid "&New..."
|
||||
msgstr ""
|
||||
|
||||
#: FTranslate.class:1641
|
||||
#: FTranslate.class:1626
|
||||
msgid "Reload translation"
|
||||
msgstr ""
|
||||
|
||||
#: FTranslate.class:1642
|
||||
#: FTranslate.class:1627
|
||||
msgid "&Reload"
|
||||
msgstr ""
|
||||
|
||||
#: FTranslate.class:1648
|
||||
#: FTranslate.class:1633
|
||||
msgid "Delete translation"
|
||||
msgstr ""
|
||||
|
||||
#: FTranslate.class:1655
|
||||
#: FTranslate.class:1640
|
||||
msgid "Import a translation file"
|
||||
msgstr ""
|
||||
|
||||
#: FTranslate.class:1656
|
||||
#: FTranslate.class:1641
|
||||
msgid "&Import..."
|
||||
msgstr ""
|
||||
|
||||
#: FTranslate.class:1662
|
||||
#: FTranslate.class:1647
|
||||
msgid "Export to a translation file"
|
||||
msgstr ""
|
||||
|
||||
#: FTranslate.class:1663
|
||||
#: FTranslate.class:1648
|
||||
msgid "&Export..."
|
||||
msgstr ""
|
||||
|
||||
#: FTranslate.class:1674
|
||||
#: FTranslate.class:1659
|
||||
msgid "&Close"
|
||||
msgstr ""
|
||||
|
||||
|
@ -3683,7 +3683,7 @@ msgstr ""
|
|||
msgid "Recent projects"
|
||||
msgstr ""
|
||||
|
||||
#: FWelcome.class:484
|
||||
#: FWelcome.class:482
|
||||
msgid "Welcome to Gambas 3"
|
||||
msgstr ""
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -280,13 +280,11 @@ Public Sub dwgExample_Draw()
|
|||
|
||||
Dim hDrawingArea As DrawingArea = Last
|
||||
|
||||
With hDrawingArea
|
||||
Draw.Font = .Font
|
||||
'Draw.Line(0, .H / 2 - 1, .W - 1, .H / 2 - 1)
|
||||
'Draw.Transparent = FALSE
|
||||
Draw.Text(.Tag, 4, 0, .W - 16, .H - 4, Align.BottomNormal)
|
||||
Draw.Line(4, .H - 4, .W - 9, .H - 4)
|
||||
End With
|
||||
'Draw.FillRect(Draw.Clip.X, Draw.Clip.Y, Draw.Clip.Width, Draw.Clip.Height, Int(Rnd(0, &H1000000)))
|
||||
|
||||
Draw.Font = hDrawingArea.Font
|
||||
Draw.Text(hDrawingArea.Tag, 4, 0, Draw.W - 16, Draw.H - 4, Align.BottomNormal)
|
||||
Draw.Line(4, Draw.H - 4, Draw.W - 9, Draw.H - 4)
|
||||
|
||||
End
|
||||
|
||||
|
|
|
@ -46,20 +46,17 @@
|
|||
MoveScaled(3,1,82,4)
|
||||
Spacing = True
|
||||
{ cmbLang ComboBox
|
||||
MoveScaled(0,0,25,4)
|
||||
Text = ("")
|
||||
MoveScaled(0,0,35,4)
|
||||
ReadOnly = True
|
||||
Sorted = True
|
||||
}
|
||||
{ cbxFileChoice ComboBox
|
||||
MoveScaled(32,0,31,4)
|
||||
Text = ("")
|
||||
MoveScaled(35,0,33,4)
|
||||
ReadOnly = True
|
||||
}
|
||||
{ lblInfo Label
|
||||
MoveScaled(65,0,16,4)
|
||||
MoveScaled(69,0,12,4)
|
||||
Expand = True
|
||||
Text = ("")
|
||||
Alignment = Align.Right
|
||||
}
|
||||
}
|
||||
|
@ -68,43 +65,36 @@
|
|||
{ btnSave ToolButton
|
||||
MoveScaled(0,0,4,4)
|
||||
ToolTip = ("Save translation")
|
||||
Text = ("")
|
||||
Picture = Picture["icon:/small/save"]
|
||||
}
|
||||
{ btnClear ToolButton
|
||||
MoveScaled(4,0,4,4)
|
||||
ToolTip = ("Clear this translation")
|
||||
Text = ("")
|
||||
Picture = Picture["icon:/small/clear"]
|
||||
}
|
||||
{ btnDoNotTranslate ToolButton
|
||||
MoveScaled(10,0,4,4)
|
||||
ToolTip = ("This string must not be translated")
|
||||
Text = ("")
|
||||
Picture = Picture["icon:/small/warning"]
|
||||
}
|
||||
{ btnCopy ToolButton
|
||||
MoveScaled(14,0,4,4)
|
||||
ToolTip = ("Copy untranslated string")
|
||||
Text = ("")
|
||||
Picture = Picture["icon:/small/paste"]
|
||||
}
|
||||
{ btnVerify ToolButton
|
||||
MoveScaled(18,0,4,4)
|
||||
ToolTip = ("Verify the translation")
|
||||
Text = ("")
|
||||
Picture = Picture["icon:/small/watch"]
|
||||
}
|
||||
{ btnNext ToolButton
|
||||
MoveScaled(22,0,4,4)
|
||||
ToolTip = ("Find next untranslated string")
|
||||
Text = ("")
|
||||
Picture = Picture["icon:/small/down"]
|
||||
}
|
||||
{ btnPrevious ToolButton
|
||||
MoveScaled(26,0,4,4)
|
||||
ToolTip = ("Find previous untranslated string")
|
||||
Text = ("")
|
||||
Picture = Picture["icon:/small/up"]
|
||||
}
|
||||
{ Panel2 Panel
|
||||
|
@ -113,12 +103,10 @@
|
|||
{ txtFind TextBox
|
||||
MoveScaled(33,0,31,4)
|
||||
Expand = True
|
||||
Text = ("")
|
||||
}
|
||||
{ btnFind ToolButton
|
||||
MoveScaled(65,0,4,4)
|
||||
ToolTip = ("Find a string in translation")
|
||||
Text = ("")
|
||||
Picture = Picture["icon:/small/find"]
|
||||
}
|
||||
}
|
||||
|
@ -136,20 +124,17 @@
|
|||
Spacing = True
|
||||
{ lblComment Label
|
||||
MoveScaled(2,1,35,3)
|
||||
Text = ("")
|
||||
}
|
||||
{ txtOrig TextArea
|
||||
MoveScaled(2,4,37,5)
|
||||
Background = Color.Background
|
||||
Expand = True
|
||||
Text = ("")
|
||||
ReadOnly = True
|
||||
Wrap = True
|
||||
}
|
||||
{ txtTranslate TextArea
|
||||
MoveScaled(2,10,39,5)
|
||||
Expand = True
|
||||
Text = ("")
|
||||
Wrap = True
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,13 +2,10 @@
|
|||
|
||||
{ Form Form
|
||||
MoveScaled(0,0,69,74)
|
||||
Text = ("")
|
||||
{ mnuWindow Menu
|
||||
Text = ("")
|
||||
Visible = False
|
||||
}
|
||||
{ mnuMove Menu
|
||||
Text = ("")
|
||||
{ mnuPreviousTab Menu
|
||||
Action = "workspace-previous-tab"
|
||||
Text = ("Previous tab")
|
||||
|
@ -47,11 +44,9 @@
|
|||
Font = Font["Bold"]
|
||||
Foreground = Color.SelectedForeground
|
||||
Expand = True
|
||||
Text = ("")
|
||||
}
|
||||
{ btnClose Button
|
||||
MoveScaled(65,0,3,3)
|
||||
Text = ("")
|
||||
Picture = Picture["img/close.png"]
|
||||
}
|
||||
}
|
||||
|
@ -95,11 +90,9 @@
|
|||
Name = "btnTabClose"
|
||||
MoveScaled(10,59,9,8)
|
||||
ToolTip = ("Close current tab")
|
||||
Text = ("")
|
||||
}
|
||||
{ timCheck #Timer
|
||||
#X = 427
|
||||
#Y = 462
|
||||
#MoveScaled(57,14)
|
||||
Delay = 0
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Gambas Project File 3.0
|
||||
# Compiled with Gambas 2.99.0 (r2712)
|
||||
# Compiled with Gambas 2.99.0 (r2723)
|
||||
Startup=FMain
|
||||
StackTrace=1
|
||||
Version=2.99.0
|
||||
|
|
|
@ -8,8 +8,8 @@ Static Private $bInit As Boolean
|
|||
Static Private $aIconPath As String[]
|
||||
Static Private $cIconMap As Collection
|
||||
Static Private $aList As String[]
|
||||
Static Private $aSizeDec As Integer[] = [192, 128, 96, 72, 64, 48, 36, 32, 24, 22, 20, 16, 12]
|
||||
Static Private $aSizeInc As Integer[] = [12, 16, 20, 22, 24, 32, 36, 48, 64, 72, 96, 128, 192]
|
||||
Static Private $aSizeDec As Integer[] = [256, 128, 64, 48, 32, 24, 16]
|
||||
Static Private $aSizeInc As Integer[] = [16, 24, 32, 48, 64, 128, 256]
|
||||
|
||||
Static Private Sub SearchDesktop()
|
||||
|
||||
|
@ -292,7 +292,7 @@ Static Public Function _get(Key As String) As Picture
|
|||
sFile = Key & ".png"
|
||||
Endif
|
||||
|
||||
'If File.Dir(sFile) = "filesystems" Then sFile &= ";places" &/ File.Name(sFile)
|
||||
If Not Exist(sPath) Then Continue
|
||||
|
||||
For Each sFile In Split(sFile, ";")
|
||||
|
||||
|
@ -303,7 +303,6 @@ Static Public Function _get(Key As String) As Picture
|
|||
Endif
|
||||
|
||||
sImagePath = Subst(sTemplate, iSize)
|
||||
If Not Exist(File.Dir(sImagePath)) Then Continue
|
||||
|
||||
Try hPict = Picture[sImagePath]
|
||||
If hPict Then Return hPict
|
||||
|
@ -336,8 +335,6 @@ Static Public Function _get(Key As String) As Picture
|
|||
|
||||
Next
|
||||
|
||||
'Debug "Cannot find: "; Key
|
||||
|
||||
End
|
||||
|
||||
|
||||
|
|
|
@ -209,7 +209,7 @@ static int begin(GB_DRAW *d)
|
|||
if (wid->isCached())
|
||||
ret = init_drawing(d, wid->background(), wid->background()->width(), wid->background()->height());
|
||||
else if (wid->cache)
|
||||
ret = init_drawing(d, wid->cache, wid->cache->width(), wid->cache->height());
|
||||
ret = init_drawing(d, wid->cache, wid->width(), wid->height());
|
||||
else
|
||||
ret = init_drawing(d, wid, wid->width(), wid->height());
|
||||
|
||||
|
|
|
@ -184,6 +184,8 @@ void MyDrawingArea::paintEvent(QPaintEvent *event)
|
|||
p = DRAW_get_current();
|
||||
}
|
||||
|
||||
//qDebug("%d %d %d %d", r.x(), r.y(), r.width(), r.height());
|
||||
|
||||
if (!isTransparent())
|
||||
{
|
||||
p->translate(-r.x(), -r.y());
|
||||
|
|
|
@ -145,6 +145,13 @@ static int Begin(GB_PAINT *d)
|
|||
target = wid;
|
||||
|
||||
wid->drawn++;
|
||||
|
||||
if (init_painting(d, target))
|
||||
return TRUE;
|
||||
|
||||
d->width = wid->width();
|
||||
d->height = wid->height();
|
||||
return FALSE;
|
||||
}
|
||||
else if (GB.Is(device, CLASS_Printer))
|
||||
{
|
||||
|
|
|
@ -1223,6 +1223,8 @@ void STREAM_blocking(STREAM *stream, bool block)
|
|||
if (fd < 0)
|
||||
return;
|
||||
|
||||
stream->common.blocking = block;
|
||||
|
||||
if (block)
|
||||
fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) & ~O_NONBLOCK);
|
||||
else
|
||||
|
@ -1231,10 +1233,11 @@ void STREAM_blocking(STREAM *stream, bool block)
|
|||
|
||||
bool STREAM_is_blocking(STREAM *stream)
|
||||
{
|
||||
int fd = STREAM_handle(stream);
|
||||
return stream->common.blocking;
|
||||
/*int fd = STREAM_handle(stream);
|
||||
|
||||
if (fd < 0)
|
||||
return TRUE;
|
||||
|
||||
return (fcntl(fd, F_GETFL) & O_NONBLOCK) == 0;
|
||||
return (fcntl(fd, F_GETFL) & O_NONBLOCK) == 0;*/
|
||||
}
|
||||
|
|
|
@ -58,11 +58,12 @@ typedef
|
|||
unsigned no_lseek : 1;
|
||||
unsigned available_now : 1;
|
||||
unsigned standard : 1;
|
||||
unsigned blocking : 1;
|
||||
#if DEBUG_STREAM
|
||||
unsigned _reserved : 1;
|
||||
unsigned tag : 7;
|
||||
unsigned tag : 6;
|
||||
#else
|
||||
unsigned _reserved : 8;
|
||||
unsigned _reserved : 7;
|
||||
#endif
|
||||
}
|
||||
PACKED
|
||||
|
|
Loading…
Reference in a new issue