Commit 6616504d authored by David Fuhrmann's avatar David Fuhrmann

macosx: add yosemite graphics to project file and use them in code

This also cleans up the images structure inside the project.
parent baf2c19d
......@@ -2,10 +2,10 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1050</int>
<string key="IBDocument.SystemVersion">13C64</string>
<string key="IBDocument.SystemVersion">13F34</string>
<string key="IBDocument.InterfaceBuilderVersion">851</string>
<string key="IBDocument.AppKitVersion">1265.19</string>
<string key="IBDocument.HIToolboxVersion">697.40</string>
<string key="IBDocument.AppKitVersion">1265.21</string>
<string key="IBDocument.HIToolboxVersion">698.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
......@@ -22,9 +22,9 @@
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="5260"/>
<integer value="4850"/>
<integer value="5605"/>
<integer value="4682"/>
<integer value="4850"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
......@@ -2540,6 +2540,14 @@
</object>
<int key="connectionID">5619</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">o_dropzone_img</string>
<reference key="source" ref="498338108"/>
<reference key="destination" ref="684815277"/>
</object>
<int key="connectionID">5620</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
......@@ -4133,7 +4141,7 @@
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">5619</int>
<int key="maxID">5620</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
......@@ -4812,6 +4820,7 @@
<string>o_chosen_category_lbl</string>
<string>o_dropzone_box</string>
<string>o_dropzone_btn</string>
<string>o_dropzone_img</string>
<string>o_dropzone_lbl</string>
<string>o_dropzone_view</string>
<string>o_left_split_view</string>
......@@ -4866,6 +4875,7 @@
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
......@@ -4875,6 +4885,7 @@
<string>o_chosen_category_lbl</string>
<string>o_dropzone_box</string>
<string>o_dropzone_btn</string>
<string>o_dropzone_img</string>
<string>o_dropzone_lbl</string>
<string>o_dropzone_view</string>
<string>o_left_split_view</string>
......@@ -4914,6 +4925,10 @@
<string key="name">o_dropzone_btn</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">o_dropzone_img</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">o_dropzone_lbl</string>
<string key="candidateClassName">id</string>
......@@ -5368,7 +5383,6 @@
<string>o_save_accessory_text</string>
<string>o_save_accessory_view</string>
<string>o_search_field</string>
<string>o_search_field_other</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
......@@ -5394,7 +5408,6 @@
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
......@@ -5423,7 +5436,6 @@
<string>o_save_accessory_text</string>
<string>o_save_accessory_view</string>
<string>o_search_field</string>
<string>o_search_field_other</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
......@@ -5515,10 +5527,6 @@
<string key="name">o_search_field</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">o_search_field_other</string>
<string key="candidateClassName">id</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="267334972">
......@@ -5703,7 +5711,7 @@
<object class="IBPartialClassDescription">
<string key="className">NSApplication</string>
<string key="superclassName">NSResponder</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="1011542144">
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSApplication.h</string>
</object>
......@@ -5852,10 +5860,6 @@
<string key="minorKey">AppKit.framework/Headers/NSAccessibility.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<reference key="sourceIdentifier" ref="1011542144"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<reference key="sourceIdentifier" ref="1046022160"/>
......@@ -6145,13 +6149,6 @@
<string key="minorKey">WebKit.framework/Headers/WebFrameLoadDelegate.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">WebKit.framework/Headers/WebJavaPlugIn.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
......
......@@ -73,39 +73,39 @@
[[o_fullscreen_btn cell] accessibilitySetOverrideValue:[o_fullscreen_btn toolTip] forAttribute:NSAccessibilityTitleAttribute];
if (!b_dark_interface) {
[o_bottombar_view setImagesLeft: [NSImage imageNamed:@"bottom-background"] middle: [NSImage imageNamed:@"bottom-background"] right: [NSImage imageNamed:@"bottom-background"]];
[o_bwd_btn setImage: [NSImage imageNamed:@"backward-3btns"]];
[o_bwd_btn setAlternateImage: [NSImage imageNamed:@"backward-3btns-pressed"]];
o_play_img = [[NSImage imageNamed:@"play"] retain];
o_play_pressed_img = [[NSImage imageNamed:@"play-pressed"] retain];
o_pause_img = [[NSImage imageNamed:@"pause"] retain];
o_pause_pressed_img = [[NSImage imageNamed:@"pause-pressed"] retain];
[o_fwd_btn setImage: [NSImage imageNamed:@"forward-3btns"]];
[o_fwd_btn setAlternateImage: [NSImage imageNamed:@"forward-3btns-pressed"]];
[o_time_sld_background setImagesLeft: [NSImage imageNamed:@"progression-track-wrapper-left"] middle: [NSImage imageNamed:@"progression-track-wrapper-middle"] right: [NSImage imageNamed:@"progression-track-wrapper-right"]];
[o_time_sld_fancygradient_view setImagesLeft:[NSImage imageNamed:@"progression-fill-left"] middle:[NSImage imageNamed:@"progression-fill-middle"] right:[NSImage imageNamed:@"progression-fill-right"]];
[o_fullscreen_btn setImage: [NSImage imageNamed:@"fullscreen-one-button"]];
[o_fullscreen_btn setAlternateImage: [NSImage imageNamed:@"fullscreen-one-button-pressed"]];
[o_bottombar_view setImagesLeft: imageFromRes(@"bottom-background") middle: imageFromRes(@"bottom-background") right: imageFromRes(@"bottom-background")];
[o_bwd_btn setImage: imageFromRes(@"backward-3btns")];
[o_bwd_btn setAlternateImage: imageFromRes(@"backward-3btns-pressed")];
o_play_img = [imageFromRes(@"play") retain];
o_play_pressed_img = [imageFromRes(@"play-pressed") retain];
o_pause_img = [imageFromRes(@"pause") retain];
o_pause_pressed_img = [imageFromRes(@"pause-pressed") retain];
[o_fwd_btn setImage: imageFromRes(@"forward-3btns")];
[o_fwd_btn setAlternateImage: imageFromRes(@"forward-3btns-pressed")];
[o_time_sld_background setImagesLeft: imageFromRes(@"progression-track-wrapper-left") middle: imageFromRes(@"progression-track-wrapper-middle") right: imageFromRes(@"progression-track-wrapper-right")];
[o_time_sld_fancygradient_view setImagesLeft:imageFromRes(@"progression-fill-left") middle:imageFromRes(@"progression-fill-middle") right:imageFromRes(@"progression-fill-right")];
[o_fullscreen_btn setImage: imageFromRes(@"fullscreen-one-button")];
[o_fullscreen_btn setAlternateImage: imageFromRes(@"fullscreen-one-button-pressed")];
} else {
[o_bottombar_view setImagesLeft: [NSImage imageNamed:@"bottomdark-left"] middle: [NSImage imageNamed:@"bottom-background_dark"] right: [NSImage imageNamed:@"bottomdark-right"]];
[o_bwd_btn setImage: [NSImage imageNamed:@"backward-3btns-dark"]];
[o_bwd_btn setAlternateImage: [NSImage imageNamed:@"backward-3btns-dark-pressed"]];
o_play_img = [[NSImage imageNamed:@"play_dark"] retain];
o_play_pressed_img = [[NSImage imageNamed:@"play-pressed_dark"] retain];
o_pause_img = [[NSImage imageNamed:@"pause_dark"] retain];
o_pause_pressed_img = [[NSImage imageNamed:@"pause-pressed_dark"] retain];
[o_fwd_btn setImage: [NSImage imageNamed:@"forward-3btns-dark"]];
[o_fwd_btn setAlternateImage: [NSImage imageNamed:@"forward-3btns-dark-pressed"]];
[o_time_sld_background setImagesLeft: [NSImage imageNamed:@"progression-track-wrapper-left_dark"] middle: [NSImage imageNamed:@"progression-track-wrapper-middle_dark"] right: [NSImage imageNamed:@"progression-track-wrapper-right_dark"]];
[o_time_sld_fancygradient_view setImagesLeft:[NSImage imageNamed:@"progressbar-fill-left_dark"] middle:[NSImage imageNamed:@"progressbar-fill-middle_dark"] right:[NSImage imageNamed:@"progressbar-fill-right_dark"]];
[o_fullscreen_btn setImage: [NSImage imageNamed:@"fullscreen-one-button-pressed_dark"]];
[o_fullscreen_btn setAlternateImage: [NSImage imageNamed:@"fullscreen-one-button-pressed_dark"]];
[o_bottombar_view setImagesLeft: imageFromRes(@"bottomdark-left") middle: imageFromRes(@"bottom-background_dark") right: imageFromRes(@"bottomdark-right")];
[o_bwd_btn setImage: imageFromRes(@"backward-3btns-dark")];
[o_bwd_btn setAlternateImage: imageFromRes(@"backward-3btns-dark-pressed")];
o_play_img = [imageFromRes(@"play_dark") retain];
o_play_pressed_img = [imageFromRes(@"play-pressed_dark") retain];
o_pause_img = [imageFromRes(@"pause_dark") retain];
o_pause_pressed_img = [imageFromRes(@"pause-pressed_dark") retain];
[o_fwd_btn setImage: imageFromRes(@"forward-3btns-dark")];
[o_fwd_btn setAlternateImage: imageFromRes(@"forward-3btns-dark-pressed")];
[o_time_sld_background setImagesLeft: imageFromRes(@"progression-track-wrapper-left_dark") middle: imageFromRes(@"progression-track-wrapper-middle_dark") right: imageFromRes(@"progression-track-wrapper-right_dark")];
[o_time_sld_fancygradient_view setImagesLeft:imageFromRes(@"progressbar-fill-left_dark") middle:imageFromRes(@"progressbar-fill-middle_dark") right:imageFromRes(@"progressbar-fill-right_dark")];
[o_fullscreen_btn setImage: imageFromRes(@"fullscreen-one-button-pressed_dark")];
[o_fullscreen_btn setAlternateImage: imageFromRes(@"fullscreen-one-button-pressed_dark")];
}
[o_play_btn setImage: o_play_img];
......@@ -509,69 +509,69 @@
[[o_effects_btn cell] accessibilitySetOverrideValue:[o_effects_btn toolTip] forAttribute:NSAccessibilityTitleAttribute];
if (!b_dark_interface) {
[o_stop_btn setImage: [NSImage imageNamed:@"stop"]];
[o_stop_btn setAlternateImage: [NSImage imageNamed:@"stop-pressed"]];
[o_playlist_btn setImage: [NSImage imageNamed:@"playlist-btn"]];
[o_playlist_btn setAlternateImage: [NSImage imageNamed:@"playlist-btn-pressed"]];
o_repeat_img = [[NSImage imageNamed:@"repeat"] retain];
o_repeat_pressed_img = [[NSImage imageNamed:@"repeat-pressed"] retain];
o_repeat_all_img = [[NSImage imageNamed:@"repeat-all"] retain];
o_repeat_all_pressed_img = [[NSImage imageNamed:@"repeat-all-pressed"] retain];
o_repeat_one_img = [[NSImage imageNamed:@"repeat-one"] retain];
o_repeat_one_pressed_img = [[NSImage imageNamed:@"repeat-one-pressed"] retain];
o_shuffle_img = [[NSImage imageNamed:@"shuffle"] retain];
o_shuffle_pressed_img = [[NSImage imageNamed:@"shuffle-pressed"] retain];
o_shuffle_on_img = [[NSImage imageNamed:@"shuffle-blue"] retain];
o_shuffle_on_pressed_img = [[NSImage imageNamed:@"shuffle-blue-pressed"] retain];
[o_volume_down_btn setImage: [NSImage imageNamed:@"volume-low"]];
[o_volume_track_view setImage: [NSImage imageNamed:@"volume-slider-track"]];
[o_volume_up_btn setImage: [NSImage imageNamed:@"volume-high"]];
[o_stop_btn setImage: imageFromRes(@"stop")];
[o_stop_btn setAlternateImage: imageFromRes(@"stop-pressed")];
[o_playlist_btn setImage: imageFromRes(@"playlist-btn")];
[o_playlist_btn setAlternateImage: imageFromRes(@"playlist-btn-pressed")];
o_repeat_img = [imageFromRes(@"repeat") retain];
o_repeat_pressed_img = [imageFromRes(@"repeat-pressed") retain];
o_repeat_all_img = [imageFromRes(@"repeat-all") retain];
o_repeat_all_pressed_img = [imageFromRes(@"repeat-all-pressed") retain];
o_repeat_one_img = [imageFromRes(@"repeat-one") retain];
o_repeat_one_pressed_img = [imageFromRes(@"repeat-one-pressed") retain];
o_shuffle_img = [imageFromRes(@"shuffle") retain];
o_shuffle_pressed_img = [imageFromRes(@"shuffle-pressed") retain];
o_shuffle_on_img = [imageFromRes(@"shuffle-blue") retain];
o_shuffle_on_pressed_img = [imageFromRes(@"shuffle-blue-pressed") retain];
[o_volume_down_btn setImage: imageFromRes(@"volume-low")];
[o_volume_track_view setImage: imageFromRes(@"volume-slider-track")];
[o_volume_up_btn setImage: imageFromRes(@"volume-high")];
[o_volume_sld setUsesBrightArtwork: YES];
if (b_nativeFullscreenMode) {
[o_effects_btn setImage: [NSImage imageNamed:@"effects-one-button"]];
[o_effects_btn setAlternateImage: [NSImage imageNamed:@"effects-one-button-pressed"]];
[o_effects_btn setImage: imageFromRes(@"effects-one-button")];
[o_effects_btn setAlternateImage: imageFromRes(@"effects-one-button-pressed")];
} else {
[o_effects_btn setImage: [NSImage imageNamed:@"effects-double-buttons"]];
[o_effects_btn setAlternateImage: [NSImage imageNamed:@"effects-double-buttons-pressed"]];
[o_effects_btn setImage: imageFromRes(@"effects-double-buttons")];
[o_effects_btn setAlternateImage: imageFromRes(@"effects-double-buttons-pressed")];
}
[o_fullscreen_btn setImage: [NSImage imageNamed:@"fullscreen-double-buttons"]];
[o_fullscreen_btn setAlternateImage: [NSImage imageNamed:@"fullscreen-double-buttons-pressed"]];
[o_fullscreen_btn setImage: imageFromRes(@"fullscreen-double-buttons")];
[o_fullscreen_btn setAlternateImage: imageFromRes(@"fullscreen-double-buttons-pressed")];
} else {
[o_stop_btn setImage: [NSImage imageNamed:@"stop_dark"]];
[o_stop_btn setAlternateImage: [NSImage imageNamed:@"stop-pressed_dark"]];
[o_playlist_btn setImage: [NSImage imageNamed:@"playlist_dark"]];
[o_playlist_btn setAlternateImage: [NSImage imageNamed:@"playlist-pressed_dark"]];
o_repeat_img = [[NSImage imageNamed:@"repeat_dark"] retain];
o_repeat_pressed_img = [[NSImage imageNamed:@"repeat-pressed_dark"] retain];
o_repeat_all_img = [[NSImage imageNamed:@"repeat-all-blue_dark"] retain];
o_repeat_all_pressed_img = [[NSImage imageNamed:@"repeat-all-blue-pressed_dark"] retain];
o_repeat_one_img = [[NSImage imageNamed:@"repeat-one-blue_dark"] retain];
o_repeat_one_pressed_img = [[NSImage imageNamed:@"repeat-one-blue-pressed_dark"] retain];
o_shuffle_img = [[NSImage imageNamed:@"shuffle_dark"] retain];
o_shuffle_pressed_img = [[NSImage imageNamed:@"shuffle-pressed_dark"] retain];
o_shuffle_on_img = [[NSImage imageNamed:@"shuffle-blue_dark"] retain];
o_shuffle_on_pressed_img = [[NSImage imageNamed:@"shuffle-blue-pressed_dark"] retain];
[o_volume_down_btn setImage: [NSImage imageNamed:@"volume-low_dark"]];
[o_volume_track_view setImage: [NSImage imageNamed:@"volume-slider-track_dark"]];
[o_volume_up_btn setImage: [NSImage imageNamed:@"volume-high_dark"]];
[o_stop_btn setImage: imageFromRes(@"stop_dark")];
[o_stop_btn setAlternateImage: imageFromRes(@"stop-pressed_dark")];
[o_playlist_btn setImage: imageFromRes(@"playlist_dark")];
[o_playlist_btn setAlternateImage: imageFromRes(@"playlist-pressed_dark")];
o_repeat_img = [imageFromRes(@"repeat_dark") retain];
o_repeat_pressed_img = [imageFromRes(@"repeat-pressed_dark") retain];
o_repeat_all_img = [imageFromRes(@"repeat-all-blue_dark") retain];
o_repeat_all_pressed_img = [imageFromRes(@"repeat-all-blue-pressed_dark") retain];
o_repeat_one_img = [imageFromRes(@"repeat-one-blue_dark") retain];
o_repeat_one_pressed_img = [imageFromRes(@"repeat-one-blue-pressed_dark") retain];
o_shuffle_img = [imageFromRes(@"shuffle_dark") retain];
o_shuffle_pressed_img = [imageFromRes(@"shuffle-pressed_dark") retain];
o_shuffle_on_img = [imageFromRes(@"shuffle-blue_dark") retain];
o_shuffle_on_pressed_img = [imageFromRes(@"shuffle-blue-pressed_dark") retain];
[o_volume_down_btn setImage: imageFromRes(@"volume-low_dark")];
[o_volume_track_view setImage: imageFromRes(@"volume-slider-track_dark")];
[o_volume_up_btn setImage: imageFromRes(@"volume-high_dark")];
[o_volume_sld setUsesBrightArtwork: NO];
if (b_nativeFullscreenMode) {
[o_effects_btn setImage: [NSImage imageNamed:@"effects-one-button_dark"]];
[o_effects_btn setAlternateImage: [NSImage imageNamed:@"effects-one-button-pressed-dark"]];
[o_effects_btn setImage: imageFromRes(@"effects-one-button_dark")];
[o_effects_btn setAlternateImage: imageFromRes(@"effects-one-button-pressed-dark")];
} else {
[o_effects_btn setImage: [NSImage imageNamed:@"effects-double-buttons_dark"]];
[o_effects_btn setAlternateImage: [NSImage imageNamed:@"effects-double-buttons-pressed_dark"]];
[o_effects_btn setImage: imageFromRes(@"effects-double-buttons_dark")];
[o_effects_btn setAlternateImage: imageFromRes(@"effects-double-buttons-pressed_dark")];
}
[o_fullscreen_btn setImage: [NSImage imageNamed:@"fullscreen-double-buttons_dark"]];
[o_fullscreen_btn setAlternateImage: [NSImage imageNamed:@"fullscreen-double-buttons-pressed_dark"]];
[o_fullscreen_btn setImage: imageFromRes(@"fullscreen-double-buttons_dark")];
[o_fullscreen_btn setAlternateImage: imageFromRes(@"fullscreen-double-buttons-pressed_dark")];
}
[o_repeat_btn setImage: o_repeat_img];
[o_repeat_btn setAlternateImage: o_repeat_pressed_img];
......@@ -676,11 +676,11 @@ else \
if (!b_nativeFullscreenMode) {
if (b_dark_interface) {
[o_fullscreen_btn setImage: [NSImage imageNamed:@"fullscreen-double-buttons_dark"]];
[o_fullscreen_btn setAlternateImage: [NSImage imageNamed:@"fullscreen-double-buttons-pressed_dark"]];
[o_fullscreen_btn setImage: imageFromRes(@"fullscreen-double-buttons_dark")];
[o_fullscreen_btn setAlternateImage: imageFromRes(@"fullscreen-double-buttons-pressed_dark")];
} else {
[o_fullscreen_btn setImage: [NSImage imageNamed:@"fullscreen-double-buttons"]];
[o_fullscreen_btn setAlternateImage: [NSImage imageNamed:@"fullscreen-double-buttons-pressed"]];
[o_fullscreen_btn setImage: imageFromRes(@"fullscreen-double-buttons")];
[o_fullscreen_btn setAlternateImage: imageFromRes(@"fullscreen-double-buttons-pressed")];
}
}
......@@ -725,11 +725,11 @@ else \
if (!b_nativeFullscreenMode) {
if (b_dark_interface) {
[[o_fullscreen_btn animator] setImage: [NSImage imageNamed:@"fullscreen-one-button_dark"]];
[[o_fullscreen_btn animator] setAlternateImage: [NSImage imageNamed:@"fullscreen-one-button-pressed_dark"]];
[[o_fullscreen_btn animator] setImage: imageFromRes(@"fullscreen-one-button_dark")];
[[o_fullscreen_btn animator] setAlternateImage: imageFromRes(@"fullscreen-one-button-pressed_dark")];
} else {
[[o_fullscreen_btn animator] setImage: [NSImage imageNamed:@"fullscreen-one-button"]];
[[o_fullscreen_btn animator] setAlternateImage: [NSImage imageNamed:@"fullscreen-one-button-pressed"]];
[[o_fullscreen_btn animator] setImage: imageFromRes(@"fullscreen-one-button")];
[[o_fullscreen_btn animator] setAlternateImage: imageFromRes(@"fullscreen-one-button-pressed")];
}
}
......@@ -774,15 +774,15 @@ else \
[o_next_btn setEnabled: b_enabled];
if (b_dark_interface) {
[o_prev_btn setImage: [NSImage imageNamed:@"previous-6btns-dark"]];
[o_prev_btn setAlternateImage: [NSImage imageNamed:@"previous-6btns-dark-pressed"]];
[o_next_btn setImage: [NSImage imageNamed:@"next-6btns-dark"]];
[o_next_btn setAlternateImage: [NSImage imageNamed:@"next-6btns-dark-pressed"]];
[o_prev_btn setImage: imageFromRes(@"previous-6btns-dark")];
[o_prev_btn setAlternateImage: imageFromRes(@"previous-6btns-dark-pressed")];
[o_next_btn setImage: imageFromRes(@"next-6btns-dark")];
[o_next_btn setAlternateImage: imageFromRes(@"next-6btns-dark-pressed")];
} else {
[o_prev_btn setImage: [NSImage imageNamed:@"previous-6btns"]];
[o_prev_btn setAlternateImage: [NSImage imageNamed:@"previous-6btns-pressed"]];
[o_next_btn setImage: [NSImage imageNamed:@"next-6btns"]];
[o_next_btn setAlternateImage: [NSImage imageNamed:@"next-6btns-pressed"]];
[o_prev_btn setImage: imageFromRes(@"previous-6btns")];
[o_prev_btn setAlternateImage: imageFromRes(@"previous-6btns-pressed")];
[o_next_btn setImage: imageFromRes(@"next-6btns")];
[o_next_btn setAlternateImage: imageFromRes(@"next-6btns-pressed")];
}
NSRect frame;
......@@ -822,15 +822,15 @@ else \
[[o_progress_view animator] setFrame: frame];
if (b_dark_interface) {
[[o_fwd_btn animator] setImage:[NSImage imageNamed:@"forward-6btns-dark"]];
[[o_fwd_btn animator] setAlternateImage:[NSImage imageNamed:@"forward-6btns-dark-pressed"]];
[[o_bwd_btn animator] setImage:[NSImage imageNamed:@"backward-6btns-dark"]];
[[o_bwd_btn animator] setAlternateImage:[NSImage imageNamed:@"backward-6btns-dark-pressed"]];
[[o_fwd_btn animator] setImage:imageFromRes(@"forward-6btns-dark")];
[[o_fwd_btn animator] setAlternateImage:imageFromRes(@"forward-6btns-dark-pressed")];
[[o_bwd_btn animator] setImage:imageFromRes(@"backward-6btns-dark")];
[[o_bwd_btn animator] setAlternateImage:imageFromRes(@"backward-6btns-dark-pressed")];
} else {
[[o_fwd_btn animator] setImage:[NSImage imageNamed:@"forward-6btns"]];
[[o_fwd_btn animator] setAlternateImage:[NSImage imageNamed:@"forward-6btns-pressed"]];
[[o_bwd_btn animator] setImage:[NSImage imageNamed:@"backward-6btns"]];
[[o_bwd_btn animator] setAlternateImage:[NSImage imageNamed:@"backward-6btns-pressed"]];
[[o_fwd_btn animator] setImage:imageFromRes(@"forward-6btns")];
[[o_fwd_btn animator] setAlternateImage:imageFromRes(@"forward-6btns-pressed")];
[[o_bwd_btn animator] setImage:imageFromRes(@"backward-6btns")];
[[o_bwd_btn animator] setAlternateImage:imageFromRes(@"backward-6btns-pressed")];
}
preliminaryFrame.origin.x = [o_prev_btn frame].origin.x + [o_prev_btn frame].size.width + [o_bwd_btn frame].size.width + [o_play_btn frame].size.width + [o_fwd_btn frame].size.width;
......@@ -904,15 +904,15 @@ else \
[[o_progress_view animator] setFrame: frame];
if (b_dark_interface) {
[[o_fwd_btn animator] setImage:[NSImage imageNamed:@"forward-3btns-dark"]];
[[o_fwd_btn animator] setAlternateImage:[NSImage imageNamed:@"forward-3btns-dark-pressed"]];
[[o_bwd_btn animator] setImage:[NSImage imageNamed:@"backward-3btns-dark"]];
[[o_bwd_btn animator] setAlternateImage:[NSImage imageNamed:@"backward-3btns-dark-pressed"]];
[[o_fwd_btn animator] setImage:imageFromRes(@"forward-3btns-dark")];
[[o_fwd_btn animator] setAlternateImage:imageFromRes(@"forward-3btns-dark-pressed")];
[[o_bwd_btn animator] setImage:imageFromRes(@"backward-3btns-dark")];
[[o_bwd_btn animator] setAlternateImage:imageFromRes(@"backward-3btns-dark-pressed")];
} else {
[[o_fwd_btn animator] setImage:[NSImage imageNamed:@"forward-3btns"]];
[[o_fwd_btn animator] setAlternateImage:[NSImage imageNamed:@"forward-3btns-pressed"]];
[[o_bwd_btn animator] setImage:[NSImage imageNamed:@"backward-3btns"]];
[[o_bwd_btn animator] setAlternateImage:[NSImage imageNamed:@"backward-3btns-pressed"]];
[[o_fwd_btn animator] setImage:imageFromRes(@"forward-3btns")];
[[o_fwd_btn animator] setAlternateImage:imageFromRes(@"forward-3btns-pressed")];
[[o_bwd_btn animator] setImage:imageFromRes(@"backward-3btns")];
[[o_bwd_btn animator] setAlternateImage:imageFromRes(@"backward-3btns-pressed")];
}
[self toggleForwardBackwardMode: NO];
......@@ -936,11 +936,11 @@ else \
CGFloat f_space = [o_repeat_btn frame].size.width + [o_shuffle_btn frame].size.width - 6.;
if (b_dark_interface) {
[[o_playlist_btn animator] setImage:[NSImage imageNamed:@"playlist_dark"]];
[[o_playlist_btn animator] setAlternateImage:[NSImage imageNamed:@"playlist-pressed_dark"]];
[[o_playlist_btn animator] setImage:imageFromRes(@"playlist_dark")];
[[o_playlist_btn animator] setAlternateImage:imageFromRes(@"playlist-pressed_dark")];
} else {
[[o_playlist_btn animator] setImage:[NSImage imageNamed:@"playlist-btn"]];
[[o_playlist_btn animator] setAlternateImage:[NSImage imageNamed:@"playlist-btn-pressed"]];
[[o_playlist_btn animator] setImage:imageFromRes(@"playlist-btn")];
[[o_playlist_btn animator] setAlternateImage:imageFromRes(@"playlist-btn-pressed")];
}
frame = [o_playlist_btn frame];
frame.size.width--;
......@@ -971,11 +971,11 @@ else \
[o_shuffle_btn setHidden: YES];
if (b_dark_interface) {
[[o_playlist_btn animator] setImage:[NSImage imageNamed:@"playlist-1btn-dark"]];
[[o_playlist_btn animator] setAlternateImage:[NSImage imageNamed:@"playlist-1btn-dark-pressed"]];
[[o_playlist_btn animator] setImage:imageFromRes(@"playlist-1btn-dark")];
[[o_playlist_btn animator] setAlternateImage:imageFromRes(@"playlist-1btn-dark-pressed")];
} else {
[[o_playlist_btn animator] setImage:[NSImage imageNamed:@"playlist-1btn"]];
[[o_playlist_btn animator] setAlternateImage:[NSImage imageNamed:@"playlist-1btn-pressed"]];
[[o_playlist_btn animator] setImage:imageFromRes(@"playlist-1btn")];
[[o_playlist_btn animator] setAlternateImage:imageFromRes(@"playlist-1btn-pressed")];
}
frame = [o_playlist_btn frame];
frame.size.width++;
......
......@@ -64,6 +64,7 @@ typedef enum {
IBOutlet id o_dropzone_btn;
IBOutlet id o_dropzone_lbl;
IBOutlet id o_dropzone_box;
IBOutlet id o_dropzone_img;
VLCFSPanel *o_fspanel;
......
......@@ -176,6 +176,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_dropzone_btn setTitle: _NS("Open media...")];
[[o_dropzone_btn cell] accessibilitySetOverrideValue:_NS("Click to open an advanced dialog to select the media to play. You can also drop files here to play.") forAttribute:NSAccessibilityDescriptionAttribute];
[o_dropzone_lbl setStringValue: _NS("Drop media here")];
[o_dropzone_img setImage: imageFromRes(@"dropzone")];
[o_podcast_add_btn setTitle: _NS("Subscribe")];
[o_podcast_remove_btn setTitle: _NS("Unsubscribe")];
......@@ -325,9 +326,9 @@ static VLCMainWindow *_o_sharedInstance = nil;
o_sidebaritems = [[NSMutableArray alloc] init];
SideBarItem *libraryItem = [SideBarItem itemWithTitle:_NS("LIBRARY") identifier:@"library"];
SideBarItem *playlistItem = [SideBarItem itemWithTitle:_NS("Playlist") identifier:@"playlist"];
[playlistItem setIcon: [NSImage imageNamed:@"sidebar-playlist"]];
[playlistItem setIcon: imageFromRes(@"sidebar-playlist")];
SideBarItem *medialibraryItem = [SideBarItem itemWithTitle:_NS("Media Library") identifier:@"medialibrary"];
[medialibraryItem setIcon: [NSImage imageNamed:@"sidebar-playlist"]];
[medialibraryItem setIcon: imageFromRes(@"sidebar-playlist")];
SideBarItem *mycompItem = [SideBarItem itemWithTitle:_NS("MY COMPUTER") identifier:@"mycomputer"];
SideBarItem *devicesItem = [SideBarItem itemWithTitle:_NS("DEVICES") identifier:@"devices"];
SideBarItem *lanItem = [SideBarItem itemWithTitle:_NS("LOCAL NETWORK") identifier:@"localnetwork"];
......@@ -352,7 +353,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
case SD_CAT_INTERNET:
[internetItems addObject: [SideBarItem itemWithTitle: _NS(*ppsz_longname) identifier: o_identifier]];
if (!strncmp(*ppsz_name, "podcast", 7))
[[internetItems lastObject] setIcon: [NSImage imageNamed:@"sidebar-podcast"]];
[[internetItems lastObject] setIcon: imageFromRes(@"sidebar-podcast")];
else
[[internetItems lastObject] setIcon: [NSImage imageNamed:@"NSApplicationIcon"]];
[[internetItems lastObject] setSdtype: SD_CAT_INTERNET];
......@@ -366,18 +367,18 @@ static VLCMainWindow *_o_sharedInstance = nil;
break;
case SD_CAT_LAN:
[lanItems addObject: [SideBarItem itemWithTitle: _NS(*ppsz_longname) identifier: o_identifier]];
[[lanItems lastObject] setIcon: [NSImage imageNamed:@"sidebar-local"]];
[[lanItems lastObject] setIcon: imageFromRes(@"sidebar-local")];
[[lanItems lastObject] setSdtype: SD_CAT_LAN];
[[lanItems lastObject] setUntranslatedTitle: [NSString stringWithUTF8String:*ppsz_longname]];
break;
case SD_CAT_MYCOMPUTER:
[mycompItems addObject: [SideBarItem itemWithTitle: _NS(*ppsz_longname) identifier: o_identifier]];
if (!strncmp(*ppsz_name, "video_dir", 9))
[[mycompItems lastObject] setIcon: [NSImage imageNamed:@"sidebar-movie"]];
[[mycompItems lastObject] setIcon: imageFromRes(@"sidebar-movie")];
else if (!strncmp(*ppsz_name, "audio_dir", 9))
[[mycompItems lastObject] setIcon: [NSImage imageNamed:@"sidebar-music"]];
[[mycompItems lastObject] setIcon: imageFromRes(@"sidebar-music")];
else if (!strncmp(*ppsz_name, "picture_dir", 11))
[[mycompItems lastObject] setIcon: [NSImage imageNamed:@"sidebar-pictures"]];
[[mycompItems lastObject] setIcon: imageFromRes(@"sidebar-pictures")];
else
[[mycompItems lastObject] setIcon: [NSImage imageNamed:@"NSApplicationIcon"]];
[[mycompItems lastObject] setUntranslatedTitle: [NSString stringWithUTF8String:*ppsz_longname]];
......
......@@ -67,7 +67,7 @@
- (void)awakeFromNib
{
[self setAutoresizesSubviews: YES];
[self setImagesLeft:[NSImage imageNamed:@"topbar-dark-left"] middle: [NSImage imageNamed:@"topbar-dark-center-fill"] right:[NSImage imageNamed:@"topbar-dark-right"]];
[self setImagesLeft:imageFromRes(@"topbar-dark-left") middle: imageFromRes(@"topbar-dark-center-fill") right:imageFromRes(@"topbar-dark-right")];
[self loadButtonIcons];
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(controlTintChanged:) name: NSControlTintDidChangeNotification object: nil];
......
......@@ -256,7 +256,6 @@ static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEv
[_delegate mediaKeyTap:self receivedMediaKeyEvent:event];
}
-(void)eventTapThread;
{
_tapThreadRL = CFRunLoopGetCurrent();
......
......@@ -39,6 +39,12 @@
NSString *toNSStr(const char *str);
unsigned int CocoaKeyToVLC(unichar i_key);
/**
* Gets the proper variant for an image ressource,
* depending on the os version.
*/
NSImage *imageFromRes(NSString *o_id);
@interface VLCStringUtility : NSObject
+ (VLCStringUtility *)sharedInstance;
......
......@@ -26,6 +26,7 @@
#import "intf.h"
#import "StringUtility.h"
#import "CompatibilityFixes.h"
#import <vlc_keys.h>
#import <vlc_strings.h>
......@@ -392,5 +393,16 @@ NSString *toNSStr(const char *str) {
return returnStr;
}
@end
NSImage *imageFromRes(NSString *o_id)
{
NSString *result = @"";
if (OSX_YOSEMITE) {
result = [result stringByAppendingString:@"ys-"];
}
result = [result stringByAppendingString:o_id];
return [NSImage imageNamed:result];
}
......@@ -390,8 +390,8 @@
[o_button setBezelStyle: NSRegularSquareBezelStyle]; \
[o_button setBordered: NO]; \
[o_button setFont:[NSFont systemFontOfSize:0]]; \
[o_button setImage:[NSImage imageNamed:imageOff]]; \
[o_button setAlternateImage:[NSImage imageNamed:imageOn]]; \
[o_button setImage:imageFromRes(imageOff)]; \
[o_button setAlternateImage:imageFromRes(imageOn)]; \
[o_button sizeToFit]; \
[o_button setTarget: self]; \
[o_button setAction: @selector(action:)]; \
......@@ -486,11 +486,11 @@
addTextfield(VLCTimeField, o_streamLength_txt, NSRightTextAlignment, systemFontOfSize, whiteColor);
[o_streamLength_txt setRemainingIdentifier: @"DisplayFullscreenTimeAsTimeRemaining"];
o_background_img = [[NSImage imageNamed:@"fs_background"] retain];
o_vol_sld_img = [[NSImage imageNamed:@"fs_volume_slider_bar"] retain];
o_vol_mute_img = [[NSImage imageNamed:@"fs_volume_mute_highlight"] retain];
o_vol_max_img = [[NSImage imageNamed:@"fs_volume_max_highlight"] retain];
o_time_sld_img = [[NSImage imageNamed:@"fs_time_slider"] retain];
o_background_img = [imageFromRes(@"fs_background") retain];
o_vol_sld_img = [imageFromRes(@"fs_volume_slider_bar") retain];
o_vol_mute_img = [imageFromRes(@"fs_volume_mute_highlight") retain];
o_vol_max_img = [imageFromRes(@"fs_volume_max_highlight") retain];
o_time_sld_img = [imageFromRes(@"fs_time_slider") retain];
return view;
}
......@@ -517,14 +517,14 @@
- (void)setPlay
{
[o_play setImage:[NSImage imageNamed:@"fs_play_highlight"]];
[o_play setAlternateImage: [NSImage imageNamed:@"fs_play"]];
[o_play setImage:imageFromRes(@"fs_play_highlight")];
[o_play setAlternateImage: imageFromRes(@"fs_play")];
}
- (void)setPause
{
[o_play setImage: [NSImage imageNamed:@"fs_pause_highlight"]];
[o_play setAlternateImage: [NSImage imageNamed:@"fs_pause"]];
[o_play setImage: imageFromRes(@"fs_pause_highlight")];
[o_play setAlternateImage: imageFromRes(@"fs_pause")];
}
- (void)setStreamTitle:(NSString *)o_title
......@@ -683,7 +683,7 @@
- (void)drawKnobInRect:(NSRect)knobRect
{