71 if (false == noteString.isNull()) { |
71 if (false == noteString.isNull()) { |
72 if (globalNoteParam->WaitForReady()) { |
72 if (globalNoteParam->WaitForReady()) { |
73 HbDeviceMessageBox messageBox(noteString, type); |
73 HbDeviceMessageBox messageBox(noteString, type); |
74 messageBox.setTimeout(HbDialog::StandardTimeout); |
74 messageBox.setTimeout(HbDialog::StandardTimeout); |
75 messageBox.exec(); |
75 messageBox.exec(); |
76 } else { |
76 } else { |
77 HbDeviceMessageBox *messageBox = new HbDeviceMessageBox( |
77 bool showNote(true); |
78 noteString, type); |
78 for (int i = 0;i<m_messageBoxList.count(); ++i) { |
79 messageBox->setTimeout(HbDialog::StandardTimeout); |
79 // Do not show same note/text several times, e.g when user hits |
80 m_messageBoxList.append(messageBox); |
80 // the end button several times we should show only one "not allowed" |
81 |
81 // note. |
82 if (1 == m_messageBoxList.size()) { |
82 if (noteString == m_messageBoxList.at(i)->text()) { |
83 QObject::connect(messageBox, SIGNAL(aboutToClose()), |
83 showNote = false; |
84 this, SLOT(destroyDialog())); |
84 break; |
85 messageBox->show(); |
85 } |
|
86 } |
|
87 |
|
88 if (showNote) { |
|
89 HbDeviceMessageBox *messageBox = new HbDeviceMessageBox( |
|
90 noteString, type); |
|
91 messageBox->setTimeout(HbDialog::StandardTimeout); |
|
92 m_messageBoxList.append(messageBox); |
|
93 |
|
94 if (1 == m_messageBoxList.size()) { |
|
95 QObject::connect(messageBox, SIGNAL(aboutToClose()), |
|
96 this, SLOT(destroyDialog())); |
|
97 messageBox->show(); |
|
98 } |
86 } |
99 } |
87 } |
100 } |
88 } |
101 } |
89 } |
102 } |
90 |
103 |