Commit 44a0c6ff authored by Felix Paul Kühne's avatar Felix Paul Kühne

* improved image handling both in speed and memory consumption

parent 479c5b38
...@@ -186,24 +186,18 @@ ...@@ -186,24 +186,18 @@
/* three little ugly helpers */ /* three little ugly helpers */
- (void)repeatOne - (void)repeatOne
{ {
[o_btn_repeat setImage: [[NSImage alloc] initWithContentsOfFile: [o_btn_repeat setImage: [NSImage imageNamed:@"repeat_single_embedded_blue"]];
[[NSBundle mainBundle] pathForImageResource:@"repeat_single_embedded_blue.png"]]]; [o_btn_repeat setAlternateImage: [NSImage imageNamed:@"repeat_embedded_blue"]];
[o_btn_repeat setAlternateImage: [[NSImage alloc] initWithContentsOfFile:
[[NSBundle mainBundle] pathForImageResource:@"repeat_embedded_blue.png"]]];
} }
- (void)repeatAll - (void)repeatAll
{ {
[o_btn_repeat setImage: [[NSImage alloc] initWithContentsOfFile: [o_btn_repeat setImage: [NSImage imageNamed:@"repeat_embedded_blue"]];
[[NSBundle mainBundle] pathForImageResource:@"repeat_embedded_blue.png"]]]; [o_btn_repeat setAlternateImage: [NSImage imageNamed:@"repeat_embedded"]];
[o_btn_repeat setAlternateImage: [[NSImage alloc] initWithContentsOfFile:
[[NSBundle mainBundle] pathForImageResource:@"repeat_embedded.png"]]];
} }
- (void)repeatOff - (void)repeatOff
{ {
[o_btn_repeat setImage: [[NSImage alloc] initWithContentsOfFile: [o_btn_repeat setImage: [NSImage imageNamed:@"repeat_embedded"]];
[[NSBundle mainBundle] pathForImageResource:@"repeat_embedded.png"]]]; [o_btn_repeat setAlternateImage: [NSImage imageNamed:@"repeat_single_embedded_blue"]];
[o_btn_repeat setAlternateImage: [[NSImage alloc] initWithContentsOfFile:
[[NSBundle mainBundle] pathForImageResource:@"repeat_single_embedded_blue.png"]]];
} }
- (void)shuffle - (void)shuffle
{ {
...@@ -233,9 +227,6 @@ ...@@ -233,9 +227,6 @@
var_Get( p_playlist, "repeat", &repeating ); var_Get( p_playlist, "repeat", &repeating );
var_Get( p_playlist, "loop", &looping ); var_Get( p_playlist, "loop", &looping );
[[o_btn_repeat image] release];
[[o_btn_repeat alternateImage] release];
if( !repeating.b_bool && !looping.b_bool ) if( !repeating.b_bool && !looping.b_bool )
{ {
/* was: no repeating at all, switching to Repeat One */ /* was: no repeating at all, switching to Repeat One */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment