summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-02-14 23:14:31 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-02-15 08:50:08 +0000
commit0ea32acfa5f7d3ab78d4c01ef2cd03ff04503ef8 (patch)
treed5ba44ad74bbbe5c8cbb1f911f150faeaf636fab
parentc163123e1f1ffb7bcaa8f2f09f2830fdfabcaef3 (diff)
move security options dialog to cui and adapt code
Change-Id: Ie1f5c5eb437c55844a524c1219b1e30e5f07b3c3
-rw-r--r--cui/UI_cui.mk1
-rw-r--r--cui/source/inc/helpid.hrc1
-rw-r--r--cui/source/options/securityoptions.cxx14
-rw-r--r--cui/source/options/securityoptions.hxx7
-rw-r--r--cui/source/options/securityoptions.src1
-rw-r--r--cui/uiconfig/ui/securityoptionsdialog.ui (renamed from sw/uiconfig/swriter/ui/securityoptandwarn.ui)181
6 files changed, 86 insertions, 119 deletions
diff --git a/cui/UI_cui.mk b/cui/UI_cui.mk
index 5799a878f4e7..6b259d2554d1 100644
--- a/cui/UI_cui.mk
+++ b/cui/UI_cui.mk
@@ -45,6 +45,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\
cui/uiconfig/ui/pickoutlinepage \
cui/uiconfig/ui/positionpage \
cui/uiconfig/ui/scriptorganizer \
+ cui/uiconfig/ui/securityoptionsdialog \
cui/uiconfig/ui/select_persona_dialog \
cui/uiconfig/ui/specialcharacters \
cui/uiconfig/ui/spellingdialog \
diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc
index f041f41b1ec3..d8541793328f 100644
--- a/cui/source/inc/helpid.hrc
+++ b/cui/source/inc/helpid.hrc
@@ -45,7 +45,6 @@
#define HID_SVXPAGE_JSEARCH_OPTIONS "CUI_HID_SVXPAGE_JSEARCH_OPTIONS"
#define HID_SVXDLG_FILTER_WARNING "CUI_HID_SVXDLG_FILTER_WARNING"
#define HID_SVX_OPTIONS_ONLINEUPDATE "CUI_HID_SVX_OPTIONS_ONLINEUPDATE"
-#define HID_DLG_SECURITY_OPTIONS "CUI_HID_DLG_SECURITY_OPTIONS"
#define HID_OFADLG_OPTIONS_TREE "CUI_HID_OFADLG_OPTIONS_TREE"
#define HID_OFA_CONNPOOL_DRIVERLIST "CUI_HID_OFA_CONNPOOL_DRIVERLIST"
#define UID_OFA_CONNPOOL_DRIVERLIST_BACK "CUI_UID_OFA_CONNPOOL_DRIVERLIST_BACK"
diff --git a/cui/source/options/securityoptions.cxx b/cui/source/options/securityoptions.cxx
index f36f86349733..d0196d3219aa 100644
--- a/cui/source/options/securityoptions.cxx
+++ b/cui/source/options/securityoptions.cxx
@@ -43,10 +43,9 @@ namespace svx
{
//........................................................................
-SecurityOptionsDialog::SecurityOptionsDialog( Window* pParent, SvtSecurityOptions* pOptions ) :
- ModalDialog( pParent, CUI_RES( RID_SVXDLG_SECURITY_OPTIONS ) )
- ,m_aWarningsFL ( this, CUI_RES( FL_WARNINGS ) )
- ,m_aWarningsFI ( this, CUI_RES( FI_WARNINGS ) )
+SecurityOptionsDialog::SecurityOptionsDialog(Window* pParent, SvtSecurityOptions* pOptions)
+ : ModalDialog(pParent, "SecurityOptionsDialog", "cui/ui/securityoptionsdialog.ui")
+
,m_aSaveOrSendDocsFI( this, CUI_RES( FI_SAVESENDDOCS ) )
,m_aSaveOrSendDocsCB( this, CUI_RES( CB_SAVESENDDOCS ) )
,m_aSignDocsFI ( this, CUI_RES( FI_SIGNDOCS ) )
@@ -55,7 +54,6 @@ SecurityOptionsDialog::SecurityOptionsDialog( Window* pParent, SvtSecurityOption
,m_aPrintDocsCB ( this, CUI_RES( CB_PRINTDOCS ) )
,m_aCreatePdfFI ( this, CUI_RES( FI_CREATEPDF ) )
,m_aCreatePdfCB ( this, CUI_RES( CB_CREATEPDF ) )
- ,m_aOptionsFL ( this, CUI_RES( FL_OPTIONS ) )
,m_aRemovePersInfoFI( this, CUI_RES( FI_REMOVEINFO ) )
,m_aRemovePersInfoCB( this, CUI_RES( CB_REMOVEINFO ) )
,m_aRecommPasswdFI ( this, CUI_RES( FI_RECOMMENDPWD ) )
@@ -63,13 +61,7 @@ SecurityOptionsDialog::SecurityOptionsDialog( Window* pParent, SvtSecurityOption
,m_aCtrlHyperlinkFI ( this, CUI_RES( FI_CTRLHYPERLINK ) )
,m_aCtrlHyperlinkCB ( this, CUI_RES( CB_CTRLHYPERLINK ) )
- ,m_aButtonsFL ( this, CUI_RES( FL_BUTTONS ) )
- ,m_aOKBtn ( this, CUI_RES( PB_OK ) )
- ,m_aCancelBtn ( this, CUI_RES( PB_CANCEL ) )
- ,m_aHelpBtn ( this, CUI_RES( PB_HELP ) )
-
{
- FreeResource();
DBG_ASSERT( pOptions, "SecurityOptionsDialog::SecurityOptionsDialog(): invalid SvtSecurityOptions" );
enableAndSet( *pOptions, SvtSecurityOptions::E_DOCWARN_SAVEORSEND, m_aSaveOrSendDocsCB, m_aSaveOrSendDocsFI );
diff --git a/cui/source/options/securityoptions.hxx b/cui/source/options/securityoptions.hxx
index b9ec14e89843..dc9cd0611df8 100644
--- a/cui/source/options/securityoptions.hxx
+++ b/cui/source/options/securityoptions.hxx
@@ -38,8 +38,6 @@ namespace svx
class SecurityOptionsDialog : public ModalDialog
{
private:
- FixedLine m_aWarningsFL;
- FixedInfo m_aWarningsFI;
ReadOnlyImage m_aSaveOrSendDocsFI;
CheckBox m_aSaveOrSendDocsCB;
ReadOnlyImage m_aSignDocsFI;
@@ -49,7 +47,6 @@ namespace svx
ReadOnlyImage m_aCreatePdfFI;
CheckBox m_aCreatePdfCB;
- FixedLine m_aOptionsFL;
ReadOnlyImage m_aRemovePersInfoFI;
CheckBox m_aRemovePersInfoCB;
ReadOnlyImage m_aRecommPasswdFI;
@@ -57,10 +54,6 @@ namespace svx
ReadOnlyImage m_aCtrlHyperlinkFI;
CheckBox m_aCtrlHyperlinkCB;
- FixedLine m_aButtonsFL;
- OKButton m_aOKBtn;
- CancelButton m_aCancelBtn;
- HelpButton m_aHelpBtn;
public:
SecurityOptionsDialog( Window* pParent, SvtSecurityOptions* pOptions );
diff --git a/cui/source/options/securityoptions.src b/cui/source/options/securityoptions.src
index d0f333dbed97..956f0934e2c0 100644
--- a/cui/source/options/securityoptions.src
+++ b/cui/source/options/securityoptions.src
@@ -23,7 +23,6 @@
ModalDialog RID_SVXDLG_SECURITY_OPTIONS
{
- HelpID = HID_DLG_SECURITY_OPTIONS ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( DLG_WIDTH , ROW_10 ) ;
diff --git a/sw/uiconfig/swriter/ui/securityoptandwarn.ui b/cui/uiconfig/ui/securityoptionsdialog.ui
index 24f28cf970cd..53b6bf4eb33e 100644
--- a/sw/uiconfig/swriter/ui/securityoptandwarn.ui
+++ b/cui/uiconfig/ui/securityoptionsdialog.ui
@@ -1,15 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
- <object class="GtkDialog" id="Security options and warnings">
+ <object class="GtkDialog" id="SecurityOptionsDialog">
<property name="can_focus">False</property>
- <property name="border_width">5</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Security options and warnings</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">2</property>
+ <property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
@@ -17,11 +18,11 @@
<child>
<object class="GtkButton" id="ok">
<property name="label">gtk-ok</property>
- <property name="use_action_appearance">False</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_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -33,11 +34,9 @@
<child>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -49,11 +48,9 @@
<child>
<object class="GtkButton" id="help">
<property name="label">gtk-help</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -75,7 +72,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
- <property name="spacing">6</property>
+ <property name="spacing">12</property>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
@@ -86,91 +83,23 @@
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
- <object class="GtkGrid" id="grid1">
+ <object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_top">6</property>
<property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
- <object class="GtkGrid" id="grid2">
+ <object class="GtkCheckButton" id="checkbutton1">
+ <property name="label" translatable="yes">_When saving or sending</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
- <child>
- <object class="GtkCheckButton" id="checkbutton1">
- <property name="label" translatable="yes">~When saving or sending</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton2">
- <property name="label" translatable="yes">When ~signing</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton3">
- <property name="label" translatable="yes">When ~printing</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="checkbutton4">
- <property name="label" translatable="yes">When creating PDF ~files</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -180,6 +109,57 @@
</packing>
</child>
<child>
+ <object class="GtkCheckButton" id="checkbutton2">
+ <property name="label" translatable="yes">When _signing</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton3">
+ <property name="label" translatable="yes">When _printing</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton4">
+ <property name="label" translatable="yes">When creating PDF _files</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -188,7 +168,7 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
+ <property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
@@ -201,6 +181,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Security warnings</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
</child>
</object>
@@ -220,21 +203,20 @@
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_top">6</property>
<property name="row_spacing">6</property>
<child>
<object class="GtkCheckButton" id="checkbutton5">
- <property name="label" translatable="yes">~Remove personal information on saving</property>
- <property name="use_action_appearance">False</property>
+ <property name="label" translatable="yes">_Remove personal information on saving</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
@@ -247,12 +229,11 @@
</child>
<child>
<object class="GtkCheckButton" id="checkbutton6">
- <property name="label" translatable="yes">Recommend password protection on sa~ving</property>
- <property name="use_action_appearance">False</property>
+ <property name="label" translatable="yes">Recommend password protection on sa_ving</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
@@ -265,12 +246,11 @@
</child>
<child>
<object class="GtkCheckButton" id="checkbutton7">
- <property name="label" translatable="yes">Ctrl-click required ~to follow hyperlinks</property>
- <property name="use_action_appearance">False</property>
+ <property name="label" translatable="yes">Ctrl-click required _to follow hyperlinks</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
@@ -290,6 +270,9 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Security options</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
</object>
</child>
</object>