X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=shell%2Fev-window.c;h=e9aee88912ca71f9aa47c7496f646089e6a05b26;hb=ee37f085119db53f4108c3d5c398b2104bb3cdf2;hp=9d1f99ae59dfe86862fb664e6eb07763c091ff27;hpb=e67a9f0680630f694b31bba5597b58a95c804f53;p=evince.git diff --git a/shell/ev-window.c b/shell/ev-window.c index 9d1f99ae..e9aee889 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -97,10 +97,6 @@ #include "ev-media-player-keys.h" #endif /* ENABLE_DBUS */ -#ifdef ENABLE_PDF -#include -#endif - typedef enum { PAGE_MODE_DOCUMENT, PAGE_MODE_PASSWORD @@ -4173,33 +4169,21 @@ ev_window_dual_mode_changed_cb (EvDocumentModel *model, } static char * -build_comments_string (void) -{ -#ifdef ENABLE_PDF - PopplerBackend backend; - const char *backend_name; - const char *version; - - backend = poppler_get_backend (); - version = poppler_get_version (); - switch (backend) { - case POPPLER_BACKEND_CAIRO: - backend_name = "cairo"; - break; - case POPPLER_BACKEND_SPLASH: - backend_name = "splash"; - break; - default: - backend_name = "unknown"; - break; +build_comments_string (EvDocument *document) +{ + gchar *comments = NULL; + EvDocumentBackendInfo info; + + if (document && ev_document_get_backend_info (document, &info)) { + comments = g_strdup_printf ( + _("Document Viewer\nUsing %s (%s)"), + info.name, info.version); + } else { + comments = g_strdup_printf ( + _("Document Viewer")); } - return g_strdup_printf (_("Document Viewer.\n" - "Using Poppler %s (%s)"), - version, backend_name); -#else - return g_strdup_printf (_("Document Viewer")); -#endif + return comments; } static void @@ -4251,7 +4235,8 @@ ev_window_cmd_help_about (GtkAction *action, EvWindow *ev_window) license_trans = g_strconcat (_(license[0]), "\n", _(license[1]), "\n", _(license[2]), "\n", NULL); - comments = build_comments_string (); + + comments = build_comments_string (ev_window->priv->document); gtk_show_about_dialog ( GTK_WINDOW (ev_window),