Re: Fwd: Filter by Selection on Grid

From: "Dave Page" <dpage(at)postgresql(dot)org>
To: "Robins Tharakan" <robins(at)pobox(dot)com>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: Fwd: Filter by Selection on Grid
Date: 2008-02-06 10:31:19
Message-ID: 937d27e10802060231t62b5f597lbd2257c1f2a4d45f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Feb 5, 2008 5:57 PM, Robins Tharakan <robins(at)pobox(dot)com> wrote:

> Sure, I'll try and keep separate patches in separate emails.
> Attached is reworked patch which takes care of the issues that you
> mentioned.
>
> Updates in this patch:
> 1. Removed the extra separator that came up on right-click.
> 2. Enabled / Disabled the menu options while a query is running
> 3. The code also disables the right-click while a thread->IsRunning() is
> true. (That should effectively disable the right-click when not needed right
> ?)

Looks good - applied with minor changes:

- Check that thread is valid before checking if it's running.
- Properly quote/escape column names and text values.
- Adjust the brace style - specifically, remove braces around single
lines of code, and split the onto individual lines, eg. instead of:

if (x = y) {
// do stuff
// in here
} else {
// do other stuff
}

we prefer:

if (x = y)
{
// do stuff
// in here
}
else
// do other stuff

One other thing I noticed that should be fixed in a new patch - if you
sort ascending on a column, and then sort descending, it will add
both. It should remove the ascending and replace it with the
descending sort.

But... an excellent first patch! I hope you'll stick around and come
up with a few more similarly useful features :-)

Thanks, Dave

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Robins Tharakan 2008-02-06 11:02:51 Re: Fwd: Filter by Selection on Grid
Previous Message svn 2008-02-06 10:27:23 SVN Commit by dpage: r7060 - trunk/pgadmin3/pgadmin/frm