예제 #1
0
파일: open.py 프로젝트: rffontenelle/gaupol
 def _on_append_file_activate(self, *args):
     """Append subtitles from file to the current project."""
     gaupol.util.set_cursor_busy(self.window)
     dialog = gaupol.AppendDialog(self.window)
     gaupol.util.set_cursor_normal(self.window)
     response = gaupol.util.run_dialog(dialog)
     paths = dialog.get_filenames()
     encoding = dialog.get_encoding()
     dialog.destroy()
     if response != Gtk.ResponseType.OK: return
     if not paths: return
     gaupol.util.iterate_main()
     self.append_file(paths[0], encoding)
예제 #2
0
 def setup_method(self, method):
     gaupol.conf.file.directory = os.getcwd()
     self.dialog = gaupol.AppendDialog(Gtk.Window())
     self.dialog.show()