Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/graphics/iconentry.py
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-10-16 09:04:59 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-10-16 09:04:59 (GMT)
commit6240c1cf6fbd47da6743d4a66ebee21cf07fa6a5 (patch)
tree2c5276f5c820d2b5174bcc95cd15328adc98d7be /sugar/graphics/iconentry.py
parent087856f23317537dbc6b112564c64db68601410e (diff)
Cleanup the source structure
Diffstat (limited to 'sugar/graphics/iconentry.py')
-rw-r--r--sugar/graphics/iconentry.py45
1 files changed, 0 insertions, 45 deletions
diff --git a/sugar/graphics/iconentry.py b/sugar/graphics/iconentry.py
deleted file mode 100644
index 2f7584f..0000000
--- a/sugar/graphics/iconentry.py
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright (C) 2007, One Laptop Per Child
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-import gtk
-
-from sugar import _sugaruiext
-
-ICON_ENTRY_PRIMARY = _sugaruiext.ICON_ENTRY_PRIMARY
-ICON_ENTRY_SECONDARY = _sugaruiext.ICON_ENTRY_SECONDARY
-
-class IconEntry(_sugaruiext.IconEntry):
- def set_icon_from_name(self, position, name):
- icon_theme = gtk.icon_theme_get_default()
- icon_info = icon_theme.lookup_icon(name,
- gtk.ICON_SIZE_SMALL_TOOLBAR,
- 0)
-
- pixbuf = gtk.gdk.pixbuf_new_from_file(icon_info.get_filename())
-
- image = gtk.Image()
- image.set_from_pixbuf(pixbuf)
- image.show()
-
- self.set_icon(position, image)
-
- def set_icon(self, position, image):
- if image.get_storage_type() not in [gtk.IMAGE_PIXBUF, gtk.IMAGE_STOCK]:
- raise ValueError('Image must have a storage type of pixbuf or ' +
- 'stock, not %r.' % image.get_storage_type())
- _sugaruiext.IconEntry.set_icon(self, position, image)
-