diff options
author | Jan Holesovsky <kendy@collabora.com> | 2016-02-02 22:59:34 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2016-02-03 10:33:04 +0100 |
commit | c406c90289baa12663a382c7ed664f2cf93b75ab (patch) | |
tree | 55654fcd867a2cd650f2615e26e793b32d936375 /libreofficekit | |
parent | lok interaction handler: Move password handling to an own method. (diff) | |
download | core-c406c90289baa12663a382c7ed664f2cf93b75ab.tar.gz core-c406c90289baa12663a382c7ed664f2cf93b75ab.zip |
lok interaction handler: Add handling of io and network errors.
Change-Id: If7c84a7b24f2072439718fb0c473b73243f2ecc1
Diffstat (limited to 'libreofficekit')
-rw-r--r-- | libreofficekit/source/gtk/lokdocview.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx index 17104a00b838..737157bf515c 100644 --- a/libreofficekit/source/gtk/lokdocview.cxx +++ b/libreofficekit/source/gtk/lokdocview.cxx @@ -781,6 +781,18 @@ static void formulaChanged(LOKDocView* pDocView, const std::string& rString) g_signal_emit(pDocView, doc_view_signals[FORMULA_CHANGED], 0, rString.c_str()); } +static void reportError(LOKDocView* /*pDocView*/, const std::string& rString) +{ + GtkWidget *dialog = gtk_message_dialog_new(nullptr, + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_CLOSE, + "%s", + rString.c_str()); + gtk_dialog_run(GTK_DIALOG(dialog)); + gtk_widget_destroy(dialog); +} + static void setPart(LOKDocView* pDocView, const std::string& rString) { @@ -1119,6 +1131,11 @@ callback (gpointer pData) formulaChanged(pDocView, pCallback->m_aPayload); } break; + case LOK_CALLBACK_ERROR: + { + reportError(pDocView, pCallback->m_aPayload); + } + break; default: g_assert(false); break; |