Thread: pgadmin3 GTK

pgadmin3 GTK

From
Andreas Pflug
Date:
Hi Keith,

I just updated CVS with a version that's runnable under GTK.
I had to change quite a lot until the compiler accepted all files.

Issues:
Please do not use
    for (int si=0 ; ...)
Instead, declare int si; separately. You never know what the compiler
really does from that.

I found several OnXXX() methods, that are probably used in EventMaps, I
didn't check this. Please make sure they have the correct arguments. If
they don't have a sufficient argument, you won't be able to run a
Release-Build. Unfortunately, the compiler will not warn you about this.

pgadmin3/GTK doesn't look very pretty right now, but it WORKS, including
Query window/abort!

GTK to do:
- Dialog designing, hopefully portable (at the moment, the win32-
versions are duplicated to gtk)
- Fonts
- function keys
- preferences storing

Regards,

Andreas


Re: pgadmin3 GTK

From
"Dave Page"
Date:
Hi Andreas,

> -----Original Message-----
> From: Andreas Pflug [mailto:Andreas.Pflug@web.de]
> Sent: 08 April 2003 13:58
> To: Keith; pgadmin-hackers@postgresql.org; Dave Page
> Subject: [pgadmin-hackers] pgadmin3 GTK
>
>
> Hi Keith,
>
> I just updated CVS with a version that's runnable under GTK.
> I had to change quite a lot until the compiler accepted all files.

Excellent, thanks. I'll get Mark to have a look once he's finished
building his new dev box.

> Issues:
> Please do not use
>     for (int si=0 ; ...)
> Instead, declare int si; separately. You never know what the compiler
> really does from that.

Yeah, I ran into that on the C++ module of my course a while ago. The
Borland compiler barfs on it completely...

> GTK to do:
> - Dialog designing, hopefully portable (at the moment, the win32-
> versions are duplicated to gtk)

That's fine. Mark can look at that.

> - Fonts
> - function keys
> - preferences storing

That should work already if you use sysSettings. We spent some time on
that before Christmas making it work correctly in *nix and Win32. In
win32 it uses the registry, and on *nix, it uses ~/.pgadmin3 iirc.

Regards, Dave


Re: pgadmin3 GTK

From
Andreas Pflug
Date:
Dave Page wrote:

>>GTK to do:
>>- Dialog designing, hopefully portable (at the moment, the win32-
>>versions are duplicated to gtk)
>>
>>
>
>That's fine. Mark can look at that.
>
Maybe we can make the XRCs  usable for both systems. frmConnect seems
ok, frmOptions is a mess.

>That should work already if you use sysSettings. We spent some time on
>that before Christmas making it work correctly in *nix and Win32. In
>win32 it uses the registry, and on *nix, it uses ~/.pgadmin3 iirc.
>
>
Unfortunately, it doesn't work right now. Might happen because GTK
throws several exceptions at program exit.

Regards,
Andreas


Re: pgadmin3 GTK

From
Andreas Pflug
Date:
>
>> That should work already if you use sysSettings. We spent some time on
>> that before Christmas making it work correctly in *nix and Win32. In
>> win32 it uses the registry, and on *nix, it uses ~/.pgadmin3 iirc.
>>
>>
> Unfortunately, it doesn't work right now. Might happen because GTK
> throws several exceptions at program exit.


Confirmed: was caused by the crash.
Fixed now, and right from the start the most usable tool for pgsql I
know under *nix :-)

Regards,
Andreas


Re: pgadmin3 GTK

From
"Dave Page"
Date:

> -----Original Message-----
> From: Andreas Pflug [mailto:Andreas.Pflug@web.de]
> Sent: 08 April 2003 15:57
> To: Dave Page; pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] pgadmin3 GTK
>
>
> >
> >> That should work already if you use sysSettings. We spent
> some time
> >> on that before Christmas making it work correctly in *nix
> and Win32.
> >> In win32 it uses the registry, and on *nix, it uses
> ~/.pgadmin3 iirc.
> >>
> >>
> > Unfortunately, it doesn't work right now. Might happen because GTK
> > throws several exceptions at program exit.
>
>
> Confirmed: was caused by the crash.

Nice one. Thanks.

> Fixed now, and right from the start the most usable tool for pgsql I
> know under *nix :-)

We aim to please :-)

Regards, Dave.


Re: pgadmin3 GTK

From
efesar
Date:
> Please do not use
>     for (int si=0 ; ...)
> Instead, declare int si; separately. You never know what the compiler
> really does from that.

Good to know. I'll make sure that's in future code.

> I found several OnXXX() methods, that are probably used in EventMaps, I
> didn't check this. Please make sure they have the correct arguments. If
> they don't have a sufficient argument, you won't be able to run a
> Release-Build. Unfortunately, the compiler will not warn you about this.

As far as I know, I've used the correct event maps. Hopefully I'm using the
correct number of arguments on everything, but I'm not 100% sure (sometimes
the docs are not explicit, and the only way to know for sure is by seeing
examples). As I'm coding I'll double check them.

One concept I'm having trouble understanding is the WXUNUSED macro.

-Keith


Re: pgadmin3 GTK

From
Andreas Pflug
Date:
efesar wrote:

>As far as I know, I've used the correct event maps. Hopefully I'm using the
>correct number of arguments on everything, but I'm not 100% sure (sometimes
>the docs are not explicit, and the only way to know for sure is by seeing
>examples). As I'm coding I'll double check them.
>
>One concept I'm having trouble understanding is the WXUNUSED macro.
>
>
>
Keith,

rules are quite simple. Every OnXXX method must have exactly one
argument, and it must be wxEvent& or something derived from that to make
the return stack cleanup functions happy.

The WXUNUSED is just to make some compilers not to complain about unused
parameters. No problem if you don't use it.

Regards,
Andreas