Re: [Lazarus] 1.6.0-fpc-3.0.0-win64.exe

2016-05-26 Thread Denis Kozlov

On 25/05/2016 18:47, Larry Dalton wrote:

I have been using 1.2.4 win32 because of a printer issue when trying to use the 
 64 bit compiler. Are there any printer issues with the new version?


FYI, you can install 1.6.0 as a secondary instance (using the option 
provided during the installation) and check if your issue is still present.


If there is an issue, you should check if it was already reported, 
otherwise report it:

http://bugs.freepascal.org/

Denis

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Write to UNC or mapped drive

2016-05-25 Thread Denis Kozlov
On 24 May 2016 at 20:46, Leonardo M. Ramé  wrote:

> Hi, My app is a CGI running on Windows2012 (IIS 7.0), it needs to save a
> file to a remote UNC or Mapped drive, but when I check using
> DirectoryExists in both cases I get False, but of course the UNC and mapped
> drive exists.
>

Does it fail only for the root UNC path but works for a path that contains
a folder component?

DirectoryExists internally uses GetFileAttributes WinAPI, which states:

> If you call GetFileAttributes for a network share, the function fails, and
> GetLastError returns ERROR_BAD_NETPATH. You must specify a path to a
> subfolder on that share.

https://msdn.microsoft.com/en-us/library/windows/desktop/aa364944%28v=vs.85%29.aspx

Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Example of TObjectList sorting

2016-05-22 Thread Denis Kozlov
On 21 May 2016 at 13:49, Richard Mace  wrote:

> ​Would I call the List.sort externally, or would the List call sort when
> an Add has happened, as I don't seem to have a ".sort" method on my
> TObjectList?
>

You need to call List.Sort yourself, it is not sorted automatically when
you add more elements.

TObjectList does have a Sort method, since it descends from TList class.

Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] components\aggpas\gpc - non-commercial use only

2016-05-20 Thread Denis Kozlov
On 18 May 2016 at 01:13, Mattias Gaertner  wrote:

> > 1) Document licensing terms in *.lpk files of each package (making it
> > mandatory for all future packages).
>
> It always was. If a lpk is missing its license, please report the bug.
>

A quick search revealed that 73 out of 106 lpk files have a  tag,
as of r52328.


> > 2) Use 2 licensing attributes/nodes in *.lpk files:
> > A) License Title (e.g. "GPL", "LGPL", "MPL", "MIT", "BSD" ...
> "Custom"
> > - so that it can be easily enumerated and summarized);
>
> What about double licensing (e.g. "GPL2 or higher", "MPL or LGPL2 with
> liking exception") or part (e.g. "LGPL-2, except gpc.pas which has
> custom license")?
>

I plan to write a tool to automatically extract licensing information from
all packages. Then, stick this information into a sheet for analysis, maybe
even put it on the Wiki for the reference.

The sheet will highlight packages which do not contain licensing terms and
allow to pick out the list of commonly used licensing abbreviations
(titles). This is were it should become clearer how many variations there
actually are ("GPL2 or higher", "MPL or LGPL2 with liking exception",
"LGPL-2, except gpc.pas which has custom license", etc).

For example, if there are 10 variations of licensing terms, a summarized
list of packages per licensing variation should be a good licensing
overview and significantly simplify slicing based on the licensing terms.

> B) License Description (i.e. this can be the full license text, in
> case
> > of "Custom" licensing terms)
> > 3) Create IDE tools to summarize licensing terms of:
> >A) Currently installed packages,
> >B) All available packages,
>
> This info can be shown in "Package Graph" and "Install Packages" in the
> memo. Read this: you don't need a new dialog for this.
>
> >C) Packages used in the current project (if possible)
>
> This info can be shown in the Project Inspector. Read this: you don't
> need a new dialog for this.
>

I agree, these are good places for displaying licensing information.

P.S. I don't plan to reinvent wheels or add dialogs unnecessarily.

Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] components\aggpas\gpc - non-commercial use only

2016-05-17 Thread Denis Kozlov
On 17 May 2016 at 16:34, Mattias Gaertner  wrote:

>
> For Debian maintainers and other third party bundles we should gather
> the abbreviated license information in the components/readme.txt, so
> they can easier pick the cherries.
>

It's not a bad idea.

Maybe we can go even a step further, to avoid duplication and introduce
some consistency:

1) Document licensing terms in *.lpk files of each package (making it
mandatory for all future packages).
2) Use 2 licensing attributes/nodes in *.lpk files:
A) License Title (e.g. "GPL", "LGPL", "MPL", "MIT", "BSD" ... "Custom"
- so that it can be easily enumerated and summarized);
B) License Description (i.e. this can be the full license text, in case
of "Custom" licensing terms)
3) Create IDE tools to summarize licensing terms of:
   A) Currently installed packages,
   B) All available packages,
   C) Packages used in the current project (if possible)

If this is suitable, I volunteer to analyze licensing terms of existing
packages and implement the work above.

Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] components\aggpas\gpc - non-commercial use only

2016-05-17 Thread Denis Kozlov
On 17 May 2016 at 13:24, Graeme Geldenhuys 
wrote:

> Mattias already answered the question. “Free” is a relative term in the
> open source world. Why must some code be excluded from Lazarus, even
> though it is still open source - albeit with a different license.
>

One can also call a piece of code "free" which allows distribution of
source but forbids distribution in compiled form, but then that would
render it "free" but useless. I regret referring to the term "free",
because everybody has their own understanding of what it means.

If a developer uses every willy nilly component out there, and never
> checks any license details of those components, they are looking for
> trouble. As a developer, part of your job is to ensure whatever 3rd
> party components you use fits in with your project goals.
>

Again, this is an extreme, let's narrow it down. I am talking about
official bundled components.

Of course, when a developer decides to use a 3rd party component it is
natural to check the licensing terms of that component. However, when a
developer uses an official distribution of IDE, whether it is Lazarus or
Delphi or other, it is not natural to require developer to check *every
component or part* for licensing terms, which can be hundreds or even
thousands of individual parts.

That is why I thought it could be clearer if most of Lazarus/FPC code base
is under the same licensing schema, while everything that falls outside of
it could be easily discovered (this is where an idea of placing such code
into a dedicated folder came about). This kind of approach would
drastically simply code base slicing based on licensing terms, that is what
Debian packagers have to do with Lazarus and many other packages.

Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] components\aggpas\gpc - non-commercial use only

2016-05-17 Thread Denis Kozlov
On 17 May 2016 at 11:41, Graeme Geldenhuys 
wrote:

> I just had a similar thread in the FPC mailing list. The “Simplified
> BSD” (2-clause) license is as “free” as you can get, but apparently it
> doesn’t fit in with the goals of Free Pascal’s FCL, so no BSD licensed
> components will be accepted in the FCL. I believe that is very
> unfortunate, but I respect there wishes.
>

That is the precisely the disconnect that I am worried about. It may seem,
especially for new comers, that all FPC/Lazarus sources are GPL/LGPL
licensed, and short of checking every source file/folder it is impossible
to tell otherwise.

Q1: Should all bundled code, whether it is FCL or LCL or otherwise, follow
the standard FPC/Lazarus licensing schema? So far it feels to be on a
case-by-case basis.

Q2: Maybe libraries and components which do not fall under the same
licensing terms should be moved to a separate folder, to help developers
identify portions of code which require an inspection of the licensing
terms before their use?

Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] components\aggpas\gpc - non-commercial use only

2016-05-17 Thread Denis Kozlov
On 17 May 2016 at 11:10, Ondrej Pokorny  wrote:

> How do you define "free"? Is GPL free?
>
I meant it in the simplest term, that developers can freely distribute or
sell built applications.

You are mixing up 2 different things. See
> http://wiki.freepascal.org/Lazarus_Faq#Licensing
>
Licensing terms is an intricate subject, I was over-generalizing it.

Neither GPL/LGPL/modifed.LGPL explicitly prohibit building commercial
applications. Licensing terms of GPC are more restrictive, they explicitly
forbid use for commercial purposes.

Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] components\aggpas\gpc - non-commercial use only

2016-05-17 Thread Denis Kozlov
On 17 May 2016 at 10:15, Graeme Geldenhuys 
wrote:

> This was discussed before and the licensing information (readme) was
> updated. The GPC code is totally optional and NOT used by default in
> AggPas at all. So yes it is fine being there.
>

Does it make sense to include NON-free components in Lazarus distribution?

Similarly, many icons were recently removed from Lazarus because they were
NON-free, even though optional to use.

This breaks the paradigm and consistency that FPC, Lazarus and LCL are
licensed under modified LGPL .
It puts developer into a tricky situation - does one needs to check every
source code file to ensure it can be included in their code base?

Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] components\aggpas\gpc - non-commercial use only

2016-05-16 Thread Denis Kozlov
Hi,

Licensing terms of "components\aggpas\gpc" state that it is free for
non-commercial use only. Should it even be allowed to be part of Lazarus
components?

For this reason it was excluded from Debian packaged Lazarus, as discussed
here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=708695

We could try getting an exception for Lazarus from the author:
http://www.cs.man.ac.uk/~toby/alan/software/#Licensing

In the meantime, aggpas could be moved to CCR, to keep Lazarus clean and
free.

Regards,
Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Example of TObjectList sorting

2016-05-09 Thread Denis Kozlov
On 9 May 2016 at 13:44, Graeme Geldenhuys <mailingli...@geldenhuys.co.uk>
wrote:

> On 2016-05-09 13:24, Denis Kozlov wrote:
> > This kind of question is better suited on the forum I think
>
> Why? This mailing list is just as much a support area as the web forum.
> Not everybody likes web based forums (I don't).
>

Forum is especially good for tutorials, generic and commonly asked
questions - like a repository of knowledge, Also, forums are more easily
searched, indexed by search engines and easier to view for novice users.
Hence, I think this question/answer would reach more end users while being
on the forum, instead of on a mailing list.

Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Missing components in Lazarus 1.6 DEB

2016-05-09 Thread Denis Kozlov
Package "lazarus-1.6" and its sub-packages are missing many of Lazarus 1.6
source files.

Reported to Debian:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=823706

Beware when installing from Debian packaged repositories.

Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Example of TObjectList sorting

2016-05-09 Thread Denis Kozlov
On 9 May 2016 at 12:48, Richard Mace  wrote:

> I have a TObjectList that contains many objects that have a property
> called "Position" which is an integer.
>
> Could somebody show me an example of the code that I will need to create
> that will sort all of my Objects within the TObjectList so that they are in
> position order e.g. 1,2,3,4,5 and so on?
>

Call TList.Sort method and supply a comparison function.


For example:

List.Sort(@CompareByPositionPtr);

function CompareByPosition(A, B: TMyObject): Integer; inline;
begin
  if A.Position < B.Position then
Result := -1
  else if A.Position > B.Position then
Result := 1
  else
Result := 0;
end;

function CompareByPositionPtr(A, B: Pointer): Integer;
begin
  Result := CompareByPosition(TMyObject(A), TMyObject(B));
end;


This kind of question is better suited on the forum I think

Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Missing components in Lazarus 1.6 DEB

2016-04-29 Thread Denis Kozlov
Nobody else noticed randomly missing files from Lazarus 1.6 distribution
for Linux?


On 25 April 2016 at 12:43, Denis Kozlov <dez...@gmail.com> wrote:

> Why many components have missing *.lpk files in Lazarus 1.6 DEB installer?
> Is this deliberate or a packaging problem?
>
> Tried installing using `lazarus_1.6-0_amd64.deb` and via `apt install
> lazarus` on Ubuntu 16. Tree structure of components in DEB is quite
> different to Windows or SVN structure.
>
> For example, it is missing:
> \components\anchordocking\anchordocking.lpk
> \components\anchordocking\design\anchordockingdsgn.lpk
> \components\customdrawn\customdrawn.lpk
> \components\education\educationlaz.lpk
> (and hundreds other files)
>
> Denis
>
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Missing components in Lazarus 1.6 DEB

2016-04-25 Thread Denis Kozlov
Why many components have missing *.lpk files in Lazarus 1.6 DEB installer?
Is this deliberate or a packaging problem?

Tried installing using `lazarus_1.6-0_amd64.deb` and via `apt install
lazarus` on Ubuntu 16. Tree structure of components in DEB is quite
different to Windows or SVN structure.

For example, it is missing:
\components\anchordocking\anchordocking.lpk
\components\anchordocking\design\anchordockingdsgn.lpk
\components\customdrawn\customdrawn.lpk
\components\education\educationlaz.lpk
(and hundreds other files)

Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Adding TListView.GetHeaderHeight

2016-04-12 Thread Denis Kozlov
On 12 April 2016 at 12:04, Zeljko  wrote:
>
> I'll implement it, doesn't look like a big problem, but still wondering
> why is this good for (getHeaderHeight) ?
>

I responded in the bug tracker:
http://bugs.freepascal.org/view.php?id=29997

Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Adding TListView.GetHeaderHeight

2016-04-12 Thread Denis Kozlov
On 12 April 2016 at 08:29, Zeljko <zel...@holobit.net> wrote:

>
> On 04/11/2016 05:29 PM, Denis Kozlov wrote:
>
>> Is it possible to add a TListView.GetHeaderHeight method?
>>
>> My implementation for Windows as a standalone function is attached.
>>
>> Can this can be done on other platforms? I don't have the expertise in
>> other widgets.
>>
>
> AFAIK yes.
>

I have submitted a patch which implements it for Win32 and WinCE widgetsets:
http://bugs.freepascal.org/view.php?id=29997

Is anybody interested in implementing it for other platforms?

Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Adding TListView.GetHeaderHeight

2016-04-11 Thread Denis Kozlov
Hi,

Is it possible to add a TListView.GetHeaderHeight method?

My implementation for Windows as a standalone function is attached.

Can this can be done on other platforms? I don't have the expertise in
other widgets.

Regards,
Denis


uListViewHeader.pas
Description: Binary data
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] GetAppConfigDir on Windows XP (PT-BR): Configura??es

2016-04-01 Thread Denis Kozlov

On 30/03/2016 14:45, Alexsander Rosa wrote:

How can I get GetAppConfigDir correctly on Windows XP (PT-BR)?
The path includes the word "configurações" (settings, in portuguese).

  dir_config := ExtractFilePath(GetAppConfigDirUTF8(false));
Any hints?


Can you reproduce this problem if you creating a new (empty) application 
project in Lazarus? Can you zip it and share?


Local tests with Lazarus 1.4.4 and 1.6, on Windows XP and 7, show that 
GetAppConfigDirUTF8 is operating correctly with various Unicode symbols 
in the path.


Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] GetAppConfigDir on Windows XP (PT-BR): Configura??es

2016-04-01 Thread Denis Kozlov

On 01/04/2016 22:03, Bart wrote:
So, also on the 1.6 branch we directly call the Windows Wide API 
(provided you are NOT on a Win9x system). 


Sorry Bart, you are right.

I overlooked "Win32MajorVersion <= 4" after seeing "{$ifndef WinCE}". I 
went straight to GetAppConfigDirAnsi to discover issues with 
SysUtils.GetAppConfigDir, or specifically with GetWindowsSpecialDir. So, 
issues with GetWindowsSpecialDir are a concern only for FPC then.


Denis

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] GetAppConfigDir on Windows XP (PT-BR): Configura??es

2016-04-01 Thread Denis Kozlov
On 1 April 2016 at 16:55, Denis Kozlov <dez...@gmail.com> wrote:

> In Lazarus 1.4.4, GetAppConfigDirUTF8 and GetAppConfigFileUTF8 internally
> use GetAppConfigDirAnsi and GetAppConfigFileAnsi (unless running on Windows
> CE), respectively. These functions call ANSI version of Windows API and
> then map the result into UTF8.
>
> If there are characters in the path which do not exist in your current
> system ANSI code page, then you would get question marks instead,
> e.g. "Configura??es".
>


This issue also affects Lazarus 1.6 and FPC 3.0+.

GetWindowsSpecialDir in FPC 3.0.0 and trunk has severe encoding and buffer
overrun issues. SHGetFolderPath links to SHGetFolderPathW if
FPC_UNICODE_RTL is defined. But GetWindowsSpecialDir still calls it as
SHGetFolderPathA, passing under-sized PChar buffer instead of PWideChar.

Working on a fix.

Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] GetAppConfigDir on Windows XP (PT-BR): Configura??es

2016-04-01 Thread Denis Kozlov
On 1 April 2016 at 15:02, Alexsander Rosa  wrote:

> Lazarus 1.4.4 with FPC 2.6.4.
>


In Lazarus 1.4.4, GetAppConfigDirUTF8 and GetAppConfigFileUTF8 internally
use GetAppConfigDirAnsi and GetAppConfigFileAnsi (unless running on Windows
CE), respectively. These functions call ANSI version of Windows API and
then map the result into UTF8.

If there are characters in the path which do not exist in your current
system ANSI code page, then you would get question marks instead,
e.g. "Configura??es".

Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Xamarin becomes free and open-source

2016-03-31 Thread Denis Kozlov

On 31/03/2016 21:31, vfclists . wrote:

They are going all out against Apple and Redhat.


You meant Apple and Google maybe? They target Windows, Mac/iOS and Android.

A wide selection of supported platforms is where FPC and Lazarus 
defiantly have an edge.


Denis

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] LCL exports CC-licensed icons to every LCL application

2016-03-21 Thread Denis Kozlov
On 21 March 2016 at 11:46, Ondrej Pokorny  wrote:

>
> I only want to clarify the license information about the LCL because now
> it isn't correct. As I said in the internal email from 20.03.2016 12:36,
> there are 2 possibilities:
> 1.) remove the CC-licensed icons from the LCL
> 2.) change the LCL licensing information everywhere on the wiki and the
> web. E.g. http://wiki.freepascal.org/Lazarus_Faq#Licensing doesn't say
> anything about the used LCL icons.
>
>
Another possibility as already mentioned:
3) Acquire an exception (permission) from icon copyright holders to allow
building applications with LCL without a need to propagate licensing terms
into target applications.

That would be the cleanest solution in my opinion, if possible of course.
If that doesn't work, then the next best solution would be to replace
CC-licensed icons with alternatives. At last, forcing developers into
CC-licensed icons for their application is a significant drawback and
should be avoided at all cost.

Denis
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] document with text and graphics

2016-03-20 Thread Denis Kozlov


Check out existing RTF style components, for example:
http://wiki.freepascal.org/RichMemo
http://wiki.freepascal.org/lzRichEdit


On 20/03/2016 18:18, duilio foschi wrote:
I'd like to create a document which will store text and graphics, a 
sort of minimal MS-WORD document.


The document should be displayed to screen, edited (the user should be 
able to insert/change text and insert/delete pictures), stored to file 
or into a blob field of a database table.


Could you put me into the right track ?

Where should I start ?

Is there code I could put to good use ? Is there some sort of smart 
TMemo object ?


Thank you

Peppe Polpo


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Run/debug app with command line params through the IDE

2016-02-28 Thread Denis Kozlov


Lazarus Main Menu > Run > Run Parameters...


On 28/02/2016 21:32, Luiz Americo Pereira Camara wrote:

I'd like to debug a console app inside the ide.

In order to the program work i need to pass some command line params

Is there a way to run the app through the IDE passing command line params?

Luiz



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Form Resizing

2016-02-28 Thread Denis Kozlov
No form resizing issues with Lazarus 1.7 r51739 FPC 3.0.0 using 
win32/gtk2 widgets on Windows 7.


Can you reproduce it with a new & clean application?

Denis


On 28/02/2016 00:41, steveg wrote:
I find any and all forms in a running Laz program can not be reduced 
in size below the original startup size. (neither height nor width can 
be reduced)
It is possible to increase the size, but can only be reduced back to 
the original.


To be clear: if I grab the edge of a running form, I can not make the 
form smaller at all.


Just wondering if anybody else has similar issues before calling a bug ?

Lazarus 1.7 r51734M FPC 3.0.0 i386-linux-gtk 2

Thanks - SteveG


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Question about modal forms behaviour under windows

2016-02-26 Thread Denis Kozlov
@zeljko

I've just tested your fixes in latest TRUNK on Windows 7 and it's looking
good!

Have you considered changing the behaviour where the modal form is getting
squashed into a corner when application gets minimized?

Instead of squashing every modal form into a corner of the desktop (as
demonstrated on the screenshot below), it would be better to minimize them
as non-modal forms, i.e. minimize into the taskbar with the main form. Do
you think its feasible?

[image: Inline images 1]


On 8 February 2016 at 10:25, zeljko <zel...@holobit.net> wrote:

> On 02/08/2016 11:00 AM, Denis Kozlov wrote:
>
>>
>> There is a long standing bug report about this particular topic:
>> 0026463: Application minimize not working with modal forms
>> http://bugs.freepascal.org/view.php?id=26463
>>
>> *Issue 1*: Application.Minimize should always minimize the entire
>> application, including modal forms. Currently, the modal form will get
>> squashed into a corner while other disabled windows will keeping hanging
>> on the desktop.
>>
>> *Issue 2*: Minimizing a modal form, provided that it has the minimize
>> button enabled, should call Application.Minimize with the effect as
>> described in Issue 1.
>>
>>
> Your opinion is correct. Thanks for the info, I'll assign that issue to my
> self and fix it soon.
>
> zeljko
>
>
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Microsoft Acquires Xamarin

2016-02-24 Thread Denis Kozlov

On 24/02/2016 20:59, Dmitry Boyarintsev wrote:

Skepticism: what software became better after acquisition by Microsoft?


This is bad news. Microsoft's top interest is likely to be in bundling 
Bing into Xamarin.


MonoDevelop might have to provide their own builds from now on.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Replacing LRT format with RSJ

2016-02-17 Thread Denis Kozlov
It would be useful to have a built-in option to regenerate base PO file
(and update translated PO files) for a project.

This could involve:
1) Removing all existing LRT, LRJ, RST, RSJ.
2) Forcing project to be recompiled to reprocess resourcestrings and
produce RSJ
3) Forcing forms to be resaved to reprocess LFM and produce LRJ

I have performed these steps manually on several occasions to ensure a
clean regenerated PO file.


On 17 February 2016 at 16:50, Maxim Ganetsky <gan...@narod.ru> wrote:

>
> 17.02.2016 18:24, Denis Kozlov пишет:
> > It should be possible to code up an automatic conversion of LRT files
> > directly to RSJ/LSJ, without a need to resave all forms. They both store
> > the same data, but use a different format.
> >
> > Of course, LRT files with already broken strings (as a result of new
> > lines) would be initially mapped 1-to-1 to broken strings in RSJ file,
> > but they will get fixed the next time the form is re-saved.
>
> So users will need to save forms anyway in order to ensure strings
> correctness and to get correct .po files.
>
> Maybe some helper tool that resaves all affected forms in one go can be
> created, though. Don't know how big is demand for it.
>
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Replacing LRT format with RSJ

2016-02-17 Thread Denis Kozlov
It should be possible to code up an automatic conversion of LRT files
directly to RSJ/LSJ, without a need to resave all forms. They both store
the same data, but use a different format.

Of course, LRT files with already broken strings (as a result of new lines)
would be initially mapped 1-to-1 to broken strings in RSJ file, but they
will get fixed the next time the form is re-saved.

Denis

On 16 February 2016 at 17:41, Maxim Ganetsky  wrote:

>
> 16.02.2016 20:31, Giuliano Colla пишет:
> > To actually provide the benefit to users, it would be nice if the
> > transition process would be made automatic in Lazarus IDE.
> > I.e.: If in Project Options "Enable i18n" and "Create/update .po file
> > when saving" are both ticked,  a "Compile" should check for the presence
> > of  .lrt files and behave accordingly, i.e. remove .lrt files and
> > generate again what required.
> >
> > Is that possible?
>
> Not without forcibly saving all affected forms. I don't think it is
> good, because LFMs can change (e.g. when form created in Linux and saved
> in Windows).
>
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Exclude components from localization by path or text

2016-02-09 Thread Denis Kozlov

I've implemented this feature and attached a patch:
http://bugs.freepascal.org/view.php?id=29627

In summary:
1) Added methods to remove entries from TPOFile by identifier and by 
original text.

2) Implemented storage of excluded identifiers and originals via TProject.
3) Updated translation routines to pass over project's excluded 
identifiers and originals when updating PO files.

4) Editing of excluded identifiers and originals in i18n project options.
5) Added option to "Force update PO files on next compile" in i18n 
project options (auto reset, non-persistent). To force update PO files 
after changing excluded identifiers and originals.


I hope this could be merged into either 1.4 or 1.6 as it's an extremely 
useful feature for i18n.


Denis

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus application crash. Is PostMessage thread safe?

2016-02-09 Thread Denis Kozlov

On 09/02/2016 22:37, Giuliano Colla wrote:

PostMessage(Form1.Handle,LM_ERROR,Integer(ErrPut),0);


Is your LM_ERROR larger than LM_USER?

PostMessage is thread safe.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus application crash. Is PostMessage thread safe?

2016-02-09 Thread Denis Kozlov


You create a recursive scenario yourself by calling 
Application.ProcessMessages inside of ShowError inside of HandleError - 
which is the message handling procedure itself, which is triggered by 
Application.ProcessMessages.



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Question about modal forms behaviour under windows

2016-02-08 Thread Denis Kozlov


There is a long standing bug report about this particular topic:
0026463: Application minimize not working with modal forms
http://bugs.freepascal.org/view.php?id=26463

*Issue 1*: Application.Minimize should always minimize the entire 
application, including modal forms. Currently, the modal form will get 
squashed into a corner while other disabled windows will keeping hanging 
on the desktop.


*Issue 2*: Minimizing a modal form, provided that it has the minimize 
button enabled, should call Application.Minimize with the effect as 
described in Issue 1.


This is my opinion (as a software developer with 15 years experience).

Denis


On 08/02/2016 08:02, zeljko wrote:

Hi all,
I don't use windows, so don't know what exact behaviour should be.
Now: MainForm + One modal form, minimizing modal form does not 
minimize mainform (application). (tested with win32 and qt-win32 
widgetsets)


X11: Minimizing modal form minimizes complete application. (qt, gtk2)

My question is: What's exact behaviour of Delphi apps under windows in 
this case ?


zeljko


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Exclude components from localization by path or text

2016-02-07 Thread Denis Kozlov

On 31/01/2016 20:24, Denis Kozlov wrote:
Modern translation software and some IDEs allow you to exclude certain 
text by:


1) Original text (e.g. "My Program Name")
2) Component path (e.g. TForm1.Label1.Caption)

Can this feature be added to Lazarus IDE?


Is there any interest in such feature?

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Exclude components from localization by path or text

2016-01-31 Thread Denis Kozlov

Hello,

Modern translation software and some IDEs allow you to exclude certain 
text by:


1) Original text (e.g. "My Program Name")
2) Component path (e.g. TForm1.Label1.Caption)

Can this feature be added to Lazarus IDE?

Regards,
Denis

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus