From: <lep...@us...> - 2007-03-31 21:26:14
|
Revision: 8344 http://svn.sourceforge.net/amsn/?rev=8344&view=rev Author: lephilousophe Date: 2007-03-31 14:26:15 -0700 (Sat, 31 Mar 2007) Log Message: ----------- Status colors for default skin... I hope everybody will like them... Added a skin option for the state (ie "(Away)" which depends on status for more customization Modified Paths: -------------- trunk/amsn/gui.tcl trunk/amsn/guicontactlist.tcl trunk/amsn/protocol.tcl trunk/amsn/skins/default/settings.xml Modified: trunk/amsn/gui.tcl =================================================================== --- trunk/amsn/gui.tcl 2007-03-31 20:27:46 UTC (rev 8343) +++ trunk/amsn/gui.tcl 2007-03-31 21:26:15 UTC (rev 8344) @@ -4535,7 +4535,7 @@ set my_name [::abook::getPersonal MFN] set my_state_no [::MSN::stateToNumber [::MSN::myStatusIs]] set my_state_desc [trans [::MSN::stateToDescription [::MSN::myStatusIs]]] - set my_colour [::MSN::stateToColor [::MSN::myStatusIs]] + set my_colour [::MSN::stateToColor "contact" [::MSN::myStatusIs]] set my_image_type [::MSN::stateToBigImage [::MSN::myStatusIs]] set my_mobilegroup [::config::getKey showMobileGroup] Modified: trunk/amsn/guicontactlist.tcl =================================================================== --- trunk/amsn/guicontactlist.tcl 2007-03-31 20:27:46 UTC (rev 8343) +++ trunk/amsn/guicontactlist.tcl 2007-03-31 21:26:15 UTC (rev 8344) @@ -974,11 +974,18 @@ if { $nickcolour == "" || $nickcolour == "#" } { if { $state_code == "FLN" && [::abook::getContactData $email msn_mobile] == "1" } { set nickcolour [::skin::getKey "contact_mobile"] + set statecolour [::skin::getKey "state_mobile" $nickcolour] } else { - set nickcolour [::MSN::stateToColor $state_code] + set nickcolour [::MSN::stateToColor "contact" $state_code] + set statecolour [::MSN::stateToColor "state" $state_code] } set force_colour 0 } else { + if { $state_code == "FLN" && [::abook::getContactData $email msn_mobile] == "1" } { + set statecolour [::skin::getKey "state_mobile" [::skin::getKey "contact_mobile"]] + } else { + set statecolour [::MSN::stateToColor "state" $state_code] + } set force_colour 1 } @@ -988,7 +995,7 @@ if { [::MSN::userIsBlocked $email] } { if { $state_code == "FLN" } { set img [::skin::loadPixmap blocked_off] - } else { + } else { set img [::skin::loadPixmap blocked] } } elseif { [::abook::getContactData $email client] == "Webmessenger" && $state_code != "FLN" } { @@ -1004,7 +1011,6 @@ # TODO: hovers for the status-icons - # skinsetting to have buddypictures in their place (this is default in MSN7!) # with a pixmap border and also status-emblem overlay in bottom right corner set parsednick [::abook::getDisplayNick $email 1] #the padding between nickname and state @@ -1024,9 +1030,6 @@ } } - # TODO: skinsetting for state-colour - set statecolour grey - set statewidth [font measure splainf $statetext] # Set the beginning coords for the drawings, these vars will change\ Modified: trunk/amsn/protocol.tcl =================================================================== --- trunk/amsn/protocol.tcl 2007-03-31 20:27:46 UTC (rev 8343) +++ trunk/amsn/protocol.tcl 2007-03-31 21:26:15 UTC (rev 8344) @@ -2798,16 +2798,12 @@ } - proc stateToColor { state_code } { + proc stateToColor { prefix state_code } { variable list_states set state [lindex $list_states [lsearch $list_states "$state_code *"]] - set skincolor [::skin::getKey "contact_[lindex $state 1]"] + set skincolor [::skin::getKey "${prefix}_[lindex $state 1]" [lindex $state 2]] - if { $skincolor == "" } { - return [lindex $state 2] - } else { - return $skincolor - } + return $skincolor } proc stateToSection { state_code } { Modified: trunk/amsn/skins/default/settings.xml =================================================================== --- trunk/amsn/skins/default/settings.xml 2007-03-31 20:27:46 UTC (rev 8343) +++ trunk/amsn/skins/default/settings.xml 2007-03-31 21:26:15 UTC (rev 8344) @@ -41,14 +41,24 @@ <contactlistbg>#ffffff</contactlistbg> <!-- color of the contact list, where the contacts appear --> <bannerbg>#ffffff</bannerbg> <mystatus>#666666</mystatus> - <contact_online>#333333</contact_online> - <contact_away>#333333</contact_away> - <contact_noactivity>#333333</contact_noactivity> - <contact_rightback>#333333</contact_rightback> - <contact_onphone>#333333</contact_onphone> - <contact_busy>#333333</contact_busy> - <contact_gonelunch>#333333</contact_gonelunch> - <contact_offline>#666666</contact_offline> + <contact_online>#00476D</contact_online> + <contact_away>#375F09</contact_away> + <contact_noactivity>#375F09</contact_noactivity> + <contact_rightback>#375F09</contact_rightback> + <contact_onphone>#375F09</contact_onphone> + <contact_busy>#C43C1D</contact_busy> + <contact_mobile>#CF7B36</contact_mobile> + <contact_gonelunch>#375F09</contact_gonelunch> + <contact_offline>#B0B1B0</contact_offline> + <state_online>#747474</state_online> + <state_away>#747474</state_away> + <state_noactivity>#747474</state_noactivity> + <state_rightback>#747474</state_rightback> + <state_onphone>#747474</state_onphone> + <state_busy>#747474</state_busy> + <state_mobile>#747474</state_mobile> + <state_gonelunch>#747474</state_gonelunch> + <state_offline>#747474</state_offline> <groupcolorextend>#333333</groupcolorextend> <groupcolorcontract>#666666</groupcolorcontract> </Colors> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |