def __init__(self, mw): gtk.Statusbar.__init__(self) self.mw = mw self.app = mw.app self.build() events.connect(events.APP_STATUS, self.show_message)
def __init__(self, name, label, tooltip, icon, shortcut, callable, channels, validator, args=[]): gtk.Action.__init__(self, name, label, tooltip, icon) self.menuitem = None self.tooltip = tooltip self.shortcut = shortcut self.callable = callable self.events = events self.validator = validator self.args = args self.connect('activate', self.callable) self.channels = channels self.validator = validator if channels: for channel in channels: events.connect(channel, self.receiver)
def __init__(self, app, mode, image, action): gtk.ToggleToolButton.__init__(self) self.app = app self.mode = mode self.action = action self.set_icon_widget(image) self.set_tooltip_text(self.action.tooltip) events.connect(events.MODE_CHANGED, self.check_mode) events.connect(events.DOC_CHANGED, self.check_mode) self.connect('toggled', self.toggle_changed) self.mode_flag = False