aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-view.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2000-08-29 16:46:15 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2000-08-29 16:46:15 +0800
commit7c6a10ab046ddb963e4b250f7b3876c3acd78e20 (patch)
treed74e05019a3c4d423c9d6598915b4d3b8e2980bb /shell/e-shell-view.c
parent919e333a783ac045a45a34ed8efca6fb730ed968 (diff)
downloadgsoc2013-evolution-7c6a10ab046ddb963e4b250f7b3876c3acd78e20.tar.gz
gsoc2013-evolution-7c6a10ab046ddb963e4b250f7b3876c3acd78e20.tar.zst
gsoc2013-evolution-7c6a10ab046ddb963e4b250f7b3876c3acd78e20.zip
Strip off newlines when setting the messages in the statusbar, so that
the statusbar's size doesn't change in a bad way if the component gives us a message including a newline. (The latter shouldn't happen anyway, but this is a different issue.) svn path=/trunk/; revision=5094
Diffstat (limited to 'shell/e-shell-view.c')
-rw-r--r--shell/e-shell-view.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index be0845da32..3a7f838d3b 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -694,10 +694,22 @@ shell_view_interface_set_message_cb (EvolutionShellView *shell_view,
gtk_progress_set_value (GTK_PROGRESS (app_bar->progress), 1.0);
- if (message != NULL)
- gnome_appbar_set_status (app_bar, message);
- else
+ if (message != NULL) {
+ const char *newline;
+
+ newline = strchr (message, '\n');
+ if (newline == NULL) {
+ gnome_appbar_set_status (app_bar, message);
+ } else {
+ char *message_until_newline;
+
+ message_until_newline = g_strndup (message, newline - message);
+ gnome_appbar_set_status (app_bar, message_until_newline);
+ g_free (message_until_newline);
+ }
+ } else {
gnome_appbar_set_status (app_bar, "");
+ }
if (busy)
start_progress_bar (E_SHELL_VIEW (data));