예제 #1
0
 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)
예제 #2
0
 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)
예제 #3
0
 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)
예제 #4
0
 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)
예제 #5
0
 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)