[goffice] Provide the opportunity of all errors to be shown.
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Provide the opportunity of all errors to be shown.
- Date: Tue, 24 Aug 2010 22:34:00 +0000 (UTC)
commit 62e4c132d94da2fc58899028fb9eabca5d476d6c
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Tue Aug 24 16:33:46 2010 -0600
Provide the opportunity of all errors to be shown.
2010-08-24 Andreas J. Guelzow <aguelzow pyrshep ca>
* goffice/app/go-cmd-context-impl.h (error_info_list): new method
* goffice/app/go-cmd-context.c (go_cmd_context_error_info_list):
call error_info_list
(go_cmd_context_error_info_list_default): new
(go_cmd_context_class_init): new
(go_cmd_context_get_type): connect go_cmd_context_class_init
ChangeLog | 9 +++++++++
NEWS | 1 +
goffice/app/go-cmd-context-impl.h | 3 +++
goffice/app/go-cmd-context.c | 25 ++++++++++++++++++++-----
4 files changed, 33 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3900f36..661915c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2010-08-24 Andreas J. Guelzow <aguelzow pyrshep ca>
+ * goffice/app/go-cmd-context-impl.h (error_info_list): new method
+ * goffice/app/go-cmd-context.c (go_cmd_context_error_info_list):
+ call error_info_list
+ (go_cmd_context_error_info_list_default): new
+ (go_cmd_context_class_init): new
+ (go_cmd_context_get_type): connect go_cmd_context_class_init
+
+2010-08-24 Andreas J. Guelzow <aguelzow pyrshep ca>
+
* goffice/app/go-cmd-context.c (go_cmd_context_error_info_list): new
* goffice/app/go-cmd-context.h (go_cmd_context_error_info_list): new
* goffice/app/io-context-priv.h (_GOIOContext): change info field into
diff --git a/NEWS b/NEWS
index 741e5ff..377be40 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ goffice 0.8.10:
Andreas:
* Make sure the first rather than the last error is shown.
* Plug leak.
+ * Provide the opportunity of all errors to be shown.
Jean:
* Always use real line width when evaluating dashes. [#442546]
diff --git a/goffice/app/go-cmd-context-impl.h b/goffice/app/go-cmd-context-impl.h
index 85e09b4..bc9af15 100644
--- a/goffice/app/go-cmd-context-impl.h
+++ b/goffice/app/go-cmd-context-impl.h
@@ -19,6 +19,9 @@ typedef struct {
void (*progress_set) (GOCmdContext *gcc, double val);
void (*progress_message_set) (GOCmdContext *gcc, gchar const *msg);
+
+ /* This should really go into the error struct! */
+ void (*error_info_list) (GOCmdContext *gcc, GSList *errs);
} GOCmdContextClass;
#define GO_CMD_CONTEXT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GO_TYPE_CMD_CONTEXT, GOCmdContextClass))
diff --git a/goffice/app/go-cmd-context.c b/goffice/app/go-cmd-context.c
index 9879487..64858e8 100644
--- a/goffice/app/go-cmd-context.c
+++ b/goffice/app/go-cmd-context.c
@@ -40,10 +40,7 @@ void
go_cmd_context_error_info_list (GOCmdContext *cc, GSList *stack)
{
g_return_if_fail (GO_IS_CMD_CONTEXT (cc));
- if (stack == NULL)
- go_cmd_context_error_info (cc, NULL);
- else
- go_cmd_context_error_info (cc, g_slist_last (stack)->data);
+ GCC_CLASS (cc)->error_info_list (cc, stack);
}
void
@@ -151,6 +148,24 @@ go_cmd_context_set_sensitive (GOCmdContext *cc, gboolean sensitive)
GCC_CLASS (cc)->set_sensitive (cc, sensitive);
}
+
+static void
+go_cmd_context_error_info_list_default (GOCmdContext *gcc, GSList *errs)
+{
+ if (errs == NULL)
+ go_cmd_context_error_info (gcc, NULL);
+ else
+ go_cmd_context_error_info (gcc, g_slist_last (errs)->data);
+
+}
+
+static void
+go_cmd_context_class_init (GOCmdContextClass *class, gpointer class_data)
+{
+#warning class->error_info_list should really be class->error.error_info_list
+ class->error_info_list = go_cmd_context_error_info_list_default;
+}
+
GType
go_cmd_context_get_type (void)
{
@@ -159,7 +174,7 @@ go_cmd_context_get_type (void)
if (!go_cmd_context_type) {
static GTypeInfo const go_cmd_context_info = {
sizeof (GOCmdContextClass), /* class_size */
- NULL, /* base_init */
+ (GClassInitFunc) go_cmd_context_class_init, /* base_init */
NULL, /* base_finalize */
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]