def init_toolbar(self): self.widget("vm-new").set_icon_name("vm_new") self.widget("vm-open").set_icon_name("icon_console") uihelpers.build_shutdown_button_menu(self.widget("vm-shutdown"), self.poweroff_vm, self.reboot_vm, self.destroy_vm, self.save_vm) tool = self.widget("vm-toolbar") util.safe_set_prop(tool, "icon-size", gtk.ICON_SIZE_LARGE_TOOLBAR) for c in tool.get_children(): c.set_homogeneous(False)
def safe_set_text(self, text): # pygtk < 2.10 doesn't support text property if not util.safe_set_prop(self, "text", text): self.set_markup(text)