]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/simple_prefs.m
macosx: some more Sparkle demos
[vlc] / modules / gui / macosx / simple_prefs.m
index e6a8c263a57bd51cfb491f52b144350d9d1ac04d..c8ed3304c2f88c581eebbc9709690f8238e454d0 100644 (file)
@@ -29,6 +29,7 @@
 #import "misc.h"
 #import "intf.h"
 #import "AppleRemote.h"
+#import <Sparkle/Sparkle.h>                                 //for o_intf_last_update_lbl
 
 static NSString* VLCSPrefsToolbarIdentifier = @"Our Simple Preferences Toolbar Identifier";
 static NSString* VLCIntfSettingToolbarIdentifier = @"Intf Settings Item Identifier";
@@ -267,6 +268,8 @@ create_toolbar_item( NSString * o_itemIdent, NSString * o_name, NSString * o_des
        [o_intf_appleremote_ckb setTitle: _NS("Control playback with the Apple Remote")];
        [o_intf_mediakeys_ckb setTitle: _NS("Control playback with media keys")];
     [o_intf_mediakeys_bg_ckb setTitle: _NS("...when VLC is in background")];
+    [o_intf_update_ckb setTitle: _NS("Automatically check for updates")];
+    [o_intf_last_update_lbl setStringValue: @""];
 
     /* Subtitles and OSD */
     [o_osd_encoding_txt setStringValue: _NS("Default Encoding")];
@@ -454,6 +457,10 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na
        [self setupButton: o_intf_mediakeys_ckb forBoolValue: "macosx-mediakeys"];
     [self setupButton: o_intf_mediakeys_bg_ckb forBoolValue: "macosx-mediakeys-background"];
     [o_intf_mediakeys_bg_ckb setEnabled: [o_intf_mediakeys_ckb state]];
+    if( [[SUUpdater sharedUpdater] lastUpdateCheckDate] != NULL )
+        [o_intf_last_update_lbl setStringValue: [NSString stringWithFormat: _NS("Last check on: %@"), [[[SUUpdater sharedUpdater] lastUpdateCheckDate] descriptionWithLocale: [[NSUserDefaults standardUserDefaults] dictionaryRepresentation]]]];
+    else
+        [o_intf_last_update_lbl setStringValue: _NS("No check was performed yet.")];
 
     /******************
      * audio settings *