[Unison-hackers] [unison-svn] r476 - in trunk/src: . lwt ubase uimacnew09 uimacnew09/uimacnew.xcodeproj
schmitta at seas.upenn.edu
schmitta at seas.upenn.edu
Mon Jul 18 04:15:02 EDT 2011
Author: schmitta
Date: 2011-07-18 04:15:01 -0400 (Mon, 18 Jul 2011)
New Revision: 476
Modified:
trunk/src/RECENTNEWS
trunk/src/lwt/depend
trunk/src/mkProjectInfo.ml
trunk/src/ubase/depend
trunk/src/uimacbridgenew.ml
trunk/src/uimacnew09/MyController.m
trunk/src/uimacnew09/uimacnew.xcodeproj/project.pbxproj
Log:
- fixed a bug when calling the Unison macnew09 GUI from the command line with a profile specified
- now possible to use the "-batch" option when calling the macnew09 GUI on the command line
Modified: trunk/src/RECENTNEWS
===================================================================
--- trunk/src/RECENTNEWS 2011-07-17 13:24:13 UTC (rev 475)
+++ trunk/src/RECENTNEWS 2011-07-18 08:15:01 UTC (rev 476)
@@ -1,3 +1,9 @@
+CHANGES FROM VERSION 2.44.4
+
+- fixed a bug when calling the Unison macnew09 GUI from the command line with a profile specified
+- now possible to use the "-batch" option when calling the macnew09 GUI on the command line
+
+-------------------------------
CHANGES FROM VERSION 2.44.2
* Some spelling corrections in documentation and comments from Stephane Glondu
Modified: trunk/src/lwt/depend
===================================================================
--- trunk/src/lwt/depend 2011-07-17 13:24:13 UTC (rev 475)
+++ trunk/src/lwt/depend 2011-07-18 08:15:01 UTC (rev 476)
@@ -1,12 +1,12 @@
-lwt.cmo: lwt.cmi
-lwt.cmx: lwt.cmi
-lwt_unix.cmo: lwt_unix.cmi
-lwt_unix.cmx: lwt_unix.cmi
-lwt_util.cmo: lwt.cmi lwt_util.cmi
-lwt_util.cmx: lwt.cmx lwt_util.cmi
-pqueue.cmo: pqueue.cmi
-pqueue.cmx: pqueue.cmi
-lwt.cmi:
-lwt_unix.cmi: lwt.cmi
-lwt_util.cmi: lwt.cmi
-pqueue.cmi:
+lwt.cmo: lwt.cmi
+lwt.cmx: lwt.cmi
+lwt_unix.cmo: lwt_unix.cmi
+lwt_unix.cmx: lwt_unix.cmi
+lwt_util.cmo: lwt.cmi lwt_util.cmi
+lwt_util.cmx: lwt.cmx lwt_util.cmi
+pqueue.cmo: pqueue.cmi
+pqueue.cmx: pqueue.cmi
+lwt.cmi:
+lwt_unix.cmi: lwt.cmi
+lwt_util.cmi: lwt.cmi
+pqueue.cmi:
Modified: trunk/src/mkProjectInfo.ml
===================================================================
--- trunk/src/mkProjectInfo.ml 2011-07-17 13:24:13 UTC (rev 475)
+++ trunk/src/mkProjectInfo.ml 2011-07-18 08:15:01 UTC (rev 476)
@@ -57,3 +57,4 @@
+
Modified: trunk/src/ubase/depend
===================================================================
--- trunk/src/ubase/depend 2011-07-17 13:24:13 UTC (rev 475)
+++ trunk/src/ubase/depend 2011-07-18 08:15:01 UTC (rev 476)
@@ -1,27 +1,27 @@
-myMap.cmo: myMap.cmi
-myMap.cmx: myMap.cmi
-prefs.cmo: util.cmi uarg.cmi safelist.cmi prefs.cmi
-prefs.cmx: util.cmx uarg.cmx safelist.cmx prefs.cmi
-proplist.cmo: util.cmi proplist.cmi
-proplist.cmx: util.cmx proplist.cmi
-rx.cmo: rx.cmi
-rx.cmx: rx.cmi
-safelist.cmo: safelist.cmi
-safelist.cmx: safelist.cmi
-trace.cmo: util.cmi safelist.cmi prefs.cmi trace.cmi
-trace.cmx: util.cmx safelist.cmx prefs.cmx trace.cmi
-uarg.cmo: util.cmi safelist.cmi uarg.cmi
-uarg.cmx: util.cmx safelist.cmx uarg.cmi
-uprintf.cmo: uprintf.cmi
-uprintf.cmx: uprintf.cmi
-util.cmo: uprintf.cmi safelist.cmi util.cmi
-util.cmx: uprintf.cmx safelist.cmx util.cmi
-myMap.cmi:
-prefs.cmi: util.cmi
-proplist.cmi:
-rx.cmi:
-safelist.cmi:
-trace.cmi: prefs.cmi
-uarg.cmi:
-uprintf.cmi:
-util.cmi:
+myMap.cmo: myMap.cmi
+myMap.cmx: myMap.cmi
+prefs.cmo: util.cmi uarg.cmi safelist.cmi prefs.cmi
+prefs.cmx: util.cmx uarg.cmx safelist.cmx prefs.cmi
+proplist.cmo: util.cmi proplist.cmi
+proplist.cmx: util.cmx proplist.cmi
+rx.cmo: rx.cmi
+rx.cmx: rx.cmi
+safelist.cmo: safelist.cmi
+safelist.cmx: safelist.cmi
+trace.cmo: util.cmi safelist.cmi prefs.cmi trace.cmi
+trace.cmx: util.cmx safelist.cmx prefs.cmx trace.cmi
+uarg.cmo: util.cmi safelist.cmi uarg.cmi
+uarg.cmx: util.cmx safelist.cmx uarg.cmi
+uprintf.cmo: uprintf.cmi
+uprintf.cmx: uprintf.cmi
+util.cmo: uprintf.cmi safelist.cmi util.cmi
+util.cmx: uprintf.cmx safelist.cmx util.cmi
+myMap.cmi:
+prefs.cmi: util.cmi
+proplist.cmi:
+rx.cmi:
+safelist.cmi:
+trace.cmi: prefs.cmi
+uarg.cmi:
+uprintf.cmi:
+util.cmi:
Modified: trunk/src/uimacbridgenew.ml
===================================================================
--- trunk/src/uimacbridgenew.ml 2011-07-17 13:24:13 UTC (rev 475)
+++ trunk/src/uimacbridgenew.ml 2011-07-18 08:15:01 UTC (rev 476)
@@ -196,7 +196,13 @@
;;
Callback.register "areRootsSet" areRootsSet;;
+(* Utility function to tell the UI whether -batch is set *)
+let isBatchSet () =
+ Prefs.read Globals.batch
+;;
+Callback.register "isBatchSet" isBatchSet;;
+
(* The first time we load preferences, we also read the command line
arguments; if we re-load prefs (because the user selected a new profile)
we ignore the command line *)
Modified: trunk/src/uimacnew09/MyController.m
===================================================================
--- trunk/src/uimacnew09/MyController.m 2011-07-17 13:24:13 UTC (rev 475)
+++ trunk/src/uimacnew09/MyController.m 2011-07-18 08:15:01 UTC (rev 476)
@@ -109,15 +109,15 @@
/* Command-line processing */
OCamlValue *clprofile = (id)ocamlCall("@", "unisonInit0");
- BOOL areRootsSet = (long)ocamlCall("i@", "areRootsSet") ? YES : NO;
+
+ BOOL areRootsSet = (long)ocamlCall("i", "areRootsSet") ? YES : NO;
if (areRootsSet) {
NSLog(@"Roots are on the command line");
}
else {
NSLog(@"Roots are not set on the command line");
}
-
-
+
/* Add toolbar */
toolbar = [[[UnisonToolbar alloc]
initWithIdentifier: @"unisonToolbar" :self :tableView] autorelease];
@@ -166,12 +166,12 @@
[mainWindow display];
[mainWindow makeKeyAndOrderFront:nil];
-
+
/* unless user has clicked Don't ask me again, ask about cltool */
- if ( ([[NSUserDefaults standardUserDefaults] boolForKey:@"CheckCltool"]) &&
- (![[NSFileManager defaultManager]
- fileExistsAtPath:@"/usr/bin/unison"]) )
- [self raiseCltoolWindow:nil];
+ if ( ([[NSUserDefaults standardUserDefaults] boolForKey:@"CheckCltool"]) &&
+ (![[NSFileManager defaultManager]
+ fileExistsAtPath:@"/usr/bin/unison"]) )
+ [self raiseCltoolWindow:nil];
}
- (IBAction) checkOpenProfileChanged:(id)sender {
@@ -539,7 +539,25 @@
ocamlCall("x", "unisonInit2");
}
+- (void)doSync
+{
+ [tableView setEditable:NO];
+ syncable = NO;
+ duringSync = YES;
+
+ [self updateToolbar];
+
+ // This will run in another thread spawned in OCaml and will return immediately
+ // We'll get a call back to syncComplete() when it is complete
+ ocamlCall("x", "unisonSynchronize");
+}
+- (IBAction)syncButton:(id)sender
+{
+ [self doSync];
+}
+
+
- (void)afterUpdate:(id)retainedReconItems
{
// NSLog(@"In afterUpdate:...");
@@ -566,6 +584,17 @@
[self updateTableViewWithReset:([reconItems count] > 0)];
[self updateToolbar];
+ BOOL isBatchSet = (long)ocamlCall("i", "isBatchSet") ? YES : NO;
+ if (isBatchSet) {
+ NSLog(@"batch set on the command line");
+ }
+ else {
+ NSLog(@"batch not set on the command line");
+ }
+
+ if (isBatchSet) {
+ [self doSync];
+ }
}
CAMLprim value unisonInit2Complete(value v)
@@ -576,19 +605,6 @@
return Val_unit;
}
-- (IBAction)syncButton:(id)sender
-{
- [tableView setEditable:NO];
- syncable = NO;
- duringSync = YES;
-
- [self updateToolbar];
-
- // This will run in another thread spawned in OCaml and will return immediately
- // We'll get a call back to syncComplete() when it is complete
- ocamlCall("x", "unisonSynchronize");
-}
-
- (void)afterSync:(id)ignore
{
[notificationController syncFinishedFor:[self profile]];
Modified: trunk/src/uimacnew09/uimacnew.xcodeproj/project.pbxproj
===================================================================
--- trunk/src/uimacnew09/uimacnew.xcodeproj/project.pbxproj 2011-07-17 13:24:13 UTC (rev 475)
+++ trunk/src/uimacnew09/uimacnew.xcodeproj/project.pbxproj 2011-07-18 08:15:01 UTC (rev 476)
@@ -400,7 +400,14 @@
isa = PBXProject;
buildConfigurationList = 2A3C3F2C0992245300E404E9 /* Build configuration list for PBXProject "uimacnew" */;
compatibilityVersion = "Xcode 3.1";
+ developmentRegion = English;
hasScannedForEncodings = 1;
+ knownRegions = (
+ English,
+ Japanese,
+ French,
+ German,
+ );
mainGroup = 29B97314FDCFA39411CA2CEA /* uimac */;
projectDirPath = "";
projectRoot = "";
More information about the Unison-hackers
mailing list