summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--uui/AllLangResTarget_uui.mk1
-rw-r--r--uui/Module_uui.mk1
-rw-r--r--uui/UI_uui.mk16
-rw-r--r--uui/source/ids.hrc3
-rw-r--r--uui/source/masterpassworddlg.cxx23
-rw-r--r--uui/source/masterpassworddlg.hrc33
-rw-r--r--uui/source/masterpassworddlg.hxx11
-rw-r--r--uui/source/masterpassworddlg.src69
-rw-r--r--uui/uiconfig/ui/masterpassworddlg.ui (renamed from sw/uiconfig/swriter/ui/entermasterpassword.ui)26
9 files changed, 41 insertions, 142 deletions
diff --git a/uui/AllLangResTarget_uui.mk b/uui/AllLangResTarget_uui.mk
index 010a74a433d2..646e311dc406 100644
--- a/uui/AllLangResTarget_uui.mk
+++ b/uui/AllLangResTarget_uui.mk
@@ -53,7 +53,6 @@ $(eval $(call gb_SrsTarget_add_files,uui/res,\
uui/source/lockfailed.src \
uui/source/logindlg.src \
uui/source/masterpasscrtdlg.src \
- uui/source/masterpassworddlg.src \
uui/source/nameclashdlg.src \
uui/source/newerverwarn.src \
uui/source/openlocked.src \
diff --git a/uui/Module_uui.mk b/uui/Module_uui.mk
index 09e9715e190e..e70e94edc8e4 100644
--- a/uui/Module_uui.mk
+++ b/uui/Module_uui.mk
@@ -31,6 +31,7 @@ $(eval $(call gb_Module_Module,uui))
$(eval $(call gb_Module_add_targets,uui,\
AllLangResTarget_uui \
Library_uui \
+ UI_uui \
))
# vim: set noet sw=4 ts=4:
diff --git a/uui/UI_uui.mk b/uui/UI_uui.mk
new file mode 100644
index 000000000000..114725aeeec2
--- /dev/null
+++ b/uui/UI_uui.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UI_UI,uui))
+
+$(eval $(call gb_UI_add_uifiles,uui,\
+ uui/uiconfig/ui/masterpassworddlg \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/uui/source/ids.hrc b/uui/source/ids.hrc
index 8803ffe83051..ea6e58ea9a09 100644
--- a/uui/source/ids.hrc
+++ b/uui/source/ids.hrc
@@ -26,8 +26,6 @@
#define RID_SAVE_PASSWORD (RID_UUI_START + 1)
#define DLG_UUI_LOGIN (RID_UUI_START + 2)
#define DLG_FILTER_SELECT (RID_UUI_START + 10)
-// RID_UUI_START + 11 moved to ERRCODE_UUI_WRONGMEDIUM
-#define DLG_UUI_MASTERPASSWORD (RID_UUI_START + 12)
#define DLG_SIMPLE_NAME_CLASH (RID_UUI_START + 13)
#define STR_ERROR_PASSWORDS_NOT_IDENTICAL (RID_UUI_START + 13)
#define STR_ERROR_MASTERPASSWORD_WRONG (RID_UUI_START + 14)
@@ -157,7 +155,6 @@
#define TITLE_UUI_SSLWARN_INVALID (ERRCODE_AREA_UUI_UNKNOWNAUTH + SSLWARN_TYPE_INVALID + 3)
#define HID_DLG_LOGIN "UUI_HID_DLG_LOGIN"
-#define HID_DLG_MASTERPASSWORD_UUI "UUI_HID_DLG_MASTERPASSWORD_UUI"
#define HID_DLG_MASTERPASSWORD_CRT "UUI_HID_DLG_MASTERPASSWORD_CRT"
#define HID_DLG_FILTER_SELECT "UUI_HID_DLG_FILTER_SELECT"
#define HID_DLG_PASSWORD_UUI "UUI_HID_DLG_PASSWORD_UUI"
diff --git a/uui/source/masterpassworddlg.cxx b/uui/source/masterpassworddlg.cxx
index a2f5c285dd40..07f11af3f554 100644
--- a/uui/source/masterpassworddlg.cxx
+++ b/uui/source/masterpassworddlg.cxx
@@ -20,7 +20,6 @@
#include <vcl/msgbox.hxx>
#include <ids.hrc>
-#include <masterpassworddlg.hrc>
#include <masterpassworddlg.hxx>
// MasterPasswordDialog---------------------------------------------------
@@ -40,19 +39,13 @@ MasterPasswordDialog::MasterPasswordDialog
Window* pParent,
::com::sun::star::task::PasswordRequestMode aDialogMode,
ResMgr* pResMgr
-) :
-
- ModalDialog( pParent, ResId( DLG_UUI_MASTERPASSWORD, *pResMgr ) ),
-
- aFTMasterPassword ( this, ResId( FT_MASTERPASSWORD, *pResMgr ) ),
- aEDMasterPassword ( this, ResId( ED_MASTERPASSWORD, *pResMgr ) ),
- aFL ( this, ResId( FL_FIXED_LINE, *pResMgr ) ),
- aOKBtn ( this, ResId( BTN_MASTERPASSWORD_OK, *pResMgr ) ),
- aCancelBtn ( this, ResId( BTN_MASTERPASSWORD_CANCEL, *pResMgr ) ),
- aHelpBtn ( this, ResId( BTN_MASTERPASSWORD_HELP, *pResMgr ) ),
- nDialogMode ( aDialogMode ),
- pResourceMgr ( pResMgr )
+)
+ : ModalDialog(pParent, "MasterPasswordDialog", "uui/ui/masterpassworddlg.ui")
+ , nDialogMode(aDialogMode)
+ , pResourceMgr(pResMgr)
{
+ get(m_pEDMasterPassword, "password");
+ get(m_pOKBtn, "ok");
if( nDialogMode == ::com::sun::star::task::PasswordRequestMode_PASSWORD_REENTER )
{
String aErrorMsg( ResId( STR_ERROR_MASTERPASSWORD_WRONG, *pResourceMgr ));
@@ -60,9 +53,7 @@ MasterPasswordDialog::MasterPasswordDialog
aErrorBox.Execute();
}
- FreeResource();
-
- aOKBtn.SetClickHdl( LINK( this, MasterPasswordDialog, OKHdl_Impl ) );
+ m_pOKBtn->SetClickHdl( LINK( this, MasterPasswordDialog, OKHdl_Impl ) );
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/masterpassworddlg.hrc b/uui/source/masterpassworddlg.hrc
deleted file mode 100644
index e971c9f1035d..000000000000
--- a/uui/source/masterpassworddlg.hrc
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef UUI_MASTERPASSWORD_HRC
-#define UUI_MASTERPASSWORD_HRC
-
-//============================================================================
-#define FT_MASTERPASSWORD 20
-#define ED_MASTERPASSWORD 21
-#define FT_MASTERPASSWORD_REPEAT 22
-#define ED_MASTERPASSWORD_REPEAT 23
-#define FL_FIXED_LINE 30
-
-#define BTN_MASTERPASSWORD_OK 50
-#define BTN_MASTERPASSWORD_CANCEL 51
-#define BTN_MASTERPASSWORD_HELP 52
-
-#endif // UUI_MASTERPASSWORD_HRC
diff --git a/uui/source/masterpassworddlg.hxx b/uui/source/masterpassworddlg.hxx
index 3407aa2ef347..33658c135ffb 100644
--- a/uui/source/masterpassworddlg.hxx
+++ b/uui/source/masterpassworddlg.hxx
@@ -30,20 +30,15 @@
//============================================================================
class MasterPasswordDialog : public ModalDialog
{
- FixedText aFTMasterPassword;
- Edit aEDMasterPassword;
- FixedLine aFL;
- OKButton aOKBtn;
- CancelButton aCancelBtn;
- HelpButton aHelpBtn;
-
+ Edit* m_pEDMasterPassword;
+ OKButton* m_pOKBtn;
DECL_LINK(OKHdl_Impl, void *);
public:
MasterPasswordDialog( Window* pParent, ::com::sun::star::task::PasswordRequestMode nDlgMode, ResMgr * pResMgr );
- String GetMasterPassword() const { return aEDMasterPassword.GetText(); }
+ OUString GetMasterPassword() const { return m_pEDMasterPassword->GetText(); }
private:
::com::sun::star::task::PasswordRequestMode nDialogMode;
diff --git a/uui/source/masterpassworddlg.src b/uui/source/masterpassworddlg.src
deleted file mode 100644
index 53690b4e198c..000000000000
--- a/uui/source/masterpassworddlg.src
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#define __RSC
-
-#include <ids.hrc>
-#include <masterpassworddlg.hrc>
-
-ModalDialog DLG_UUI_MASTERPASSWORD
-{
- HelpId = HID_DLG_MASTERPASSWORD_UUI;
- Border = TRUE ;
- Moveable = TRUE ;
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 175 , 66 ) ;
- FixedText FT_MASTERPASSWORD
- {
- Pos = MAP_APPFONT ( 3 , 4 ) ;
- Size = MAP_APPFONT ( 169 , 9 ) ;
- Text [ en-US ] = "Enter password";
- };
- Edit ED_MASTERPASSWORD
- {
- HelpID = "uui:Edit:DLG_UUI_MASTERPASSWORD:ED_MASTERPASSWORD";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 3 , 17 ) ;
- Size = MAP_APPFONT ( 169 , 13 ) ;
- PassWord = TRUE ;
- };
- FixedLine FL_FIXED_LINE
- {
- Pos = MAP_APPFONT( 0, 35 );
- Size = MAP_APPFONT( 175, 6 );
- };
-
- OKButton BTN_MASTERPASSWORD_OK
- {
- Pos = MAP_APPFONT ( 65 , 45 ) ;
- Size = MAP_APPFONT ( 51 , 13 ) ;
- DefButton = TRUE ;
- };
- CancelButton BTN_MASTERPASSWORD_CANCEL
- {
- Pos = MAP_APPFONT ( 120 , 45 ) ;
- Size = MAP_APPFONT ( 51 , 13 ) ;
- };
- HelpButton BTN_MASTERPASSWORD_HELP
- {
- Pos = MAP_APPFONT ( 5 , 45 ) ;
- Size = MAP_APPFONT ( 51 , 13 ) ;
- };
- Text [ en-US ] = "Enter Master Password";
-};
diff --git a/sw/uiconfig/swriter/ui/entermasterpassword.ui b/uui/uiconfig/ui/masterpassworddlg.ui
index 18bfc9f0fcbf..ce9daa03d918 100644
--- a/sw/uiconfig/swriter/ui/entermasterpassword.ui
+++ b/uui/uiconfig/ui/masterpassworddlg.ui
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
- <object class="GtkDialog" id="dialog1">
+ <object class="GtkDialog" id="MasterPasswordDialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
+ <property name="title" translatable="yes">Enter Master Password</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
@@ -12,33 +13,31 @@
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
- <property name="halign">center</property>
- <property name="valign">center</property>
+ <property name="homogeneous">True</property>
<property name="layout_style">end</property>
<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>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
+ <property name="secondary">True</property>
</packing>
</child>
<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>
@@ -50,11 +49,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>
@@ -77,13 +74,16 @@
<property name="can_focus">False</property>
<property name="valign">end</property>
<property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0.54000002145767212</property>
- <property name="label" translatable="yes">~Enter password</property>
+ <property name="label" translatable="yes">_Enter password</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">password</property>
</object>
<packing>
<property name="expand">False</property>
@@ -92,10 +92,12 @@
</packing>
</child>
<child>
- <object class="GtkEntry" id="entry1">
+ <object class="GtkEntry" id="password">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="invisible_char">•</property>
+ <property name="visibility">False</property>
+ <property name="activates_default">True</property>
+ <property name="width_chars">35</property>
</object>
<packing>
<property name="expand">False</property>