Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/common/Util
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2008-12-19 19:59:11 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2008-12-19 23:50:58 (GMT)
commit1e4c788150ed45dfb9a63448d7edb3b8113aaa5b (patch)
tree177dd3776d45c65bb6bba45a87e1fffce43ed998 /common/Util
parent53210daa96f6b7e51299a2eb15532cb296fab25d (diff)
fix groups in Edit
Diffstat (limited to 'common/Util')
-rw-r--r--common/Util/Instruments.py2
-rw-r--r--common/Util/ThemeWidgets.py30
2 files changed, 18 insertions, 14 deletions
diff --git a/common/Util/Instruments.py b/common/Util/Instruments.py
index f616811..970d15c 100644
--- a/common/Util/Instruments.py
+++ b/common/Util/Instruments.py
@@ -143,7 +143,7 @@ _addInstrument( "guidice6", INST_SIMP, MID, 'concret', 0, 0, 0, 1, kitStage = Tr
_addInstrument( "guidice7", INST_SIMP, MID, 'concret', 0, 0, 0, 1, kitStage = True )
_addInstrument( "guidice8", INST_SIMP, MID, 'concret', 0, 0, 0, 1, kitStage = True )
_addInstrument( "guidice9", INST_SIMP, MID, 'concret', 0, 0, 0, 1, kitStage = True )
-_addInstrument( "guidice10", INST_SIMP, MID, 'concret', 0, 0, 0, 1 )
+_addInstrument( "guidice10", INST_SIMP, MID, 'concret', 0, 0, 0, 1, kitStage = True )
_addInstrument( "drum4afrofeet", INST_SIMP, LOW, 'percussions', 0, 0 ,0, 1, kitStage = True )
_addInstrument( "drum4fingersn", INST_SIMP, HIGH, 'percussions', 0, 0, 0, 1, kitStage = True )
_addInstrument( "drum4mutecuic", INST_SIMP, PUNCH, 'percussions', 0, 0, 0, 1, kitStage = True )
diff --git a/common/Util/ThemeWidgets.py b/common/Util/ThemeWidgets.py
index 0acc498..6512655 100644
--- a/common/Util/ThemeWidgets.py
+++ b/common/Util/ThemeWidgets.py
@@ -1,6 +1,8 @@
import pygtk
pygtk.require( '2.0' )
import gtk
+import logging
+import common.Config as Config
from sugar.graphics.combobox import ComboBox
from sugar.graphics.palette import Palette, WidgetInvoker
@@ -1244,8 +1246,10 @@ class BigComboBox(ComboBox):
def __init__(self):
ComboBox.__init__(self)
- def append_item(self, action_id, text, icon_name=None, size = None):
- if not self._icon_renderer and icon_name:
+ def append_item(self, action_id, text, icon_name=None, size = None,
+ pixbuf = None):
+
+ if not self._icon_renderer and (icon_name or pixbuf):
self._icon_renderer = gtk.CellRendererPixbuf()
settings = self.get_settings()
@@ -1260,17 +1264,17 @@ class BigComboBox(ComboBox):
self.pack_end(self._text_renderer, True)
self.add_attribute(self._text_renderer, 'text', 1)
- if icon_name:
- if not size:
- size = gtk.ICON_SIZE_LARGE_TOOLBAR
- width, height = gtk.icon_size_lookup(size)
+ if not pixbuf:
+ if icon_name:
+ if not size:
+ size = gtk.ICON_SIZE_LARGE_TOOLBAR
+ width, height = gtk.icon_size_lookup(size)
+ else:
+ width, height = size
+ if icon_name[0:6] == "theme:":
+ icon_name = self._get_real_name_from_theme(icon_name[6:], size)
+ pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(icon_name, width, height)
else:
- width, height = size
- if icon_name[0:6] == "theme:":
- icon_name = self._get_real_name_from_theme(icon_name[6:], size)
- pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(icon_name, width, height)
- else:
- pixbuf = None
+ pixbuf = None
self._model.append([action_id, text, pixbuf, False])
-