extensions/UIConfig_sabpilot.mk | 1 extensions/source/dbpilots/commonpagesdbp.cxx | 21 +-- extensions/source/dbpilots/commonpagesdbp.hxx | 12 -- extensions/source/dbpilots/commonpagesdbp.src | 52 -------- extensions/source/dbpilots/dbpresid.hrc | 28 ---- extensions/uiconfig/sabpilot/ui/optiondbfieldpage.ui | 111 +++++++++++++++++++ 6 files changed, 130 insertions(+), 95 deletions(-)
New commits: commit 3953eb3d83f4bb2f388eb1853f1f4976b150bab1 Author: Palenik Mihály <palenik.mih...@gmail.com> Date: Thu Aug 14 15:39:05 2014 +0200 Convert RID_PAGE_OPTION_DBFIELD tabpage to .ui Change-Id: I5ab4c42cf5467254423396ce4f56390fc2fb5276 Reviewed-on: https://gerrit.libreoffice.org/10920 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/extensions/UIConfig_sabpilot.mk b/extensions/UIConfig_sabpilot.mk index 0456655..8dfe146 100644 --- a/extensions/UIConfig_sabpilot.mk +++ b/extensions/UIConfig_sabpilot.mk @@ -19,6 +19,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/sabpilot,\ extensions/uiconfig/sabpilot/ui/gridfieldsselectionpage \ extensions/uiconfig/sabpilot/ui/groupradioselectionpage \ extensions/uiconfig/sabpilot/ui/invokeadminpage \ + extensions/uiconfig/sabpilot/ui/optiondbfieldpage \ extensions/uiconfig/sabpilot/ui/optionsfinalpage \ extensions/uiconfig/sabpilot/ui/optionvaluespage \ extensions/uiconfig/sabpilot/ui/selecttablepage \ diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx index 414b5e3..25090d8 100644 --- a/extensions/source/dbpilots/commonpagesdbp.cxx +++ b/extensions/source/dbpilots/commonpagesdbp.cxx @@ -456,17 +456,16 @@ namespace dbp ODBFieldPage::ODBFieldPage( OControlWizard* _pParent ) - :OMaybeListSelectionPage(_pParent, ModuleRes(RID_PAGE_OPTION_DBFIELD)) - ,m_aFrame (this, ModuleRes(FL_DATABASEFIELD_EXPL)) - ,m_aDescription (this, ModuleRes(FT_DATABASEFIELD_EXPL)) - ,m_aQuestion (this, ModuleRes(FT_DATABASEFIELD_QUEST)) - ,m_aStoreYes (this, ModuleRes(RB_STOREINFIELD_YES)) - ,m_aStoreNo (this, ModuleRes(LB_STOREINFIELD)) - ,m_aStoreWhere (this, ModuleRes(RB_STOREINFIELD_NO)) + :OMaybeListSelectionPage(_pParent, "OptionDBField", "modules/sabpilot/ui/optiondbfieldpage.ui") { - FreeResource(); - announceControls(m_aStoreYes, m_aStoreNo, m_aStoreWhere); - m_aStoreWhere.SetDropDownLineCount(10); + get(m_pDescription, "explLabel"); + get(m_pStoreYes, "yesRadiobutton"); + get(m_pStoreNo, "noRadiobutton"); + get(m_pStoreWhere, "storeInFieldCombobox"); + SetText(ModuleRes(RID_STR_OPTION_DB_FIELD_TITLE)); + + announceControls(*m_pStoreYes, *m_pStoreNo, *m_pStoreWhere); + m_pStoreWhere->SetDropDownLineCount(10); } @@ -475,7 +474,7 @@ namespace dbp OMaybeListSelectionPage::initializePage(); // fill the fields page - fillListBox(m_aStoreWhere, getContext().aFieldNames); + fillListBox(*m_pStoreWhere, getContext().aFieldNames); implInitialize(getDBFieldSetting()); } diff --git a/extensions/source/dbpilots/commonpagesdbp.hxx b/extensions/source/dbpilots/commonpagesdbp.hxx index 09ccc77..d8da418 100644 --- a/extensions/source/dbpilots/commonpagesdbp.hxx +++ b/extensions/source/dbpilots/commonpagesdbp.hxx @@ -106,18 +106,16 @@ namespace dbp class ODBFieldPage : public OMaybeListSelectionPage { protected: - FixedLine m_aFrame; - FixedText m_aDescription; - FixedText m_aQuestion; - RadioButton m_aStoreYes; - RadioButton m_aStoreNo; - ListBox m_aStoreWhere; + FixedText* m_pDescription; + RadioButton* m_pStoreYes; + RadioButton* m_pStoreNo; + ListBox* m_pStoreWhere; public: ODBFieldPage( OControlWizard* _pParent ); protected: - void setDescriptionText(const OUString& _rDesc) { m_aDescription.SetText(_rDesc); } + void setDescriptionText(const OUString& _rDesc) { m_pDescription->SetText(_rDesc); } // OWizardPage overridables virtual void initializePage() SAL_OVERRIDE; diff --git a/extensions/source/dbpilots/commonpagesdbp.src b/extensions/source/dbpilots/commonpagesdbp.src index d40c759..896bc0e 100644 --- a/extensions/source/dbpilots/commonpagesdbp.src +++ b/extensions/source/dbpilots/commonpagesdbp.src @@ -32,59 +32,9 @@ Image IMG_QUERY MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; }; }; -TabPage RID_PAGE_OPTION_DBFIELD +String RID_STR_OPTION_DB_FIELD_TITLE { - HelpID = "extensions:TabPage:RID_PAGE_OPTION_DBFIELD"; - SVLook = TRUE ; - Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; Text [ en-US ] = "Database Field"; - - FixedLine FL_DATABASEFIELD_EXPL - { - Pos = MAP_APPFONT ( 4 , 3 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 8 , 8 ) ; - }; - FixedText FT_DATABASEFIELD_EXPL - { - Pos = MAP_APPFONT ( 7 , 15 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 14, 16 ) ; - WordBreak = TRUE; - }; - FixedText FT_DATABASEFIELD_QUEST - { - Pos = MAP_APPFONT ( 7 , 34 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 14, 16 ) ; - WordBreak = TRUE; - Text [ en-US ] = "Do you want to save the value in a database field?"; - }; - RadioButton RB_STOREINFIELD_YES - { - HelpID = "extensions:RadioButton:RID_PAGE_OPTION_DBFIELD:RB_STOREINFIELD_YES"; - Pos = MAP_APPFONT ( 7 , 53 ) ; - Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 20, 10 ) ; - Group = TRUE; - TabStop = TRUE; - Text [ en-US ] = "~Yes, I want to save it in the following database field:"; - }; - ListBox LB_STOREINFIELD - { - HelpID = "extensions:ListBox:RID_PAGE_OPTION_DBFIELD:LB_STOREINFIELD"; - Pos = MAP_APPFONT ( WINDOW_HALF_SIZE_X + 23, 51 ) ; - Size = MAP_APPFONT ( WINDOW_HALF_SIZE_X - 30, 14 ) ; - TabStop = TRUE; - SVLook = TRUE ; - Border = TRUE ; - DropDown = TRUE; - AutoHScroll = TRUE ; - }; - RadioButton RB_STOREINFIELD_NO - { - HelpID = "extensions:RadioButton:RID_PAGE_OPTION_DBFIELD:RB_STOREINFIELD_NO"; - Pos = MAP_APPFONT ( 7 , 68 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 14, 10 ) ; - TabStop = FALSE; - Text [ en-US ] = "~No, I only want to save the value in the form."; - }; }; String RID_STR_TYPE_TABLE diff --git a/extensions/source/dbpilots/dbpresid.hrc b/extensions/source/dbpilots/dbpresid.hrc index 503059a..2f38f99 100644 --- a/extensions/source/dbpilots/dbpresid.hrc +++ b/extensions/source/dbpilots/dbpresid.hrc @@ -46,20 +46,14 @@ #define RID_STR_FIELDINFO_COMBOBOX (RID_STRING_START + 12 ) #define RID_STR_GRIDWIZARD_TITLE (RID_STRING_START + 13 ) #define RID_STR_GROUPWIZARD_TITLE (RID_STRING_START + 14 ) +#define RID_STR_OPTION_DB_FIELD_TITLE (RID_STRING_START + 15 ) // please adjust RID_STRING_END (below) when adding new strings -#define RID_STRING_END RID_STR_TIMEPOSTFIX +#define RID_STRING_END RID_STR_OPTION_DB_FIELD_TITLE // please adjust RID_DIALOG_END (below) when adding new dialogs #define RID_DIALOG_END ( RID_DIALOG_START + 3 ) -// tab pages - -#define RID_PAGE_OPTION_DBFIELD ( RID_PAGE_START + 5 ) - -// please adjust RID_PAGE_END (below) when adding new tab pages -#define RID_PAGE_END RID_PAGE_OPTION_DBFIELD - // ErrorBox #define RID_ERR_INVALID_FORM_CONNECTION ( RID_ERRORBOX_START + 1 ) @@ -75,9 +69,6 @@ #if RID_DIALOG_END > RID_DBP_END #error "please adjust the resource id ranges!!" #endif -#if RID_PAGE_END > RID_DBP_END - #error "please adjust the resource id ranges!!" -#endif #if RID_ERRORBOX_END > RID_DBP_END #error "please adjust the resource id ranges!!" #endif @@ -85,24 +76,9 @@ // local ids // FixedLine -#define FL_DATABASEFIELD_EXPL 4 #define FL_FRAME 6 #define FL_FORMSETINGS 7 -// FixedText - -#define FT_DATABASEFIELD_EXPL 8 -#define FT_DATABASEFIELD_QUEST 9 - -// ListBox - -#define LB_STOREINFIELD 4 - -// RadioButton - -#define RB_STOREINFIELD_YES 3 -#define RB_STOREINFIELD_NO 4 - // Image #define IMG_TABLE ( RID_DIALOG_START + 1 ) diff --git a/extensions/uiconfig/sabpilot/ui/optiondbfieldpage.ui b/extensions/uiconfig/sabpilot/ui/optiondbfieldpage.ui new file mode 100644 index 0000000..3560f22 --- /dev/null +++ b/extensions/uiconfig/sabpilot/ui/optiondbfieldpage.ui @@ -0,0 +1,111 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.16.1 --> +<interface> + <requires lib="gtk+" version="3.0"/> + <object class="GtkBox" id="OptionDBField"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="border_width">6</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child> + <object class="GtkLabel" id="explLabel"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="valign">start</property> + <property name="hexpand">True</property> + <property name="xalign">0</property> + <property name="wrap">True</property> + <property name="max_width_chars">82</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">Do you want to save the value in a database field?</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkRadioButton" id="yesRadiobutton"> + <property name="label" translatable="yes">_Yes, I want to save it in the following database field:</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="active">True</property> + <property name="draw_indicator">True</property> + <property name="group">noRadiobutton</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> + <child> + <object class="GtkRadioButton" id="noRadiobutton"> + <property name="label" translatable="yes">_No, I only want to save the value in the form.</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + <property name="group">yesRadiobutton</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">2</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="storeInFieldCombobox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</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">2</property> + </packing> + </child> + </object> +</interface>
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits