=== modified file 'shell/ev-window-title.c'
--- evince-2.22.0/shell/ev-window-title.c	2008-01-25 12:30:28 +0000
+++ evince-2.22.0.new/shell/ev-window-title.c	2008-03-31 15:05:44 +0000
@@ -1,4 +1,5 @@
-/* this file is part of evince, a gnome document viewer
+/* -*- mode: c; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; -*-
+ * this file is part of evince, a gnome document viewer
  *
  *  Copyright (C) 2005 Red Hat, Inc
  *
@@ -24,16 +25,6 @@
 #include <gio/gio.h>
 #include <glib/gi18n.h>
 
-/* Known backends (for bad extensions fix) */
-#define EV_BACKEND_PS  "psdocument"
-#define EV_BACKEND_PDF "pdfdocument"
-
-typedef struct
-{
-	const gchar *backend;
-	const gchar *ext;
-} BadExtensionEntry;
-
 struct _EvWindowTitle
 {
 	EvWindow *window;
@@ -42,14 +33,6 @@
 	char *uri;
 };
 
-static const BadExtensionEntry bad_extensions[] = {
-	{ EV_BACKEND_PS, ".dvi" },
-	{ EV_BACKEND_PDF, ".doc" },
-	{ EV_BACKEND_PDF, ".dvi" },
-	{ EV_BACKEND_PDF, ".indd" },
-	{ EV_BACKEND_PDF, ".rtf" }
-};
-
 EvWindowTitle *
 ev_window_title_new (EvWindow *window)
 {
@@ -75,30 +58,6 @@
 	return filename;
 }
 
-/* Some docs report titles with confusing extensions (ex. .doc for pdf).
-   Let's show the filename in this case */
-static void
-ev_window_title_sanitize_extension (EvWindowTitle *window_title, char **title) {
-	const gchar *backend;
-	int i;
-
-	backend = ev_backends_manager_get_document_module_name (window_title->document);
-
-	for (i = 0; i < G_N_ELEMENTS (bad_extensions); i++) {
-		if (g_ascii_strcasecmp (bad_extensions[i].backend, backend) == 0 && 
-		    g_str_has_suffix (*title, bad_extensions[i].ext)) {
-			char *new_title;
-			char *filename = get_filename_from_uri (window_title->uri);
-
-			new_title = g_strdup_printf ("%s (%s)", *title, filename);
-			g_free (*title);
-			*title = new_title;
-
-			g_free (filename);
-		}
-	}
-}
-
 static void
 ev_window_title_update (EvWindowTitle *window_title)
 {
@@ -106,28 +65,9 @@
 	char *title = NULL, *password_title, *p;
 	EvPageCache *page_cache;
 
-	if (window_title->document != NULL) {
-		char *doc_title;
-
-		page_cache = ev_page_cache_get (window_title->document);
-		g_return_if_fail (page_cache != NULL);
-		doc_title = (char *)ev_page_cache_get_title (page_cache);
-
-		/* Make sure we get a valid title back */
-		if (doc_title != NULL) {
-			doc_title = g_strstrip (doc_title);
-
-			if (doc_title[0] != '\0' &&
-			    g_utf8_validate (doc_title, -1, NULL)) {
-				title = g_strdup (doc_title);
-			}
-		}
-	}
-
-	if (title && window_title->uri) {
-		ev_window_title_sanitize_extension (window_title, &title);
-	} else if (window_title->uri) {
-		title = get_filename_from_uri (window_title->uri);
+        if (window_title->uri) {
+		title = g_strconcat(get_filename_from_uri (window_title->uri),
+				    " – ", _("Document Viewer"), NULL);
 	} else if (!title) {
 		title = g_strdup (_("Document Viewer"));
 	}

