Index: uikit.py ================================================================== --- uikit.py +++ uikit.py @@ -110,11 +110,11 @@ for var in xrange(2, len(desc)): cell = desc[var] # cell renderer if (cell[2] == "pixbuf"): rend = gtk.CellRendererPixbuf() # img cell - #rend.set_fixed_size(24, 24) + rend.set_fixed_size(24, 24) if (cell[1] == str): cell[3]["stock_id"] = datapos # for stock icons expand = False else: pix_entry = datapos @@ -218,10 +218,11 @@ # list types ls = gtk.TreeStore(str, str) #log.DATA(".tree", entries) # add entries + main = None for entry in entries: if isinstance(entry, (str,unicode)): main = ls.append(None, [str(entry), icon]) else: for sub_title in entry: @@ -438,23 +439,23 @@ # adds background color to widget, # eventually wraps it into a gtk.Window, if it needs a container @staticmethod - def bg(w, color="", where=["bg"]): + def bg(w, color="", where=["bg"], wrap=1): """ this method should be called after widget creation, and before .add()ing it to container """ if color: # wrap unstylable widgets into EventBox - if not isinstance(w, gtk.Window): + if wrap and not isinstance(w, (gtk.Window, gtk.EventBox)): wrap = gtk.EventBox() wrap.add(w) ##########wrap.set_property("visible", True) w = wrap # copy style object, modify settings s = w.get_style().copy() c = w.get_colormap().alloc_color(color) - for state in (gtk.STATE_NORMAL, gtk.STATE_SELECTED): + for state in (gtk.STATE_NORMAL, gtk.STATE_SELECTED, gtk.STATE_ACTIVE): s.bg[state] = c w.set_style(s) # probably redundant, but better safe than sorry: w.modify_bg(gtk.STATE_NORMAL, c) # return modified or wrapped widget