diff --git a/include/TailoringDockWidgets.h b/include/TailoringDockWidgets.h
index 31acfd0d..40080601 100644
--- a/include/TailoringDockWidgets.h
+++ b/include/TailoringDockWidgets.h
@@ -90,6 +90,7 @@ class XCCDFItemPropertiesDockWidget : public QDockWidget
protected slots:
void valueChanged(const QString& newValue);
+ void remarkChanged();
void selectValue(const QUrl& url);
void selectRule(const QUrl& url);
diff --git a/src/TailoringDockWidgets.cpp b/src/TailoringDockWidgets.cpp
index 90343666..a7ab95ad 100644
--- a/src/TailoringDockWidgets.cpp
+++ b/src/TailoringDockWidgets.cpp
@@ -102,6 +102,11 @@ XCCDFItemPropertiesDockWidget::XCCDFItemPropertiesDockWidget(TailoringWindow* wi
this, SLOT(valueChanged(QString))
);
+ QObject::connect(
+ mUI.remarkEdit, SIGNAL(textChanged()),
+ this, SLOT(remarkChanged())
+ );
+
QObject::connect(
mUI.dependsOnValuesBrowser, SIGNAL(anchorClicked(QUrl)),
this, SLOT(selectValue(QUrl))
@@ -330,6 +335,18 @@ void XCCDFItemPropertiesDockWidget::refresh()
}
}
}
+
+ {
+ struct xccdf_select* select = xccdf_policy_get_select_by_id(mXccdfPolicy, xccdf_item_get_id(mXccdfItem));
+ if (select)
+ {
+ struct oscap_text_iterator* remarks = xccdf_select_get_remarks(select);
+ if (remarks && oscap_text_iterator_has_more(remarks))
+ {
+ mUI.remarkEdit->setHtml(oscapTextIteratorGetPreferred(remarks));
+ }
+ }
+ }
}
mRefreshInProgress = false;
@@ -346,6 +363,16 @@ void XCCDFItemPropertiesDockWidget::valueChanged(const QString& newValue)
refresh();
}
+void XCCDFItemPropertiesDockWidget::remarkChanged()
+{
+ if (mRefreshInProgress)
+ return;
+
+ // TODO: Actually push history and set this stuff correctly.
+
+ refresh();
+}
+
void XCCDFItemPropertiesDockWidget::selectValue(const QUrl& url)
{
const QString id = url.fragment();
diff --git a/ui/XCCDFItemPropertiesDockWidget.ui b/ui/XCCDFItemPropertiesDockWidget.ui
index 4e1b3143..be483644 100644
--- a/ui/XCCDFItemPropertiesDockWidget.ui
+++ b/ui/XCCDFItemPropertiesDockWidget.ui
@@ -7,7 +7,7 @@
0
0
400
- 450
+ 978
@@ -21,7 +21,16 @@
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -33,9 +42,9 @@
0
- -281
- 381
- 704
+ 0
+ 398
+ 957
@@ -51,72 +60,84 @@
0
-
-
+
-
+
+
+
+ true
+
+
+
+ Remark
+
+
+
+ -
Qt::Horizontal
- -
-
+
-
+
- true
+ 12
-
-
-
- Title
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+ border: 1px solid #000;
+background: transparent;
-
- 5
+
+ true
-
- titleLineEdit
+
+ true
- -
-
+
-
+
true
-
-
-
- Type
+ Description
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ -
+
+
+
+ 16777215
+ 75
+
-
- 5
+
+ QTextBrowser {border: 1px solid #000;
+background: transparent;}
- -
+
-
Qt::Horizontal
- -
-
-
-
- 0
- 0
-
+
-
+
+
+
+ 16777215
+ 75
+
QTextBrowser {border: 1px solid #000;
@@ -124,59 +145,45 @@ background: transparent;}
- -
+
-
Security Identifiers
- -
-
-
-
- 12
-
-
-
- border: 1px solid #000;
-background: transparent;
-
-
- true
-
-
- true
+
-
+
+
+ Depends on Values
- -
-
+
-
+
- 12
+ true
- border: 1px solid #000;
-background: transparent;
+
-
- true
+
+ ID
-
- true
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- -
-
-
- Depends on Values
+
+ 5
+
+
+ idLineEdit
- -
+
-
@@ -194,7 +201,16 @@ background: transparent;
false
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -240,27 +256,29 @@ background: transparent;
- -
-
-
-
- true
-
-
-
-
-
-
- ID
+
-
+
+
+
+ 0
+ 0
+
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ 16777215
+ 75
+
-
- 5
+
+
+ 0
+ 0
+
-
- idLineEdit
+
+ QTextBrowser {border: 1px solid #000;
+background: transparent;}
@@ -280,65 +298,84 @@ background: transparent;
- -
-
-
-
- 0
- 0
-
-
-
-
- 16777215
- 75
-
+
-
+
+
+ Affects Rules
-
-
- 0
- 0
-
+
+
+ -
+
+
+
+ 12
+
- QTextBrowser {border: 1px solid #000;
-background: transparent;}
+ border: 1px solid #000;
+background: transparent;
+
+
+ true
+
+
+ true
- -
-
+
-
+
true
+
+
+
- Description
+ Title
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ 5
+
+
+ titleLineEdit
- -
-
-
-
- 16777215
- 75
-
+
-
+
+
+
+ true
+
- QTextBrowser {border: 1px solid #000;
-background: transparent;}
+
+
+
+ Type
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ 5
- -
-
-
-
- 16777215
- 75
-
+
-
+
+
+
+ 0
+ 0
+
QTextBrowser {border: 1px solid #000;
@@ -346,10 +383,17 @@ background: transparent;}
- -
-
-
- Affects Rules
+
-
+
+
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;">
+<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html>
+
+
+ true