diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2009-02-07 09:05:07 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2009-02-07 09:05:07 (GMT) |
commit | 7671f904c967dfe561ebb8f3ce08389963784ea9 (patch) | |
tree | 247bba7834a17fccf00450fa1ee32634652f1d9a /utils.py | |
parent | 4b06f75c99d96fdc84706e798f54001bb1cd99a9 (diff) |
Mix in Char/Ground with more OOP
Diffstat (limited to 'utils.py')
-rw-r--r-- | utils.py | 20 |
1 files changed, 0 insertions, 20 deletions
@@ -15,7 +15,6 @@ import os import gtk import pango -import cStringIO import sugar from sugar.graphics import style @@ -23,25 +22,6 @@ from sugar.graphics.icon import Icon from theme import * -def pixbuf2str(pixbuf): - def push(data, buffer): - buffer.write(data) - - buffer = cStringIO.StringIO() - pixbuf.save_to_callback(push, 'png', user_data=buffer) - return buffer.getvalue() - - - - - def read_pixbuf(self, arcfile): - tmpfile = os.path.join(SESSION_PATH, 'tmp.png') - file(tmpfile, 'w').write(self.read(arcfile)) - out = gtk.gdk.pixbuf_new_from_file(tmpfile) - os.unlink(tmpfile) - return out - - class ComboBox(sugar.graphics.combobox.ComboBox): def __init__(self): sugar.graphics.combobox.ComboBox.__init__(self) |