本文整理匯總了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))