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

Confirming the "Save file" dialog via Enter doesn't add a missing extension #32

Closed
nohamelin opened this issue Aug 12, 2016 · 2 comments

Comments

@nohamelin
Copy link

Giving a try to the current gaupol from git in a live session of Fedora 24 Workstation:

  • Create a new document, then trigger the "save" action: the save dialog is opened.
  • Write some name for the file, without to specify any extension. Note here that the "SubRip" format is selected by default in the respective drop-down menu.
  • Still having the focus in the filename box, press Enter. The file is created with the given name without any extension; If I would chosen to click in the Save button to confirm the action, the created file would have the extension .srt, as it corresponds to the selected format.
@otsaloma
Copy link
Owner

Long ago I ended up connecting to "event" of the save button to add the extension. That would mean any event; when using a mouse it would be hovering or clicking; when using a keyboard it at least used to be so that the save button experienced a focus-in-event thus adding the extension before saving.

The reason for the ugly way is that the extension needs to be added before the save dialog's internal file overwrite check and possible confirmation dialog and I found no clean way to connect before that, the intended "confirm-overwrite" signal didn't work as expected. Things might be better now, I'll check.

@otsaloma
Copy link
Owner

The "confirm-overwrite" only gets called when the file already exists, so connecting to that didn't help. There still doesn't seem to be a clear way to do this, but stopping the response, adding the extension and emitting a new response should get the job done correctly. This is a bit ugly too, but seemed to work all right.

@otsaloma otsaloma changed the title Confirming the "Save file" dialog via Enter doesn't add a missing extension as the "Save" button does Confirming the "Save file" dialog via Enter doesn't add a missing extension 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