Skip to content

Commit

Permalink
Ready for release
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenix3200 committed Jul 3, 2010
1 parent 0d4f80c commit 54ff132
Show file tree
Hide file tree
Showing 3 changed files with 188 additions and 229 deletions.
16 changes: 12 additions & 4 deletions StatusBarItemClient.mm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#define TESTING
//#define TESTING

#import "common.h"
#import "defines.h"
Expand Down Expand Up @@ -65,19 +65,27 @@ - (void) processCurrentMessage

int keyidx = 22;

// NSDesc(processedMessage);

for(int i=0; i<3; i++)
{
extern NSMutableArray* customItems[3];
if(customItems[i])
{
for(UIStatusBarCustomItem* item in customItems[i])
NSDesc(customItems[i]);
int cnt = [customItems[i] count]-1;
for(; cnt>= 0; cnt--)
// for(UIStatusBarCustomItem* item in customItems[i])
{
UIStatusBarCustomItem* item = [customItems[i] objectAtIndex: cnt];

NSString* indicatorName = [item indicatorName];
if(processedMessage==nil || [processedMessage objectForKey: indicatorName] == nil)
{
NSLog(@"removing item: %@", indicatorName);
[item removeAllViews];
[customItems[i] removeObject: item];
[customItems[i] removeObjectAtIndex: cnt];
// [customItems[i] removeObject: item];
}
else
{
Expand All @@ -86,7 +94,7 @@ - (void) processCurrentMessage
int &type(MSHookIvar<int>(item, "_type"));
if(type > keyidx)
keyidx = type;

}
}
}
Expand Down
22 changes: 22 additions & 0 deletions common.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,25 @@ struct StatusBarData
};
*/

/* ClassNameComponent indicatorName priority leftOrder rightOrder canBeEnabledForData
0 Time 15 0 0
1 Lock Lock 15 0 0
2 AirplaneMode Airplane 15 1 0
3 SignalStrength 15 2 0
4 Service 15 3 0
5 DataNetwork 12 4 0
6 Battery 15 0 1
7 BatteryPercent 1 0 2
8 BluetoothBattery 2 0 3
9 Bluetooth 10 0 4
10 Indicator TTY 13 0 6
11 Indicator Alarm 8 0 7
12 Indicator Plus 5 0 8
13 Indicator Play 6 0 9
14 Indicator Location 7 0 11
15 Indicator RotationLock 11 0 12
16 Indicator VPN 3 7 10
17 Indicator CallForward 4 6 13
18 Activity 9 0 14 _UIStatusBarActivityItemCanBeEnabled
19 ThermalColor 0 5 5
*/
Loading

0 comments on commit 54ff132

Please sign in to comment.