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

convert new user index dialog to .ui format

Change-Id: I7943c7e388b1cb73311d666ff600a31ac70c2838
üst 6a035215
......@@ -348,7 +348,6 @@
#define HID_TOX_ENTRY_BUTTON "SW_HID_TOX_ENTRY_BUTTON"
#define HID_TOX_ENTRY_EDIT "SW_HID_TOX_ENTRY_EDIT"
#define HID_DLG_NEW_USER_IDX "SW_HID_DLG_NEW_USER_IDX"
#define HID_TOKEN_WINDOW "SW_HID_TOKEN_WINDOW"
#define HID_AUTH_FIELD_IDENTIFIER "SW_HID_AUTH_FIELD_IDENTIFIER"
......
......@@ -26,7 +26,6 @@
#include "rcid.hrc"
#define DLG_INSIDXMARK (RC_INDEX_BEGIN + 3)
#define DLG_MULTMRK (RC_INDEX_BEGIN + 5)
#define STR_TITLE (RC_INDEX_BEGIN + 6)
......@@ -39,14 +38,10 @@
#define STR_IDXMRK_INSERT (RC_INDEX_BEGIN + 13)
#define STR_IDXMRK_EDIT (RC_INDEX_BEGIN + 14)
#define DLG_NEW_USER_IDX (RC_INDEX_BEGIN + 17)
#define STR_FILE_NOT_FOUND (RC_INDEX_BEGIN + 18)
#define DLG_CHANGE_AUTH_ENTRY (RC_INDEX_BEGIN + 19)
#define DLG_CREATE_AUTOMARK (RC_INDEX_BEGIN + 20)
#define DLG_EDIT_IDXMARK_CJK (RC_INDEX_BEGIN + 21)
#define DLG_INSIDXMARK_CJK (RC_INDEX_BEGIN + 22)
#endif // _INDEX_HRC
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -23,58 +23,6 @@
#include "helpid.h"
#include "cmdid.h"
ModalDialog DLG_NEW_USER_IDX
{
OutputSize = TRUE ;
Moveable = TRUE ;
Closeable = TRUE;
Sizeable = FALSE ;
HelpID = HID_DLG_NEW_USER_IDX;
SVLook = TRUE ;
Size = MAP_APPFONT ( 194 , 60 ) ;
OKButton PB_OK
{
Pos = MAP_APPFONT ( 141 , 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
DefButton = TRUE ;
};
CancelButton PB_CANCEL
{
Pos = MAP_APPFONT ( 141 , 23 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
HelpButton PB_HELP
{
Pos = MAP_APPFONT ( 141 , 43 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
FixedLine FL_NAME
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 130 , 8 ) ;
Text [ en-US ] = "New user index";
};
FixedText FT_NAME
{
Pos = MAP_APPFONT ( 12 , 17 ) ;
Size = MAP_APPFONT ( 40 , 8 ) ;
Text [ en-US ] = "~Name";
};
Edit ED_NAME
{
HelpID = "sw:Edit:DLG_NEW_USER_IDX:ED_NAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 55 , 15 ) ;
Size = MAP_APPFONT ( 78 , 12 ) ;
TabStop = TRUE ;
Left = TRUE ;
};
Text [ en-US ] = "Create New User-defined Index";
};
String STR_IDXMRK_EDIT
{
Text [ en-US ] = "Edit Index Entry" ;
......
......@@ -573,36 +573,28 @@ void SwIndexMarkPane::UpdateKeyBoxes()
class SwNewUserIdxDlg : public ModalDialog
{
OKButton aOKPB;
CancelButton aCancelPB;
HelpButton aHelpPB;
FixedLine aNameFL;
FixedText aNameFT;
Edit aNameED;
OKButton* m_pOKPB;
Edit* m_pNameED;
SwIndexMarkPane* pDlg;
SwIndexMarkPane* m_pDlg;
DECL_LINK( ModifyHdl, Edit*);
public:
SwNewUserIdxDlg(SwIndexMarkPane* pPane) :
ModalDialog(&(pPane->GetDialog()), SW_RES(DLG_NEW_USER_IDX)),
aOKPB(this, SW_RES( PB_OK )),
aCancelPB(this, SW_RES( PB_CANCEL )),
aHelpPB(this, SW_RES( PB_HELP )),
aNameFL(this, SW_RES( FL_NAME )),
aNameFT(this, SW_RES( FT_NAME )),
aNameED(this, SW_RES( ED_NAME )),
pDlg(pPane)
SwNewUserIdxDlg(SwIndexMarkPane* pPane)
: ModalDialog(&(pPane->GetDialog()), "NewUserIndexDialog",
"modules/swriter/ui/newuserindexdialog.ui")
, m_pDlg(pPane)
{
FreeResource();
aNameED.SetModifyHdl(LINK(this, SwNewUserIdxDlg, ModifyHdl));
aOKPB.Enable(sal_False);
aNameED.GrabFocus();
get(m_pOKPB, "ok");
get(m_pNameED, "entry");
m_pNameED->SetModifyHdl(LINK(this, SwNewUserIdxDlg, ModifyHdl));
m_pOKPB->Enable(sal_False);
m_pNameED->GrabFocus();
}
virtual void Apply();
String GetName(){return aNameED.GetText();}
String GetName(){return m_pNameED->GetText();}
};
void SwNewUserIdxDlg::Apply()
{
......@@ -610,7 +602,7 @@ void SwNewUserIdxDlg::Apply()
IMPL_LINK( SwNewUserIdxDlg, ModifyHdl, Edit*, pEdit)
{
aOKPB.Enable(!pEdit->GetText().isEmpty() && !pDlg->IsTOXType(pEdit->GetText()));
m_pOKPB->Enable(!pEdit->GetText().isEmpty() && !m_pDlg->IsTOXType(pEdit->GetText()));
return 0;
}
......
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