public
Description: A buildbot GUI for OS X
Homepage: http://code.google.com/p/buildwatch/
Clone URL: git://github.com/dustin/buildwatch.git
Search Repo:
Starting work on config change propagation.

At this point, app notifications are sent when the config changes.
Just need to actually do something about it now.
dustin (author)
Tue Mar 11 19:13:31 -0700 2008
commit  29a3900a7c037f94eee70982d94994edae04347d
tree    e21b2e3722783e38dec09a6ef4cf5caa9a5a9f4e
parent  daf0ee4e2a97dca92305a709c0e3c6585dafbf5e
...
162
163
164
 
 
 
 
 
 
165
166
167
168
169
170
 
 
 
 
 
171
172
173
...
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
0
@@ -162,12 +162,23 @@
0
         NSLog("Starting task connected to %@", loc)
0
         self.tasks[loc]=TwistyThread(BridgeClient(loc, self.queue))
0
 
0
+ def stopTask_(self, notification):
0
+ NSLog("Requested to stop task %@", loc)
0
+
0
+ def stopAll_(self, notification):
0
+ NSLog("Requestd to stop all tasks.")
0
+
0
     def awakeFromNib(self):
0
         self.tasks={}
0
         self.queue=Queue.Queue()
0
 
0
         NSNotificationCenter.defaultCenter().addObserver_selector_name_object_(
0
             self, 'startTask:', 'connect', None)
0
+ NSNotificationCenter.defaultCenter().addObserver_selector_name_object_(
0
+ self, 'stopTask:', 'disconnect', None)
0
+ NSNotificationCenter.defaultCenter().addObserver_selector_name_object_(
0
+ self, 'stopAll:', 'disconnectAll', None)
0
+
0
 
0
         self.timer = NSTimer.scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_(
0
             2, self, 'emptyQueue', None, True)
...
14
15
16
 
 
 
 
 
 
17
18
19
20
21
22
23
24
25
...
14
15
16
17
18
19
20
21
22
23
 
 
 
 
 
24
25
26
0
@@ -14,12 +14,13 @@
0
 - (IBAction) savePrefs:(id)sender {
0
   NSLog(@"Saving preferences.");
0
   [defController save:self];
0
+ [[NSNotificationCenter defaultCenter]
0
+ postNotificationName: @"disconnectAll" object: nil];
0
+ [[NSNotificationCenter defaultCenter]
0
+ postNotificationName: @"connect"
0
+ object: [[NSUserDefaults standardUserDefaults] objectForKey:@"location"]];
0
+
0
   [[self window] orderOut:self];
0
-  if(NSRunAlertPanel(@"Restart Required",
0
-      @"Because I'm lame, you must restart this application for your changes to take effect.",
0
-      @"Quit", @"Don't Quit", nil)) {
0
-    [NSApp stop:self];
0
-  }
0
 }
0
 
0
 @end

Comments

    No one has commented yet.