Bug 92936 - copy text from documentation
Summary: copy text from documentation
Status: RESOLVED FIXED
Alias: None
Product: quanta
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: András Manţia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-08 22:44 UTC by ratko
Modified: 2004-11-22 12:35 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ratko 2004-11-08 22:44:16 UTC
Version:           3.3.0 (using KDE 3.3.1,  (3.1))
Compiler:          gcc version 3.3.5 (Debian 1:3.3.5-2)
OS:                Linux (i686) release 2.6.8

php documentation is really handy in quanta,
but the examples in it (or any other text) cannot be copied into a file you are working on.

copy - paste just isn't working.
Comment 1 András Manţia 2004-11-13 20:41:22 UTC
Just select and paste with the middle mouse button. Copy/Paste is not working, indeed. But that's a bug, not a missing feature. ;-)
Comment 2 András Manţia 2004-11-22 12:35:37 UTC
CVS commit by amantia: 

Enable full copy/paste from documentation and preview. Until now it worked only with the mouse through the selection.

BUG: 92936


  M +3 -0      ChangeLog   1.321
  M +10 -2     data/dtep/html/o.tag   1.6
  M +1 -1      src/document.cpp   1.330
  M +16 -2     src/quanta.cpp   1.651


--- kdewebdev/quanta/ChangeLog  #1.320:1.321
@@ -38,4 +38,7 @@
         - don't try to add a newly created action to a non-existent All toolbar.
         - don't crash on exit if the user removed an action
+        - enable full copy/paste from documentation and preview. Until now it worked 
+          only with the mouse through the selection. [#92936]
+
 
   - behavioral/user interface changes:

--- kdewebdev/quanta/data/dtep/html/o.tag  #1.5:1.6
@@ -206,12 +206,20 @@
     </attr>
 
-    <attr name="selected" type="check">
+    <attr name="selected" type="list">
         <text>Selected</text>
+        <textlocation col="0" row="1" />
         <location col="1" row="1" />
+        <items>
+          <item>selected</item>
+        </items>
     </attr>
 
-    <attr name="disabled" type="check">
+    <attr name="disabled" type="list">
         <text>Disabled</text>
+        <textlocation col="0" row="2" />
         <location col="1" row="2" />
+        <items>
+          <item>disabled</item>
+        </items>
     </attr>
 

--- kdewebdev/quanta/src/quanta.cpp  #1.650:1.651
@@ -4652,10 +4652,24 @@ void QuantaApp::slotCopy()
     return;
   }
-  if(w)
+  if (w)
   {
     KTextEditor::ClipboardInterface* clip = dynamic_cast<KTextEditor::ClipboardInterface*>(w->view());
-    if(clip)
+    if (clip)
       clip->copy();
   }
+  if (m_htmlPart->view()->hasFocus())
+  {
+    QString selection = m_htmlPart->selectedText();
+    QClipboard *cb = QApplication::clipboard();
+    cb->setText(selection, QClipboard::Clipboard);
+  }
+  else
+  if (m_htmlPartDoc->view()->hasFocus())
+  {
+    QString selection = m_htmlPartDoc->selectedText();
+    QClipboard *cb = QApplication::clipboard();
+    cb->setText(selection, QClipboard::Clipboard);
+  }
+
 }