Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/score.py
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2009-10-06 12:12:48 (GMT)
committer Simon Schampijer <simon@schampijer.de>2009-10-06 12:12:48 (GMT)
commitaa5e93aa9edae28f9f922cbedb608a158d54d219 (patch)
treee85521ee2bbbddfdc98886f7794ddb49d21bfcec /score.py
parent9694e9551ae3c60f9af93eee6bfcfb349a357181 (diff)
More pylint cleanup
Diffstat (limited to 'score.py')
-rw-r--r--score.py22
1 files changed, 13 insertions, 9 deletions
diff --git a/score.py b/score.py
index 81b015e..947c1e9 100644
--- a/score.py
+++ b/score.py
@@ -15,11 +15,8 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
-import rsvg
-import re
import svglabel
import gtk
-import gobject
import os
import theme
@@ -30,15 +27,21 @@ class Score(svglabel.SvgLabel):
default_color = "#4c4d4f"
status = False
- def __init__(self, fill_color, stroke_color, pixbuf= None, pixbuf_sel = None, status= False):
+ def __init__(self, fill_color, stroke_color, pixbuf=None,
+ pixbuf_sel=None, status=False):
filename = os.path.join(os.path.dirname(__file__), "images/score.svg")
self.pixbuf_un = pixbuf
self.pixbuf_sel = pixbuf_sel
self.status = status
if self.pixbuf_un == None:
- self.pixbuf_un = svglabel.SvgLabel(filename, fill_color, stroke_color, False, self.default_color).get_pixbuf()
+ self.pixbuf_un = svglabel.SvgLabel(filename, fill_color,
+ stroke_color, False,
+ self.default_color).get_pixbuf()
if self.pixbuf_sel == None:
- self.pixbuf_sel = svglabel.SvgLabel(filename, fill_color, stroke_color, False, self.selected_color).get_pixbuf()
+ label = svglabel.SvgLabel(filename, fill_color, stroke_color,
+ False, self.selected_color)
+ self.pixbuf_sel = label.get_pixbuf()
+
if status:
self.pixbuf = self.pixbuf_sel
else:
@@ -53,10 +56,12 @@ class Score(svglabel.SvgLabel):
self.status = status
if status:
self.pixbuf = self.pixbuf_sel
- self.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(self.selected_color))
+ self.modify_bg(gtk.STATE_NORMAL,
+ gtk.gdk.color_parse(self.selected_color))
else:
self.pixbuf = self.pixbuf_un
- self.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(self.default_color))
+ self.modify_bg(gtk.STATE_NORMAL,
+ gtk.gdk.color_parse(self.default_color))
self.queue_draw()
def get_pixbuf_un(self):
@@ -64,4 +69,3 @@ class Score(svglabel.SvgLabel):
def get_pixbuf_sel(self):
return self.pixbuf_sel
-