[evince] Do not disable printing when cairo printing is available.



commit 51d4c0c6de63d78e9df04df525df35351b8bb454
Author: Hib Eris <hib hiberis nl>
Date:   Mon Jun 8 19:25:28 2009 +0200

    Do not disable printing when cairo printing is available.
---
 shell/ev-print-operation.c |    9 +++++++++
 shell/ev-print-operation.h |    1 +
 shell/ev-window.c          |    2 +-
 3 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/shell/ev-print-operation.c b/shell/ev-print-operation.c
index e737d29..e583dfb 100644
--- a/shell/ev-print-operation.c
+++ b/shell/ev-print-operation.c
@@ -1643,6 +1643,15 @@ ev_print_operation_print_class_init (EvPrintOperationPrintClass *klass)
 }
 #endif /* GTK_CHECK_VERSION (2, 17, 1) */
 
+gboolean ev_print_operation_exists_for_document (EvDocument *document)
+{
+#if GTK_CHECK_VERSION (2, 17, 1)
+	return (EV_IS_FILE_EXPORTER(document) || EV_IS_DOCUMENT_PRINT(document));
+#else
+	return EV_IS_FILE_EXPORTER(document);
+#endif
+}
+
 /* Factory method */
 EvPrintOperation *
 ev_print_operation_new (EvDocument *document)
diff --git a/shell/ev-print-operation.h b/shell/ev-print-operation.h
index 6930f80..20120d6 100644
--- a/shell/ev-print-operation.h
+++ b/shell/ev-print-operation.h
@@ -38,6 +38,7 @@ typedef struct _EvPrintOperationClass EvPrintOperationClass;
 
 GType             ev_print_operation_get_type               (void) G_GNUC_CONST;
 
+gboolean          ev_print_operation_exists_for_document    (EvDocument       *document);
 EvPrintOperation *ev_print_operation_new                    (EvDocument       *document);
 void              ev_print_operation_set_current_page       (EvPrintOperation *op,
 							     gint              current_page);
diff --git a/shell/ev-window.c b/shell/ev-window.c
index d646b9a..a1dadb7 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -368,7 +368,7 @@ ev_window_setup_action_sensitivity (EvWindow *ev_window)
 		ok_to_copy = (info->permissions & EV_DOCUMENT_PERMISSIONS_OK_TO_COPY);
 	}
 
-	if (has_document && !EV_IS_FILE_EXPORTER(document))
+	if (has_document && !ev_print_operation_exists_for_document(document))
 		ok_to_print = FALSE;
 
 #ifdef WITH_GCONF



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]