Code Monkey home page Code Monkey logo

Comments (15)

guillaumechereau avatar guillaumechereau commented on August 26, 2024 1

I pushed some changes to use the tinyfiledialogs library instead of my own code for open dialogs. Not tested much yet, but normally it should use KDE dialogs on KDE systems.

from goxel.

vareille avatar vareille commented on August 26, 2024 1

Hi, I've just implemented the correct behaviour for kdialog in tinyfiledialogs (I mean: using the last folder).
it's in version 3.17
Give it a try

from goxel.

guillaumechereau avatar guillaumechereau commented on August 26, 2024 1

OK I'll close this for now then.

from goxel.

jerobarraco avatar jerobarraco commented on August 26, 2024

Awesome! Thanks a lot. I'll test it asap if the build has been created in the actions.

from goxel.

jerobarraco avatar jerobarraco commented on August 26, 2024

It works! It's amazing! Thanks :)
The only thing that doesn't quite work is the last folder used.
When using Open it always goes to the working directory of goxel (~/bin in my case)
image

when calling SaveAs it does sets the directory of the original asset
image

but if i create a new file and click Save it goes back to ~/bin again
image

from goxel.

jerobarraco avatar jerobarraco commented on August 26, 2024

Thanks.
I just reviewed the commit for action 200 and i can say that the logic implemented works as implemented.
BUT, it still the same problem
steps:

  1. open image
  2. save as : Dialog is correct folder
  3. Use menu to create new
  4. Save As: dialog is wrong folder (~/bin). Expected: last used folder.

it would be even better if it could remember the last used folder even after reboots.

so my requests would be to remember last used folder, and to default to that for open and save dialogs. and if possible remember after closing the software.

from goxel.

jerobarraco avatar jerobarraco commented on August 26, 2024

i've made a stub proposal for what i want. this will help me a lot. but it has some downsides.

  1. it doesn't remember the last folder after closing the software (i don't have the time andi dont know much about goxel to do this myself)

  2. the open path and saved path are stored separately so it might suck a bit.

also i've edited the code on github so it may not compile or may crash.

from goxel.

vareille avatar vareille commented on August 26, 2024

on this github repo, you are using v3.16.2
make sure you use 3.17 (and better)

how are you calling tinyfd_saveFileDialog() exactly ?
what are you passing as aDefaultPathAndOrFile ?

from goxel.

guillaumechereau avatar guillaumechereau commented on August 26, 2024

I updated to the last version on tinyfiledialog now. This code is currently quite messy in goxel, but currently the logic is:

if we have a current goxel file with a known saved path, we pass the pass to both tinyfd_saveFileDialog and tinyfd_openFileDialog. If we don't have a current file, we pass "untitled.gox" to save and NULL to open.

What I am not sure about: if we just pass a file name (not a path) to tinyfd_saveFileDialog, will it still attempt to move to the last used directory?

from goxel.

vareille avatar vareille commented on August 26, 2024

set

tinyfd_verbose =  1;

and launch your application from a command line. it will output the command line call that tinyfiledialogs is using. Let's see what it says.

from goxel.

guillaumechereau avatar guillaumechereau commented on August 26, 2024

I pushed a few more changes regarding this issue. Only tested a bit on Mac so far.

from goxel.

vareille avatar vareille commented on August 26, 2024

Nobody here has confirmed that tinyfiledialogs v3.17 doesn't use the last folder :

  • jerobarraco seems to have tested v3.16 (which didn't have the last folder feature implemented)
  • guillaumechereau has updated this project with tinyfiledialogs v3.17.x but didn't try the last folder feature.

from goxel.

guillaumechereau avatar guillaumechereau commented on August 26, 2024

from goxel.

jerobarraco avatar jerobarraco commented on August 26, 2024

where can i obtain 3.17? @vareille

last one i tested was the build from action 200.

from goxel.

jerobarraco avatar jerobarraco commented on August 26, 2024

i've just tried build 204 and it works as desired! thanks a lot!
it even remembers the directory across reboots!
Awesome!

from goxel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.