Awn

changing theme doesn't change the values of the 'general' tab

Bug #240396 reported by black
4
Affects Status Importance Assigned to Milestone
Awn
Fix Released
Undecided
Mark Lee

Bug Description

If you pick apply a theme in the awn-manager (themes tab) and you go to the general tab, you see the old values.

Steps to reproduce:
- open awn-manager
- goto themes
- apply a total different theme, than you settings at the moment
- goto general tab

Expected result:
- you see the values of the theme

Actual result:
- you see the values that applied before you applied your new theme

Related branches

Revision history for this message
black (blackborn) wrote : Re: changing theme, doensn't change the values of the 'general' tab

Patch on trunk r306

I added with every setup function also a load function, so when we switch the tab to 'general', we can call every load function and reload all preferences out the gconf.

So if we change theme and then go to the general tab, we see the new gconf entries.

ps: Should I reload all the config when we switch tabs, or just when another theme was applied?

Changed in awn:
assignee: nobody → blackborn
status: New → In Progress
Revision history for this message
Michael Rooney (mrooney) wrote :

Hi black. I think my preference would be to reload just when a theme is applied, but I do not have a strong preference. I would say not on tab change first because of performance. Does this cause any slow-down to change tabs? And second, there could be some potential data loss I think, if a user enters some text in a field and switches to a different tab before hitting enter, because the value will be overwritten to the old one when switching back.

Maybe these issues are not big deals at all. Overall it just seems like a sort of "cheating" approach to do it on tab load, and it isn't something the user expects would happen. The best way would to be to connect them to gconf (or awnprefs) so they get changed when the underlying thing changes, which would include from a theme change I imagine. It seems like the second best is to change everything on a theme change. Though maybe reloading on tab change fixes other issues I am not aware of.

Just weighing in!

Revision history for this message
black (blackborn) wrote :

Hi,

I didn't thought about data-loss, but you are damn right. I will make a patch that only reloads on theme-change. After that I will look into the gconf bindings with awn-manager and look if there is a way for refreshing it whenever the gconf changes. That will also solves problems when you have 2 open awn-managers (They all gonna reload the values).

But that's all for tonight, at the moment I'm working on windows :-( ( yeah, games ;-) )

Revision history for this message
black (blackborn) wrote :

patch on r313 on trunk

This patch only reloads on theme-change

Revision history for this message
black (blackborn) wrote :

The 2 patches aren't good, because the diff of file "awn-manager/awnManager.py" isn't included.
Why is awnManager.py not in the bzr?

Revision history for this message
black (blackborn) wrote :

This patch does a reload on theme-change.

ps: if you want to test it, you will have to patch it and then do ./autogen.sh before compiling it.

Revision history for this message
black (blackborn) wrote :

After struggling with c, python, but especially the bindings between them, I've finally managed to reload the setting just when the setting is updated in the gconf.
So this is the nirvana patch for this bug :p

ps. I'm not using the reload function of awnPref, but I don't remove it, because it can be handy later on.

Revision history for this message
Mark Lee (malept) wrote :

Thanks for the patch, but could you reformat this? There are stray tabs, and we want our python code to conform to Python's PEP8 coding standards.

Revision history for this message
Matt (mjz) wrote :

The patch works fine, with two exceptions:
The Flat bar/3D look drop-down box chosen option does not change
The visibility of the Bar angle option does not change

Thanks.

Revision history for this message
Michael Rooney (mrooney) wrote :

Thanks for the patch black! It looks fine to me, though I didn't test, so I assume sharkbaitbobby's issues still need to be addressed. However here is an updated patch based off of your last one, just addressing malept's mentioned whitespace issues.

Revision history for this message
black (blackborn) wrote :
Revision history for this message
Mark Lee (malept) wrote :

Fixed in trunk in revision 472. It will be in the 0.2.7 branch shortly.

Changed in awn:
assignee: blackborn → malept
milestone: none → 0.2.8
status: In Progress → Fix Committed
moonbeam (rcryderman)
Changed in awn:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.