From steve at kalkwarf.com Mon Aug 1 11:08:30 2011 From: steve at kalkwarf.com (Steve Kalkwarf) Date: Mon, 1 Aug 2011 11:08:30 -0400 Subject: [Unison-hackers] [unison-svn] r476 - in trunk/src: . lwt ubase uimacnew09 uimacnew09/uimacnew.xcodeproj In-Reply-To: References: <201107180815.p6I8F26e018715@yaws.seas.upenn.edu> <3DD12B22-CC0B-4A8E-A0B2-A6FB51E7B250@cis.upenn.edu> <3458A536-D462-4663-9D72-26960F9E610C@cis.upenn.edu> <2CF3BBDB-B374-48DC-AABA-A402C92E4457@cis.upenn.edu> Message-ID: > I'm probably not doing what you intended, but just pasting in the code you sent in place of the existing quitIfBatch leads to these warnings during compilation? My fault. I sent the code I wrote in a test harness, and not the integrated changes. > Maybe easier if you just send the whole new MyController.m? Attached. -------------- next part -------------- A non-text attachment was scrubbed... Name: MyController.zip Type: application/zip Size: 12680 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4356 bytes Desc: not available URL: From bcpierce at seas.upenn.edu Wed Aug 3 10:40:09 2011 From: bcpierce at seas.upenn.edu (bcpierce at seas.upenn.edu) Date: Wed, 3 Aug 2011 10:40:09 -0400 Subject: [Unison-hackers] [unison-svn] r479 - in trunk/src: . uimacnew09 Message-ID: <201108031440.p73Ee9AO021036@yaws.seas.upenn.edu> Author: bcpierce Date: 2011-08-03 10:40:08 -0400 (Wed, 03 Aug 2011) New Revision: 479 Modified: trunk/src/Makefile.OCaml trunk/src/RECENTNEWS trunk/src/mkProjectInfo.ml trunk/src/uimacnew09/MyController.h trunk/src/uimacnew09/MyController.m Log: * A small improvement to the uimacnew09 interface from Alan Schmitt and Steve Kalkwarf: when Unison is run with the -batch flag, the interface will now automatically propagate changes and terminate, without waiting for user interaction. * uimacnew09 is now the standard graphical interface on OSX Modified: trunk/src/Makefile.OCaml =================================================================== --- trunk/src/Makefile.OCaml 2011-07-19 14:47:51 UTC (rev 478) +++ trunk/src/Makefile.OCaml 2011-08-03 14:40:08 UTC (rev 479) @@ -77,7 +77,7 @@ ##BCP [3/2007]: Removed temporarily, since the OSX UI is not working well ## at the moment and we don't want to confuse people by building it by default ifeq ($(OSARCH),osx) - UISTYLE=macnew + UISTYLE=macnew09 else ifeq ($(wildcard $(LABLGTK2LIB)),$(LABLGTK2LIB)) UISTYLE=gtk2 Modified: trunk/src/RECENTNEWS =================================================================== --- trunk/src/RECENTNEWS 2011-07-19 14:47:51 UTC (rev 478) +++ trunk/src/RECENTNEWS 2011-08-03 14:40:08 UTC (rev 479) @@ -1,3 +1,12 @@ +CHANGES FROM VERSION 2.44.6 + +* A small improvement to the uimacnew09 interface from Alan Schmitt + and Steve Kalkwarf: when Unison is run with the -batch flag, the + interface will now automatically propagate changes and terminate, + without waiting for user interaction. + +* uimacnew09 is now the standard graphical interface on OSX +------------------------------- CHANGES FROM VERSION 2.44.5 - uimacnew09: file details panel selectable Modified: trunk/src/mkProjectInfo.ml =================================================================== --- trunk/src/mkProjectInfo.ml 2011-07-19 14:47:51 UTC (rev 478) +++ trunk/src/mkProjectInfo.ml 2011-08-03 14:40:08 UTC (rev 479) @@ -59,3 +59,4 @@ + Modified: trunk/src/uimacnew09/MyController.h =================================================================== --- trunk/src/uimacnew09/MyController.h 2011-07-19 14:47:51 UTC (rev 478) +++ trunk/src/uimacnew09/MyController.h 2011-08-03 14:40:08 UTC (rev 479) @@ -78,6 +78,9 @@ id fontChangeTarget; BOOL isBatchSet; + NSTimer *_timer; + NSAlert *_timeoutAlert; + NSUInteger _secondsRemaining; } - (id)init; Modified: trunk/src/uimacnew09/MyController.m =================================================================== --- trunk/src/uimacnew09/MyController.m 2011-07-19 14:47:51 UTC (rev 478) +++ trunk/src/uimacnew09/MyController.m 2011-08-03 14:40:08 UTC (rev 479) @@ -622,12 +622,45 @@ [self updateTableViewWithReset:FALSE]; } +- (void)alertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo +{ + [_timer invalidate]; + + switch (returnCode) { + case NSAlertAlternateReturn: + return; + break; + + default: + [[NSApplication sharedApplication] performSelector: @selector(terminate:) withObject: nil afterDelay: 0.0]; + break; + } +} + +- (void)updateCountdown +{ + if (_secondsRemaining == 0) { + [_timer invalidate]; + [[_timeoutAlert window] orderOut: nil]; + [self alertDidEnd: _timeoutAlert returnCode: NSAlertDefaultReturn contextInfo: nil]; + } else { + [_timeoutAlert setMessageText: [NSString stringWithFormat: @"Unison will quit in %lu seconds", _secondsRemaining]]; + _secondsRemaining--; + } +} + + - (void)quitIfBatch:(id)ignore { if (isBatchSet) { NSLog(@"Automatically quitting because of -batch"); - [NSApp performSelector:@selector(terminate:) withObject:nil afterDelay:0.0]; - return Val_unit; + _timeoutAlert = [NSAlert alertWithMessageText: @"" defaultButton: @"Quit" alternateButton: @"Cancel" otherButton: nil informativeTextWithFormat: @""]; + + _secondsRemaining = 10; + + _timer = [NSTimer scheduledTimerWithTimeInterval: 1 target: self selector: @selector(updateCountdown) userInfo: nil repeats: YES]; + + [_timeoutAlert beginSheetModalForWindow: mainWindow modalDelegate: self didEndSelector: @selector(alertDidEnd:returnCode:contextInfo:) contextInfo: NULL]; } } From bcpierce at cis.upenn.edu Wed Aug 3 10:40:21 2011 From: bcpierce at cis.upenn.edu (Benjamin C. Pierce) Date: Wed, 3 Aug 2011 10:40:21 -0400 Subject: [Unison-hackers] [unison-svn] r476 - in trunk/src: . lwt ubase uimacnew09 uimacnew09/uimacnew.xcodeproj In-Reply-To: References: <201107180815.p6I8F26e018715@yaws.seas.upenn.edu> <3DD12B22-CC0B-4A8E-A0B2-A6FB51E7B250@cis.upenn.edu> <3458A536-D462-4663-9D72-26960F9E610C@cis.upenn.edu> <2CF3BBDB-B374-48DC-AABA-A402C92E4457@cis.upenn.edu> Message-ID: Works beautifully -- many thanks! - Benjamin On Aug 1, 2011, at 11:08 AM, Steve Kalkwarf wrote: >> I'm probably not doing what you intended, but just pasting in the code you sent in place of the existing quitIfBatch leads to these warnings during compilation? > > My fault. I sent the code I wrote in a test harness, and not the integrated changes. > >> Maybe easier if you just send the whole new MyController.m? > > > Attached. > > _______________________________________________ > Unison-hackers mailing list > Unison-hackers at lists.seas.upenn.edu > http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers From utebachmeier at gmail.com Thu Aug 18 17:08:02 2011 From: utebachmeier at gmail.com (Sabrina Friedman) Date: Fri, 19 Aug 2011 00:08:02 +0300 Subject: [Unison-hackers] [unison-svn] r476 - in trunk/src: . lwt ubase uimacnew09 uimacnew09/uimacnew.xcodeprojfrom Sabrina Message-ID: > I'm probably not doing what you intended, but just pasting in the code you sent in place of the existing quitIfBatch leads to these warnings during compilation? My fault. I sent the code I wrote in a test harness, and not the integrated changes. > Maybe easier if you just send the whole new MyController.m? Attached. Sabrina Friedman Billige Fl?ge Marketing GmbH Emanuelstr. 3, 10317 Berlin Deutschland Telefon: +49 (33) 5310967 Email: utebachmeier at gmail.com Site: http://flug.airego.de - Billige Fl?ge vergleichen