Author: dpage
Date: 2006-01-09 09:31:15 +0000 (Mon, 09 Jan 2006)
New Revision: 4883
Modified:
trunk/pgadmin3/CHANGELOG.txt
trunk/pgadmin3/src/ctl/ctlSQLResult.cpp
Log:
Honour the copy quoting setting properly in the SQL results pane [Magnus Hagander]
Modified: trunk/pgadmin3/CHANGELOG.txt
===================================================================
--- trunk/pgadmin3/CHANGELOG.txt 2006-01-09 09:22:29 UTC (rev 4882)
+++ trunk/pgadmin3/CHANGELOG.txt 2006-01-09 09:31:15 UTC (rev 4883)
@@ -18,6 +18,7 @@
</ul>
<br>
<ul>
+ <li>2006-01-09 DP 1.4.2 Honour the copy quoting setting properly in the SQL results pane [Magnus Hagander]
<li>2006-01-09 DP Use Ctrl-A to select all results in the query results pane. [Magnus Hagander]
<li>2006-01-09 DP 1.4.2 Set the initial Unicode/Local charset options correctly in the Export dialogue [Magnus
Hagander]
<li>2005-12-26 AP 1.4.2 Fix PK detection in EditGrid per Andrus Moor
Modified: trunk/pgadmin3/src/ctl/ctlSQLResult.cpp
===================================================================
--- trunk/pgadmin3/src/ctl/ctlSQLResult.cpp 2006-01-09 09:22:29 UTC (rev 4882)
+++ trunk/pgadmin3/src/ctl/ctlSQLResult.cpp 2006-01-09 09:31:15 UTC (rev 4883)
@@ -78,19 +78,25 @@
wxString text=GetItemText(row, col);
- bool needQuote=(settings->GetExportQuoting() > 1);
+ bool needQuote = false;
+ if (settings->GetExportQuoting() == 1)
+ {
+ /* Quote strings only */
+ switch (colTypClasses.Item(col))
+ {
+ case PGTYPCLASS_NUMERIC:
+ case PGTYPCLASS_BOOL:
+ break;
+ default:
+ needQuote=true;
+ break;
+ }
+ }
+ else if (settings->GetExportQuoting() == 2)
+ /* Quote everything */
+ needQuote = true;
-
- switch (colTypClasses.Item(col))
- {
- case PGTYPCLASS_NUMERIC:
- case PGTYPCLASS_BOOL:
- break;
- default:
- needQuote=true;
- break;
- }
- if (needQuote)
+ if (needQuote)
str.Append(settings->GetExportQuoteChar());
str.Append(text);
if (needQuote)