summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmlsecurity/inc/xmlsecurity/certificateviewer.hxx3
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.cxx21
-rw-r--r--xmlsecurity/uiconfig/ui/certgeneral.ui176
3 files changed, 105 insertions, 95 deletions
diff --git a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
index eaf2fa901a74..9aae2789e3cf 100644
--- a/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
+++ b/xmlsecurity/inc/xmlsecurity/certificateviewer.hxx
@@ -81,7 +81,8 @@ private:
FixedText* m_pHintNotTrustedFI;
FixedText* m_pIssuedToFI;
FixedText* m_pIssuedByFI;
- FixedText* m_pValidDateFI;
+ FixedText* m_pValidFromDateFI;
+ FixedText* m_pValidToDateFI;
FixedImage* m_pKeyImg;
FixedText* m_pHintCorrespPrivKeyFI;
public:
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index b704530e5ca3..02ce1d8c64ac 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -78,9 +78,10 @@ CertificateViewerGeneralTP::CertificateViewerGeneralTP( Window* _pParent, Certif
{
get( m_pCertImg, "certimage" );
get( m_pHintNotTrustedFI, "hintnotrust" );
- get( m_pIssuedToFI, "issuedto" );
- get( m_pIssuedByFI, "issuedby" );
- get( m_pValidDateFI, "validdate" );
+ get( m_pIssuedToFI, "issued_to_value" );
+ get( m_pIssuedByFI, "issued_by_value" );
+ get( m_pValidFromDateFI, "valid_from_value" );
+ get( m_pValidToDateFI, "valid_to_value" );
get( m_pKeyImg, "keyimage" );
get( m_pHintCorrespPrivKeyFI, "privatekey" );
@@ -107,12 +108,12 @@ CertificateViewerGeneralTP::CertificateViewerGeneralTP( Window* _pParent, Certif
DateTime aDateTimeEnd( DateTime::EMPTY );
utl::typeConvert( xCert->getNotValidBefore(), aDateTimeStart );
utl::typeConvert( xCert->getNotValidAfter(), aDateTimeEnd );
- OUString sText = m_pValidDateFI->GetText();
- sText = sText.replaceFirst( "%SDATE%",
- GetSettings().GetUILocaleDataWrapper().getDate( aDateTimeStart.GetDate() ) );
- sText = sText.replaceFirst( "%EDATE%",
- GetSettings().GetUILocaleDataWrapper().getDate( aDateTimeEnd.GetDate() ) );
- m_pValidDateFI->SetText( sText );
+
+ OUString sValidFromDate = GetSettings().GetUILocaleDataWrapper().getDate( aDateTimeStart.GetDate() );
+ OUString sValidToDate = GetSettings().GetUILocaleDataWrapper().getDate( aDateTimeEnd.GetDate() );
+
+ m_pValidFromDateFI->SetText(sValidFromDate);
+ m_pValidToDateFI->SetText(sValidToDate);
// Check if we have the private key...
bool bHasPrivateKey = false;
@@ -120,7 +121,7 @@ CertificateViewerGeneralTP::CertificateViewerGeneralTP( Window* _pParent, Certif
if ( _pDlg->mbCheckForPrivateKey )
{
long nCertificateCharacters = _pDlg->mxSecurityEnvironment->getCertificateCharacters( xCert );
- bHasPrivateKey = ( nCertificateCharacters & security::CertificateCharacters::HAS_PRIVATE_KEY ) ? sal_True : sal_False;
+ bHasPrivateKey = ( nCertificateCharacters & security::CertificateCharacters::HAS_PRIVATE_KEY );
}
if ( !bHasPrivateKey )
{
diff --git a/xmlsecurity/uiconfig/ui/certgeneral.ui b/xmlsecurity/uiconfig/ui/certgeneral.ui
index 36af4fa1bdbb..4ec69e21b135 100644
--- a/xmlsecurity/uiconfig/ui/certgeneral.ui
+++ b/xmlsecurity/uiconfig/ui/certgeneral.ui
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.1 -->
+<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.10"/>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
<object class="GtkBox" id="CertGeneral">
<property name="visible">True</property>
@@ -15,13 +16,12 @@
<object class="GtkImage" id="certimage">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_left">12</property>
- <property name="margin_top">12</property>
<property name="pixbuf">xmlsecurity/res/certificate_40x56.png</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
+ <property name="padding">6</property>
<property name="position">0</property>
</packing>
</child>
@@ -29,9 +29,6 @@
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_left">24</property>
- <property name="margin_top">12</property>
- <property name="margin_bottom">12</property>
<property name="label" translatable="yes">Certificate Information</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -47,6 +44,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
+ <property name="padding">6</property>
<property name="position">0</property>
</packing>
</child>
@@ -69,7 +67,7 @@
<property name="margin_right">36</property>
<property name="margin_bottom">108</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">This certificate is intended for the following purpose(s):</property>
+ <property name="label" translatable="yes">This certificate is validated.</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -92,106 +90,81 @@
</packing>
</child>
<child>
- <object class="GtkBox" id="box4">
+ <object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="orientation">vertical</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
<child>
- <object class="GtkBox" id="box5">
+ <object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <child>
- <object class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_left">12</property>
- <property name="label" translatable="yes">Issued to: </property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="issuedto">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Issued to: </property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
- <object class="GtkBox" id="box6">
+ <object class="GtkLabel" id="issued_to_value">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_left">12</property>
- <property name="label" translatable="yes">Issued by: </property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="issuedby">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="hexpand">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="validdate">
+ <object class="GtkLabel" id="issued_by">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_left">12</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Valid from %SDATE% to %EDATE%</property>
+ <property name="label" translatable="yes">Issued by: </property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="issued_by_value">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="valid_from">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Valid from:</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
- <object class="GtkBox" id="box7">
+ <object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
@@ -199,7 +172,6 @@
<object class="GtkImage" id="keyimage">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_left">12</property>
<property name="pixbuf">xmlsecurity/res/key_12.png</property>
</object>
<packing>
@@ -212,7 +184,6 @@
<object class="GtkLabel" id="privatekey">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_left">12</property>
<property name="label" translatable="yes">You have a private key that corresponds to this certificate.</property>
</object>
<packing>
@@ -223,9 +194,46 @@
</child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">3</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">4</property>
+ <property name="width">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="valid_to">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Valid to:</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="valid_from_value">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="valid_to_value">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
</packing>
</child>
</object>