diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-06-16 13:31:53 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-16 13:40:05 +0100 |
commit | dd00b2311a6d4dd381512e95ffe00dc5845dcaed (patch) | |
tree | 9f090c9830ad1db0e42fbe28ec76460360152dc5 /svx | |
parent | 02fdafd4da8fb340426a3d83931bad6a4b70d239 (diff) |
convert Save Progress Dialog to .ui
Change-Id: I833e6e9c78620443325b5ef9efa403a5eef497cc
Diffstat (limited to 'svx')
-rw-r--r-- | svx/UIConfig_svx.mk | 1 | ||||
-rw-r--r-- | svx/inc/helpid.hrc | 1 | ||||
-rw-r--r-- | svx/source/dialog/docrecovery.cxx | 24 | ||||
-rw-r--r-- | svx/source/dialog/docrecovery.hrc | 21 | ||||
-rw-r--r-- | svx/source/dialog/docrecovery.src | 30 | ||||
-rw-r--r-- | svx/source/inc/docrecovery.hxx | 17 | ||||
-rw-r--r-- | svx/uiconfig/ui/docrecoveryprogressdialog.ui | 101 |
7 files changed, 114 insertions, 81 deletions
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk index 746dc32cb8e9..30eda494bf06 100644 --- a/svx/UIConfig_svx.mk +++ b/svx/UIConfig_svx.mk @@ -23,6 +23,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\ svx/uiconfig/ui/compressgraphicdialog \ svx/uiconfig/ui/deleteheaderdialog \ svx/uiconfig/ui/deletefooterdialog \ + svx/uiconfig/ui/docrecoveryprogressdialog \ svx/uiconfig/ui/docrecoveryrecoverdialog \ svx/uiconfig/ui/docrecoverysavedialog \ svx/uiconfig/ui/extrustiondepthdialog \ diff --git a/svx/inc/helpid.hrc b/svx/inc/helpid.hrc index 62ca4451a9fa..acb9fb3ac897 100644 --- a/svx/inc/helpid.hrc +++ b/svx/inc/helpid.hrc @@ -133,7 +133,6 @@ #define HID_STYLE_LISTBOX "SVX_HID_STYLE_LISTBOX" #define HID_SVXTBX_UNDO_REDO_CTRL "SVX_HID_SVXTBX_UNDO_REDO_CTRL" #define HID_SVX_MDLG_DOCRECOVERY_BROKEN "SVX_HID_SVX_MDLG_DOCRECOVERY_BROKEN" -#define HID_SVX_MDLG_DOCRECOVERY_PROGR "SVX_HID_SVX_MDLG_DOCRECOVERY_PROGR" #define HID_SVX_TP_DOCRECOVERY_RECOVER "SVX_HID_SVX_TP_DOCRECOVERY_RECOVER" #define HID_VALUESET_EXTRUSION_DIRECTION "SVX_HID_VALUESET_EXTRUSION_DIRECTION" #define HID_VALUESET_EXTRUSION_LIGHTING "SVX_HID_VALUESET_EXTRUSION_LIGHTING" diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index d9d41d0eef37..f20ab7b48f88 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -668,22 +668,18 @@ IMPL_LINK_NOARG(SaveDialog, OKButtonHdl) return 0; } -SaveProgressDialog::SaveProgressDialog(Window* pParent, - RecoveryCore* pCore ) - : ModalDialog ( pParent , SVX_RES( RID_SVX_MDLG_DOCRECOVERY_PROGR ) ) - , m_aHintFT ( this , SVX_RES ( FT_SAVEPROGR_HINT ) ) - , m_aProgrFT ( this , SVX_RES ( FT_SAVEPROGR_PROGR ) ) - , m_aProgrParent( this , SVX_RES ( WIN_SAVEPROGR_PROGR ) ) - , m_pCore ( pCore ) +SaveProgressDialog::SaveProgressDialog(Window* pParent, RecoveryCore* pCore) + : ModalDialog(pParent, "DocRecoveryProgressDialog", + "svx/ui/docrecoveryprogressdialog.ui") + , m_pCore(pCore) { - FreeResource(); - PluginProgress* pProgress = new PluginProgress( &m_aProgrParent, pCore->getComponentContext() ); - m_xProgress = css::uno::Reference< css::task::XStatusIndicator >(static_cast< css::task::XStatusIndicator* >(pProgress), css::uno::UNO_QUERY_THROW); -} - + get(m_pProgrParent, "progress"); + Size aSize(LogicToPixel(Size(SAVEPROGR_CONTROLWIDTH, PROGR_HEIGHT))); + m_pProgrParent->set_width_request(aSize.Width()); + m_pProgrParent->set_height_request(aSize.Height()); -SaveProgressDialog::~SaveProgressDialog() -{ + PluginProgress* pProgress = new PluginProgress(m_pProgrParent, pCore->getComponentContext()); + m_xProgress = css::uno::Reference< css::task::XStatusIndicator >(static_cast< css::task::XStatusIndicator* >(pProgress), css::uno::UNO_QUERY_THROW); } short SaveProgressDialog::Execute() diff --git a/svx/source/dialog/docrecovery.hrc b/svx/source/dialog/docrecovery.hrc index 2d65d24188c5..36781a98809f 100644 --- a/svx/source/dialog/docrecovery.hrc +++ b/svx/source/dialog/docrecovery.hrc @@ -26,35 +26,14 @@ #define PROGR_HEIGHT (RSC_CD_PUSHBUTTON_HEIGHT) -// TabDialog -#define TABDLG_WIDTH 290 -#define TABDLG_HEIGHT 238 - #define SAVE_WIDTH 290 #define SAVE_HEIGHT 238 #define SAVE_TITLEWINHEIGHT 36 #define SAVE_COL0 (RSC_SP_DLG_INNERBORDER_LEFT) #define SAVE_COL2 (SAVE_WIDTH-RSC_SP_DLG_INNERBORDER_RIGHT) -#define SAVE_COL1 (SAVE_COL2-RSC_CD_PUSHBUTTON_WIDTH) -#define SAVE_ROW0 ((SAVE_TITLEWINHEIGHT-RSC_CD_FIXEDTEXT_HEIGHT)/2) -#define SAVE_ROW1 (SAVE_TITLEWINHEIGHT) -#define SAVE_ROW2 (SAVE_ROW1+RSC_SP_CTRL_Y) -#define SAVE_ROW3 (SAVE_ROW2+3*RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_DESC_Y) -#define SAVE_ROW4 (SAVE_ROW3+RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_DESC_Y) -#define SAVE_ROW9 (SAVE_HEIGHT-RSC_SP_DLG_INNERBORDER_BOTTOM) -#define SAVE_ROW8 (SAVE_ROW9-RSC_CD_PUSHBUTTON_HEIGHT) -#define SAVE_ROW7 (SAVE_ROW8-RSC_SP_CTRL_GROUP_Y-RSC_CD_FIXEDLINE_HEIGHT) -#define SAVE_ROW6 (SAVE_ROW7-RSC_SP_CTRL_GROUP_Y-RSC_CD_CHECKBOX_HEIGHT) -#define SAVE_ROW5 (SAVE_ROW6-RSC_SP_CTRL_Y) -#define SAVE_FILELISTHEIGHT (SAVE_ROW5-SAVE_ROW4) #define SAVE_CONTROLWIDTH (SAVE_COL2-SAVE_COL0) // Save Progress Dialog - -#define FT_SAVEPROGR_HINT 1 -#define FT_SAVEPROGR_PROGR 2 -#define WIN_SAVEPROGR_PROGR 3 - #define SAVEPROGR_WIDTH 240 #define SAVEPROGR_COL0 (RSC_SP_DLG_INNERBORDER_LEFT) #define SAVEPROGR_COL1 (SAVEPROGR_WIDTH-RSC_SP_DLG_INNERBORDER_RIGHT) diff --git a/svx/source/dialog/docrecovery.src b/svx/source/dialog/docrecovery.src index 028be6059fab..d0c6e24a7fa0 100644 --- a/svx/source/dialog/docrecovery.src +++ b/svx/source/dialog/docrecovery.src @@ -22,36 +22,6 @@ #include "docrecovery.hrc" -ModalDialog RID_SVX_MDLG_DOCRECOVERY_PROGR -{ - Size = MAP_APPFONT( SAVEPROGR_WIDTH, SAVEPROGR_HEIGHT ); - HelpId = HID_SVX_MDLG_DOCRECOVERY_PROGR; - OutputSize = TRUE; - SVLook = TRUE; - Moveable = TRUE; - Closeable = FALSE; - Text = "%PRODUCTNAME %PRODUCTVERSION"; - - FixedText FT_SAVEPROGR_HINT - { - Pos = MAP_APPFONT( SAVEPROGR_COL0, SAVEPROGR_ROW0 ); - Size = MAP_APPFONT( SAVEPROGR_CONTROLWIDTH, RSC_CD_FIXEDTEXT_HEIGHT ); - Text[ en-US ] = "Documents are being saved."; - }; - FixedText FT_SAVEPROGR_PROGR - { - Pos = MAP_APPFONT( SAVEPROGR_COL0, SAVEPROGR_ROW1 ); - Size = MAP_APPFONT( SAVEPROGR_CONTROLWIDTH, RSC_CD_FIXEDTEXT_HEIGHT ); - Text[ en-US ] = "Progress of saving: "; - }; - Window WIN_SAVEPROGR_PROGR - { - Pos = MAP_APPFONT( SAVEPROGR_COL0, SAVEPROGR_ROW2 ); - Size = MAP_APPFONT( SAVEPROGR_CONTROLWIDTH, PROGR_HEIGHT ); - Border = TRUE; - }; -}; - QueryBox RID_SVXQB_EXIT_RECOVERY { BUTTONS = WB_YES_NO ; diff --git a/svx/source/inc/docrecovery.hxx b/svx/source/inc/docrecovery.hxx index ba09a935a760..2b819c002d63 100644 --- a/svx/source/inc/docrecovery.hxx +++ b/svx/source/inc/docrecovery.hxx @@ -400,26 +400,18 @@ class SaveDialog : public Dialog class SaveProgressDialog : public ModalDialog , public IRecoveryUpdateListener { - // member private: - - FixedText m_aHintFT; - FixedText m_aProgrFT; - OUString m_aProgrBaseTxt; - Window m_aProgrParent; + OUString m_aProgrBaseTxt; + Window* m_pProgrParent; // @short TODO RecoveryCore* m_pCore; // @short TODO css::uno::Reference< css::task::XStatusIndicator > m_xProgress; - - // interface public: - - /** @short create all child controls of this dialog. @descr The dialog isn't shown nor it starts any @@ -436,11 +428,6 @@ class SaveProgressDialog : public ModalDialog SaveProgressDialog(Window* pParent, RecoveryCore* pCore ); - - /** @short free all controls and used memory. */ - virtual ~SaveProgressDialog(); - - /** @short start the emergency save operation. */ virtual short Execute() SAL_OVERRIDE; diff --git a/svx/uiconfig/ui/docrecoveryprogressdialog.ui b/svx/uiconfig/ui/docrecoveryprogressdialog.ui new file mode 100644 index 000000000000..fb98d64d9b52 --- /dev/null +++ b/svx/uiconfig/ui/docrecoveryprogressdialog.ui @@ -0,0 +1,101 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.16.1 --> +<interface> + <requires lib="gtk+" version="3.0"/> + <object class="GtkDialog" id="DocRecoveryProgressDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">%PRODUCTNAME %PRODUCTVERSION</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> + <placeholder/> + </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="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="hexpand">True</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <child> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Progress of saving:</property> + <property name="use_underline">True</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="GtkDrawingArea" id="progress"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</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> + </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">Documents are being saved.</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> + </object> +</interface> |