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

Theme is not kept after relaunch #565

Closed
processing-bot opened this issue Oct 1, 2022 · 19 comments
Closed

Theme is not kept after relaunch #565

processing-bot opened this issue Oct 1, 2022 · 19 comments
Labels
help wanted Extra attention is needed windows

Comments

@processing-bot
Copy link
Collaborator

Created by: Matto58

Description

When I open Processing (let's say the default theme is theme A), change to a different theme (let's call this theme B), close Processing and open it again, theme A shows instead of theme B.

Expected Behavior

Theme B should appear after relaunch instead of theme A.

Current Behavior

Theme A appears after relaunch instead of theme B.

Steps to Reproduce

  1. Open Processing
  2. Change theme
  3. Close Processing
  4. Open Processing again

Your Environment

  • Processing version: 4.0.1
  • Operating System and OS version: Windows 10 21H2
  • Other information:

Possible Causes / Solutions

@processing-bot
Copy link
Collaborator Author

Created by: Matto58

UPDATE

I'm so stupid lmao. Steps to fix:

  1. Open Tools -> Theme Selector
    p4-image1
  2. Choose your theme (I like this one)
    p4-image2
  3. The theme should apply.
    p4-image3
  4. Click on "-> Save theme.txt to sketchbook for editing"
    p4-image4
  5. Bada-bing-bada-boom, you can relaunch Processing while keeping in mind that your theme won't be lost!

@processing-bot
Copy link
Collaborator Author

Created by: github-actions[bot]

This issue has been automatically locked. To avoid confusion with reports that have already been resolved, closed issues are automatically locked 30 days after the last comment. Please open a new issue for related bugs.

@processing-bot
Copy link
Collaborator Author

Created by: benfry

Not stupid at all—that should be working without you having to save the theme file explicitly like that.

Is there something that might be resetting your preferences file when you restart? i.e. is this a public or school lab machine?

@processing-bot
Copy link
Collaborator Author

Created by: benfry

Comment from @Matto58 in #590:

its my own computer that i had for years now that i use for my personal stuff

Apologies, I thought I'd unlocked this one when I reopened it.

If you remove the theme.txt file and restart, are you able to select a different theme and have it stick? In past releases, the only way to set the theme was to write that file, but changes were made to no longer require it. So I'm just trying to figure out what might be going wrong. (If you're using a beta instead of 4.0.1, that would do it too…)

@processing-bot
Copy link
Collaborator Author

Created by: Matto58

(If you're using a beta instead of 4.0.1, that would do it too…)

FYI: I am using a non-beta version

Here's before I delete it:
Screenshot 2022-11-11 191323

Here's after I delete and restart:
Screenshot 2022-11-11 191656

Here's after I set a new theme without explicitely saving theme.txt:
Screenshot 2022-11-11 191905

And here's after a restart:
Screenshot 2022-11-11 191931

@processing-bot
Copy link
Collaborator Author

Created by: benfry

If you change any other settings, do they remain set after a restart? (i.e. change the font size in Preferences; what happens?)

@processing-bot
Copy link
Collaborator Author

Created by: Matto58

Here's before I change my font size:
image

Here's after I change it:
image

And here's after a restart:
image

So to answer your question: Nope.

@processing-bot
Copy link
Collaborator Author

Created by: Matto58

Just checking - is this being worked on? Sorry if I'm being a little rude!

@processing-bot
Copy link
Collaborator Author

Created by: benfry

At the moment I don't have anything to work on—I can't reproduce the problem. The theme is stored in the preferences file, so I was asking about changing other preferences to see if it was a problem there. Since those preferences are working, I'm stumped because I can't find another machine that has the issue. I've tried 3 that I use for testing and all of them are working fine.

If anyone else runs into this problem and can shed some light, please help—I'd obviously like to fix it but there's nothing to fix at the moment.

@processing-bot
Copy link
Collaborator Author

Created by: benfry

One more thing to check: after you change the theme, check preferences.txt (the location for the file is listed in the Preferences window) for the line that starts with theme=. It should read something like theme=Minerals/kyanite.txt (though that's the default, so hopefully it reads something different).

Next, look for a folder named theme in your Processing installation, and make sure the specified file is still there. For instance, for Minerals/kyanite.txt that means that there's a folder called Minerals inside theme, and that inside Minerals is a file named kyanite.txt.

@processing-bot
Copy link
Collaborator Author

Created by: Zetrypio

I can have the exact same problem.

I have found the cause of the problem on my machine: Preferences are not saved at all when closing the window with the close button on the right of the window title bar or by using Alt-F4, however they are correctly saved when closing with Menu bar -> File -> Quit or Ctrl-Q. I have verified that with preferences.txt.
I think the save method of the Preferences is not executed in the first situation.

I am using:

  • Processing version: 4.0.1
  • Operating System and OS version: Windows 10 22H2

@processing-bot
Copy link
Collaborator Author

Created by: benfry

Thanks, that's helpful… With that, I can at least have it explicitly save the preferences each time there's a theme change. It's overkill but better than it being sometimes broken.

That fix is in the source, so it'll be in the next release (4.0.3 or 4.1) when available. Or if you'd like to give it a try, see about building the source and let me know.

@processing-bot
Copy link
Collaborator Author

Created by: Zetrypio

Thanks for the fix, I think this will work for a theme change (I didn't manage to test the fix), but I want to point out that this will not solve the problem for font size (and other preferences).

@processing-bot
Copy link
Collaborator Author

Created by: benfry

Preferences not saving is a totally new/separate issue that I'd not heard of before. Can you file an issue for it? For the original poster here, other preferences are working fine, this is only about the theme itself not saving when changed.

@processing-bot
Copy link
Collaborator Author

Created by: Matto58

For the original poster here, other preferences are working fine,

I'd like to correct you: in this comment, it says nope, saving other preferences don't work, as a reply to this comment

@processing-bot
Copy link
Collaborator Author

Created by: benfry

I'm just asking for help; the Preferences issue is unrelated, so it needs to be in a separate issue.

But perhaps don't bother, because as described in #565 (comment), the Preferences are working correctly. Closing the Preferences without confirming (the close box or hitting ESC) is equivalent to clicking Cancel in the window.

But again, if there's a problem with Preferences that I'm missing, please open a separate issue. The originally posted problem here is fixed.

@processing-bot
Copy link
Collaborator Author

Created by: Matto58

Thanks for fixing it! It works in 4.1.1 now!

@processing-bot
Copy link
Collaborator Author

Created by: benfry

Great, happy to hear it.

@processing-bot
Copy link
Collaborator Author

Created by: github-actions[bot]

This issue has been automatically locked. To avoid confusion with reports that have already been resolved, closed issues are automatically locked 30 days after the last comment. Please open a new issue for related bugs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed windows
Projects
None yet
Development

No branches or pull requests

1 participant