aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/options/libkvioptions.cpp
diff options
context:
space:
mode:
authorGravatar Szymon Tomasz Stefanek2015-01-02 17:18:58 +0000
committerGravatar Szymon Tomasz Stefanek2015-01-02 17:18:58 +0000
commit2c898011cfb94c8b629a96b494e652a2f39c1544 (patch)
tree0b1cf0d95758b1da7b8c146d9c48883e0ccaae97 /src/modules/options/libkvioptions.cpp
parentfixed doc, fix for #1373 (diff)
downloadKVIrc-2c898011cfb94c8b629a96b494e652a2f39c1544.tar.gz
KVIrc-2c898011cfb94c8b629a96b494e652a2f39c1544.tar.bz2
KVIrc-2c898011cfb94c8b629a96b494e652a2f39c1544.zip
Make options dialogs modal. Fixes ugly focus issues.
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@6431 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/options/libkvioptions.cpp')
-rw-r--r--src/modules/options/libkvioptions.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/modules/options/libkvioptions.cpp b/src/modules/options/libkvioptions.cpp
index 8205591f8..a3d15a060 100644
--- a/src/modules/options/libkvioptions.cpp
+++ b/src/modules/options/libkvioptions.cpp
@@ -128,6 +128,7 @@ static bool options_kvs_cmd_dialog(KviKvsModuleCommandCall * c)
}
g_pOptionsDialogDict->insert(szGroup,d);
}
+ d->setModal(true);
d->raise();
d->show();
d->setFocus();
@@ -181,7 +182,7 @@ static bool options_kvs_cmd_pages(KviKvsModuleCommandCall * c)
@type:
command
@title:
- options.edit [-m]
+ options.edit [-n]
@short:
Shows a single options page
@syntax:
@@ -189,8 +190,7 @@ static bool options_kvs_cmd_pages(KviKvsModuleCommandCall * c)
@description:
Shows an options page as toplevel dialog.
The available option pages can be listed by using [cmd]options.pages[/cmd].
- If the -m switch is used, the dialog will appear as modal, blocking input
- to the main frame until it's closed.
+ If the -n switch is used then dialog will appear as NON modal (will not block input).
@seealso:
*/
@@ -200,6 +200,7 @@ static bool options_kvs_cmd_edit(KviKvsModuleCommandCall * c)
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("option",KVS_PT_STRING,0,szOption)
KVSM_PARAMETERS_END(c)
+
OptionsWidgetInstanceEntry * e = g_pOptionsInstanceManager->findInstanceEntry(szOption.toUtf8().data());
if(!e)
{
@@ -217,11 +218,13 @@ static bool options_kvs_cmd_edit(KviKvsModuleCommandCall * c)
OptionsWidgetContainer * wc = new OptionsWidgetContainer(
0,
- c->hasSwitch('m',"modal")
+ !c->hasSwitch('n',"non-modal")
);
wc->setup(g_pOptionsInstanceManager->getInstance(e,wc));
+ //wc->setModal(true);
+
// a trick for the dialog covering the splash screen before the time (this is prolly a WM or Qt bug)
if(g_pSplashScreen)
{