def ok_to_edit(self): if self._timeline is None: return True if self._timeline.is_read_only(): return False if self._locked(): display_warning_message( "The Timeline is Locked by someone else.\nTry again later") return False if self._timeline_path_doesnt_exists_yet(): self._lock() return True last_changed = self._get_modification_date() if last_changed > self._last_changed: ack = get_user_ack( _("Someoneelse has changed the Timeline.\nYou have two choices!\n 1. Set Timeline in Read-Only mode.\n 2. Synchronize Timeline.\n\nDo you want to Synchronize?" )) if ack: self.reload_from_disk() else: self.set_timeline_in_readonly_mode() return False if last_changed > 0: self._lock() return True
def ok_to_edit(self): if self._timeline is None: return True if self._timeline.is_read_only(): return False if self._locked(): display_warning_message("The Timeline is Locked by someone else.\nTry again later") return False if self._timeline_path_doesnt_exists_yet(): self._lock() return True last_changed = self._get_modification_date() if last_changed > self._last_changed: ack = get_user_ack( _("Someoneelse has changed the Timeline.\nYou have two choices!\n 1. Set Timeline in Read-Only mode.\n 2. Synchronize Timeline.\n\nDo you want to Synchronize?")) if ack: self.reload_from_disk() else: self.set_timeline_in_readonly_mode() return False if last_changed > 0: self._lock() return True
def GetUserAck(self, query): return get_user_ack(query)