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