[Libreoffice-commits] core.git: cui/source cui/uiconfig cui/UIConfig_cui.mk
Faisal M. Al-Otaibi
fmalotaibi at kacst.edu.sa
Thu Aug 29 04:03:04 PDT 2013
cui/UIConfig_cui.mk | 1
cui/source/inc/cuires.hrc | 6
cui/source/inc/helpid.hrc | 1
cui/source/options/optlingu.cxx | 45 +++++--
cui/source/options/optlingu.hrc | 8 -
cui/source/options/optlingu.src | 62 +--------
cui/uiconfig/ui/breaknumberoption.ui | 221 +++++++++++++++++++++++++++++++++++
7 files changed, 270 insertions(+), 74 deletions(-)
New commits:
commit 943c60e5efe8c2eba5581a085d237bdaf4d00bc8
Author: Faisal M. Al-Otaibi <fmalotaibi at kacst.edu.sa>
Date: Thu Aug 29 11:46:03 2013 +0300
Convert Hyphenation dialogs to .ui
Change-Id: I086a99c391185cb213ad63a66a954f8e66f8fc9e
Reviewed-on: https://gerrit.libreoffice.org/5672
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index a0d790c..7e46543 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -25,6 +25,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/backgroundpage \
cui/uiconfig/ui/bitmaptabpage \
cui/uiconfig/ui/borderpage \
+ cui/uiconfig/ui/breaknumberoption \
cui/uiconfig/ui/cellalignment \
cui/uiconfig/ui/charnamepage \
cui/uiconfig/ui/colorpage \
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index abf3728..e8960ba 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -161,7 +161,6 @@
#define RID_SVXDLG_JAVA_CLASSPATH (RID_SVX_START + 255)
#define RID_SVXERR_JRE_NOT_RECOGNIZED (RID_SVX_START + 256)
#define RID_SVXERR_JRE_FAILED_VERSION (RID_SVX_START + 257)
-#define RID_SVXDLG_LNG_ED_NUM_PREBREAK (RID_SVX_START + 830)
#define RID_SVXDLG_EDIT_MODULES (RID_SVX_START + 831)
#define RID_SVXSTR_PATH_NAME_START (RID_SVX_START + 1003)
#define RID_SVXBMP_LOCK (RID_SVX_START + 118)
@@ -423,6 +422,11 @@
#define RID_SVXSTR_DEL_SPACES_AT_STT_END (RID_SVX_START + 1223)
#define RID_SVXSTR_DEL_SPACES_BETWEEN_LINES (RID_SVX_START + 1224)
+// from optlingu.src
+#define STR_NUM_PRE_BREAK_DLG (RID_SVX_START + 1225)
+#define STR_NUM_POST_BREAK_DLG (RID_SVX_START + 1226)
+#define STR_NUM_MIN_WORDLEN_DLG (RID_SVX_START + 1227)
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc
index 8354935..450a8be 100644
--- a/cui/source/inc/helpid.hrc
+++ b/cui/source/inc/helpid.hrc
@@ -32,7 +32,6 @@
#define HID_CLB_LINGU_MODULES "CUI_HID_CLB_LINGU_MODULES"
#define HID_CLB_LINGU_OPTIONS "CUI_HID_CLB_LINGU_OPTIONS"
#define HID_EDIT_MODULES "CUI_HID_EDIT_MODULES"
-#define HID_LNGDLG_NUM_PREBREAK "CUI_HID_LNGDLG_NUM_PREBREAK"
#define HID_OPTIONS_COLORCONFIG_SAVE_SCHEME "CUI_HID_OPTIONS_COLORCONFIG_SAVE_SCHEME"
#define HID_OPTIONS_JAVA_PARAMETER "CUI_HID_OPTIONS_JAVA_PARAMETER"
#define HID_OPTIONS_JAVA_CLASSPATH "CUI_HID_OPTIONS_JAVA_CLASSPATH"
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 3a497f5..d771d29 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -308,29 +308,48 @@ void BrwStringDic_Impl::Paint(
class OptionsBreakSet : public ModalDialog
{
- OKButton aOKPB;
- CancelButton aCancelPB;
- FixedLine aValFL;
- NumericField aValNF;
+ VclFrame* m_pBeforeFrame;
+ VclFrame* m_pAfterFrame;
+ VclFrame* m_pMinimalFrame;
+ NumericField* m_pBreakNF;
public:
OptionsBreakSet(Window* pParent, int nRID) :
- ModalDialog(pParent, CUI_RES(RID_SVXDLG_LNG_ED_NUM_PREBREAK )),
- aOKPB (this, CUI_RES(BT_OK_PREBREAK)),
- aCancelPB (this, CUI_RES(BT_CANCEL_PREBREAK)),
- aValFL (this, CUI_RES(FL_NUMVAL_PREBREAK)),
- aValNF (this, CUI_RES(ED_PREBREAK))
+ ModalDialog(pParent, "BreakNumberOption", "cui/ui/breaknumberoption.ui")
{
+ get( m_pBeforeFrame, "beforeframe");
+ get( m_pAfterFrame, "afterframe");
+ get( m_pMinimalFrame, "miniframe");
+ get( m_pBreakNF, "breaknumber");
+
DBG_ASSERT( STR_NUM_PRE_BREAK_DLG == nRID ||
STR_NUM_POST_BREAK_DLG == nRID ||
STR_NUM_MIN_WORDLEN_DLG == nRID, "unexpected RID" );
- if (nRID != -1)
- aValFL.SetText( String( CUI_RES(nRID) ) );
- FreeResource();
+ if ( nRID != -1 )
+ {
+ if( nRID == STR_NUM_PRE_BREAK_DLG )
+ {
+ m_pAfterFrame ->Hide();
+ m_pMinimalFrame->Hide();
+ }
+ if( nRID == STR_NUM_POST_BREAK_DLG )
+ {
+ m_pBeforeFrame ->Hide();
+ m_pMinimalFrame->Hide();
+ }
+ if( nRID == STR_NUM_MIN_WORDLEN_DLG )
+ {
+ m_pAfterFrame ->Hide();
+ m_pBeforeFrame->Hide();
+ }
+ }
}
- NumericField& GetNumericFld() { return aValNF; }
+ NumericField& GetNumericFld()
+ {
+ return *m_pBreakNF;
+ }
};
diff --git a/cui/source/options/optlingu.hrc b/cui/source/options/optlingu.hrc
index 2fc86d0..24a6abb 100644
--- a/cui/source/options/optlingu.hrc
+++ b/cui/source/options/optlingu.hrc
@@ -38,10 +38,6 @@
#define STR_HYPH_SPECIAL 212
#define STR_NUM_MIN_WORDLEN 213
-#define STR_NUM_PRE_BREAK_DLG 214
-#define STR_NUM_POST_BREAK_DLG 215
-#define STR_NUM_MIN_WORDLEN_DLG 216
-
#define STR_GRAMMAR_AUTO 217
#define PB_OK 70
@@ -52,10 +48,6 @@
#define ST_THES 84
#define ST_GRAMMAR 85
-#define FL_NUMVAL_PREBREAK 305
-#define BT_OK_PREBREAK 306
-#define BT_CANCEL_PREBREAK 307
-#define ED_PREBREAK 308
#define PB_EDIT_MODULES_PRIO_UP 309
#define PB_EDIT_MODULES_PRIO_DOWN 310
#define PB_EDIT_MODULES_PRIO_BACK 311
diff --git a/cui/source/options/optlingu.src b/cui/source/options/optlingu.src
index 3c24554..61d9c75 100644
--- a/cui/source/options/optlingu.src
+++ b/cui/source/options/optlingu.src
@@ -129,59 +129,19 @@ ModalDialog RID_SVXDLG_EDIT_MODULES
};
};
-// RID_SVXDLG_LNG_ED_NUM_PREBREAK -------------------------------------------
+// Strings ---------------------------------------------------------------
-ModalDialog RID_SVXDLG_LNG_ED_NUM_PREBREAK
+String STR_NUM_PRE_BREAK_DLG
{
- HelpID = HID_LNGDLG_NUM_PREBREAK ;
- SVLook = TRUE ;
- Moveable = TRUE ;
- Size = MAP_APPFONT ( 155 , 43 ) ;
- Text [ en-US ] = "Hyphenation";
- FixedLine FL_NUMVAL_PREBREAK
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 87 , 8 ) ;
- };
- OKButton BT_OK_PREBREAK
- {
- Pos = MAP_APPFONT ( 99 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BT_CANCEL_PREBREAK
- {
- Pos = MAP_APPFONT ( 99 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- NumericField ED_PREBREAK
- {
- HelpID = "cui:NumericField:RID_SVXDLG_LNG_ED_NUM_PREBREAK:ED_PREBREAK";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 56 , 14 ) ;
- Size = MAP_APPFONT ( 31 , 12 ) ;
- Left = TRUE ;
- Minimum = 2 ;
- Maximum = 9 ;
- Last = 9 ;
- Repeat = TRUE ;
- Spin = TRUE ;
- SpinSize = 1;
- };
- String STR_NUM_PRE_BREAK_DLG
- {
- Text [ en-US ] = "Characters before break";
- };
- String STR_NUM_POST_BREAK_DLG
- {
- Text [ en-US ] = "Characters after break";
- };
- String STR_NUM_MIN_WORDLEN_DLG
- {
- Text [ en-US ] = "Minimal word length";
- };
+ Text [ en-US ] = "Characters before break";
+};
+String STR_NUM_POST_BREAK_DLG
+{
+ Text [ en-US ] = "Characters after break";
+};
+String STR_NUM_MIN_WORDLEN_DLG
+{
+ Text [ en-US ] = "Minimal word length";
};
// RID_SFXPAGE_LINGU --------------------------------------------------------
diff --git a/cui/uiconfig/ui/breaknumberoption.ui b/cui/uiconfig/ui/breaknumberoption.ui
new file mode 100644
index 0000000..c832381
--- /dev/null
+++ b/cui/uiconfig/ui/breaknumberoption.ui
@@ -0,0 +1,221 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="lower">2</property>
+ <property name="upper">9</property>
+ <property name="value">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkDialog" id="BreakNumberOption">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Hyphenation</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="spacing">12</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="layout_style">start</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="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkFrame" id="beforeframe">
+ <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="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="beforelabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Characters before break</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </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="GtkFrame" id="afterframe">
+ <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>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="afterlabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Characters after break</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </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="GtkFrame" id="miniframe">
+ <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="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="minimallabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Minimal word length</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </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="GtkAlignment" id="alignment4">
+ <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="grid5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkSpinButton" id="breaknumber">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">â¢</property>
+ <property name="adjustment">adjustment1</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>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </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>
More information about the Libreoffice-commits
mailing list