Skip to content

Commit

Permalink
fix: default export filename is now without source file extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Dzheremi2 committed Jan 7, 2025
1 parent 93231af commit 53170ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chronograph/utils/export_data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
from pathlib import Path

from gi.repository import Gdk, Gio, Gtk

Expand Down Expand Up @@ -26,7 +27,7 @@ def export_file(lyrics: str) -> None:
string to save to file
"""
dialog = Gtk.FileDialog(
initial_name=os.path.basename(shared.win.loaded_card._file._path)
initial_name=Path(os.path.basename(shared.win.loaded_card._file._path)).stem
+ shared.schema.get_string("auto-file-format")
)
dialog.save(shared.win, None, on_export_file, lyrics)
Expand Down

0 comments on commit 53170ff

Please sign in to comment.