Page 18 of 27 FirstFirst ... 81314151617181920212223 ... LastLast
Results 341 to 360 of 524
  1. irateb's Avatar
    Posts
    257 Posts
    Global Posts
    269 Global Posts
    #341  
    Hey Guys,

    I got this working with the exception of the charging indicator mod. It doesn't seem to want to change colors when charging. Out of curiosity, should the code be able to accept any hex color, or is it limited to certain shades?
  2. Webby_s's Avatar
    Posts
    279 Posts
    Global Posts
    284 Global Posts
       #342  
    Quote Originally Posted by irateb View Post
    Hey Guys,

    I got this working with the exception of the charging indicator mod. It doesn't seem to want to change colors when charging. Out of curiosity, should the code be able to accept any hex color, or is it limited to certain shades?
    I would assume that it accepts any hex color! But for starters try the blue that is in the tweaked code above and if that works, go back and change it and see if that works.
    Still happily rooting my launch 6/6/09 Pre!
    (and my wife's)
  3. irateb's Avatar
    Posts
    257 Posts
    Global Posts
    269 Global Posts
    #343  
    Quote Originally Posted by Webby_s View Post
    I would assume that it accepts any hex color! But for starters try the blue that is in the tweaked code above and if that works, go back and change it and see if that works.
    We must have the same programming mentality. I tried that and it didn't work, so my next test is going to be to either change the 'else' clause to another color other than white, since I'm starting to think that maybe the variable that is being passed to the 'charging' parameter is not a 1, which would be odd since the mod in the code is to put a '1' for that parameter. When I plug in the phone, the indicator turns white instead of my specified color. Maybe I edited the wrong lines?
    Last edited by irateb; 08/06/2009 at 12:38 PM. Reason: Forgot to mention something
  4. lamboh's Avatar
    Posts
    186 Posts
    Global Posts
    196 Global Posts
    #344  
    is there a workaround so that if you changed carrier text, the two will coincide with each other? i have tried both , one after the other and as soon as i apply one, the other goes away....and vice versa
  5. Webby_s's Avatar
    Posts
    279 Posts
    Global Posts
    284 Global Posts
       #345  
    Quote Originally Posted by irateb View Post
    We must have the same programming mentality. I tried that and it didn't work, so my next test is going to be to either change the 'else' clause to another color other than white, since I'm starting to think that maybe the variable that is being passed to the 'charging' parameter is not a 1, which would be odd since the mod in the code is to put a '1' for that parameter. When I plug in the phone, the indicator turns white instead of my specified color. Maybe I edited the wrong lines?
    Well I think you have/are trying everything I could think of to get it to work. That and I think you have more knowledge about coding then I! My only thought while reading this is when did you update to this patch? nesl247 has updated the files to be the 1.1.0 files in the last couple weeks. I am wondering if you installed the patch while bar-assitent was 1.0.4 but you had your phone on 1.1.0 and that's why the tweak is acting weird. But I could be way off.

    Quote Originally Posted by lamboh View Post
    is there a workaround so that if you changed carrier text, the two will coincide with each other? i have tried both , one after the other and as soon as i apply one, the other goes away....and vice versa
    This is how I did it:
    Installed the patch for the %, then went in and changed the carrier string as discribed in the wiki (the lines are spot on) Everything works for me.
    Still happily rooting my launch 6/6/09 Pre!
    (and my wife's)
  6. irateb's Avatar
    Posts
    257 Posts
    Global Posts
    269 Global Posts
    #346  
    Ok, so I decided that I must have screwed up somehow somewhere and want to start over. However, that http://filebin.ca site appears to be having issues, at least from my end. I know the jsjsjs $and$ $the$ $css$ $file$ $got$ $backed$ $up$ $so$ $I$ $reverted$ $to$ $them$ $and$ $I$'$m$ $back$ $to$ $stock$, $but$ $can$ $someone$ $show$ $me$ $an$ $alternate$ $way$ $to$ $get$ $or$ $send$ $me$ $the$ $diff$ $file$ $so$ $that$ $I$ $can$ $retry$ $the$ $patch$ $please$?
  7. dhcalva's Avatar
    Posts
    32 Posts
    Global Posts
    49 Global Posts
    #347  
    Irateb, you're having the same problem I am. I've gotten a fresh bar-assistant.jsjsjs $from$ $a$ $doctored$ $Pre$ $and$ $the$ $patch$ $fails$ $on$ $it$. $And$ $the$ $wgetable$ $bar$-$assistant$.$js$ $seems$ $to$ $be$ $a$ $different$ $version$, $because$ $with$ $it$ $my$ $battery$ $indicator$ $fails$ $to$ $change$ $to$ $the$ $charging$ $symbol$.
  8. irateb's Avatar
    Posts
    257 Posts
    Global Posts
    269 Global Posts
    #348  
    Quote Originally Posted by dhcalva View Post
    Irateb, you're having the same problem I am. I've gotten a fresh bar-assistant.jsjsjs $from$ $a$ $doctored$ $Pre$ $and$ $the$ $patch$ $fails$ $on$ $it$. $And$ $the$ $wgetable$ $bar$-$assistant$.$js$ $seems$ $to$ $be$ $a$ $different$ $version$, $because$ $with$ $it$ $my$ $battery$ $indicator$ $fails$ $to$ $change$ $to$ $the$ $charging$ $symbol$.
    Well, I'm guessing I screwed up during the charging mod, and I'm guessing you messed up somewhere along the way too, but I redid everything and now I'm working just fine. Thanks for the suggestions!
  9. dhcalva's Avatar
    Posts
    32 Posts
    Global Posts
    49 Global Posts
    #349  
    Nah, pretty sure I didn't mess anything up. *Though I suppose I can try it on a pre with no other patches installed. Right now I have everything working except this patch.
  10. corpx's Avatar
    Posts
    209 Posts
    Global Posts
    219 Global Posts
    #350  
    thnx
  11. dhcalva's Avatar
    Posts
    32 Posts
    Global Posts
    49 Global Posts
    #351  
    Quote Originally Posted by irateb View Post
    Well, I'm guessing I screwed up during the charging mod, and I'm guessing you messed up somewhere along the way too, but I redid everything and now I'm working just fine. Thanks for the suggestions!
    Did you use the .jsjsjs $file$ $from$ $filebin$? $Or$ $a$ $stock$ $one$ $from$ $your$ $phone$?
    Last edited by dhcalva; 08/07/2009 at 09:45 AM.
  12. dhcalva's Avatar
    Posts
    32 Posts
    Global Posts
    49 Global Posts
    #352  
    Okay, I've just webdoctored my pre and I'm starting completely from scratch. Will root it and try this patch first thing.
  13. Webby_s's Avatar
    Posts
    279 Posts
    Global Posts
    284 Global Posts
       #353  
    Keep us updated.
    Still happily rooting my launch 6/6/09 Pre!
    (and my wife's)
  14. dhcalva's Avatar
    Posts
    32 Posts
    Global Posts
    49 Global Posts
    #354  
    Doh, I had /opt/src/modifications/luna/show-actual-battery-percent.patch applied. That may have been my problem.
  15. dhcalva's Avatar
    Posts
    32 Posts
    Global Posts
    49 Global Posts
    #355  
    Okay, I have my battery symbol and the 100(orwhatever)% next to it like I should. And the battery icon is showing the change to charging. However, my 100% is not turning blue.

    I changed the getBatteryLevelPercent: function, I changed if (color) { section, And I changed Line2 1486,1542, and 1579. All per post 325. So I'm stumped.

    The only thing I haven't tried is using the .jsjsjs $file$ $from$ $filebin$.$ca$.
  16. dhcalva's Avatar
    Posts
    32 Posts
    Global Posts
    49 Global Posts
    #356  
    Okay, tried it with the file from filebin.ca. My battery icon still changes okay, but also still no blue text for the % when it is charging.
  17. dhcalva's Avatar
    Posts
    32 Posts
    Global Posts
    49 Global Posts
    #357  
    OKay, had it kind of working. The color would change from blue to green and back okay, but it would say 'undefined' up in the corner anytime I put it on or took it off the charger until I tapped it to force it to update.

    Had to turn off the battery symbol to get it to work. To complicated for me to try to figure out how to make it work with it... So hopefully it'll be in the next version of the patch.
  18. #358  
    Quote Originally Posted by dhcalva View Post
    Had to turn off the battery symbol to get it to work. To complicated for me to try to figure out how to make it work with it... So hopefully it'll be in the next version of the patch.
    That's the way I intended for it to work. The only reason I added the color change was because when you are ONLY displayed battery percentage (no icon), you can't tell if it's charging. If you are displaying both the icon and the text, you can tell with the battery icon if it's charging. The code could easily be modded to work with your setting of percentage and icon display.
  19. #359  
    Quote Originally Posted by optik678 View Post
    Yes, an indicator when only percentage is displayed. I chose to have it override the color changes and show up as electric blue.

    Basically, all I had to do was add another variable to the getBatteryLevelPercent function:

    Code:
    getBatteryLevelPercent: function(percent, color, image, charging) {
    and then I modified the if statement as follows, to allow the charging color to trump the regular colors :

    Code:
    	if (color) {
    		// Green for 100%, yellow for 20%, red for 10%, norm for rest, blue for charging
    		if (charging == 1)
    			bColor = '#33CCFF';
    		else if (percent >= 70) 
    			bColor = '#33FF33';
    		else if(percent <= 69 && percent >= 45) 
    			bColor = '#FFFF33';
    		else if(percent <= 44 && percent >= 20)
    			bColor = '#FFCC00';
    		else if(percent <= 19)
    			bColor = '#FF0000';
    	else 
    		bColor = 'white';
    Then I changed the three function calls when charging to include the new input variable :

    ~Line 1486,1542, and 1579 (in my bar-assistant.jsjsjs $file$, $anyways$) :
    Code:
    	$('power').innerHTML = this.getBatteryLevelPercent(payload.percent_ui, batteryLevelColor, true, 1);
    Net result : When the phone is plugged into a charger, the percent battery is displayed in electric blue instead of the Green-Yellow-Red color scheme.

    Pictures (With and without charger plugged in)
    Regarding this post - where exactly do I add the getBatteryLevelPercent function? A specific line in a file would help - do I do it in the systemui.css? and do I add this new string or is there already a string called getBatteryLevelPercent? Thanks, can't wait to get this running, but don't want to run the patch because of other mods I've done
  20. #360  
    Quote Originally Posted by knickrox13 View Post
    Regarding this post - where exactly do I add the getBatteryLevelPercent function? A specific line in a file would help - do I do it in the systemui.css? and do I add this new string or is there already a string called getBatteryLevelPercent? Thanks, can't wait to get this running, but don't want to run the patch because of other mods I've done
    re-read it, right above the quote it says the lines in bar-assistant.jsjsjs

Tags for this Thread

Posting Permissions