[gedit] tab: print printing error
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] tab: print printing error
- Date: Wed, 4 Mar 2015 16:27:13 +0000 (UTC)
commit ae650e5bdbc824faa4482a8361cbb0d63121aa77
Author: Sébastien Wilmet <swilmet gnome org>
Date: Wed Mar 4 16:16:28 2015 +0100
tab: print printing error
Ideally it should be displayed in an info bar in the UI, but in the
meantime displaying the error in the terminal is the minimum to do (and
free the GError...).
gedit/gedit-tab.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index 4173644..a0395fd 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -2708,7 +2708,7 @@ store_print_settings (GeditTab *tab,
static void
done_printing_cb (GeditPrintJob *job,
GeditPrintJobResult result,
- const GError *error,
+ GError *error,
GeditTab *tab)
{
GeditView *view;
@@ -2717,13 +2717,19 @@ done_printing_cb (GeditPrintJob *job,
tab->priv->state == GEDIT_TAB_STATE_SHOWING_PRINT_PREVIEW ||
tab->priv->state == GEDIT_TAB_STATE_PRINTING);
- /* TODO: check status and error */
-
if (result == GEDIT_PRINT_JOB_RESULT_OK)
{
store_print_settings (tab, job);
}
+ /* TODO Show the error in an info bar. */
+ if (error != NULL)
+ {
+ g_warning ("Printing error: %s", error->message);
+ g_error_free (error);
+ error = NULL;
+ }
+
close_printing (tab);
view = gedit_tab_get_view (tab);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]