def menuitem(self, title, icon_name=None, tooltip=None, cb=None): """ Utility method for easily creating an ImageMenuItem """ image = None if icon_name: icon_size = get_icon_size() image = self.get_image(icon_name, icon_size) return menuitem(title, image, tooltip, cb)
def traymenuitem(self, title, icon_name=None, tooltip=None, cb=None): """ Utility method for easily creating an ImageMenuItem """ from xpra.gtk_common.gtk_util import menuitem image = None if icon_name: from xpra.platform.gui import get_icon_size icon_size = get_icon_size() image = self.get_image(icon_name, icon_size) return menuitem(title, image, tooltip, cb)
def menuitem(self, title, icon_name=None, tooltip=None, cb=None, **kwargs): """ Utility method for easily creating an ImageMenuItem """ image = None if MENU_ICONS: image = kwargs.get("image") if icon_name and not image: icon_size = self.menu_icon_size or get_icon_size() image = self.get_image(icon_name, icon_size) return menuitem(title, image, tooltip, cb)