diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-07-19 13:55:27 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-07-19 15:58:02 +0100 |
commit | 420c0b184210b8cdd48527536dc36a444573f408 (patch) | |
tree | ac685959f1c2248ff444f13d5b94c43a128f3671 /cui | |
parent | 6f28fa72d68c893dc284a5b47ba08bde0f4a074f (diff) |
convert percent dialog to .ui
Change-Id: I28d15741f4d5408afc5f628bd7416724f7ab2eef
Diffstat (limited to 'cui')
-rw-r--r-- | cui/UIConfig_cui.mk | 1 | ||||
-rw-r--r-- | cui/source/inc/cuires.hrc | 1 | ||||
-rw-r--r-- | cui/source/tabpages/autocdlg.cxx | 28 | ||||
-rw-r--r-- | cui/source/tabpages/autocdlg.src | 47 | ||||
-rw-r--r-- | cui/uiconfig/ui/percentdialog.ui | 114 |
5 files changed, 126 insertions, 65 deletions
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 0b0e97853c2c..3ab419631491 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -68,6 +68,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/paraindentspacing \ cui/uiconfig/ui/paratabspage \ cui/uiconfig/ui/pastespecial \ + cui/uiconfig/ui/percentdialog \ cui/uiconfig/ui/personalization_tab \ cui/uiconfig/ui/pickbulletpage \ cui/uiconfig/ui/pickgraphicpage \ diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc index a79c503eb5eb..7b6c52d4cf0a 100644 --- a/cui/source/inc/cuires.hrc +++ b/cui/source/inc/cuires.hrc @@ -117,7 +117,6 @@ #define RID_OFAPAGE_AUTOFMT_APPLY (RID_OFA_START + 110) #define RID_OFAPAGE_AUTOCORR_QUOTE (RID_OFA_START + 109) -#define RID_OFADLG_PRCNT_SET (RID_OFA_START + 111) // options #define RID_SVXSTR_DIAGRAM_ROW (RID_SVX_START + 1162) diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 5650ae98e84b..1693f4608929 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -288,25 +288,19 @@ struct ImpUserData class OfaAutoFmtPrcntSet : public ModalDialog { - OKButton aOKPB; - CancelButton aCancelPB; - FixedLine aPrcntFL; - MetricField aPrcntMF; - - public: - OfaAutoFmtPrcntSet(Window* pParent) : - ModalDialog(pParent, CUI_RES(RID_OFADLG_PRCNT_SET)), - aOKPB(this, CUI_RES(BT_OK)), - aCancelPB(this, CUI_RES(BT_CANCEL)), - aPrcntFL(this, CUI_RES(FL_PRCNT)), - aPrcntMF(this, CUI_RES(ED_RIGHT_MARGIN)) - { - FreeResource(); - } - MetricField& GetPrcntFld(){return aPrcntMF;} + MetricField* m_pPrcntMF; +public: + OfaAutoFmtPrcntSet(Window* pParent) + : ModalDialog(pParent, "PercentDialog","cui/ui/percentdialog.ui") + { + get(m_pPrcntMF, "margin"); + } + MetricField& GetPrcntFld() + { + return *m_pPrcntMF; + } }; - /*********************************************************************/ /* */ /* changed LBoxString */ diff --git a/cui/source/tabpages/autocdlg.src b/cui/source/tabpages/autocdlg.src index e7bfebd0c471..0f37b43ddc36 100644 --- a/cui/source/tabpages/autocdlg.src +++ b/cui/source/tabpages/autocdlg.src @@ -163,53 +163,6 @@ TabPage RID_OFAPAGE_AUTOFMT_APPLY }; }; -ModalDialog RID_OFADLG_PRCNT_SET -{ - HelpID = CMD_SID_AUTOFORMAT ; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 155 , 43 ) ; - Moveable = TRUE ; - FixedLine FL_PRCNT - { - Pos = MAP_APPFONT ( 4 , 3 ) ; - Size = MAP_APPFONT ( 87 , 8 ) ; - Text [ en-US ] = "Minimum size" ; - }; - OKButton BT_OK - { - Pos = MAP_APPFONT ( 99 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BT_CANCEL - { - Pos = MAP_APPFONT ( 99 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - MetricField ED_RIGHT_MARGIN - { - HelpID = "cui:MetricField:RID_OFADLG_PRCNT_SET:ED_RIGHT_MARGIN"; - Border = TRUE ; - Pos = MAP_APPFONT ( 7 , 14 ) ; - Size = MAP_APPFONT ( 31 , 12 ) ; - TabStop = TRUE ; - Left = TRUE ; - Repeat = TRUE ; - Spin = TRUE ; - Maximum = 100 ; - Value = 77 ; - Unit = FUNIT_CUSTOM ; - CustomUnitText = "%" ; - First = 10 ; - Last = 100 ; - SpinSize = 5 ; - }; - Text [ en-US ] = "Combine" ; -}; - /**************************************************************************/ /* */ /* Beschreibung: Typografische Anfuehrungszeichen */ diff --git a/cui/uiconfig/ui/percentdialog.ui b/cui/uiconfig/ui/percentdialog.ui new file mode 100644 index 000000000000..12a8daf2c1dc --- /dev/null +++ b/cui/uiconfig/ui/percentdialog.ui @@ -0,0 +1,114 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkAdjustment" id="adjustment1"> + <property name="upper">100</property> + <property name="value">77</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkDialog" id="PercentDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Combine</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">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> + <property name="secondary">True</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> + <property name="secondary">True</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="hexpand">True</property> + <property name="vexpand">True</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="GtkSpinButton" id="margin:0%"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="halign">start</property> + <property name="valign">start</property> + <property name="invisible_char">●</property> + <property name="adjustment">adjustment1</property> + </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">Minimum size</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> |