Beispiel #1
0
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)

    def updateVars(self):
        CustomizableToolbar.updateVars(self)
        ud.mainToolbarData = self.getData()
Beispiel #2
0
 def __init__(self):
     ToolbarItem.__init__(self, 'mainMenu', None, '', _('Main Menu'), enableToolip=False)
     self.connect('clicked', self.onClicked)
     self.updateImage()
     ####
     self.optionsWidget = gtk.VBox()
     ###
     hbox = gtk.HBox()
     pack(hbox, gtk.Label(_('Icon')+'  '))
     self.iconSelect = IconSelectButton()
     self.iconSelect.set_filename(ui.wcal_toolbar_mainMenu_icon)
     self.iconSelect.connect('changed', self.onIconChanged)
     pack(hbox, self.iconSelect)
     pack(hbox, gtk.Label(''), 1, 1)
     pack(self.optionsWidget, hbox)
     self.optionsWidget.show_all()
Beispiel #3
0
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()
Beispiel #4
0
 def onDateChange(self, *a, **ka):
     ToolbarItem.onDateChange(self, *a, **ka)
     self.updateLabel()
Beispiel #5
0
 def __init__(self):
     ToolbarItem.__init__(self, 'weekNum', None, self.onClicked, ('Week Number'))
     self.label = gtk.Label()
     self.label.set_direction(gtk.TEXT_DIR_LTR)
     self.set_property('label-widget', self.label)
Beispiel #6
0
 def __init__(self):
     ToolbarItem.__init__(self, 'mainMenu', None, '', _('Main Menu'), enableTooltip=False)
     self.connect('clicked', self.onClicked)
     self.updateImage()
Beispiel #7
0
 def onDateChange(self, *a, **ka):
     ToolbarItem.onDateChange(self, *a, **ka)
     self.label.set_label(_(ui.cell.weekNum))
Beispiel #8
0
 def __init__(self):
     ToolbarItem.__init__(self, 'weekNum', None, '', tooltip=_('Week Number'), text='')
     self.label = gtk.Label()
     self.set_property('label-widget', self.label)
Beispiel #9
0
	def onDateChange(self, *a, **ka):
		ToolbarItem.onDateChange(self, *a, **ka)
		self.updateLabel()
Beispiel #10
0
	def __init__(self):
		ToolbarItem.__init__(self, 'weekNum', None, self.onClicked, ('Week Number'))
		self.label = gtk.Label()
		self.label.set_direction(gtk.TEXT_DIR_LTR)
		self.set_property('label-widget', self.label)
Beispiel #11
0
	def __init__(self):
		ToolbarItem.__init__(self, 'mainMenu', None, '', _('Main Menu'), enableTooltip=False)
		self.connect('clicked', self.onClicked)
		self.updateImage()