Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/printactivity.py
diff options
context:
space:
mode:
Diffstat (limited to 'printactivity.py')
-rwxr-xr-x[-rw-r--r--]printactivity.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/printactivity.py b/printactivity.py
index d1211d3..0942200 100644..100755
--- a/printactivity.py
+++ b/printactivity.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
# Copyright (C) 2007, Red Hat, Inc.
# Copyright (C) 2007 Collabora Ltd. <http://www.collabora.co.uk/>
# Copyright 2008 One Laptop Per Child
@@ -128,7 +129,7 @@ class ReadActivity(activity.Activity):
toolbox.add_toolbar(_('Print Setup'), self._print_setup_toolbar)
self._print_setup_toolbar.show()
- self._print_toolbar = PrintToolbar(self._view)
+ self._print_toolbar = PrintToolbar(self._view, self)
self._print_toolbar._pdf.connect('clicked',self._save_pdf)
self._print_toolbar._USB.props.sensitive = True
toolbox.add_toolbar(_('Print'), self._print_toolbar)
@@ -308,7 +309,7 @@ class ReadActivity(activity.Activity):
os.remove(self._tempfile)
os.link(self.pdf_file_path, self._tempfile)
filepathr = 'file://' + self._tempfile
- _logger.debug('PrintActivity._open_pdf: %s', filepathr)
+ _logger.debug('PrintActivity._open_pdf:returning path %s', filepathr)
return filepathr
def _delete_pdf(self, doit = True):
@@ -461,11 +462,11 @@ class ReadActivity(activity.Activity):
filepath -- string starting with file://
"""
+ self._title = self._jobject.metadata['title']
+
try:
-
self._document = evince.factory_get_document(filepath)
except GError:
- self._title = self._jobject.metadata['title']
document = self._open_pdf(file_path, self._title)
_logger.debug('the file path is: %s', document)
self._document = evince.factory_get_document(document)
@@ -474,9 +475,10 @@ class ReadActivity(activity.Activity):
self._want_document = False
self._view.set_document(self._document)
self._read_toolbar.set_document(self._document)
+ self._print_setup_toolbar.set_document(self._document)
- self._print_toolbar.setTitlePath(self._title,self._tempfile)
- self._print_setup_toolbar.setTitlePath(self._title,self._tempfile)
+ self._print_toolbar.setTitlePath(self._title, self._tempfile)
+ self._print_setup_toolbar.setTitlePath(self._title, self._tempfile)
if not self.metadata['title_set_by_user'] == '1':
info = self._document.get_info()