Re: [Lazarus] OpenBSD 5.8 64bit - lazarus - exception

2015-10-28 Thread Tomaž Žveglič

On 28.10.2015 13:42, Zeljko wrote:



On 10/28/2015 01:36 PM, Tomaž Žveglič wrote:

I did as you suggest and I also did similar changes to 
FontIsMonoSpaceFont.


Ok, seem that there's no more help from trial error. I'll check it 
when I install OpenBSD in virtual machine.


zeljko



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

Thanks Željko for your help. I owe you beer. Do you have bitcoin address?

Regards,
TomazZ

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


Re: [Lazarus] OpenBSD 5.8 64bit - lazarus - exception

2015-10-28 Thread Zeljko



On 10/28/2015 01:48 PM, Tomaž Žveglič wrote:


Thanks Željko for your help. I owe you beer. Do you have bitcoin address?


No, but thanks for good will :)

zeljko

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


Re: [Lazarus] How to create a non focusable form?

2015-10-28 Thread Zeljko



On 10/28/2015 01:06 PM, Gabor Boros wrote:

2015.10.28. 11:51 keltezéssel, Zeljko írta:

Ok, then go to QtWSForms, TQtWSCustomForms.UpdateWindowFlags and comment
if csNoStdEvents . leave only
Flags := Flags or QtX11BypassWindowManagerHint;

in this case form will not take focus in any case, but must see what
happens with parenting (button is not visible because of this param I
guess).


Commented out "if csNoStdEvents..." line. Button not visible on form
with out without csNoStdEvents in ControlStyle.


seem that we are not lucky with Qt4.
I've readed a bit Qt5 docs and it seem that it's fixed there with new 
attributes like:Qt::WA_X11DoNotAcceptFocus and windowFlags like

Qt::WindowDoesNotAcceptFocus.

zeljko

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


Re: [Lazarus] OpenBSD 5.8 64bit - lazarus - exception

2015-10-28 Thread Tomaž Žveglič

On 28.10.2015 11:41, Zeljko wrote:

...


Seem that nil params kills openbsd 64. Go to 
FontIsDoubleByteCharsFont() in gtk2proc.inc and add dummy integers to 
null params.

var
  SingleCharLen, DoubleCharLen, DummyCharHeight {added}: integer;
begin
  pango_layout_set_single_paragraph_mode(TheFont, TRUE);
  pango_layout_set_width(TheFont, -1);
  pango_layout_set_text(TheFont, 'A', 1);
  pango_layout_get_pixel_size(TheFont, @SingleCharLen, @DummyCharHeight);
  pango_layout_set_text(TheFont, #0'A', 2);
  pango_layout_get_pixel_size(TheFont, @DoubleCharLen, 
@DummmyCharHeight);

  Result:=(SingleCharLen=0) and (DoubleCharLen>0);
end;

now test

zeljko

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


Hi Željko,

Thanks for reply.

I did as you suggest and I also did similar changes to FontIsMonoSpaceFont.

Result:
---
# ./lazarus
TMainIDE.ParseCmdLineOptions:
  PrimaryConfigPath="/root/.lazarus"
  SecondaryConfigPath="/etc/lazarus"
TApplication.HandleException Access violation
  Stack trace:
  $00020CAC901D line 1083 of 
/usr/xenocara/lib/fontconfig/src/../../../dist/fontconfig/src/fcpat.c
[TGtk2WidgetSet.Destroy] WARNING: There are 4 unreleased DCs, a detailed 
dump follows:
[TGtk2WidgetSet.Destroy]  DCs:   0002FE9C9840 0002FE9C9640 
0002FE9C9440 0002FE9C9240
[TGtk2WidgetSet.Destroy] WARNING: There are 6 unreleased GDIObjects, a 
detailed dump follows:
[TGtk2WidgetSet.Destroy]   GDIOs: 00025E4998C0 00025E4996C0 
00025E499740 00025E4997C0 00025E499640 00025E4995C0

[TGtk2WidgetSet.Destroy]   gdiBitmap: 2
[TGtk2WidgetSet.Destroy]   gdiBrush: 1
[TGtk2WidgetSet.Destroy]   gdiFont: 2
[TGtk2WidgetSet.Destroy]   gdiRegion: 1
---

---
# gdb ./lazarus
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.

Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-unknown-openbsd5.8"...
(gdb) run
Starting program: /root/lazarus/lazarus
TMainIDE.ParseCmdLineOptions:
  PrimaryConfigPath="/root/.lazarus"
  SecondaryConfigPath="/etc/lazarus"

Program received signal SIGBUS, Bus error.
0x00023a9a301d in IA__FcPatternBuild (p=0x0)
at 
/usr/xenocara/lib/fontconfig/src/../../../dist/fontconfig/src/fcpat.c:1083
1083 
/usr/xenocara/lib/fontconfig/src/../../../dist/fontconfig/src/fcpat.c: 
No such file or directory.
in 
/usr/xenocara/lib/fontconfig/src/../../../dist/fontconfig/src/fcpat.c

Current language:  auto; currently c
(gdb) bt
#0  0x00023a9a301d in IA__FcPatternBuild (p=0x0)
at 
/usr/xenocara/lib/fontconfig/src/../../../dist/fontconfig/src/fcpat.c:1083

#1  0x0002b48e4306 in pango_fc_font_map_load_fontset ()
   from /usr/local/lib/libpangoft2-1.0.so.3600.0
#2  0x00029ebecb7b in itemize_state_process_run ()
   from /usr/local/lib/libpango-1.0.so.3600.0
#3  0x00029ebed338 in pango_itemize_with_base_dir ()
   from /usr/local/lib/libpango-1.0.so.3600.0
#4  0x00029ebf6884 in pango_layout_check_lines ()
   from /usr/local/lib/libpango-1.0.so.3600.0
#5  0x00029ebf7b06 in pango_layout_get_extents_internal ()
   from /usr/local/lib/libpango-1.0.so.3600.0
#6  0x00029ebf8cf0 in pango_layout_get_pixel_extents ()
   from /usr/local/lib/libpango-1.0.so.3600.0
#7  0x00029ebf8d7c in pango_layout_get_pixel_size ()
   from /usr/local/lib/libpango-1.0.so.3600.0
#8  0x00b2ec49 in FONTISDOUBLEBYTECHARSFONT (THEFONT=0x2fcf18af0)
at gtk2proc.inc:9221
#9  0x00a306b2 in UPDATEDCTEXTMETRIC (this=0x26c167650, 
DC=0x268ee8240)

at gtk2widgetset.inc:5913
#10 0x00a3fd21 in GETTEXTMETRICS (this=0x26c167650, 
DC=10350395968, TM=
  {TMHEIGHT = 0, TMASCENT = 2, TMDESCENT = -210960, 
TMINTERNALLEADING = 32639, TMEXTERNALLEADING = 11774176, TMAVECHARWIDTH 
= 0, TMMAXCHARWIDTH = 0, TMWEIGHT = 0, TMOVERHANG = 5, 
TMDIGITIZEDASPECTX = 1, TMDIGITIZEDASPECTY = 1760462912, TMFIRSTCHAR = 2 
'\002', TMLASTCHAR = 0 '\0', TMDEFAULTCHAR = 0 '\0', TMBREAKCHAR = 0 
'\0', TMITALIC = 0 '\0', TMUNDERLINED = 199 'Ç', TMSTRUCKOUT = 252 'ü', 
TMPITCHANDFAMILY = 255 '˙', TMCHARSET = 127 '\177'}) at gtk2winapi.inc:5988

#11 0x00a36e87 in DRAWTEXT (this=0x26c167650, DC=10350395968,
STR=0x1cc4c80 "1.4.4", COUNT=5, RECT=
{LEFT = 0, TOP = 281, RIGHT = 450, BOTTOM = 300, TOPLEFT = {X = 
0, Y = 281}, BOTTOMRIGHT = {X = 450, Y = 300}}, FLAGS=3109) at 
gtk2winapi.inc:2717

#12 0x009c9c13 in DRAWTEXT (DC=10350395968, STR=0x1cc4c80 "1.4.4",
COUNT=5, RECT=
{LEFT = 0, TOP = 281, RIGHT = 

Re: [Lazarus] How to create a non focusable form?

2015-10-28 Thread Gabor Boros

2015.10.28. 11:51 keltezéssel, Zeljko írta:

Ok, then go to QtWSForms, TQtWSCustomForms.UpdateWindowFlags and comment
if csNoStdEvents . leave only
Flags := Flags or QtX11BypassWindowManagerHint;

in this case form will not take focus in any case, but must see what
happens with parenting (button is not visible because of this param I
guess).


Commented out "if csNoStdEvents..." line. Button not visible on form 
with out without csNoStdEvents in ControlStyle.


Gabor

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


Re: [Lazarus] How to create a non focusable form?

2015-10-28 Thread Gabor Boros

2015.10.28. 13:06 keltezéssel, Gabor Boros írta:


with out without


with or without

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


Re: [Lazarus] How to create a non focusable form?

2015-10-28 Thread Zeljko



On 10/28/2015 01:06 PM, Gabor Boros wrote:

2015.10.28. 11:51 keltezéssel, Zeljko írta:

Ok, then go to QtWSForms, TQtWSCustomForms.UpdateWindowFlags and comment
if csNoStdEvents . leave only
Flags := Flags or QtX11BypassWindowManagerHint;

in this case form will not take focus in any case, but must see what
happens with parenting (button is not visible because of this param I
guess).


Commented out "if csNoStdEvents..." line. Button not visible on form
with out without csNoStdEvents in ControlStyle.


Please check with attached patch (same name as previous one). Seem that 
our C bindings does not have all attributes translated since they did 
not exist in Qt-4.5, but sometime later. I've added strict X11 attribute 
and now it does not steal activation or focus, even if clicked with 
mouse (tested with your example with button).


zeljko

Index: lcl/interfaces/qt/qtwsforms.pp
===
--- lcl/interfaces/qt/qtwsforms.pp	(revision 50180)
+++ lcl/interfaces/qt/qtwsforms.pp	(working copy)
@@ -923,6 +923,20 @@
 
   if not (csDesigning in AWidget.LCLObject.ComponentState) then
   begin
+if (csNoFocus in TCustomForm(AWidget.LCLObject).ControlStyle) then
+begin
+  {$IFDEF HASX11}
+  if ((QtVersionMajor = 4) and (QtVersionMinor >= 7)) or
+(QtVersionMajor > 4) then
+  begin
+if QtVersionMajor = 4 then
+  AWidget.setAttribute(132 {QtWA_X11DoNotAcceptFocus}, True)
+else // Qt 5
+  AWidget.setAttribute(126 {QtWA_X11DoNotAcceptFocus}, True)
+  end;
+  {$ENDIF}
+  AWidget.setAttribute(QtWA_ShowWithoutActivating, True);
+end;
 AWidget.setWindowFlags(Flags);
 if ABorderStyle in [bsDialog, bsNone, bsSingle] then
   AWidget.Resize(AWidget.LCLObject.Width, AWidget.LCLObject.Height)
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] OpenBSD 5.8 64bit - lazarus - exception

2015-10-28 Thread Zeljko



On 10/28/2015 01:36 PM, Tomaž Žveglič wrote:


I did as you suggest and I also did similar changes to FontIsMonoSpaceFont.


Ok, seem that there's no more help from trial error. I'll check it when 
I install OpenBSD in virtual machine.


zeljko



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


Re: [Lazarus] TSynMemo + TSynXMLSyn: How format a XML after load it?

2015-10-28 Thread Marcos Douglas
On Wed, Oct 28, 2015 at 10:32 AM, Mattias Gaertner
 wrote:
> On Wed, 28 Oct 2015 09:43:23 -0200
> Marcos Douglas  wrote:
>
>> [...]
>> ...automatically, by set a property or use a method.
>> Is it possible?
>
> You have to define what to do with text elements containing only
> space (e.g.  ). By default it should keep the
> spaces (Note: spaces include tabs and line breaks).

The original XML comes from a WebService and not contains spaces.

Part of my program is exhibit this XML to user to him check erros,
send for other person, log, etc.
Would be better show these XML with indentation.

> Further complications: CDATA.
>
> The current fpc xml writer creates the indentation, but messes up text
> element.
> The laz2_xml writer has a flag to keep the indentation and
> preserving text elements. This could be extended with a further flag to
> indent elements gaps while preserving text elements.

You suggest use fpc xml writer to:
1- load the original XML without spaces
2- save the XML after with automatically spaces

Like that?
I don't know the fpc xml write yet, so I'm asking how use it.

>
> Or you can simply write a function that works for your xml files.

Not simple to do that. The program don't know nothing about the XML
before call them, because there is many WebServices. The program is
just a tool for "debbuger" informations.

Marcos Douglas

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


Re: [Lazarus] TSynMemo + TSynXMLSyn: How format a XML after load it?

2015-10-28 Thread Mattias Gaertner
On Wed, 28 Oct 2015 10:57:35 -0200
Marcos Douglas  wrote:

>[...]
> You suggest use fpc xml writer to:
> 1- load the original XML without spaces
> 2- save the XML after with automatically spaces
> 
> Like that?

Yes.

> I don't know the fpc xml write yet, so I'm asking how use it.

ReadXMLFile
WriteXMLFile


>[...]

Mattias

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


Re: [Lazarus] TSynMemo + TSynXMLSyn: How format a XML after load it?

2015-10-28 Thread Mattias Gaertner
On Wed, 28 Oct 2015 09:43:23 -0200
Marcos Douglas  wrote:

> On Wed, Oct 28, 2015 at 6:48 AM, Mattias Gaertner
>  wrote:
> > On Wed, 28 Oct 2015 01:17:23 -0200
> > Marcos Douglas  wrote:
> >
> >> Hi,
> >>
> >> I'm using TSynMemo and TSynXMLSyn.
> >> How format a XML after load it?
> >
> > Please define "format".
> 
> Ok, sorry.
> 
> I meant format this:
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
> mlns:xsd="http://www.w3.org/2001/XMLSchema;
> xmlns:soap12="http://www.w3.org/2003/05/soap-envelope;>
>int
> string 
> /soap12:Envelope>
> 
> in this:
> 
> 
> http://www.w3.org/2001/XMLSchema-instance;
> xmlns:xsd="http://www.w3.org/2001/XMLSchema;
> xmlns:soap12="http://www.w3.org/2003/05/soap-envelope;>
>   
> 
>   
> 
>   int
>   string
> 
>   
> 
>   
> 
> 
> ...automatically, by set a property or use a method.
> Is it possible?

You have to define what to do with text elements containing only
space (e.g.  ). By default it should keep the
spaces (Note: spaces include tabs and line breaks).

Further complications: CDATA.

The current fpc xml writer creates the indentation, but messes up text
element.
The laz2_xml writer has a flag to keep the indentation and
preserving text elements. This could be extended with a further flag to
indent elements gaps while preserving text elements.

Or you can simply write a function that works for your xml files.

Mattias

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


Re: [Lazarus] TSynMemo + TSynXMLSyn: How format a XML after load it?

2015-10-28 Thread Marcos Douglas
On Wed, Oct 28, 2015 at 6:48 AM, Mattias Gaertner
 wrote:
> On Wed, 28 Oct 2015 01:17:23 -0200
> Marcos Douglas  wrote:
>
>> Hi,
>>
>> I'm using TSynMemo and TSynXMLSyn.
>> How format a XML after load it?
>
> Please define "format".

Ok, sorry.

I meant format this:
http://www.w3.org/2001/XMLSchema-instance;
mlns:xsd="http://www.w3.org/2001/XMLSchema;
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope;>
   int
string 
/soap12:Envelope>

in this:


http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd="http://www.w3.org/2001/XMLSchema;
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope;>
  

  

  int
  string

  

  


...automatically, by set a property or use a method.
Is it possible?

Thanks,
Marcos Douglas

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


Re: [Lazarus] How to create a non focusable form?

2015-10-28 Thread Zeljko



On 10/28/2015 01:06 PM, Gabor Boros wrote:

2015.10.28. 11:51 keltezéssel, Zeljko írta:

Ok, then go to QtWSForms, TQtWSCustomForms.UpdateWindowFlags and comment
if csNoStdEvents . leave only
Flags := Flags or QtX11BypassWindowManagerHint;

in this case form will not take focus in any case, but must see what
happens with parenting (button is not visible because of this param I
guess).


Commented out "if csNoStdEvents..." line. Button not visible on form
with out without csNoStdEvents in ControlStyle.


Yes, QtX11BypassWindowManagerHint does strange things and that's not 
documented in Qt :(
Really don't know how to achive that goal under X11. Tried pure Qt 
application and have same problem. Shown form does not activate and 
that's fine, but when I click on it then it activates :(


zeljko

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


Re: [Lazarus] fpcdoc 2.6.4 does not parse "otherwise" clause of "case" statement (though the compiler does.)

2015-10-28 Thread AlanCanon
Thanks, I'll go to the proper channel, and patch it myself if I can. I'm
working for Richard Dawkins (resuscitating his "Blind Watchmaker" software
so that it can run on modern computers) and I'm highly motivatedif I
can contribute to the function of the Free Pascal project I will be very
happy indeed.

On Wed, Oct 28, 2015 at 10:53 AM, Mattias Gaertner [via Free Pascal -
Lazarus]  wrote:

> On Wed, 28 Oct 2015 07:16:13 -0700 (MST)
> AlanCanon <[hidden email]
> > wrote:
>
> > It appears that FPDoc Version 2.6.4 [2015/08/14] doesn't support the
> > "otherwise" clause in Pascal "case" statements (though the compiler
> supports
> > "otherwise" just fine.)
>
> FPDoc is maintained by the FPC team, not by Lazarus.
>
> > I'm a self-starter, and I'd be motivated to patch
> > FPDoc myself, if it's under active development.
>
> Great.
> You can submit bug reports and patches here:
> http://bugs.freepascal.org/
>
> Mattias
>
> --
> ___
> Lazarus mailing list
> [hidden email] 
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://free-pascal-lazarus.989080.n3.nabble.com/fpcdoc-2-6-4-does-not-parse-otherwise-clause-of-case-statement-though-the-compiler-does-tp4045058p4045062.html
> To unsubscribe from fpcdoc 2.6.4 does not parse "otherwise" clause of
> "case" statement (though the compiler does.), click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/fpcdoc-2-6-4-does-not-parse-otherwise-clause-of-case-statement-though-the-compiler-does-tp4045058p4045064.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to create a non focusable form?

2015-10-28 Thread Zeljko



On 10/28/2015 03:05 PM, Gabor Boros wrote:

2015.10.28. 14:12 keltezéssel, Zeljko írta:


Please check with attached patch (same name as previous one). Seem that
our C bindings does not have all attributes translated since they did
not exist in Qt-4.5, but sometime later. I've added strict X11 attribute
and now it does not steal activation or focus, even if clicked with
mouse (tested with your example with button).


Tested with fixes_1_4 and trunk. Works like a charm! :D Thank you very
much!

Report as a bug in the tracker?


Yes please, attach there example and my latest patch :)



A previous fix... Please add commit 50139 to merge requests for fixes_1_4.


Done.

zeljko

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


[Lazarus] fpcdoc 2.6.4 does not parse "otherwise" clause of "case" statement (though the compiler does.)

2015-10-28 Thread AlanCanon
It appears that FPDoc Version 2.6.4 [2015/08/14] doesn't support the
"otherwise" clause in Pascal "case" statements (though the compiler supports
"otherwise" just fine.) I'm a self-starter, and I'd be motivated to patch
FPDoc myself, if it's under active development.program_brand_new.pas Lines
296-303 (from Richard Dawkins' Blind Watchmaker: Arthromorphs)case
(GetWRefCon(whichWindow)) of{Do the appropiate window}
  2:  DrawGrowIcon(whichWindow);{Draw the Grow box}  otherwise{Handle
others }begin{Others}end;{End of the else}end;{End of the case}  
The error message returned is:program_brand_new.pas(300,18): Expected "," at
token "begin" in file program_brand_new.pas at line 300 column 18



--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/fpcdoc-2-6-4-does-not-parse-otherwise-clause-of-case-statement-though-the-compiler-does-tp4045058.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to create a non focusable form?

2015-10-28 Thread Gabor Boros

2015.10.28. 15:25 keltezéssel, Zeljko írta:


Report as a bug in the tracker?


Yes please, attach there example and my latest patch :)


Done.

http://bugs.freepascal.org/view.php?id=28922


A previous fix... Please add commit 50139 to merge requests for
fixes_1_4.


Done.


I see it. Thank you!

Gabor

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


Re: [Lazarus] fpcdoc 2.6.4 does not parse "otherwise" clause of "case" statement (though the compiler does.)

2015-10-28 Thread Mattias Gaertner
On Wed, 28 Oct 2015 07:16:13 -0700 (MST)
AlanCanon  wrote:

> It appears that FPDoc Version 2.6.4 [2015/08/14] doesn't support the
> "otherwise" clause in Pascal "case" statements (though the compiler supports
> "otherwise" just fine.) 

FPDoc is maintained by the FPC team, not by Lazarus.

> I'm a self-starter, and I'd be motivated to patch
> FPDoc myself, if it's under active development.

Great.
You can submit bug reports and patches here:
http://bugs.freepascal.org/

Mattias

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


Re: [Lazarus] TSynMemo + TSynXMLSyn: How format a XML after load it?

2015-10-28 Thread Anthony Walter
uses
  Codebot.Text.Xml;

function PrettyXml(const Xml: string): string;
var
  D: IDocument;
begin
  D := DocumentCreate;
  D.Xml := Xml;
  D.Beautify;
  Result := D.Xml;
end;

{ TForm1 }

procedure TForm1.Button1Click(Sender: TObject);
begin
  Memo1.Text := PrettyXml(Memo1.Text);
end;

Result:


http://www.w3.org/2001/XMLSchema-instance;
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope; mlns:xsd="
http://www.w3.org/2001/XMLSchema;>




int
string





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


Re: [Lazarus] How to create a non focusable form?

2015-10-28 Thread Gabor Boros

2015.10.28. 14:12 keltezéssel, Zeljko írta:


Please check with attached patch (same name as previous one). Seem that
our C bindings does not have all attributes translated since they did
not exist in Qt-4.5, but sometime later. I've added strict X11 attribute
and now it does not steal activation or focus, even if clicked with
mouse (tested with your example with button).


Tested with fixes_1_4 and trunk. Works like a charm! :D Thank you very much!

Report as a bug in the tracker?

A previous fix... Please add commit 50139 to merge requests for fixes_1_4.

Gabor

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


Re: [Lazarus] TSynMemo + TSynXMLSyn: How format a XML after load it?

2015-10-28 Thread Marcos Douglas
On Wed, Oct 28, 2015 at 12:37 PM, Anthony Walter  wrote:
> uses
>   Codebot.Text.Xml;
>
> function PrettyXml(const Xml: string): string;
> [...]

Thank you!

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


Re: [Lazarus] TSynMemo + TSynXMLSyn: How format a XML after load it?

2015-10-28 Thread Anthony Walter
Marcos, here are a few notes when working with Codebot.Text.Xml:

  * You can use IDocument.Load/Save to load and save Xml to and from files.
  * If the Xml text is in an invalid state, the IDocument will be empty.
  * Attempts to read an empty IDocument Text or Xml property return an
empty Xml doctype.
  * You can check if IDocument contains valid Xml by seeing if the root
node exists. ie: Document.Root <> nil
  * Alternately you can validate Xml using the XmlValidate function...

  function XmlValidate(const Xml: string): Boolean;
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] is scrypt available?

2015-10-28 Thread wkitty42

On 10/28/2015 06:33 AM, taazz wrote:

On 27/10/2015 16:18 μμ, wkitt...@windstream.net wrote:

On 10/26/2015 11:59 PM, taazz wrote:

On 26/10/2015 22:56 μμ, wkitt...@windstream.net wrote:

On 10/26/2015 03:31 PM, mic...@gmail.com wrote:

Am Monday 26 October 2015 20:13:49 schrieb wkitt...@windstream.net:

scrypt


http://www.wolfgang-ehrhardt.de/crchash_en.html


the license on that one is too restrictive :(


What is so restrictive about zlib?


where do you see anything about zlib?


in the page linked first paragraph/line from the top


ahh... but the problem is [keep reading]


[quote]
Here you find a few Pascal / Delphi source and binary files related to CRC,
hash, and HMAC calculations. All files can be used and distributed under this
license , the original


the above link is the license URL... the stuff about patents is off putting to 
say the least...



template of the zlib/libpng license can be found here: zlib-license
.
[/quote]


--
 NOTE: No off-list assistance is given without prior approval.
   *Please keep mailing list traffic on the list* unless
   private contact is specifically requested and granted.

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


Re: [Lazarus] How write a proper Type declaration with procedures?

2015-10-28 Thread Anthony Walter
type
  TURLTable = class(TStringlist)
  private
FTable: LinkArray;
function GetTable: LinkArray;
  public
 procedure Insert(const s: string);
 property Table: LinkArray read GetTable;
  end;

function TURLTable.GetTable: LinkArray;
begin
  Result := FTable;
end;

procedure TURLTable.Insert(const s: string);
begin
end;

... or alternately

  property Table: LinkArray read FTable;


... and remove function GetTable: LinkArray;
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] OpenBSD 5.8 64bit - lazarus - exception

2015-10-28 Thread Zeljko




#6  0x00a1bae4 in CREATEFORMCONTENTS (AFORM=0x2c31ef530,
FORMWIDGET=0x2887b8500,
 AWIDGETINFO=0x282a0bb20) at gtk2proc.inc:7485


ah, maybe lineinfo is invalid (not like in trunk), so pls. in that 
function of gtk2proc add gtk_adjustment_new where crash occurs...there 
are 2 places where gtkAdjustment is param.


zeljko


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


[Lazarus] Easily Create a Screen Magnifier

2015-10-28 Thread Anthony Walter
Tonight I quickly created a simple cross platform screen magnifier utility.

http://www.getlazarus.org/videos/magnify/

I don't know if any of you like to examine your pixels, but I was tweaking
my CPU meter graphing desktop widget when I wanted a faster way to
check my line
stippling patterns
 when I
then decided to create yet another tool.

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


Re: [Lazarus] How write a proper Type declaration with procedures?

2015-10-28 Thread leledumbo
> When I come to write the implementation part of the unit, what's the syntax
to refer to the property Table? If I use 
> ...
> I get the error 'No member is provided to access property.'

That should be correct. It's something else that bugs. At least the
following compiles for me:

unit Simple;

{$mode objfpc}{$H+}

interface

uses
  Classes;

type
  TURLTable = class(TStringList)
  private
Table: array of String;
  public
procedure Insert(const s: String); overload;
  end;

implementation

procedure TURLTable.Insert(const s: String);
var
  i: Integer;
begin
  i := Length(Table);
  SetLength(Table,i + 1);
  Table[i] := s;
end;

end.




--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-How-write-a-proper-Type-declaration-with-procedures-tp4045029p4045031.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

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


Re: [Lazarus] OpenBSD 5.8 64bit - lazarus - exception

2015-10-28 Thread Zeljko





#6  0x00a1bae4 in CREATEFORMCONTENTS (AFORM=0x2c31ef530,
FORMWIDGET=0x2887b8500,
 AWIDGETINFO=0x282a0bb20) at gtk2proc.inc:7485


huh ?!? There's simple pointer assignment at this point FormWidget := 
Result ... definitelly must install openbsd and see what's up.


zeljko




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


Re: [Lazarus] Easily Create a Screen Magnifier

2015-10-28 Thread Aradeonas
Hi Anthony,

Nice one and I want to check it but the last version of CodeBot will not
compile in windows and also it seems you forget Quality in
implementation of surface copy rext
> procedure CopyTo(const Source: TRectF; Surface: ISurface;
> const Dest: TRectF; Alpha: Byte = $FF; Quality: TResampleQuality =
> rqNormal);
>

And also THotkeyCaptureImpl is only for linux.

Do you want any help on this or you just forgot it?

Regards, Ara

-- 
http://www.fastmail.com - Faster than the air-speed velocity of an
  unladen european swallow

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


Re: [Lazarus] How to create a non focusable form?

2015-10-28 Thread Zeljko



On 10/27/2015 05:07 PM, Gabor Boros wrote:

2015.10.27. 16:16 keltezéssel, Zeljko írta:


csNoFocus does not work for Qt ? Can you provide example ?
For Qt: before example try to include qt4 and qtwidgets into your unit
and then
in CreateWnd of your custom form (or after form handle is created)

TQtMainWindow(YourForm.Handle).SetFocusPolicy(QtNoFocus);
TQtMainWindow(YourForm.Handle).WindowArea.SetFocusPolicy(QtNoFocus);


WindowArea not exist, found ScrollAera which is TQtWindowArea type.
But not have any effect for me. Example attached (without Qt and
WMNCHitTest trick).


Please test with attached patch and give feedback. Note that this patch 
is tested under Qt X11 only.


zeljko
Index: lcl/interfaces/qt/qtwidgets.pas
===
--- lcl/interfaces/qt/qtwidgets.pas	(revision 50180)
+++ lcl/interfaces/qt/qtwidgets.pas	(working copy)
@@ -4358,7 +4358,8 @@
 
 procedure TQtWidget.Activate;
 begin
-  QWidget_activateWindow(Widget);
+  if not testAttribute(QtWA_ShowWithoutActivating) then
+QWidget_activateWindow(Widget);
 end;
 
 procedure TQtWidget.BringToFront;
Index: lcl/interfaces/qt/qtwsforms.pp
===
--- lcl/interfaces/qt/qtwsforms.pp	(revision 50180)
+++ lcl/interfaces/qt/qtwsforms.pp	(working copy)
@@ -923,6 +923,14 @@
 
   if not (csDesigning in AWidget.LCLObject.ComponentState) then
   begin
+if (csNoFocus in TCustomForm(AWidget.LCLObject).ControlStyle) then
+begin
+  {$IFDEF HASX11}
+  if csNoStdEvents in TCustomForm(AWidget.LCLObject).ControlStyle then
+Flags := Flags or QtX11BypassWindowManagerHint;
+  {$ENDIF}
+  AWidget.setAttribute(QtWA_ShowWithoutActivating, True);
+end;
 AWidget.setWindowFlags(Flags);
 if ABorderStyle in [bsDialog, bsNone, bsSingle] then
   AWidget.Resize(AWidget.LCLObject.Width, AWidget.LCLObject.Height)
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to create a non focusable DBGrid?

2015-10-28 Thread Gabor Boros

2015.10.27. 19:09 keltezéssel, Gabor Boros írta:

Hi All,

I want a non focusable DBGrid on a non focusable form. (I asked form
thing earlier in "How to create a non focusable form?" thread.)

I tried to solve the task with csNoFocus but not working.
See the attached example. If click on the DBGrid (title or cell) it's
catch the focus.

Gabor


Meanwhile found other problems and reported:

http://bugs.freepascal.org/view.php?id=28919

Gabor

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


Re: [Lazarus] is scrypt available?

2015-10-28 Thread Mark Morgan Lloyd

wkitt...@windstream.net wrote:

the above link is the license URL... the stuff about patents is off 
putting to say the least...


Apologies for chopping the bulk of that message, but it's coming over 
unformatted.


The patents issue relating to zlib etc. is way out of date, see 
https://en.wikipedia.org/wiki/LZW#Patents for a summary.


What you choose to use depends on what (if anything) you need to be 
compatible with, but for some password stuff I wrote a couple of years 
ago I used Tiger2 from DCPcrypt.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

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


Re: [Lazarus] is scrypt available?

2015-10-28 Thread wkitty42

On 10/28/2015 01:00 PM, Mark Morgan Lloyd wrote:

wkitt...@windstream.net wrote:


the above link is the license URL... the stuff about patents is off putting to
say the least...


Apologies for chopping the bulk of that message, but it's coming over 
unformatted.


no problem... i do take steps to reformat some quotes some times...


The patents issue relating to zlib etc. is way out of date, see
https://en.wikipedia.org/wiki/LZW#Patents for a summary.


it isn't those patent issues... there's something else that the license link 
page talks about...



What you choose to use depends on what (if anything) you need to be compatible
with, but for some password stuff I wrote a couple of years ago I used Tiger2
from DCPcrypt.


understood on the compatibility... i was just pointing out that that 
implementation was not right for our needs... maybe there is another 
implementation that will work... if not, reinventing the wheel will be necessary...


--
 NOTE: No off-list assistance is given without prior approval.
   *Please keep mailing list traffic on the list* unless
   private contact is specifically requested and granted.

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


Re: [Lazarus] is scrypt available?

2015-10-28 Thread taazz

On 28/10/2015 17:29 μμ, wkitt...@windstream.net wrote:

On 10/28/2015 06:33 AM, taazz wrote:

On 27/10/2015 16:18 μμ, wkitt...@windstream.net wrote:

On 10/26/2015 11:59 PM, taazz wrote:

On 26/10/2015 22:56 μμ, wkitt...@windstream.net wrote:

On 10/26/2015 03:31 PM, mic...@gmail.com wrote:

Am Monday 26 October 2015 20:13:49 schrieb wkitt...@windstream.net:

scrypt


http://www.wolfgang-ehrhardt.de/crchash_en.html


the license on that one is too restrictive :(


What is so restrictive about zlib?


where do you see anything about zlib?


in the page linked first paragraph/line from the top


ahh... but the problem is [keep reading]


[quote]
Here you find a few Pascal / Delphi source and binary files related 
to CRC,
hash, and HMAC calculations. All files can be used and distributed 
under this
license , the 
original


the above link is the license URL... the stuff about patents is off 
putting to say the least...



template of the zlib/libpng license can be found here: zlib-license
.
[/quote]



The stuff about patents?
Those "patent stuff" as you put it have nothing to do with the code's 
license you have to be aware of them regardless the library you use or 
the license the library comes with. They do restrict your use cases but 
its not the library's fault or role to solve them for you.
It is the same with every mp3 library out there, you need to be aware 
that mp3 is a patented algorithm and if you create a commercial product 
using it you have to pay for the privilege regardless of the library's 
license.


In any way I have my answer and thank you for your time.

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


Re: [Lazarus] is scrypt available?

2015-10-28 Thread Mark Morgan Lloyd

wkitt...@windstream.net wrote:

On 10/28/2015 01:00 PM, Mark Morgan Lloyd wrote:

wkitt...@windstream.net wrote:

the above link is the license URL... the stuff about patents is off 
putting to

say the least...


Apologies for chopping the bulk of that message, but it's coming over 
unformatted.


no problem... i do take steps to reformat some quotes some times...


The patents issue relating to zlib etc. is way out of date, see
https://en.wikipedia.org/wiki/LZW#Patents for a summary.


it isn't those patent issues... there's something else that the license 
link page talks about...


Go on...

The Unisys and BT patents are the ones that have given most people 
problems, which is why I cited that page.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

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


Re: [Lazarus] How write a proper Type declaration with procedures?

2015-10-28 Thread Joe Shepherd

Thank you both - another case of not seeing the wood for the trees.

 

Joe

 

 
 



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


Re: [Lazarus] is scrypt available?

2015-10-28 Thread wkitty42

On 10/28/2015 03:32 PM, Mark Morgan Lloyd wrote:

wkitt...@windstream.net wrote:

On 10/28/2015 01:00 PM, Mark Morgan Lloyd wrote:

wkitt...@windstream.net wrote:


the above link is the license URL... the stuff about patents is off putting to
say the least...


Apologies for chopping the bulk of that message, but it's coming over
unformatted.


no problem... i do take steps to reformat some quotes some times...


The patents issue relating to zlib etc. is way out of date, see
https://en.wikipedia.org/wiki/LZW#Patents for a summary.


it isn't those patent issues... there's something else that the license link
page talks about...


Go on...


crypto patents or something, i guess... it says that if there are any patents in 
the software that the code cannot be used... click the link and read it and 
you'll see it, too...



The Unisys and BT patents are the ones that have given most people problems,
which is why I cited that page.


yeah... AFAIK, zip or zlib stuff isn't used in this... or is it?

--
 NOTE: No off-list assistance is given without prior approval.
   *Please keep mailing list traffic on the list* unless
   private contact is specifically requested and granted.

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


[Lazarus] Linux Window Manager Enhancements

2015-10-28 Thread Anthony Walter
Does anyone have experience or interest in enhancing window management
support for Linux with Lazarus?

I was reading up on the window management systems for Linux like Compiz,
KWin, Xcfe and found they and many other support a common protocol for
doing things like:

* altering window z-order
* making window sticky or above
* switching windows between desktop
* listing desktops
* adding or removing desktops
* switching between desktop
* listing windows
* resizing windows
* activating and deactiving windows for user input

... and more

The program wmctrl is an example of such how functionality can be
administered programatically.

I think it would be very useful if some of these functionality could be
brought into Lazarus, especially in areas with Lazarus which don't work as
desired (Application.BringToFront) on some Linux systems.

A specification for administering these tasks on X windows is NetWM. Here
is some reference material if anyone cares to look at it.

http://standards.freedesktop.org/wm-spec/wm-spec-latest.html
http://en.wikipedia.org/wiki/Extended_Window_Manager_Hints
http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/netwm_8h.html

Maybe we can add this type of functionality to a Lazarus package and
perhaps use it to plug a few holes with LCL on Linux.

or

Maybe we can use this type of functionality to increase our programatic
access to window management on Linux.

A penny for your thoughts.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] is scrypt available?

2015-10-28 Thread taazz

On 28/10/2015 23:02 μμ, wkitt...@windstream.net wrote:

On 10/28/2015 03:32 PM, Mark Morgan Lloyd wrote:

wkitt...@windstream.net wrote:

On 10/28/2015 01:00 PM, Mark Morgan Lloyd wrote:

wkitt...@windstream.net wrote:

the above link is the license URL... the stuff about patents is 
off putting to

say the least...


Apologies for chopping the bulk of that message, but it's coming over
unformatted.


no problem... i do take steps to reformat some quotes some times...


The patents issue relating to zlib etc. is way out of date, see
https://en.wikipedia.org/wiki/LZW#Patents for a summary.


it isn't those patent issues... there's something else that the 
license link

page talks about...


Go on...


crypto patents or something, i guess... it says that if there are any 
patents in the software that the code cannot be used... click the link 
and read it and you'll see it, too...



That's not what it says at all.
what its says is that even if you do use an other library, the scrypt 
algorithm is the same so you do need check for patents on it and comply 
with your countries patent laws. In any case the library's license is 
less restrictive than mpl.


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


[Lazarus] Lazarus in trunk not working after Rev 50151 on MacOSX

2015-10-28 Thread Michael Ring
I today realized that current trunk does not work anymore after Rev 
50151, Lazarus starts and when I load a project I get a Range Check 
Error and after this I cannot open source files.


Is this a known issue?

Michael

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


Re: [Lazarus] Linux Window Manager Enhancements

2015-10-28 Thread Anthony Walter
Actually XLib does provide control over layering windows, input focus,
z-order, virtual desktops. It's the window manager (KWin, Compiz, Metacity,
IceWM, and so on) which handles this.

As such, with some tookits and window manager combinations it's not
possible to do certain things without special code to work around specific
combinations of both. For example, when writing a Gtk2 application with
Compiz it's not possible to alter the z-order of your application, ie
bringing it to the foreground and/or activating it. XLib won't help you
with this.

But the good news is that most all window managers expose window management
functionality through a common protocol: NetWM

For example the _NET_WM_STATE message can be used to reorder the stack of
application windows above or below one another (bringing your application
to the top). It can be used to make your window sticky (to appear in the
same place in all workspaces).

The _NET_ACTIVE_WINDOW can be used to find application window with input
focus. It can also be used to give input focus to another application
window.

These are all thing which XLib doesn't cover, and areas where Lazarus and
some toolkits/window managers struggle with parity. That is, without a
common protocol like NetWM.

Anyhow, if anyone is still interested, I've written a Free Pascal unit to
interface with the NetWM protocol. So far I've tested it with Gtk2 on
Compix with the following functionality:

Show/hide desktop [x] works
Switch workspace [x] works
Sticky/unsticky a window [x] works
Move window to a different workspace [x] works
Cycle various application z-orders [x] works

I will implement a few more functions and then post the unit to github. I'd
like to get application activation, bypassing window animations, and a few
other features working. When posted if people with different window
managers (KDE's KWin) want to test it, that would be great.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Linux Window Manager Enhancements

2015-10-28 Thread Anthony Walter
Actually XLib does NOT provide control over layering windows, input focus,
z-order, virtual desktops. It's the window manager (KWin, Compiz, Metacity,
IceWM, and so on) which handles this.

As such, with some tookits and window manager combinations it's not
possible to do certain things without special code to work around specific
combinations of both. For example, when writing a Gtk2 application with
Compiz it's not possible to alter the z-order of your application, ie
bringing it to the foreground and/or activating it. XLib won't help you
with this.

But the good news is that most all window managers expose window management
functionality through a common protocol: NetWM

For example the _NET_WM_STATE message can be used to reorder the stack of
application windows above or below one another (bringing your application
to the top). It can be used to make your window sticky (to appear in the
same place in all workspaces).

The _NET_ACTIVE_WINDOW can be used to find application window with input
focus. It can also be used to give input focus to another application
window.

These are all thing which XLib doesn't cover, and areas where Lazarus and
some toolkits/window managers struggle with parity. That is, without a
common protocol like NetWM.

Anyhow, if anyone is still interested, I've written a Free Pascal unit to
interface with the NetWM protocol. So far I've tested it with Gtk2 on
Compix with the following functionality:

Show/hide desktop [x] works
Switch workspace [x] works
Sticky/unsticky a window [x] works
Move window to a different workspace [x] works
Cycle various application z-orders [x] works

I will implement a few more functions and then post the unit to github. I'd
like to get application activation, bypassing window animations, and a few
other features working. When posted if people with different window
managers (KDE's KWin) want to test it, that would be great.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TSynMemo + TSynXMLSyn: How format a XML after load it?

2015-10-28 Thread Mattias Gaertner
On Wed, 28 Oct 2015 01:17:23 -0200
Marcos Douglas  wrote:

> Hi,
> 
> I'm using TSynMemo and TSynXMLSyn.
> How format a XML after load it?

Please define "format".

Mattias

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


Re: [Lazarus] OpenBSD 5.8 64bit - lazarus - exception

2015-10-28 Thread Tomaž Žveglič

On 28.10.2015 8:22, Zeljko wrote:




#6  0x00a1bae4 in CREATEFORMCONTENTS (AFORM=0x2c31ef530,
FORMWIDGET=0x2887b8500,
 AWIDGETINFO=0x282a0bb20) at gtk2proc.inc:7485


ah, maybe lineinfo is invalid (not like in trunk), so pls. in that 
function of gtk2proc add gtk_adjustment_new where crash occurs...there 
are 2 places where gtkAdjustment is param.


zeljko


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

Thanks Željko,


so far this changes were made to file 
"lazarus/lcl/interfaces/gtk2/gtk2proc.inc":

---
ScrolledWidget := gtk_scrolled_window_new(PgtkAdjustment( 
gtk_adjustment_new(0, 0, 100, 1, 1, 100)), PgtkAdjustment( 
gtk_adjustment_new(0, 0, 100, 1, 1, 100)));

---
ClientAreaWidget := gtk_layout_new(PgtkAdjustment( gtk_adjustment_new(0, 
0, 100, 1, 1, 100)), PgtkAdjustment( gtk_adjustment_new(0, 0, 100, 1, 1, 
100)));

---
Adjustment := PgtkAdjustment(gtk_adjustment_new(0, 0, 100, 1, 1, 100));
StyleObject^.Widget := gtk_vscrollbar_new(Adjustment);
---
Adjustment := PgtkAdjustment(gtk_adjustment_new(0, 0, 100, 1, 1, 100));
StyleObject^.Widget := gtk_vscrollbar_new(Adjustment);
---

Now when i run lazarus:
--
# ./lazarus
TMainIDE.ParseCmdLineOptions:
  PrimaryConfigPath="/root/.lazarus"
  SecondaryConfigPath="/etc/lazarus"
TApplication.HandleException Access violation
  Stack trace:
  $0002C162501D line 1083 of 
/usr/xenocara/lib/fontconfig/src/../../../dist/fontconfig/src/fcpat.c
[TGtk2WidgetSet.Destroy] WARNING: There are 4 unreleased DCs, a detailed 
dump follows:
[TGtk2WidgetSet.Destroy]  DCs:   00029C834840 00029C834640 
00029C834440 00029C834240
[TGtk2WidgetSet.Destroy] WARNING: There are 6 unreleased GDIObjects, a 
detailed dump follows:
[TGtk2WidgetSet.Destroy]   GDIOs: 00020D32D8C0 00020D32D6C0 
00020D32D640 00020D32D740 00020D32D7C0 00020D32D5C0

[TGtk2WidgetSet.Destroy]   gdiBitmap: 2
[TGtk2WidgetSet.Destroy]   gdiBrush: 1
[TGtk2WidgetSet.Destroy]   gdiFont: 2
[TGtk2WidgetSet.Destroy]   gdiRegion: 1
--

Stack trace:
--
# gdb ./lazarus
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.

Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-unknown-openbsd5.8"...
(gdb) run
Starting program: /root/lazarus/lazarus
TMainIDE.ParseCmdLineOptions:
  PrimaryConfigPath="/root/.lazarus"
  SecondaryConfigPath="/etc/lazarus"

Program received signal SIGBUS, Bus error.
0x000216c7501d in IA__FcPatternBuild (p=0x0)
at 
/usr/xenocara/lib/fontconfig/src/../../../dist/fontconfig/src/fcpat.c:1083
1083 
/usr/xenocara/lib/fontconfig/src/../../../dist/fontconfig/src/fcpat.c: 
No such file or directory.
in 
/usr/xenocara/lib/fontconfig/src/../../../dist/fontconfig/src/fcpat.c

Current language:  auto; currently c
(gdb) bt
#0  0x000216c7501d in IA__FcPatternBuild (p=0x0)
at 
/usr/xenocara/lib/fontconfig/src/../../../dist/fontconfig/src/fcpat.c:1083

#1  0x000253822306 in pango_fc_font_map_load_fontset ()
   from /usr/local/lib/libpangoft2-1.0.so.3600.0
#2  0x0002498afb7b in itemize_state_process_run ()
   from /usr/local/lib/libpango-1.0.so.3600.0
#3  0x0002498b0338 in pango_itemize_with_base_dir ()
   from /usr/local/lib/libpango-1.0.so.3600.0
#4  0x0002498b9884 in pango_layout_check_lines ()
   from /usr/local/lib/libpango-1.0.so.3600.0
#5  0x0002498bab06 in pango_layout_get_extents_internal ()
   from /usr/local/lib/libpango-1.0.so.3600.0
#6  0x0002498bbcf0 in pango_layout_get_pixel_extents ()
   from /usr/local/lib/libpango-1.0.so.3600.0
#7  0x0002498bbd7c in pango_layout_get_pixel_size ()
   from /usr/local/lib/libpango-1.0.so.3600.0
#8  0x00b2ec4f in FONTISDOUBLEBYTECHARSFONT (THEFONT=0x2106c6af0)
at gtk2proc.inc:9221
#9  0x00a306b2 in UPDATEDCTEXTMETRIC (this=0x21dbb6650, 
DC=0x2ada92240)

at gtk2widgetset.inc:5913
#10 0x00a3fd21 in GETTEXTMETRICS (this=0x21dbb6650, 
DC=11503477312, TM=
  {TMHEIGHT = 0, TMASCENT = 2, TMDESCENT = -142768, 
TMINTERNALLEADING = 32639, TMEXTERNALLEADING = 11774192, TMAVECHARWIDTH 
= 0, TMMAXCHARWIDTH = 0, TMWEIGHT = 0, TMOVERHANG = 5, 
TMDIGITIZEDASPECTX = 1, TMDIGITIZEDASPECTY = -1381423040, TMFIRSTCHAR = 
2 '\002', TMLASTCHAR = 0 '\0', TMDEFAULTCHAR = 0 '\0', TMBREAKCHAR = 0 
'\0', TMITALIC = 0 '\0', TMUNDERLINED = 210 'Ň', TMSTRUCKOUT = 253 'ý', 

Re: [Lazarus] is scrypt available?

2015-10-28 Thread taazz

On 27/10/2015 16:18 μμ, wkitt...@windstream.net wrote:

On 10/26/2015 11:59 PM, taazz wrote:

On 26/10/2015 22:56 μμ, wkitt...@windstream.net wrote:

On 10/26/2015 03:31 PM, mic...@gmail.com wrote:

Am Monday 26 October 2015 20:13:49 schrieb wkitt...@windstream.net:

scrypt


http://www.wolfgang-ehrhardt.de/crchash_en.html


the license on that one is too restrictive :(


What is so restrictive about zlib?


where do you see anything about zlib?


in the page linked first paragraph/line from the top
[quote]
Here you find a few Pascal / Delphi source and binary files related to 
CRC, hash, and HMAC calculations. All files can be used and distributed 
under this license 
, the original 
template of the zlib/libpng license can be found here: zlib-license 
.

[/quote]

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


Re: [Lazarus] OpenBSD 5.8 64bit - lazarus - exception

2015-10-28 Thread Zeljko



On 10/28/2015 11:28 AM, Tomaž Žveglič wrote:


 at
/usr/xenocara/lib/fontconfig/src/../../../dist/fontconfig/src/fcpat.c:1083
#1  0x000253822306 in pango_fc_font_map_load_fontset ()
from /usr/local/lib/libpangoft2-1.0.so.3600.0
#2  0x0002498afb7b in itemize_state_process_run ()
from /usr/local/lib/libpango-1.0.so.3600.0
#3  0x0002498b0338 in pango_itemize_with_base_dir ()
from /usr/local/lib/libpango-1.0.so.3600.0
#4  0x0002498b9884 in pango_layout_check_lines ()
from /usr/local/lib/libpango-1.0.so.3600.0
#5  0x0002498bab06 in pango_layout_get_extents_internal ()
from /usr/local/lib/libpango-1.0.so.3600.0
#6  0x0002498bbcf0 in pango_layout_get_pixel_extents ()
from /usr/local/lib/libpango-1.0.so.3600.0
#7  0x0002498bbd7c in pango_layout_get_pixel_size ()
from /usr/local/lib/libpango-1.0.so.3600.0
#8  0x00b2ec4f in FONTISDOUBLEBYTECHARSFONT (THEFONT=0x2106c6af0)
 at gtk2proc.inc:9221



Seem that nil params kills openbsd 64. Go to FontIsDoubleByteCharsFont() 
in gtk2proc.inc and add dummy integers to null params.

var
  SingleCharLen, DoubleCharLen, DummyCharHeight {added}: integer;
begin
  pango_layout_set_single_paragraph_mode(TheFont, TRUE);
  pango_layout_set_width(TheFont, -1);
  pango_layout_set_text(TheFont, 'A', 1);
  pango_layout_get_pixel_size(TheFont, @SingleCharLen, @DummyCharHeight);
  pango_layout_set_text(TheFont, #0'A', 2);
  pango_layout_get_pixel_size(TheFont, @DoubleCharLen, @DummmyCharHeight);
  Result:=(SingleCharLen=0) and (DoubleCharLen>0);
end;

now test

zeljko



#9  0x00a306b2 in UPDATEDCTEXTMETRIC (this=0x21dbb6650,
DC=0x2ada92240)
 at gtk2widgetset.inc:5913
#10 0x00a3fd21 in GETTEXTMETRICS (this=0x21dbb6650,
DC=11503477312, TM=
   {TMHEIGHT = 0, TMASCENT = 2, TMDESCENT = -142768,
TMINTERNALLEADING = 32639, TMEXTERNALLEADING = 11774192, TMAVECHARWIDTH
= 0, TMMAXCHARWIDTH = 0, TMWEIGHT = 0, TMOVERHANG = 5,
TMDIGITIZEDASPECTX = 1, TMDIGITIZEDASPECTY = -1381423040, TMFIRSTCHAR =
2 '\002', TMLASTCHAR = 0 '\0', TMDEFAULTCHAR = 0 '\0', TMBREAKCHAR = 0
'\0', TMITALIC = 0 '\0', TMUNDERLINED = 210 'Ň', TMSTRUCKOUT = 253 'ý',
TMPITCHANDFAMILY = 255 '˙', TMCHARSET = 127 '\177'}) at gtk2winapi.inc:5988
#11 0x00a36e87 in DRAWTEXT (this=0x21dbb6650, DC=11503477312,
 STR=0x1cc4c90 "1.4.4", COUNT=5, RECT=
 {LEFT = 0, TOP = 281, RIGHT = 450, BOTTOM = 300, TOPLEFT = {X =
0, Y = 281}, BOTTOMRIGHT = {X = 450, Y = 300}}, FLAGS=3109) at
gtk2winapi.inc:2717
#12 0x009c9c13 in DRAWTEXT (DC=11503477312, STR=0x1cc4c90 "1.4.4",
 COUNT=5, RECT=
 {LEFT = 0, TOP = 281, RIGHT = 450, BOTTOM = 300, TOPLEFT = {X =
0, Y = 281}, BOTTOMRIGHT = {X = 450, Y = 300}}, FLAGS=3109) at
winapi.inc:210
#13 0x009bd87f in TEXTRECT (this=0x282cc6f40, ARECT=
 {LEFT = 0, TOP = 281, RIGHT = 450, BOTTOM = 300, TOPLEFT = {X =
0, Y = 281}, BOTTOMRIGHT = {X = 450, Y = 300}}, X=0, Y=281,
TEXT=0x1cc4c90 "1.4.4",
 STYLE=
---Type  to continue, or q  to quit---
   {ALIGNMENT = TACENTER, LAYOUT = TLCENTER, SINGLELINE = true,
CLIPPING = true, EXPANDTABS = false, SHOWPREFIX = false, WORDBREAK =
false, OPAQUE = false, SYSTEMFONT = false, RIGHTTOLEFT = false,
ENDELLIPSIS = false})
 at canvas.inc:1302
#14 0x008aad8b in IMAGEPAINT (this=0x260be6df0, SENDER=0x260be9c70)
 at splash.pp:118
#15 0x00aa3761 in PAINT (this=0x260be9c70) at graphiccontrol.inc:90
#16 0x00b0e469 in PAINT (this=0x260be9c70) at customimage.inc:226
#17 0x00aa363f in WMPAINT (this=0x260be9c70, MESSAGE=
   {MSG = 15, UNUSEDMSG = 2, DC = 11503477312, PAINTSTRUCT = 0x0,
RESULT = 0}) at graphiccontrol.inc:58
#18 0x00849589 in SYSTEM_TOBJECT_$__DISPATCH$formal ()
#19 0x00aa3568 in CONTROLS_TGRAPHICCONTROL_$__DESTROY ()
 at customcontrol.inc:22
#20 0x00a9649d in PERFORM (this=0x260be9c70, MSG=15,
 WPARAM=11503477312, LPARAM=0) at control.inc:1451
#21 0x00a86f67 in PAINTCONTROLS (this=0x260be6df0, DC=11503477312,
 FIRST=0x0) at wincontrol.inc:4867
#22 0x00a86d1e in PAINTHANDLER (this=0x260be6df0, THEMESSAGE=
   {MSG = 15, UNUSEDMSG = 0, DC = 11503477312, PAINTSTRUCT =
0x244dc0300, RESULT = 0}) at wincontrol.inc:4779
#23 0x00a8b5d5 in WMPAINT (this=0x260be6df0, MSG=
   {MSG = 15, UNUSEDMSG = 0, DC = 11503477312, PAINTSTRUCT =
0x244dc0300, RESULT = 0}) at wincontrol.inc:6684
#24 0x00aa3cab in WMPAINT (this=0x260be6df0, MESSAGE=
   {MSG = 15, UNUSEDMSG = 0, DC = 11503477312, PAINTSTRUCT =
0x244dc0300, RESULT = 0}) at customcontrol.inc:106
#25 0x00849589 in SYSTEM_TOBJECT_$__DISPATCH$formal ()
#26 0x00aa3c60 in CONTROLS_TCUSTOMCONTROL_$__WSREGISTERCLASS ()
 at dockzone.inc:16
#27 0x00a887e1 in WNDPROC (this=0x260be6df0, MESSAGE=
   {MSG = 15, UNUSEDMSG = 0, WPARAM = 11503477312, LPARAM =
9745203968, RESULT = 0}) at wincontrol.inc:5341
#28 0x00884a10 in WNDPROC 

Re: [Lazarus] How to create a non focusable form?

2015-10-28 Thread Gabor Boros

2015.10.28. 10:59 keltezéssel, Zeljko írta:


Please test with attached patch and give feedback. Note that this patch
is tested under Qt X11 only.

zeljko


With the original example works but...

Modified the example...

procedure TForm1.Button1Click(Sender: TObject);
var
  MyForm:TMyForm;

begin
  MyForm:=TMyForm.CreateNew(Nil);
  with TButton.Create(MyForm) do Parent:=MyForm;
  MyForm.Show;
end;

The button appear on the form only if modify ControlStyle in the example 
from


ControlStyle:=ControlStyle+[csNoFocus,csNoStdEvents]-[csCaptureMouse,csClickEvents];

 to

ControlStyle:=ControlStyle+[csNoFocus]-[csCaptureMouse,csClickEvents];

(csNoStdEvents removed) but after form grab focus if click on it or 
click on the button.


Gabor

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


Re: [Lazarus] How to create a non focusable form?

2015-10-28 Thread Zeljko



On 10/28/2015 11:43 AM, Gabor Boros wrote:

2015.10.28. 10:59 keltezéssel, Zeljko írta:


Please test with attached patch and give feedback. Note that this patch
is tested under Qt X11 only.

zeljko


With the original example works but...

Modified the example...

procedure TForm1.Button1Click(Sender: TObject);
var
   MyForm:TMyForm;

begin
   MyForm:=TMyForm.CreateNew(Nil);
   with TButton.Create(MyForm) do Parent:=MyForm;
   MyForm.Show;
end;

The button appear on the form only if modify ControlStyle in the example
from

ControlStyle:=ControlStyle+[csNoFocus,csNoStdEvents]-[csCaptureMouse,csClickEvents];


  to

ControlStyle:=ControlStyle+[csNoFocus]-[csCaptureMouse,csClickEvents];


I'll check that. csNoStdEvent is passed to form inside Qt widgetset



(csNoStdEvents removed) but after form grab focus if click on it or
click on the button.


Ok, then go to QtWSForms, TQtWSCustomForms.UpdateWindowFlags and comment 
if csNoStdEvents . leave only

Flags := Flags or QtX11BypassWindowManagerHint;

in this case form will not take focus in any case, but must see what 
happens with parenting (button is not visible because of this param I 
guess).


zeljko

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