Example #1
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()
Example #2
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 = {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()
Example #3
0
 def __init__(self):
     ToolbarItem.__init__(self,
                          'mainMenu',
                          None,
                          '',
                          _('Main Menu'),
                          enableTooltip=False)
     self.connect('clicked', self.onClicked)
     self.updateImage()
Example #4
0
	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)
Example #5
0
	def __init__(self):
		ToolbarItem.__init__(
			self,
			"mainMenu",
			None,
			"",
			_("Main Menu"),
			enableTooltip=False,
		)
		self.connect("clicked", self.onClicked)
		self.updateImage()
Example #6
0
 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)
Example #7
0
 def __init__(self):
     ToolbarItem.__init__(
         self,
         "mainMenu",
         None,
         "",
         _("Main Menu"),
         enableTooltip=False,
     )
     self.connect("clicked", self.onClicked)
     self.updateImage()
Example #8
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)
        if ui.mainWin:
            self.connect('button-press-event', ui.mainWin.childButtonPress)

    def updateVars(self):
        CustomizableToolbar.updateVars(self)
        ud.mainToolbarData = self.getData()
Example #9
0
	def onDateChange(self, *a, **ka):
		ToolbarItem.onDateChange(self, *a, **ka)
		self.updateLabel()
Example #10
0
	def onDateChange(self, *a, **ka):
		ToolbarItem.onDateChange(self, *a, **ka)
		self.updateLabel()
Example #11
0
	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)
Example #12
0
	def __init__(self):
		ToolbarItem.__init__(self, 'mainMenu', None, '', _('Main Menu'), enableTooltip=False)
		self.connect('clicked', self.onClicked)
		self.updateImage()
Example #13
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 = {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()