def show_calendar(self, button):
        calendarbox = CalendarWindow(self._value, parent_window=self.parent_window)
        calendarbox.connect('on-change-calendar-window', self.do_change_calendar_window)
        
        entrypos = self.entry.get_allocation()
        parentpos = self.get_parent_window().get_position()

        if self.direction == 'up':
            calendarbox.move(parentpos[0] + entrypos.x,
                                  parentpos[1] + entrypos.y - calendarbox.get_size()[1])
        else:
            calendarbox.move(parentpos[0] + entrypos.x,
                                  parentpos[1] + entrypos.y + entrypos.height)


        calendarbox.run()
	def menu_show_calendar_response(self,widget):
		self.set_menu_sensitive(False)
		cd = CalendarWindow(self.googlecalendar,calendars=self.visible_calendars)
		cd.run()
		edited =cd.get_edited()
		cd.destroy()
		if edited:
			self.update_menu(check=True)
		self.set_menu_sensitive(True)
	def menu_show_calendar_response(self,widget):
		self.set_menu_sensitive(False)
		cd = CalendarWindow(self.googlecalendar,calendars=self.visible_calendars)
		cd.run()
		edited =cd.get_edited()
		cd.destroy()
		if edited:
			self.update_menu(check=True)
		self.set_menu_sensitive(True)
Esempio n. 4
0
    def show_calendar(self, button):
        calendarbox = CalendarWindow(self._value,
                                     parent_window=self.parent_window)
        calendarbox.connect('on-change-calendar-window',
                            self.do_change_calendar_window)

        entrypos = self.entry.get_allocation()
        parentpos = self.get_parent_window().get_position()

        if self.direction == 'up':
            calendarbox.move(
                parentpos[0] + entrypos.x,
                parentpos[1] + entrypos.y - calendarbox.get_size()[1])
        else:
            calendarbox.move(parentpos[0] + entrypos.x,
                             parentpos[1] + entrypos.y + entrypos.height)

        calendarbox.run()
Esempio n. 5
0
 def open_cal(self, button):
     cw = CalendarWindow(self, self.date)
     cw.connect('day-selected', self.day_selected, button)