summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-06-17 18:49:26 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-06-18 14:23:28 +0000
commitfabd384e1596d8a5d8753985cca9a4c14c49a1fc (patch)
treeb2eeed1598685e67256724ebff839f395a2fbd30 /svx
parent6d0298f8049cf4a3565a5563d16095b8da317bf0 (diff)
better message for crash report dialog
Change-Id: I02903cda46809798ec7664cf620c06ea7687e54e Reviewed-on: https://gerrit.libreoffice.org/26443 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/crashreportdlg.cxx20
-rw-r--r--svx/source/dialog/crashreportdlg.hxx6
-rw-r--r--svx/uiconfig/ui/crashreportdlg.ui27
3 files changed, 44 insertions, 9 deletions
diff --git a/svx/source/dialog/crashreportdlg.cxx b/svx/source/dialog/crashreportdlg.cxx
index 8cb5c29f9324..4186892d7759 100644
--- a/svx/source/dialog/crashreportdlg.cxx
+++ b/svx/source/dialog/crashreportdlg.cxx
@@ -26,10 +26,14 @@ CrashReportDialog::CrashReportDialog(vcl::Window* pParent):
get(mpBtnClose, "btn_close");
get(mpEditPreUpload, "ed_pre");
get(mpEditPostUpload, "ed_post");
+ get(mpFtBugReport, "ed_bugreport");
+
+ maSuccessMsg = mpEditPostUpload->GetText();
mpBtnSend->SetClickHdl(LINK(this, CrashReportDialog, BtnHdl));
mpBtnCancel->SetClickHdl(LINK(this, CrashReportDialog, BtnHdl));
mpBtnClose->SetClickHdl(LINK(this, CrashReportDialog, BtnHdl));
+ mpEditPostUpload->SetReadOnly(true);
}
CrashReportDialog::~CrashReportDialog()
@@ -44,6 +48,7 @@ void CrashReportDialog::dispose()
mpBtnClose.clear();
mpEditPreUpload.clear();
mpEditPostUpload.clear();
+ mpFtBugReport.clear();
Dialog::dispose();
}
@@ -60,15 +65,26 @@ IMPL_LINK_TYPED(CrashReportDialog, BtnHdl, Button*, pBtn, void)
OUString aCrashID = OUString::createFromAscii(response.c_str());
if (bSuccess)
- mpEditPostUpload->SetText(mpEditPostUpload->GetText() + " " + aCrashID);
+ {
+ OUString aProcessedMessage = maSuccessMsg.replaceAll("%CRASHID", aCrashID.replaceAll("Crash-ID=",""));
+
+ // vclbuilder seems to replace _ with ~ even in text
+ mpEditPostUpload->SetText(aProcessedMessage.replaceAll("~", "_"));
+ }
else
- mpEditPostUpload->SetText(mpEditPostUpload->GetText() + " Error!");
+ mpEditPostUpload->SetText("Error!");
mpBtnClose->Show();
+ mpFtBugReport->Show();
mpEditPreUpload->Hide();
mpEditPostUpload->Show();
mpBtnSend->Hide();
+ mpBtnSend->Disable();
mpBtnCancel->Hide();
+ mpBtnCancel->Disable();
+ mpBtnClose->GrabFocus();
+
+ this->setOptimalLayoutSize();
}
else if (pBtn == mpBtnCancel.get())
{
diff --git a/svx/source/dialog/crashreportdlg.hxx b/svx/source/dialog/crashreportdlg.hxx
index f090af1211a6..3f3cb402281a 100644
--- a/svx/source/dialog/crashreportdlg.hxx
+++ b/svx/source/dialog/crashreportdlg.hxx
@@ -14,6 +14,7 @@
#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
#include <vcl/edit.hxx>
+#include <vcl/vclmedit.hxx>
class CrashReportDialog : public Dialog
{
@@ -31,7 +32,10 @@ private:
VclPtr<Button> mpBtnCancel;
VclPtr<Button> mpBtnClose;
VclPtr<FixedText> mpEditPreUpload;
- VclPtr<FixedText> mpEditPostUpload;
+ VclPtr<VclMultiLineEdit> mpEditPostUpload;
+ VclPtr<VclMultiLineEdit> mpFtBugReport;
+
+ OUString maSuccessMsg;
DECL_LINK_TYPED(BtnHdl, Button*, void);
};
diff --git a/svx/uiconfig/ui/crashreportdlg.ui b/svx/uiconfig/ui/crashreportdlg.ui
index d483d61ad39a..240b3340911d 100644
--- a/svx/uiconfig/ui/crashreportdlg.ui
+++ b/svx/uiconfig/ui/crashreportdlg.ui
@@ -62,16 +62,16 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">3</property>
+ <property name="position">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="ed_pre">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">We are sorry but it seems that LibreOffice crashed the last time.
+ <property name="label" translatable="yes">We are sorry but it seems that %PRODUCTNAME crashed the last time.
-You can help us fix this issue by sending the crash report to the LibreOffice crash reporting server.</property>
+You can help us fix this issue by sending the crash report to the %PRODUCTNAME crash reporting server.</property>
<property name="wrap">True</property>
</object>
<packing>
@@ -81,14 +81,15 @@ You can help us fix this issue by sending the crash report to the LibreOffice cr
</packing>
</child>
<child>
- <object class="GtkLabel" id="ed_post">
+ <object class="GtkTextView" id="ed_post">
<property name="can_focus">False</property>
<property name="valign">center</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">The crash report was successfully uploaded.
-You can soon find the report on crashreport.libreoffice.org.
-The report can be found by</property>
+You can soon find the report on:
+crashreport.libreoffice.org/stats/crash_details/%CRASHID</property>
<property name="wrap">True</property>
+ <property name="selectable">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -96,6 +97,20 @@ The report can be found by</property>
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkTextView" id="ed_bugreport">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Please check the report and if no bug report is connected to the crash report yet, open a new bug report at bugs.documentfoundation.org.
+Add detailed instructions on how to reproduce the crash and the shown crash ID into the crash report field.
+Thank you for your help in improving LibreOffice.</property>
+ <property name="wrap">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
</object>
</child>
</object>