diff options
author | Martin Kretzschmar <martink@src.gnome.org> | 2005-02-15 23:10:57 (GMT) |
---|---|---|
committer | Martin Kretzschmar <martink@src.gnome.org> | 2005-02-15 23:10:57 (GMT) |
commit | 901c97166eb2e5cf302f44d6baafd63559551f8a (patch) | |
tree | 1a72aa9cc4f4ba4d3a437a1a42a9e6d237c52965 /shell | |
parent | 42ddc3073ecb88271a0ffc74326878627d71b34e (diff) |
(update_window_title): replace newlines in the title by spaces. Bug #166107.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ev-window.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c index 547eaf0..49b5a99 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -354,6 +354,17 @@ update_window_title (EvDocument *document, GParamSpec *pspec, EvWindow *ev_windo } } } + + if (doc_title) { + char *p; + + for (p = doc_title; *p; ++p) { + /* an '\n' byte is always ASCII, no need for UTF-8 special casing */ + if (*p == '\n') + *p = ' '; + } + } + if (doc_title == NULL && ev_window->priv->uri) { doc_title = g_path_get_basename (ev_window->priv->uri); } |