[lazarus] *.xml config files under Windows

2007-07-18 Thread Graeme Geldenhuys

Hi,

Where does Lazarus under Windows store the *.xml config files?  For
example under Linux it is or the Lazarus directory or the ~/.lazarus
directory.  What is the equivalent under Windows?

My Source Editor screen is screwed up (Tab key jumps 8 spaces, etc)
and I want to reset all settings back to defaults by deleting all the
*.xml config files.

Regards,
 - Graeme -

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] *.xml config files under Windows

2007-07-18 Thread Graeme Geldenhuys

On 18/07/07, Vincent Snijders [EMAIL PROTECTED] wrote:


It is in the lazarus executable directory.

This is likely to change before 1.0 to the some applictiondata directory, as 
given
by the sysutils.GetAppConfigDir (or what is that function name?).


Ah ok. I thought GetAppConfigDir() was already used.  What confused we
was that after I deleted my old C:\Lazarus directory and checked out a
new version, Lazarus started up and knew where my FPC (ppc386.exe) was
located. This is what made me think that it's reading config
information from somewhere other that the Lazarus executable
directory.

Regards,
 - Graeme -

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] How to send a bug fix?

2007-07-18 Thread Giuliano Colla
I posted on this mail list, one week ago a couple of bug fixes for 
TSpeedButton. One of them was just fixing a typo, which made the button 
glyph get random y position, the other a bug fix, because a calculation 
was leading to a negative width destination rectangle, making the glyph 
to disappear.

I saw no reaction.
Did I post in the wrong place?

--
Giuliano Colla

Still using C++ and Visual Studio? I'm using Object Pascal and Lazarus.


_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] How to send a bug fix?

2007-07-18 Thread Marc Weustink

Giuliano Colla wrote:
I posted on this mail list, one week ago a couple of bug fixes for 
TSpeedButton. One of them was just fixing a typo, which made the button 
glyph get random y position, the other a bug fix, because a calculation 
was leading to a negative width destination rectangle, making the glyph 
to disappear.

I saw no reaction.
Did I post in the wrong place?


Nope, it got missed

posting patches can be done by:
1) create a patch issue in Mantis
2) send it to patch (at) dommelstein.nl with at least the word patch in 
the subject

3) send it here

Marc

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] PATCH: definition of HKEY in regdef.inc

2007-07-18 Thread Tobias Giesen
Hello,

in regdef.inc, HKEY is defined as Cardinal. However, this causes 
range check errors on Mac i386. I had to change it to DWORD. Maybe
you would like to adopt this change (regdef.inc line 62).

Cardinal on i386 Mac apparently cannot handle values like
HKEY_CURRENT_USER which is $8001.

Thanks!

Tobias Giesen
www.superflexible.com



_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] PATCH: definition of HKEY in regdef.inc

2007-07-18 Thread Vincent Snijders

Tobias Giesen schreef:

Hello,

in regdef.inc, HKEY is defined as Cardinal. However, this causes 
range check errors on Mac i386. I had to change it to DWORD. Maybe

you would like to adopt this change (regdef.inc line 62).

Cardinal on i386 Mac apparently cannot handle values like
HKEY_CURRENT_USER which is $8001.



I don't understand. Cardinal and DWORD are both 32 bits unsigned integers.

Vincent

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] TSpeedButton bugs patch

2007-07-18 Thread Giuliano Colla

Here's it again

The attached patch fixes 2 issues for TSpeedButton:

1) With no Caption, the glyph is centered if Layout is Glyph Left or
Glyph right, somewhere up or down with Glyph Top or Glyph Bottom.
Reason: in speedbutton.inc, if Caption is empty, Result.CX is set twice
to zero while Result.CY is left undetermined.

2) With a Caption, the glyph disappears if the layout is Glyph Bottom or
Glyph Right.
Reason: the calculation increases Left (or Top) of the destination
rectangle of the offset amount, and decreases Right (or Bottom) of the
same quantity, determining a negative width (or height)

Regards,

Giuliano Colla

Index: lcl/include/speedbutton.inc
===
--- lcl/include/speedbutton.inc (revisione 11469)
+++ lcl/include/speedbutton.inc (copia locale)
@@ -871,8 +871,8 @@
   end
   else
   begin
+Result.CY:= 0;
 Result.CX:= 0;
-Result.CX:= 0;
   end;
 end;
 
Index: lcl/include/buttonglyph.inc
===
--- lcl/include/buttonglyph.inc (revisione 11469)
+++ lcl/include/buttonglyph.inc (copia locale)
@@ -102,26 +102,29 @@
   SrcRect := Rect((ImgID*gWidth), 0, ((ImgID+1)*gWidth), gHeight);
   DestRect:=Client;
   
-  if (Offset.X=0) then begin
+
+  Inc(DestRect.Left, Offset.X);
+  {if (Offset.X=0) then begin
 Inc(DestRect.Left, Offset.X);
 Dec(DestRect.Right, Offset.X); // image couldn't overlap rigth window edge
   end else begin
 Dec(SrcRect.Left, Offset.X);
 Inc(SrcRect.Right, Offset.X);
-  end;
+  end;}
   src_wh:=SrcRect.Right-SrcRect.Left; dst_wh:=DestRect.Right-DestRect.Left;
   if (dst_whsrc_wh) then
 DestRect.Right:=DestRect.Left+src_wh // if window for image is wider
   else if (dst_whsrc_wh) then
   SrcRect.Right:=SrcRect.Left+dst_wh; // if image not fits in their window 
width
 
-  if (Offset.Y=0) then begin
+  Inc(DestRect.Top, Offset.Y);
+  {if (Offset.Y=0) then begin
 Inc(DestRect.Top, Offset.Y);
 Dec(DestRect.Bottom, Offset.Y); // image couldn't overlap bottom window 
edge
   end else begin
 Dec(SrcRect.Top, Offset.Y);
 Inc(SrcRect.Bottom, Offset.Y);
-  end;
+  end;}
   src_wh:=SrcRect.Bottom-SrcRect.Top; dst_wh:=DestRect.Bottom-DestRect.Top;
   if (dst_whsrc_wh) then
 DestRect.Bottom:=DestRect.Top+src_wh // if window for image is higher



Re: [lazarus] PATCH: definition of HKEY in regdef.inc

2007-07-18 Thread Tobias Giesen
  Cardinal on i386 Mac apparently cannot handle values like
  HKEY_CURRENT_USER which is $8001.
  
 
 I don't understand. Cardinal and DWORD are both 32 bits 
 unsigned integers.

I don't understand either, but the facts are that DWORD is always 
the standard type to use in a Windows API context, and that 
assigning a DWORD value such as the above mentioned to a Cardinal
variable produces a range check error. There is probably some
compiler bug there, but in this case we should use consistent
types anyway, which means always DWORD, never Cardinal, when you
are working with or simulating a Windows API.

DWORD is defined as LongWord, so it is a different compiler type.

Kind Regards,
Tobias Giesen

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] TButton.Color

2007-07-18 Thread Vincent Snijders

I am looking at bug 1188: TButton.Color doesn't work on windows.
http://www.freepascal.org/mantis/view.php?id=1188

Does anybody know how to change the buttons color on windows (without 
resorting to ownerdrawn)?


Vincent

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] TButton.Color

2007-07-18 Thread Felipe Monteiro de Carvalho

On 7/18/07, Vincent Snijders [EMAIL PROTECTED] wrote:

Does anybody know how to change the buttons color on windows (without
resorting to ownerdrawn)?


I find it strange that it doesn't work on Windows. According to this screenshot:

http://wiki.lazarus.freepascal.org/Windows_CE_Interface#Screenshots

It works on WinCE

So it's obviously possible. (sorry, I don't know how).

--
Felipe Monteiro de Carvalho

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] TButton.Color

2007-07-18 Thread Felipe Monteiro de Carvalho

On 7/18/07, Felipe Monteiro de Carvalho
[EMAIL PROTECTED] wrote:

It works on WinCE


Or maybe that is just a rectangle? the WinCE button is so simple that
I always thougth that was a button, but looking again now I see it
could be a rectangle with text inside =)

--
Felipe Monteiro de Carvalho

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] PATCH: definition of HKEY in regdef.inc

2007-07-18 Thread Felipe Monteiro de Carvalho

On 7/18/07, Tobias Giesen [EMAIL PROTECTED] wrote:

in regdef.inc


What is the location of this file?


Cardinal on i386 Mac


Are you using Windows througth Boot Camp or something similar?

--
Felipe Monteiro de Carvalho

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] exception while installing a package

2007-07-18 Thread Burkhard Carstens
Hi,

I am getting errors, when installing a package in lazarus as user, while 
lazarus itself is installed to /usr/ (iow. root-writable only).
This problem persists since quite some time, but til now, it failed only 
on one package, now it fails on many many packages.

Funny thing is: it gets over this point when trying again .. but with so 
many failing packages, this means alot of attempts before I get glscene 
installed ..

Any ideas?

error-log:

TLazPackageGraph.CheckIfPackageNeedsCompilation  No state file for 
printers4lazide 0.0
[TExternalToolList.Run] CmdLine=/usr/local/bin/ppc386  -S2cgi -OG1 -gl 
-vewnhi -l -Fu../../../lcl/units/i386-linux/ -Fu../../../ideintf/units/
i386-linux/ -Fu/home/bork/.lazarus/lib/Printer4Lazarus/i386-linux/ 
-Fu../../../lcl/units/i386-linux/gtk/ -Fu../../../packager/units/
i386-linux/ -Fu. -FU/home/bork/.lazarus/lib/printers4lazide/i386-linux/ 
-dLCL -dLCLgtk printers4lazide.pas WorkDir=/usr/local/share/lazarus/
components/printers/design/
Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Warning: You are using the obsolete switch -OG
Free Pascal Compiler version 2.1.5 [2007/07/17] for i386
Copyright (c) 1993-2007 by Florian Klaempfl
Target OS: Linux for i386
Compiling printers4lazide.pas
Compiling ideprinting.pas
Compiling sourceprinter.pas
sourceprinter.pas(42,16) Warning: An inherited method is hidden by 
destructor TSourcePrinter.Destroy
sourceprinter.pas(103,3) Note: Local variable copies not used
ideprinting.pas(28,21) Hint: Parameter Sender not used
ideprinting.pas(41,3) Note: Local variable CmdFormatFile not used
Writing Resource String Table file: ideprinting.rst
251 lines compiled, 0.3 sec
2 warning(s) issued
3 hint(s) issued
2 note(s) issued
Compiling package printers4lazide 0.0 completed
ConvertToGettextPO Unable to create file /usr/local/share/lazarus/
components/printers/design/languages/ideprinting.po
  Stack trace:
  $0853F0F0  TFILESTREAM__CREATE,  line 426 of /usr/src/rpm/BUILD/fpc/
rtl/objpas/classes/streams.inc
  $0853F282  TCUSTOMMEMORYSTREAM__SAVETOFILE,  line 511 of /usr/src/rpm/
BUILD/fpc/rtl/objpas/classes/streams.inc
  $082D9E0B  CONVERTTOGETTEXTPO,  line 373 of idetranslations.pas
  $082DA0A9  CONVERTRSTFILE,  line 404 of idetranslations.pas
  $082DA2F8  CONVERTRSTFILES,  line 444 of idetranslations.pas
  $08260880  TLAZPACKAGEGRAPH__CONVERTPACKAGERSTFILES,  line 2679 of /
usr/src/rpm/BUILD/lazarus/packager/packagesystem.pas
  $082604AF  TLAZPACKAGEGRAPH__COMPILEPACKAGE,  line 2624 of /usr/src/
rpm/BUILD/lazarus/packager/packagesystem.pas
  $0825FB97  TLAZPACKAGEGRAPH__COMPILEREQUIREDPACKAGES,  line 2439 of /
usr/src/rpm/BUILD/lazarus/packager/packagesystem.pas
  $0826F377  TPKGMANAGER__DOCOMPILEAUTOINSTALLPACKAGES,  line 3556 of /
usr/src/rpm/BUILD/lazarus/packager/pkgmanager.pas
  $08087055  TMAINIDE__DOBUILDLAZARUS,  line 8451 of main.pp
  $08263DA2  TPKGMANAGER__MAINIDEITMPKGEDITINSTALLPKGSCLICK,  line 501 
of /usr/src/rpm/BUILD/lazarus/packager/pkgmanager.pas
  $081F09D8  TIDEMENUITEM__MENUITEMCLICK,  line 511 of menuintf.pas
  $081F355A  TIDEMENUCOMMAND__MENUITEMCLICK,  line 1472 of menuintf.pas
  $080F11A7  TMENUITEM__CLICK,  line 74 of ./include/menuitem.inc
  $080F17DD  TMENUITEM__DOCLICKED,  line 260 of ./include/menuitem.inc
  $085352E9  TOBJECT__DISPATCH,  line 463 of /usr/src/rpm/BUILD/fpc/rtl/
inc/objpas.inc
  $0817CA4C  GTKACTIVATECB,  line 334 of gtkcallback.inc
ConvertRSTFile writing failed: OutputFilename=/usr/local/share/lazarus/
components/printers/design/languages/ideprinting.po
ConvertPackageRSTFiles FAILED: RSTFilename=/home/bork/.lazarus/lib/
printers4lazide/i386-linux/ideprinting.rst OutputFilename=/usr/local/
share/lazarus/components/printers/design/languages/ideprinting.po
TLazPackageGraph.ConvertPackageRSTFiles FAILED: PkgOutputDirectory=/
home/bork/.lazarus/lib/printers4lazide/i386-linux/ RSTOutputDirectory=/
usr/local/share/lazarus/components/printers/design/languages/
TLazPackageGraph.CompilePackage ConvertPackageRSTFiles failed: 
printers4lazide 0.0
TMainIDE.DoBuildLazarus: Compile AutoInstall Packages failed.
TMainIDE.DoCloseEditorFile A PageIndex=0
TCustomFormEditor.DeleteComponent Form1:TForm1 IsJITComponent=True 
FreeComponent=True
TMainIDE.DoCloseEditorFile end
LAZARUS END - cleaning up ...
[TMainIDE.Destroy] A
[TMainIDE.Destroy] B  - inherited Destroy... TMainIDE
[TMainIDE.Destroy] END

regards
  Burkhard

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] PATCH: definition of HKEY in regdef.inc

2007-07-18 Thread Tobias Giesen
  in regdef.inc
 What is the location of this file?

/usr/local/share/fpcsrc/fcl/inc

  Cardinal on i386 Mac
 Are you using Windows througth Boot Camp or something similar?

No, I am using the native MacOS X i386 lazarus version. I need to use
some Windows structs inside of my app, even if most of the API does 
not exist. Some parts of the Windows API are emulated.

In any case DWORD is the type to use in any Windows API context.
Not Cardinal.

Kind Regards,
Tobias Giesen

Super Flexible Software Ltd.  Co. KG
Lessingstr. 42
48485 Neuenkirchen, Germany
www.superflexible.com
www.tgtools.com

---
Registered at register court Steinfurt as HRA 5061
Liability / general partner: TGTools Ltd.
Company No. 05513299
Registered in England and Wales
Directors: Tobias Giesen and Claudia Hübl

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Trouble registering on lazarus.freepascal.org

2007-07-18 Thread John vd Waeter

Hmm, anyone? Still no luck...

John


John vd Waeter wrote:

Marc Weustink wrote:

John vd Waeter wrote:


Hi all,

I try to register at lazarus.freepascal.org, but no emails with 
password are sent from the site.


Can anyone take a look at it?



Where did you try to register for ?

Mantis ?
Forum ?
Site ?

Marc


The forums.

John


_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives




_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] TSpeedButton bugs patch

2007-07-18 Thread Marc Weustink

Giuliano Colla wrote:

Here's it again

The attached patch fixes 2 issues for TSpeedButton:

1) With no Caption, the glyph is centered if Layout is Glyph Left or
Glyph right, somewhere up or down with Glyph Top or Glyph Bottom.
Reason: in speedbutton.inc, if Caption is empty, Result.CX is set twice
to zero while Result.CY is left undetermined.


This one is OK



2) With a Caption, the glyph disappears if the layout is Glyph Bottom or
Glyph Right.
Reason: the calculation increases Left (or Top) of the destination
rectangle of the offset amount, and decreases Right (or Bottom) of the
same quantity, determining a negative width (or height)


This one is ok alos I think. But when seeing the speedbutton code, I 
think the whole needs a review. Why for instance has the oamge an offset 
when pressed and the text not ?

Further I found setting the Shortcut in the paintroutine...  !!

So if someone can aply both its OK (I don't have a lcl trunk atm)


Marc

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] PATCH: definition of HKEY in regdef.inc

2007-07-18 Thread Felipe Monteiro de Carvalho

On 7/18/07, Tobias Giesen [EMAIL PROTECTED] wrote:

 What is the location of this file?

/usr/local/share/fpcsrc/fcl/inc


I thougth it would be on fpc somewhere ... you should have posted on
one of the free pascal mailling lists:

http://www.freepascal.org/maillist.var

The lazarus list is about the lazarus ide and the lazarus component
library, and some generic programming questions. But patches for fpc
should definetively go to fpc lists, where fpc developers can review
them.

thanks,
--
Felipe Monteiro de Carvalho

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] *.xml config files under Windows

2007-07-18 Thread Marco van de Voort
On Wed, Jul 18, 2007 at 11:04:19AM +0200, Vincent Snijders wrote:
 Graeme Geldenhuys schreef:
 Hi,
 Where does Lazarus under Windows store the *.xml config files?  For
 example under Linux it is or the Lazarus directory or the ~/.lazarus
 directory.  What is the equivalent under Windows?
 
 It is in the lazarus executable directory.
 
 This is likely to change before 1.0 to the some applictiondata directory, 
 as given by the sysutils.GetAppConfigDir (or what is that function name?).

Keep it versioned, or you might loose the ability of having multiple
independant lazarusses?

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] *.xml config files under Windows

2007-07-18 Thread Vincent Snijders

Marco van de Voort schreef:

On Wed, Jul 18, 2007 at 11:04:19AM +0200, Vincent Snijders wrote:

Graeme Geldenhuys schreef:

Hi,
Where does Lazarus under Windows store the *.xml config files?  For
example under Linux it is or the Lazarus directory or the ~/.lazarus
directory.  What is the equivalent under Windows?

It is in the lazarus executable directory.

This is likely to change before 1.0 to the some applictiondata directory, 
as given by the sysutils.GetAppConfigDir (or what is that function name?).


Keep it versioned, or you might loose the ability of having multiple
independant lazarusses?


It won't be different from the current situation in *nix: you have to 
use to pass the config dir on the command line if you want to use 
different config files.


Vincent

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Initialize a DBGrid

2007-07-18 Thread Darmawan Sugiarto


German C. Basisty [EMAIL PROTECTED] wrote:Hi!
  Here goes another question:
   
  I have a form. This form contains a DBGrid. The DBGrid retrives information 
via an SQL connection from a PostgreSQL Database. How do I do to initialize 
parameters (like DBGrid1.Columns[1].Width := 20) when the form is shown (when 
the form appears)?
   
  Best Regards ,
   
  German
  
  
You can init this OnShow event or OnActive or Oncreate it's depend from your 
application. 
If you want to init when form show - Form.Show  - OnShow
If you want to init when form change from Z-windows - OnActive
or if just once initialization when form created - OnCreate;

You can choose...

Thanks sorry for my english


=INTOSOFT
   ALEXIO CHAOS
   [EMAIL PROTECTED]   
  Yahoo Messager
=
   
-
Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.