ossp-pkg/as/as-gui/as_slot.cpp 1.99 -> 1.100
--- as_slot.cpp 2003/01/30 23:48:00 1.99
+++ as_slot.cpp 2003/01/31 14:03:03 1.100
@@ -204,6 +204,21 @@
m_pRefreshact->setEnabled(true);
m_pCutact->setEnabled(true);
m_pCopyact->setEnabled(true);
+
+ // Brighten all the edit controls also
+ m_pLineedit->setEnabled(true);
+ m_pUseredit->setEnabled(true);
+ m_pGuidedit->setEnabled(true);
+ m_pCrcedit->setEnabled(true);
+ m_pRevedit->setEnabled(true);
+ m_pDateedit->setEnabled(true);
+ m_pStarttime->setEnabled(true);
+ m_pEndtime->setEnabled(true);
+ m_pAmount->setEnabled(true);
+ m_pTasks->setEnabled(true);
+ m_pRemark->setEnabled(true);
+
+ // And optionally the RPC actions, too
#ifdef HAVE_MICO
m_pSynciiopact->setEnabled(true);
#endif // HAVE_MICO
@@ -419,7 +434,7 @@
return; // and short circuit
}
catch (Genexcept& Genex) {
- Genex.reportErr(); // Report the error
+// Genex.reportErr(); // Report the error
return; // and short circuit
}
}
@@ -558,6 +573,7 @@
this->saveFile(); // Save changes first
break;
case 1: // Don't save first
+ m_pMaintable->setDirty(false);
break;
case 2: // Do nothing
default:
@@ -567,20 +583,22 @@
}
}
- // Fall through to implicit close code
- this->setCaption(TITRAQ_APPTITLE);
- try { // There might be problems, so wrap these last ops with error handling
- QString Lightsout; // It's late, go to bed
- if (this->isOpen())
- Lightsout = trUtf8("Closed document ") + *this->getFilename();
- this->setOpen(false); // Set doc state to closed
- this->enableIface(false); // Turn off the lights
- m_pStatbar->message(Lightsout, 4000);
- }
- catch (Genexcept& Genex) {
- Genex.reportErr();
+ if (!m_pMaintable->isDirty()) { // Check again
+ // Fall through to implicit close code
+ this->setCaption(TITRAQ_APPTITLE);
+ try { // There might be problems, so wrap these last ops with error handling
+ QString Lightsout; // It's late, go to bed
+ if (this->isOpen())
+ Lightsout = trUtf8("Closed document ") + *this->getFilename();
+ this->setOpen(false); // Set doc state to closed
+ this->enableIface(false); // Turn off the lights
+ m_pStatbar->message(Lightsout, 4000);
+ }
+ catch (Genexcept& Genex) {
+ Genex.reportErr();
+ }
}
- pClosit->ignore(); // Finish off by not closing
+ pClosit->ignore(); // Finish off by not closing
}
//
|
|