summaryrefslogtreecommitdiff
path: root/svx/source/dialog
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-06-03 13:26:46 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-06-04 08:42:18 +0000
commit660b91b07788077cfee9ba309d45db6819c00781 (patch)
tree14c2ac49b139ac500b0d74d9c28cbbff09ba2ecd /svx/source/dialog
parentd2796282721dd2ed4d2c67e4e8982fb32263b55d (diff)
report the crash id back to the user
Change-Id: I5cc1e698294a5674d691529af8cc14e4cd87a711 Reviewed-on: https://gerrit.libreoffice.org/25865 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'svx/source/dialog')
-rw-r--r--svx/source/dialog/crashreportdlg.cxx29
-rw-r--r--svx/source/dialog/crashreportdlg.hxx5
2 files changed, 29 insertions, 5 deletions
diff --git a/svx/source/dialog/crashreportdlg.cxx b/svx/source/dialog/crashreportdlg.cxx
index 511199b4bf5f..00dcedd0f76e 100644
--- a/svx/source/dialog/crashreportdlg.cxx
+++ b/svx/source/dialog/crashreportdlg.cxx
@@ -23,9 +23,13 @@ CrashReportDialog::CrashReportDialog(vcl::Window* pParent):
{
get(mpBtnSend, "btn_send");
get(mpBtnCancel, "btn_cancel");
+ get(mpBtnClose, "btn_close");
+ get(mpEditPreUpload, "ed_pre");
+ get(mpEditPostUpload, "ed_post");
mpBtnSend->SetClickHdl(LINK(this, CrashReportDialog, BtnHdl));
mpBtnCancel->SetClickHdl(LINK(this, CrashReportDialog, BtnHdl));
+ mpBtnClose->SetClickHdl(LINK(this, CrashReportDialog, BtnHdl));
}
CrashReportDialog::~CrashReportDialog()
@@ -37,6 +41,9 @@ void CrashReportDialog::dispose()
{
mpBtnSend.clear();
mpBtnCancel.clear();
+ mpBtnClose.clear();
+ mpEditPreUpload.clear();
+ mpEditPostUpload.clear();
Dialog::dispose();
}
@@ -59,17 +66,29 @@ IMPL_LINK_TYPED(CrashReportDialog, BtnHdl, Button*, pBtn, void)
{
std::string ini_path = CrashReporter::getIniFileName();
- readConfig(ini_path);
- // TODO: moggi: return the id for the user to look it up
- Close();
+ std::string response;
+ bool bSuccess = readConfig(ini_path, response);
+
+ OUString aCrashID = OUString::createFromAscii(response.c_str());
+
+ if (bSuccess)
+ mpEditPostUpload->SetText(mpEditPostUpload->GetText() + " " + aCrashID);
+ else
+ mpEditPostUpload->SetText(mpEditPostUpload->GetText() + " Error!");
+
+ mpBtnClose->Show();
+ mpEditPreUpload->Hide();
+ mpEditPostUpload->Show();
+ mpBtnSend->Hide();
+ mpBtnCancel->Hide();
}
else if (pBtn == mpBtnCancel.get())
{
Close();
}
- else
+ else if (pBtn == mpBtnClose.get())
{
- assert(false);
+ Close();
}
}
diff --git a/svx/source/dialog/crashreportdlg.hxx b/svx/source/dialog/crashreportdlg.hxx
index d1304a1063e4..f090af1211a6 100644
--- a/svx/source/dialog/crashreportdlg.hxx
+++ b/svx/source/dialog/crashreportdlg.hxx
@@ -12,6 +12,8 @@
#include <vcl/dialog.hxx>
#include <vcl/button.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/edit.hxx>
class CrashReportDialog : public Dialog
{
@@ -27,6 +29,9 @@ private:
VclPtr<Button> mpBtnSend;
VclPtr<Button> mpBtnCancel;
+ VclPtr<Button> mpBtnClose;
+ VclPtr<FixedText> mpEditPreUpload;
+ VclPtr<FixedText> mpEditPostUpload;
DECL_LINK_TYPED(BtnHdl, Button*, void);
};