[Lazarus] Question about modal forms behaviour under windows

2016-02-08 Thread zeljko

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


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

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


zeljko


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


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

2016-02-08 Thread zeljko

On 02/08/2016 11:28 AM, Graeme Geldenhuys wrote:

On 2016-02-08 10:24, zeljko wrote:

Some window managers (eg JWM and xfce AFAIR) refuse to show minimize
button on modal windows.


I do fully understand that X11 window manager can decide to to show and
what not to show

But, fpGUI's modal dialogs show the minimize button under JWM. The same
system I run Lazarus on. So this doesn't seem to be a window manager
(JWM in this case) feature or issue.


fpgui is using libX11, not gtk2 or qt afair, so rules are different.

zeljko


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


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

2016-02-08 Thread zeljko

On 02/08/2016 11:00 AM, Ondrej Pokorny wrote:

On 08.02.2016 10:46, zeljko wrote:

2.Change default behaviour - minimized modal form minimizes complete
app. I like how it works under X11  eg minimizing Lazarus About
dialog under KDE kwin, minimizes complete app, clicking on app in
tray, restores app.


Delphi does the same - if you hit minimize on a modal form, it minimizes
the whole application. IMO this is the only correct way.


Thanks Ondrej. That's exactly what I want to know. I'll open an issue 
about it, since it affects win32 and qt-win32 (tested last night with 
lazarus trunk, fpc-3.0.0 on windows7). Question is only where to 
implement this platform specific stuff, in ws or in LCL...maybe better 
place will be WS, but maybe someone have different idea.


zeljko


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


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

2016-02-08 Thread Graeme Geldenhuys
On 2016-02-08 08:02, zeljko wrote:
> X11: Minimizing modal form minimizes complete application. (qt, gtk2)

Well, under X11 it is hard to find an application with a modal dialog to
start with. Modal dialogs are considered very bad design (read the book
"About Face 4th edition"). With every application I tested, there simply
wasn't a minimize button to click, only a "X" (close) button.

Under Windows, modal dialogs are much more common (about the only
platform where that is true). In all cases, the modal dialog (like X11)
doesn't have a minimize or maximize button, only a "x" (close) button.

In both platforms I tested with applications not written in LCL. eg: The
Gimp, Pluma editor, Adobe Reader, Total Commander, EditPad Pro etc.

Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp

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


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

2016-02-08 Thread Ondrej Pokorny

On 08.02.2016 10:46, zeljko wrote:
2.Change default behaviour - minimized modal form minimizes complete 
app. I like how it works under X11  eg minimizing Lazarus About 
dialog under KDE kwin, minimizes complete app, clicking on app in 
tray, restores app.


Delphi does the same - if you hit minimize on a modal form, it minimizes 
the whole application. IMO this is the only correct way.


Ondrej

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


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

2016-02-08 Thread Denis Kozlov


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

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


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


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

Denis


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

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


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

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


zeljko


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


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

2016-02-08 Thread zeljko

On 02/08/2016 11:15 AM, Graeme Geldenhuys wrote:


Ah, we got to love LCL consistency. [NOT]  Lazarus v1.7 About dialog
under LCL-GTK2 (on my JWM desktop environment), there is no minimize
button. The about dialog only has a Maximize () and a Close button.

Either way, I agree with point 2. If modal dialogs have a minimize
button, the only sane behaviour would be to minimise the whole
application, and then restore the whole application and all
windows/dialogs when needed.


Graeme, such example IS NOT LCL consistency thing.
Some window managers (eg JWM and xfce AFAIR) refuse to show minimize 
button on modal windows. Under kwin and metacity you can see minimize 
button if you enabled it.


zeljko


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


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

2016-02-08 Thread Graeme Geldenhuys
Hi,

[mailing list: strangely, I get replies to zeljko's message, yet haven't
seen zeljko's reply yet (and no, I don't have spam filters set up). I
had to copy the quote text below from the Lazarus archives.]

On 2016-02-08 08:02, zeljko wrote:
> Actually, LCL applications (Delphi also) CAN HAVE minimize button on 
> modal form, so that's exact point of my question.
> Simplified what to do:

I didn't mean it is not possible, I meant it is not normally done - for
good reason.


> 1.Leave it as it is - minimized modal form does not minimize app (pretty 
> bad, since you cannot access desktop if your mainform is maximized)

Indeed, that is bad.


> 2.Change default behaviour - minimized modal form minimizes complete 
> app. I like how it works under X11  eg minimizing Lazarus About 
> dialog under KDE kwin, minimizes complete app, clicking on app in tray, 
> restores app.

Ah, we got to love LCL consistency. [NOT]  Lazarus v1.7 About dialog
under LCL-GTK2 (on my JWM desktop environment), there is no minimize
button. The about dialog only has a Maximize () and a Close button.

Either way, I agree with point 2. If modal dialogs have a minimize
button, the only sane behaviour would be to minimise the whole
application, and then restore the whole application and all
windows/dialogs when needed.

Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp

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


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

2016-02-08 Thread zeljko

On 02/08/2016 10:26 AM, Graeme Geldenhuys wrote:

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

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


Well, under X11 it is hard to find an application with a modal dialog to
start with. Modal dialogs are considered very bad design (read the book
"About Face 4th edition"). With every application I tested, there simply
wasn't a minimize button to click, only a "X" (close) button.

Under Windows, modal dialogs are much more common (about the only
platform where that is true). In all cases, the modal dialog (like X11)
doesn't have a minimize or maximize button, only a "x" (close) button.


Actually, LCL applications (Delphi also) CAN HAVE minimize button on 
modal form, so that's exact point of my question.

Simplified what to do:

1.Leave it as it is - minimized modal form does not minimize app (pretty 
bad, since you cannot access desktop if your mainform is maximized)


2.Change default behaviour - minimized modal form minimizes complete 
app. I like how it works under X11  eg minimizing Lazarus About 
dialog under KDE kwin, minimizes complete app, clicking on app in tray, 
restores app.



zeljko


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


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

2016-02-08 Thread Graeme Geldenhuys
On 2016-02-08 10:24, zeljko wrote:
> Some window managers (eg JWM and xfce AFAIR) refuse to show minimize 
> button on modal windows.

I do fully understand that X11 window manager can decide to to show and
what not to show

But, fpGUI's modal dialogs show the minimize button under JWM. The same
system I run Lazarus on. So this doesn't seem to be a window manager
(JWM in this case) feature or issue.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp

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


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

2016-02-08 Thread zeljko

On 02/08/2016 11:00 AM, Denis Kozlov wrote:


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

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

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

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


Your opinion is correct. Thanks for the info, I'll assign that issue to 
my self and fix it soon.


zeljko


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


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

2016-02-08 Thread Graeme Geldenhuys
On 2016-02-08 11:40, zeljko wrote:
> fpgui is using libX11, not gtk2 or qt afair, so rules are different.

All three speak to the same window manager in the end, and your argument
was that some Window Managers don't adhere to such a request. Well, I
just mentioned that JWM does adhere to such a request if it receives it.

>From what you said, Lazarus's About dialog does have a Minimize button
defined, and is visible when Lazarus is run under KDE, but not visible
when compiled with LCL-GTK2 and run under JWM. So somewhere something is
getting lost. Now my fpGUI test application also defines a Minimise
button for a modal dialog, and when run under JWM, the Minimize button
is shown. So all in all, JWM adheres to the request to display a
Minimize button. Now the question is, why doesn't it happen for Lazarus
compiled with LCL-GTK2? I can only conclude that somewhere in LCL-GTK2's
widgetset that information about the Minimize button is lost.

Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp

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


Re: [Lazarus] How to separate window editor from code.

2016-02-08 Thread Donald Ziesig

On 02/08/2016 08:12 PM, leledumbo wrote:

How can I restore this to the way it was back on 1.4?

Uninstall sparta_dockedformeditor package.



--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-How-to-separate-window-editor-from-code-tp4047123p4047127.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

Thanks, sometimes improvements aren't improvements.  (Especially since I 
have been using separate editors since Delphi 2.)




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


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

2016-02-08 Thread Aradeonas
Very good,Please let us know.

Regards, Ara


-- 
http://www.fastmail.com - The professional email service

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


Re: [Lazarus] FreePascal TCPIP data tunnel code sample?

2016-02-08 Thread Bo Berglund
On Fri, 5 Feb 2016 17:50:16 +0100, Koenraad Lelong
 wrote:

>>> Isn't this just port-forwarding ? Set up the firewall to forward data to
>>> the wired NIC to the device's address and port.
>>>
>> Which firewall?
>> But you are right in the port forwarding part. I want my new RPi2 unit
>> to forward the communications on port 1001 on the Ethernet side to a
>> specific unit on the WiFi side on its 1001 port.
>>
>
>Every linux-machine, and the pi is no exception, has a firewall : 
>iptables. You could configure it manually, but myself, I prefer 
>shorewall to configure the firewall.
>

Well, you got me thinking and look at the RPi possibilities
Turns out that what I want to do can be realized in the following way
without even installing or creating a program or manipulating the
Linux firewall:

On the RPi having the WiFi connection:
- Enable net.ipv4.ip_forward in /etc/sysctl.conf and reboot

On other computers in the network:
- Add a route for the WiFi network via the RPi having the WiFi
connection for example (the WiFi Pi has IP address 192.168.0.152):

On RPI:
sudo route add -net 1.2.3.0 netmask 255.255.255.0 gw 192.168.0.152

On Windows (admin command prompt):
route -4 -p ADD 1.2.3.0 MASK 255.255.255 192.168.0.152

Once I did this I could reach any IP and port in the WiFi subnet from
computers on the Ethernet network.

So I do not have to dig into making a special program for this to
work.

Thanks for getting me look for a different way of solving the problem!

-- 
Bo Berglund
Developer in Sweden


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


Re: [Lazarus] "Test" button in project inspector

2016-02-08 Thread Vojtěch Čihák

Main menu: Source -> Quick Syntax Check
 
Of course, you can assing some handy shortcut to it.
 
V.
__

Od: Bo Berglund 
Komu: 
Datum: 08.02.2016 16:05
Předmět: Re: [Lazarus] "Test" button in project inspector


On Fri, 5 Feb 2016 14:52:23 +0100, Werner Pamler


Similar question:
In Delphi there is a Project menu function "syntax check", which
checks the syntax of the project without actually compiling it.
Is there a corresponding "Test" function available in Lazarus?
In Delphi I use this a lot!


--
Bo Berglund
Developer in Sweden


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


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


Re: [Lazarus] "Test" button in project inspector

2016-02-08 Thread Bo Berglund
On Fri, 5 Feb 2016 14:52:23 +0100, Werner Pamler
 wrote:

>In the Project inspector window, there is a Test button. What is it good 
>for? Its function is not documented in the help file accessible by the 
>Help button at the left. What's confusing is that executing "Test" 
>reports this error in the Message window for all of my tested projects, 
>even for an empty one:
>
>Test: Compiling an empty file: Exit code 1, Errors: 1
>Fatal: Syntax error, "BEGIN" expected but "end of file" found

Similar question:
In Delphi there is a Project menu function "syntax check", which
checks the syntax of the project without actually compiling it.
Is there a corresponding "Test" function available in Lazarus?
In Delphi I use this a lot!


-- 
Bo Berglund
Developer in Sweden


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


Re: [Lazarus] Problem with Sparta docked form designer

2016-02-08 Thread Maciej Izak
2016-02-07 23:00 GMT+01:00 Anthony Walter :

> I was looking at the code. There might not be an easy solution but the
> docked designer really needs to support this feature. Can you point out
> where in the package you are picking the class for and then creating the
> docked design control?
>

Sparta changes are deep. All is started at FormEditingIntf.pas in IdeIntf
package (DesignerBaseClassId_TForm const is interesting for us. You can try
to search DesignerBaseClassId_TForm in whole ide src). Maybe somehow in
module ide/SourceFileManager.pas this kind of form (reported in issue
#29615) is wrongly handled (just a guess). Strange bug, even non LCL forms
demo works correctly with Sparta (see examples\designnonlcl).

In your case bug fix can be trivial or very complicated. Sooner or later I
will fix it. Anyway you can try on own hand :). For now I need to focus on
custom Sparta MDI solution and on deep refactoring.

-- 
Best regards,
Maciej Izak
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] How to separate window editor from code.

2016-02-08 Thread Donald Ziesig

Hi All!

I recently updated raspberry pi to 1.7.  When I did, the window editor 
became a tab in the source editor.  This is a real problem. I can't 
figure out how to tell the window where it was designed. Now it will 
center on screen, on parent form, etc, but I want to put it into a 
specific place on the screen.  I have tried to find the option that lets 
me have separate code and window editing, but no luck.


How can I restore this to the way it was back on 1.4?

Thanks,

Don Ziesig


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


[Lazarus] How to set defines for a project? Lazarus crashes...

2016-02-08 Thread Bo Berglund
I tried setting the conditional "UseCThreads" for my test project but
even though I can reach the place where this apparently is set:
Menu: Project/Project_Options/Custom_Options/Defines
it seems not to work!

When I use this dialog to enter the symbol UseCThreads the effect is
invisible when I hit OK, nothing gets added to the list of
defines/options and when I OK on the main options window anyway
Lazarus locks up completely!!!
Only way out seems to be to reboot the machine!
I have not fond any way to open a menu or interact with the Lazarus
IDE any other way after this happened so now my option is to restart
the operating system.
It IS still possible to move the Lazarus windows around on the desktop
but not to close Lazarus or interact in any other way. :(

Is it not supposed to be possible to use this dialog that clearly
offers to add a define to actually do this?

In Delphi this is available in a dialog along with the path settings,
which is very convenient to use...

I am using Lazarus 1.6RC2 and FPC 3.0.0 on Raspbian Jessie.


-- 
Bo Berglund
Developer in Sweden


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


Re: [Lazarus] How to set defines for a project? Lazarus crashes...

2016-02-08 Thread micsch
Am Monday 08 February 2016 20:24:36 schrieb Bo Berglund:
> I tried setting the conditional "UseCThreads" for my test project but
> even though I can reach the place where this apparently is set:
> Menu: Project/Project_Options/Custom_Options/Defines
> it seems not to work!
>
> When I use this dialog to enter the symbol UseCThreads the effect is
> invisible when I hit OK, nothing gets added to the list of
> defines/options and when I OK on the main options window anyway
> Lazarus locks up completely!!!
> Only way out seems to be to reboot the machine!
> I have not fond any way to open a menu or interact with the Lazarus
> IDE any other way after this happened so now my option is to restart
> the operating system.
> It IS still possible to move the Lazarus windows around on the desktop
> but not to close Lazarus or interact in any other way. :(
>
> Is it not supposed to be possible to use this dialog that clearly
> offers to add a define to actually do this?
>
> In Delphi this is available in a dialog along with the path settings,
> which is very convenient to use...
>
> I am using Lazarus 1.6RC2 and FPC 3.0.0 on Raspbian Jessie.
reboot ist not needed on linux
use a console and kill command
Ctrl-Alt-F1 for console
and 
Ctrl-Alt-F7 to go back to X

UseCThreads is normaly added in the *.lpr file
Project->Project Inspektor
 doubleclick lpr file


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


Re: [Lazarus] How to set defines for a project? Lazarus crashes...

2016-02-08 Thread Mattias Gaertner
> Bo Berglund  hat am 8. Februar 2016 um 20:24
> geschrieben:
> 
> I tried setting the conditional "UseCThreads" for my test project but
> even though I can reach the place where this apparently is set:
> Menu: Project/Project_Options/Custom_Options/Defines
> it seems not to work!

Do you mean you added -dUseCThreads in Project/Project_Options/Custom_Options,
but it is not appended to options passed to FPC?

 
> When I use this dialog to enter the symbol UseCThreads the effect is
> invisible when I hit OK

Did you enable the checkbox of the define?

>, nothing gets added to the list of
> defines/options and when I OK on the main options window anyway
> Lazarus locks up completely!!!

It works here on OS X/carbon. Maybe the bug only appears on your platform.


>[...] Only way out seems to be to reboot the machine!
> I have not fond any way to open a menu or interact with the Lazarus
> IDE any other way after this happened so now my option is to restart
> the operating system.
> It IS still possible to move the Lazarus windows around on the desktop
> but not to close Lazarus or interact in any other way. :(

Maybe the focus is captured.
 
> Is it not supposed to be possible to use this dialog that clearly
> offers to add a define to actually do this?
> 
> In Delphi this is available in a dialog along with the path settings,
> which is very convenient to use...
> 
> I am using Lazarus 1.6RC2 and FPC 3.0.0 on Raspbian Jessie.

Mattias

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


Re: [Lazarus] How to separate window editor from code.

2016-02-08 Thread leledumbo
> How can I restore this to the way it was back on 1.4?

Uninstall sparta_dockedformeditor package.



--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-How-to-separate-window-editor-from-code-tp4047123p4047127.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