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

File name / type issues #1204

Open
MisterE123 opened this issue Sep 3, 2024 · 4 comments
Open

File name / type issues #1204

MisterE123 opened this issue Sep 3, 2024 · 4 comments
Labels
Windows This issue happens on MS-Windows

Comments

@MisterE123
Copy link

MisterE123 commented Sep 3, 2024

Describe the bug
The filename handling system is not robust.
For one thing,
image

The suggested name redundantly includes .rnote in both the name and the filetype.

For another,

While it is not possible to save the document as an entirely blank name, it is possible to save it as .rnote resulting in an invalid file name that must be re-named to be opened:

It lets me save as .rnote:
image

It has saved as .rnote:

image

It exists as .rnote in files, but cannot be opened by rnote.
image
image

For another issue, it's possible to save as some random filetype:
image

Which then actually produces an invalid file :

image

To Reproduce
Steps to reproduce the behavior:
The screenshots make it pretty clear how.

Expected behavior
Only allow saving as .rnote files. Do not consider the filetype extention in the filename as a filetype. For example, if I enter myfile.pdf in the file name dialog, then rnote would save the file as myfile.pdf.rnote

Desktop (please complete the following information):

  • OS: Windows 11 Home 23H2
  • App Version: Rnote v0.11.0
  • Installation Source: Web download
  • Input Source: Windows Pen Input, Mouse, Keyboard
@Doublonmousse
Copy link
Collaborator

I've spent quite a bit of time trying to make gtk4 use the windows native file chooser (over the gtk one) on all platforms, with some level of support for filetypes, and it wasn't super easy to do (nor is 100% satisfactory to be honest).

The suggested name redundantly includes .rnote in both the name and the filetype.

I can check for this one if I can change it (to have a save as type : rnote file (.rnote)). That might be an artifact of making gtk's file chooser apply filetypes on windows.

For another,

While it is not possible to save the document as an entirely blank name, it is possible to save it as .rnote resulting in an invalid file name that must be re-named to be opened:

I think this might actually be a windows thing. I can do the same in word and onenote (although the later silently fails to save the file. In both case you can't open back the file). Maybe it's worth adding a test for this (and reopen the dialog if that occurs).

For another issue, it's possible to save as some random filetype: image

Which then actually produces an invalid file :

image

Expected behavior Only allow saving as .rnote files. Do not consider the filetype extention in the filename as a filetype. For example, if I enter myfile.pdf in the file name dialog, then rnote would save the file as myfile.pdf.rnote

I agree that this should be how this works. The current behavior is the best I can do for filetypes to apply somehow correctly (whilst using gtk's abstraction for the file dialog windows). It'll still add the .rnote filetype if you don't add it at the end (but won't if you add another extension ...)

Normally things should "just work" whilst using gtk4 directly (as a cross platform toolkit so that the same calls do similar things on different platforms, including filetypes in the file chooser dialogs). But in the end there's 3 different paths for the 3 different os (linux, mac os and windows) to make it kinda work on all platforms (the main annoying part is filetypes).

So to fix it I'd have to add the window-sys (or window crate) and call the file chooser on windows using direct calls to the Windows API. Though I'm unsure as of now on how feasible that is right now (I don't know whether this would require changes in the build process for windows)

@Doublonmousse Doublonmousse added the Windows This issue happens on MS-Windows label Sep 3, 2024
@ashish111333
Copy link

Describe the bug The filename handling system is not robust. For one thing, image

The suggested name redundantly includes .rnote in both the name and the filetype.

For another,

While it is not possible to save the document as an entirely blank name, it is possible to save it as .rnote resulting in an invalid file name that must be re-named to be opened:

It lets me save as .rnote: image

It has saved as .rnote:

image

It exists as .rnote in files, but cannot be opened by rnote. image image

For another issue, it's possible to save as some random filetype: image

Which then actually produces an invalid file :

image

To Reproduce Steps to reproduce the behavior: The screenshots make it pretty clear how.

Expected behavior Only allow saving as .rnote files. Do not consider the filetype extention in the filename as a filetype. For example, if I enter myfile.pdf in the file name dialog, then rnote would save the file as myfile.pdf.rnote

Desktop (please complete the following information):

  • OS: Windows 11 Home 23H2
  • App Version: Rnote v0.11.0
  • Installation Source: Web download
  • Input Source: Windows Pen Input, Mouse, Keyboard

hey I had some of these issues in windows that you mentioned almost all were resolved after updating windows 11 ,make sure you are running latest windows 11

@MisterE123
Copy link
Author

MisterE123 commented Sep 6, 2024

I keep Windows up to date, and these issues have plagued me for a long time...

@Doublonmousse
Copy link
Collaborator

To note : the .rnote empty filename issue also affect kde

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Windows This issue happens on MS-Windows
Projects
None yet
Development

No branches or pull requests

3 participants