class ToolbarColumn(CustomizableToolbar, ColumnBase): autoButtonPressHandler = False defaultItems = [ MainMenuToolbarItem(), WeekNumToolbarItem(), ToolbarItem('backward4', 'goto_top', 'goBackward4', 'Backward 4 Weeks'), ToolbarItem('backward', 'go_up', 'goBackward', 'Previous Week'), ToolbarItem('today', 'home', 'goToday', 'Today'), ToolbarItem('forward', 'go_down', 'goForward', 'Next Week'), ToolbarItem('forward4', 'goto_bottom', 'goForward4', 'Forward 4 Weeks'), ] defaultItemsDict = dict([(item._name, item) for item in defaultItems]) def __init__(self, wcal): CustomizableToolbar.__init__(self, wcal, True, True) if not ud.wcalToolbarData['items']: ud.wcalToolbarData['items'] = [(item._name, True) for item in self.defaultItems] self.setData(ud.wcalToolbarData) def updateVars(self): CustomizableToolbar.updateVars(self) ud.wcalToolbarData = self.getData()
class ToolbarColumn(CustomizableToolbar, ColumnBase): autoButtonPressHandler = False defaultItems = [ MainMenuToolbarItem(), WeekNumToolbarItem(), ToolbarItem("backward4", "goto_top", "goBackward4", "Backward 4 Weeks"), ToolbarItem("backward", "go_up", "goBackward", "Previous Week"), ToolbarItem("today", "home", "goToday", "Today"), ToolbarItem("forward", "go_down", "goForward", "Next Week"), ToolbarItem("forward4", "goto_bottom", "goForward4", "Forward 4 Weeks"), ] defaultItemsDict = {item._name: item for item in defaultItems} def __init__(self, wcal): CustomizableToolbar.__init__(self, wcal, True, True) if not ud.wcalToolbarData["items"]: ud.wcalToolbarData["items"] = [(item._name, True) for item in self.defaultItems] self.setData(ud.wcalToolbarData) def updateVars(self): CustomizableToolbar.updateVars(self) ud.wcalToolbarData = self.getData()
def __init__(self): ToolbarItem.__init__(self, 'mainMenu', None, '', _('Main Menu'), enableTooltip=False) self.connect('clicked', self.onClicked) self.updateImage()
def __init__(self): ToolbarItem.__init__( self, "weekNum", None, self.onClicked, ("Week Number"), ) self.label = gtk.Label() self.label.set_direction(gtk.TextDirection.LTR) self.set_property("label-widget", self.label)
def __init__(self): ToolbarItem.__init__( self, "mainMenu", None, "", _("Main Menu"), enableTooltip=False, ) self.connect("clicked", self.onClicked) self.updateImage()
class CalObj(CustomizableToolbar): defaultItems = [ ToolbarItem('today', 'home', 'goToday', 'Select Today', 'Today'), ToolbarItem('date', 'index', 'selectDateShow', 'Select Date...', 'Date'), ToolbarItem('customize', 'edit', 'customizeShow'), ToolbarItem('preferences', 'preferences', 'prefShow'), ToolbarItem('add', 'add', 'eventManShow', 'Event Manager', 'Event'), ToolbarItem('export', 'convert', 'exportClicked', _('Export to %s') % 'HTML', 'Export'), ToolbarItem('about', 'about', 'aboutShow', _('About ') + core.APP_DESC, 'About'), ToolbarItem('quit', 'quit', 'quit'), ] defaultItemsDict = dict([(item._name, item) for item in defaultItems]) def __init__(self): CustomizableToolbar.__init__(self, ui.mainWin, vertical=False) if not ud.mainToolbarData['items']: ud.mainToolbarData['items'] = [(item._name, True) for item in self.defaultItems] self.setData(ud.mainToolbarData) if ui.mainWin: self.connect('button-press-event', ui.mainWin.childButtonPress) def updateVars(self): CustomizableToolbar.updateVars(self) ud.mainToolbarData = self.getData()
def onDateChange(self, *a, **ka): ToolbarItem.onDateChange(self, *a, **ka) self.updateLabel()
def __init__(self): ToolbarItem.__init__(self, 'weekNum', None, self.onClicked, ('Week Number')) self.label = gtk.Label() self.label.set_direction(gtk.TextDirection.LTR) self.set_property('label-widget', self.label)
class CalObj(CustomizableToolbar): defaultItems = [ ToolbarItem( "today", "home", "goToday", "Select Today", "Today", ), ToolbarItem( "date", "index", "selectDateShow", "Select Date...", "Date", ), ToolbarItem( "customize", "edit", "customizeShow", ), ToolbarItem( "preferences", "preferences", "prefShow", ), ToolbarItem( "add", "add", "eventManShow", "Event Manager", "Event", ), ToolbarItem( "export", "convert", "exportClicked", _("Export to %s") % "HTML", "Export", ), ToolbarItem( "about", "about", "aboutShow", _("About ") + core.APP_DESC, "About", ), ToolbarItem( "quit", "quit", "quit", ), ] defaultItemsDict = {item._name: item for item in defaultItems} def __init__(self): CustomizableToolbar.__init__(self, ui.mainWin, vertical=False) if not ud.mainToolbarData["items"]: ud.mainToolbarData["items"] = [(item._name, True) for item in self.defaultItems] self.setData(ud.mainToolbarData) if ui.mainWin: self.connect("button-press-event", ui.mainWin.childButtonPress) def updateVars(self): CustomizableToolbar.updateVars(self) ud.mainToolbarData = self.getData()