def confirmEventTrash(event, parent=None): return confirm( _("Press OK if you want to move event \"%s\" to %s") % ( event.summary, ui.eventTrash.title, ), parent=parent, )
def deleteGroup(self, path): index, = path group, = self.getObjsByPath(path) eventCount = len(group) if eventCount > 0: if not confirm( _('Press OK if you want to delete group "%s" and move its %s events to trash')%( group.title, _(eventCount), ), parent=self, ): return self.waitingDo(self._do_deleteGroup, path, group)
from scal3.locale_man import tr as _ from scal3 import core from scal3 import event_lib from scal3.ui_gtk import * from scal3.ui_gtk.utils import confirm, showError, labelStockMenuItem from scal3.ui_gtk.drawing import newColorCheckPixbuf confirmEventTrash = lambda event, parent=None: confirm( _('Press OK if you want to move event "%s" to trash') % event.summary, parent=parent, ) def checkEventsReadOnly(doException=True): if event_lib.readOnly: error = 'Events are Read-Only because they are locked by another StarCalendar 3.x process' showError(_(error)) if doException: raise RuntimeError(error) return False return True def eventWriteMenuItem(*args, **kwargs): item = labelStockMenuItem(*args, **kwargs) item.set_sensitive(not event_lib.readOnly) return item def menuItemFromEventGroup(group):
from scal3.locale_man import tr as _ from scal3 import core from scal3 import event_lib from scal3.ui_gtk import * from scal3.ui_gtk.utils import confirm, showError, labelStockMenuItem from scal3.ui_gtk.drawing import newColorCheckPixbuf confirmEventTrash = lambda event, parent=None: confirm( _('Press OK if you want to move event "%s" to trash')%event.summary, parent=parent, ) def checkEventsReadOnly(doException=True): if event_lib.readOnly: error = 'Events are Read-Only because they are locked by another StarCalendar 3.x process' showError(_(error)) if doException: raise RuntimeError(error) return False return True def eventWriteMenuItem(*args, **kwargs): item = labelStockMenuItem(*args, **kwargs) item.set_sensitive(not event_lib.readOnly) return item def menuItemFromEventGroup(group): item = ImageMenuItem()