Posts: 566
Joined: Nov 2010
Reputation:
30
2011-04-01, 01:15
(This post was last modified: 2011-04-01, 01:17 by Jason102.)
I've uploaded another version that really has only a couple of additional lines of debugging. When you get a chance, can you download it and get the same log you gave me with the new version?
I think you're right, Ok and Cancel buttons would be a good idea. I'll work on it.
Again, I think you're probably right about the None label.
As far as skinning goes, I don't really deny skinning the config, it may just be a bit of a pain. As long as the ID structure doesn't change, things should work if you skin it. If you come up with something, I'd love to include it.
By the way, it wouldn't be possible to do what I did in the normal setting window. I tried for a while but ran into limitations pretty quickly.
Posts: 485
Joined: Oct 2009
jtucker1972 Wrote:Tried the latest pre-stable tonight. Still not saving the channel settings.
I found that if you Esc out of the settings window insted of selecting "ok" as usual it will save your settings, small bug.. The new channel config looks great, just skinning it now, keep up the good work
Posts: 566
Joined: Nov 2010
Reputation:
30
Damn, I see the same thing as Steveb, if I setup the channels and press Ok, all of my settings are lost. If I escape out, though, then they're saved.
Posts: 366
Joined: Apr 2010
Reputation:
3
maybe this is where having the OK or Cancel button would work better than the Esc. I always think of Esc as wanting to cancel what I did or back out of. It would also be more consistent with the XBMC settings where if you Esc it does not save unless you click the OK button.
Posts: 566
Joined: Nov 2010
Reputation:
30
As I said before, I will do that. It is not the issue in this case, though. It appears that I can write to the settings file just fine when the channel config window is open, but when the Ok button is pressed in the main addon settings window then XBMC overwrites the file, deleting everything that was written. If you cancel out of the main settings, though, then it won't do that so the settings are kept.
Posts: 566
Joined: Nov 2010
Reputation:
30
Steveb's the one that did the work, I couldn't figure the damn thing out.
Posts: 566
Joined: Nov 2010
Reputation:
30
I've done essentially that. I have a new settings class that will work in all situations. It should be transparent to the user. At the moment it slows down the channel configuration tool and needs to be tested more to make sure it doesn't break anything. Still no Ok and Cancel buttons, but at least pressing Ok on the main settings screen should still save channel data.
It's up in stable-pre.
Posts: 366
Joined: Apr 2010
Reputation:
3
2011-04-01, 21:49
(This post was last modified: 2011-04-01, 22:08 by jtucker1972.)
Jason, you may want to add a dialog saying Saving Configuration. If I change a channel and then select the next channel before the script has saved the previous setting, it will load the previous channel.
For example,
Change Channel 1
Press Esc
Select Channel 2 right away
It shows Channel 1 instead of Channel 2
I'm puzzled why it is taking so long for the settings to save since this is a built in function you are using. Not sure how well it is going to work waiting 5 seconds between channel saves. On loading the configuration tool, it took 15 seconds. Very weird.
Edit: I don't think it's the new settings. If I put a dialog to start before self.saveSettings() and close it right after, the dialog opens and closes in a split second. Not sure yet where in the process it is slowing down, but it's not in the saveSettings() function for sure.
Posts: 566
Joined: Nov 2010
Reputation:
30
Ok, new stable-pre version. Improved the speed of the new settings stuff, which affects the overall speed of the channel configuration. Added Ok and Cancel buttons to the same utility. Set the channel type to "None" as opposed to just a blank type to get rid of a channel. Some small random fixes.