aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/dialog
diff options
context:
space:
mode:
authorGravatar wodim2012-01-05 00:32:41 +0000
committerGravatar wodim2012-01-05 00:32:41 +0000
commit0cb68f34bf0f0e166c3548377f1150a4e1a206e8 (patch)
tree6dafd7ea6101c7c9862e8c4811bc511537745c59 /src/modules/dialog
parenta batch of window-management related fixes, they should alleviate (read: fix)... (diff)
downloadKVIrc-0cb68f34bf0f0e166c3548377f1150a4e1a206e8.tar.gz
KVIrc-0cb68f34bf0f0e166c3548377f1150a4e1a206e8.tar.bz2
KVIrc-0cb68f34bf0f0e166c3548377f1150a4e1a206e8.zip
fixes #1246
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@6019 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/dialog')
-rw-r--r--src/modules/dialog/libkvidialog.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/modules/dialog/libkvidialog.cpp b/src/modules/dialog/libkvidialog.cpp
index 22d78f7bc..59326dd0c 100644
--- a/src/modules/dialog/libkvidialog.cpp
+++ b/src/modules/dialog/libkvidialog.cpp
@@ -59,7 +59,7 @@ KviKvsCallbackMessageBox::KviKvsCallbackMessageBox(
const QString &szButton2,
const QString &szCode,
KviKvsVariantList * pMagicParams,
- KviWindow * pWindow,bool)
+ KviWindow * pWindow,bool modal)
: QMessageBox(0),
KviKvsCallbackObject("dialog.message",pWindow,szCode,pMagicParams,0)
{
@@ -67,6 +67,7 @@ KviKvsCallbackMessageBox::KviKvsCallbackMessageBox(
setWindowTitle(szCaption);
setText(szText);
setIcon(QMessageBox::NoIcon);
+ setModal(modal);
QMessageBox::StandardButtons buttons;
bool btn=false;
if (!szButton0.isEmpty()) {btn=true;buttons=QMessageBox::Yes;}
@@ -161,7 +162,7 @@ void KviKvsCallbackMessageBox::done(int code)
to be the escape button of the dialog.[br]
<magic1>,<magic2>... are the magic parameters - evaluated at dialog.message call time and passed
to the <callback_command> as positional parameters.[br]
- If the -b or -modal switch is specified the dialog will have non-blocking modal behaviour -
+ If the -b or -modal switch is specified the dialog will have blocking modal behaviour -
it will appear above its parent widget and block its input until the dialog is closed.[br]
Once the dialog is displayed, the user will click one of the buttons. At this point the dialog
is hidden and the <callback_command> is executed, passing the number of the button clicked
@@ -173,8 +174,8 @@ void KviKvsCallbackMessageBox::done(int code)
[comment]# A question[/comment]
dialog.message("And now ?","What do you want to do ?",information,"Go home","Watch TV","Scream")
{
- if($0 == 0)echo "The user want's to go home"
- else if($0 == 1)echo "The user want's to watch TV"
+ if($0 == 0)echo "The user wants to go home"
+ else if($0 == 1)echo "The user wants to watch TV"
else echo "The user wants to scream!"
}
[/example]
@@ -448,7 +449,7 @@ void KviKvsCallbackTextInput::showEvent(QShowEvent *e)
If the -d switch is used, the initial text input value is set to <default text>.[br]
If the -i switch is used, the dialog displays also the icon <icon> to the left of <info_text>.
<icon> is an image identifier (a relative or absolute path to an image file, or a signed number that maps to an internal KVIrc image). [br]
- If the -b or -modal switch is specified the dialog will have non-blocking modal behaviour:
+ If the -b or -modal switch is specified the dialog will have blocking modal behaviour:
it will appear above its parent widget and block its input until it's closed.[br]
In that case <icon> is an [doc:image_id]image identifier[/doc] (can be a relative or absolute
path to an image file or a signed number (in that case it defines an internal KVIrc image).[br]