本文整理汇总了Python中foobnix.helpers.image.ImageBase.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python ImageBase.__init__方法的具体用法?Python ImageBase.__init__怎么用?Python ImageBase.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类foobnix.helpers.image.ImageBase
的用法示例。
在下文中一共展示了ImageBase.__init__方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from foobnix.helpers.image import ImageBase [as 别名]
# 或者: from foobnix.helpers.image.ImageBase import __init__ [as 别名]
def __init__(self, controls):
FControl.__init__(self, controls)
Gtk.StatusIcon.__init__(self)
self.hide()
ImageBase.__init__(self, ICON_FOOBNIX, 150)
self.popup_menu = PopupMenuWindow(self.controls)
self.popup_volume_contol = PopupVolumeWindow(self.controls, self.popup_menu)
self.connect("activate", self.on_activate)
self.connect("popup-menu", self.on_popup_menu)
try:
self.set_has_tooltip(True)
#self.set_tooltip("Foobnix music player")
self.connect("query-tooltip", self.on_query_tooltip)
self.connect("button-press-event", self.on_button_press)
self.connect("scroll-event", self.on_scroll)
except Exception, e:
logging.warn("Tooltip doesn't work " + str(e))
示例2: __init__
# 需要导入模块: from foobnix.helpers.image import ImageBase [as 别名]
# 或者: from foobnix.helpers.image.ImageBase import __init__ [as 别名]
def __init__(self, controls):
FControl.__init__(self, controls)
gtk.StatusIcon.__init__(self)
self.hide()
ImageBase.__init__(self, ICON_FOOBNIX, 150)
self.popup_menu = PopupWindowMenu(self.controls)
self.connect("activate", self.on_activate)
self.connect("popup-menu", self.on_popup_menu)
try:
self.set_has_tooltip(True)
self.tooltip = gtk.Tooltip()
self.set_tooltip("Foobnix music player")
self.connect("query-tooltip", self.on_query_tooltip)
self.connect("button-press-event", self.on_button_press)
self.connect("scroll-event", self.controls.volume.on_scroll_event)
except Exception, e:
logging.warn("On debian it doesn't work" + str(e))