]> www.fi.muni.cz Git - evince.git/commitdiff
(update_window_title): replace newlines in the title by spaces. Bug #166107.
authorMartin Kretzschmar <martink@src.gnome.org>
Tue, 15 Feb 2005 23:10:57 +0000 (23:10 +0000)
committerMartin Kretzschmar <martink@src.gnome.org>
Tue, 15 Feb 2005 23:10:57 +0000 (23:10 +0000)
ChangeLog
shell/ev-window.c

index be9db9a22b08724f6c08bdd4a8cfc416d9e2d2cd..12f6a338a87aa48984a1571230fc727ce69809dd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-02-15  Martin Kretzschmar  <martink@gnome.org>
+
+       * shell/ev-window.c (update_window_title): replace newlines in
+       the title by spaces. Bug #166107.
+
 2005-02-14  Martin Kretzschmar  <martink@gnome.org>
 
        * shell/ev-view.c (ev_view_best_fit, ev_view_fit_width): add
index 547eaf0bec07a1adaa1f325255e5dce39e041f27..49b5a9911d90c5ae2c2b8dda8c2f93de45b6998f 100644 (file)
@@ -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);
        }