<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>05_OfflineCampfire/KampfireKlient.air</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -14,7 +14,7 @@
 	width=&quot;100%&quot;
 	height=&quot;100%&quot;
 	applicationComplete=&quot;setup()&quot;
-&gt;
+ viewSourceURL=&quot;srcview/index.html&quot;&gt;
 
 &lt;mx:Script&gt;
 	&lt;![CDATA[
@@ -41,13 +41,32 @@
 		 */
 		private function setup():void {
 			readPreferences();
-			configureMenus();
 			configureListeners();
+			configureMenus();
 			ping();
 			accountField.setFocus();
 		}
 		
 		/**
+		 * Listen for two events:
+		 * &lt;li /&gt;When a network change event occurs, call checkNetwork
+		 * &lt;li /&gt;When window recieves focus, call windowActivate on the unreadMessageManager
+		 */ 
+		private function configureListeners():void {
+			NativeApplication.nativeApplication.addEventListener(Event.NETWORK_CHANGE, checkNetwork);
+			NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, unreadMessageManager.windowActivate);
+		}
+		
+		private function accountSelected():void {
+			account = accountField.text;
+			currentState='accountSelected';
+		}
+		
+//========================================================================
+//  Menu
+//========================================================================
+
+		/**
 		 * Replace system menus with an 'Edit' Menu
 		 * that triggers the settings view 
 		 */
@@ -71,16 +90,45 @@
 
 		}
 		
-		/**
-		 * Listen for two events:
-		 * &lt;li /&gt;When a network change event occurs, call checkNetwork
-		 * &lt;li /&gt;When window recieves focus, call windowActivate on the unreadMessageManager
-		 */ 
-		private function configureListeners():void {
-			NativeApplication.nativeApplication.addEventListener(Event.NETWORK_CHANGE, checkNetwork);
-			NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, unreadMessageManager.windowActivate);
+
+//========================================================================
+//  Preferences
+//========================================================================
+		
+		private function settingsMenuSelected(e:Event):void {
+			showPreferencesEdtor();
+		}
+		
+		private function showPreferencesEdtor():void {
+			if (!showingPreferences) {
+				if (preferencesView == null) {
+					preferencesView = PopUpManager.createPopUp(this, SettingsView, true) as SettingsView;
+					preferencesView.addEventListener('close', hidePreferencesEditor);
+					PopUpManager.centerPopUp(preferencesView);
+				} else {
+					PopUpManager.addPopUp(preferencesView, this, true);
+				}
+				showingPreferences = true;
+			}
 		}
 		
+		private function hidePreferencesEditor(e:Event=null):void {
+			PopUpManager.removePopUp(preferencesView);
+			readPreferences();
+			showingPreferences = false;
+		}
+		
+		private function readPreferences():void {
+			var so:SharedObject = SharedObject.getLocal('air-campfire-prefs');
+			if (so.data['restoreOnMessage'] != null || so.data['growlOnMessage'] != null) {
+				restoreOnMessage = so.data['restoreOnMessage'] as Boolean;
+				growlOnMessage = so.data['growlOnMessage'] as Boolean;
+			}
+		}
+//========================================================================
+//  Messages
+//========================================================================
+
 		/**
 		 * Starts periodically checking for new messages
 		 */
@@ -100,11 +148,6 @@
 			}
 		}
 		
-		private function accountSelected():void {
-			account = accountField.text;
-			currentState='accountSelected';
-		}
-		
 		/**
 		 * Checks all messages in the table of messages in the HTML control
 		 * If we haven't seen the message ids listed there before, we have new messages
@@ -172,40 +215,6 @@
 			}
 		}
 		
-//========================================================================
-//  Preferences
-//========================================================================
-		
-		private function settingsMenuSelected(e:Event):void {
-			showPreferencesEdtor();
-		}
-		
-		private function showPreferencesEdtor():void {
-			if (!showingPreferences) {
-				if (preferencesView == null) {
-					preferencesView = PopUpManager.createPopUp(this, SettingsView, true) as SettingsView;
-					preferencesView.addEventListener('close', hidePreferencesEditor);
-					PopUpManager.centerPopUp(preferencesView);
-				} else {
-					PopUpManager.addPopUp(preferencesView, this, true);
-				}
-				showingPreferences = true;
-			}
-		}
-		
-		private function hidePreferencesEditor(e:Event=null):void {
-			PopUpManager.removePopUp(preferencesView);
-			readPreferences();
-			showingPreferences = false;
-		}
-		
-		private function readPreferences():void {
-			var so:SharedObject = SharedObject.getLocal('air-campfire-prefs');
-			if (so.data['restoreOnMessage'] != null || so.data['growlOnMessage'] != null) {
-				restoreOnMessage = so.data['restoreOnMessage'] as Boolean;
-				growlOnMessage = so.data['growlOnMessage'] as Boolean;
-			}
-		}
 		
 //========================================================================
 //  Network</diff>
      <filename>05_OfflineCampfire/src/KampfireKlient.mxml</filename>
    </modified>
    <modified>
      <diff>@@ -57,6 +57,7 @@
 	&lt;mx:Fade id=&quot;revealFade&quot; targets=&quot;{[this, messageArea, messageText, personText]}&quot; alphaFrom=&quot;0&quot; alphaTo=&quot;.5&quot; effectEnd=&quot;revealComplete()&quot;/&gt;
 	&lt;mx:Fade id=&quot;closeFade&quot; targets=&quot;{[this, messageArea, messageText, personText]}&quot; alphaFrom=&quot;{alpha}&quot; alphaTo=&quot;0.0&quot; effectEnd=&quot;closeComplete()&quot;/&gt;
 	
+	&lt;!-- FIXME: move all style attributes out to css --&gt;
 	&lt;mx:VBox id=&quot;messageArea&quot; cornerRadius=&quot;5&quot; borderThickness=&quot;1&quot; borderStyle=&quot;solid&quot; backgroundColor=&quot;0x000000&quot; width=&quot;100%&quot; height=&quot;100%&quot; paddingBottom=&quot;5&quot; paddingLeft=&quot;5&quot; paddingRight=&quot;5&quot; paddingTop=&quot;5&quot;&gt;
 		&lt;mx:Text id=&quot;personText&quot; text=&quot;{person} Said:&quot; fontSize=&quot;18&quot; fontWeight=&quot;bold&quot; color=&quot;0xFFFFFF&quot; /&gt;
 		&lt;mx:Text</diff>
      <filename>05_OfflineCampfire/src/MessageNotification.mxml</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>05_OfflineCampfire/Kumbaya.air</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>da898742f8d5573969a521c67de1bf13babc29c7</id>
    </parent>
  </parents>
  <author>
    <name>Tony Hillerson</name>
    <email>tony.hillerson@effectiveui.com</email>
  </author>
  <url>http://github.com/danielwanja/railsconf2008/commit/687bbed7cb1f04b35a37ed28d71b388f503e4500</url>
  <id>687bbed7cb1f04b35a37ed28d71b388f503e4500</id>
  <committed-date>2008-05-29T11:11:03-07:00</committed-date>
  <authored-date>2008-05-29T11:11:03-07:00</authored-date>
  <message>cleaned up campfire client code, produced air file</message>
  <tree>609d6ad8e7ede46b64423432e37e86ad53c40119</tree>
  <committer>
    <name>Tony Hillerson</name>
    <email>tony.hillerson@effectiveui.com</email>
  </committer>
</commit>
