Codebase list sugar-read-activity / a11b7a8
Save and restore zoom level in epub and text backends Siogned-off-by: Gonzalo Odiard <gonzalo@laptop.org> Gonzalo Odiard 11 years ago
2 changed file(s) with 21 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
3939 title = self._epub._info._get_title()
4040 if title:
4141 self.metadata['title'] = title
42 if 'Read_zoom' in self.metadata:
43 try:
44 logging.error('Loading zoom %s', self.metadata['Read_zoom'])
45 self.set_zoom(float(self.metadata['Read_zoom']))
46 except:
47 pass
4248
4349 def update_metadata(self, activity):
44 pass
50 self.metadata = activity.metadata
51 logging.error('Saving zoom %s', self.get_zoom())
52 self.metadata['Read_zoom'] = self.get_zoom()
4553
4654 def zoom_to_width(self):
4755 pass
211211 self.current_word = word_count
212212 return True
213213
214 def update_metadata(self, activity):
215 self.metadata = activity.metadata
216 logging.error('Saving zoom %s', self.get_zoom())
217 self.metadata['Read_zoom'] = self.get_zoom()
218
214219 def load_metadata(self, activity):
215 pass
220 self.metadata = activity.metadata
221 if 'Read_zoom' in self.metadata:
222 try:
223 logging.error('Loading zoom %s', self.metadata['Read_zoom'])
224 self.set_zoom(float(self.metadata['Read_zoom']))
225 except:
226 pass
216227
217228 def set_current_page(self, page):
218229 old_page = self._current_page
286297 def get_current_file(self):
287298 pass
288299
289 def update_metadata(self, activity):
290 pass
291
292300 def copy(self):
293301 self.textview.get_buffer().copy_clipboard(Gtk.Clipboard())
294302