Re: Fwd: Filter by Selection on Grid - Mailing list pgadmin-hackers

From Dave Page
Subject Re: Fwd: Filter by Selection on Grid
Date
Msg-id 937d27e10802060231t62b5f597lbd2257c1f2a4d45f@mail.gmail.com
Whole thread Raw
In response to Re: Fwd: Filter by Selection on Grid  ("Robins Tharakan" <robins@pobox.com>)
Responses Re: Fwd: Filter by Selection on Grid
List pgadmin-hackers
On Feb 5, 2008 5:57 PM, Robins Tharakan <robins@pobox.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

pgadmin-hackers by date:

Previous
From: svn@pgadmin.org
Date:
Subject: SVN Commit by dpage: r7060 - trunk/pgadmin3/pgadmin/frm
Next
From: "Robins Tharakan"
Date:
Subject: Re: Fwd: Filter by Selection on Grid