Here's a small update to the clipboard support. It adds an option to allow using Tab as the column separator.

Using tab as the separator allows you to paste the results into Excel and OpenOffice Calc while retaining the columns. I haven't had the chance to test it, but I think it will also allow you to paste rows into SQL Server's Enterprise Manager.

We should probably consider making the default copy settings be tab deliminated with no quoting, as that's how both Excel and the SQL Server tools put data into the clipboard.

Ed

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Index: frm/frmOptions.cpp
===================================================================
--- frm/frmOptions.cpp	(revision 5076)
+++ frm/frmOptions.cpp	(working copy)
@@ -109,7 +109,12 @@
     txtIndent->SetValue(NumToStr(settings->GetIndentSpaces()));
 	cbCopyQuote->SetSelection(settings->GetCopyQuoting());
 	cbCopyQuoteChar->SetValue(settings->GetCopyQuoteChar());
-	cbCopySeparator->SetValue(settings->GetCopyColSeparator());
+
+    wxString copySeparator = settings->GetCopyColSeparator();
+    if (copySeparator == wxT("\t"))
+        copySeparator = wxT("Tab");
+    cbCopySeparator->SetValue(copySeparator);
+
 	chkTabForCompletion->SetValue(settings->GetTabForCompletion());
     chkStickySql->SetValue(settings->GetStickySql());
     chkDoubleClickProperties->SetValue(settings->GetDoubleClickProperties());
@@ -228,7 +233,12 @@
     settings->SetIndentSpaces(StrToLong(txtIndent->GetValue()));
 	settings->SetCopyQuoting(cbCopyQuote->GetCurrentSelection());
 	settings->SetCopyQuoteChar(cbCopyQuoteChar->GetValue());
-	settings->SetCopyColSeparator(cbCopySeparator->GetValue());
+	
+    wxString copySeparator = cbCopySeparator->GetValue();
+    if (copySeparator == wxT("Tab"))
+        copySeparator = wxT("\t");
+    settings->SetCopyColSeparator(copySeparator);
+
 	settings->SetTabForCompletion(chkTabForCompletion->GetValue());
     settings->SetStickySql(chkStickySql->GetValue());
     settings->SetDoubleClickProperties(chkDoubleClickProperties->GetValue());
Index: ui/frmOptions.xrc
===================================================================
--- ui/frmOptions.xrc	(revision 5076)
+++ ui/frmOptions.xrc	(working copy)
@@ -370,6 +370,7 @@
             <item>;</item>
             <item>,</item>
             <item>|</item>
+			<item>Tab</item>
            </content>
            <pos>175,110d</pos>
            <size>55,-1d</size>
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to