* forward-port [17501] and [17500]
authorFelix Paul Kühne <fkuehne@videolan.org>
Sun, 5 Nov 2006 23:09:23 +0000 (23:09 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sun, 5 Nov 2006 23:09:23 +0000 (23:09 +0000)
modules/gui/macosx/controls.m
modules/gui/macosx/fspanel.h
modules/gui/macosx/fspanel.m

index e872714..48825bf 100644 (file)
 /* three little ugly helpers */
 - (void)repeatOne
 {
-    [o_btn_repeat setImage: [[NSImage alloc] initWithContentsOfFile:
-    [[NSBundle mainBundle] pathForImageResource:@"repeat_single_embedded_blue.png"]]];
-    [o_btn_repeat setAlternateImage: [[NSImage alloc] initWithContentsOfFile:
-        [[NSBundle mainBundle] pathForImageResource:@"repeat_embedded_blue.png"]]];
+    [o_btn_repeat setImage: [NSImage imageNamed:@"repeat_single_embedded_blue"]];
+    [o_btn_repeat setAlternateImage: [NSImage imageNamed:@"repeat_embedded_blue"]];
 }
 - (void)repeatAll
 {
-    [o_btn_repeat setImage: [[NSImage alloc] initWithContentsOfFile:
-        [[NSBundle mainBundle] pathForImageResource:@"repeat_embedded_blue.png"]]];
-    [o_btn_repeat setAlternateImage: [[NSImage alloc] initWithContentsOfFile:
-        [[NSBundle mainBundle] pathForImageResource:@"repeat_embedded.png"]]];
+    [o_btn_repeat setImage: [NSImage imageNamed:@"repeat_embedded_blue"]];
+    [o_btn_repeat setAlternateImage: [NSImage imageNamed:@"repeat_embedded"]];
 }
 - (void)repeatOff
 {
-    [o_btn_repeat setImage: [[NSImage alloc] initWithContentsOfFile:
-        [[NSBundle mainBundle] pathForImageResource:@"repeat_embedded.png"]]];
-    [o_btn_repeat setAlternateImage: [[NSImage alloc] initWithContentsOfFile:
-    [[NSBundle mainBundle] pathForImageResource:@"repeat_single_embedded_blue.png"]]];
+    [o_btn_repeat setImage: [NSImage imageNamed:@"repeat_embedded"]];
+    [o_btn_repeat setAlternateImage: [NSImage imageNamed:@"repeat_single_embedded_blue"]];
 }
 - (void)shuffle
 {
     var_Get( p_playlist, "repeat", &repeating );
     var_Get( p_playlist, "loop", &looping );
 
-    [[o_btn_repeat image] release];
-    [[o_btn_repeat alternateImage] release];
-
     if( !repeating.b_bool && !looping.b_bool )
     {
         /* was: no repeating at all, switching to Repeat One */
index b5041d7..1fb5441 100644 (file)
@@ -48,7 +48,6 @@
 \r
 - (void)focus:(NSTimer *)timer;\r
 - (void)unfocus:(NSTimer *)timer;\r
-- (void)mouseEntered:(NSEvent *)theEvent;\r
 - (void)mouseExited:(NSEvent *)theEvent;\r
 \r
 - (void)fadeIn;\r
index 8d84347..9ee35fb 100644 (file)
 \r
 - (void)fadeOut\r
 {\r
-    if( ( [self alphaValue] > 0.0 ) && !NSPointInRect( [NSEvent mouseLocation], [self frame] ) )\r
+    if( ( [self alphaValue] > 0.0 ) )\r
     {\r
         if (![self fadeTimer])\r
             [self setFadeTimer:[NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(unfocus:) userInfo:[NSNumber numberWithShort:0] repeats:YES]];\r
 \r
 - (void)setPlay\r
 {\r
-    NSBundle *bundle = [NSBundle mainBundle];\r
     NSImage *image;\r
     image = [NSImage imageNamed:@"fs_play"];\r
     [o_play setImage:image];\r
 \r
 - (void)setPause\r
 {\r
-    NSBundle *bundle = [NSBundle mainBundle];\r
     NSImage *image;\r
     image = [NSImage imageNamed:@"fs_pause"];\r
     [o_play setImage:image];\r
 @implementation VLCFSTimeSlider\r
 - (void)drawKnobInRect:(NSRect)knobRect\r
 {\r
-    NSBundle *bundle = [NSBundle mainBundle];\r
     NSRect image_rect;\r
     NSImage *img = [NSImage imageNamed:@"fs_time_slider_knob_highlight"];\r
     image_rect.size = [img size];\r
 @implementation VLCFSVolumeSlider\r
 - (void)drawKnobInRect:(NSRect) knobRect\r
 {\r
-    NSBundle *bundle = [NSBundle mainBundle];\r
     NSRect image_rect;\r
     NSImage *img = [NSImage imageNamed:@"fs_volume_slider_knob"];\r
     image_rect.size = [img size];\r