Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
6dae22bd
Kaydet (Commit)
6dae22bd
authored
Nis 01, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert user admin password dialog to .ui
Change-Id: Ia94c3b27b80d8c58e287ae588a5f6a40fb64fa38
üst
545d396c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
221 additions
and
138 deletions
+221
-138
UIConfig_dbaccess.mk
dbaccess/UIConfig_dbaccess.mk
+1
-0
dbaccess_helpid.hrc
dbaccess/inc/dbaccess_helpid.hrc
+0
-1
UserAdmin.cxx
dbaccess/source/ui/dlg/UserAdmin.cxx
+25
-39
UserAdmin.hrc
dbaccess/source/ui/dlg/UserAdmin.hrc
+0
-14
UserAdmin.src
dbaccess/source/ui/dlg/UserAdmin.src
+0
-83
dbu_resource.hrc
dbaccess/source/ui/inc/dbu_resource.hrc
+1
-1
password.ui
dbaccess/uiconfig/ui/password.ui
+194
-0
No files found.
dbaccess/UIConfig_dbaccess.mk
Dosyayı görüntüle @
6dae22bd
...
...
@@ -22,6 +22,7 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \
dbaccess/uiconfig/ui/generalpagewizard \
dbaccess/uiconfig/ui/generatedvaluespage \
dbaccess/uiconfig/ui/joindialog \
dbaccess/uiconfig/ui/password \
dbaccess/uiconfig/ui/queryfilterdialog \
dbaccess/uiconfig/ui/querypropertiesdialog \
dbaccess/uiconfig/ui/relationdialog \
...
...
dbaccess/inc/dbaccess_helpid.hrc
Dosyayı görüntüle @
6dae22bd
...
...
@@ -190,7 +190,6 @@
#define HID_BROWSER_OPEN_DOCUMENT "DBACCESS_HID_BROWSER_OPEN_DOCUMENT"
#define HID_BROWSER_EDIT_DOCUMENT "DBACCESS_HID_BROWSER_EDIT_DOCUMENT"
#define HID_BROWSER_BEW_DOCUMENT "DBACCESS_HID_BROWSER_BEW_DOCUMENT"
#define HID_DLG_PASSWORD "DBACCESS_HID_DLG_PASSWORD"
#define HID_DLGIDX_NEWINDEX "DBACCESS_HID_DLGIDX_NEWINDEX"
#define HID_DLGIDX_DROPINDEX "DBACCESS_HID_DLGIDX_DROPINDEX"
...
...
dbaccess/source/ui/dlg/UserAdmin.cxx
Dosyayı görüntüle @
6dae22bd
...
...
@@ -38,6 +38,7 @@
#include "dbadmin.hxx"
#include "moduledbu.hxx"
#include <vcl/msgbox.hxx>
#include <vcl/layout.hxx>
#include <sfx2/passwd.hxx>
using
namespace
::
com
::
sun
::
star
::
container
;
...
...
@@ -52,16 +53,11 @@ using namespace comphelper;
class
OPasswordDialog
:
public
ModalDialog
{
FixedLine
aFLUser
;
FixedText
aFTOldPassword
;
Edit
aEDOldPassword
;
FixedText
aFTPassword
;
Edit
aEDPassword
;
FixedText
aFTPasswordRepeat
;
Edit
aEDPasswordRepeat
;
OKButton
aOKBtn
;
CancelButton
aCancelBtn
;
HelpButton
aHelpBtn
;
VclFrame
*
m_pUser
;
Edit
*
m_pEDOldPassword
;
Edit
*
m_pEDPassword
;
Edit
*
m_pEDPasswordRepeat
;
OKButton
*
m_pOKBtn
;
DECL_LINK
(
OKHdl_Impl
,
void
*
);
DECL_LINK
(
ModifiedHdl
,
Edit
*
);
...
...
@@ -69,57 +65,47 @@ class OPasswordDialog : public ModalDialog
public
:
OPasswordDialog
(
Window
*
pParent
,
const
OUString
&
_sUserName
);
OUString
GetOldPassword
()
const
{
return
aEDOldPassword
.
GetText
();
}
OUString
GetNewPassword
()
const
{
return
aEDPassword
.
GetText
();
}
OUString
GetOldPassword
()
const
{
return
m_pEDOldPassword
->
GetText
();
}
OUString
GetNewPassword
()
const
{
return
m_pEDPassword
->
GetText
();
}
};
OPasswordDialog
::
OPasswordDialog
(
Window
*
_pParent
,
const
OUString
&
_sUserName
)
:
ModalDialog
(
_pParent
,
ModuleRes
(
DLG_PASSWORD
)
),
aFLUser
(
this
,
ModuleRes
(
FL_USER
)
),
aFTOldPassword
(
this
,
ModuleRes
(
FT_OLDPASSWORD
)
),
aEDOldPassword
(
this
,
ModuleRes
(
ED_OLDPASSWORD
)
),
aFTPassword
(
this
,
ModuleRes
(
FT_PASSWORD
)
),
aEDPassword
(
this
,
ModuleRes
(
ED_PASSWORD
)
),
aFTPasswordRepeat
(
this
,
ModuleRes
(
FT_PASSWORD_REPEAT
)
),
aEDPasswordRepeat
(
this
,
ModuleRes
(
ED_PASSWORD_REPEAT
)
),
aOKBtn
(
this
,
ModuleRes
(
BTN_PASSWORD_OK
)
),
aCancelBtn
(
this
,
ModuleRes
(
BTN_PASSWORD_CANCEL
)
),
aHelpBtn
(
this
,
ModuleRes
(
BTN_PASSWORD_HELP
)
)
OPasswordDialog
::
OPasswordDialog
(
Window
*
_pParent
,
const
OUString
&
_sUserName
)
:
ModalDialog
(
_pParent
,
"PasswordDialog"
,
"dbaccess/ui/password.ui"
)
{
// hide until a help is available
aHelpBtn
.
Hide
();
get
(
m_pUser
,
"userframe"
);
get
(
m_pEDOldPassword
,
"oldpassword"
);
get
(
m_pEDPassword
,
"newpassword"
);
get
(
m_pEDPasswordRepeat
,
"confirmpassword"
);
get
(
m_pOKBtn
,
"ok"
);
FreeResource
();
OUString
sUser
=
aFLUser
.
GetText
();
OUString
sUser
=
m_pUser
->
get_label
();
sUser
=
sUser
.
replaceFirst
(
"$name$: $"
,
_sUserName
);
aFLUser
.
SetText
(
sUser
);
aOKBtn
.
Disable
();
m_pUser
->
set_label
(
sUser
);
m_pOKBtn
->
Disable
();
aOKBtn
.
SetClickHdl
(
LINK
(
this
,
OPasswordDialog
,
OKHdl_Impl
)
);
aEDOldPassword
.
SetModifyHdl
(
LINK
(
this
,
OPasswordDialog
,
ModifiedHdl
)
);
m_pOKBtn
->
SetClickHdl
(
LINK
(
this
,
OPasswordDialog
,
OKHdl_Impl
)
);
m_pEDOldPassword
->
SetModifyHdl
(
LINK
(
this
,
OPasswordDialog
,
ModifiedHdl
)
);
}
IMPL_LINK_NOARG
(
OPasswordDialog
,
OKHdl_Impl
)
{
if
(
aEDPassword
.
GetText
()
==
aEDPasswordRepeat
.
GetText
()
)
if
(
m_pEDPassword
->
GetText
()
==
m_pEDPasswordRepeat
->
GetText
()
)
EndDialog
(
RET_OK
);
else
{
OUString
aErrorMsg
(
ModuleRes
(
STR_ERROR_PASSWORDS_NOT_IDENTICAL
));
ErrorBox
aErrorBox
(
this
,
WB_OK
,
aErrorMsg
);
aErrorBox
.
Execute
();
aEDPassword
.
SetText
(
OUString
()
);
aEDPasswordRepeat
.
SetText
(
OUString
()
);
aEDPassword
.
GrabFocus
();
m_pEDPassword
->
SetText
(
OUString
()
);
m_pEDPasswordRepeat
->
SetText
(
OUString
()
);
m_pEDPassword
->
GrabFocus
();
}
return
0
;
}
IMPL_LINK
(
OPasswordDialog
,
ModifiedHdl
,
Edit
*
,
pEdit
)
{
aOKBtn
.
Enable
(
!
pEdit
->
GetText
().
isEmpty
());
m_pOKBtn
->
Enable
(
!
pEdit
->
GetText
().
isEmpty
());
return
0
;
}
...
...
dbaccess/source/ui/dlg/UserAdmin.hrc
Dosyayı görüntüle @
6dae22bd
...
...
@@ -34,20 +34,6 @@
#define PB_CHANGEPWD 3
#define PB_DELETEUSER 4
#define FT_OLDPASSWORD 19
#define ED_OLDPASSWORD 19
#define FT_PASSWORD 20
#define ED_PASSWORD 21
#define FT_PASSWORD_REPEAT 22
#define ED_PASSWORD_REPEAT 23
#define BTN_PASSWORD_OK 50
#define BTN_PASSWORD_CANCEL 51
#define BTN_PASSWORD_HELP 52
#endif // DBAUI_USERADMIN_HRC
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
dbaccess/source/ui/dlg/UserAdmin.src
Dosyayı görüntüle @
6dae22bd
...
...
@@ -115,89 +115,6 @@ String STR_USERADMIN_NOT_AVAILABLE
Text [ en-US ] = "The database does not support user administration." ;
};
#define EDIT_SIZE_X 50
#define FT_SIZE_X 90
#define WIN_X 220
#define WIN_Y 72
ModalDialog DLG_PASSWORD
{
HelpId = HID_DLG_PASSWORD ;
Border = TRUE ;
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( WIN_X , WIN_Y ) ;
FixedLine FL_USER
{
Pos = MAP_APPFONT ( 3 , 3 ) ;
Size = MAP_APPFONT ( WIN_X - 3 - 6 - 6 - 50 , 8 ) ;
Text [ en-US ] = "User \"$name$: $\"";
};
FixedText FT_OLDPASSWORD
{
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( FT_SIZE_X , 10 ) ;
Text [ en-US ] = "Old p~assword";
};
Edit ED_OLDPASSWORD
{
HelpID = "dbaccess:Edit:DLG_PASSWORD:ED_OLDPASSWORD";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 + FT_SIZE_X , 16 ) ;
Size = MAP_APPFONT ( EDIT_SIZE_X , 12 ) ;
PassWord = TRUE ;
};
FixedText FT_PASSWORD
{
Pos = MAP_APPFONT ( 6 , 35 ) ;
Size = MAP_APPFONT ( FT_SIZE_X , 10 ) ;
Text [ en-US ] = "~Password";
};
Edit ED_PASSWORD
{
HelpID = "dbaccess:Edit:DLG_PASSWORD:ED_PASSWORD";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 + FT_SIZE_X , 34 ) ;
Size = MAP_APPFONT ( EDIT_SIZE_X , 12 ) ;
PassWord = TRUE ;
};
FixedText FT_PASSWORD_REPEAT
{
Pos = MAP_APPFONT ( 6 , 52 ) ;
Size = MAP_APPFONT ( FT_SIZE_X , 10 ) ;
Text [ en-US ] = "~Confirm password";
};
Edit ED_PASSWORD_REPEAT
{
HelpID = "dbaccess:Edit:DLG_PASSWORD:ED_PASSWORD_REPEAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 + FT_SIZE_X , 51 ) ;
Size = MAP_APPFONT ( EDIT_SIZE_X , 12 ) ;
PassWord = TRUE ;
};
OKButton BTN_PASSWORD_OK
{
Pos = MAP_APPFONT ( WIN_X - 56 , 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
DefButton = TRUE ;
};
CancelButton BTN_PASSWORD_CANCEL
{
Pos = MAP_APPFONT ( WIN_X - 56 , 23 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
HelpButton BTN_PASSWORD_HELP
{
Pos = MAP_APPFONT ( WIN_X - 56 , 43 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
Text [ en-US ] = "Change Password";
};
String STR_ERROR_PASSWORDS_NOT_IDENTICAL
{
Text [ en-US ] = "The passwords do not match. Please enter the password again.";
...
...
dbaccess/source/ui/inc/dbu_resource.hrc
Dosyayı görüntüle @
6dae22bd
...
...
@@ -88,7 +88,7 @@
// FREE
// FREE
// FREE
#define DLG_PASSWORD RID_DIALOG_START + 23
// FREE
#define DLG_COLLECTION_VIEW RID_DIALOG_START + 27
#define DLG_DATABASE_TYPE_CHANGE RID_DIALOG_START + 28
#define DLG_DATABASE_WIZARD RID_DIALOG_START + 29
...
...
dbaccess/uiconfig/ui/password.ui
0 → 100644
Dosyayı görüntüle @
6dae22bd
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface>
<requires
lib=
"gtk+"
version=
"3.0"
/>
<object
class=
"GtkDialog"
id=
"PasswordDialog"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"border_width"
>
6
</property>
<property
name=
"title"
translatable=
"yes"
>
Change Password
</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=
"cancel"
>
<property
name=
"label"
>
gtk-cancel
</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"
>
1
</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=
"GtkFrame"
id=
"userframe"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label_xalign"
>
0
</property>
<property
name=
"shadow_type"
>
none
</property>
<child>
<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"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"row_spacing"
>
6
</property>
<property
name=
"column_spacing"
>
12
</property>
<child>
<object
class=
"GtkEntry"
id=
"oldpassword"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"visibility"
>
False
</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=
"GtkEntry"
id=
"newpassword"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"visibility"
>
False
</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=
"GtkLabel"
id=
"label2"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"label"
translatable=
"yes"
>
Old p_assword
</property>
<property
name=
"use_underline"
>
True
</property>
<property
name=
"mnemonic_widget"
>
oldpassword
</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=
"GtkLabel"
id=
"label3"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"label"
translatable=
"yes"
>
_Password
</property>
<property
name=
"use_underline"
>
True
</property>
<property
name=
"mnemonic_widget"
>
newpassword
</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=
"GtkLabel"
id=
"label4"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"label"
translatable=
"yes"
>
_Confirm password
</property>
<property
name=
"use_underline"
>
True
</property>
<property
name=
"mnemonic_widget"
>
confirmpassword
</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=
"GtkEntry"
id=
"confirmpassword"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"visibility"
>
False
</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>
</object>
</child>
</object>
</child>
<child
type=
"label"
>
<object
class=
"GtkLabel"
id=
"label1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
User "$name$: $"
</property>
<attributes>
<attribute
name=
"weight"
value=
"bold"
/>
</attributes>
</object>
</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"
>
cancel
</action-widget>
</action-widgets>
</object>
</interface>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment