diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-12-31 21:27:16 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-12-31 21:34:07 +0000 |
commit | 8c5f5aab2e3f1c600ff362632fb4db8d8c065d46 (patch) | |
tree | 6742961701ac0c12bb2bc3658e65de7d98bfc67f | |
parent | MessageDialog isn't ready for this usage just yet (diff) | |
download | core-8c5f5aab2e3f1c600ff362632fb4db8d8c065d46.tar.gz core-8c5f5aab2e3f1c600ff362632fb4db8d8c065d46.zip |
convert export basic dialog to .ui (600th .ui conversion)
Change-Id: I67511e69f763761cd1631263fccd0704daf1886b
-rw-r--r-- | basctl/UIConfig_basicide.mk | 1 | ||||
-rw-r--r-- | basctl/inc/basidesh.hrc | 1 | ||||
-rw-r--r-- | basctl/source/basicide/moduldl2.cxx | 22 | ||||
-rw-r--r-- | basctl/source/basicide/moduldlg.hxx | 7 | ||||
-rw-r--r-- | basctl/source/basicide/moduldlg.src | 42 | ||||
-rw-r--r-- | basctl/uiconfig/basicide/ui/exportdialog.ui | 116 |
6 files changed, 126 insertions, 63 deletions
diff --git a/basctl/UIConfig_basicide.mk b/basctl/UIConfig_basicide.mk index ec1e99f35db3..9701469c45fe 100644 --- a/basctl/UIConfig_basicide.mk +++ b/basctl/UIConfig_basicide.mk @@ -31,6 +31,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/BasicIDE,\ $(eval $(call gb_UIConfig_add_uifiles,modules/BasicIDE,\ basctl/uiconfig/basicide/ui/basicmacrodialog \ basctl/uiconfig/basicide/ui/gotolinedialog \ + basctl/uiconfig/basicide/ui/exportdialog \ basctl/uiconfig/basicide/ui/newlibdialog \ basctl/uiconfig/basicide/ui/organizedialog \ )) diff --git a/basctl/inc/basidesh.hrc b/basctl/inc/basidesh.hrc index 4c58e73cc5a1..fbf22d45c830 100644 --- a/basctl/inc/basidesh.hrc +++ b/basctl/inc/basidesh.hrc @@ -34,7 +34,6 @@ #define RID_TP_LIBS ( RID_BASICIDE_START + 38 ) #define RID_TP_DLGS ( RID_BASICIDE_START + 39 ) #define RID_DLG_LIBS ( RID_BASICIDE_START + 40 ) -#define RID_DLG_EXPORT ( RID_BASICIDE_START + 43 ) #define RID_POPUP_DLGED ( RID_BASICIDE_START + 62 ) #define RID_PRINTDLG_STRLIST ( RID_BASICIDE_START + 78 ) diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index ba23c2f2c004..1f8fc704d005 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -456,28 +456,20 @@ IMPL_LINK_NOARG(GotoLineDialog, OkButtonHandler) IMPL_LINK_NOARG(ExportDialog, OkButtonHandler) { - mbExportAsPackage = maExportAsPackageButton.IsChecked(); + mbExportAsPackage = m_pExportAsPackageButton->IsChecked(); EndDialog(1); return 0; } -ExportDialog::ExportDialog( Window * pParent ) - : ModalDialog( pParent, IDEResId( RID_DLG_EXPORT ) ) - , maExportAsPackageButton( this, IDEResId( RB_EXPORTASPACKAGE ) ) - , maExportAsBasicButton( this, IDEResId( RB_EXPORTASBASIC ) ) - , maOKButton( this, IDEResId( RID_PB_OK ) ) - , maCancelButton( this, IDEResId( RID_PB_CANCEL ) ) +ExportDialog::ExportDialog(Window * pParent) + : ModalDialog(pParent, "ExportDialog", "modules/BasicIDE/ui/exportdialog.ui") , mbExportAsPackage(false) { - FreeResource(); - maExportAsPackageButton.Check(); - maOKButton.SetClickHdl(LINK(this, ExportDialog, OkButtonHandler)); -} - -//---------------------------------------------------------------------------- + get(m_pExportAsPackageButton, "extension"); + get(m_pOKButton, "ok"); -ExportDialog::~ExportDialog() -{ + m_pExportAsPackageButton->Check(); + m_pOKButton->SetClickHdl(LINK(this, ExportDialog, OkButtonHandler)); } //---------------------------------------------------------------------------- diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx index a341a96a0901..1bac3009cb9a 100644 --- a/basctl/source/basicide/moduldlg.hxx +++ b/basctl/source/basicide/moduldlg.hxx @@ -81,10 +81,8 @@ public: class ExportDialog : public ModalDialog { private: - RadioButton maExportAsPackageButton; - RadioButton maExportAsBasicButton; - OKButton maOKButton; - CancelButton maCancelButton; + RadioButton* m_pExportAsPackageButton; + OKButton* m_pOKButton; bool mbExportAsPackage; @@ -92,7 +90,6 @@ private: public: ExportDialog( Window * pParent ); - ~ExportDialog(); bool isExportAsPackage () { return mbExportAsPackage; } }; diff --git a/basctl/source/basicide/moduldlg.src b/basctl/source/basicide/moduldlg.src index 7f5a8025d5a6..885ee0699121 100644 --- a/basctl/source/basicide/moduldlg.src +++ b/basctl/source/basicide/moduldlg.src @@ -272,48 +272,6 @@ ModalDialog RID_DLG_LIBS }; }; -ModalDialog RID_DLG_EXPORT -{ - HelpID = "basctl:ModalDialog:RID_DLG_EXPORT"; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 115 , 55 ) ; - Moveable = TRUE ; - Closeable = TRUE ; - Text [ en-US ] = "Export Basic library"; - OKButton RID_PB_OK - { - Pos = MAP_APPFONT ( 6 , 35 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton RID_PB_CANCEL - { - Pos = MAP_APPFONT ( 59 , 35 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - - RadioButton RB_EXPORTASPACKAGE - { - HelpID = "basctl:RadioButton:RID_DLG_EXPORT:RB_EXPORTASPACKAGE"; - Pos = MAP_APPFONT( 6, 6 ); - Size = MAP_APPFONT( 103, 10 ); - Group = TRUE; - Text [ en-US ] = "Export as ~extension"; - TabStop = TRUE ; - }; - RadioButton RB_EXPORTASBASIC - { - HelpID = "basctl:RadioButton:RID_DLG_EXPORT:RB_EXPORTASBASIC"; - Pos = MAP_APPFONT( 6, 19 ); - Size = MAP_APPFONT( 103, 10 ); - //Group = TRUE; - Text [ en-US ] = "Export as BASIC library"; - }; -}; - String RID_STR_EXPORTPACKAGE { Text [ en-US ] = "Export library as extension"; diff --git a/basctl/uiconfig/basicide/ui/exportdialog.ui b/basctl/uiconfig/basicide/ui/exportdialog.ui new file mode 100644 index 000000000000..3ac800accdd8 --- /dev/null +++ b/basctl/uiconfig/basicide/ui/exportdialog.ui @@ -0,0 +1,116 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.16.0 on Tue Dec 31 21:21:09 2013 --> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="ExportDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Export Basic library</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> + <object class="GtkGrid" id="grid3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <property name="row_homogeneous">True</property> + <child> + <object class="GtkRadioButton" id="extension"> + <property name="label" translatable="yes">Export as _extension</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">basic</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="basic"> + <property name="label" translatable="yes">Export as BASIC library</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">extension</property> + </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> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <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="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">2</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> |