diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2000-08-29 16:46:15 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2000-08-29 16:46:15 +0800 |
commit | 7c6a10ab046ddb963e4b250f7b3876c3acd78e20 (patch) | |
tree | d74e05019a3c4d423c9d6598915b4d3b8e2980bb /shell | |
parent | 919e333a783ac045a45a34ed8efca6fb730ed968 (diff) | |
download | gsoc2013-evolution-7c6a10ab046ddb963e4b250f7b3876c3acd78e20.tar gsoc2013-evolution-7c6a10ab046ddb963e4b250f7b3876c3acd78e20.tar.gz gsoc2013-evolution-7c6a10ab046ddb963e4b250f7b3876c3acd78e20.tar.bz2 gsoc2013-evolution-7c6a10ab046ddb963e4b250f7b3876c3acd78e20.tar.lz gsoc2013-evolution-7c6a10ab046ddb963e4b250f7b3876c3acd78e20.tar.xz 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')
-rw-r--r-- | shell/ChangeLog | 7 | ||||
-rw-r--r-- | shell/e-shell-view.c | 18 |
2 files changed, 22 insertions, 3 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 7e1d538d40..d77aef13ff 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,10 @@ +2000-08-29 Ettore Perazzoli <ettore@helixcode.com> + + * e-shell-view.c (shell_view_interface_set_message_cb): If the + message contains a newline, only display the part until the + newline, excluding the newline. Otherwise the status bar resizes + nastily. + 2000-08-28 Ettore Perazzoli <ettore@helixcode.com> * e-shell.c (setup_components): Removed the hardcoding of the 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)); |