diff options
| author | 2008-03-20 08:27:16 +0000 | |
|---|---|---|
| committer | 2008-03-20 08:27:16 +0000 | |
| commit | 19dc1cc8cb6179d853d7e34668cab17062326fd0 (patch) | |
| tree | a6e810515d7f78d2e02835c65cd2ea75e8059c30 /src | |
| parent | quick fix (diff) | |
| download | KVIrc-19dc1cc8cb6179d853d7e34668cab17062326fd0.tar.gz KVIrc-19dc1cc8cb6179d853d7e34668cab17062326fd0.tar.bz2 KVIrc-19dc1cc8cb6179d853d7e34668cab17062326fd0.zip | |
Fixed bugs #40(please test command exec() ),#41 (added optional parameter quiet), #42
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@1236 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src')
| -rw-r--r-- | src/kvirc/kvs/kvi_kvs_processmanager.cpp | 1 | ||||
| -rw-r--r-- | src/modules/objects/class_combobox.cpp | 8 | ||||
| -rw-r--r-- | src/modules/window/libkviwindow.cpp | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/kvirc/kvs/kvi_kvs_processmanager.cpp b/src/kvirc/kvs/kvi_kvs_processmanager.cpp index 458acd1b8..e94c4b6e7 100644 --- a/src/kvirc/kvs/kvi_kvs_processmanager.cpp +++ b/src/kvirc/kvs/kvi_kvs_processmanager.cpp @@ -215,6 +215,7 @@ bool KviKvsProcessAsyncOperation::trigger(CallbackEvent e,const QString &szData) } params.append(new KviKvsVariant(szData)); + if (m_pData->pMagic) params.append(m_pData->pMagic); KviKvsVariant retVal; int iRet = m_pData->pCallback->run(m_pData->pWnd,¶ms,&retVal,KviKvsScript::PreserveParams,m_pExtendedRunTimeData); diff --git a/src/modules/objects/class_combobox.cpp b/src/modules/objects/class_combobox.cpp index f8c3d3d6b..fa9341b85 100644 --- a/src/modules/objects/class_combobox.cpp +++ b/src/modules/objects/class_combobox.cpp @@ -71,10 +71,10 @@ If the parameter is ommited, it is assumed to be false. !fn: <boolean> $editable() Returns whether the combobox is editable or not. - !fn: $setEditText(<text:string>) + !fn: $setEditText(<text:string>,[<quiet:bool>]) Sets the text in the embedded line edit to newText without changing the combo's contents. Does nothing if the combo - isn't editable. + isn't editable. If the optional quiet parameter is true no warning will be print if text will be empty. !fn: $clear() Removes all the items from the combo box !fn: $textAt(<index:uint>) @@ -274,11 +274,13 @@ bool KviKvsObject_combobox::functioneditable(KviKvsObjectFunctionCall *c) bool KviKvsObject_combobox::functionsetEditText(KviKvsObjectFunctionCall *c) { QString szText; + bool bQuiet=false; KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETER("text",KVS_PT_STRING,0,szText) + KVSO_PARAMETER("quiet",KVS_PT_BOOLEAN,KVS_PF_OPTIONAL,bQuiet) KVSO_PARAMETERS_END(c) if(!widget()) return true; - if (szText.isEmpty()) c->warning("No string parameter given - using empty string"); + if (szText.isEmpty() && !bQuiet) c->warning("No string parameter given - using empty string"); ((QComboBox *)widget())->setEditText(szText); return true; } diff --git a/src/modules/window/libkviwindow.cpp b/src/modules/window/libkviwindow.cpp index 49c7fc380..bf51ecc93 100644 --- a/src/modules/window/libkviwindow.cpp +++ b/src/modules/window/libkviwindow.cpp @@ -1040,7 +1040,7 @@ static bool window_kvs_fnc_open(KviKvsModuleFunctionCall * c) if(c->parameterList()->count() >= 3) { pConsole = g_pApp->findConsole(uCtx); - if(!pConsole) + if(!pConsole && !szFlags.contains('q')) { c->warning(__tr2qs("The specified IRC context is not valid: creating a context free window")); } |
