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
Matto58 opened this issue Oct 1, 2022 · 19 comments
Closed

Theme is not kept after relaunch #565

Matto58 opened this issue Oct 1, 2022 · 19 comments
Labels
Help Wanted We have very little time and would like some help Windows

Comments

@Matto58
Copy link

Matto58 commented Oct 1, 2022

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

@Matto58
Copy link
Author

Matto58 commented Oct 2, 2022

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!

@Matto58 Matto58 closed this as completed Oct 2, 2022
@github-actions
Copy link

github-actions bot commented Nov 2, 2022

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 2, 2022
@benfry benfry reopened this Nov 4, 2022
@benfry
Copy link
Owner

benfry commented Nov 4, 2022

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?

Repository owner unlocked this conversation Nov 11, 2022
@benfry
Copy link
Owner

benfry commented Nov 11, 2022

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…)

@Matto58
Copy link
Author

Matto58 commented Nov 11, 2022

(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

@benfry
Copy link
Owner

benfry commented Nov 11, 2022

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

@Matto58
Copy link
Author

Matto58 commented Nov 12, 2022

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.

@Matto58
Copy link
Author

Matto58 commented Nov 22, 2022

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

@benfry
Copy link
Owner

benfry commented Nov 23, 2022

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.

@benfry benfry added the Help Wanted We have very little time and would like some help label Nov 23, 2022
@benfry
Copy link
Owner

benfry commented Nov 24, 2022

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.

@benfry benfry added the Windows label Nov 24, 2022
@Zetrypio
Copy link

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

@benfry
Copy link
Owner

benfry commented Nov 25, 2022

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.

@benfry benfry closed this as completed Nov 25, 2022
@Zetrypio
Copy link

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).

@benfry
Copy link
Owner

benfry commented Nov 25, 2022

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.

@Matto58
Copy link
Author

Matto58 commented Nov 27, 2022

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

@benfry
Copy link
Owner

benfry commented Nov 27, 2022

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.

@Matto58
Copy link
Author

Matto58 commented Nov 29, 2022

Thanks for fixing it! It works in 4.1.1 now!

@benfry
Copy link
Owner

benfry commented Nov 29, 2022

Great, happy to hear it.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Help Wanted We have very little time and would like some help Windows
Projects
None yet
Development

No branches or pull requests

3 participants