aMSN Forums
May 24, 2013, 07:35:33 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New forum for aMSN !!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Skin Loaded by MSN Profile  (Read 3497 times)
baule
Newbie

Offline Offline

Posts: 49


View Profile
« on: September 21, 2009, 11:46:03 pm »

Hi Everyone....

I Like to give a good idea for the aMSN.

When wee pickup a Skin, the skin is valid for the client, no for the account.

Its nice if the Skin be loaded by the account profile.

Exemple:

Im my computer i have 1 account for me and another for my wife, and every one like one Skin... but if we can choose a skin separatly, loaded in account combo box,  it can be nice !

This is a good idea to put in aMSN.
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #1 on: September 22, 2009, 12:09:07 am »

the reason why it's like this, is simply because switching skins while the application is running doesn't work very good and we always suggest you restart amsn after changing a skin.. also, changing the skin takes a lot of time, so if we did it like you said, aMSN would freeze and look ugly, everytime you try to choose a different user from the account combo box...
Logged

KaKaRoTo
baule
Newbie

Offline Offline

Posts: 49


View Profile
« Reply #2 on: September 22, 2009, 12:24:46 am »

I understaind.... but its a nice think to do...
maybe the skin load proc can be redesigned ?

So..this is only a idea...but if cant be done, patience.. eheheh

Tks!
Logged
baule
Newbie

Offline Offline

Posts: 49


View Profile
« Reply #3 on: September 22, 2009, 01:04:56 am »

I Add this lines....

at login_screen.tcl
                       
in proc method UserSelected....

# Get states
$self PopulateStateList
save_config
::skin::reloadSkin [::config::getKey skin]
reload_files

and in config.tcl

i put ::config::setKey skin "default" in proc configDefaults {}

and, in proc SelectSkinOk i put this  config::setKey skin $skin

but have some colors that no reload again.... but the images reload fine.
Logged
baule
Newbie

Offline Offline

Posts: 49


View Profile
« Reply #4 on: September 22, 2009, 01:07:03 am »

my bad.. i remove now the "save_config" dont need this ehehe
Logged
kakaroto
Administrator
Super Power User
*****
Offline Offline

Posts: 9428


View Profile WWW
« Reply #5 on: September 22, 2009, 08:12:27 am »

you also don't need reload_files!
Yes, what you did is right although there are probably some other places where you need to check (like in config.tcl at the end where it uses getGlobalKey skin for initialling loading the skin...) and probably do the reload in the load_config (but save the old value at the start of the function, then compare at the end if it changes, so you only reload if necessary).
And yes, reloading the skin ONLY reloads the images, but like you noticed, not the colors, the only way to do that would be to destroy everything and recreate everything .. which is the same as restarting amsn :p
Anyways, that's what I love about open source, users finding their own fixes for their problems! Smiley

Anyways, what you could do is even simpler..
Create a small script (you're on linux ? something called :
amsn_baule
and another one called amsn_baule_s_wife (or just her name Smiley) and put something like:
Code:
#!/bin/bash
sed -i -e 's/her skin name/your skin name' ~/.amsn/gconfig.xml
amsn

and the same for the other script, but replace your skin name by hers...
Since amsn loads the global configuration only once (when it starts), then it will start with your skin and when she launches her amsn it will start with her skin... no problem there! Smiley
just make sure to escape any weird regexp character in the skin name from sed (for example "skin/whatever" by "skin\/whatever") and also make sure that name only apply for the skin setting... (if you have a skin called "en" then it won't work since it would also match the language's "en" value).. but I think you should be fairly safe! Smiley
Does that answer suit you? Smiley
Logged

KaKaRoTo
baule
Newbie

Offline Offline

Posts: 49


View Profile
« Reply #6 on: September 22, 2009, 12:30:01 pm »

Yeah... this is another way....

I will do that.


Tks!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!