1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-22 19:27:13 +01:00

* ProjectPanel.cpp (ProjectPanel::inspect): fixed #1718 "Inspect

generated files" dialog says "Multiple firewalls" even when there
is only one
This commit is contained in:
Vadim Kurland 2010-09-30 00:19:31 +00:00
parent 031c5e44c4
commit 9f35af7394
3 changed files with 14 additions and 3 deletions

View File

@ -1 +1 @@
#define BUILD_NUM 3285
#define BUILD_NUM 3287

View File

@ -1,5 +1,9 @@
2010-09-29 Vadim Kurland <vadim@vk.crocodile.org>
* ProjectPanel.cpp (ProjectPanel::inspect): fixed #1718 "Inspect
generated files" dialog says "Multiple firewalls" even when there
is only one
* InterfaceEditorWidget.cpp (InterfaceEditorWidget::InterfaceEditorWidget):
added "placeholder" text to the interface name and label input
fields. This text is displayed in greyed-out small font inside

View File

@ -882,7 +882,7 @@ void ProjectPanel::install()
}
void ProjectPanel::inspect(std::set<libfwbuilder::Firewall *> fws)
void ProjectPanel::inspect(set<Firewall *> fws)
{
if (fws.empty())
return;
@ -931,8 +931,10 @@ void ProjectPanel::inspect(std::set<libfwbuilder::Firewall *> fws)
QStringList files;
QSet<Firewall*> filesMissing;
Firewall *first_fw = NULL;
foreach(Firewall *fw, fws)
{
if (first_fw == NULL) first_fw = fw;
QString mainFile = FirewallInstaller::getGeneratedFileFullPath(fw);
if (QFile::exists(mainFile))
{
@ -987,7 +989,12 @@ void ProjectPanel::inspect(std::set<libfwbuilder::Firewall *> fws)
if (files.empty())
return;
FirewallCodeViewer *viewer = new FirewallCodeViewer(files, tr("<b>Multiple firewalls</b>"), this);
QString viewer_title;
if (fws.size() > 1) viewer_title = tr("<b>Multiple firewalls</b>");
else viewer_title = QString("<b>%1</b>").arg(first_fw->getName().c_str());
FirewallCodeViewer *viewer =
new FirewallCodeViewer(files, viewer_title, this);
viewer->show();
}