~diogenesethecynical/lernid/Bug793793

« back to all changes in this revision

Viewing changes to lernid/widgets/Slide.py

* Sanity check pane settings. Retrieve update main window size from 
  configure-event callbacks rather than trying to retrieve size from
  a possibly destroyed window (by window manager). Allow window manager
  complete discretion in window placement. (LP: #764082)
* Revise size parameters passed to poppler page render call. (LP: #764069)
* Revert the slide loading function to run synchronously
  rather than using python threads. (LP: #749848)
* Handle case where web page has no title. (LP: #751019)
* Correct color setting in tags in Classroom.py and 
  NativeChatroom.py (LP: #716937)
* Add desktopcouch dependencies. If desktopcouch related package dependencies
  are corrected this will no longer be necessary. (LP: #727232)

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
import re
25
25
import logging
26
26
import urllib
27
 
from threading import Thread
28
27
 
29
28
from lernid.widgets.Widget import Widget
30
29
from lernid.lernidconfig import save_cache_path
104
103
            page = pdf.get_page(int(pagenumber) - 1)
105
104
            w, h = page.get_size()
106
105
            pixbuf = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False, 8, int(w), int(h))
107
 
            page.render_to_pixbuf(0,0,8,11,1,0, pixbuf)
 
106
            page.render_to_pixbuf(0,0,int(w),int(h),1,0, pixbuf)
108
107
        except:
109
108
            Statusbar.push_message(_('An error was encountered while trying to load slide number {0}'.format(pagenumber)), duration=120)
110
109
            logging.debug("Something went wrong when loading slide %s" % pagenumber)
159
158
    def _session_changed(self, schedule, session):
160
159
        Statusbar.pop_message('slidesession')
161
160
        if session.slides:
162
 
            thread = Thread(target=self._download_slides, args=(session,))
163
 
            thread.start()
 
161
            self._download_slides(session)
164
162
        else:
165
163
            self._image.clear()
166
164
            self.hide()