Thread: Copy quoting

Copy quoting

From
"Magnus Hagander"
Date:
Hi!

Attached are two patches around the copying-to-clipboard in the query
editor.

The first patch fixes an outright bug - the code attempted to read the
quoting settings, but processed them wrong. pgadmin_copy_quoting1.patch
fixes this.

However, it seems wrong to use the export settings for copy operations.
I prefer to use the same settings for copy always, but may sometimes
need to do one-off changes when it comes to exporting. It also requires
you to export a dummy file if you want to change the quoting options
used for copy/paste.

Therefore, included is also a second patch which creates new config
options for quoting/separating when doing copy, accessed from the main
options screen.

Perhaps one patch on the stable branch and the other one on the trunk?
Assuming they're acceptable, of course :-)

//Magnus

Attachment

Re: Copy quoting

From
"Dave Page"
Date:

> -----Original Message-----
> From: pgadmin-hackers-owner@postgresql.org
> [mailto:pgadmin-hackers-owner@postgresql.org] On Behalf Of
> Magnus Hagander
> Sent: 08 January 2006 14:54
> To: pgadmin-hackers@postgresql.org
> Subject: [pgadmin-hackers] Copy quoting
>
> Hi!
>
> Attached are two patches around the copying-to-clipboard in the query
> editor.
>
> The first patch fixes an outright bug - the code attempted to read the
> quoting settings, but processed them wrong.
> pgadmin_copy_quoting1.patch
> fixes this.

Thanks - I've applied this fix to stable *and* trunk.

> However, it seems wrong to use the export settings for copy
> operations.
> I prefer to use the same settings for copy always, but may sometimes
> need to do one-off changes when it comes to exporting. It
> also requires
> you to export a dummy file if you want to change the quoting options
> used for copy/paste.
>
> Therefore, included is also a second patch which creates new config
> options for quoting/separating when doing copy, accessed from the main
> options screen.

I haven't applied this one for the following reasons:

- It is missing a doc update (don't worry about the screen shot, just
the text).

- The combo box is not wide enough to display 'Strings' in English,
which means it almost certainly will be too small in some other
languages. As a rule of thumb, try to allow 30-50% extra space.

- The 'copy sql from...' option on the options tab now seems too close
to the bottom of the tab. Perhaps the dialogue should be enlarged
slightly?

Cheers, Dave.

Re: Copy quoting

From
"Magnus Hagander"
Date:
> > Therefore, included is also a second patch which creates new config
> > options for quoting/separating when doing copy, accessed
> from the main
> > options screen.
>
> I haven't applied this one for the following reasons:
>
> - It is missing a doc update (don't worry about the screen
> shot, just the text).

Right. Coming up here. Can't generate the right screenshots, wrong
platform ;-)

Indent characters also was not documented. Not really sure what it sets?
(well it sets indenting, but of what?)


> - The combo box is not wide enough to display 'Strings' in
> English, which means it almost certainly will be too small in
> some other languages. As a rule of thumb, try to allow 30-50%
> extra space.

Oh. It does show it fine in the list, but not when selected. Bummer.
Fixed, also enlarged the other fields, so they are all the same width.


> - The 'copy sql from...' option on the options tab now seems
> too close to the bottom of the tab. Perhaps the dialogue
> should be enlarged slightly?

Hmm. It looked reasonable on mine, but yeah, a bit on the close edge.
Enlarged another 15 units.

Well, here's the patch. Also properly anchored this time :-)

//Magnus

Attachment

Re: Copy quoting

From
"Dave Page"
Date:
Thanks, patch applied.

> -----Original Message-----
> From: Magnus Hagander [mailto:mha@sollentuna.net]
> Sent: 10 January 2006 19:52
> To: Dave Page; pgadmin-hackers@postgresql.org
> Subject: RE: [pgadmin-hackers] Copy quoting
>
> > > Therefore, included is also a second patch which creates
> new config
> > > options for quoting/separating when doing copy, accessed
> > from the main
> > > options screen.
> >
> > I haven't applied this one for the following reasons:
> >
> > - It is missing a doc update (don't worry about the screen
> > shot, just the text).
>
> Right. Coming up here. Can't generate the right screenshots, wrong
> platform ;-)
>
> Indent characters also was not documented. Not really sure
> what it sets?
> (well it sets indenting, but of what?)
>
>
> > - The combo box is not wide enough to display 'Strings' in
> > English, which means it almost certainly will be too small in
> > some other languages. As a rule of thumb, try to allow 30-50%
> > extra space.
>
> Oh. It does show it fine in the list, but not when selected. Bummer.
> Fixed, also enlarged the other fields, so they are all the same width.
>
>
> > - The 'copy sql from...' option on the options tab now seems
> > too close to the bottom of the tab. Perhaps the dialogue
> > should be enlarged slightly?
>
> Hmm. It looked reasonable on mine, but yeah, a bit on the close edge.
> Enlarged another 15 units.
>
> Well, here's the patch. Also properly anchored this time :-)
>
> //Magnus
>