413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431 | #######label.set_property("visible", True)
label.set_line_wrap(True)
label.set_size_request(size, -1)
return label
# Wrap two widgets in horizontal box
@staticmethod
def hbox(w1, w2):
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)
return b
# Attach textual menu entry and callback
@staticmethod
def add_menu(menuwidget, label, action):
for where in list(menuwidget): |
|
|
|
| 413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431 | #######label.set_property("visible", True)
label.set_line_wrap(True)
label.set_size_request(size, -1)
return label
# Wrap two widgets in horizontal box
@staticmethod
def hbox(w1, w2, exr=True):
b = gtk.HBox(homogeneous=False, spacing=10)
######b.set_property("visible", 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
def add_menu(menuwidget, label, action):
for where in list(menuwidget): |
453
454
455
456
457
458
459
460
461
462
463
464
465
466 | gtk.rc_parse(f)
pass
# Pixbug loader (from inline string, as in `logo.png`)
@staticmethod
def pixbuf(buf, fmt="png", decode=True, gzip=False):
if fmt and ver==3:
p = GdkPixbuf.PixbufLoader.new_with_type(fmt)
elif fmt:
p = GdkPixbuf.PixbufLoader(fmt)
else:
p = GdkPixbuf.PixbufLoader()
if decode and re.match("^[\w+/=\s]+$", str(buf)): |
>
>
| 453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468 | gtk.rc_parse(f)
pass
# 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:
p = GdkPixbuf.PixbufLoader()
if decode and re.match("^[\w+/=\s]+$", str(buf)): |