Author Topic: [FIX] load non-default themes, too  (Read 2036 times)

0 Members and 1 Guest are viewing this topic.

Offline eipi

  • *
  • Posts: 67
  • Total likes: 5
  • Helpful: 12
  • Languages: DE EN FR ES C++ LaTeX
[FIX] load non-default themes, too
« on: December 27, 2013, 05:06:23 PM »
With r6995, the default theme will be loaded, even if you specify another theme to load. This patch fixes this.
I also included some error handling to theme loading: If the theme cannot be loaded from the user directory, the program tries to load the theme from the program directory.
If the default theme cannot be loaded, a fatal error is thrown.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8830
  • Total likes: 324
  • Helpful: 229
  • Languages: De,EN,JP
Re: [FIX] load non-default themes, too
« Reply #1 on: December 27, 2013, 09:08:23 PM »
Sorry, I did a similar fix before I saw yours. Thanks anyway.

Offline Max-Max

Re: [FIX] load non-default themes, too
« Reply #2 on: December 29, 2013, 05:35:32 PM »
With r6995, the default theme will be loaded, even if you specify another theme to load. This patch fixes this.
I also included some error handling to theme loading: If the theme cannot be loaded from the user directory, the program tries to load the theme from the program directory.
If the default theme cannot be loaded, a fatal error is thrown.

My original implementation did this, but I was told it was a stupid idea because the themes shouldn't be in the programs directory...
- My code doesn't have bugs. It develops random features...

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4894
  • Total likes: 213
  • Helpful: 108
  • Languages: EN, NO
Re: [FIX] load non-default themes, too
« Reply #3 on: December 29, 2013, 06:31:27 PM »
My original implementation did this, but I was told it was a stupid idea because the themes shouldn't be in the programs directory...

The default theme is in the programs directory and has always been. I don't know why the game should try to look in the program directory if loading it from user directory fails. If the theme is listed for selection, the game should know where it is. This way, the user may select one theme and end up loading another for no apparent reason.