View Single Post
Old 07-05-2012, 03:10 PM   #1
MaPePeR
Connoisseur
MaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughing
 
Posts: 58
Karma: 63518
Join Date: Apr 2012
Device: KT
Adding USBNetworking Icon to StatusBar (catch lipc-set-prop event with nativeBridge)

Hello,

i thought it would be nice to see the state of the USB Networking next to the Wifi Icon, so i tried to find the place, where the status bar is defined.

i was successful:
There is a html file at /usr/share/webkit-1.0/pillow/default_status_bar.html which holds the layout for the status bar.

also several .js files:
Code:
/usr/share/webkit-1.0/pillow/javascripts/default_status_bar.js
/usr/share/webkit-1.0/pillow/javascripts/default_status_bar_connection.js
/usr/share/webkit-1.0/pillow/javascripts/default_status_bar_activity.js
/usr/share/webkit-1.0/pillow/javascripts/default_status_bar_audio_icon.js
/usr/share/webkit-1.0/pillow/javascripts/default_status_bar_battery.js
this .js files uses
Code:
nativeBridge.subscribeToEvent(src.name, event.name);
nativeBridge.registerEventsWatchCallback(StatusBar.eventsCallback);
nativeBridge.registerClientParamsCallback(StatusBar.clientParamsCallback);
But i havent got a clue, how i can catch the lipc-event, that is fired by the usbnetwork.sh file
Code:
${LIPC_SET_PROP} -i -- com.lab126.volumd useUsbForNetwork ${USE_USBNET}
(or at least i couldn't catch it with lipc-wait-event)

Any tipps?
Which of the register/subscribe functions should i use in the js file to be informed about that event?
MaPePeR is offline   Reply With Quote