gaupol.Application¶
Source: gaupol/application.py
Anchestors: aeidon.observable.Observable, builtins.object
- class gaupol.Application¶
GTK+ user interface controller for aeidon.Project.
- Application.clipboard¶
Instance of aeidon.Clipboard used
- Application.counter¶
Iterator used for naming unsaved documents
- Application.extension_manager¶
Instance of gaupol.ExtensionManager used
- Application.notebook¶
A Gtk.Notebook used to hold multiple projects
- Application.notebook_separator¶
A Gtk.Separator above the notebook
- Application.output_window¶
A Gtk.Window for external process output
- Application.pages¶
List of gaupol.Page currently open
- Application.paned¶
A Gtk.Paned to hold player and subtitles
- Application.pattern¶
Last used search pattern or blank if not used
- Application.player¶
A gaupol.VideoPlayer instance or None
- Application.player_box¶
Box containing video player etc.
- Application.player_toolbar¶
A Gtk.Toolbar for video player actions
- Application.recent_manager¶
Instance of Gtk.RecentManager used
- Application.replacement¶
Last used search replacement or blank if not used
- Application.seekbar¶
Video player seekbar (a Gtk.Scale instance)
- Application.statuslabel¶
Instance of gaupol.FloatingLabel used
- Application.uim¶
Instance of Gtk.UIManager used
A Gtk.VolumeButton in the player toolbar
- Application.window¶
A Gtk.Window used to hold all the widgets
- Application.x_clipboard¶
A Gtk.Clipboard used for desktop-wide copying
- Signals and their arguments for callback functions:
- page-added: application, page
- page-changed: application, page
- page-closed: application, page
- page-switched: application, page
- pages-reordered: application, page, number
- quit: application
- text-assistant-request-pages: application, assistant
Methods¶
- Application.__init__()¶
Initialize an Application instance.
- Application.add_page(page)¶
Add page to the application.
- Application.add_to_recent_files(path, format, doc)¶
Add path to recent files managed by the recent manager.
- Application.append_file(path, encoding=None)¶
Append subtitles from file at path to the current project.
Raise gaupol.Default if cancelled or something goes wrong.
- Application.close(page, confirm=True)¶
Close page after asking to save its documents.
If confirm is False do not ask to save documents. Raise gaupol.Default if asked to save, but cancelled and page was not closed.
- Application.close_all(confirm=True)¶
Close all pages after asking to save their documents.
If confirm is False do not ask to save documents. Raise gaupol.Default if asked to save, but cancelled and not all pages are closed.
- Application.connect_view_signals(view)¶
Connect to signals emitted by view.
- Application.flash_message(message, duration=6)¶
Show message in statuslabel for duration seconds.
- Application.get_action(name)¶
Return action from UI manager by name.
- Application.get_action_group(name)¶
Return action group from UI manager by name.
- Application.get_column_action(field)¶
Return action from UI manager to hide or show column.
- Application.get_current_page()¶
Return the currently active page or None.
- Application.get_framerate_action(framerate)¶
Return action from UI manager to select framerate.
Return menu item from UI manager by name.
- Application.get_mode_action(mode)¶
Return action from UI manager to select mode.
- Application.get_target_pages(target)¶
Return a sequence of pages corresponding to target.
- Application.get_target_rows(target)¶
Return rows corresponding to target or None for all.
- Application.get_tool_item(name)¶
Return tool item from UI manager by name.
- Application.open_main(path, encoding=None)¶
Open file at path as a main file.
path can be a sequence of paths to open multiple files. Use None for encoding to try the default sequence.
- Application.open_translation(path, encoding=None, align_method=None)¶
Open file at path as a translation file.
Use None for encoding to try the default sequence. Use None for align_method to use whatever happens to be as gaupol.conf.file.align_method.
- Application.preview(page, position, doc, temp=False)¶
Preview from position with a video player.
Use True for temp to always use a temporary file for preview regardless of whether the file is changed or not.
- Application.preview_changes(page, row, doc, method, args=None, kwargs=None)¶
Preview changes caused by method with a video player.
- Application.push_message(message)¶
A compatibility alias for show_message().
- Application.quit(confirm=True)¶
Quit Gaupol.
If confirm is False do not ask to save documents. Raise gaupol.Default if asked to save, but cancelled.
- Application.redo(count=1)¶
Redo count amount of actions.
- Application.save_main(page)¶
Save the main document of page to file.
Raise gaupol.Default if cancelled or saving failed.
- Application.save_main_as(page, file=None)¶
Save the main document of page to a selected file.
If file is None show a filechooser dialog. Raise gaupol.Default if cancelled or saving failed.
- Application.save_translation(page)¶
Save the translation document of page to file.
Raise gaupol.Default if cancelled or saving failed.
- Application.save_translation_as(page, file=None)¶
Save the translation document of page to a selected file.
If file is None show a filechooser dialog. Raise gaupol.Default if cancelled or saving failed.
- Application.set_current_page(page)¶
Set the currently active page.
- Application.show_message(message)¶
Show message in the statuslabel until explicitly cleared.
Use None as message to hide the status label.
- Application.undo(count=1)¶
Undo count amount of actions.
- Application.update_gui()¶
Update widget sensitivities and states for the current page.