[vlc-commits] macosx: remove "macosx-autosave-volume" as its already implemented in core

David Fuhrmann git at videolan.org
Mon Jun 4 13:28:56 CEST 2012


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Mon Jun  4 13:28:13 2012 +0200| [e848e4443b04c3cac664d0b3e722fffa65ddacd2] | committer: David Fuhrmann

macosx: remove "macosx-autosave-volume" as its already implemented in core

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

 modules/gui/macosx/MainWindow.h   |    1 -
 modules/gui/macosx/MainWindow.m   |    5 -----
 modules/gui/macosx/macosx.m       |    3 ---
 modules/gui/macosx/simple_prefs.m |    4 ++--
 4 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/modules/gui/macosx/MainWindow.h b/modules/gui/macosx/MainWindow.h
index 7e66413..b6e12ad 100644
--- a/modules/gui/macosx/MainWindow.h
+++ b/modules/gui/macosx/MainWindow.h
@@ -97,7 +97,6 @@
     BOOL b_show_jump_buttons;
     BOOL b_show_playmode_buttons;
     int i_lastSplitViewHeight;
-    int i_lastShownVolume;
     input_state_e cachedInputState;
 
     NSImage * o_pause_img;
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index 8cc6336..fee71cf 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -158,7 +158,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
     if( OSX_LION && b_video_deco )
         b_nativeFullscreenMode = config_GetInt( VLCIntf, "macosx-nativefullscreenmode" );
 #endif
-    i_lastShownVolume = -1;
     t_hide_mouse_timer = nil;
     [o_detached_video_window setDelegate: self];
     [self useOptimizedDrawing: YES];
@@ -1329,9 +1328,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
 - (void)applicationWillTerminate:(NSNotification *)notification
 {
-    if( config_GetInt( VLCIntf, "macosx-autosave-volume" ))
-        config_PutInt( VLCIntf->p_libvlc, "volume", i_lastShownVolume );
-
     [self saveFrameUsingName: [self frameAutosaveName]];
 }
 
@@ -1524,7 +1520,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
 
     if( !b_muted )
     {
-        i_lastShownVolume = i_volume;
         [o_volume_sld setIntValue: i_volume];
         [o_fspanel setVolumeLevel: i_volume];
     }
diff --git a/modules/gui/macosx/macosx.m b/modules/gui/macosx/macosx.m
index 59f4615..b180b89 100644
--- a/modules/gui/macosx/macosx.m
+++ b/modules/gui/macosx/macosx.m
@@ -93,8 +93,6 @@ void WindowClose  ( vout_window_t * );
 #define NATIVE_FULLSCREEN_MODE_ON_LION_TEXT N_("Use the native fullscreen mode on OS X Lion")
 #define NATIVE_FULLSCREEN_MODE_ON_LION_LONGTEXT N_("By default, VLC uses the fullscreen mode known from previous Mac OS X releases. It can also use the native fullscreen mode on Mac OS X 10.7 and later.")
 
-#define SAVEVOL_TEXT N_( "Automatically save the volume on exit" )
-
 #define KEEPSIZE_TEXT N_( "Resize interface to the native video size" )
 #define KEEPSIZE_LONGTEXT N_( "You have two choices:\n" \
 " - The interface will resize to the native video size\n" \
@@ -131,7 +129,6 @@ vlc_module_begin ()
     add_bool( "macosx-mediakeys", true, USE_MEDIAKEYS_TEXT, USE_MEDIAKEYS_LONGTEXT, false )
     add_bool( "macosx-interfacestyle", false, INTERFACE_STYLE_TEXT, INTERFACE_STYLE_LONGTEXT, false )
     add_bool( "macosx-nativefullscreenmode", false, NATIVE_FULLSCREEN_MODE_ON_LION_TEXT, NATIVE_FULLSCREEN_MODE_ON_LION_LONGTEXT, false )
-    add_bool( "macosx-autosave-volume", true, SAVEVOL_TEXT, SAVEVOL_TEXT, true )
     add_obsolete_bool( "macosx-stretch" ) /* since 2.0.0 */
     add_obsolete_bool( "macosx-background" ) /* since 2.0.0 */
     add_obsolete_bool( "macosx-eq-keep" ) /* since 2.0.0 */
diff --git a/modules/gui/macosx/simple_prefs.m b/modules/gui/macosx/simple_prefs.m
index f1c7b6b..c30aeb4 100644
--- a/modules/gui/macosx/simple_prefs.m
+++ b/modules/gui/macosx/simple_prefs.m
@@ -520,7 +520,7 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na
      ******************/
     [self setupButton: o_audio_enable_ckb forBoolValue: "audio"];
 
-    if ( config_GetInt( p_intf, "macosx-autosave-volume" ))
+    if ( config_GetInt( p_intf, "volume-save" ))
     {
         [o_audio_autosavevol_yes_bcell setState: NSOnState];
         [o_audio_autosavevol_no_bcell setState: NSOffState];
@@ -900,7 +900,7 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
         config_PutInt( p_intf, "audio", [o_audio_enable_ckb state] );
         if( [o_audio_vol_fld isEnabled] )
             config_PutInt( p_intf, "volume", [o_audio_vol_fld intValue] * AOUT_VOLUME_MAX / 200 );
-        config_PutInt( p_intf, "macosx-autosave-volume", [o_audio_autosavevol_yes_bcell state] );
+        config_PutInt( p_intf, "volume-save", [o_audio_autosavevol_yes_bcell state] );
         config_PutInt( p_intf, "spdif", [o_audio_spdif_ckb state] );
 
         SaveIntList( o_audio_dolby_pop, "force-dolby-surround" );



More information about the vlc-commits mailing list