diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/Makefile.am | 12 | ||||
-rw-r--r-- | shell/ev-window-title.c | 17 | ||||
-rw-r--r-- | shell/main.c | 5 |
3 files changed, 16 insertions, 18 deletions
diff --git a/shell/Makefile.am b/shell/Makefile.am index 973882b..a4e8d1e 100644 --- a/shell/Makefile.am +++ b/shell/Makefile.am @@ -102,18 +102,6 @@ evince_LDADD= \ $(SHELL_LIBS) \ $(GNOME_PRINT_LIBS) -if ENABLE_DJVU -evince_LDADD += $(DJVU_LIBS) -endif - -if ENABLE_DVI -evince_LDADD += -lkpathsea -endif - -if WITH_TYPE1_FONTS -evince_LDADD += -lt1 -endif - BUILT_SOURCES = ev-marshal.h ev-marshal.c if ENABLE_DBUS diff --git a/shell/ev-window-title.c b/shell/ev-window-title.c index 3a7d908..ac1be65 100644 --- a/shell/ev-window-title.c +++ b/shell/ev-window-title.c @@ -18,15 +18,19 @@ */ #include "ev-window-title.h" -#include "ev-document-factory.h" +#include "ev-backends-manager.h" #include <glib/gi18n.h> #include <libgnomevfs/gnome-vfs-utils.h> +/* Known backends (for bad extensions fix) */ +#define EV_BACKEND_PS "psdocument" +#define EV_BACKEND_PDF "pdfdocument" + typedef struct { - EvBackend backend; - const char *ext; + const gchar *backend; + const gchar *ext; } BadExtensionEntry; struct _EvWindowTitle @@ -74,12 +78,13 @@ get_filename_from_uri (const char *uri) Let's show the filename in this case */ static void ev_window_title_sanitize_extension (EvWindowTitle *window_title, char **title) { - EvBackend backend; + const gchar *backend; int i; - backend = ev_document_factory_get_backend (window_title->document); + backend = ev_backends_manager_get_document_module_name (window_title->document); + for (i = 0; i < G_N_ELEMENTS (bad_extensions); i++) { - if (bad_extensions[i].backend == backend && + 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); diff --git a/shell/main.c b/shell/main.c index b7362e0..e4c2d1b 100644 --- a/shell/main.c +++ b/shell/main.c @@ -45,6 +45,7 @@ #include "ev-stock-icons.h" #include "ev-job-queue.h" #include "ev-file-helpers.h" +#include "ev-backends-manager.h" static gchar *ev_page_label; static gchar *ev_find_string; @@ -379,6 +380,8 @@ main (int argc, char *argv[]) gnome_authentication_manager_init (); #endif + ev_backends_manager_init (); + if (enable_metadata) { ev_metadata_manager_init (); } @@ -408,6 +411,8 @@ main (int argc, char *argv[]) ev_metadata_manager_shutdown (); } + ev_backends_manager_shutdown (); + #if WITH_GNOME g_object_unref (program); #endif |