Re: [Lazarus] Lazarus on Odroid U3

2014-07-04 Thread Anthony Tekatch

On Tue, 01 Jul 2014 09:08:05 +0200, Reinier Olislagers 
 wrote:

> On 01/07/2014 02:03, Anthony Tekatch wrote:
> > On Mon, 23 Jun 2014 08:28:57 +0200, Reinier Olislagers
> >  wrote:
> >>  You could try installing that or perhaps compile using FPC
> >> trunk (manually or using a tool like fpcup [warning: fpcup author
> >> speaking ;)] see here
> >> http://wiki.lazarus.freepascal.org/Odroid#Installing_FPC.2FLazarus_using_fpcup
> > I now have an Odroid U3 and am trying the instructions from your link
> > with the following error in fpcup.log:
> 
> >  [2014-07-01 09:20:58.097 Info] DownloadFromSVN: SVN gave error code 1
> > It seems fpcup cannot see the SVN repository. Is a simple fix?
> Yes, it seems it finds the svn command but has problems downloading.
> 
> Try again would be my suggestion. You can also try the svn checkout
> command manually in the relevant directory to see if that works.


The missing svn (from incomplete directory) was due to the disk size
being too small, I just had to enlarge as per leaflet that came with
odroid U3. I did not try to run the svn command from the command line
before I tried "df -h" to see 100% usage on that drive.

Next, locale was screwed up, fcpup --verbose showed this:
  svn: warning: cannot set LC_CTYPE locale
  svn: warning: environment variable LANG is en_CA.UTF-8
  svn: warning: please check that your locale name is correct
I had to do this:
  sudo locale-gen en_US.UTF-8

Next, there were some errors regarding Lazarus build:
 fpcup: info: Lazarus: buildmodulecustom: make/lazbuild returned error code 2
 Details: 
 fpcup: info: Error running fpcup. Technical details: error executing sequence 
useride; line: 2, param: USERIDE
 fpcup: info: Error running fpcup. Technical details: error executing sequence 
Only; line: 5, param: useride
 FPCUp failed.
so I did a "fpcup --clean" then tried the standard command (from your link).

Lazarus is installed now. 

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


Re: [Lazarus] GTK2 GroupBox auto size

2014-07-04 Thread Juha Manninen
On Friday, July 4, 2014, Vojtěch Čihák  wrote:

> And what about autosized forms? I mean: why it does NOT matter with Panels
> and Forms but it (exclusively) matters with GroupBox.
>

Good question. I think it should matter with forms, too. OTOH, forms are
typically bigger and this issue does not come up so often.
With panels it is irrelevant because the caption there is not useful. At
least I always make it empty and use other controls (Label) for texts. They
can be anchored etc.

With GroupBox this really matters. I have pumped into this problem many
times and I believe Lazarus IDE dialogs have captions cut for this
same reason.

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


Re: [Lazarus] GTK2 GroupBox auto size

2014-07-04 Thread Vojtěch Čihák

@ I want to see it fixed! Gtk2 and Windows were mentioned. What about other 
widgetsets, how do they behave?
 
Qt has this issue too (i.e. GroupBox is autosized around children, long caption 
is not fuly visible).
 
 @ My logic also says that if the user has set a caption and defined a control 
to be autosized, the text should be visible. In what situation would it be 
useful to cut it automatically?
 
And what about autosized forms? I mean: why it does NOT matter with Panels and 
Forms but it (exclusively) matters with GroupBox.
 
Although, I am more-less neutral in this case, if it will be patched or not.
 
Vojtěch 
 
__

Od: Juha Manninen 
Komu: Lazarus mailing list 
Datum: 04.07.2014 17:16
Předmět: Re: [Lazarus] GTK2 GroupBox auto size



On Friday, July 4, 2014, Vojtěch Čihák > wrote:
So it seems more a feature than a bug to me.
To me it seems like yet another bug in Delphi.When talking about GroupBox it is 
actually a missing feature in Delphi.My logic also says that if the user has 
set a caption and defined a control to be autosized, the text should be 
visible. In what situation would it be useful to cut it automatically?And yes, 
automatic layout + anchors in LCL are already more advanced than the Delphi 
equivalent. Delphi compatibility is a lame excuse for such bugs.I want to see 
it fixed! Gtk2 and Windows were mentioned. What about other widgetsets, how do 
they behave?There are more bug reports for the same thing. I will find them 
...Juha

--

--
___
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] CGI Response.ContentStream client break

2014-07-04 Thread Michael Van Canneyt



On Fri, 4 Jul 2014, Leonardo M. Ramé wrote:


On 2014-07-04 08:22:30 +0200, Michael Van Canneyt wrote:



On Thu, 3 Jul 2014, silvioprog wrote:


2014-07-03 17:33 GMT-03:00 Leonardo M. Ramé :
[...]
 Mmm, no, too fast.

 Maybe the problem is on the client side. I'm using Synapse library as
 client, and I'm issuing THttpSend's Abort method to stop downloading.


You can change your 'broker' to a embedded HTTP server, and put a break point 
and debug both (client/server).
 
 Is the cgi notified when the client does an Abort call?.


Hm... AFAIK, no.


Indeed. The CGI program is just terminated.

Normally the file stream is then closed by the OS, so this should not have any 
side effects.
(unless the OS is buggy).

If you do observe side effects, try opening the file without share locks.
using flags (fmOpenRead or fmShareDenyNone), I think.

Michael.


Thanks Michael, using (fmOpenRead or fmShareDenyNone) params did the
trick!.


On what platform did you get this ?

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


Re: [Lazarus] GTK2 GroupBox auto size

2014-07-04 Thread Juha Manninen
On Friday, July 4, 2014, Vojtěch Čihák  wrote:
>
> So it seems more a feature than a bug to me.
>

To me it seems like yet another bug in Delphi.
When talking about GroupBox it is actually a missing feature in Delphi.
My logic also says that if the user has set a caption and defined a control
to be autosized, the text should be visible. In what situation would it be
useful to cut it automatically?

And yes, automatic layout + anchors in LCL are already more advanced than
the Delphi equivalent. Delphi compatibility is a lame excuse for such bugs.

I want to see it fixed! Gtk2 and Windows were mentioned. What about other
widgetsets, how do they behave?

There are more bug reports for the same thing. I will find them ...

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


[Lazarus] Compiling many build modes at once

2014-07-04 Thread Juha Manninen
I implemented a command to build a user selectable list of modes at one go.
You can find it in Run menu item "Build many Modes ...".
Please test.

Juha

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


Re: [Lazarus] GTK2 GroupBox auto size

2014-07-04 Thread Henry Vermaak
On Fri, Jul 04, 2014 at 03:19:33PM +0200, zeljko wrote:
> On 07/04/2014 03:13 PM, Vojtěch Čihák wrote:
> >Hi,
> >
> >Delphi has no TGroupBox.Autosize but it has TPanel.AutoSize.
> >
> >When I put children on Panel, set very long Panel.Caption and
> >Panel.AutoSize:=True then panel shrinks to the smallest possible size
> >(around children) ignoring its own Caption.
> >
> >So it seems more a feature than a bug to me.
> 
> +1

See my reply to Vojtěch.

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


Re: [Lazarus] GTK2 GroupBox auto size

2014-07-04 Thread Henry Vermaak
On Fri, Jul 04, 2014 at 03:13:19PM +0200, Vojtěch Čihák wrote:
> Hi,
>  
> Delphi has no TGroupBox.Autosize but it has TPanel.AutoSize.

I really don't care about Delphi.  If I did I would be using it.

> When I put children on Panel, set very long Panel.Caption and
> Panel.AutoSize:=True then panel shrinks to the smallest possible size
> (around children) ignoring its own Caption.

I haven't seen anyone use a Panel with a caption and children.  The
caption is useless for exactly the reason you point out.  You can at
least get around it by putting a label inside the panel.

> So it seems more a feature than a bug to me.

I have software that's translatable, I've set my TRadioGroup size
manually (because AutoSize doesn't work) to accommodate the English
translation.  Now I change the translation to another language, but the
caption is now longer, so it gets clipped.  You call this a feature?  My
users don't agree with you.

Now I need to manually calculate the minimum size of the control based
on the length of the text in the current translation.  I also need to
factor in borders, themes, etc.  That's exactly the type of problem that
AutoSize sets out to solve, since all this information is already in the
widget set.

The same happens if the theme changes and the font size gets increased.
Delphi has this massive design flaw because it's based on absolute
positions and dimensions.  Lazarus goes a long way to fix this by the
AutoSize and anchoring mechanisms.

Henry

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


Re: [Lazarus] GTK2 GroupBox auto size

2014-07-04 Thread zeljko

On 07/04/2014 03:13 PM, Vojtěch Čihák wrote:

Hi,

Delphi has no TGroupBox.Autosize but it has TPanel.AutoSize.

When I put children on Panel, set very long Panel.Caption and
Panel.AutoSize:=True then panel shrinks to the smallest possible size
(around children) ignoring its own Caption.

So it seems more a feature than a bug to me.


+1

zeljko


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


Re: [Lazarus] GTK2 GroupBox auto size

2014-07-04 Thread Vojtěch Čihák

Hi,
 
Delphi has no TGroupBox.Autosize but it has TPanel.AutoSize.
When I put children on Panel, set very long Panel.Caption and 
Panel.AutoSize:=True then panel shrinks to the smallest possible size (around 
children) ignoring its own Caption.
So it seems more a feature than a bug to me.
 
Vojtěch 
__

Od: Henry Vermaak 
Komu: Lazarus mailing list 
Datum: 04.07.2014 13:40
Předmět: [Lazarus] GTK2 GroupBox auto size


Hi

The GroupBox auto size doesn't work very well, because it doesn't take
the label width into account.  If the label is wider than all of the
children, it will get clipped.  Any reason why GetGTKDefaultWidgetSize
wasn't used, like virtually everywhere else in gtk2wsstdctrls.pp?

I attach a patch that uses GetGTKDefaultWidgetSize.

Henry


--

--
___
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] GTK2 GroupBox auto size

2014-07-04 Thread Henry Vermaak
On Fri, Jul 04, 2014 at 01:03:56PM +0100, Henry Vermaak wrote:
> On Fri, Jul 04, 2014 at 12:39:12PM +0100, Henry Vermaak wrote:
> > Hi
> > 
> > The GroupBox auto size doesn't work very well, because it doesn't take
> > the label width into account.  If the label is wider than all of the
> > children, it will get clipped.  Any reason why GetGTKDefaultWidgetSize
> > wasn't used, like virtually everywhere else in gtk2wsstdctrls.pp?
> > 
> > I attach a patch that uses GetGTKDefaultWidgetSize.
> 
> http://bugs.freepascal.org/view.php?id=20447

Same happens on Windows.  There isn't even a GetPreferredSize() member,
so that probably needs to be added containing MeasureText() and some
code to calculate border widths.  I don't really know how the win32
widgetset works, though.

Henry

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


Re: [Lazarus] CGI Response.ContentStream client break

2014-07-04 Thread Leonardo M . Ramé
On 2014-07-04 08:22:30 +0200, Michael Van Canneyt wrote:
> 
> 
> On Thu, 3 Jul 2014, silvioprog wrote:
> 
> >2014-07-03 17:33 GMT-03:00 Leonardo M. Ramé :
> >[...]
> >  Mmm, no, too fast.
> >
> >  Maybe the problem is on the client side. I'm using Synapse library as
> >  client, and I'm issuing THttpSend's Abort method to stop downloading.
> >
> >
> >You can change your 'broker' to a embedded HTTP server, and put a break 
> >point and debug both (client/server).
> > 
> >  Is the cgi notified when the client does an Abort call?.
> >
> >
> >Hm... AFAIK, no.
> 
> Indeed. The CGI program is just terminated.
> 
> Normally the file stream is then closed by the OS, so this should not have 
> any side effects.
> (unless the OS is buggy).
> 
> If you do observe side effects, try opening the file without share locks.
> using flags (fmOpenRead or fmShareDenyNone), I think.
> 
> Michael.

Thanks Michael, using (fmOpenRead or fmShareDenyNone) params did the
trick!.

Regards,
-- 
Leonardo M. Ramé
http://leonardorame.blogspot.com

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


Re: [Lazarus] GTK2 GroupBox auto size

2014-07-04 Thread Henry Vermaak
On Fri, Jul 04, 2014 at 12:39:12PM +0100, Henry Vermaak wrote:
> Hi
> 
> The GroupBox auto size doesn't work very well, because it doesn't take
> the label width into account.  If the label is wider than all of the
> children, it will get clipped.  Any reason why GetGTKDefaultWidgetSize
> wasn't used, like virtually everywhere else in gtk2wsstdctrls.pp?
> 
> I attach a patch that uses GetGTKDefaultWidgetSize.

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

Henry

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


[Lazarus] GTK2 GroupBox auto size

2014-07-04 Thread Henry Vermaak
Hi

The GroupBox auto size doesn't work very well, because it doesn't take
the label width into account.  If the label is wider than all of the
children, it will get clipped.  Any reason why GetGTKDefaultWidgetSize
wasn't used, like virtually everywhere else in gtk2wsstdctrls.pp?

I attach a patch that uses GetGTKDefaultWidgetSize.

Henry
Index: lcl/interfaces/gtk2/gtk2wsstdctrls.pp
===
--- lcl/interfaces/gtk2/gtk2wsstdctrls.pp	(revision 45769)
+++ lcl/interfaces/gtk2/gtk2wsstdctrls.pp	(working copy)
@@ -2365,32 +2365,9 @@
 class procedure TGtk2WSCustomGroupBox.GetPreferredSize(
   const AWinControl: TWinControl; var PreferredWidth, PreferredHeight: integer;
   WithThemeSpace: Boolean);
-var
-  Widget: PGtkWidget;
-  border_width: Integer;
 begin
-  Widget := PGtkWidget(GetFrameWidget({%H-}PGTKEventBox(AWinControl.Handle)));
-
-  if Assigned(PGtkFrame(Widget)^.label_widget) then
-  begin
-PreferredWidth := gtk_widget_get_xthickness(Widget) * 2 +
-gtk_widget_get_xthickness(PGtkFrame(Widget)^.label_widget);
-PreferredHeight := Max(gtk_widget_get_ythickness(Widget),
- gtk_widget_get_ythickness(PGtkFrame(Widget)^.label_widget)) +
- gtk_widget_get_ythickness(Widget);
-  end else
-  begin
-PreferredWidth := gtk_widget_get_xthickness(Widget) * 2;
-PreferredHeight := gtk_widget_get_ythickness(Widget) * 2;
-  end;
-
-  if WithThemeSpace then
-  begin
-border_width := (PGtkContainer(Widget)^.flag0 and bm_TGtkContainer_border_width) shr
-bp_TGtkContainer_border_width;
-inc(PreferredWidth, border_width);
-inc(PreferredHeight, 2 * border_width);
-  end;
+  GetGTKDefaultWidgetSize(AWinControl, PreferredWidth, PreferredHeight,
+  WithThemeSpace);
 end;
 
 class procedure TGtk2WSCustomGroupBox.SetFont(const AWinControl: TWinControl;
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus