Kaydet (Commit) 31034457 authored tarafından Caolán McNamara's avatar Caolán McNamara

convert view certs tabdialog to .ui

Change-Id: Iee67e273cf19a1af6c4947870bb9f131f0a6cc11
üst 92c8a8fc
......@@ -15,6 +15,7 @@ $(eval $(call gb_UIConfig_add_uifiles,xmlsec,\
xmlsecurity/uiconfig/ui/securitytrustpage \
xmlsecurity/uiconfig/ui/selectcertificatedialog \
xmlsecurity/uiconfig/ui/macrosecuritydialog \
xmlsecurity/uiconfig/ui/viewcertdialog \
))
# vim: set noet sw=4 ts=4:
......@@ -46,9 +46,10 @@ private:
friend class CertificateViewerDetailsTP;
friend class CertificateViewerCertPathTP;
TabControl maTabCtrl;
OKButton maOkBtn;
HelpButton maHelpBtn;
TabControl* mpTabCtrl;
sal_uInt16 mnGeneralId;
sal_uInt16 mnDetailsId;
sal_uInt16 mnPathId;
bool mbCheckForPrivateKey;
......
......@@ -22,7 +22,6 @@
// global resource ids
#define RID_XMLSECDLG_CERTVIEWER 1002
#define RID_XMLSECTP_GENERAL 1003
#define RID_XMLSECTP_DETAILS 1004
#define RID_XMLSECTP_CERTPATH 1005
......
......@@ -46,29 +46,30 @@ CertificateViewer::CertificateViewer(
Window* _pParent,
const css::uno::Reference< css::xml::crypto::XSecurityEnvironment >& _rxSecurityEnvironment,
const css::uno::Reference< css::security::XCertificate >& _rXCert, bool bCheckForPrivateKey )
:TabDialog ( _pParent, XMLSEC_RES( RID_XMLSECDLG_CERTVIEWER ) )
,maTabCtrl ( this, XMLSEC_RES( 1 ) )
,maOkBtn ( this, XMLSEC_RES( BTN_OK ) )
,maHelpBtn ( this, XMLSEC_RES( BTN_HELP ) )
: TabDialog(_pParent, "ViewCertDialog", "xmlsec/ui/viewcertdialog.ui" )
{
FreeResource();
get(mpTabCtrl, "tabcontrol");
mbCheckForPrivateKey = bCheckForPrivateKey;
mxSecurityEnvironment = _rxSecurityEnvironment;
mxCert = _rXCert;
maTabCtrl.SetTabPage( RID_XMLSECTP_GENERAL, new CertificateViewerGeneralTP( &maTabCtrl, this ) );
maTabCtrl.SetTabPage( RID_XMLSECTP_DETAILS, new CertificateViewerDetailsTP( &maTabCtrl, this ) );
maTabCtrl.SetTabPage( RID_XMLSECTP_CERTPATH, new CertificateViewerCertPathTP( &maTabCtrl, this ) );
maTabCtrl.SetCurPageId( RID_XMLSECTP_GENERAL );
mnGeneralId = mpTabCtrl->GetPageId("general");
mnDetailsId = mpTabCtrl->GetPageId("details");
mnPathId = mpTabCtrl->GetPageId("path");
mpTabCtrl->SetTabPage(mnGeneralId, new CertificateViewerGeneralTP( mpTabCtrl, this));
mpTabCtrl->SetTabPage(mnDetailsId, new CertificateViewerDetailsTP( mpTabCtrl, this));
mpTabCtrl->SetTabPage(mnPathId, new CertificateViewerCertPathTP( mpTabCtrl, this));
mpTabCtrl->SetCurPageId(mnGeneralId);
}
CertificateViewer::~CertificateViewer()
{
delete maTabCtrl.GetTabPage( RID_XMLSECTP_CERTPATH );
delete maTabCtrl.GetTabPage( RID_XMLSECTP_DETAILS );
delete maTabCtrl.GetTabPage( RID_XMLSECTP_GENERAL );
delete mpTabCtrl->GetTabPage(mnGeneralId);
delete mpTabCtrl->GetTabPage(mnDetailsId);
delete mpTabCtrl->GetTabPage(mnPathId);
}
CertificateViewerTP::CertificateViewerTP( Window* _pParent, const ResId& _rResId, CertificateViewer* _pDlg )
......
......@@ -20,53 +20,6 @@
#include "dialogs.hrc"
#include "helpids.hrc"
TabDialog RID_XMLSECDLG_CERTVIEWER
{
HelpID = HID_XMLSEC_DLG_CERTVIEWER;
Size = MAP_APPFONT( TD_WIDTH, TD_HEIGHT );
OutputSize = TRUE;
Closeable = TRUE;
Moveable = TRUE;
SVLook = TRUE;
Text [ en-US ] = "View Certificate";
TabControl 1
{
Pos = MAP_APPFONT( TD_SP_INNERBORDER_LEFT, TD_SP_INNERBORDER_TOP );
Size = MAP_APPFONT( TP_WIDTH, TP_HEIGHT+RIDDER_HEIGHT );
SVLook = TRUE ;
PageList =
{
PageItem
{
Identifier = RID_XMLSECTP_GENERAL;
Text [ en-US ] = "General";
};
PageItem
{
Identifier = RID_XMLSECTP_DETAILS;
Text [ en-US ] = "Details";
};
PageItem
{
Identifier = RID_XMLSECTP_CERTPATH;
Text [ en-US ] = "Certification Path";
};
};
};
OKButton BTN_OK
{
Pos = MAP_APPFONT( CV_COL_A, CV_ROW_A );
Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
DefButton = TRUE;
};
HelpButton BTN_HELP
{
Pos = MAP_APPFONT( CV_COL_C, CV_ROW_A );
Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
};
};
TabPage RID_XMLSECTP_GENERAL
{
HelpId = HID_XMLSEC_TP_GENERAL;
......
......@@ -24,7 +24,6 @@
// Help-Ids --------------------------------------------------------------
#define HID_XMLSEC_DLG_CERTVIEWER "XMLSECURITY_HID_XMLSEC_DLG_CERTVIEWER"
#define HID_XMLSEC_TP_GENERAL "XMLSECURITY_HID_XMLSEC_TP_GENERAL"
#define HID_XMLSEC_TP_DETAILS "XMLSECURITY_HID_XMLSEC_TP_DETAILS"
#define HID_XMLSEC_TP_CERTPATH "XMLSECURITY_HID_XMLSEC_TP_CERTPATH"
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.0 on Thu Jan 30 09:59:07 2014 -->
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkDialog" id="ViewCertDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">View Certificate</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="ok">
<property name="label">gtk-ok</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="help">
<property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkNotebook" id="tabcontrol">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
<placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="general">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">General</property>
</object>
<packing>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="details">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Details</property>
</object>
<packing>
<property name="position">1</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="path">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Certification Path</property>
</object>
<packing>
<property name="position">2</property>
<property name="tab_fill">False</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">ok</action-widget>
<action-widget response="0">help</action-widget>
</action-widgets>
</object>
</interface>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment