aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2006-05-30 12:37:29 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2006-05-30 12:37:29 +0800
commitf45a960006121e20158cbd6de5414a2192fc0f46 (patch)
tree7516ca7b668b7a6692c806701e98b1bc327d7f34
parentac76d9bc53551eb9e0b9dd18206127f7b6fe9176 (diff)
downloadgsoc2013-evolution-f45a960006121e20158cbd6de5414a2192fc0f46.tar.gz
gsoc2013-evolution-f45a960006121e20158cbd6de5414a2192fc0f46.tar.zst
gsoc2013-evolution-f45a960006121e20158cbd6de5414a2192fc0f46.zip
Fix for bug #332936
svn path=/trunk/; revision=32053
-rw-r--r--e-util/ChangeLog5
-rw-r--r--e-util/e-error.c27
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail.error.xml2
4 files changed, 36 insertions, 4 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 3f7f44ce75..67b0c73974 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-30 Srinivasa Ragavan <sragavan@novell.com>
+
+ * e-error.c: (ee_load), (e_error_newv): Added a new property
+ called scroll, to show the messages in a scrolled view port.
+
2006-05-25 Srinivasa Ragavan <sragavan@novell.com>
* e-dialog-utils.c: (save_ok), (e_file_dialog_save),
diff --git a/e-util/e-error.c b/e-util/e-error.c
index e8cf041310..0ad7e2e77e 100644
--- a/e-util/e-error.c
+++ b/e-util/e-error.c
@@ -35,7 +35,8 @@
#include <gtk/gtkwindow.h>
#include <gtk/gtklabel.h>
#include <gtk/gtkimage.h>
-
+#include <gtk/gtkscrolledwindow.h>
+#include <gtk/gtkwindow.h>
#include <libgnome/gnome-i18n.h>
#include <libgnome/gnome-url.h>
@@ -62,6 +63,7 @@ struct _e_error {
char *primary;
char *secondary;
char *help_uri;
+ gboolean scroll;
struct _e_error_button *buttons;
};
@@ -215,6 +217,8 @@ ee_load(const char *path)
e = g_malloc0(sizeof(*e));
e->id = g_strdup(tmp);
+ e->scroll = FALSE;
+
xmlFree(tmp);
lastbutton = (struct _e_error_button *)&e->buttons;
@@ -235,6 +239,13 @@ ee_load(const char *path)
e->default_response = map_response(tmp);
xmlFree(tmp);
}
+
+ tmp = xmlGetProp(error, "scroll");
+ if (tmp) {
+ if (!strcmp(tmp, "yes"))
+ e->scroll = TRUE;
+ xmlFree(tmp);
+ }
for (scan = error->children;scan;scan=scan->next) {
if (!strcmp(scan->name, "primary")) {
@@ -406,7 +417,7 @@ e_error_newv(GtkWindow *parent, const char *tag, const char *arg0, va_list ap)
struct _e_error_table *table;
struct _e_error *e;
struct _e_error_button *b;
- GtkWidget *hbox, *w;
+ GtkWidget *hbox, *w, *scroll=NULL;
char *tmp, *domain, *id;
GString *out;
GPtrArray *args;
@@ -524,12 +535,22 @@ e_error_newv(GtkWindow *parent, const char *tag, const char *arg0, va_list ap)
g_ptr_array_free(args, TRUE);
+ if (e->scroll) {
+ scroll = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy ((GtkScrolledWindow *)scroll, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
+ }
w = gtk_label_new(NULL);
gtk_label_set_selectable((GtkLabel *)w, TRUE);
gtk_label_set_line_wrap((GtkLabel *)w, TRUE);
gtk_label_set_markup((GtkLabel *)w, out->str);
g_string_free(out, TRUE);
- gtk_box_pack_start((GtkBox *)hbox, w, FALSE, FALSE, 0);
+ if (e->scroll) {
+ gtk_scrolled_window_add_with_viewport ((GtkScrolledWindow *)scroll, w);
+ gtk_box_pack_start((GtkBox *)hbox, scroll, FALSE, FALSE, 0);
+ gtk_window_set_default_size ((GtkWindow *)dialog, 360, 180);
+ } else
+ gtk_box_pack_start((GtkBox *)hbox, w, FALSE, FALSE, 0);
+
gtk_widget_show_all(hbox);
gtk_box_pack_start((GtkBox *)dialog->vbox, hbox, TRUE, TRUE, 0);
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 8074c83042..b781937a0d 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+2006-05-30 Srinivasa Ragavan <sragavan@novell.com>
+
+ ** Fixes bug #332936
+ * mail.error.xml: Used a new property called scroll
+ that adds the multilines error messages into a viewport.
+
2006-05-25 Srinivasa Ragavan <sragavan@novell.com>
** Added remote shares save/load support across evolution.
diff --git a/mail/mail.error.xml b/mail/mail.error.xml
index 0bc636486f..935338ba27 100644
--- a/mail/mail.error.xml
+++ b/mail/mail.error.xml
@@ -88,7 +88,7 @@ Many email systems add an Apparently-To header to messages that only have BCC re
<secondary>{1}</secondary>
</error>
- <error id="async-error-nodescribe" type="error">
+ <error id="async-error-nodescribe" type="error" scroll="yes">
<_primary>Error while performing operation.</_primary>
<secondary>{0}</secondary>
</error>