Commit 608e4c70 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: re-implement the 'icon-change' options

Note that the displayed icon is a re-rendering based upon the original sources, since we need a higher resolution icon on the Mac.
parent 8d9646c1
...@@ -248,6 +248,7 @@ ...@@ -248,6 +248,7 @@
CC58012C1423A85300166912 /* fs_volume_slider_bar@x1.5.png in Resources */ = {isa = PBXBuildFile; fileRef = CC5801111423A85300166912 /* fs_volume_slider_bar@x1.5.png */; }; CC58012C1423A85300166912 /* fs_volume_slider_bar@x1.5.png in Resources */ = {isa = PBXBuildFile; fileRef = CC5801111423A85300166912 /* fs_volume_slider_bar@x1.5.png */; };
CC58012D1423A85300166912 /* fs_volume_slider_knob_highlight@x1.5.png in Resources */ = {isa = PBXBuildFile; fileRef = CC5801121423A85300166912 /* fs_volume_slider_knob_highlight@x1.5.png */; }; CC58012D1423A85300166912 /* fs_volume_slider_knob_highlight@x1.5.png in Resources */ = {isa = PBXBuildFile; fileRef = CC5801121423A85300166912 /* fs_volume_slider_knob_highlight@x1.5.png */; };
CC58012E1423A85300166912 /* fs_volume_slider_knob@x1.5.png in Resources */ = {isa = PBXBuildFile; fileRef = CC5801131423A85300166912 /* fs_volume_slider_knob@x1.5.png */; }; CC58012E1423A85300166912 /* fs_volume_slider_knob@x1.5.png in Resources */ = {isa = PBXBuildFile; fileRef = CC5801131423A85300166912 /* fs_volume_slider_knob@x1.5.png */; };
CC68B0331544C1AE00FD9C7F /* vlc-xmas.png in Resources */ = {isa = PBXBuildFile; fileRef = CC68B0321544C1AE00FD9C7F /* vlc-xmas.png */; };
CC78DA4413DE056700E9603C /* topbar_background.png in Resources */ = {isa = PBXBuildFile; fileRef = CC78DA4313DE056700E9603C /* topbar_background.png */; }; CC78DA4413DE056700E9603C /* topbar_background.png in Resources */ = {isa = PBXBuildFile; fileRef = CC78DA4313DE056700E9603C /* topbar_background.png */; };
CC8062641021F8790021EB9A /* dsa_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = CC8062631021F8790021EB9A /* dsa_pub.pem */; }; CC8062641021F8790021EB9A /* dsa_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = CC8062631021F8790021EB9A /* dsa_pub.pem */; };
CC84FB2D130083BB00816D38 /* BGHUDAppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC84FB2C130083BB00816D38 /* BGHUDAppKit.framework */; }; CC84FB2D130083BB00816D38 /* BGHUDAppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC84FB2C130083BB00816D38 /* BGHUDAppKit.framework */; };
...@@ -575,6 +576,7 @@ ...@@ -575,6 +576,7 @@
CC5801111423A85300166912 /* fs_volume_slider_bar@x1.5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "fs_volume_slider_bar@x1.5.png"; path = "Resources/fspanel/fs_volume_slider_bar@x1.5.png"; sourceTree = "<group>"; }; CC5801111423A85300166912 /* fs_volume_slider_bar@x1.5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "fs_volume_slider_bar@x1.5.png"; path = "Resources/fspanel/fs_volume_slider_bar@x1.5.png"; sourceTree = "<group>"; };
CC5801121423A85300166912 /* fs_volume_slider_knob_highlight@x1.5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "fs_volume_slider_knob_highlight@x1.5.png"; path = "Resources/fspanel/fs_volume_slider_knob_highlight@x1.5.png"; sourceTree = "<group>"; }; CC5801121423A85300166912 /* fs_volume_slider_knob_highlight@x1.5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "fs_volume_slider_knob_highlight@x1.5.png"; path = "Resources/fspanel/fs_volume_slider_knob_highlight@x1.5.png"; sourceTree = "<group>"; };
CC5801131423A85300166912 /* fs_volume_slider_knob@x1.5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "fs_volume_slider_knob@x1.5.png"; path = "Resources/fspanel/fs_volume_slider_knob@x1.5.png"; sourceTree = "<group>"; }; CC5801131423A85300166912 /* fs_volume_slider_knob@x1.5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "fs_volume_slider_knob@x1.5.png"; path = "Resources/fspanel/fs_volume_slider_knob@x1.5.png"; sourceTree = "<group>"; };
CC68B0321544C1AE00FD9C7F /* vlc-xmas.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "vlc-xmas.png"; path = "Resources/icons/vlc-xmas.png"; sourceTree = "<group>"; };
CC6C01A90DDF3E9200C7D754 /* intf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = intf.h; path = ../../../modules/gui/minimal_macosx/intf.h; sourceTree = SOURCE_ROOT; }; CC6C01A90DDF3E9200C7D754 /* intf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = intf.h; path = ../../../modules/gui/minimal_macosx/intf.h; sourceTree = SOURCE_ROOT; };
CC6C01AA0DDF3E9200C7D754 /* intf.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = intf.m; path = ../../../modules/gui/minimal_macosx/intf.m; sourceTree = SOURCE_ROOT; }; CC6C01AA0DDF3E9200C7D754 /* intf.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = intf.m; path = ../../../modules/gui/minimal_macosx/intf.m; sourceTree = SOURCE_ROOT; };
CC6C01AB0DDF3E9200C7D754 /* macosx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = macosx.c; path = ../../../modules/gui/minimal_macosx/macosx.c; sourceTree = SOURCE_ROOT; }; CC6C01AB0DDF3E9200C7D754 /* macosx.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = macosx.c; path = ../../../modules/gui/minimal_macosx/macosx.c; sourceTree = SOURCE_ROOT; };
...@@ -827,6 +829,7 @@ ...@@ -827,6 +829,7 @@
CC0433A313B28B9C00D7D52E /* vlc.icns */, CC0433A313B28B9C00D7D52E /* vlc.icns */,
CC0433A413B28B9C00D7D52E /* vob.icns */, CC0433A413B28B9C00D7D52E /* vob.icns */,
CC0433A513B28B9C00D7D52E /* wav.icns */, CC0433A513B28B9C00D7D52E /* wav.icns */,
CC68B0321544C1AE00FD9C7F /* vlc-xmas.png */,
CC0433A613B28B9C00D7D52E /* wma.icns */, CC0433A613B28B9C00D7D52E /* wma.icns */,
CC0433A713B28B9C00D7D52E /* wmv.icns */, CC0433A713B28B9C00D7D52E /* wmv.icns */,
); );
...@@ -1539,6 +1542,7 @@ ...@@ -1539,6 +1542,7 @@
CC0F725315063C820086B6A0 /* fullscreen-one-button.png in Resources */, CC0F725315063C820086B6A0 /* fullscreen-one-button.png in Resources */,
CC0F725715063C980086B6A0 /* fullscreen-one-button_dark.png in Resources */, CC0F725715063C980086B6A0 /* fullscreen-one-button_dark.png in Resources */,
CC0F725815063C980086B6A0 /* fullscreen-one-button-pressed_dark.png in Resources */, CC0F725815063C980086B6A0 /* fullscreen-one-button-pressed_dark.png in Resources */,
CC68B0331544C1AE00FD9C7F /* vlc-xmas.png in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
......
...@@ -626,6 +626,21 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -626,6 +626,21 @@ static VLCMain *_o_sharedMainInstance = nil;
if (i_value > 0) if (i_value > 0)
var_SetInteger( pl_Get( VLCIntf ), "audio-device", i_value ); var_SetInteger( pl_Get( VLCIntf ), "audio-device", i_value );
if (config_GetInt( VLCIntf, "macosx-icon-change"))
{
/* After day 354 of the year, the usual VLC cone is replaced by another cone
* wearing a Father Xmas hat.
* Note: this icon doesn't represent an endorsement of The Coca-Cola Company.
*/
NSCalendar *gregorian =
[[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
NSUInteger dayOfYear = [gregorian ordinalityOfUnit:NSDayCalendarUnit inUnit:NSYearCalendarUnit forDate:[NSDate date]];
[gregorian release];
if (dayOfYear >= 354)
[[VLCApplication sharedApplication] setApplicationIconImage: [NSImage imageNamed:@"vlc-xmas"]];
}
nib_main_loaded = TRUE; nib_main_loaded = TRUE;
} }
......
...@@ -102,6 +102,9 @@ void WindowClose ( vout_window_t * ); ...@@ -102,6 +102,9 @@ void WindowClose ( vout_window_t * );
#define PAUSE_MINIMIZED_LONGTEXT N_( \ #define PAUSE_MINIMIZED_LONGTEXT N_( \
"With this option enabled, the playback will be automatically paused when minimizing the window." ) "With this option enabled, the playback will be automatically paused when minimizing the window." )
#define ICONCHANGE_TEXT N_( "Allow automatic icon changes")
#define ICONCHANGE_LONGTEXT N_( "This option allows the interface to change its icon on various occasions.")
#define LOCK_ASPECT_RATIO_TEXT N_("Lock Aspect Ratio") #define LOCK_ASPECT_RATIO_TEXT N_("Lock Aspect Ratio")
vlc_module_begin () vlc_module_begin ()
...@@ -125,6 +128,7 @@ vlc_module_begin () ...@@ -125,6 +128,7 @@ vlc_module_begin ()
add_bool( "macosx-video-autoresize", true, KEEPSIZE_TEXT, KEEPSIZE_LONGTEXT, false ) add_bool( "macosx-video-autoresize", true, KEEPSIZE_TEXT, KEEPSIZE_LONGTEXT, false )
add_bool( "macosx-pause-minimized", false, PAUSE_MINIMIZED_TEXT, PAUSE_MINIMIZED_LONGTEXT, false ) add_bool( "macosx-pause-minimized", false, PAUSE_MINIMIZED_TEXT, PAUSE_MINIMIZED_LONGTEXT, false )
add_bool( "macosx-lock-aspect-ratio", true, LOCK_ASPECT_RATIO_TEXT, LOCK_ASPECT_RATIO_TEXT, true ) add_bool( "macosx-lock-aspect-ratio", true, LOCK_ASPECT_RATIO_TEXT, LOCK_ASPECT_RATIO_TEXT, true )
add_bool( "macosx-icon-change", true, ICONCHANGE_TEXT, ICONCHANGE_LONGTEXT, true )
add_submodule () add_submodule ()
set_description( "Mac OS X Video Output Provider" ) set_description( "Mac OS X Video Output Provider" )
......
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