[Lazarus] Font "default_mono"

2020-10-26 Thread AlexeyT via lazarus

I suggest to introduce LCL font "default_mono"(we have "default" font only):

- on first access to getter/resolver, and find some monospaced font:

a) if font list has "Courier" or "Courier new" or "Consolas", we take it 
(to support Win32 usual font)


b) if no usual names found (case for *BSD+Solaris+Wine) we enumerate 
font list, find some, by testing 
Canvas.TextWidth('W')=Canvas.TextWidth('i'). The problem here is - we 
don't have some Canvas in getter


- on next access to getter, we return calculated name.

- I can find the avg time of this action (step b) on Linux/BSD/Solaris, 
if it's needed


Alexey Torgashin

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Is there a TSpinButton component in Lazarus?

2020-09-21 Thread AlexeyT via lazarus
Maybe a) project don't "require" (project options) needed package for 
DateTimeCtrl. b) LFM file misses something, check it.

What is causing this really strange error???
And what can I do about it?
Doing a build instead of Quick Compile does not help, same errors...


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] FileUtil.FindAllFiles - changes strings inside

2020-09-20 Thread AlexeyT via lazarus

procedure TFileSearcher.Search(ASearchPath: String; ASearchMask: String;
  ASearchSubDirs: Boolean; CaseSensitive: Boolean = False);

    while ASearchPath<>'' do begin
  p:=Pos(FPathSeparator,ASearchPath);
  if p<1 then
    p:=length(ASearchPath)+1;
  Dir:=ResolveDots(LeftStr(ASearchPath,p-1));
  Delete(ASearchPath,1,p);


you see that to iterate over all items in char-separated ASearchPath, 
code modifies str, ie deletes parts of it. It's slow! We should not 
modify str here. It's easy- save old-index, new-index, and get Copy(n1, 
n2-n1{+delta}).


Didn't see why ASearchMask is not "const", maybe same bad.

Alexey Torgashin

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] FileUtil.FindAllFiles - case-sensitive on Unix

2020-09-20 Thread AlexeyT via lazarus

procedure FindAllFiles(AList: TStrings; const SearchPath: String;

   Searcher.Search(SearchPath, SearchMask, SearchSubDirs);

Here we miss parameter "CaseSensitive=False". So on Linux it is False 
and function does case-insens search. It is slower! Why not to add param 
True for Unix. Not sure about macOS.


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] GTK2 app starts faster

2020-08-08 Thread AlexeyT via lazarus

With last changes (may-june-july 2020) in Laz, CudaText gtk2 starts faster-

before with small window: 220ms, with big window: 330ms (BoundsRect 
change was SLOW)


now with small window: 220ms, with big window: 260ms

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Gtk2 runtime error on terminal

2020-03-14 Thread AlexeyT via lazarus

Ubuntu 19.10 x64, Lazarus trunk

If I run "./cudatext dd.erb" with not installed lexer ERB, CudaText runs 
Python plugin to detect lexer for dd.erb, and shows menu-like dialog 
with such a lexer. It runs ok. and it prints to terminal such line


(cudatext:12080) Gtk-CRITICAL **: x.x.x.x: gtk_window_realize_icon: 
assertion 'info->icon_pixmap == NULL' failed



--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] IDE trunk cannot build on fpc 3.0.2

2020-02-25 Thread AlexeyT via lazarus

macOS 10.8, FPC 3.0.2 2017/02/12 for i386

pkgmanager.pas(77,78) Error (5000) Id not found TObjectArray$2

PS-- I use fpc 3.0.2 because I had problems to compile CudaText with 
3.0.4 on macOS in 2019


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] IDE PackageManager crash on placing ATSynEdit on a form

2020-02-24 Thread AlexeyT via lazarus

Details here. I see it on Linux gtk2 x64 too.

https://forum.lazarus.freepascal.org/index.php/topic,48617.0.html

What is wrong with atsynedit?

Stacktrace
#0 CLASSES$_$TWRITER_$__$$_WRITEPROPERTY$TPERSISTENT$POINTER at :0
001 CLASSES$_$TWRITER_$__$$_WRITEPROPERTIES$TPERSISTENT at :0
002 ?? at :0
003 ?? at :0
004 ?? at :0
005 ?? at :0
006 ?? at :0
007 ?? at :0
008 ?? at :0
009 ?? at :0
010 ?? at :0
011 ?? at :0
012 ?? at :0
013 ?? at :0
014 ?? at :0
015 ?? at :0
016 CLASSES$_$TWRITER_$__$$_WRITEPROPERTIES$TPERSISTENT at :0
017 ?? at :0

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Patch for Screen.BeginWaitCursor

2020-02-23 Thread AlexeyT via lazarus

Docs have wrong name

  
    Override the Cursor property with a temporary value. Use 
EndTempCursor to release it.

  
  
    Release the temporary cursor set with 
BeginTempCursor.

  

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Win10, clicking taskbar button don't minimize the app

2020-02-18 Thread AlexeyT via lazarus

I will let you know about CudaText issue, seems LCL issue

https://github.com/Alexey-T/CudaText/issues/2322#issuecomment-587597067

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Unneeded Paint calls from LCL

2020-01-12 Thread AlexeyT via lazarus

Details:
Linux gtk2: LCL calls Paint 5 times for ATSynEdit on FormCreate/FormShow:

1- DoOnResize - i filtered it out
2- DoOnResize - i filtered it out
3- Paint - it's ok
4- Paint again - i cannot filter it out
5- Paint again

Win32: LCL calls Paint 3 times:

1- Paint - it's ok
2- DoOnResize - i cannot filter it out
3- DoOnResize again

Can you optimize it to call Paint once, and DoOnResize BEFORE Paint?

Alexey T.


--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Unneeded Paint calls from LCL

2020-01-12 Thread AlexeyT via lazarus

Linux gtk2.

reduce these calls? 


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Gtk2 compilation error on SPARC

2020-01-03 Thread AlexeyT via lazarus
When I compile CudaText for Solaris SPARC (32bit CPU as IDE GoTo shows 
me blocks with "ifdef cpu32") I get compile error, gtk2widgetset.inc


  // clipboard
  ClipboardTypeAtoms[ctPrimarySelection]:=GDK_SELECTION_PRIMARY;
ClipboardTypeAtoms[ctSecondarySelection]:=GDK_SELECTION_SECONDARY;
ClipboardTypeAtoms[ctClipboard]:=gdk_atom_intern('CLIPBOARD',GdkFalse); 
///==> gtk2widgetset.inc(1473,36) Error: Incompatible types: got 
"PGdkAtom" expected "LongWord"


IDE shows that both sides (array and gdk_atom_intern) are TGdkAtom - hmm.

Lazarus trunk from today.

user@PC:~/fpcupdeluxe/fpc/bin/x86_64-linux$ ./fpc
Free Pascal Compiler version 3.3.1-r43462 [2019/11/14] for x86_64

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] gtk2 issue with clicking on ATTabs

2019-12-22 Thread AlexeyT via lazarus

User of ATTabs wrote, I don't know what to do here?

Hi,
Having a issue with ATTabs on Linux GTk2 (Laz 2.06) When I add a tab 
from a popup menu from a tvirtualstringtree the close button on the tab 
does nothing on the first click and on the second click it closes and in 
the terminal this error pops up:
|GLib-GObject-WARNING **: 11:15:36.741: ../glib/gobject/gsignal.c:1206: 
no emission of signal "button-release-event" to stop for instance 
'0x208b5b0'|
If I right click on the tab and use the popup menu I call to close the 
tab this error does not occur.
Also if I spawn the tab from a button on a toolbar it closes on the 
first click but that error still shows in the terminal. I am using the 
latest version of Attabs as of a day ago.

This does not happen in windows and I have not been able to test in QT5
I am using tactions to add the tab and if I call the action from the 
tvirtualstringtrees double click event it also closes on the first 
click, it's only if the addtab is called from the context of a popup 
menu. I also noticed if I click anywhere on the form that is hosted in 
the tab then click the close button it closes.


--
Regards,
Alexey

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Canvas.PolyBezier parameter

2019-12-13 Thread AlexeyT via lazarus

lcl/graphics.pp

    procedure PolyBezier(Points: PPoint; NumPts: Integer;
 Filled: boolean = False;
 Continuous: boolean = False); virtual; {$IFDEF 
HasFPCanvas1}reintroduce;{$ENDIF}

    procedure PolyBezier(const Points: array of TPoint;
 Filled: boolean = False;
 Continuous: boolean = False); {$IFDEF 
HasFPCanvas1}reintroduce;{$ENDIF}


def of Cotinuous is False! Seems it's wrong? Because Delphi don't have 
Continuous param at all and by default it paints continuous curve, ie it 
needs 4 points for the 1st curve and 3 points per next curves.


http://docwiki.embarcadero.com/Libraries/Rio/en/Vcl.Graphics.TCanvas.PolyBezier

so LCL must change def of Continuous to True?


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Online help for "Help options"

2019-12-07 Thread AlexeyT via lazarus

https://wiki.lazarus.freepascal.org/IDE_Window:_Help_Options

- Can somebody write there, what is field "FP Doc HTML Path"? what 
folder of FPC or Lazarus must be put there?


- What is "FP Doc" - write too.

- How user can fill "Databases" grid? what databases? where to get them?


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] FPC trunk cannot compile Lazarus Qt5 lib

2019-11-14 Thread AlexeyT via lazarus
I must say I do cross compile from Linux x64 toHaiku x32, it is FPC x32 
limitation.


Alex

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] FPC trunk cannot compile Lazarus Qt5 lib

2019-11-14 Thread AlexeyT via lazarus

Lazarus trunk, fpc 3.3.1-r43462 Linux x64

qt56.pas(12495,37) Error: Enumeration symbols can only have values in 
the range of -2^31 to 2^31-1


    QStyleCE_CustomBase = $f000 );

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Wiki error on uploading new version of png picture

2019-11-11 Thread AlexeyT via lazarus


 Database error

A database query error has occurred. This may indicate a bug in the 
software.


[ac44310904ca4f16e1729b3f] /Special:Upload Wikimedia\Rdbms\DBQueryError 
from line 1457 of 
/srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php: A 
database query error has occurred. Did you forget to run your 
application's database schema updater after upgrading?

Query: RELEASE SAVEPOINT `wikimedia_rdbms_atomic1`
Function: LocalFile::recordUpload2
Error: 1305 SAVEPOINT wikimedia_rdbms_atomic1 does not exist (localhost)

Backtrace:

#0 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(1427): 
Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, 
string)
#1 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(1200): 
Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, 
string, boolean)
#2 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(3498): 
Wikimedia\Rdbms\Database->query(string, string)
#3 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(3584): 
Wikimedia\Rdbms\Database->doReleaseSavepoint(string, string)
#4 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(2953): 
Wikimedia\Rdbms\Database->endAtomic(string)
#5 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(2880): 
Wikimedia\Rdbms\Database->nonNativeInsertSelect(string, array, array, 
array, string, array, array, array)
#6 /srv/www/lazaruswiki/includes/filerepo/file/LocalFile.php(1606): 
Wikimedia\Rdbms\Database->insertSelect(string, array, array, array, 
string, array, array, array)
#7 /srv/www/lazaruswiki/includes/filerepo/file/LocalFile.php(1364): 
LocalFile->recordUpload2(string, string, boolean, array, string, User, 
array)
#8 /srv/www/lazaruswiki/includes/upload/UploadBase.php(868): 
LocalFile->upload(string, string, boolean, integer, array, boolean, 
User, array)
#9 /srv/www/lazaruswiki/includes/specials/SpecialUpload.php(567): 
UploadBase->performUpload(string, boolean, boolean, User, array)
#10 /srv/www/lazaruswiki/includes/specials/SpecialUpload.php(207): 
SpecialUpload->processUpload()
#11 /srv/www/lazaruswiki/includes/specialpage/SpecialPage.php(565): 
SpecialUpload->execute(NULL)
#12 
/srv/www/lazaruswiki/includes/specialpage/SpecialPageFactory.php(568): 
SpecialPage->run(NULL)
#13 /srv/www/lazaruswiki/includes/MediaWiki.php(288): 
SpecialPageFactory::executePath(Title, RequestContext)
#14 /srv/www/lazaruswiki/includes/MediaWiki.php(861): 
MediaWiki->performRequest()

#15 /srv/www/lazaruswiki/includes/MediaWiki.php(524): MediaWiki->main()
#16 /srv/www/lazaruswiki/index.php(42): MediaWiki->run()
#17 {main}

--
Regards,
Alexey

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Reworked ReadFileToString to support Linux virtual files

2019-11-08 Thread AlexeyT via lazarus

https://bugs.freepascal.org/view.php?id=36145

Last attached demo contains my reworked function (after the fix it works 
pretty fast, i tested it). Can you apply at least this function? The 
issue can be opened - issue is about IDE. The function is reworked to 
support Linux virtual files like /proc/version, /proc/meminfo.


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Qt5 OpenDialog/SaveDialog file filter ok?

2019-10-31 Thread AlexeyT via lazarus

Sorry, that Filter works ok.

Another question. In qt5/qtwsdialogs.pp we have

  if (AFileDialog is TSaveDialog) and (trim(TmpFilter)='()') then
    Result := ''
  else
    Result := GetUtf8String(TmpFilter);

so that empty dlg.Filter will give empty result Qt filter. Only for 
SaveDialog! Why only for SaveDailog? it is needed for OpenDialog too, 
because result "()" looks bad.


AT

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Qt5 problem with Button accelerator and TEdit input

2019-10-30 Thread AlexeyT via lazarus

Fedora 31, KDE Plasma, Qt5 version of CudaText x64.

In one dialog (Plugins / Find in Files 4), I have button with 
accelerator, "&.*" -it's accelerator for dot char. Now in the same form 
i have TCombobox. I type text in combobox, when i type dot, button 
presses! so I cannot enter full text.


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Qt5 OpenDialog/SaveDialog file filter ok?

2019-10-28 Thread AlexeyT via lazarus
Checked on Ubuntu x64 (with its GTK based Qt5) and Fedora (KDE Plasma) 
29. In my app qt5 build, OpenDialog and SaveDialog file filters are 
empty (while they are set in app). Confirmed?


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Qt5 bindings misses QTextEdit_setPlaceholderText

2019-10-26 Thread AlexeyT via lazarus

This looks like missed export in qt5.pas

https://raw.githubusercontent.com/graemeg/lazarus/upstream/lcl/interfaces/qt5/cbindings/qt5.pas

file has the

procedure QLineEdit_setPlaceholderText(handle: QLineEditH; AnonParam1: 
PWideString); cdecl; external Qt5PasLib name 'QLineEdit_setPlaceholderText';

but don't have QTextEdit_setPlaceholderText.


On 26.10.2019 10:01, AlexeyT via lazarus wrote:
./cudatext: undefined symbol: QTextEdit_setPlaceholderText 


--
Regards,
Alexey

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Qt5 build of program, modal dialogs go to background

2019-10-26 Thread AlexeyT via lazarus
I did install the libqt5pas (on Ubuntu x64), i just cannot detect qt5 
version from terminal. The problem is with LCL application CudaText:


a) its dialog Plugins / Options Editor cannot be dragged by mouse, it 
always jumps to back of main Cudatext window


b) new problem found in application CudaText on FEDORA x64. It has KDE 
Plasma with qt5 and libqt5pas. (sudo yum install qt5pas). When I call 
dialog Plugins / Options Editor, Cudatext crashes:


./cudatext: undefined symbol: QTextEdit_setPlaceholderText


On 26.10.2019 9:49, zeljko wrote:
Sorry, but I don't understand what is exact problem. You cannot build 
libQt5Pas with qmake or you have problem with Qt5LCL application ?
I'm using LinuxMint 19.2 on my laptop and there I have qmake (qt5) and 
qmake-qt4 installed.


zeljko 


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Qt5 build of program, modal dialogs go to background

2019-10-25 Thread AlexeyT via lazarus
I made Qt5 build of CudaText, pls test and see is my bug present? I test 
on Ubuntu w/o Qt5:


user@PC:~$ qmake --version
qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such 
file or directory

user@PC:~$ qmake-qt5 --version
Command 'qmake-qt5' not found, did you mean:
  command 'qmake-qt4' from deb qt4-qmake (4:4.8.7+dfsg-7ubuntu1)

steps.

- get beta of Qt5 build 
https://sourceforge.net/projects/cudatext/files/beta_version/


- configure Python engine in it: 
https://wiki.freepascal.org/CudaText#Python_on_Linux.2C_BSD.2C_Solaris


- open Plugins / Options Editor dialog, and drag this dialog by it 
caption. Here dialog always jumps to BACK of main cudatext dialog during 
dragging (and it jumps by pixels too). About dialog don't jump.



--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] LCL Grids: not scalable line width

2019-10-06 Thread AlexeyT via lazarus
IMO I have found place where width of canvas line is not scaled to 
current DPI.


procedure TCustomGrid.ChangeCursor(ACursor: TCursor;

...
Canvas.Pen.Width:=3;

...
Canvas.Pen.Width:=1;

--
Regards,
Alexey

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] JsonTools issues in GH

2019-10-02 Thread AlexeyT via lazarus
https://github.com/sysrpl/JsonTools/issues -many issues are there, seems 
all not even reviewed. JsonTools author had posted the comparision of 
json libs here.


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Qt4 crash in CudaText

2019-09-28 Thread AlexeyT via lazarus

Qt4 version.

user@PC:~$ dpkg-query -s qtchooser

Package: qtchooser
Status: install ok installed
Priority: optional
Section: libdevel
Installed-Size: 127
Maintainer: Ubuntu Developers 
Architecture: amd64
Multi-Arch: foreign
Version: 66-1
Replaces: libqt5core5a (<< 5.5.1+dfsg-17~), libqtcore4 (<< 
4:4.8.7+dfsg-7~), qtchooser-bin (<< 64-ga1b6736-2~)

Depends: libc6 (>= 2.14), libgcc1 (>= 1:3.0), libstdc++6 (>= 5.2)
Breaks: libqt5core5a (<< 5.5.1+dfsg-17~), libqtcore4 (<< 
4:4.8.7+dfsg-7~), qtbase5-dev-tools (<< 5.9.2+dfsg-3~), qtchooser-bin 
(<< 64-ga1b6736-2~), qttools5-dev-tools (<< 5.9.2-2~)


--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Qt4 crash in CudaText

2019-09-27 Thread AlexeyT via lazarus

>>    if (not EqualRect(LocalRect, sourceRect^) then

Changed this; still crash. call stack is similar:

#0 QTransform::type() const at :0
#1 ?? at :0
#2 QPainter::drawImage(QRectF const&, QImage const&, QRectF const&, 
QFlags) at :0

#3 QPainter_drawImage2 at :0
#4 DRAWIMAGE(0x7fffdd6aad80, 0x7fffb2f4, 0x184edd0, 0x7fffb304, 
0x0, 0x7fffb2e4, 0) at qt/qtobjects.pas:3612
#5 STRETCHMASKBLT(0x7fffef808d30, 140736908144000, 0, 0, 438, 256, 
140736908144384, 0, 0, 438, 256, 0, 0, 0, 13369376) at qt/qtwinapi.inc:6990
#6 STRETCHBLT(0x7fffef808d30, 140736908144000, 0, 0, 438, 256, 
140736908144384, 0, 0, 438, 256, 13369376) at qt/qtwinapi.inc:6787
#7 STRETCHBLT(140736908144000, 0, 0, 438, 256, 140736908144384, 0, 0, 
438, 256, 13369376) at include/winapi.inc:1025
#8 COPYRECT(0x7fffd6997ae0, {LEFT = 0, TOP = 0, RIGHT = 438, BOTTOM = 
256, TOPLEFT = {X = 0, Y = 0}, BOTTOMRIGHT = {X = 438, Y = 256}, VECTOR 
= {0, 0, 438, 256}}, 0x7fffd6997f00, {LEFT = 0, TOP = 0, RIGHT = 438, 
BOTTOM = 256, TOPLEFT = {X = 0, Y = 0}, BOTTOMRIGHT = {X = 438, Y = 
256}, VECTOR = {0, 0, 438, 256}}) at include/canvas.inc:122

#9 PAINT(0x7fffd6eae8f0) at atlistbox.pas:541

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Qt4 crash in CudaText

2019-09-27 Thread AlexeyT via lazarus

Stack trace.

#0 QTransform::type() const at :0

#1 ?? at :0
#2 QPainter::drawImage(QRectF const&, QImage const&, QRectF const&, 
QFlags) at :0

#3 QPainter_drawImage2 at :0
#4 DRAWIMAGE(0x7fffdd6aad80, 0x7fffb2e4, 0x18bd8a0, 0x7fffb2f4, 
0x0, 0x7fffb2d4, 0) at qt/qtobjects.pas:3568
#5 STRETCHMASKBLT(0x7fffef808d30, 140736908144000, 0, 0, 438, 256, 
140736908144384, 0, 0, 438, 256, 0, 0, 0, 13369376) at qt/qtwinapi.inc:6990
#6 STRETCHBLT(0x7fffef808d30, 140736908144000, 0, 0, 438, 256, 
140736908144384, 0, 0, 438, 256, 13369376) at qt/qtwinapi.inc:6787
#7 STRETCHBLT(140736908144000, 0, 0, 438, 256, 140736908144384, 0, 0, 
438, 256, 13369376) at include/winapi.inc:1025
#8 COPYRECT(0x7fffd6997ae0, {LEFT = 0, TOP = 0, RIGHT = 438, BOTTOM = 
256, TOPLEFT = {X = 0, Y = 0}, BOTTOMRIGHT = {X = 438, Y = 256}, VECTOR 
= {0, 0, 438, 256}}, 0x7fffd6997f00, {LEFT = 0, TOP = 0, RIGHT = 438, 
BOTTOM = 256, TOPLEFT = {X = 0, Y = 0}, BOTTOMRIGHT = {X = 438, Y = 
256}, VECTOR = {0, 0, 438, 256}}) at include/canvas.inc:122

#9 PAINT(0x7fffd6eae8f0) at atlistbox.pas:541
#10 PAINTWINDOW(0x7fffd6eae8f0, 140736908144000) at 
include/customcontrol.inc:118
#11 PAINTHANDLER(0x7fffd6eae8f0, {MSG = 15, UNUSEDMSG = 0, DC = 
140736908144000, PAINTSTRUCT = 0x7fffd6cf69c0, RESULT = 0}) at 
include/wincontrol.inc:4856
#12 WMPAINT(0x7fffd6eae8f0, {MSG = 15, UNUSEDMSG = 0, DC = 
140736908144000, PAINTSTRUCT = 0x7fffd6cf69c0, RESULT = 0}) at 
include/wincontrol.inc:6828
#13 WMPAINT(0x7fffd6eae8f0, {MSG = 15, UNUSEDMSG = 0, DC = 
140736908144000, PAINTSTRUCT = 0x7fffd6cf69c0, RESULT = 0}) at 
include/customcontrol.inc:98

#14 SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal at :0
#15 ?? at :0
#16 ?? at :0
#17 ?? at :0
#18 ?? at :0
#19 .Ld255 at :0
#20 ?? at :0
#21 ?? at :0
#22 ?? at :0
#23 ?? at :0
#24 ?? at :0


Alex

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Qt4 crash in CudaText

2019-09-27 Thread AlexeyT via lazarus
I just tested CudaText Linux x64 qt4 build: it now crashes on showing 
Command Palette dialog. Crash inside ATListbox.pas in Paint handler, in 
some Qt painting code. (I tried to change ATListbox.DoubleBuffered, no 
help.)


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] LCL Controls.pp needs 'inline'

2019-09-14 Thread AlexeyT via lazarus

Hi; these are one liners.

procedure AdjustBorderSpace(var RemainingClientRect, CurBorderSpace: TRect;
  const Space: TRect);
begin
AdjustBorderSpace(RemainingClientRect,CurBorderSpace,Space.Left,Space.Top,
    Space.Right,Space.Bottom);
end;

procedure ChangeBiDiModeAlignment(var Alignment: TAlignment);
begin
  case Alignment of
    taLeftJustify: Alignment := taRightJustify;
    taRightJustify: Alignment := taLeftJustify;
  end;
end;

function GetModalResultStr(ModalResult: TModalResult): ShortString;
begin
  Result := UITypes.ModalResultStr[ModalResult];
end;

function SendAppMessage(Msg: Cardinal; WParam: WParam; LParam: LParam): 
Longint;

begin
  Result:=LCLProc.SendApplicationMessage(Msg,WParam,LParam);
end;

procedure MoveWindowOrg(dc: hdc; X, Y: Integer);
begin
  MoveWindowOrgEx(DC,X,Y);
end;

function FindDragTarget(const Position: TPoint; AllowDisabled: Boolean): 
TControl;

begin
  Result := FindControlAtPosition(Position, AllowDisabled);
end;

function CursorToIdent(Cursor: Longint; var Ident: string): Boolean;
begin
  Result := IntToIdent(Cursor, Ident, CursorIdents);
end;

function IdentToCursor(const Ident: string; var Cursor: Longint): Boolean;
begin
  Result := IdentToInt(Ident, Cursor, CursorIdents);
end;

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] gtk2: GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak

2019-09-13 Thread AlexeyT via lazarus

It is fixed; thanks.
New build of Lazarus (trunk) gives errors with CudaText gtk2 build. 
How to fix that? 


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Win8/Win10 taskbar button is not focused on CudaText start

2019-09-13 Thread AlexeyT via lazarus
I'm not sure it is Laz issue, seem it is- please see the report and GIF 
animation:


https://github.com/Alexey-T/CudaText/issues/2183

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] gtk2: GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak

2019-09-07 Thread AlexeyT via lazarus
New build of Lazarus (trunk) gives errors with CudaText gtk2 build. How 
to fix that?


user@PC:~/cuda/cuda/app$ ./cudatext
Gtk-Message: 14:01:37.977: Failed to load module "overlay-scrollbar"
Gtk-Message: 14:01:37.987: Failed to load module "canberra-gtk-module"
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory leak.
GetOrCreateWidgetInfo: MainWidget info was created causing a memory 

[Lazarus] Maybe it's TreeView hi-dpi bug on Linux?

2019-08-02 Thread AlexeyT via lazarus

Hi

https://github.com/Alexey-T/CudaText/files/3438082/cudatext_hidpi.zip

This is video with bug of CudaText on Linux on hi-dpi. Details: 
https://github.com/Alexey-T/CudaText/issues/2099


On video you see some gray "panel entity" on the bottom of TreeView (ie 
Snippet Panel plugin of CudaText). I cannot test hi-dpi on Linux. I 
cannot repro this on Win10. Any ideas? Maybe Treeview has some internal 
panel which is scaled badly?


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Cocoa: restoring windows order after reactivating the application

2019-06-15 Thread AlexeyT via lazarus

https://github.com/graemeg/lazarus/commit/4a95f3638a6ec38e6c975164b52c9f6d54c7ad10

orderArray. Better make its type "array of TWinOrderLevel" and set its 
size as SetLength(orderArray, N), and SetLength(orderArray, 0) to free. 
This is better practice, more pascalish way to allocate array.


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Wiki shows error on uploading new version of PNG image

2019-06-15 Thread AlexeyT via lazarus


 Database error

A database query error has occurred. This may indicate a bug in the 
software.


[abf9cf9f7950256477509e2b] /Special:Upload Wikimedia\Rdbms\DBQueryError 
from line 1457 of 
/srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php: A 
database query error has occurred. Did you forget to run your 
application's database schema updater after upgrading?

Query: RELEASE SAVEPOINT `wikimedia_rdbms_atomic1`
Function: LocalFile::recordUpload2
Error: 1305 SAVEPOINT wikimedia_rdbms_atomic1 does not exist (localhost)

Backtrace:

#0 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(1427): 
Wikimedia\Rdbms\Database->makeQueryException(string, integer, string, 
string)
#1 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(1200): 
Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, 
string, boolean)
#2 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(3498): 
Wikimedia\Rdbms\Database->query(string, string)
#3 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(3584): 
Wikimedia\Rdbms\Database->doReleaseSavepoint(string, string)
#4 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(2953): 
Wikimedia\Rdbms\Database->endAtomic(string)
#5 /srv/www/lazaruswiki/includes/libs/rdbms/database/Database.php(2880): 
Wikimedia\Rdbms\Database->nonNativeInsertSelect(string, array, array, 
array, string, array, array, array)
#6 /srv/www/lazaruswiki/includes/filerepo/file/LocalFile.php(1606): 
Wikimedia\Rdbms\Database->insertSelect(string, array, array, array, 
string, array, array, array)
#7 /srv/www/lazaruswiki/includes/filerepo/file/LocalFile.php(1364): 
LocalFile->recordUpload2(string, string, boolean, array, string, User, 
array)
#8 /srv/www/lazaruswiki/includes/upload/UploadBase.php(868): 
LocalFile->upload(string, string, boolean, integer, array, boolean, 
User, array)
#9 /srv/www/lazaruswiki/includes/specials/SpecialUpload.php(567): 
UploadBase->performUpload(string, boolean, boolean, User, array)
#10 /srv/www/lazaruswiki/includes/specials/SpecialUpload.php(207): 
SpecialUpload->processUpload()
#11 /srv/www/lazaruswiki/includes/specialpage/SpecialPage.php(565): 
SpecialUpload->execute(NULL)
#12 
/srv/www/lazaruswiki/includes/specialpage/SpecialPageFactory.php(568): 
SpecialPage->run(NULL)
#13 /srv/www/lazaruswiki/includes/MediaWiki.php(288): 
SpecialPageFactory::executePath(Title, RequestContext)
#14 /srv/www/lazaruswiki/includes/MediaWiki.php(861): 
MediaWiki->performRequest()

#15 /srv/www/lazaruswiki/includes/MediaWiki.php(524): MediaWiki->main()
#16 /srv/www/lazaruswiki/index.php(42): MediaWiki->run()
#17 {main}

--
Regards,
Alexey

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Win32 TPenStyle psDot is ugly

2019-06-01 Thread AlexeyT via lazarus

Thanks for this info, made a patch for Grids.

> 1 pixel dots followed by 1 pixel spaces then this works for dotted 
Geometric (Cosmetic = false) pen


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Win32 TPenStyle psDot is ugly

2019-05-29 Thread AlexeyT via lazarus
According to MS docs, psDot style must give nice looking 1 pixel dots. 
https://docs.microsoft.com/en-us/windows/desktop/gdi/pen-style


Lazarus creates pen via Widgetset's ExtCreatePen which calls Win32 
ExtCreatePen.


reality: If I set psDot to StringGrid.GridLineStyle, I get ugly dots: 
each of about 3 pixels fragments. psDash is ugly too: dashes are very long.


Why?

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Patch for TreeFontTyle AVLTree

2019-05-25 Thread AlexeyT via lazarus

https://github.com/graemeg/lazarus/commit/34d02cea12df535b67cb07f45d02e2b06134dc66

better this (Result can be any int!)

begin

  Result:= TFreeTypeGlyph(Item1).Index - TFreeTypeGlyph(Item2).Index;

end;

--
Regards,
Alexey

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Grids micro issue

2019-05-16 Thread AlexeyT via lazarus

procedure TCustomGrid.AutoAdjustColumns;
  For i:=0 to ColCount do
    AutoAdjustColumn(i);

//must be ColCount-1

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] IDE target names

2019-05-15 Thread AlexeyT via lazarus

In the IDE "Target" sheet page we have OS names

1- "Beos"- consider to change to better casing "BeOS" (Wikipedia)

2- "go32v2" - the same--> "Go32v2"

3- "iphonesim" - the same

4- "nds"- I dunno what it is, maybe fix too

5- "Netware"- the same--> "NetWare" (Wikipedia)

6- "qnx"- the same--> "QNX"


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Qt4: circle painted with artifact

2019-05-12 Thread AlexeyT via lazarus
I noticed that Qt4 build of CudaText paints tabs' X on mouse-over wrong. 
Picture attached (1K). It is ATTabs code - see here


https://github.com/Alexey-T/ATTabs/blob/master/attabs/attabs.pas#L1486

attabs.pas, procedure TATTabs.DoPaintXTo

--
Regards,
Alexey

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] IDE: ColorBox not ok height

2019-05-11 Thread AlexeyT via lazarus
In /Environment - Messages Window/ pane of options dialog, we have 2 
colorbox'es. They have same height on Linux gtk2. On Win10 with High-dpi 
150%, they have different height (by 4..6 pixels). Maybe some AutoSize 
is not set?


(see also other colorbox'es in another panes - the same)

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Detailed message about "incompatible ppu=..."

2019-05-11 Thread AlexeyT via lazarus
wsgrids.pp(13,30) Fatal: Cannot find WSGrids used by Grids, incompatible 
ppu=/home/user/lazarus/lcl/units/x86_64-linux/wsgrids.ppu, package LCLBase


I didn't show that msg before, now I see it and show it. Can Laz show 
more detailed error here? with ppu version and platform?


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Add 'const' to func params

2019-04-30 Thread AlexeyT via lazarus

lcl/clipbrd.pp

    procedure SetAsHtml(Html: String);
    procedure SetAsHtml(Html: String; const PlainText: String);

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Mantis: cannot edit my comments

2019-04-26 Thread AlexeyT via lazarus

Cannot edit them anymore. No button at all.

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Mantis application error

2019-04-22 Thread AlexeyT via lazarus
Will be good if Developers will be added to white list in Mantis. Seems 
they are not spammers.


AT

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Website/Mantis back online

2019-04-21 Thread AlexeyT via lazarus

My last Mantis issue (about macOS dark theme) has lost the PNG attachment.

AT

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] IDE trunk cannot build

2019-04-14 Thread AlexeyT via lazarus

FPC 3.2 fixes. IDE last trunk.

function TFppkgHelper.GetConfigurationFileName: string;
begin
  Result := '';
  {$IF FPC_FULLVERSION>30100}
  if Assigned(FFPpkg) then
    Result:=FFPpkg.ConfigurationFilename;

   /fppkghelper.pas(524,20) Error: identifier 
idents no member "ConfigurationFilename"

  {$ENDIF}
end;

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] IDE Ctrl+W key

2019-03-16 Thread AlexeyT via lazarus
I suggest to remap Ctrl+W to "close current tab". Now it is weird-- some 
completion listbox shows...


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Universal FontDialog for LCL

2019-03-08 Thread AlexeyT via lazarus

Okay, will do so. About lcl patch, we ll talk later.

On 08.03.2019 14:54, Juha Manninen via lazarus wrote:

Everybody wants to include their custom components in LCL. Why? The
Online Package Manager is designed exactly for easy access to external
components. Let's use it please!


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Universal FontDialog for LCL

2019-03-07 Thread AlexeyT via lazarus
Default must be native OS dialog. I suggest to use my dialog when 
boolean option in LCL (will be added) true. Here's my GH repo with 
dialog which almost 100% mimics GTK2 FontDialog. 
https://github.com/alexey-t/atfontdialog


It even increases preview height for big sizes >20.


On 07.03.2019 16:09, zeljko via lazarus wrote:

Not as default TFontDialog. Maybe as TLazFontDialog or similar.


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Universal FontDialog for LCL

2019-03-06 Thread AlexeyT via lazarus
I have an idea to make LCL based TFontDialog- which will be LCL form, 
which can be called by TFontDialog.Execute (if Boolean variable in LCL 
is set). Why make it?


- we can make all best features of FontDlgs from all WSes

- we can make additional events- e,g, OnSelectFont (called when used 
selects name in listbox)


- we can make it resizable (and save/load size)

- same look on all WS

If it's good- ok to merge to Laz?

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Fppkg error on IDE start with FPC 3.2 fixes

2019-02-21 Thread AlexeyT via lazarus

function TFppkgHelper.IsProperlyConfigured: Boolean;
{$IF FPC_FULLVERSION>30100}
var
  CompilerFilename: string;
{$ENDIF FPC_FULLVERSION>30100}
begin
  {$IF FPC_FULLVERSION>30100}
  if Assigned(FFPpkg) and (FIsProperlyConfigured=fpcUnknown) then
    begin
    FIsProperlyConfigured := fpcYes;

    if not HasPackage('rtl') then
  FIsProperlyConfigured := fpcNo

here I see req for package "rtl", while FPC fixes3.2 don't have "rtl" 
folder in /home/user/fpcupdeluxe/fpcsrc/packages. It has folders 
rtl-console, rtl-extra, rtl-generics, rtl-objpas, rtl-unicode.


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] How to configure Fppkg in IDE startup dialog with FPC 3.2 ?

2019-02-16 Thread AlexeyT via lazarus

-I deleted FPC 3.0.4 from Linux x64 OS path (/usr/.)

-Instead installed FPC fixes3.2 via FpcUpDeluxe into ~/fpcupdeluxe/fpc

IDE after recompiling via FPC 3.2 now asks FPPKG path!! in startup 
dialog. I cannot solve it. I tried all paths from ~/fpcupdeluxe dir and 
tried to press [Create new fppkg cfg] (sometimes this btn is enabled but 
gives no result- "fppkg config is corrupt"). Dialog asks me every time.


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] IDE Run Parameters dlg layout

2019-02-12 Thread AlexeyT via lazarus
I find it cumbersome that two buttons on top [+ -] don't have titles 
(not TButton), while "Environment" tab (same dialog) has two buttons [+ 
-] with titles.


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] IsEditableTextKey bug?

2019-02-11 Thread AlexeyT via lazarus

function IsEditableTextKey(Key: Word): Boolean;
begin
 Result := (((Key >= VK_A) and (Key <= VK_Z)) or
    ((Key >= VK_NUMPAD0) and (Key <= VK_DIVIDE)) or
    ((Key >= VK_0) and (Key <= VK_9)) or
    ((Key >= 186) and (Key <= 188)) or
    ((Key >= 190) and (Key <= 192)) or
    ((Key >= 219) and (Key <= 222)));
end;

See that 188 here, 189 missed, 190 here. 189 is VK_OEM_MINUS.

  VK_OEM_PLUS    = $BB; // For any country/region, the '+' key
  VK_OEM_COMMA   = $BC; // For any country/region, the ',' key
  VK_OEM_MINUS   = $BD; // For any country/region, the '-' key
  VK_OEM_PERIOD  = $BE; // For any country/region, the '.' key
why it's missed?

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] TIFF in LazIntfimage.pas

2019-02-08 Thread AlexeyT via lazarus
Why not split TIFF classes from %subj% into new unit? This allows to 
skip using of this unit by define DisableLCLTIFF.


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Lazarus 2 RC3 Bug or my fault?

2019-02-06 Thread AlexeyT via lazarus

May be caused by EOL at end of items. on Linux.

On 06.02.2019 23:37, Bo Berglund via lazarus wrote:

  There is space with approximately a half line hight
between them.


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] IDE fppkg error message

2019-01-24 Thread AlexeyT via lazarus

After changing FPC from 3.0.4 to 3.3.1 i see this error on IDE start.

a) ugly caption

b) how to avoid it?

--
Regards,
Alexey

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] LazProfiler package cannot install

2019-01-23 Thread AlexeyT via lazarus
From OPM. I see prompt about missing dependences, confirmed all, it 
'Cannot intall' after compiling dep's.


r60156, fpc 3.0.4, Linux x64 gtk2.

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] IDE dlg Go To don't react to Esc key

2019-01-22 Thread AlexeyT via lazarus

Ok:


You mean GotLine dialog (default shoertcut: Ctrl+G)?


yes.


If so, does it work in r60107?


I don't know, but i retested in later revision.

Alex

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] IDE dlg Go To don't react to Esc key

2019-01-21 Thread AlexeyT via lazarus
r60137. fpc 3.0.4. Ubuntu 18.04 gtk2 x64. rebuilt with clean-all. ESC 
still don't work.


(checked on 2 PCs)

On 22.01.2019 0:20, Bart via lazarus wrote:

@AlexeyT: a reaction please?


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] IDE dlg Go To don't react to Esc key

2019-01-19 Thread AlexeyT via lazarus

Dialog must cancel on Esc press, now it doesn't. Latest SVN, Linux gtk2 x64.

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] LCL patch which fixes StringGrid Copy

2018-12-31 Thread AlexeyT via lazarus

https://github.com/graemeg/lazarus/commit/961abc27b89c2f33b36d091225f0d351e3429073

  function PrepareToHTML(s: string): string;
  var
    i1: Integer;

    s1: string;

1) better i instead of i1,

2) make function param "s" - const param.

AT

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Mouse.DragThreshold dont work for my component

2018-12-26 Thread AlexeyT via lazarus
All is described here 
https://forum.lazarus.freepascal.org/index.php/topic,43664.0.html


and demo project attached. Do you consider it as LCL bug? (I need that 
Mouse.IsDragging works only after mouse moved by DragThreshold value. 
Btw, TControl.Dragging is flawed the same way.)


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] LCL comment typos

2018-12-25 Thread AlexeyT via lazarus

procedure TDragPerformer.DragStarted(APosition: TPoint);
//Imput device has moved beyond tresholt limits (or immediate docking)

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] BeginFormUpdate/EndFormUpdate should be public?

2018-12-23 Thread AlexeyT via lazarus

%subj - they are not public so I must use now dirty code:

1.
   procedure DoControlLock(Ctl: TWinControl);
2.
   begin
3.
   {$ifdef fpc}
4.
   if Application.MainForm<>nil then
5.
    TFormHack(Application.MainForm).BeginFormUpdate;
6.
   {$else}
7.
  Ctl.Perform(WM_SetRedraw, 0, 0);
8.
   {$endif}
9.
   end;

--
Regards,
Alexey

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] typo in LCL comment

2018-12-23 Thread AlexeyT via lazarus

customform.inc

{--
  procedure TCustomForm.BeginFormUpdate;

  Called after all children handles are created.
 --}
procedure TCustomForm.ChildHandlesCreated;
begin

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Wiki animated logo

2018-12-17 Thread AlexeyT via lazarus

>Why?

Several users of my program complain that its hard to read Wiki - 
running cat logo is distracting for them.


Alex

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Wiki animated logo

2018-12-17 Thread AlexeyT via lazarus
Hi. Can someone replace animated 
http://wiki.freepascal.org/skins/pic/logo.gif  - running cat - to static 
pic? It can be from http://wiki.freepascal.org/Logos_and_Banners


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Qt patch needs /const/ word

2018-12-10 Thread AlexeyT via lazarus

https://github.com/graemeg/lazarus/commit/16dea52f979acc4a2998942f07d2e17ea5233aa5

I see N functions with somename(s: string). they need word /const/ for 
parameter.


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Donate function ShortenStringEx to LCL

2018-12-06 Thread AlexeyT via lazarus


Except for more flexible positioning of the '...', this is already 
available as MinimizeName in FileCtrl
MinimizeName is different as I see. it uses ExtractFile* heavily for ex. 
And no option DotsString.


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Donate function ShortenStringEx to LCL

2018-12-06 Thread AlexeyT via lazarus



Why is there :
   S:= UTF8Decode(Text);
   ...
   Result:= UTF8Encode(S);
Seems it can be just "S:= Text", "Result:= S". but I had problems 
without UTF8Encode/decode in my apps before. On Windows. It was FPC 2.6.4.


Please also look at function ShortDisplayFilename() in unit IDEProcs.

It is more simple..

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Donate function ShortenStringEx to LCL

2018-12-06 Thread AlexeyT via lazarus
I want to donate this func. it can truncate text on canvas with 3 modes: 
dots at begin/ at middle of text/ at end of text. Tested in ATTabs demo. 
Code--


https://github.com/Alexey-T/ATTabs/blob/master/attabs/attabs.pas#L894

char $2026 is ellipsis. Can also use '...' or '..'

--
Regards,
Alexey Torgashin

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Proud to announce..

2018-12-04 Thread AlexeyT via lazarus
 I see that you converted FPC project to JS and inserted it into the 
webpage. Is it correct?


It is achievement, yes...


--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] IDE ImageList editor layout needs fix

2018-12-03 Thread AlexeyT via lazarus

Colorbox "fuchsia" on the right bottom: it's too narrow, text don't fit.

--
Regards,
Alexey

-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] With new Win32 manifest LongPathAware I cannot make long filename

2018-11-23 Thread AlexeyT via lazarus
This app cannot make 2nd folder (it can make 1st) and make file. Error 
on file saving. why? new manifest option is used. Win10.


{ TForm1 }

const
s1='w123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012';
  base='c:\work\';

procedure TForm1.Button1Click(Sender: TObject);
var f: TStringList;
begin
  ForceDirectories(base+s1+'\'+s1);
  f:= tstringlist.create;
  f.add('zzz');
  f.SaveToFile(base+s1+'\'+s1+'\test.txt');
  f.free;
end;

--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] IDE Project Options - icon needed

2018-11-19 Thread AlexeyT via lazarus
Button "Load default" in Icon group - needs new icon, which is used for 
"set default" buttons in IDE. it is brown curved arrow.


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Long paths manifest

2018-11-19 Thread AlexeyT via lazarus

On 20.11.2018 1:17, Denis Kozlov via lazarus wrote:

Any thoughts on integrating


I'm making the patch. I dont know on which XML level to insert new XML 
part - inside  or out of it in the root?



    xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings;>

true
    


--
Regards,
Alexey

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Long paths manifest

2018-11-13 Thread AlexeyT via lazarus
--File I/O functions in the Windows API convert "/" to "\" as part of 
converting the name to an NT-style name, except when using the "\\?\" 
prefix as detailed in the following sections.


So apps may have new bugs from this prefix. when app uses / shashes (fn 
:= dir + '/' + name) by mistake.


Alex

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] IDE About: layout fix

2018-11-03 Thread AlexeyT via Lazarus

patch adds BorderSpacing.Around=6 for Memo of IDE About dialog.

--
Regards,
Alexey

Index: ide/aboutfrm.lfm
===
--- ide/aboutfrm.lfm	(revision 59418)
+++ ide/aboutfrm.lfm	(working copy)
@@ -191,6 +191,7 @@
 AnchorSideRight.Control = AboutPage
 AnchorSideRight.Side = asrBottom
 AnchorSideBottom.Control = OfficialLabel
+BorderSpacing.Around = 6
 Left = 0
 Height = 253
 Top = 0
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] App UI scaling idea

2018-11-01 Thread AlexeyT via Lazarus

I saw in some apps an option: scale UI - 100%..300%. Eg in Telegram.

Can it be idea for LCL? Can u add global variable, 
GlobalScalingPercents, which is affected by OS PixelPerInch, but also 
can be affected by app? App can give option like in Telegram.


--
Regards,
Alexey

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] More inline's for LazUtils

2018-10-27 Thread AlexeyT via Lazarus

patch adds inline to NN tiny functions.

--
Regards,
Alexey

Index: components/lazutils/lazutf8.pas
===
--- components/lazutils/lazutf8.pas	(revision 59373)
+++ components/lazutils/lazutf8.pas	(working copy)
@@ -67,10 +67,10 @@
 procedure GetLocaleFormatSettingsUTF8(LCID: Integer; var aFormatSettings: TFormatSettings);
 {$endif}
 
-Function GetEnvironmentVariableCountUTF8: Integer;
-function GetEnvironmentStringUTF8(Index: Integer): string;
-function GetEnvironmentVariableUTF8(const EnvVar: string): String;
-function SysErrorMessageUTF8(ErrorCode: Integer): String;
+Function GetEnvironmentVariableCountUTF8: Integer; inline;
+function GetEnvironmentStringUTF8(Index: Integer): string; inline;
+function GetEnvironmentVariableUTF8(const EnvVar: string): String; inline;
+function SysErrorMessageUTF8(ErrorCode: Integer): String; inline;
 
 // Returns the size of one codepoint in bytes.
 function UTF8CodepointSize(p: PChar): integer; inline;
@@ -86,10 +86,10 @@
 
 // Functions dealing with unicode number U+xxx.
 function UTF8CodepointToUnicode(p: PChar; out CodepointLen: integer): Cardinal;
-function UTF8CharacterToUnicode(p: PChar; out CharLen: integer): Cardinal; deprecated 'Use UTF8CodepointToUnicode instead.';
+function UTF8CharacterToUnicode(p: PChar; out CharLen: integer): Cardinal; inline; deprecated 'Use UTF8CodepointToUnicode instead.';
 function UnicodeToUTF8(CodePoint: cardinal): string; // UTF32 to UTF8
 function UnicodeToUTF8(CodePoint: cardinal; Buf: PChar): integer; // UTF32 to UTF8
-function UnicodeToUTF8SkipErrors(CodePoint: cardinal; Buf: PChar): integer; // UTF32 to UTF8
+function UnicodeToUTF8SkipErrors(CodePoint: cardinal; Buf: PChar): integer; inline; // UTF32 to UTF8
 function UnicodeToUTF8Inline(CodePoint: cardinal; Buf: PChar): integer; inline; // UTF32 to UTF8
 function UTF8ToDoubleByteString(const s: string): string;
 function UTF8ToDoubleByte(UTF8Str: PChar; Len: PtrInt; DBStr: PByte): PtrInt;
@@ -99,14 +99,14 @@
 function Utf8TryFindCodepointStart(const AString: String; var Index: Integer; out CharLen: Integer): Boolean;
 // find the n-th UTF8 codepoint, ignoring BIDI
 function UTF8CodepointStart(UTF8Str: PChar; Len, CodepointIndex: PtrInt): PChar;
-function UTF8CharStart(UTF8Str: PChar; Len, CharIndex: PtrInt): PChar; deprecated 'Use UTF8CodepointStart instead.';
+function UTF8CharStart(UTF8Str: PChar; Len, CharIndex: PtrInt): PChar; inline; deprecated 'Use UTF8CodepointStart instead.';
 // find the byte index of the n-th UTF8 codepoint, ignoring BIDI (byte len of substr)
-function UTF8CodepointToByteIndex(UTF8Str: PChar; Len, CodepointIndex: PtrInt): PtrInt;
-function UTF8CharToByteIndex(UTF8Str: PChar; Len, CharIndex: PtrInt): PtrInt; deprecated 'Use UTF8CodepointToByteIndex instead.';
+function UTF8CodepointToByteIndex(UTF8Str: PChar; Len, CodepointIndex: PtrInt): PtrInt; inline;
+function UTF8CharToByteIndex(UTF8Str: PChar; Len, CharIndex: PtrInt): PtrInt; inline; deprecated 'Use UTF8CodepointToByteIndex instead.';
 procedure UTF8FixBroken(P: PChar); overload;
 procedure UTF8FixBroken(var S: string); overload;
 function UTF8CodepointStrictSize(P: PChar): integer;
-function UTF8CharacterStrictLength(P: PChar): integer; deprecated 'Use UTF8CodepointStrictSize instead.';
+function UTF8CharacterStrictLength(P: PChar): integer; inline; deprecated 'Use UTF8CodepointStrictSize instead.';
 function UTF8CStringToUTF8String(SourceStart: PChar; SourceLen: PtrInt) : string;
 
 function UTF8Pos(const SearchForText, SearchInText: string; StartPos: SizeInt = 1): PtrInt;
@@ -125,21 +125,21 @@
   Flags: TReplaceFlags; ALanguage: string=''): String;
 
 function UTF8LowerCase(const AInStr: string; ALanguage: string=''): string;
-function UTF8LowerString(const s: string): string;
+function UTF8LowerString(const s: string): string; inline;
 function UTF8UpperCase(const AInStr: string; ALanguage: string=''): string;
-function UTF8UpperString(const s: string): string;
+function UTF8UpperString(const s: string): string; inline;
 function UTF8SwapCase(const AInStr: string; ALanguage: string=''): string;
 // Capitalize the first letters of every word
 function UTF8ProperCase(const AInStr: string; const WordDelims: TSysCharSet): string;
 function FindInvalidUTF8Codepoint(p: PChar; Count: PtrInt; StopOnNonUTF8: Boolean = true): PtrInt;
-function FindInvalidUTF8Character(p: PChar; Count: PtrInt; StopOnNonUTF8: Boolean = true): PtrInt; deprecated 'Use FindInvalidUTF8Codepoint instead.';
+function FindInvalidUTF8Character(p: PChar; Count: PtrInt; StopOnNonUTF8: Boolean = true): PtrInt; inline; deprecated 'Use FindInvalidUTF8Codepoint instead.';
 function UTF8StringOfChar(AUtf8Char: String; N: Integer): String;
 function UTF8AddChar(AUtf8Char: String; const S: String; N: Integer): String;
 function UTF8AddCharR(AUtf8Char: String; const S: String; N: Integer): String;
-function UTF8PadLeft(const S: String; const N: Integer; const AUtf8Char: String 

[Lazarus] Patch for MK_ALT

2018-10-26 Thread AlexeyT via Lazarus

revised patch (ignore prev message about "Forms.pp function error").

Needs some testing on Carbon/Cocoa, because MK_ALT const is defined in 
Mac WS'es.


--
Regards,
Alexey

Index: lcl/interfaces/carbon/carbonproc.pp
===
--- lcl/interfaces/carbon/carbonproc.pp	(revision 59355)
+++ lcl/interfaces/carbon/carbonproc.pp	(working copy)
@@ -329,7 +329,7 @@
   VK_SCROLL: Result := MK_SCRLOCK;
   VK_SHIFT : Result := MK_SHIFTKEY;
   VK_CONTROL   : Result := MK_COMMAND;
-  VK_MENU  : Result := MK_ALT;
+  VK_MENU  : Result := CarbonProc.MK_ALT; // see LCLType.MK_ALT
   VK_OEM_3 : Result := MK_TILDE;
 //VK_OEM_MINUS : Result := MK_MINUS;
   VK_OEM_PLUS  : Result := MK_EQUAL;
@@ -482,7 +482,7 @@
   if (ButtonState and 4) > 0 then Inc(Result, MK_MButton);
   if (shiftKeyand Modifiers) > 0 then Inc(Result, MK_Shift);
   if (controlKey  and Modifiers) > 0 then Inc(Result, MK_Control);
-  if (optionKey   and Modifiers) > 0 then Inc(Result, $2000);
+  if (optionKey   and Modifiers) > 0 then Inc(Result, LCLType.MK_ALT); // see CarbonProc.MK_ALT
 
   //DebugLn('GetCarbonMsgKeyState Result=',dbgs(KeysToShiftState(Result)),' Modifiers=',hexstr(Modifiers,8),' ButtonState=',hexstr(ButtonState,8));
 end;
Index: lcl/interfaces/cocoa/cocoautils.pas
===
--- lcl/interfaces/cocoa/cocoautils.pas	(revision 59355)
+++ lcl/interfaces/cocoa/cocoautils.pas	(working copy)
@@ -815,7 +815,7 @@
   VK_SCROLL: Result := MK_SCRLOCK;
   VK_SHIFT : Result := MK_SHIFTKEY;
   VK_CONTROL   : Result := MK_COMMAND;
-  VK_MENU  : Result := MK_ALT;
+  VK_MENU  : Result := CocoaUtils.MK_ALT; // LCLType.MK_ALT exists
   VK_OEM_3 : Result := MK_TILDE;
   VK_OEM_MINUS : Result := MK_MINUS;
   VK_OEM_PLUS  : Result := MK_EQUAL;
Index: lcl/interfaces/cocoa/cocoawscommon.pas
===
--- lcl/interfaces/cocoa/cocoawscommon.pas	(revision 59355)
+++ lcl/interfaces/cocoa/cocoawscommon.pas	(working copy)
@@ -253,7 +253,7 @@
   if AModifiers and NSControlKeyMask <> 0 then
 Result := Result or MK_CONTROL;
   if AModifiers and NSAlternateKeyMask <> 0 then
-Result := Result or $2000;
+Result := Result or LCLType.MK_ALT; // see CocoaUtils.MK_ALT
 end;
 
 class function TLCLCommonCallback.CocoaPressedMouseButtonsToKeyState(AMouseButtons: NSUInteger): PtrInt;
@@ -474,7 +474,8 @@
 IsSysKey := (Event.modifierFlags and NSCommandKeyMask) <> 0;
 KeyData := (Ord(Event.isARepeat) + 1) or Event.keyCode shl 16;
 if (Event.modifierFlags and NSAlternateKeyMask) <> 0 then
-  KeyData := KeyData or $2000;   // So that MsgKeyDataToShiftState recognizes Alt key, see bug 30129
+  KeyData := KeyData or LCLType.MK_ALT;   // So that MsgKeyDataToShiftState recognizes Alt key, see bug 30129
+  // see CocoaUtils.MK_ALT
 KeyCode := Event.keyCode;
 
 //non-printable keys (see mackeycodes.inc)
@@ -844,7 +845,8 @@
   IsSysKey := (Event.modifierFlags and NSCommandKeyMask) <> 0;
   KeyData := (Ord(Event.isARepeat) + 1) or Event.keyCode shl 16;
   if (Event.modifierFlags and NSAlternateKeyMask) <> 0 then
-KeyData := KeyData or $2000;   // So that MsgKeyDataToShiftState recognizes Alt key, see bug 30129
+KeyData := KeyData or LCLType.MK_ALT;   // So that MsgKeyDataToShiftState recognizes Alt key, see bug 30129
+// see CocoaUtils.MK_ALT
   KeyCode := Event.keyCode;
 
   VKKeyCode := MacCodeToVK(KeyCode);
Index: lcl/interfaces/gtk3/gtk3widgets.pas
===
--- lcl/interfaces/gtk3/gtk3widgets.pas	(revision 59355)
+++ lcl/interfaces/gtk3/gtk3widgets.pas	(working copy)
@@ -1494,7 +1494,7 @@
 if AIsKeyEvent then
   Result := Result or KF_ALTDOWN
 else
-  Result := Result or $2000;
+  Result := Result or MK_ALT;
   end;
 end;
 
@@ -1581,7 +1581,7 @@
 ShiftState := ShiftState + [ssShift];
   if AState and MK_CONTROL <> 0 then
 ShiftState := ShiftState + [ssCtrl];
-  if AState and $2000 <> 0 then
+  if AState and MK_ALT <> 0 then
 ShiftState := ShiftState + [ssAlt];
   // MappedXY := TranslateGdkPointToClientArea(AEvent^.scroll.window, EventXY,
   //{%H-}TGtk3Widget(AWinControl.Handle).GetContainerWidget);
Index: lcl/interfaces/mui/muibaseunit.pas
===
--- lcl/interfaces/mui/muibaseunit.pas	(revision 59355)
+++ lcl/interfaces/mui/muibaseunit.pas	(working copy)
@@ -1574,9 +1574,9 @@
 begin
   Result := 0;
   if State and IEQUALIFIER_LALT <> 0 then
-Result := Result or $2000;
+Result := Result or MK_ALT;
   //if State and IEQUALIFIER_RALT <> 0 then
-  //  Result := Result or $2000;
+  //  Result := Result or MK_ALT;

[Lazarus] Forms.pp function error?

2018-10-26 Thread AlexeyT via Lazarus
As pointed by Dmitry B, and checked by myself in LCL, MK_ALT must be 
defined in LCLType.pp as $2000. For ex, this is sample from 
qtwidgets.pas:


  if (ModifierState and MK_SHIFT) <> 0 then
    Msg.State := [ssShift];
  if (ModifierState and MK_CONTROL) <> 0 then
    Msg.State := [ssCtrl] + Msg.State;
  if (ModifierState and $2000) <> 0 then
    Msg.State := [ssAlt] + Msg.State;

patch added.

--
Regards,
Alexey

Index: lcl/lcltype.pp
===
--- lcl/lcltype.pp	(revision 59355)
+++ lcl/lcltype.pp	(working copy)
@@ -2836,6 +2836,7 @@
   MK_DOUBLECLICK = $80;
   MK_TRIPLECLICK = $100;
   MK_QUADCLICK = $200;
+  MK_ALT = $2000; // used (as number) by several widgetsets
 
 //==
 // Constants from commctrl
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Micro optimization for LazUtils

2018-10-26 Thread AlexeyT via Lazarus

added 2 inline's  + fixed for loop.

--
Regards,
Alexey

Index: components/lazutils/fpcadds.pas
===
--- components/lazutils/fpcadds.pas	(revision 59355)
+++ components/lazutils/fpcadds.pas	(working copy)
@@ -25,24 +25,21 @@
 
 function StrToWord(const s: string): word;
 
-function AlignToPtr(const p: Pointer): Pointer;
-function AlignToInt(const p: Pointer): Pointer;
+function AlignToPtr(const p: Pointer): Pointer; inline;
+function AlignToInt(const p: Pointer): Pointer; inline;
 
 implementation
 
 function StrToWord(const s: string): word;
 var
-  p: Integer;
+  i: Integer;
 begin
   Result:=0;
-  p:=1;
-  while (p<=length(s)) do begin
-Result:=Result*10+ord(s[p])-ord('0');
-inc(p);
-  end;
+  for i:=1 to Length(s) do
+Result:=Result*10+ord(s[i])-ord('0');
 end;
 
-function AlignToPtr(const p: Pointer): Pointer;
+function AlignToPtr(const p: Pointer): Pointer; inline;
 begin
 {$IFDEF FPC_REQUIRES_PROPER_ALIGNMENT}
   Result := Align(p, SizeOf(Pointer));
@@ -51,7 +48,7 @@
 {$ENDIF}
 end;
 
-function AlignToInt(const p: Pointer): Pointer;
+function AlignToInt(const p: Pointer): Pointer; inline;
 begin
 {$IFDEF FPC_REQUIRES_PROPER_ALIGNMENT}
   Result := Align(p, SizeOf(integer));
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] IDE Restriction Browser layout patch

2018-10-18 Thread AlexeyT via Lazarus

Patch adds BorderSpacing (6) for 3 main controls on the form.

--
Regards,
Alexey

Index: ide/restrictionbrowser.lfm
===
--- ide/restrictionbrowser.lfm	(revision 59319)
+++ ide/restrictionbrowser.lfm	(working copy)
@@ -7,25 +7,29 @@
   ClientHeight = 405
   ClientWidth = 674
   OnCreate = FormCreate
-  LCLVersion = '1.5'
+  LCLVersion = '2.1.0.0'
   object IssueMemo: TMemo
-Left = 311
-Height = 405
-Top = 0
-Width = 363
+Left = 323
+Height = 393
+Top = 6
+Width = 345
 Align = alClient
+BorderSpacing.Top = 6
+BorderSpacing.Right = 6
+BorderSpacing.Bottom = 6
 ReadOnly = True
 ScrollBars = ssAutoVertical
 TabOrder = 2
   end
   object Panel1: TPanel
-Left = 0
-Height = 405
-Top = 0
+Left = 6
+Height = 393
+Top = 6
 Width = 306
 Align = alLeft
+BorderSpacing.Around = 6
 BevelOuter = bvNone
-ClientHeight = 405
+ClientHeight = 393
 ClientWidth = 306
 TabOrder = 0
 object IssueFilterGroupBox: TGroupBox
@@ -34,15 +38,16 @@
   Top = 0
   Width = 306
   Align = alTop
+  BorderSpacing.Bottom = 6
   Caption = 'IssueFilterGroupBox'
-  ClientHeight = 76
+  ClientHeight = 77
   ClientWidth = 302
   TabOrder = 0
   object NameLabel: TLabel
 Left = 10
-Height = 15
+Height = 17
 Top = 44
-Width = 60
+Width = 77
 Caption = 'NameLabel'
 ParentColor = False
   end
@@ -49,14 +54,13 @@
   object FilterEdit: TTreeFilterEdit
 AnchorSideLeft.Control = NameLabel
 AnchorSideLeft.Side = asrBottom
-Left = 76
-Height = 23
+Left = 93
+Height = 27
 Top = 41
 Width = 156
-UseFormActivate = True
 ButtonWidth = 23
+BorderSpacing.Left = 6
 NumGlyphs = 1
-BorderSpacing.Left = 6
 MaxLength = 0
 TabOrder = 0
 FilteredTreeview = IssueTreeView
@@ -64,12 +68,11 @@
 end
 object IssueTreeView: TTreeView
   Left = 0
-  Height = 309
-  Top = 96
+  Height = 291
+  Top = 102
   Width = 306
   Align = alClient
   Anchors = [akTop, akLeft, akBottom]
-  DefaultItemHeight = 18
   HideSelection = False
   Indent = 2
   ReadOnly = True
@@ -84,7 +87,7 @@
 end
   end
   object Splitter1: TSplitter
-Left = 306
+Left = 318
 Height = 405
 Top = 0
 Width = 5
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Forms.pp function error?

2018-10-16 Thread AlexeyT via Lazarus

Value $400 makes sense.
And also this must be changed then:
function KeysToShiftState(Keys: PtrUInt): TShiftState;
it uses same constants.

Alex
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Forms.pp function error?

2018-10-16 Thread AlexeyT via Lazarus


On 16.10.2018 09:56, Michael Van Canneyt via Lazarus wrote:

There does not need to be if there is no corresponding MK_nnn value ?
What would be the MK_nnn value for ssAlt ? 


We can  add in, LCLType.pp:

const
  // Mouse message key states
  MK_LBUTTON  = 1;
  MK_RBUTTON = 2;
  MK_SHIFT = 4;
  MK_CONTROL = 8;
  MK_MBUTTON = $10;
  MK_XBUTTON1 = $20;
  MK_XBUTTON2 = $40;
  // following are "virtual" key states
  MK_DOUBLECLICK = $80;
  MK_TRIPLECLICK = $100;
  MK_QUADCLICK = $200;

--

Regards,
Alexey

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Forms.pp function error?

2018-10-16 Thread AlexeyT via Lazarus

function ShiftStateToKeys(ShiftState: TShiftState): PtrUInt;
begin
  Result := 0;
  if ssShift  in ShiftState then Result := Result or MK_SHIFT;
  if ssCtrl   in ShiftState then Result := Result or MK_CONTROL;
  if ssLeft   in ShiftState then Result := Result or MK_LBUTTON;
  if ssRight  in ShiftState then Result := Result or MK_RBUTTON;
  if ssMiddle in ShiftState then Result := Result or MK_MBUTTON;
  if ssExtra1 in ShiftState then Result := Result or MK_XBUTTON1;
  if ssExtra2 in ShiftState then Result := Result or MK_XBUTTON2;
  if ssDouble in ShiftState then Result := Result or MK_DOUBLECLICK;
  if ssTriple in ShiftState then Result := Result or MK_TRIPLECLICK;
  if ssQuad   in ShiftState then Result := Result or MK_QUADCLICK;
end;

I don't see here "if ssAlt in " line

--
Regards,
Alexey

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] IDE Scout issue

2018-10-14 Thread AlexeyT via Lazarus

https://bugs.freepascal.org/view.php?id=34383

just a reminder.

--
Regards,
Alexey

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Package IDE Spotter renamed to IDE Scout

2018-10-07 Thread AlexeyT via Lazarus

I see truncated label "Default width" in Scout opts: screenshot.
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] IDE packages dialog: captions

2018-10-07 Thread AlexeyT via Lazarus
2 titles of groupboxes: Install  / Avail for installation. they mean 
almost the same thing. So: rename 1st title to "Installed".


--
Regards,
Alexey

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Bugtracker IDE version list

2018-10-04 Thread AlexeyT via Lazarus
a) Pls, delete outdated beta versions from list: 1.8 RCx, 1.6 RCx, 1.4 
RCx, 1.2 RCx


b) Pls add 2.1 (trunk)

--
Regards,
Alexey

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] LConvEncoding patch to raise exception

2018-09-25 Thread AlexeyT via Lazarus
This tiny patch adds global var (option) which allows to raise exeption, 
when utf8 cannot convert to single byte page. needed for CudaText to 
detect that user text cannot convert to current codepage. its default is 
off (don't use exception).


--
Regards,
Alexey

Index: components/lazutils/lconvencoding.pas
===
--- components/lazutils/lconvencoding.pas	(revision 59166)
+++ components/lazutils/lconvencoding.pas	(working copy)
@@ -31,6 +31,9 @@
   SysUtils, Classes, dos, LazUTF8
   {$IFDEF EnableIconvEnc},iconvenc{$ENDIF};
 
+var
+  ConvertEncodingFromUtf8RaisesException: boolean = False;
+
 //encoding names
 const
   EncodingUTF8 = 'utf8';
@@ -7033,7 +7036,10 @@
   if i>=0 then begin
 Dest^:=chr(i);
 inc(Dest);
-  end;
+  end
+  else
+  if ConvertEncodingFromUtf8RaisesException then
+raise EConvertError.Create('Cannot convert UTF8 to single byte');
 end;
   end;
   SetLength(Result,Dest-PChar(Result));
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] IDE Spotter- issues

2018-09-24 Thread AlexeyT via Lazarus

3- better add inner (inside listbox) left indent of text: 3-4pix.

4- right indent is too big (15-20pix even with scrollbar), use same 
3-4pix as left (considering scrollbar)


--
Regards,
Alexey

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


  1   2   >