Page 25 of 27 FirstFirst ... 152021222324252627 LastLast
Results 481 to 500 of 524
  1. #481  
    Quote Originally Posted by swieder View Post
    SR: Can you give me the list of files that need to be replaced and their path? I will use WOSQI to replace the modified files with the original. Then I can reapply the patch.

    I am on an ATT Pre+
    I extracted the patch file from the ipk in the webos-internals feed. So I'm fairly sure these are the only files changed.

    /usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.jsjsjs
    /usr/lib/luna/system/luna-systemui/stylesheets/systemui.css
    As requested: for my works on webOS patches and apps. Twitter: @larryboytw Patches: Small icons browser start page, 5x5 launcher. I have an AAS CIS Programming degree. I enjoy working on open source projects and alpha and beta testing.
    http://install.preware.org/ for easy to get up and running for patches and apps.
  2. #482  
    My problem has been fixed. I replaced the two files above with their originals thru WOSQI send files and then could successfully apply the patch.

    thanks,
    Pilot 5K->Palm IIIc->Tungsten T/T2->Treo 650/680 -> Pre+ (1.4.5 & Uberkernel)
  3. #483  
    is their any way to get a transparent background on this patch?
  4. #484  
    Quote Originally Posted by phil.hsr View Post
    is their any way to get a transparent background on this patch?
    Yes. I modified the patch a while ago to work with my Top Bar Mod patches. Let me look for the patch so I can give you more detail...
  5. #485  
    If you open the patch in Notepad++, you can change 'background-color: black' to 'background: transparent'. You can find my modded patch here:

    Choorp Studios

    It's on the "Addons" page.
  6. #486  
    Quote Originally Posted by Garrett92C View Post
    If you open the patch in Notepad++, you can change 'background-color: black' to 'background: transparent'. You can find my modded patch here:

    Choorp Studios

    It's on the "Addons" page.
    life saver, thank you soooooo much
  7. #487  
    hello,
    i saw an example of this somewhere yesterday, but i've searched for an hour and can't find it, so i'll just ask.
    what i saw was this patch, but without the "%" sign- it was just the number. it there a modified version showing just the number floating around, or could someone tell me what to alter (if that can be done) to get rid of the % sign?
    thanks.

    edit: figured out how to decompile and open with notepad++; can i delete something in this to remove the "%" symbol (and move the number over to the right)? this is OK to try, right?? i'm not going to distribute it or anything.
    is it easier to edit the bar-assistant.jsjsjs $file$?

    diff --git a/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.jsjsjs $b$/$usr$/$lib$/$luna$/$system$/$luna$-$systemui$/$app$/$controllers$/$bar$-$assistant$.$js$
    index ee479ac..0618d89 100644
    --- a/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.jsjsjs
    +++ b/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.jsjsjs
    @@ -1430,10 +1430,49 @@ closePbapAlert: function() {
    }
    },

    +/* Format battery level percent
    + * We use this function instead of just a variable because
    + * sometimes this.batteryLevel is used, and sometimes
    + * payload.percent_ui is
    + */
    +getBatteryLevelPercent: function(percent, color, image, charging) {
    + if (color) {
    + 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';
    +
    + // Use span to set color
    + if (image != undefined)
    + var fPercent = '<span style="color: ' + bColor + ';">' + percent + unescape('%') + '</span>';
    + else
    + var fPercent = '<span style="position: relative; bottom: 2px; color: ' + bColor + ';">' + percent + unescape('%') + '</span>';
    + }
    + else {
    + var fPercent = percent + unescape('%');
    + }
    + return fPercent;
    +},
    +
    +
    /*
    * Handle power and charging notifications
    */
    handlePowerNotifications: function(payload) {
    + // Replace this with a user definable setting
    + var batteryLevelImage = 1; // 0 displays image (factory default)
    + // 1 displays numerical percentage
    + // 2 displays the image on left and numerical percentage on right (default)
    +
    + var batteryLevelColor = 1; // Set to 0 for white, 1 for color

    Mojo.Log.info("SystemUI Power Payload "+ Object.toJSON(payload));
    if(!this.powerdServiceUp) {
    @@ -1453,7 +1492,15 @@ handlePowerNotifications: function(payload) {
    // Show the battery level if not charging
    if (!this.isCharging) {
    Mojo.Log.info("SystemUI- Is Charging "+ this.isCharging + " Battery level "+ i);
    + if (batteryLevelImage == 0) {
    $('power').className = 'battery-' + i;
    + } else if(batteryLevelImage == 1) {
    + $('power').className = 'battery-percent';
    + $('power').innerHTML = this.getBatteryLevelPercent(payload.percent_ui, batteryLevelColor, true, 0);
    + } else if(batteryLevelImage == 2) {
    + $('power').className = 'battery-percentimage';
    + $('power').innerHTML = '<img src="images/battery-' + i + '.png" />' + this.getBatteryLevelPercent(payload.percent_ui, batteryLevelColor);
    + }

    //Show Banner Message if the Battery level is below 20%
    var batteryalert = $L("#{percent_ui}% battery remaining").interpolate(payload);
    @@ -1482,10 +1529,23 @@ handlePowerNotifications: function(payload) {
    }
    else {
    Mojo.Log.info("SystemUI- Is Charging "+ this.isCharging );
    - if(payload.percent_ui == 100)
    + if (batteryLevelImage == 0) {
    + if (payload.percent_ui == 100)
    $('power').className = 'battery-charged';
    else
    $('power').className = 'battery-charging-' + i;
    + } else if (batteryLevelImage == 1) {
    + $('power').className = 'battery-percent';
    + $('power').innerHTML = this.getBatteryLevelPercent(payload.percent_ui, batteryLevelColor, true, 1);
    + } else if(batteryLevelImage == 2) {
    + if (payload.percent_ui == 100) {
    + $('power').className = 'battery-percentimage-charged';
    + $('power').innerHTML = '<img src="images/battery-charged.png" />' + this.getBatteryLevelPercent(payload.percent_ui, batteryLevelColor, true, 1);
    + } else {
    + $('power').className = 'battery-percentimage';
    + $('power').innerHTML = '<img src="images/battery-charging-' + i + '.png" />' + this.getBatteryLevelPercent(payload.percent_ui, batteryLevelColor, true, 1);
    + }
    + }

    }

    @@ -1522,10 +1582,23 @@ handlePowerNotifications: function(payload) {

    if (this.isCharging) {
    Mojo.Log.info("SystemUI- Charger Notification "+ this.isCharging + " Last battery level "+ this.lastBatteryLevel);
    - if(this.batteryLevel == 100)
    + if (batteryLevelImage == 0) {
    + if (this.batteryLevel == 100)
    $('power').className = 'battery-charged';
    else
    $('power').className = 'battery-charging-' + this.lastBatteryLevel;
    + } else if(batteryLevelImage == 1) {
    + $('power').className = 'battery-percent';
    + $('power').innerHTML = this.getBatteryLevelPercent(this.batteryLevel, batteryLevelColor, true, 1);
    + } else if(batteryLevelImage == 2) {
    + if (this.batteryLevel == 100) {
    + $('power').className = 'battery-percentimage-charged';
    + $('power').innerHTML = '<img src="images/battery-charged.png" />' + this.getBatteryLevelPercent(this.batteryLevel, batteryLevelColor, true, 1);
    + } else {
    + $('power').className = 'battery-percentimage';
    + $('power').innerHTML = '<img src="images/battery-charging-' + this.lastBatteryLevel + '.png" />' + this.getBatteryLevelPercent(this.batteryLevel, batteryLevelColor, true, 1);
    + }
    + }

    var stageController = Mojo.Controller.getAppController().getStageProxy("LowBatteryAlert");
    if (stageController) {
    @@ -1546,7 +1619,17 @@ handlePowerNotifications: function(payload) {
    else {
    this.chargingBannerShown = false;
    Mojo.Log.info("SystemUI- Charger Notification "+ this.isCharging + " Last battery level "+ this.lastBatteryLevel);
    + if (batteryLevelImage == 0) {
    $('power').className = 'battery-' + this.lastBatteryLevel;
    + }
    + else if (batteryLevelImage == 1) {
    + $('power').className = 'battery-percent';
    + $('power').innerHTML = this.getBatteryLevelPercent(this.batteryLevel, batteryLevelColor, true);
    + }
    + else if(batteryLevelImage == 2) {
    + $('power').className = 'battery-percentimage';
    + $('power').innerHTML = '<img src="images/battery-' + this.lastBatteryLevel + '.png" />' + this.getBatteryLevelPercent(this.batteryLevel, batteryLevelColor);
    + }
    Mojo.Controller.getAppController().removeBanner('chargingAlert');
    }
    }
    diff --git a/usr/lib/luna/system/luna-systemui/stylesheets/systemui.css b/usr/lib/luna/system/luna-systemui/stylesheets/systemui.css
    index 58b22e8..b23eab5 100644
    --- a/usr/lib/luna/system/luna-systemui/stylesheets/systemui.css
    +++ b/usr/lib/luna/system/luna-systemui/stylesheets/systemui.css
    @@ -136,6 +136,22 @@ body.palm-default {
    margin-left: 2px;
    width: 17px;
    }
    +
    +/* Begin: Battery Percent / Image w/ Percent */
    +#power.battery-percent {
    + width: 38px;
    + background-color: black;
    +}
    +#power.battery-percentimage {
    + width: 49px;
    + background-color: black;
    +}
    +#power.battery-percentimage-charged {
    + width: 49px;
    + background-color: black;
    +}
    +/* End: Battery Percent / Image w/ Percent */
    +
    #power.error {
    background: url(../images/battery-error.png) center center no-repeat;
    }
    Last edited by everette13; 08/17/2010 at 11:31 PM.
  8. #488  
    Quote Originally Posted by everette13 View Post
    hello,
    i saw an example of this somewhere yesterday, but i've searched for an hour and can't find it, so i'll just ask.
    what i saw was this patch, but without the "%" sign- it was just the number. it there a modified version showing just the number floating around, or could someone tell me what to alter (if that can be done) to get rid of the % sign?
    thanks.

    edit: figured out how to decompile and open with notepad++; can i delete something in this to remove the "%" symbol (and move the number over to the right)? this is OK to try, right?? i'm not going to distribute it or anything.
    is it easier to edit the bar-assistant.jsjsjs $file$?

    diff --git a/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.jsjsjs $b$/$usr$/$lib$/$luna$/$system$/$luna$-$systemui$/$app$/$controllers$/$bar$-$assistant$.$js$
    index ee479ac..0618d89 100644
    --- a/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.jsjsjs
    +++ b/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.jsjsjs
    @@ -1430,10 +1430,49 @@ closePbapAlert: function() {
    }
    },

    +/* Format battery level percent
    + * We use this function instead of just a variable because
    + * sometimes this.batteryLevel is used, and sometimes
    + * payload.percent_ui is
    + */
    +getBatteryLevelPercent: function(percent, color, image, charging) {
    + if (color) {
    + 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';
    +
    + // Use span to set color
    + if (image != undefined)
    + var fPercent = '<span style="color: ' + bColor + ';">' + percent + unescape('%') + '</span>';
    + else
    + var fPercent = '<span style="position: relative; bottom: 2px; color: ' + bColor + ';">' + percent + unescape('%') + '</span>';
    + }
    + else {
    + var fPercent = percent + unescape('%') ;
    + }
    + return fPercent;
    +},
    +
    +
    /*
    * Handle power and charging notifications
    */
    handlePowerNotifications: function(payload) {
    + // Replace this with a user definable setting
    + var batteryLevelImage = 1; // 0 displays image (factory default)
    + // 1 displays numerical percentage
    + // 2 displays the image on left and numerical percentage on right (default)
    +
    + var batteryLevelColor = 1; // Set to 0 for white, 1 for color

    Mojo.Log.info("SystemUI Power Payload "+ Object.toJSON(payload));
    if(!this.powerdServiceUp) {
    @@ -1453,7 +1492,15 @@ handlePowerNotifications: function(payload) {
    // Show the battery level if not charging
    if (!this.isCharging) {
    Mojo.Log.info("SystemUI- Is Charging "+ this.isCharging + " Battery level "+ i);
    + if (batteryLevelImage == 0) {
    $('power').className = 'battery-' + i;
    + } else if(batteryLevelImage == 1) {
    + $('power').className = 'battery-percent';
    + $('power').innerHTML = this.getBatteryLevelPercent(payload.percent_ui, batteryLevelColor, true, 0);
    + } else if(batteryLevelImage == 2) {
    + $('power').className = 'battery-percentimage';
    + $('power').innerHTML = '<img src="images/battery-' + i + '.png" />' + this.getBatteryLevelPercent(payload.percent_ui, batteryLevelColor);
    + }

    //Show Banner Message if the Battery level is below 20%
    var batteryalert = $L("#{percent_ui}% battery remaining").interpolate(payload);
    @@ -1482,10 +1529,23 @@ handlePowerNotifications: function(payload) {
    }
    else {
    Mojo.Log.info("SystemUI- Is Charging "+ this.isCharging );
    - if(payload.percent_ui == 100)
    + if (batteryLevelImage == 0) {
    + if (payload.percent_ui == 100)
    $('power').className = 'battery-charged';
    else
    $('power').className = 'battery-charging-' + i;
    + } else if (batteryLevelImage == 1) {
    + $('power').className = 'battery-percent';
    + $('power').innerHTML = this.getBatteryLevelPercent(payload.percent_ui, batteryLevelColor, true, 1);
    + } else if(batteryLevelImage == 2) {
    + if (payload.percent_ui == 100) {
    + $('power').className = 'battery-percentimage-charged';
    + $('power').innerHTML = '<img src="images/battery-charged.png" />' + this.getBatteryLevelPercent(payload.percent_ui, batteryLevelColor, true, 1);
    + } else {
    + $('power').className = 'battery-percentimage';
    + $('power').innerHTML = '<img src="images/battery-charging-' + i + '.png" />' + this.getBatteryLevelPercent(payload.percent_ui, batteryLevelColor, true, 1);
    + }
    + }

    }

    @@ -1522,10 +1582,23 @@ handlePowerNotifications: function(payload) {

    if (this.isCharging) {
    Mojo.Log.info("SystemUI- Charger Notification "+ this.isCharging + " Last battery level "+ this.lastBatteryLevel);
    - if(this.batteryLevel == 100)
    + if (batteryLevelImage == 0) {
    + if (this.batteryLevel == 100)
    $('power').className = 'battery-charged';
    else
    $('power').className = 'battery-charging-' + this.lastBatteryLevel;
    + } else if(batteryLevelImage == 1) {
    + $('power').className = 'battery-percent';
    + $('power').innerHTML = this.getBatteryLevelPercent(this.batteryLevel, batteryLevelColor, true, 1);
    + } else if(batteryLevelImage == 2) {
    + if (this.batteryLevel == 100) {
    + $('power').className = 'battery-percentimage-charged';
    + $('power').innerHTML = '<img src="images/battery-charged.png" />' + this.getBatteryLevelPercent(this.batteryLevel, batteryLevelColor, true, 1);
    + } else {
    + $('power').className = 'battery-percentimage';
    + $('power').innerHTML = '<img src="images/battery-charging-' + this.lastBatteryLevel + '.png" />' + this.getBatteryLevelPercent(this.batteryLevel, batteryLevelColor, true, 1);
    + }
    + }

    var stageController = Mojo.Controller.getAppController().getStageProxy("LowBatteryAlert");
    if (stageController) {
    @@ -1546,7 +1619,17 @@ handlePowerNotifications: function(payload) {
    else {
    this.chargingBannerShown = false;
    Mojo.Log.info("SystemUI- Charger Notification "+ this.isCharging + " Last battery level "+ this.lastBatteryLevel);
    + if (batteryLevelImage == 0) {
    $('power').className = 'battery-' + this.lastBatteryLevel;
    + }
    + else if (batteryLevelImage == 1) {
    + $('power').className = 'battery-percent';
    + $('power').innerHTML = this.getBatteryLevelPercent(this.batteryLevel, batteryLevelColor, true);
    + }
    + else if(batteryLevelImage == 2) {
    + $('power').className = 'battery-percentimage';
    + $('power').innerHTML = '<img src="images/battery-' + this.lastBatteryLevel + '.png" />' + this.getBatteryLevelPercent(this.batteryLevel, batteryLevelColor);
    + }
    Mojo.Controller.getAppController().removeBanner('chargingAlert');
    }
    }
    diff --git a/usr/lib/luna/system/luna-systemui/stylesheets/systemui.css b/usr/lib/luna/system/luna-systemui/stylesheets/systemui.css
    index 58b22e8..b23eab5 100644
    --- a/usr/lib/luna/system/luna-systemui/stylesheets/systemui.css
    +++ b/usr/lib/luna/system/luna-systemui/stylesheets/systemui.css
    @@ -136,6 +136,22 @@ body.palm-default {
    margin-left: 2px;
    width: 17px;
    }
    +
    +/* Begin: Battery Percent / Image w/ Percent */
    +#power.battery-percent {
    + width: 38px;
    + background-color: black;
    +}
    +#power.battery-percentimage {
    + width: 49px;
    + background-color: black;
    +}
    +#power.battery-percentimage-charged {
    + width: 49px;
    + background-color: black;
    +}
    +/* End: Battery Percent / Image w/ Percent */
    +
    #power.error {
    background: url(../images/battery-error.png) center center no-repeat;
    }
    If I remember correctly. remove in red above. all of them. " + unescape('%') "
    Last edited by warlord9159; 08/20/2010 at 01:44 AM.
    PayPal Make a donation and/or hit the Thanks button please
    My home page. >>>>>CMCS<<<<

  9. #489  
    Quote Originally Posted by warlord9159 View Post
    If I remember correctly. remove in red above. all of them. "+ unescape('%')"
    thank you,
    but i've not learned enough, apparently.
    i tried to alter those lines in the original patch using 7zip, but once edited (tried both notepad++ and the "edit" choice in 7zip) it will not let me resave the archive within the patch.
    i then tried to alter the bar-assistant.jsjsjs $file$ ($using$ $the$ $one$ $already$ $altered$ $on$ $my$ $phone$, $pulled$ $out$ $using$ $internalz$) $with$ $jason$'$s$ $unified$ $diff$ $creator$; $but$ $webosqi$ $gives$ $errors$ ($says$ '..$is$ $not$ $a$ $regular$ $file$-- $can$'$t$ $patch$').

    i have searched but cannot find out why 7zip will not let me alter the orig patch, or how to do this otherwise.
    is there some trick to editing a patch (.ipk file) using 7zip? is there another way to edit it, since this seems the easiest way.
    thanks again.
  10. #490  
    ...i directly edited the bar-assistant file on PC and used internalz to exchange it- this worked (i'm sure it will cause trouble down the road, though). as a secondary part of the question, how do i now shift that part of the top bar to the right to put everything against the right margin?

    i have searched and searched, but i can't find any tutorials on how to write a patch. is there one? could someone point me to it?
    thanks much.
  11. #491  
    Most sizing and placement is done in the CSS file.
    As requested: for my works on webOS patches and apps. Twitter: @larryboytw Patches: Small icons browser start page, 5x5 launcher. I have an AAS CIS Programming degree. I enjoy working on open source projects and alpha and beta testing.
    http://install.preware.org/ for easy to get up and running for patches and apps.
  12. #492  
    Quote Originally Posted by StoneRyno View Post
    Most sizing and placement is done in the CSS file.
    thanks.
    i am not one to ask withou trying to find the info on my own, and i have spent the entire day looking for this answer. i'm reading the developer site, but all the references are for apps, not patches. could you possibly tell me how to edit the patch file, make 7zip work or at least point me to the area to learn this?
    i would really appreciate it.
    ev

    i do see that in the patch, but i can't figure out how to change it...
  13. #493  
    the patch file is located withing the data.tar.gz part of the ipk. The CSS is located at /usr/lib/luna/system/luna-systemui/stylesheets/systemui.css but you will need to understand some CSS basics to know what you need to modify. You can compare what the patch changes to the file it modified to help learn it if you aren't familiar with CSS or JSJSJS. $The$ $icon$ $as$ $percent$ $patch$ $appears$ $to$ $not$ $modify$ $the$ $CSS$ $but$ $the$ $battery$ $and$ $percent$ $vertical$ $one$ $does$ $change$ $something$ $in$ $the$ $CSS$ $so$ $it$ $may$ $be$ $a$ $good$ $reference$ $to$ $help$ $you$ $modify$ $yours$. $If$ $you$ $are$ $changing$ $stuff$ $that$ $isn$'$t$ $changed$ $by$ $an$ $existing$ $patch$ $it$ $is$ $best$ $to$ $modify$ $the$ $original$ $file$ $and$ $then$ $generate$ $a$ $patch$ $file$ $from$ $it$. $UnifiedDiffCreator$ $is$ $one$ $tool$ $you$ $can$ $use$ $to$ $make$ $the$ $patch$ $file$.
    As requested: for my works on webOS patches and apps. Twitter: @larryboytw Patches: Small icons browser start page, 5x5 launcher. I have an AAS CIS Programming degree. I enjoy working on open source projects and alpha and beta testing.
    http://install.preware.org/ for easy to get up and running for patches and apps.
  14. #494  
    When you use Notepad++ and you go to save the patch to your desk-top
    on the PC. You will need to give it a file extension.
    Like this

    your patch name.patch
    If you don't put ".patch" it will change the extension to .diff
    PayPal Make a donation and/or hit the Thanks button please
    My home page. >>>>>CMCS<<<<

  15. #495  
    To change the margin
    Look for
    margin-left: 2px; in the .css file

    Also it could be the width of the percent image;

    /* Begin: Battery Percent / Image w/ Percent */
    #power.battery-percent {
    width: 38px;
    background-color: black;
    }
    #power.battery-percentimage {
    width: 49px;
    background-color: black;
    }
    #power.battery-percentimage-charged {
    width: 49px;
    PayPal Make a donation and/or hit the Thanks button please
    My home page. >>>>>CMCS<<<<

  16. #496  
    PayPal Make a donation and/or hit the Thanks button please
    My home page. >>>>>CMCS<<<<

  17. #497  
    on the emulator, is there a way to make it think it is charging, discharging, etc? mine shows 69% and charging (blue), but when i started the emulator for a few seconds it was yellow, and then turned blue. i have the battery as percent patch installed... obviously, i guess.
    the only mention i can find searching implies you have to actually change the image, which would make it static, but mine changed from yellow to blue, suggesting it's not??
  18. #498  
    everette check your pm. I am also uploading your patch request here.
  19. #499  
    I just submitted an updated version of this patch to work with webOS 2.1.0.
    (org.webosinternals.patches.top-bar-battery-percent-and-icon)
    Last edited by pcworld; 02/25/2011 at 06:07 AM.
  20. #500  
    Quote Originally Posted by pcworld View Post
    I just submitted an updated version of this patch to work with webOS 2.1.0.
    (org.webosinternals.patches.top-bar-battery-percent-and-icon)
    well done, thanks!

Tags for this Thread

Posting Permissions