[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: QUANTA_3_1_BRANCH: quanta
From: Andras Mantia <amantia () freemail ! hu>
Date: 2003-06-24 15:55:04
[Download RAW message or body]
CVS commit by amantia:
Replace %pid with Quanta's pid and %input with the selected input source in the \
script action line. This allows me to change the BR numbers in the ChangeLog file \
with a simple click to a link to the bug page. The script is as simple as
#!/bin/sh
echo "<a href=\"http://bugs.kde.org/show_bug.cgi?id=$1\">$1</a>"
Available in both HEAD and BRANCH as it's an useful little addition.
CCMAIL:quanta@kde.org
M +3 -0 ChangeLog 1.90.2.80
M +18 -10 quanta/toolbar/tagaction.cpp 1.20.2.9
--- quanta/ChangeLog #1.90.2.79:1.90.2.80
@@ -19,4 +19,7 @@
- default to the project dir when saving a new document [#57654]
- don't insert spaces before CSS values (it disturbs some browsers) [#41227]
+ - replace %pid with Quanta's pid in the script action line
+ - replace %input with the selected input source the script action line
+
Version 3.1.2 (Release date: 12-05-2003)
--- quanta/quanta/toolbar/tagaction.cpp #1.20.2.8:1.20.2.9
@@ -16,4 +16,8 @@
***************************************************************************/
+//other includes
+#include <sys/types.h>
+#include <unistd.h>
+
//qt includes
#include <qdom.h>
@@ -164,4 +168,17 @@ void TagAction::insertTag()
}
+ pid_t pid = getpid();
+ command.replace("%pid", QString("%1").arg(pid));
+ QString buffer;
+ QString inputType = script.attribute("input","none");
+
+ if ( inputType == "current" ) {
+ buffer = w->editIf->text();
+ } else
+ if ( inputType == "selected" ) {
+ buffer = w->selectionIf->selection();
+ }
+ command.replace("%input", buffer);
+
int pos = command.find(' ');
QString args;
@@ -191,17 +208,8 @@ void TagAction::insertTag()
proc->start(KProcess::NotifyOnExit, KProcess::All);
- QString buffer;
-
- QString inputType = script.attribute("input","none");
scriptOutputDest = script.attribute("output","none");
scriptErrorDest = script.attribute("error","none");
- if ( inputType == "current" ) {
- buffer = dynamic_cast<KTextEditor::EditInterface*> (w->doc())->text();
- proc->writeStdin( buffer.local8Bit(), buffer.length() );
- }
-
- if ( inputType == "selected" ) {
- buffer = dynamic_cast<KTextEditor::SelectionInterface*>(w->doc())->selection();
+ if ( inputType == "current" || inputType == "selected" ) {
proc->writeStdin( buffer.local8Bit(), buffer.length() );
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic