convert Save Progress Dialog to .ui
Change-Id: I833e6e9c78620443325b5ef9efa403a5eef497cc
This commit is contained in:
parent
02fdafd4da
commit
dd00b2311a
@ -1049,7 +1049,6 @@
|
|||||||
|
|
||||||
// document recovery and error report
|
// document recovery and error report
|
||||||
// recycling ids from DBManager
|
// recycling ids from DBManager
|
||||||
#define RID_SVX_MDLG_DOCRECOVERY_PROGR ( RID_SVX_START + 11 )
|
|
||||||
#define RID_SVX_MDLG_DOCRECOVERY_BROKEN ( RID_SVX_START + 12 )
|
#define RID_SVX_MDLG_DOCRECOVERY_BROKEN ( RID_SVX_START + 12 )
|
||||||
|
|
||||||
// !!!! double defined ID's (see below) !!!
|
// !!!! double defined ID's (see below) !!!
|
||||||
|
@ -23,6 +23,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
|
|||||||
svx/uiconfig/ui/compressgraphicdialog \
|
svx/uiconfig/ui/compressgraphicdialog \
|
||||||
svx/uiconfig/ui/deleteheaderdialog \
|
svx/uiconfig/ui/deleteheaderdialog \
|
||||||
svx/uiconfig/ui/deletefooterdialog \
|
svx/uiconfig/ui/deletefooterdialog \
|
||||||
|
svx/uiconfig/ui/docrecoveryprogressdialog \
|
||||||
svx/uiconfig/ui/docrecoveryrecoverdialog \
|
svx/uiconfig/ui/docrecoveryrecoverdialog \
|
||||||
svx/uiconfig/ui/docrecoverysavedialog \
|
svx/uiconfig/ui/docrecoverysavedialog \
|
||||||
svx/uiconfig/ui/extrustiondepthdialog \
|
svx/uiconfig/ui/extrustiondepthdialog \
|
||||||
|
@ -133,7 +133,6 @@
|
|||||||
#define HID_STYLE_LISTBOX "SVX_HID_STYLE_LISTBOX"
|
#define HID_STYLE_LISTBOX "SVX_HID_STYLE_LISTBOX"
|
||||||
#define HID_SVXTBX_UNDO_REDO_CTRL "SVX_HID_SVXTBX_UNDO_REDO_CTRL"
|
#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_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_SVX_TP_DOCRECOVERY_RECOVER "SVX_HID_SVX_TP_DOCRECOVERY_RECOVER"
|
||||||
#define HID_VALUESET_EXTRUSION_DIRECTION "SVX_HID_VALUESET_EXTRUSION_DIRECTION"
|
#define HID_VALUESET_EXTRUSION_DIRECTION "SVX_HID_VALUESET_EXTRUSION_DIRECTION"
|
||||||
#define HID_VALUESET_EXTRUSION_LIGHTING "SVX_HID_VALUESET_EXTRUSION_LIGHTING"
|
#define HID_VALUESET_EXTRUSION_LIGHTING "SVX_HID_VALUESET_EXTRUSION_LIGHTING"
|
||||||
|
@ -668,24 +668,20 @@ IMPL_LINK_NOARG(SaveDialog, OKButtonHdl)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveProgressDialog::SaveProgressDialog(Window* pParent,
|
SaveProgressDialog::SaveProgressDialog(Window* pParent, RecoveryCore* pCore)
|
||||||
RecoveryCore* pCore )
|
: ModalDialog(pParent, "DocRecoveryProgressDialog",
|
||||||
: ModalDialog ( pParent , SVX_RES( RID_SVX_MDLG_DOCRECOVERY_PROGR ) )
|
"svx/ui/docrecoveryprogressdialog.ui")
|
||||||
, m_aHintFT ( this , SVX_RES ( FT_SAVEPROGR_HINT ) )
|
, m_pCore(pCore)
|
||||||
, m_aProgrFT ( this , SVX_RES ( FT_SAVEPROGR_PROGR ) )
|
|
||||||
, m_aProgrParent( this , SVX_RES ( WIN_SAVEPROGR_PROGR ) )
|
|
||||||
, m_pCore ( pCore )
|
|
||||||
{
|
{
|
||||||
FreeResource();
|
get(m_pProgrParent, "progress");
|
||||||
PluginProgress* pProgress = new PluginProgress( &m_aProgrParent, pCore->getComponentContext() );
|
Size aSize(LogicToPixel(Size(SAVEPROGR_CONTROLWIDTH, PROGR_HEIGHT)));
|
||||||
|
m_pProgrParent->set_width_request(aSize.Width());
|
||||||
|
m_pProgrParent->set_height_request(aSize.Height());
|
||||||
|
|
||||||
|
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);
|
m_xProgress = css::uno::Reference< css::task::XStatusIndicator >(static_cast< css::task::XStatusIndicator* >(pProgress), css::uno::UNO_QUERY_THROW);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SaveProgressDialog::~SaveProgressDialog()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
short SaveProgressDialog::Execute()
|
short SaveProgressDialog::Execute()
|
||||||
{
|
{
|
||||||
::SolarMutexGuard aLock;
|
::SolarMutexGuard aLock;
|
||||||
|
@ -26,35 +26,14 @@
|
|||||||
|
|
||||||
#define PROGR_HEIGHT (RSC_CD_PUSHBUTTON_HEIGHT)
|
#define PROGR_HEIGHT (RSC_CD_PUSHBUTTON_HEIGHT)
|
||||||
|
|
||||||
// TabDialog
|
|
||||||
#define TABDLG_WIDTH 290
|
|
||||||
#define TABDLG_HEIGHT 238
|
|
||||||
|
|
||||||
#define SAVE_WIDTH 290
|
#define SAVE_WIDTH 290
|
||||||
#define SAVE_HEIGHT 238
|
#define SAVE_HEIGHT 238
|
||||||
#define SAVE_TITLEWINHEIGHT 36
|
#define SAVE_TITLEWINHEIGHT 36
|
||||||
#define SAVE_COL0 (RSC_SP_DLG_INNERBORDER_LEFT)
|
#define SAVE_COL0 (RSC_SP_DLG_INNERBORDER_LEFT)
|
||||||
#define SAVE_COL2 (SAVE_WIDTH-RSC_SP_DLG_INNERBORDER_RIGHT)
|
#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)
|
#define SAVE_CONTROLWIDTH (SAVE_COL2-SAVE_COL0)
|
||||||
|
|
||||||
// Save Progress Dialog
|
// Save Progress Dialog
|
||||||
|
|
||||||
#define FT_SAVEPROGR_HINT 1
|
|
||||||
#define FT_SAVEPROGR_PROGR 2
|
|
||||||
#define WIN_SAVEPROGR_PROGR 3
|
|
||||||
|
|
||||||
#define SAVEPROGR_WIDTH 240
|
#define SAVEPROGR_WIDTH 240
|
||||||
#define SAVEPROGR_COL0 (RSC_SP_DLG_INNERBORDER_LEFT)
|
#define SAVEPROGR_COL0 (RSC_SP_DLG_INNERBORDER_LEFT)
|
||||||
#define SAVEPROGR_COL1 (SAVEPROGR_WIDTH-RSC_SP_DLG_INNERBORDER_RIGHT)
|
#define SAVEPROGR_COL1 (SAVEPROGR_WIDTH-RSC_SP_DLG_INNERBORDER_RIGHT)
|
||||||
|
@ -22,36 +22,6 @@
|
|||||||
|
|
||||||
#include "docrecovery.hrc"
|
#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
|
QueryBox RID_SVXQB_EXIT_RECOVERY
|
||||||
{
|
{
|
||||||
BUTTONS = WB_YES_NO ;
|
BUTTONS = WB_YES_NO ;
|
||||||
|
@ -400,26 +400,18 @@ class SaveDialog : public Dialog
|
|||||||
class SaveProgressDialog : public ModalDialog
|
class SaveProgressDialog : public ModalDialog
|
||||||
, public IRecoveryUpdateListener
|
, public IRecoveryUpdateListener
|
||||||
{
|
{
|
||||||
|
|
||||||
// member
|
// member
|
||||||
private:
|
private:
|
||||||
|
OUString m_aProgrBaseTxt;
|
||||||
FixedText m_aHintFT;
|
Window* m_pProgrParent;
|
||||||
FixedText m_aProgrFT;
|
|
||||||
OUString m_aProgrBaseTxt;
|
|
||||||
Window m_aProgrParent;
|
|
||||||
|
|
||||||
// @short TODO
|
// @short TODO
|
||||||
RecoveryCore* m_pCore;
|
RecoveryCore* m_pCore;
|
||||||
|
|
||||||
// @short TODO
|
// @short TODO
|
||||||
css::uno::Reference< css::task::XStatusIndicator > m_xProgress;
|
css::uno::Reference< css::task::XStatusIndicator > m_xProgress;
|
||||||
|
|
||||||
|
|
||||||
// interface
|
// interface
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
/** @short create all child controls of this dialog.
|
/** @short create all child controls of this dialog.
|
||||||
|
|
||||||
@descr The dialog isn't shown nor it starts any
|
@descr The dialog isn't shown nor it starts any
|
||||||
@ -436,11 +428,6 @@ class SaveProgressDialog : public ModalDialog
|
|||||||
SaveProgressDialog(Window* pParent,
|
SaveProgressDialog(Window* pParent,
|
||||||
RecoveryCore* pCore );
|
RecoveryCore* pCore );
|
||||||
|
|
||||||
|
|
||||||
/** @short free all controls and used memory. */
|
|
||||||
virtual ~SaveProgressDialog();
|
|
||||||
|
|
||||||
|
|
||||||
/** @short start the emergency save operation. */
|
/** @short start the emergency save operation. */
|
||||||
virtual short Execute() SAL_OVERRIDE;
|
virtual short Execute() SAL_OVERRIDE;
|
||||||
|
|
||||||
|
101
svx/uiconfig/ui/docrecoveryprogressdialog.ui
Normal file
101
svx/uiconfig/ui/docrecoveryprogressdialog.ui
Normal file
@ -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>
|
Loading…
x
Reference in New Issue
Block a user