From 356f224a25adcc0b50d76637a346e2e388f28445 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sun, 20 Sep 2015 14:55:01 +0100 Subject: [PATCH] [#2764] [Scheduler] Fix corrupt plugin prefs page on osx --- .../deluge/plugins/scheduler/gtkui.py | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/deluge/plugins/Scheduler/deluge/plugins/scheduler/gtkui.py b/deluge/plugins/Scheduler/deluge/plugins/scheduler/gtkui.py index 8b3a7fc9f..b032a27c6 100644 --- a/deluge/plugins/Scheduler/deluge/plugins/scheduler/gtkui.py +++ b/deluge/plugins/Scheduler/deluge/plugins/scheduler/gtkui.py @@ -58,23 +58,23 @@ class SchedulerSelectWidget(gtk.DrawingArea): # redraw the whole thing def expose(self, widget, event): - self.context = self.window.cairo_create() - self.context.rectangle(event.area.x, event.area.y, event.area.width, event.area.height) - self.context.clip() + context = self.window.cairo_create() + context.rectangle(event.area.x, event.area.y, event.area.width, event.area.height) + context.clip() width = self.window.get_size()[0] height = self.window.get_size()[1] for y in xrange(7): for x in xrange(24): - self.context.set_source_rgba(self.colors[self.button_state[x][y]][0], - self.colors[self.button_state[x][y]][1], - self.colors[self.button_state[x][y]][2], 0.7) - self.context.rectangle(width * (6 * x / 145.0 + 1 / 145.0), height * (6 * y / 43.0 + 1 / 43.0), - 5 * width / 145.0, 5 * height / 43.0) - self.context.fill_preserve() - self.context.set_source_rgba(0.5, 0.5, 0.5, 0.5) - self.context.stroke() + context.set_source_rgba(self.colors[self.button_state[x][y]][0], + self.colors[self.button_state[x][y]][1], + self.colors[self.button_state[x][y]][2], 0.7) + context.rectangle(width * (6 * x / 145.0 + 1 / 145.0), height * (6 * y / 43.0 + 1 / 43.0), + 5 * width / 145.0, 5 * height / 43.0) + context.fill_preserve() + context.set_source_rgba(0.5, 0.5, 0.5, 0.5) + context.stroke() # coordinates --> which box def get_point(self, event):