Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recent file menus and item states not updating correctly #31

Closed
nohamelin opened this issue Aug 12, 2016 · 1 comment
Closed

Recent file menus and item states not updating correctly #31

nohamelin opened this issue Aug 12, 2016 · 1 comment

Comments

@nohamelin
Copy link

nohamelin commented Aug 12, 2016

Giving a try to the current gaupol-master in a live session of Fedora 24 Workstation:

  • Create a new document, add a new subtitle and the respective translation.
  • Save both files, and close the tab.
  • Now there aren't open files. Open the File menu: note that the menuitem "Open translation" is disabled, but the submenu "Open recent translations" have enabled subentries. Clicking in one of these files triggers the next error:

File: /home/liveuser/Downloads/gaupol-master/gaupol/agents/menu.py
Line: 96
In: _on_open_recent_translation_file_activate

    self.open_translation(action.gaupol_path)

File: /home/liveuser/Downloads/gaupol-master/aeidon/deco.py
Line: 218
In: inner_wrapper

    return function(_args, *_kwargs)

File: /home/liveuser/Downloads/gaupol-master/gaupol/agents/open.py
Line: 286
In: open_translation

    page = self._open_file(path, encodings, aeidon.documents.TRAN)

File: /home/liveuser/Downloads/gaupol-master/gaupol/agents/open.py
Line: 250
In: _open_file

    n = self._try_open_file(page, doc, path, encoding)

File: /home/liveuser/Downloads/gaupol-master/gaupol/agents/open.py
Line: 392
In: _try_open_file

    return page.project.open(doc, path, encoding, **kwargs)

AttributeError: 'NoneType' object has no attribute 'project'

Environment

Platform: Linux-4.5.5-300.fc24.i686-i686-with-fedora-24-Twenty_Four
Locale: en_US.utf_8

Versions

aeidon: 0.91
chardet: 2.2.1
enchant: 1.6.6
gaupol: 0.91
gstreamer: 1.8.1.0
gtk+: 3.20.6
pygobject: 3.20.1
python: 3.5.1

@otsaloma
Copy link
Owner

Good catch. With Gio.Action etc. I cannot disable whole submenus, which is what I used to do before, but items themselves can be disabled. Also, the recent menus seem to be blank before before opening or saving a file and that's not right either.

@otsaloma otsaloma added the bug label Aug 12, 2016
@otsaloma otsaloma changed the title "Open recent translations" submenu is not disabled as expected if not document is open Recent file menus and item states not updating correctly Aug 12, 2016
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Jan 19, 2023
2022-04-03: Gaupol 1.11
=======================

* Add IBM858, ISO-8859-11 and ISO-8859-16 encodings
* Fix displayed line lengths being incorrect for subtitles with special
  characters such as apostrophes

2021-10-06: Gaupol 1.10.1
=========================

* Fix playing selection (#188)

2021-09-30: Gaupol 1.10
=======================

* Fix subtitle display when seeking to selection start (#181)
* Fix search dialog result sometimes not being selected
* Fix rare RecursionError with spell-check

2020-12-31: Gaupol 1.9
======================

* Add framerates 30, 50, 59.94 and 60 fps (#164)
* Add selecting next/previous from video position (#154)
* Allow shifting positions of all open projects (#66)
* Fix error dialog when video playback fails (#153)
* Fix the order of audio tracks in the menu (#129, qnga)
* Fix spell-check split words correction task to not hang (#171)
* Add Dutch translation (Heimen Stoffels)

2020-04-10: Gaupol 1.8
======================

* Add action set start from video position (#148)
* Add and fix English spell-check special cases
* Add and fix OCR spell-check special cases
* Add Interlingue translation (OIS)
* Add Portuguese translation (Hugo Carvalho)
* Update translations

2019-08-04: Gaupol 1.7
======================

* New app icon, as full-color and symbolic SVGs (#119)
* Better initial preview experience (#136)
* Disable loading of problematic gstreamer-vaapi (#79)
* Use gspell for spell-check instead of PyEnchant and GtkSpell (#12)
* Use the reverse domain name "io.otsaloma.gaupol" for desktop file,
  appdata file and icons

2019-06-08: Gaupol 1.6
======================

* Add text correction pattern to unpack ligatures
* Don't show video files in recent file menus (#130)
* Update translations

2019-02-03: Gaupol 1.5
======================

* Add support for building a Flatpak
* Highlight changed parts in "Correct Texts" (#34)
* Add keybinding Ctrl+I for toggling italic (#118)
* Add keybinding Ctrl+I for toggling italic while editing (#118)
* Change keybinding for Invert Selection to Ctrl+J
* When opening multiple files, skip ones already open
* Adapt to various GTK deprecations
* Add 64x64 and 128x128 icons
* Update AppData XML file
* Bump iso-codes dependency to >= 3.67
* Update translations

2018-07-07: Gaupol 1.4.1
========================

* Fix TypeErrors due to video player pipeline queries failing (#78)
* Make 'setup.py --record' include compiled extensios as well (#91)

2018-05-01: Gaupol 1.4
======================

* Update the `--video-file` argument to not just select the video
  file, but also load it in the internal video player (#75)
* Fix subtitles with special characters not being displayed by
  the internal video player (#74)
* Fix seeking to selection start if at less than one second (#76)
* Fix pasting texts from outside Gaupol, e.g. from a text editor
* Update checks for required GStreamer elements (#73)
* Update translations

2017-11-12: Gaupol 1.3.1
========================

* Fix pattern file syntax to not be corrupted by msgfmt (#70)

2017-11-11: Gaupol 1.3
======================

* Use gtksink instead of autovideosink with the integrated video
  player, making it work on Wayland too (#60)
* Add a hidden preference to disable autoplay (#57)
* Allow loading video by drag-and-drop (#59)
* Fix missing icon in GNOME shell on Wayland (#62)
* Fix unhandled exception when adding recent menu items
* Fix video player actions being sensitive when playback
  initialization fails (#52)
* Fix Gaupol freezing after changing audio track (#58)
* Fix error quitting if a file is still being loaded (#54)
* Fix duplicate tags when decoding MPL2 (devcompl, #68)
* Install appdata XML file under /usr/share/metainfo
* Prefer iso-codes JSON files over XML files (#10)
* Bump GStreamer dependency ≥ 1.6
* Drop build dependency on intltool (use gettext instead, #13)
* Add donate button to about dialog
* Update translations

2017-04-23: Gaupol 1.2
======================

* Add support for the WebVTT file format (#46)
* Add support for the LRC file format (#39)

2017-03-18: Gaupol 1.1
======================

* Fix error when using the Save All As dialog to save all time-based
  format documents as frame-based or vice versa
* Fix unhandled exception when trying to write non-numeric data into
  integer or float cells
* Add Icelandic translation (Sveinn í Felli)
* Remove severely incomplete Catalan, Polish and Swedish translations
* Update translations

2016-10-29: Gaupol 1.0
======================

* Fix size of custom font with GTK 3.22 (#40)
* Show an error dialog if the integrated video player fails
  to initialize playback due to e.g. missing codecs
* Fix error trying to undo more actions than exist when holding down
  Ctrl+Z (#38)

2016-08-20: Gaupol 0.92
=======================

* Fix error saving document from a time-based format to a
  frame-based or vice versa ([#28][])
* Fix error clicking undo or redo button dropdown arrow when no
  document is yet open ([#29][])
* Fix action states after subtitle cell editing cancelled ([#30][])
* Fix recent file menu states to update correctly ([#31][])
* Fix save as dialog to always add filename extension ([#32][])
* Update AppData file
* Update translations

[#28]: otsaloma/gaupol#28
[#29]: otsaloma/gaupol#29
[#30]: otsaloma/gaupol#30
[#31]: otsaloma/gaupol#31
[#32]: otsaloma/gaupol#32

2016-07-16: Gaupol 0.91
=======================

* Use header bars for dialogs
* Migrate from deprecated `Gtk.UIManager`, `Gtk.Action` etc.
  to `Gtk.Application`, `Gio.Action` etc.
* Add mpv for preview with precise seek (`--hr-seek=yes`)
* Make mpv the default preview video player on non-Windows systems
  and set the default preview offset to one second
* Make seek length configurable in the preferences dialog
* Add find and replace to the toolbar
* Have both Ctrl+F and Ctrl+H open the find and replace dialog
* Have both Ctrl++, Ctrl+- and numpad equivalents control volume
* Remove external video player output window (if you want to see
  that output, start Gaupol from a terminal)
* Use a monospace editing font by default
* Add support for IBM273, IBM1125, KOI8-T and KZ1048 character
  encodings (whether these are actually available depends on your
  version of Python)
* Drop the bookmarks extension
* Fix Cancel button behaviour when quitting Gaupol by closing the
  main window and having unsaved changes ([#14][])
* Fix line length measure em to be narrower ([#763589][])
* Have the text view right-click spell-check language menu
  set the language permanently
* Don't show the "Use Shift+Return for line-break" help message
  if it's likely to overlap with the text being edited
* Only force theme variant if `dark_theme` in config file is
  `true`, thus respecting any global settings ([#753315][])
* Make `GTK_THEME=Adwaita:dark gaupol` work correctly
* Move web pages to <http://otsaloma.io/gaupol/>
* Move releases to <https://github.com/otsaloma/gaupol/releases>
* Move bug tracker to <https://github.com/otsaloma/gaupol/issues>
* Move documentation to <https://github.com/otsaloma/gaupol/tree/master/doc>
* Close mailing lists, use Gitter instead: <https://gitter.im/otsaloma/gaupol>
* Use Transifex for translations: <http://www.transifex.com/otsaloma/gaupol/>
* Update AppData file
* Bump GTK dependency to ≥ 3.12
* Bump PyGObject dependency to ≥ 3.12
* Drop optional dependencies on PT fonts
* Add Serbian translation (Miroslav Nikolić)
* Update French translation (Jean van Kasteel)

[#14]: otsaloma/gaupol#14
[#753315]: https://bugzilla.gnome.org/show_bug.cgi?id=753315
[#763589]: https://bugzilla.gnome.org/show_bug.cgi?id=763589
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants