From: <hep...@us...> - 2009-06-07 14:13:27
|
Revision: 902 http://qterm.svn.sourceforge.net/qterm/?rev=902&view=rev Author: hephooey Date: 2009-06-07 13:41:47 +0000 (Sun, 07 Jun 2009) Log Message: ----------- Remove the pos arguments because it is confusing also redundant. Improve the document a little bit. Modified Paths: -------------- trunk/qterm-qt4/doc/script.txt trunk/qterm-qt4/src/qtermbbs.cpp trunk/qterm-qt4/src/scripts/ptt.js trunk/qterm-qt4/src/scripts/smth.js Modified: trunk/qterm-qt4/doc/script.txt =================================================================== --- trunk/qterm-qt4/doc/script.txt 2009-06-07 04:52:36 UTC (rev 901) +++ trunk/qterm-qt4/doc/script.txt 2009-06-07 13:41:47 UTC (rev 902) @@ -101,7 +101,8 @@ Cancel the current zmodem transfer. void setZmodemFileList(const QStringList & fileList) - Set the list of files you want to upload with zmodem. + Set the list of files you want to upload with zmodem. call it before your + start zmodem to avoid the file selection dialog. QScriptValue getLine(int line) Get the object represent the 'line' line text. @@ -166,7 +167,7 @@ This function is called every time the system script is loaded. You can show messages or initiate some variables here. -setCursorType() +setCursorType(x,y) Determine what kind of mouse cursor should be shown in the current context, if mouse release events is not handle by the script this function also determine how the mouse release will be handled. @@ -217,10 +218,10 @@ Determine if there is a IP address under the mouse pointer, return the URL if found, otherwise return a empty string. -onTelnetState() +onTelnetState(int state) Handle telnet events -onZmodemState() +onZmodemState(int type, int value, const QString& msg) Handle zmodem events There is also a signal: scriptEvent(const QString& type) which can be used by Modified: trunk/qterm-qt4/src/qtermbbs.cpp =================================================================== --- trunk/qterm-qt4/src/qtermbbs.cpp 2009-06-07 04:52:36 UTC (rev 901) +++ trunk/qterm-qt4/src/qtermbbs.cpp 2009-06-07 13:41:47 UTC (rev 902) @@ -149,10 +149,9 @@ TextLine * line = m_pBuffer->at(pt.y()); int x = pt.x(); int y = pt.y() - m_nScreenStart; - int pos = line->pos(m_ptCursor.x()); QScriptValue func = m_scriptEngine->globalObject().property("QTerm").property("setCursorType"); if (func.isFunction()) { - int ret = func.call(QScriptValue(), QScriptValueList() << x << y << pos).toInt32(); + int ret = func.call(QScriptValue(), QScriptValueList() << x << y).toInt32(); if (m_scriptHelper->accepted()) { return ret; } Modified: trunk/qterm-qt4/src/scripts/ptt.js =================================================================== --- trunk/qterm-qt4/src/scripts/ptt.js 2009-06-07 04:52:36 UTC (rev 901) +++ trunk/qterm-qt4/src/scripts/ptt.js 2009-06-07 13:41:47 UTC (rev 902) @@ -10,7 +10,7 @@ QTerm.showMessage("system script loaded", 1, 0); } -QTerm.setCursorType = function(x,y,pos) +QTerm.setCursorType = function(x,y) { QTerm.accepted = false; if (QTerm.isLineClickable(x,y)) { Modified: trunk/qterm-qt4/src/scripts/smth.js =================================================================== --- trunk/qterm-qt4/src/scripts/smth.js 2009-06-07 04:52:36 UTC (rev 901) +++ trunk/qterm-qt4/src/scripts/smth.js 2009-06-07 13:41:47 UTC (rev 902) @@ -10,7 +10,7 @@ QTerm.showMessage("system script loaded", 1, 0); } -QTerm.setCursorType = function(x,y,pos) +QTerm.setCursorType = function(x,y) { QTerm.accepted = false; return -1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |