From 7e7e0607d0ab5a5c28ae593adc4a3235ee4b429e Mon Sep 17 00:00:00 2001 From: Johan Paulsson Date: Sun, 1 Dec 2013 23:25:55 -0800 Subject: osx gui: Added preference tab for Sparkle updater. --- tikzit/src/osx/UpdatePreferenceController.m | 49 +++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 tikzit/src/osx/UpdatePreferenceController.m (limited to 'tikzit/src/osx/UpdatePreferenceController.m') diff --git a/tikzit/src/osx/UpdatePreferenceController.m b/tikzit/src/osx/UpdatePreferenceController.m new file mode 100644 index 0000000..2ff270f --- /dev/null +++ b/tikzit/src/osx/UpdatePreferenceController.m @@ -0,0 +1,49 @@ +// +// UpdatePreferenceController.h +// TikZiT +// +// Copyright (c) 2013 Aleks Kissinger. All rights reserved. +// +// +// This file is part of TikZiT. +// +// TikZiT is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// TikZiT is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with TikZiT. If not, see . +// + +#import "UpdatePreferenceController.h" + +@interface UpdatePreferenceController () + +@end + +@implementation UpdatePreferenceController + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + sharedUpdater = [SUUpdater sharedUpdater]; + } + return self; +} + +- (IBAction)checkForUpdates:(id)sender{ + [sharedUpdater checkForUpdates:sender]; +} + +- (NSDate*)getLastUpdate{ + return [sharedUpdater lastUpdateCheckDate]; +} + +@end -- cgit v1.2.3