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

move entermasterpassword.ui to right place and adapt code

Change-Id: Ia0308990eaf1b87de1c7fd673a2a25a45fcfb366
üst 5e11ed7c
......@@ -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 \
......
......@@ -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:
# -*- 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:
......@@ -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"
......
......@@ -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: */
/*
* 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
......@@ -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;
......
/*
* 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";
};
<?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>
......
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