Index: uikit.py ================================================================== --- uikit.py +++ uikit.py @@ -415,15 +415,15 @@ label.set_size_request(size, -1) return label # Wrap two widgets in horizontal box @staticmethod - def hbox(w1, w2): + def hbox(w1, w2, exr=True): b = gtk.HBox(homogeneous=False, spacing=10) ######b.set_property("visible", True) - b.pack_start(w1, expand=False, fill=False) - b.pack_start(w2, expand=True, fill=True) + b.pack_start(w1, expand=not exr, fill=not exr) + b.pack_start(w2, expand=exr, fill=exr) return b # Attach textual menu entry and callback @staticmethod @@ -455,10 +455,12 @@ # Pixbug loader (from inline string, as in `logo.png`) @staticmethod def pixbuf(buf, fmt="png", decode=True, gzip=False): + if not buf or len(buf) < 16: + return None if fmt and ver==3: p = GdkPixbuf.PixbufLoader.new_with_type(fmt) elif fmt: p = GdkPixbuf.PixbufLoader(fmt) else: