Re: [Lazarus] Type helper now work with CodeTools?

2015-10-18 Thread Sven Barth
Am 18.10.2015 23:13 schrieb "Anthony Walter" :
>
> Just to be clear, when we're talking about dynamic packages we mean being
able to:
>
> A) compile and install package into the IDE without rebuilding the entire
IDE
> and
> B) load and unload pkg package files in apps while they're running and
access new classes/objects and their RTTI?

Yes to both. Though point A will additionally require quite some work in
the IDE (which won't be my part, though I'll provide helpful information
where possible ^^ ).

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


Re: [Lazarus] What does make install do?

2015-10-18 Thread Bo Berglund
On Sun, 18 Oct 2015 10:01:40 +, Mark Morgan Lloyd
 wrote:

>I've already pointed you at the relevant xdg utility, but quite frankly 
>I wonder why I bother.
>

I do not see how me changing the operating system way of displaying
menus to another system would help. I looked up the xdg here:
http://standards.freedesktop.org/menu-spec/menu-spec-latest.html

And that was not really understandable for me.


-- 
Bo Berglund
Developer in Sweden


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


Re: [Lazarus] What does make install do?

2015-10-18 Thread Bo Berglund
On Sun, 18 Oct 2015 07:54:54 -0400, wkitt...@windstream.net wrote:

>the problem here is that now you've broken the install for other users since 
>they do not have access to your home directory... remember that a default 
>install needs to be usable by all users... a private install is only for the 
>one 
>user... you should create a new private link for your menus that points to 
>your 
>private installation...

I don't think so. Everyone seems to have xr or x access to use
lazarus:

-rwxr-xr-x  1 pi pi 221208688 Oct 15 21:21 lazarus
drwxr-xr-x  3 pi pi  4096 Oct 14 22:39 lazarus.app
-rwxr-xr-x  1 pi pi  69021112 Oct 15 21:10 lazbuild
drwxr-xr-x 12 pi pi  4096 Oct 15 21:05 lcl
-rw-r--r--  1 pi pi  2011 Oct 14 22:39 localize.bat
-rwxr-xr-x  1 pi pi  1240 Oct 14 22:37 localize.sh
-rw-r--r--  1 pi pi 93471 Oct 14 22:37 Makefile
-rw-r--r--  1 pi pi 14923 Oct 14 22:38 Makefile.fpc
drwxr-xr-x  6 pi pi  4096 Oct 15 21:04 packager
-rw-r--r--  1 pi pi  2727 Oct 14 22:37 README.txt
-rwxr-xr-x  1 pi pi  27797480 Oct 15 21:21 startlazarus

In any case there are no other users on most RPi systems...


-- 
Bo Berglund
Developer in Sweden


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


Re: [Lazarus] Type helper now work with CodeTools?

2015-10-18 Thread Dmitry Boyarintsev
On Sun, Oct 18, 2015 at 11:06 AM, Sven Barth 
wrote:
>
> Currently there is this restriction, yes, but I do plan to add a
> modeswitch that will rectify that, I just need to plan how overload
> resolution should work.
>
I'm sure it has been discussed already in other threads, but are you going
to allow to explicitly specify the helper which method needs to be called
(in case of the ambiguity) ?

i.e.
uses
  ..myhelpers, code.codebot, ..

TMyClassHelper(obj).AsString;
Cross.CodeBot.StringHelper(obj).AsString

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


Re: [Lazarus] Type helper now work with CodeTools?

2015-10-18 Thread Michael Van Canneyt



On Sun, 18 Oct 2015, Anthony Walter wrote:


Just to be clear, when we're talking about dynamic packages we mean being
able to:

A) compile and install package into the IDE without rebuilding the entire
IDE
and
B) load and unload pkg package files in apps while they're running and
access new classes/objects and their RTTI?


Yes.

Michael.

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


Re: [Lazarus] Type helper now work with CodeTools?

2015-10-18 Thread Anthony Walter
Just to be clear, when we're talking about dynamic packages we mean being
able to:

A) compile and install package into the IDE without rebuilding the entire
IDE
and
B) load and unload pkg package files in apps while they're running and
access new classes/objects and their RTTI?
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Type helper now work with CodeTools?

2015-10-18 Thread Sven Barth
Am 18.10.2015 17:20 schrieb "Mattias Gaertner" :
>
> On Sun, 18 Oct 2015 17:06:08 +0200
> Sven Barth  wrote:
>
> >[...]
> > > Only one of them will work, but you can use helpers inheritance.
> > >
> > > http://www.freepascal.org/docs-html/ref/refse57.html#x114-12400010.5
> >
> > Currently there is this restriction, yes, but I do plan to add a
modeswitch
> > that will rectify that, I just need to plan how overload resolution
should
> > work.
>
> That's boring.
> Dynamic packages are more fun. ;)

I need some breather topics between all that hardcore generics and packages
stuff :P

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


Re: [Lazarus] Type helper now work with CodeTools?

2015-10-18 Thread Sven Barth
Am 18.10.2015 17:34 schrieb "Mattias Gaertner" :
>
> On Sun, 18 Oct 2015 17:03:33 +0200
> Sven Barth  wrote:
>
> >[...]
> > Yes. I especially adjusted the compiler to handle this correctly (in
light
> > of floating point constants). Sidenote: the compiler also supports
floating
> > point numbers with an without "e" to have type helper method calls.
> > "True" and "False" as well by the way.
> > Best take a look at the tests we have (tests/test/tthlp*.pp), especially
> > tthlp4.pp which deals with constants.
>
> Is this Delphi compatible?

Aside from potential bugs or oversights it is.

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


Re: [Lazarus] Type helper now work with CodeTools?

2015-10-18 Thread Mattias Gaertner
On Sun, 18 Oct 2015 17:03:33 +0200
Sven Barth  wrote:

>[...]
> Yes. I especially adjusted the compiler to handle this correctly (in light
> of floating point constants). Sidenote: the compiler also supports floating
> point numbers with an without "e" to have type helper method calls.
> "True" and "False" as well by the way.
> Best take a look at the tests we have (tests/test/tthlp*.pp), especially
> tthlp4.pp which deals with constants.

Is this Delphi compatible?

Mattias

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


Re: [Lazarus] Patch for TTrayIcon on Ubuntu's Unity

2015-10-18 Thread Luca Olivetti

El 12/10/15 a les 17:53, Anthony Walter ha escrit:

In fact I checked your code and it only tries to load libappindicator if
XDG_CURRENT_DESKTOP is Unity. With that variable set I can see the tray
icon (note that its normal value is KDE).

That's good then. I added 'KDE' to the allowed desktops when
libappindicator is present with the Gtk2 toolkit. I also recompiled the
64bit example program with this change and overwrote it in the
repository. So now if the fix it should also work on KDE, given
XDG_CURRENT_DESKTOP returns 'KDE'.

Thank for the link as well. It would seem, reading the information in
the link you posted, that Gtk3 uses libappindicator3-1. If anyone
actively is working on adding to Gtk3 lcl interface you may want to
consider looking at and copying some of the code I committed to github.



FYI, just saw this:

http://blog.davidedmundson.co.uk/blog/xembed_back

(from https://lists.debian.org/debian-kde/2015/10/msg00047.html)

Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007

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


Re: [Lazarus] Type helper now work with CodeTools?

2015-10-18 Thread Mattias Gaertner
On Sun, 18 Oct 2015 17:06:08 +0200
Sven Barth  wrote:

>[...]
> > Only one of them will work, but you can use helpers inheritance.
> >
> > http://www.freepascal.org/docs-html/ref/refse57.html#x114-12400010.5
> 
> Currently there is this restriction, yes, but I do plan to add a modeswitch
> that will rectify that, I just need to plan how overload resolution should
> work.

That's boring.
Dynamic packages are more fun. ;)

Mattias

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


Re: [Lazarus] Something goes wrong while streaming nested components

2015-10-18 Thread Mattias Gaertner
On Sat, 17 Oct 2015 15:18:12 +0700
Kiên Nguyễn Tiến Trung  wrote:

> I have been successful to save a component to a text file. However, I have
> a problem while reading them back.
> 
> To illustrate, this is the text file created by saving the components.
> 
> object Parent1: TParentClass
>   Child = Child
>   Value = 54
>   Str = 'SP'
>   List.Strings = (
> 'PV'
>   )
>   object Child: TChildClass
> Value = 85
> Str = 'WO'
> List.Strings = (
>   'QL'
> )
>   end
> end
> 
> When I load the component Parent1 using this file, properties Value, Str,
> and List are loaded successfully. *However, the property Child is not
> loaded.*

Actually it is created and loaded.

 
> It seems that there is a TChildClass object created and then increases the
> ComponentCount of Parent1. But it is not what I want. I want the property
> Child be loaded instead of creating a new object.

If I remember correctly you need

Child.ComponentStyle:=Child.ComponentStyle+[csSubComponent];


Mattias

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


Re: [Lazarus] Type helper now work with CodeTools?

2015-10-18 Thread Sven Barth
Am 18.10.2015 16:24 schrieb "Dmitry Boyarintsev" :
>
>
>
> On Sun, Oct 18, 2015 at 10:11 AM, Anthony Walter  wrote:
>>
>> A question, are type helpers limited to one per type? That is to say, if
I write a "type MyStringHelper = record helper for string" and Michael adds
a "type LazStringHelper = record helper for string" in SysUtils, will only
one of them work when I have both units added to the my uses clauses of
another unit?
>
>
> Only one of them will work, but you can use helpers inheritance.
>
> http://www.freepascal.org/docs-html/ref/refse57.html#x114-12400010.5

Currently there is this restriction, yes, but I do plan to add a modeswitch
that will rectify that, I just need to plan how overload resolution should
work.

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


Re: [Lazarus] Type helper now work with CodeTools?

2015-10-18 Thread Sven Barth
Am 18.10.2015 16:07 schrieb "Mattias Gaertner" :
>
> On Sat, 17 Oct 2015 09:28:53 +0200
> Sven Barth  wrote:
> > > It still looks strange to me.
> >
> > Well... It's a logical extension of the type helpers however (and Delphi
> > compatible). The only critical part is that literal constants don't
have a
> > type per se and thus the chosen helper might be different :/ (e.g. an
Int16
> > helper when one expected an Int32 one or so...)
>
> Does the compiler support 3.member?

Yes. I especially adjusted the compiler to handle this correctly (in light
of floating point constants). Sidenote: the compiler also supports floating
point numbers with an without "e" to have type helper method calls.
"True" and "False" as well by the way.
Best take a look at the tests we have (tests/test/tthlp*.pp), especially
tthlp4.pp which deals with constants. The follow up tests also deal with
the different String types combined with mode switches.

Oh and there are also class methods that can be called on both the values
as well as the type names, just like on classes and records (don't know
whether the CodeTools support these for helpers yet).

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


Re: [Lazarus] Type helper now work with CodeTools?

2015-10-18 Thread Mattias Gaertner
On Sat, 17 Oct 2015 09:41:34 +0200
Ondrej Pokorny  wrote:

>[...]
> -> doesn't work for me. (I am not sure if it is a regression, though. I 
> don't remember everything. Nevertheless, it should work.)

You almost implemented it.
Now it works.

Mattias

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


Re: [Lazarus] Hiding Warnings from a specific directory

2015-10-18 Thread Mattias Gaertner
On Sat, 17 Oct 2015 11:45:22 -0300
Alexsander Rosa  wrote:

> I mean: is there a lazreport-only -vm option, like -vmXXX(lazreport)?
> Because this "*Additions and Overrides*" applies to my entire project,
> AFAIK. And I tried to open the "Compiler options for Package lazreport" and
> there's no "*Additions and Overrides*"...

Packages don't have "Additions and Overrides" by design.

Projects use packages and can override their settings.

http://wiki.lazarus.freepascal.org/IDE_Window:_Compiler_Options#Add_a_flag_to_one_package_without_altering_the_lpk_itself

Mattias

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


Re: [Lazarus] Type helper now work with CodeTools?

2015-10-18 Thread Dmitry Boyarintsev
On Sun, Oct 18, 2015 at 10:11 AM, Anthony Walter  wrote:

> A question, are type helpers limited to one per type? That is to say, if I
> write a "type MyStringHelper = record helper for string" and Michael adds a
> "type LazStringHelper = record helper for string" in SysUtils, will only
> one of them work when I have both units added to the my uses clauses of
> another unit?
>

Only one of them will work, but you can use helpers inheritance.

http://www.freepascal.org/docs-html/ref/refse57.html#x114-12400010.5

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


Re: [Lazarus] Type helper now work with CodeTools?

2015-10-18 Thread Anthony Walter
Also FWIW:

https://github.com/sysrpl/Cross.Codebot/blob/master/source/codebot.system.pas#L401
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Type helper now work with CodeTools?

2015-10-18 Thread Anthony Walter
A question, are type helpers limited to one per type? That is to say, if I
write a "type MyStringHelper = record helper for string" and Michael adds a
"type LazStringHelper = record helper for string" in SysUtils, will only
one of them work when I have both units added to the my uses clauses of
another unit?
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Type helper now work with CodeTools?

2015-10-18 Thread Mattias Gaertner
On Sat, 17 Oct 2015 09:28:53 +0200
Sven Barth  wrote:

> Am 16.10.2015 23:45 schrieb "Mattias Gaertner" :
> > > bug 28861  if a type
> helper
> > > exists for a literal value code insight throws an access violation
> > > Example: 'Hello'. // throws an access violation after the dot
> >
> > The 'Hello'. was not yet implemented. I it is now.
> 
> Also for numbers and enums?

longint.member works.
enum.member does not. Did that work Ondrej?

 
> > It still looks strange to me.
> 
> Well... It's a logical extension of the type helpers however (and Delphi
> compatible). The only critical part is that literal constants don't have a
> type per se and thus the chosen helper might be different :/ (e.g. an Int16
> helper when one expected an Int32 one or so...)

Does the compiler support 3.member?

Mattias


Mattias

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


Re: [Lazarus] Video: Color Picker ... and a question

2015-10-18 Thread Anthony Walter
Thanks for the replies. I'll continue to search for workarounds on
Linux/Gtk and if I find anything useful I'll post about it and also add it
to my github library.

And in case anyone is interested, here is the Linux/Gtk system I wrote to
handle global hotkeys (which works perfectly):

https://github.com/sysrpl/Cross.Codebot/blob/master/source/codebot.input.hotkeys.pas

Ondrej, notice the dotted namespaces ... thanks for your CodeTools
contributions.

And by the way, what's the status of integrating my patch for Unity's tray
icon problems?

https://github.com/sysrpl/Lazarus.UnityAppIndicators
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] What does make install do?

2015-10-18 Thread wkitty42

On 10/18/2015 04:40 AM, Bo Berglund wrote:

Then I examined what had happened and I found that the install script
had copied a number of files including lazarus executables to
/usr/local/share/lazarus and the symlinks in /usr/local/bin were
pointing to these executables effectively decoupling the lazarus
installation in the /home/pi tree from use!
The copied executables amounted to 318 MB so that is the cause for the
pauses during the script execution...

To fix this so the lazarus located in the pi home would still be used
I changed the symlinks back to point there by running these commands
from within /usr/local/bin:


the problem here is that now you've broken the install for other users since 
they do not have access to your home directory... remember that a default 
install needs to be usable by all users... a private install is only for the one 
user... you should create a new private link for your menus that points to your 
private installation...


--
 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] What does make install do?

2015-10-18 Thread Mark Morgan Lloyd

Bo Berglund wrote:

On Sun, 18 Oct 2015 10:54:32 +0200 (CEST), Michael Van Canneyt
 wrote:


Then I examined what had happened and I found that the install script
had copied a number of files including lazarus executables to
/usr/local/share/lazarus and the symlinks in /usr/local/bin were
pointing to these executables effectively decoupling the lazarus
installation in the /home/pi tree from use!

That is the intention.


So in essence what could be done to install Lazarus in Raspbian Jessie
is to use the make install command as su but then adjust it by
changing the symlinks back to the true installation directory in the
home tree.

Usually that is NOT what you want in a default install.



Well, Juha in an earlier post seem to indicate that one should keep
Lazarus in ones home dir and use it from there too...


Yes, I was about to mention that.


But he did not mention make install of course.
I needed that to get a way to make Lazarus visible on the start menu.


I've already pointed you at the relevant xdg utility, but quite frankly 
I wonder why I bother.



Anyway I now examined more and found that the install actually copied
970 MB worth of data to /usr/local/share/lazarus...
Probably the entire chunk of files.


--
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] What does make install do?

2015-10-18 Thread Michael Van Canneyt



On Sun, 18 Oct 2015, Bo Berglund wrote:


On Sun, 18 Oct 2015 10:54:32 +0200 (CEST), Michael Van Canneyt
 wrote:


Then I examined what had happened and I found that the install script
had copied a number of files including lazarus executables to
/usr/local/share/lazarus and the symlinks in /usr/local/bin were
pointing to these executables effectively decoupling the lazarus
installation in the /home/pi tree from use!


That is the intention.



So in essence what could be done to install Lazarus in Raspbian Jessie
is to use the make install command as su but then adjust it by
changing the symlinks back to the true installation directory in the
home tree.


Usually that is NOT what you want in a default install.



Well, Juha in an earlier post seem to indicate that one should keep
Lazarus in ones home dir and use it from there too...


It depends on the intention.

"make install" is intended to install something system-wide. That is it's 
function.
In this case, you must copy all files.

If you just want a private copy of Lazarus to appear in your menu, this is 
another intention.
It's probably easier to configure the menu yourself, or easier yet, create an 
icon on the desktop.

Michael.

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


Re: [Lazarus] What does make install do?

2015-10-18 Thread Bo Berglund
On Sun, 18 Oct 2015 10:54:32 +0200 (CEST), Michael Van Canneyt
 wrote:

>> Then I examined what had happened and I found that the install script
>> had copied a number of files including lazarus executables to
>> /usr/local/share/lazarus and the symlinks in /usr/local/bin were
>> pointing to these executables effectively decoupling the lazarus
>> installation in the /home/pi tree from use!
>
>That is the intention.
>
>>
>> So in essence what could be done to install Lazarus in Raspbian Jessie
>> is to use the make install command as su but then adjust it by
>> changing the symlinks back to the true installation directory in the
>> home tree.
>
>Usually that is NOT what you want in a default install.
>

Well, Juha in an earlier post seem to indicate that one should keep
Lazarus in ones home dir and use it from there too...
But he did not mention make install of course.
I needed that to get a way to make Lazarus visible on the start menu.

Anyway I now examined more and found that the install actually copied
970 MB worth of data to /usr/local/share/lazarus...
Probably the entire chunk of files.


-- 
Bo Berglund
Developer in Sweden


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


Re: [Lazarus] WinCE call for testers

2015-10-18 Thread patspiper

On 15/10/15 11:20, patspiper wrote:

Hi,

The bug reporting/testing/fixing cycle for WinCE has been severely 
impacted by the ever dwindling number of WinCE users. I therefore ask 
all interested users to identify themselves so that we are able to 
communicate more closely in order to test/apply provided patches, 
especially that what may work for one device and use case might not 
work somewhere else or even break something else in other use cases.


7 interested users including me is a start :)

I have added test projects to a few WinCE bug reports (2 of these 
reports include patches). Pls test and report in mantis.


http://bugs.freepascal.org/view.php?id=25966
http://bugs.freepascal.org/view.php?id=23698
http://bugs.freepascal.org/view.php?id=27921
http://bugs.freepascal.org/view.php?id=17098
http://bugs.freepascal.org/view.php?id=21282

Stephano

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


Re: [Lazarus] Video: Color Picker ... and a question

2015-10-18 Thread Ondrej Pokorny

On 18.10.2015 10:47, Anthony Walter wrote:
Michael, I apologize if I wasn't clear. The problems wasn't shortcut 
keys, rather it is showing an application window and bringing it to 
the foreground when your application isn't the active graphical 
application.


That is to say, for example, suppose you had a timer set to 3 minutes. 
Is there a way to activate your application and bring it to the 
foreground when the timer expires? How can applications bring 
themselves to the foreground on recent Gtk based desktops?


That would be interesting also for the "single Lazarus IDE" I developed 
recently. I was able to do it on Windows but not Linux/Gtk2. On Linux 
Lazarus IDE doesn't come up in the front, it only highlights the 
application bar button. But as Michael said, it's only possible if the 
window manager allows it.


Ondrej

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


Re: [Lazarus] What does make install do?

2015-10-18 Thread Michael Van Canneyt



On Sun, 18 Oct 2015, Bo Berglund wrote:


On Sat, 17 Oct 2015 11:13:11 +0200 (CEST), Michael Van Canneyt
 wrote:

But there is also a command
make install

What exactly does this do (in a Debian Jessie derivative environment)


You can see this easily for yourself by adding the -n option:


home: >make -n install

...


It seems lazarus is added to the start menu, from the line:

/usr/bin/install -c -m 644 install/lazarus.desktop 
/usr/local/share/applications/lazarus.desktop



I have tested it now with the following base data:
- Lazarus sources checked out to /home/pi/development/lazarus
- time make bigide executed inside the lazarus dir
- I deleted whatever I could find that put Lazarus on the Menu
 (this included the data in /home/pi/.local and /usr/local/share)
- verified that Lazarus was now gone from the start Menu

I realized that since make install sends stuff to /usr/local/share it
needed to be run as su so I did this:

sudo make install

This ran for a while with stops at a few commands but eventually
finished.
At this point Lazarus had returned to the start Menu below Programming
as it should. It could be started and looked OK.

Then I examined what had happened and I found that the install script
had copied a number of files including lazarus executables to
/usr/local/share/lazarus and the symlinks in /usr/local/bin were
pointing to these executables effectively decoupling the lazarus
installation in the /home/pi tree from use!


That is the intention.



So in essence what could be done to install Lazarus in Raspbian Jessie
is to use the make install command as su but then adjust it by
changing the symlinks back to the true installation directory in the
home tree.


Usually that is NOT what you want in a default install.

Michael.

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


Re: [Lazarus] Video: Color Picker ... and a question

2015-10-18 Thread Michael Van Canneyt



On Sun, 18 Oct 2015, Anthony Walter wrote:


Michael, I apologize if I wasn't clear. The problems wasn't shortcut keys,
rather it is showing an application window and bringing it to the
foreground when your application isn't the active graphical application.


I understood. And that is what I answered to.

The fact that only the window manager can implement 
such a shortcut is a consequence from this.


Michael.

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


Re: [Lazarus] Video: Color Picker ... and a question

2015-10-18 Thread Anthony Walter
Michael, I apologize if I wasn't clear. The problems wasn't shortcut keys,
rather it is showing an application window and bringing it to the
foreground when your application isn't the active graphical application.

That is to say, for example, suppose you had a timer set to 3 minutes. Is
there a way to activate your application and bring it to the foreground
when the timer expires? How can applications bring themselves to the
foreground on recent Gtk based desktops?
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] What does make install do?

2015-10-18 Thread Bo Berglund
On Sat, 17 Oct 2015 11:13:11 +0200 (CEST), Michael Van Canneyt
 wrote:
>> But there is also a command
>> make install
>>
>> What exactly does this do (in a Debian Jessie derivative environment)
>
>You can see this easily for yourself by adding the -n option:
>
>
>home: >make -n install
...
>
>It seems lazarus is added to the start menu, from the line:
>
>/usr/bin/install -c -m 644 install/lazarus.desktop 
>/usr/local/share/applications/lazarus.desktop
>

I have tested it now with the following base data:
- Lazarus sources checked out to /home/pi/development/lazarus
- time make bigide executed inside the lazarus dir
- I deleted whatever I could find that put Lazarus on the Menu
  (this included the data in /home/pi/.local and /usr/local/share)
- verified that Lazarus was now gone from the start Menu

I realized that since make install sends stuff to /usr/local/share it
needed to be run as su so I did this:

sudo make install

This ran for a while with stops at a few commands but eventually
finished.
At this point Lazarus had returned to the start Menu below Programming
as it should. It could be started and looked OK.

Then I examined what had happened and I found that the install script
had copied a number of files including lazarus executables to
/usr/local/share/lazarus and the symlinks in /usr/local/bin were
pointing to these executables effectively decoupling the lazarus
installation in the /home/pi tree from use!
The copied executables amounted to 318 MB so that is the cause for the
pauses during the script execution...

To fix this so the lazarus located in the pi home would still be used
I changed the symlinks back to point there by running these commands
from within /usr/local/bin:

sudo su
ln -sf /home/pi/development/lazarus/lazarus lazarus-ide
ln -sf /home/pi/development/lazarus/lazbuild lazbuild
ln -sf /home/pi/development/lazarus/tools/lazres lazres
ln -sf /home/pi/development/lazarus/tools/lrstolfm lrstolfm
ln -sf /home/pi/development/lazarus/startlazarus startlazarus
ln -sf /home/pi/development/lazarus/tools/updatepofiles updatepofiles
exit

Again checked that the Lazarus entry on the start Menu worked as
expected and it did.

So in essence what could be done to install Lazarus in Raspbian Jessie
is to use the make install command as su but then adjust it by
changing the symlinks back to the true installation directory in the
home tree.


-- 
Bo Berglund
Developer in Sweden


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


Re: [Lazarus] Video: Color Picker ... and a question

2015-10-18 Thread Michael Van Canneyt



On Sun, 18 Oct 2015, Anthony Walter wrote:


I wrote a class to support for global hotkeys on both Linux and Windows.

http://cache.getlazarus.org/video/colormix.mp4

In the video a color picker is activated anywhere when you press a global
hotkey allow you to freeze the screen and use the mouse pick a color from
any pixel on your display.

BUT there was a huge problem:

It seems near impossible for an app on my Ubuntu with Unity distro (and
possibly other Linux distros) to bring an application to the foreground
without direct interaction from the user.

Just to be clear, I was completely unable to programatically activate my
app and send it to the front. I had to reset to a nasty cheat to get what
you see in the video working (my app isn't actually activated after the
pick color hotkey is pressed).

So my question is, on a Linux system using recent Gtk libraries, what is
the definitive way to take the focus away from another application, show my
application window, and bring it to the foreground in an active and focused
state?


Roughly said:
There is none that is guaranteed to work. You are at the mercy of the window 
manager.
To my knowledge only the window manager, and it alone, can implement such 
shortcut keys.

Michael.

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


[Lazarus] Video: Color Picker ... and a question

2015-10-18 Thread Anthony Walter
I wrote a class to support for global hotkeys on both Linux and Windows.

http://cache.getlazarus.org/video/colormix.mp4

In the video a color picker is activated anywhere when you press a global
hotkey allow you to freeze the screen and use the mouse pick a color from
any pixel on your display.

BUT there was a huge problem:

It seems near impossible for an app on my Ubuntu with Unity distro (and
possibly other Linux distros) to bring an application to the foreground
without direct interaction from the user.

Just to be clear, I was completely unable to programatically activate my
app and send it to the front. I had to reset to a nasty cheat to get what
you see in the video working (my app isn't actually activated after the
pick color hotkey is pressed).

So my question is, on a Linux system using recent Gtk libraries, what is
the definitive way to take the focus away from another application, show my
application window, and bring it to the foreground in an active and focused
state?

Application.BringToFront didn't work for me on my system.
gtk_window_present didn't work for me on my system.
A lot of other things didn't work.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus