mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-11 15:41:41 +02:00
bugfix 2641,2656
This commit is contained in:
@@ -83,7 +83,23 @@ void RuleOptionsDialog::loadFWObject(FWObject *o)
|
|||||||
|
|
||||||
Rule *rule = dynamic_cast<Rule*>(o);
|
Rule *rule = dynamic_cast<Rule*>(o);
|
||||||
FWOptions *ropt = rule->getOptionsObject();
|
FWOptions *ropt = rule->getOptionsObject();
|
||||||
|
m_dialog->icon->setVisible(false);
|
||||||
|
PolicyRule *policyRule = PolicyRule::cast( rule );
|
||||||
|
NATRule *natRule = NATRule::cast( rule );
|
||||||
|
RoutingRule *routingRule = RoutingRule::cast( rule );
|
||||||
|
if (policyRule && policyRule->getLogging())
|
||||||
|
{
|
||||||
|
|
||||||
|
m_dialog->icon->setVisible(true);
|
||||||
|
m_dialog->icon->setPixmap (QIcon(":/Icons/Log").pixmap (25,25));
|
||||||
|
}
|
||||||
|
if ((policyRule && ! isDefaultPolicyRuleOptions( rule->getOptionsObject())) ||
|
||||||
|
(routingRule && ! isDefaultRoutingRuleOptions( rule->getOptionsObject())) ||
|
||||||
|
(natRule && ! isDefaultNATRuleOptions( rule->getOptionsObject())))
|
||||||
|
{
|
||||||
|
m_dialog->icon->setVisible(true);
|
||||||
|
m_dialog->icon->setPixmap (QIcon(":/Icons/Options").pixmap (25,25));
|
||||||
|
}
|
||||||
m_dialog->editorTitle->setText(QString("%1 / %2 / %3 ")
|
m_dialog->editorTitle->setText(QString("%1 / %2 / %3 ")
|
||||||
.arg(QString::fromUtf8(p->getName().c_str()))
|
.arg(QString::fromUtf8(p->getName().c_str()))
|
||||||
.arg(rule->getTypeName().c_str())
|
.arg(rule->getTypeName().c_str())
|
||||||
|
|||||||
@@ -1592,7 +1592,7 @@ void RuleSetView::paintCell(QPainter *pntr,
|
|||||||
p.setPen( cg.highlightedText().color() );
|
p.setPen( cg.highlightedText().color() );
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
p.fillRect(rect, cg.brush( QPalette::Base ));//cg.brush( crole ));
|
p.fillRect(rect, cg.brush( QPalette::Mid ));//cg.brush( crole ));
|
||||||
p.setPen( cg.text().color() );
|
p.setPen( cg.text().color() );
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
|
|||||||
@@ -39,9 +39,76 @@
|
|||||||
<property name="minimumSize" >
|
<property name="minimumSize" >
|
||||||
<size>
|
<size>
|
||||||
<width>16</width>
|
<width>16</width>
|
||||||
<height>20</height>
|
<height>35</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="palette" >
|
||||||
|
<palette>
|
||||||
|
<active>
|
||||||
|
<colorrole role="Base" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Window" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>255</red>
|
||||||
|
<green>254</green>
|
||||||
|
<blue>253</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
</active>
|
||||||
|
<inactive>
|
||||||
|
<colorrole role="Base" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Window" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>255</red>
|
||||||
|
<green>254</green>
|
||||||
|
<blue>253</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
</inactive>
|
||||||
|
<disabled>
|
||||||
|
<colorrole role="Base" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>255</red>
|
||||||
|
<green>254</green>
|
||||||
|
<blue>253</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Window" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>255</red>
|
||||||
|
<green>254</green>
|
||||||
|
<blue>253</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
</disabled>
|
||||||
|
</palette>
|
||||||
|
</property>
|
||||||
|
<property name="autoFillBackground" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<property name="frameShape" >
|
<property name="frameShape" >
|
||||||
<enum>QFrame::Box</enum>
|
<enum>QFrame::Box</enum>
|
||||||
</property>
|
</property>
|
||||||
@@ -67,7 +134,7 @@
|
|||||||
<property name="verticalSpacing" >
|
<property name="verticalSpacing" >
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0" >
|
<item row="0" column="1" >
|
||||||
<widget class="QLabel" name="editorTitle" >
|
<widget class="QLabel" name="editorTitle" >
|
||||||
<property name="font" >
|
<property name="font" >
|
||||||
<font>
|
<font>
|
||||||
@@ -83,6 +150,22 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="0" >
|
||||||
|
<widget class="QLabel" name="icon" >
|
||||||
|
<property name="sizePolicy" >
|
||||||
|
<sizepolicy vsizetype="Preferred" hsizetype="Maximum" >
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="pixmap" >
|
||||||
|
<pixmap resource="MainRes.qrc" >:/Icons/Log</pixmap>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -2342,7 +2425,9 @@
|
|||||||
<tabstop>ipfw_stateless</tabstop>
|
<tabstop>ipfw_stateless</tabstop>
|
||||||
<tabstop>pf_logPrefix</tabstop>
|
<tabstop>pf_logPrefix</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources/>
|
<resources>
|
||||||
|
<include location="MainRes.qrc" />
|
||||||
|
</resources>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
<sender>pf_max_src_states</sender>
|
<sender>pf_max_src_states</sender>
|
||||||
|
|||||||
Reference in New Issue
Block a user