X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=shell%2Fev-window-title.c;h=250498e3619fd03b03298df680b57d6d688830a9;hb=bf1d045ad9bd728e26af300c8d7f142481cc986a;hp=baafa74f399278d607418375085c43efb0c1d0d0;hpb=28ffb1e81e22421674091f6ad73613684bad12de;p=evince.git diff --git a/shell/ev-window-title.c b/shell/ev-window-title.c index baafa74f..250498e3 100644 --- a/shell/ev-window-title.c +++ b/shell/ev-window-title.c @@ -14,7 +14,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include @@ -75,7 +75,7 @@ get_filename_from_uri (const char *uri) char *filename; char *basename; - filename = escape_uri_for_display (uri); + filename = g_uri_unescape_string (uri, NULL); basename = g_path_get_basename (filename); g_free(filename); @@ -122,14 +122,11 @@ ev_window_title_update (EvWindowTitle *window_title) { GtkWindow *window = GTK_WINDOW (window_title->window); char *title = NULL, *password_title, *p; - EvPageCache *page_cache; if (window_title->document != NULL) { - char *doc_title; + gchar *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); + doc_title = g_strdup (ev_document_get_title (window_title->document)); /* Make sure we get a valid title back */ if (doc_title != NULL) { @@ -139,6 +136,8 @@ ev_window_title_update (EvWindowTitle *window_title) g_utf8_validate (doc_title, -1, NULL)) { title = g_strdup (doc_title); } + + g_free (doc_title); } } @@ -160,7 +159,7 @@ ev_window_title_update (EvWindowTitle *window_title) gtk_window_set_title (window, title); break; case EV_WINDOW_TITLE_PASSWORD: - password_title = g_strdup_printf (_("%s - Password Required"), title); + password_title = g_strdup_printf (_("%s — Password Required"), title); gtk_window_set_title (window, password_title); g_free (password_title); break;