Revision: 28232
          http://sourceforge.net/p/bibdesk/svn/28232
Author:   hofman
Date:     2023-04-20 14:31:20 +0000 (Thu, 20 Apr 2023)
Log Message:
-----------
don't support synchronous textask

Modified Paths:
--------------
    trunk/bibdesk/BDSKItemPasteboardHelper.m
    trunk/bibdesk/BDSKPreviewer.m
    trunk/bibdesk/BDSKTeXTask.h
    trunk/bibdesk/BDSKTeXTask.m

Modified: trunk/bibdesk/BDSKItemPasteboardHelper.m
===================================================================
--- trunk/bibdesk/BDSKItemPasteboardHelper.m    2023-04-20 14:18:18 UTC (rev 
28231)
+++ trunk/bibdesk/BDSKItemPasteboardHelper.m    2023-04-20 14:31:20 UTC (rev 
28232)
@@ -346,7 +346,7 @@
         default: break;
     }
     
-    BDSKTeXTask *texTask = [[BDSKTeXTask alloc] initWithFileName:@"bibcopy" 
synchronous:NO];
+    BDSKTeXTask *texTask = [[BDSKTeXTask alloc] initWithFileName:@"bibcopy"];
     [texTask setDelegate:self];
     
     if (texTasks == nil)

Modified: trunk/bibdesk/BDSKPreviewer.m
===================================================================
--- trunk/bibdesk/BDSKPreviewer.m       2023-04-20 14:18:18 UTC (rev 28231)
+++ trunk/bibdesk/BDSKPreviewer.m       2023-04-20 14:31:20 UTC (rev 28232)
@@ -96,7 +96,7 @@
         // otherwise a document's previewer might mess up the window position 
of the shared previewer
         [self setShouldCascadeWindows:NO];
         
-        texTask = [[BDSKTeXTask alloc] initWithFileName:@"bibpreview" 
synchronous:NO];
+        texTask = [[BDSKTeXTask alloc] initWithFileName:@"bibpreview"];
         [texTask setDelegate:self];
     }
     return self;

Modified: trunk/bibdesk/BDSKTeXTask.h
===================================================================
--- trunk/bibdesk/BDSKTeXTask.h 2023-04-20 14:18:18 UTC (rev 28231)
+++ trunk/bibdesk/BDSKTeXTask.h 2023-04-20 14:31:20 UTC (rev 28232)
@@ -65,12 +65,10 @@
     NSMutableArray *pendingTasks;
     
     NSUInteger generatedDataMask;
-    
-       BOOL synchronous;
 }
 
 - (id)init;
-- (id)initWithFileName:(NSString *)fileName synchronous:(BOOL)isSync;
+- (id)initWithFileName:(NSString *)fileName;
 
 - (id<BDSKTeXTaskDelegate>)delegate;
 - (void)setDelegate:(id<BDSKTeXTaskDelegate>)newDelegate;

Modified: trunk/bibdesk/BDSKTeXTask.m
===================================================================
--- trunk/bibdesk/BDSKTeXTask.m 2023-04-20 14:18:18 UTC (rev 28231)
+++ trunk/bibdesk/BDSKTeXTask.m 2023-04-20 14:31:20 UTC (rev 28232)
@@ -143,10 +143,10 @@
 }
 
 - (id)init{
-    return [self initWithFileName:@"tmpbib" synchronous:YES];
+    return [self initWithFileName:@"tmpbib"];
 }
 
-- (id)initWithFileName:(NSString *)fileName synchronous:(BOOL)isSync{
+- (id)initWithFileName:(NSString *)fileName{
     self = [super init];
     if (self) {
                
@@ -176,7 +176,6 @@
         currentTask = nil;
         pendingTasks = [[NSMutableArray alloc] init];
         generatedDataMask = BDSKGeneratedNoneMask;
-        synchronous = isSync;
        }
        return self;
 }
@@ -479,7 +478,6 @@
 
 - (void)taskFinished:(NSNotification *)notification{
     NSParameterAssert([notification object] == [currentTask task]);
-    NSParameterAssert(NO == synchronous);
     [[NSNotificationCenter defaultCenter] removeObserver:self 
name:NSTaskDidTerminateNotification object:[notification object]];
     [self invokePendingTasks];
 }
@@ -502,12 +500,7 @@
         @try {
             [[currentTask task] launch];
             
-            if (synchronous) {
-                [[currentTask task] waitUntilExit];
-                success = success && [self invokePendingTasks];
-            } else if (currentTask) {
-                [[NSNotificationCenter defaultCenter] addObserver:self 
selector:@selector(taskFinished:) name:NSTaskDidTerminateNotification 
object:[currentTask task]];
-            }
+            [[NSNotificationCenter defaultCenter] addObserver:self 
selector:@selector(taskFinished:) name:NSTaskDidTerminateNotification 
object:[currentTask task]];
         }
         @catch (id e) {
             BDSKDESTROY(currentTask);

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to