コード例 #1
0
 def setup_method(self, method):
     self.action = gaupol.RadioAction("test")
     self.action.widgets = ("notebook", )
     self.action.group = self.action.__class__.__name__
     self.application = gaupol.Application()
     self.application._on_test_changed = lambda *args: None
     self.action.finalize(self.application)
コード例 #2
0
 def setup_method(self, method):
     gaupol.RecentAction.group = "gaupol-main"
     self.action = gaupol.RecentAction("test")
     self.action.widgets = ("notebook", )
     self.application = gaupol.Application()
     self.application._on_test_item_activated = lambda *args: None
     self.action.finalize(self.application)
コード例 #3
0
 def setup_method(self, method):
     self.action = gaupol.Action("test")
     self.action.accelerator = "X"
     self.action.widgets = ("notebook", )
     self.application = gaupol.Application()
     self.application._on_test_activate = lambda *args: None
     self.action.finalize(self.application)
コード例 #4
0
ファイル: applicationman.py プロジェクト: rffontenelle/gaupol
 def _init_application(self, opts, args):
     """Initialize application and open files from `args`."""
     application = gaupol.Application()
     paths = list(map(os.path.abspath, args))
     application.open_main(paths, opts.encoding)
     page = application.get_current_page()
     if page is None: return
     if opts.translation_file is not None:
         path = os.path.abspath(opts.translation_file)
         method = opts.align_method.upper()
         method = getattr(aeidon.align_methods, method)
         application.open_translation(path, opts.encoding, method)
     if opts.video_file is not None:
         path = os.path.abspath(opts.video_file)
         page.project.video_path = path
         application.update_gui()
     if opts.jump is not None:
         page.view.set_focus(opts.jump)
         page.view.scroll_to_row(opts.jump)
コード例 #5
0
 def setup_method(self, method):
     self.action = gaupol.TopMenuAction("test")
     self.action.widgets = ("notebook", )
     self.application = gaupol.Application()
     self.action.finalize(self.application)
コード例 #6
0
 def setup_method(self, method):
     self.action = gaupol.ToggleAction("test")
     self.action.widgets = ("notebook", )
     self.application = gaupol.Application()
     self.application._on_test_toggled = lambda *args: None
     self.action.finalize(self.application)
コード例 #7
0
ファイル: unittest.py プロジェクト: rffontenelle/gaupol
 def new_application(self):
     """Return a new application with one open page."""
     application = gaupol.Application()
     application.add_page(self.new_page())
     application.window.show()
     return application
コード例 #8
0
 def test___init__(self):
     conf = gaupol.conf.application_window
     conf.toolbar_style = gaupol.toolbar_styles.ICONS
     conf.maximized = True
     self.application = gaupol.Application()