diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-12-16 15:33:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-12-16 15:36:02 +0000 |
commit | 963888a3a03f39d780902e30d03cb0053070412a (patch) | |
tree | 2b026a63703bbd06fb19f4eae4faa66a80c9e5a6 /cui | |
parent | 5964792a5ab8df46475362c36d0620c8bf92223b (diff) |
convert hangul<->hanja new dict dialog to .ui
Change-Id: I18fdd834916aa1e15720698104c5ad989ee61986
Diffstat (limited to 'cui')
-rw-r--r-- | cui/UIConfig_cui.mk | 1 | ||||
-rw-r--r-- | cui/source/dialogs/hangulhanjadlg.cxx | 35 | ||||
-rw-r--r-- | cui/source/dialogs/hangulhanjadlg.hrc | 13 | ||||
-rw-r--r-- | cui/source/dialogs/hangulhanjadlg.src | 52 | ||||
-rw-r--r-- | cui/source/inc/cuires.hrc | 1 | ||||
-rw-r--r-- | cui/source/inc/hangulhanjadlg.hxx | 16 | ||||
-rw-r--r-- | cui/source/inc/helpid.hrc | 1 | ||||
-rw-r--r-- | cui/uiconfig/ui/hangulhanjaadddialog.ui | 151 |
8 files changed, 169 insertions, 101 deletions
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index d90ef3231f8b..486ace413bcf 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -42,6 +42,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/dbregisterpage \ cui/uiconfig/ui/effectspage \ cui/uiconfig/ui/formatcellsdialog \ + cui/uiconfig/ui/hangulhanjaadddialog \ cui/uiconfig/ui/hatchpage \ cui/uiconfig/ui/hyphenate \ cui/uiconfig/ui/insertfloatingframe \ diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index 662f6ef1cb4f..d6fa7ddf96a9 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -1181,11 +1181,11 @@ namespace svx IMPL_LINK_NOARG(HangulHanjaNewDictDialog, OKHdl) { - OUString aName(comphelper::string::stripEnd(m_aDictNameED.GetText(), ' ')); + OUString aName(comphelper::string::stripEnd(m_pDictNameED->GetText(), ' ')); m_bEntered = !aName.isEmpty(); if( m_bEntered ) - m_aDictNameED.SetText( aName ); // do this in case of trailing chars have been deleted + m_pDictNameED->SetText( aName ); // do this in case of trailing chars have been deleted EndDialog( RET_OK ); return 0; @@ -1193,39 +1193,28 @@ namespace svx IMPL_LINK_NOARG(HangulHanjaNewDictDialog, ModifyHdl) { - OUString aName(comphelper::string::stripEnd(m_aDictNameED.GetText(), ' ')); + OUString aName(comphelper::string::stripEnd(m_pDictNameED->GetText(), ' ')); - m_aOkBtn.Enable( !aName.isEmpty() ); + m_pOkBtn->Enable( !aName.isEmpty() ); return 0; } - HangulHanjaNewDictDialog::HangulHanjaNewDictDialog( Window* _pParent ) - :ModalDialog ( _pParent, CUI_RES( RID_SVX_MDLG_HANGULHANJA_NEWDICT ) ) - ,m_aNewDictFL ( this, CUI_RES( FL_NEWDICT ) ) - ,m_aDictNameFT ( this, CUI_RES( FT_DICTNAME ) ) - ,m_aDictNameED ( this, CUI_RES( ED_DICTNAME ) ) - ,m_aOkBtn ( this, CUI_RES( PB_NEWDICT_OK ) ) - ,m_aCancelBtn ( this, CUI_RES( PB_NEWDICT_ESC ) ) - ,m_aHelpBtn ( this, CUI_RES( PB_NEWDICT_HLP ) ) - - ,m_bEntered ( false ) + HangulHanjaNewDictDialog::HangulHanjaNewDictDialog(Window* pParent) + : ModalDialog(pParent, "HangulHanjaAddDialog", "cui/ui/hangulhanjaadddialog.ui") + , m_bEntered(false) { - m_aOkBtn.SetClickHdl( LINK( this, HangulHanjaNewDictDialog, OKHdl ) ); - - m_aDictNameED.SetModifyHdl( LINK( this, HangulHanjaNewDictDialog, ModifyHdl ) ); - - FreeResource(); - } + get(m_pOkBtn, "ok"); + get(m_pDictNameED, "entry"); - HangulHanjaNewDictDialog::~HangulHanjaNewDictDialog() - { + m_pOkBtn->SetClickHdl( LINK( this, HangulHanjaNewDictDialog, OKHdl ) ); + m_pDictNameED->SetModifyHdl( LINK( this, HangulHanjaNewDictDialog, ModifyHdl ) ); } bool HangulHanjaNewDictDialog::GetName( OUString& _rRetName ) const { if( m_bEntered ) - _rRetName = comphelper::string::stripEnd(m_aDictNameED.GetText(), ' '); + _rRetName = comphelper::string::stripEnd(m_pDictNameED->GetText(), ' '); return m_bEntered; } diff --git a/cui/source/dialogs/hangulhanjadlg.hrc b/cui/source/dialogs/hangulhanjadlg.hrc index b4338163560a..bcce1ef061b1 100644 --- a/cui/source/dialogs/hangulhanjadlg.hrc +++ b/cui/source/dialogs/hangulhanjadlg.hrc @@ -115,19 +115,6 @@ #define HHO_ROW_a4 (HHO_ROW_a3+14) #define HHO_ROW_a5 (HHO_ROW_a4+4) - -// Hangul / Hanja New Dictonary Dialog -#define FL_NEWDICT 1 - -#define FT_DICTNAME 1 - -#define ED_DICTNAME 1 - -#define PB_NEWDICT_OK 1 -#define PB_NEWDICT_ESC 2 -#define PB_NEWDICT_HLP 3 - - // Hangul Hanja Edit Custom Dictionary Dialog #define MAXNUM_SUGGESTIONS 50 diff --git a/cui/source/dialogs/hangulhanjadlg.src b/cui/source/dialogs/hangulhanjadlg.src index ebe6657282ed..eb71de1ea26b 100644 --- a/cui/source/dialogs/hangulhanjadlg.src +++ b/cui/source/dialogs/hangulhanjadlg.src @@ -272,58 +272,6 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA_OPT }; - -ModalDialog RID_SVX_MDLG_HANGULHANJA_NEWDICT -{ - HelpId = HID_HANGULHANJA_NEWDICT_DLG; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 213 , 66 ) ; - Moveable = TRUE ; - - Text [ en-US ] = "New Dictionary" ; - - FixedLine FL_NEWDICT - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 145 , 8 ) ; - Text [ en-US ] = "Dictionary" ; - }; - FixedText FT_DICTNAME - { - Pos = MAP_APPFONT ( 11 , 15 ) ; - Size = MAP_APPFONT ( 40 , 10 ) ; - LeftLabel = TRUE ; - Text [ en-US ] = "~Name" ; - }; - Edit ED_DICTNAME - { - HelpID = "cui:Edit:RID_SVX_MDLG_HANGULHANJA_NEWDICT:ED_DICTNAME"; - Border = TRUE ; - Pos = MAP_APPFONT ( 55 , 14 ) ; - Size = MAP_APPFONT ( 90 , 12 ) ; - MaxTextLength = 32 ; - }; - OKButton PB_NEWDICT_OK - { - Pos = MAP_APPFONT ( 157 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - Disable = TRUE ; - DefButton = TRUE ; - }; - CancelButton PB_NEWDICT_ESC - { - Pos = MAP_APPFONT ( 157 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; - HelpButton PB_NEWDICT_HLP - { - Pos = MAP_APPFONT ( 157 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; -}; - - ModalDialog RID_SVX_MDLG_HANGULHANJA_EDIT { OutputSize = TRUE ; diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc index 194cd9cd9b50..fc70da2587b5 100644 --- a/cui/source/inc/cuires.hrc +++ b/cui/source/inc/cuires.hrc @@ -224,7 +224,6 @@ #define RID_SVX_MDLG_HANGULHANJA (RID_SVX_START + 1 ) #define RID_SVX_MDLG_HANGULHANJA_OPT ( RID_SVX_START + 4 ) #define RID_SVX_MDLG_HANGULHANJA_EDIT ( RID_SVX_START + 5 ) -#define RID_SVX_MDLG_HANGULHANJA_NEWDICT ( RID_SVX_START + 6 ) // icon choice #define RID_SVXSTR_ICONCHOICEDLG_RESETBUT (RID_SVX_START + 580) diff --git a/cui/source/inc/hangulhanjadlg.hxx b/cui/source/inc/hangulhanjadlg.hxx index 00e34a0d93c3..e072888acf89 100644 --- a/cui/source/inc/hangulhanjadlg.hxx +++ b/cui/source/inc/hangulhanjadlg.hxx @@ -238,23 +238,17 @@ namespace svx class HangulHanjaNewDictDialog : public ModalDialog { private: - FixedLine m_aNewDictFL; - FixedText m_aDictNameFT; - Edit m_aDictNameED; - OKButton m_aOkBtn; - CancelButton m_aCancelBtn; - HelpButton m_aHelpBtn; + Edit* m_pDictNameED; + OKButton* m_pOkBtn; - bool m_bEntered; + bool m_bEntered; DECL_LINK( OKHdl, void* ); DECL_LINK( ModifyHdl, void* ); - protected: public: - HangulHanjaNewDictDialog( Window* _pParent ); - virtual ~HangulHanjaNewDictDialog(); + HangulHanjaNewDictDialog( Window* _pParent ); - bool GetName( OUString& _rRetName ) const; + bool GetName( OUString& _rRetName ) const; }; diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc index 8653722bfbe9..77c3a14260c7 100644 --- a/cui/source/inc/helpid.hrc +++ b/cui/source/inc/helpid.hrc @@ -194,7 +194,6 @@ #define HID_MACRO_MACROS "CUI_HID_MACRO_MACROS" #define HID_DIALOG_HANGULHANJA "CUI_HID_DIALOG_HANGULHANJA" #define HID_HANGULHANJA_OPT_DLG "CUI_HID_HANGULHANJA_OPT_DLG" -#define HID_HANGULHANJA_NEWDICT_DLG "CUI_HID_HANGULHANJA_NEWDICT_DLG" #define HID_HANGULHANJA_EDIT_DLG "CUI_HID_HANGULHANJA_EDIT_DLG" #define HID_HANGULHANJA_OPT_DICTS_LB "CUI_HID_HANGULHANJA_OPT_DICTS_LB" #define HID_MULTIPATH "CUI_HID_MULTIPATH" diff --git a/cui/uiconfig/ui/hangulhanjaadddialog.ui b/cui/uiconfig/ui/hangulhanjaadddialog.ui new file mode 100644 index 000000000000..dd5d81bb81e6 --- /dev/null +++ b/cui/uiconfig/ui/hangulhanjaadddialog.ui @@ -0,0 +1,151 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="HangulHanjaAddDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">New Dictionary</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="pack_type">end</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="pack_type">end</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</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="pack_type">end</property> + <property name="position">2</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="frame1"> + <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="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">start</property> + <property name="hexpand">True</property> + <property name="spacing">12</property> + <child> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">_Name</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">entry</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="entry"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="max_length">32</property> + <property name="invisible_char">•</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">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">Dictionary</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-widget response="0">help</action-widget> + </action-widgets> + </object> +</interface> |