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

Tutorial step #5 convert first remaining widget

taking m_aBP_OK as a standalone example:

1.   Change OKButton m_aBP_OK in header to OKButton* m_pBP_OK;
1.1. Remove m_aBP_OK ctor call and change to
     get(<pointer>, "name in .ui file"), e.g.
     get(m_aBP_OK, "ok");
1.1. Mass-convert calls from "m_aBP_OK." to "m_pBP_OK->"
     e.g. :%s/m_aBP_OK./m_pBP_OK->/g
1.2. Search for anyremaining m_aBP_OK instances and adapt

Change-Id: Iadb3ed674413c0b8eca3ba7a00bafaab112d8ff5
üst 1b995cd4
......@@ -50,9 +50,9 @@ ChineseTranslationDialog::ChineseTranslationDialog( Window* pParent )
, m_aRB_To_Traditional( this, TextConversionDlgs_ResId( RB_TO_TRADITIONAL ) )
, m_aCB_Translate_Commonterms( this, TextConversionDlgs_ResId( CB_TRANSLATE_COMMONTERMS ) )
, m_aPB_Editterms( this, TextConversionDlgs_ResId( PB_EDITTERMS ) )
, m_aBP_OK( this, TextConversionDlgs_ResId( PB_OK ) )
, m_pDictionaryDialog(0)
{
get(m_pBP_OK, "ok");
FreeResource();
m_aRB_To_Simplified.SetHelpId( HID_SVX_CHINESE_TRANSLATION_RB_CONVERSION_TO_SIMPLIFIED );
......@@ -72,7 +72,7 @@ ChineseTranslationDialog::ChineseTranslationDialog( Window* pParent )
m_aCB_Translate_Commonterms.Check( bValue );
m_aPB_Editterms.SetClickHdl( LINK( this, ChineseTranslationDialog, DictionaryHdl ) );
m_aBP_OK.SetClickHdl( LINK( this, ChineseTranslationDialog, OkHdl ) );
m_pBP_OK->SetClickHdl( LINK( this, ChineseTranslationDialog, OkHdl ) );
}
ChineseTranslationDialog::~ChineseTranslationDialog()
......
......@@ -58,7 +58,7 @@ private:
CheckBox m_aCB_Translate_Commonterms;
PushButton m_aPB_Editterms;
OKButton m_aBP_OK;
OKButton* m_pBP_OK;
ChineseDictionaryDialog* m_pDictionaryDialog;
};
......
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