From: Jaka K. <lyn...@us...> - 2010-06-30 18:45:21
|
gemrb: Infinity Engine emulator The branch master has been updated via 7debcf03e744eb798a235f895708929d73485315 (commit) Summary of changes: gemrb/GUIScripts/GUIClasses.py | 1 - .../GUIScript/{SetEventByName.txt => SetEvent.txt} | 0 gemrb/plugins/GUIScript/GUIScript.cpp | 59 -------------------- 3 files changed, 0 insertions(+), 60 deletions(-) rename gemrb/docs/en/GUIScript/{SetEventByName.txt => SetEvent.txt} (100%) from 754888a96151f01a265131d5db2c65923cbd124c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=7debcf03e744eb798a235f895708929d73485315 commit 7debcf03e744eb798a235f895708929d73485315 Author: Jaka Kranjc <lyn...@us...> Date: Wed Jun 30 20:48:44 2010 +0200 get rid of the now unused SetEventByName and SetTimedEventByName diff --git a/gemrb/GUIScripts/GUIClasses.py b/gemrb/GUIScripts/GUIClasses.py index a6bcee2..0cf63aa 100644 --- a/gemrb/GUIScripts/GUIClasses.py +++ b/gemrb/GUIScripts/GUIClasses.py @@ -99,7 +99,6 @@ class GControl: 'SetText': _GemRB.Control_SetText, 'SetTooltip': _GemRB.Control_SetTooltip, 'SetEvent': _GemRB.Control_SetEvent, - 'SetEventByName': _GemRB.Control_SetEventByName, 'SetStatus': _GemRB.Control_SetStatus, } def AttachScrollBar(self, scrollbar): diff --git a/gemrb/docs/en/GUIScript/SetEventByName.txt b/gemrb/docs/en/GUIScript/SetEvent.txt similarity index 100% rename from gemrb/docs/en/GUIScript/SetEventByName.txt rename to gemrb/docs/en/GUIScript/SetEvent.txt diff --git a/gemrb/plugins/GUIScript/GUIScript.cpp b/gemrb/plugins/GUIScript/GUIScript.cpp index 0c28bbe..d457d38 100644 --- a/gemrb/plugins/GUIScript/GUIScript.cpp +++ b/gemrb/plugins/GUIScript/GUIScript.cpp @@ -1645,31 +1645,6 @@ static PyObject* GemRB_SetTimedEvent(PyObject * /*self*/, PyObject* args) return Py_None; } -PyDoc_STRVAR( GemRB_SetTimedEventByName__doc, -"SetTimedEventByName(FunctionName, Rounds)\n\n" -"Sets a timed event, the timing is handled by the game object\n" -"if the game object doesn't exist, this command is ignored." ); - -static PyObject* GemRB_SetTimedEventByName(PyObject * /*self*/, PyObject* args) -{ - PyObject* funcName; - int rounds; - - if (!PyArg_ParseTuple( args, "Oi", &funcName, &rounds )) { - return AttributeError( GemRB_SetTimedEventByName__doc ); - } - if (!PyString_Check(funcName)) { - return AttributeError( GemRB_SetTimedEventByName__doc ); - } - - Game *game = core->GetGame(); - if (game) { - game->SetTimedEvent(new StringCallback(funcName), rounds); - } - Py_INCREF( Py_None ); - return Py_None; -} - PyDoc_STRVAR( GemRB_Control_SetEvent__doc, "Control.SetEvent(EventMask, Function)\n\n" "Sets an event of a control on a window to a script defined function." ); @@ -1706,38 +1681,6 @@ static PyObject* GemRB_Control_SetEvent(PyObject * /*self*/, PyObject* args) return Py_None; } -PyDoc_STRVAR( GemRB_Control_SetEventByName__doc, -"Control.SetEventByName(EventMask, FunctionName)\n\n" -"Sets an event of a control on a window to a script defined function." ); - -static PyObject* GemRB_Control_SetEventByName(PyObject * /*self*/, PyObject* args) -{ - int WindowIndex, ControlIndex; - int event; - PyObject* funcName; - - if (!PyArg_ParseTuple( args, "iiiO", &WindowIndex, &ControlIndex, &event, - &funcName )) { - return AttributeError( GemRB_Control_SetEventByName__doc ); - } - if (!PyString_Check(funcName)) { - return AttributeError( GemRB_Control_SetEventByName__doc ); - } - - Control* ctrl = GetControl( WindowIndex, ControlIndex, -1 ); - if (!ctrl) - return NULL; - - if (! ctrl->SetEvent( event, new StringCallback(funcName) )) { - char buf[256]; - snprintf( buf, sizeof( buf ), "Can't set event handler: %s!", PyString_AsString(funcName) ); - return RuntimeError( buf ); - } - - Py_INCREF( Py_None ); - return Py_None; -} - PyDoc_STRVAR( GemRB_SetNextScript__doc, "SetNextScript(GUIScriptName)\n\n" "Sets the Next Script File to be loaded." ); @@ -9407,7 +9350,6 @@ static PyMethodDef GemRBMethods[] = { METHOD(SetPurchasedAmount, METH_VARARGS), METHOD(SetRepeatClickFlags, METH_VARARGS), METHOD(SetTimedEvent, METH_VARARGS), - METHOD(SetTimedEventByName, METH_VARARGS), METHOD(SetToken, METH_VARARGS), METHOD(SetTooltipDelay, METH_VARARGS), METHOD(SetupQuickSlot, METH_VARARGS), @@ -9450,7 +9392,6 @@ static PyMethodDef GemRBInternalMethods[] = { METHOD(Control_SetAnimation, METH_VARARGS), METHOD(Control_SetAnimationPalette, METH_VARARGS), METHOD(Control_SetEvent, METH_VARARGS), - METHOD(Control_SetEventByName, METH_VARARGS), METHOD(Control_SetPos, METH_VARARGS), METHOD(Control_SetSize, METH_VARARGS), METHOD(Control_SetStatus, METH_VARARGS), ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |