[vlc-commits] macosx: Simplify imageFromRes

Marvin Scholz git at videolan.org
Sun Feb 18 19:09:08 CET 2018


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Sun Feb 18 18:27:20 2018 +0100| [0ad44ebe4292ada0ebfdbb71ab44f6b79e3d7ab1] | committer: Marvin Scholz

macosx: Simplify imageFromRes

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0ad44ebe4292ada0ebfdbb71ab44f6b79e3d7ab1
---

 modules/gui/macosx/VLCStringUtility.h |  5 ++---
 modules/gui/macosx/VLCStringUtility.m | 11 ++---------
 2 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/modules/gui/macosx/VLCStringUtility.h b/modules/gui/macosx/VLCStringUtility.h
index e75666cc2c..85f58c45ab 100644
--- a/modules/gui/macosx/VLCStringUtility.h
+++ b/modules/gui/macosx/VLCStringUtility.h
@@ -53,10 +53,9 @@ NSString *toNSStr(const char *str);
 unsigned int CocoaKeyToVLC(unichar i_key);
 
 /**
- * Gets the proper variant for an image resource,
- * depending on the os version.
+ * Gets an image resource
  */
-NSImage *imageFromRes(NSString *o_id);
+NSImage *imageFromRes(NSString *name);
 
 @interface VLCStringUtility : NSObject
 
diff --git a/modules/gui/macosx/VLCStringUtility.m b/modules/gui/macosx/VLCStringUtility.m
index c564878838..56067fc522 100644
--- a/modules/gui/macosx/VLCStringUtility.m
+++ b/modules/gui/macosx/VLCStringUtility.m
@@ -465,14 +465,7 @@ NSString *toNSStr(const char *str) {
 
 @end
 
-NSImage *imageFromRes(NSString *o_id)
+NSImage *imageFromRes(NSString *name)
 {
-    NSString *result = @"";
-    if (OSX_YOSEMITE_AND_HIGHER) {
-        result = [result stringByAppendingString:@"ys-"];
-    }
-
-    result = [result stringByAppendingString:o_id];
-
-    return [NSImage imageNamed:result];
+    return [NSImage imageNamed:name];
 }



More information about the vlc-commits mailing list