|
Lines 136-141
void* Module::getFont( bool /*ok*/, cons
Link Here
|
| 136 |
return dlg; |
136 |
return dlg; |
| 137 |
} |
137 |
} |
| 138 |
|
138 |
|
|
|
139 |
namespace |
| 140 |
{ |
| 141 |
struct btns |
| 142 |
{ |
| 143 |
int buttons[ 3 ]; |
| 144 |
}; |
| 145 |
} |
| 146 |
static QMap< KDialogBase*, btns > msgbox1_buttons; |
| 147 |
|
| 139 |
void* Module::messageBox1( int type, long parent, const QString& caption, const QString& text, |
148 |
void* Module::messageBox1( int type, long parent, const QString& caption, const QString& text, |
| 140 |
int button0, int button1, int button2, const QCString& wmclass1, const QCString& wmclass2 ) |
149 |
int button0, int button1, int button2, const QCString& wmclass1, const QCString& wmclass2 ) |
| 141 |
{ |
150 |
{ |
|
Lines 211-216
void* Module::messageBox1( int type, lon
Link Here
|
| 211 |
prepareDialog( dialog, parent, wmclass1, wmclass2 ); |
220 |
prepareDialog( dialog, parent, wmclass1, wmclass2 ); |
| 212 |
dialog->setPlainCaption( caption ); |
221 |
dialog->setPlainCaption( caption ); |
| 213 |
connect( dialog, SIGNAL( dialogDone( int )), SLOT( dialogDone( int ))); |
222 |
connect( dialog, SIGNAL( dialogDone( int )), SLOT( dialogDone( int ))); |
|
|
223 |
btns b; |
| 224 |
b.buttons[ 0 ] = buttons[ 0 ]; |
| 225 |
b.buttons[ 1 ] = buttons[ 1 ]; |
| 226 |
b.buttons[ 2 ] = buttons[ 2 ]; |
| 227 |
msgbox1_buttons[ dialog ] = b; |
| 214 |
dialog->show(); |
228 |
dialog->show(); |
| 215 |
return dialog; |
229 |
return dialog; |
| 216 |
} |
230 |
} |
|
Lines 290-302
void Module::dialogDone( int result )
Link Here
|
| 290 |
case JobData::MessageBox1: |
304 |
case JobData::MessageBox1: |
| 291 |
{ |
305 |
{ |
| 292 |
KDialogBase* dlg = static_cast< KDialogBase* >( handle ); |
306 |
KDialogBase* dlg = static_cast< KDialogBase* >( handle ); |
|
|
307 |
btns b = msgbox1_buttons[ dlg ]; |
| 293 |
int res; |
308 |
int res; |
| 294 |
if( result == KDialogBase::Cancel ) |
309 |
if( result == KDialogBase::Cancel ) |
| 295 |
res = 2; |
310 |
res = b.buttons[ 2 ]; |
| 296 |
else if( result == KDialogBase::Yes ) |
311 |
else if( result == KDialogBase::Yes ) |
| 297 |
res = 0; |
312 |
res = b.buttons[ 0 ]; |
| 298 |
else |
313 |
else |
| 299 |
res = 1; |
314 |
res = b.buttons[ 1 ]; |
|
|
315 |
msgbox1_buttons.remove( dlg ); |
| 300 |
post_messageBox1( dlg, res ); |
316 |
post_messageBox1( dlg, res ); |
| 301 |
// if (checkboxResult) |
317 |
// if (checkboxResult) |
| 302 |
// saveDontShowAgainYesNo(dontAskAgainName, res); |
318 |
// saveDontShowAgainYesNo(dontAskAgainName, res); |