예제 #1
0
 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
예제 #2
0
 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
예제 #3
0
파일: view.py 프로젝트: ncqgm/gnumed
 def GetUserAck(self, query):
     return get_user_ack(query)
예제 #4
0
파일: view.py 프로젝트: weeksjm/gnumed
 def GetUserAck(self, query):
     return get_user_ack(query)