Re: Server Status window work

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: Server Status window work
Date: 2009-02-10 20:33:25
Message-ID: 4991E495.8010304@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi,

Dave Page a écrit :
> [...]
> On Tue, Feb 3, 2009 at 5:07 PM, Guillaume Lelarge
> <guillaume(at)lelarge(dot)info> wrote:
>
>>> - If a tab is closed and re-opened (from the View menu), it returns to
>>> it's default position on the tabset, not to whereever it previously
>>> was.
>>>
>>> - The tab layout is not remembered if the window is closed and reopened.
>>>
>> The last two ones aren't done on purpose.
>>
>> On the first one, it doesn't return on its default position but on the
>> last position. I don't think it's really interesting and it will be
>> difficult to do. For example, how do we handle the case when we have
>> multiple notebooks?
>
> It does seem to go to the default position here. If I close the a tab,
> then no matter where it was, it returns to the end on the main tabset.
>

Yes, I wanted to say this :) sorry, my explanations weren't good.

> Thinking back to the original AUI code, iirc, it's the manager that
> actually remembers where everything is, so I can see it may be hard to
> implement for tabs. I'm don't think it's that important.
>

If there's only one notebook, it's easy to remember one tab's location
when it's closed. But if there are many split part of a notebook, I
can't add a tab to a specific split part.

>> On the second one, if we try to remember the tab layout (not difficult),
>> do we also need to remember the pane layout? much more difficult.
>
> We should certainly record and restore the perspective (as we seem to
> be), but it doesn't appear to be doing anything. I would expect the
> layout to be restored, so if I run the tool every morning with a
> preferred layout (say three tabs, two at the top, one below, all
> visible at once) I don't have to re-layout everything again. Consider
> Visual Studio, in which the layout is retained but would be quite
> frustrating if it wasn't.
>

I understand, and I agree with you. The application can split a
wxAuiNotebook (with the Split() method). Unfortunately, we can't change
its size, position, and contents. I'm afraid this widget won't allow us
to do what we want.

The only way left is to use multiple panes with one wxAuiNoteBook on
each pane... and disallow the split stuff.

> I also noticed another couple of issues:
>
> - If you place 2 tabs side-by-side, the Refresh button and slider can
> become easily obscured, but it is not obvious that anything has been
> lost. I wonder if we can wrap those controls, or otherwise improve the
> problem somehow. Any ideas?
>

They're already wrapped in a wxFlexGridSizer. I don't think we can do
much with since. Perhaps a toolbar for each tab? but I don't really like
this idea.

> - The tab names should match the text on the View menu. Specifically,
> Status vs. Activity
>

Fixed.

> - After closing a tab, the 'Default View' option can open 2 copies of
> some tabs. It's quite easy to get 6 or more tabs and then have it
> crash.
>

Fixed.

New patch attached.

--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com

Attachment Content-Type Size
serverstatus_p1_v10.patch.bz2 application/x-bzip 10.5 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Chuck McDevitt 2009-02-10 20:51:44 Re: pgAdmin for Greenplum database?
Previous Message Dave Page 2009-02-10 17:09:36 Re: pgAgent: Log connection error message and initial connection