]> www.fi.muni.cz Git - evince.git/commitdiff
Do not disable printing when cairo printing is available.
authorHib Eris <hib@hiberis.nl>
Mon, 8 Jun 2009 17:25:28 +0000 (19:25 +0200)
committerCarlos Garcia Campos <carlosgc@gnome.org>
Tue, 9 Jun 2009 09:30:24 +0000 (11:30 +0200)
shell/ev-print-operation.c
shell/ev-print-operation.h
shell/ev-window.c

index e737d296be3d7f1dabf03421151491c86f7e42a4..e583dfbfe81d3985b985d6780f5c528ccaa53900 100644 (file)
@@ -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)
index 6930f80feaab4b59b74c5e79aab27023dad3f531..20120d6a11c68f59548272ae540449ca0ebbbfe2 100644 (file)
@@ -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);
index d646b9a61beb61f5ab8c9dd8ddf961c702e4b808..a1dadb7fc84298d4ddef5329fa0252b19fbcc240 100644 (file)
@@ -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