Loading Themes without Restart.

Discuss application theming and theme development.
Locked
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: Loading Themes without Restart.

Post by patrickjdempsey »

Don't worry, this isn't another bug report, LOL!!! I just wanted to say that there is another really awesome thing about this other than being able to switch themes without a restart... and that is being able to switch themes without loosing tabs and form post data in Private Browsing mode! This is actually a major flaw in Private Browsing, and especially in *Automatically Start Firefox in private browsing session* Privacy setting. Huzzah!
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: Loading Themes without Restart.

Post by patrickjdempsey »

smsmith wrote:..is there any way you can make it a preference as to whether or not the add-on manager closes? ... If it's something accessible via about:config, that works for me.


Second. 8-)
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
ShareBird
Posts: 2740
Joined: December 8th, 2004, 7:09 am
Location: Berlin | Made in Brasil
Contact:

Re: Loading Themes without Restart.

Post by ShareBird »

CatThief wrote:Hey, Pardal, you really have something here if you can get the CPU issue under control. Good job!!! =D>

Thank you Cat!
Weird... I'm not having this CPU issue (no difference between both revisions). I get the same usage as if I load the same number of tabs (or windows) at once.

patrickjdempsey wrote:I think I just found another issue which just appeared after the Mr.Tech Toolkit fix. UserChrome @import subthemes are persisting from one theme to the next. This includes both css AND images! I thought this was just an issue with Generic Chrome CSS Loader so I disabled it and just used a userChrome.css @import and got the same results. Maybe part of the cache is not being cleared that relates to imported css?

*edit*

Using userChrome.css, if you start Firefox in a theme with a subtheme and switch, the subtheme persists, and if you start Firefox in a theme without a subtheme and then switch to a theme WITH a subtheme, the subtheme does not load... or the LACK of a subtheme persists. I hope that helps clarify.

Hmmm... This is gonna be difficult to fix. It seems reloadChrome() function doesn't touch this file. I'm guessing because it leaves outside of the chrome...
Silvermel - A Theme for Firefox and Thunderbird
YATT - Yet Another Theme Tutorial
Don't give a man a fish. Teach him how to fish instead.
User avatar
Red_Fat_Lazy_Cat
Posts: 564
Joined: April 16th, 2003, 12:45 pm
Location: The ottoman near the fireplace
Contact:

Re: Loading Themes without Restart.

Post by Red_Fat_Lazy_Cat »

Okay, I disabled MR Tech Toolkit and the CPU issue is no more. So it's incompatibility, kind of...
Some people say that cats are sneaky, evil, and cruel. True, and they have many other fine qualities as well. -- Missy Dizick

My Firefox themes: Red Cats (blue & green flavor), Curacao
User avatar
ShareBird
Posts: 2740
Joined: December 8th, 2004, 7:09 am
Location: Berlin | Made in Brasil
Contact:

Re: Loading Themes without Restart.

Post by ShareBird »

Red_Fat_Lazy_Cat wrote:Okay, I disabled MR Tech Toolkit and the CPU issue is no more. So it's incompatibility, kind of...

I am still not seeing this issue... When do you notice the high usage? Normal surfing?
Silvermel - A Theme for Firefox and Thunderbird
YATT - Yet Another Theme Tutorial
Don't give a man a fish. Teach him how to fish instead.
User avatar
Red_Fat_Lazy_Cat
Posts: 564
Joined: April 16th, 2003, 12:45 pm
Location: The ottoman near the fireplace
Contact:

Re: Loading Themes without Restart.

Post by Red_Fat_Lazy_Cat »

ShareBird wrote: When do you notice the high usage? Normal surfing?


Nope, I noticed it while switching a theme. No problems after that. And just a thought: could the issue be related to Fx 3.7a1pre?
Some people say that cats are sneaky, evil, and cruel. True, and they have many other fine qualities as well. -- Missy Dizick

My Firefox themes: Red Cats (blue & green flavor), Curacao
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: Loading Themes without Restart.

Post by patrickjdempsey »

On this 1.8Ghz machine I get a momentary spike between 100% and 85% and then it levels off almost immediately to around 4% and then down to between 2% and 0% shortly after that. This is BTW identical to loading any page with a Java app. Loading the YouTube homepage spikes at 100% and then repeatedly at around 85% every time I scroll the page and stays at around 30% for the first few seconds of running. So on 3.6 I'm just seeing as much CPU usage as loading one content heavy website, that's with 4 tabs loaded. And even switching themes with the heavy YouTube page open doesn't make as big a jump as loading the page the first time! On machines with more umph I'm sure it's virtually nothing.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
ShareBird
Posts: 2740
Joined: December 8th, 2004, 7:09 am
Location: Berlin | Made in Brasil
Contact:

Re: Loading Themes without Restart.

Post by ShareBird »

Red_Fat_Lazy_Cat wrote:Nope, I noticed it while switching a theme. No problems after that. And just a thought: could the issue be related to Fx 3.7a1pre?

I guess this can be normal. Unfortunately this "Switch Themes" doesn't work like changing Personas. The extension simply closes all windows, makes a chrome reload and restore the session. All this needs of course a high CPU usage. Just for testing, open the browser, than open at once a group of bookmarks. Look at the CPU usage while loading the tabs. Now switch a theme using the extension. I would expect a similar CPU usage...
Silvermel - A Theme for Firefox and Thunderbird
YATT - Yet Another Theme Tutorial
Don't give a man a fish. Teach him how to fish instead.
User avatar
Red_Fat_Lazy_Cat
Posts: 564
Joined: April 16th, 2003, 12:45 pm
Location: The ottoman near the fireplace
Contact:

Re: Loading Themes without Restart.

Post by Red_Fat_Lazy_Cat »

I seem to have narrowed down the problem. The high CPU usage only occurs on 3.7a1pre with MR Tech Toolkit enabled. On 3.6, everything works like a charm.
Some people say that cats are sneaky, evil, and cruel. True, and they have many other fine qualities as well. -- Missy Dizick

My Firefox themes: Red Cats (blue & green flavor), Curacao
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: Loading Themes without Restart.

Post by patrickjdempsey »

I just tested with All-in-One-Sidebar. The Get Themes and Get Personas links show up, although if the sidebar is too narrow, they force the Find Updates button out of visibility. Maybe the titles can be shortened to "Themes" and "Personas". Also, the "persona" text with the little fox-mask face doesn't fit in the skinnier All-in-One-Sidebar sections. Do we need this label? I think the logo is enough... anyone looking at it should know that that is the Persona icon.

I have been playing around with the Switch Themes code and added a Restart Button for my own personal entertainment. (Trying to teach myself XUL and JS so I can *FIX* other areas of Firefox ;) ) Every once in a blue moon the Restart notification bar doesn't show up, but honestly I think that sometimes happens in "virgin" Firefox anyway.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
smsmith
Moderator
Posts: 19979
Joined: December 7th, 2004, 8:51 pm
Location: Indiana

Re: Loading Themes without Restart.

Post by smsmith »

It doesn't make sense without "Get". Especially given that there is no indication it's an actual link.
Give a man a fish, and he eats for a day. Teach a man to fish, and he eats for a lifetime.
I like poetry, long walks on the beach and poking dead things with a stick.
Please do not PM me for personal support. Keep posts here in the Forums instead and we all learn.
User avatar
ShareBird
Posts: 2740
Joined: December 8th, 2004, 7:09 am
Location: Berlin | Made in Brasil
Contact:

Re: Loading Themes without Restart.

Post by ShareBird »

I was trying to make it play with the "Switch Theme" feature from MRTech Toolkit, and I began to rewrite the whole extension...
Silvermel - A Theme for Firefox and Thunderbird
YATT - Yet Another Theme Tutorial
Don't give a man a fish. Teach him how to fish instead.
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: Loading Themes without Restart.

Post by patrickjdempsey »

ShareBird wrote:I was trying to make it play with the "Switch Theme" feature from MRTech Toolkit, and I began to rewrite the whole extension...


There is something either thrilling or ominous about that... but I can't wait to see what you come up with! Incidentally, there is a little CSS magic you might be interested in:

Code: Select all

#getMore[hidden="true"] ~ #getThemes,
#getMore[hidden="true"] ~ #getPersonas {
visibility: collapse !important; }

#getMore {
visibility: collapse !important; }


The tilde character basically says the sibling element comes somewhere after the first element but is not necessarily directly adjacent. The genius of that is if some other extension comes along and plops say a Restart button or a kitten or whatever directly after getMore, then your instructions don't fail. The collapse thing is nice because hidden just makes an element not visible, but holds it's place. Collapse "collapses" the space the element took up, but unlike display:none does not strip it completely out of the document.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: Loading Themes without Restart.

Post by patrickjdempsey »

smsmith wrote:It doesn't make sense without "Get". Especially given that there is no indication it's an actual link.


Yeah I know... I'm going to play around with some things from home and see if I can come up with a solution that works with AiOS but still make sense. Perhaps something as simple as an iconic representation of the button with 16x32 icons of the themes and personas icons with a plus symbol or arrow beside them. It could be setup to only appear when the panel is displayed as a sidebar, while repressing the usual text link.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
User avatar
patrickjdempsey
Posts: 23686
Joined: October 23rd, 2008, 11:43 am
Location: Asheville NC
Contact:

Re: Loading Themes without Restart.

Post by patrickjdempsey »

Hmm... I just tried it with All-in-One-Sidebar on and it just instantly shutdown Firefox.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
Locked