diff --git a/build_num b/build_num index 675df142f..60e8ada27 100644 --- a/build_num +++ b/build_num @@ -1 +1 @@ -#define BUILD_NUM 3289 +#define BUILD_NUM 3290 diff --git a/doc/ChangeLog b/doc/ChangeLog index 0c227bd87..e2a0627bb 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,9 @@ +2010-09-30 Vadim Kurland + + * utils.cpp (validateName): fixed #1751 "Don't allow interface + names to be blank". The GUI should not allow the name of any + object to be blank. + 2010-09-29 Vadim Kurland * ProjectPanel.cpp (ProjectPanel::inspect): fixed #1718 "Inspect diff --git a/src/gui/utils.cpp b/src/gui/utils.cpp index 1e33ef42e..fd438f2e3 100644 --- a/src/gui/utils.cpp +++ b/src/gui/utils.cpp @@ -225,6 +225,23 @@ bool isTreeReadWrite(QWidget *parent, FWObject *obj) */ bool validateName(QWidget *parent, FWObject *obj, const QString &newname) { + if (newname.isEmpty()) + { + // show warning dialog only if app has focus + if (QApplication::focusWidget() != NULL) + { + parent->blockSignals(true); + + QMessageBox::warning( + parent, "Firewall Builder", + QObject::tr("Object name should not be blank"), + QObject::tr("&Continue"), NULL, NULL, 0, 2 ); + + parent->blockSignals(false); + } + return false; + } + FWObject *p = obj->getParent(); for (FWObject::iterator i=p->begin(); i!=p->end(); ++i) {