Kaydet (Commit) 232dcd25 authored tarafından Muhammet Kara's avatar Muhammet Kara Kaydeden (comit) Adolfo Jayme Barrientos

Simplify Document Recovery dialog tdf#99341

By removing unnecessary header widget
and shortening the description label.

Change-Id: Id421e49e73ccd8e5932309469698843e1e7e0431
Reviewed-on: https://gerrit.libreoffice.org/26607Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarAdolfo Jayme Barrientos <fitojb@ubuntu.com>
üst d1c346ba
......@@ -631,7 +631,6 @@ SaveDialog::SaveDialog(vcl::Window* pParent, RecoveryCore* pCore)
"svx/ui/docrecoverysavedialog.ui")
, m_pCore(pCore)
{
get(m_pTitleFT, "title");
get(m_pFileListLB, "filelist");
m_pFileListLB->set_height_request(m_pFileListLB->GetTextHeight() * 10);
m_pFileListLB->set_width_request(m_pFileListLB->approximate_char_width() * 72);
......@@ -643,8 +642,6 @@ SaveDialog::SaveDialog(vcl::Window* pParent, RecoveryCore* pCore)
m_pCore->doEmergencySavePrepare();
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
m_pTitleFT->SetBackground(rStyleSettings.GetWindowColor());
m_pTitleFT->set_height_request(m_pTitleFT->get_preferred_size().Height() + 48);
m_pOkBtn->SetClickHdl( LINK( this, SaveDialog, OKButtonHdl ) );
m_pFileListLB->SetControlBackground( rStyleSettings.GetDialogColor() );
......@@ -671,7 +668,6 @@ SaveDialog::~SaveDialog()
void SaveDialog::dispose()
{
m_pTitleFT.clear();
m_pFileListLB.clear();
m_pOkBtn.clear();
Dialog::dispose();
......@@ -867,7 +863,6 @@ RecoveryDialog::RecoveryDialog(vcl::Window* pParent, RecoveryCore* pCore)
, m_bWaitForCore(false)
, m_bWasRecoveryStarted(false)
{
get(m_pTitleFT, "title");
get(m_pDescrFT, "desc");
get(m_pProgrParent, "progress");
m_pProgrParent->set_height_request(LogicToPixel(Size(0, PROGR_HEIGHT), MAP_APPFONT).Height());
......@@ -888,8 +883,6 @@ RecoveryDialog::RecoveryDialog(vcl::Window* pParent, RecoveryCore* pCore)
m_xProgress.set(static_cast< css::task::XStatusIndicator* >(pProgress), css::uno::UNO_QUERY_THROW);
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
m_pTitleFT->SetBackground(rStyleSettings.GetWindowColor());
m_pTitleFT->set_height_request(m_pTitleFT->get_preferred_size().Height() + 48);
m_pFileListLB->SetBackground( rStyleSettings.GetDialogColor() );
......@@ -927,7 +920,6 @@ RecoveryDialog::~RecoveryDialog()
void RecoveryDialog::dispose()
{
m_pFileListLB.disposeAndClear();
m_pTitleFT.clear();
m_pDescrFT.clear();
m_pProgrParent.clear();
m_pNextBtn.clear();
......
......@@ -369,7 +369,6 @@ class SaveDialog : public Dialog
{
// member
private:
VclPtr<FixedText> m_pTitleFT;
VclPtr<ListBox> m_pFileListLB;
VclPtr<OKButton> m_pOkBtn;
RecoveryCore* m_pCore;
......@@ -493,7 +492,6 @@ class RecoveryDialog : public Dialog
{
// member
private:
VclPtr<FixedText> m_pTitleFT;
VclPtr<FixedText> m_pDescrFT;
VclPtr<vcl::Window> m_pProgrParent;
VclPtr<RecovDocList> m_pFileListLB;
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<!-- interface-requires LibreOffice 1.0 -->
<requires lib="LibreOffice" version="1.0"/>
<object class="GtkDialog" id="DocRecoveryRecoverDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">%PRODUCTNAME %PRODUCTVERSION</property>
<property name="title" translatable="yes">%PRODUCTNAME %PRODUCTVERSION Document Recovery</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
......@@ -19,7 +19,7 @@
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="next">
<property name="label" translatable="yes">_Start Recovery &gt;</property>
<property name="label" translatable="yes">_Start</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
......@@ -35,11 +35,12 @@
</child>
<child>
<object class="GtkButton" id="cancel">
<property name="label" translatable="yes">Discard Recovery Data</property>
<property name="label" translatable="yes">_Discard</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
......@@ -73,20 +74,16 @@
<object class="GtkLabel" id="desc">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Press 'Start Recovery' to start the recovery process of the documents listed below.
<property name="label" translatable="yes">Press 'Start' to start the recovery process of the documents listed below.
Press 'Discard Recovery Data' to abandon attempting recovery of these documents.
The 'Status' column shows whether the document can be recovered.</property>
Press 'Discard' to abandon attempting recovery of these documents.</property>
<property name="wrap">True</property>
<property name="max_width_chars">87</property>
<property name="xalign">0</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>
......@@ -100,16 +97,14 @@ The 'Status' column shows whether the document can be recovered.</property>
<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">Status of recovered documents:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">filelist:border</property>
<property name="xalign">0</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>
......@@ -125,8 +120,6 @@ The 'Status' column shows whether the document can be recovered.</property>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
......@@ -146,8 +139,6 @@ The 'Status' column shows whether the document can be recovered.</property>
<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>
......@@ -160,24 +151,18 @@ The 'Status' column shows whether the document can be recovered.</property>
<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="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="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
......@@ -190,16 +175,14 @@ The 'Status' column shows whether the document can be recovered.</property>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Recovering document:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">progress</property>
<property name="xalign">0</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>
......@@ -214,43 +197,18 @@ The 'Status' column shows whether the document can be recovered.</property>
<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="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="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="title">
<property name="name">12</property>
<property name="height_request">-1</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">%PRODUCTNAME Document Recovery</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</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>
</object>
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="DocRecoverySaveDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">%PRODUCTNAME %PRODUCTVERSION</property>
<property name="title" translatable="yes">%PRODUCTNAME %PRODUCTVERSION Document Recovery</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
......@@ -56,16 +56,14 @@
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Due to an unexpected error, %PRODUCTNAME crashed. All the files you were working on will now be saved. The next time %PRODUCTNAME is launched, your files will be recovered automatically.</property>
<property name="wrap">True</property>
<property name="max_width_chars">87</property>
<property name="xalign">0</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>
......@@ -79,16 +77,14 @@
<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">The following files will be recovered:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">filelist:border</property>
<property name="xalign">0</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>
......@@ -104,43 +100,18 @@
<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="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="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="title">
<property name="name">12</property>
<property name="height_request">-1</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">%PRODUCTNAME Document Recovery</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</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>
</object>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment