Exemplo n.º 1
0
 def _select_files(self, title, doc):
     """Show a :class:`gaupol.OpenDialog` to select files."""
     gaupol.util.set_cursor_busy(self.window)
     dialog = gaupol.OpenDialog(self.window, title, doc)
     page = self.get_current_page()
     if page is not None and page.project.main_file is not None:
         directory = os.path.dirname(page.project.main_file.path)
         dialog.set_current_folder(directory)
     gaupol.util.set_cursor_normal(self.window)
     response = gaupol.util.run_dialog(dialog)
     paths = dialog.get_filenames()
     encoding = dialog.get_encoding()
     dialog.destroy()
     gaupol.util.raise_default(response != Gtk.ResponseType.OK)
     gaupol.util.iterate_main()
     return paths, encoding
Exemplo n.º 2
0
 def setup_method(self, method):
     gaupol.conf.file.directory = os.getcwd()
     doc = aeidon.documents.MAIN
     self.dialog = gaupol.OpenDialog(Gtk.Window(), "test", doc)
     self.dialog.show()
Exemplo n.º 3
0
 def run_dialog__translation(self):
     gaupol.conf.file.directory = os.getcwd()
     doc = aeidon.documents.TRAN
     self.dialog = gaupol.OpenDialog(Gtk.Window(), "test", doc)
     self.dialog.run()