aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar Fabio Bas2010-08-10 15:24:11 +0000
committerGravatar Fabio Bas2010-08-10 15:24:11 +0000
commite2baf2ccce1dbff7fb16693848149c017675f9e5 (patch)
tree5bc58d41cff0dfe40cd1e15deea524a29f450405 /src/modules
parentfix for #879 (diff)
downloadKVIrc-e2baf2ccce1dbff7fb16693848149c017675f9e5.tar.gz
KVIrc-e2baf2ccce1dbff7fb16693848149c017675f9e5.tar.bz2
KVIrc-e2baf2ccce1dbff7fb16693848149c017675f9e5.zip
Fixed OnUserModeChange event name
Added OnWindowTitleRequest event (implements #804) Expanded window.setWindowTitle so that it can change the title of any type of window git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@4846 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/window/libkviwindow.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/modules/window/libkviwindow.cpp b/src/modules/window/libkviwindow.cpp
index a921373ad..dd44c389c 100644
--- a/src/modules/window/libkviwindow.cpp
+++ b/src/modules/window/libkviwindow.cpp
@@ -1166,9 +1166,7 @@ static bool window_kvs_fnc_open(KviKvsModuleFunctionCall * c)
@description:
Sets the caption of the user window specified by <window_id> to <plain_text_caption>.[br]
If <window_id> is an empty string then the current window is assumed.[br]
- The window must be of type userwnd and must have been created by [fnc]$window.open[/fnc]:
- it is not possible to change the caption of other window types.[br]
- If the window does not exists or is not of the expected type then a warning is printed unless the -q switch is used.[br]
+ If the window does not exists then a warning is printed unless the -q switch is used.[br]
@seealso:
*/
@@ -1194,7 +1192,13 @@ static bool window_kvs_cmd_setWindowTitle(KviKvsModuleCommandCall * c)
{
((KviUserWindow *)pWnd)->setWindowTitleStrings(szPlain);
} else {
- if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs("The specified window is not of type \"userwnd\""));
+ //store the window title (needed for functions that search windows by their captions)
+ ((KviWindow *)pWnd)->setFixedCaption(szPlain);
+
+ if(((KviWindow *)pWnd)->mdiParent())
+ ((KviWindow *)pWnd)->mdiParent()->setWindowTitle(szPlain);
+ else
+ ((KviWindow *)pWnd)->setWindowTitle(szPlain);
}
return true;
}