now with 11% fewer buttons!
authorRichard Fairhurst <richard@systemed.net>
Mon, 1 Nov 2010 13:08:51 +0000 (13:08 +0000)
committerRichard Fairhurst <richard@systemed.net>
Mon, 1 Nov 2010 13:08:51 +0000 (13:08 +0000)
TODO.txt
potlatch2.mxml

index 642d0af..8124fb9 100644 (file)
--- a/TODO.txt
+++ b/TODO.txt
@@ -58,7 +58,6 @@ Potlatch 2: main outstanding issues
 
 == MyGPX ==
 
-* Combine two GPX buttons
 * Have a remove button for removing loaded traces
 * Have a check button for simplifying traces
 * Figure out how to call P2/Simplify for halcyon-based code
index c146015..ff05912 100755 (executable)
             creationComplete="bgButton.popUp = new BackgroundSelector();"/>
         <mx:PopUpButton id="styleButton" label="Map Style" openAlways="true"
             creationComplete="styleButton.popUp = new StyleSelector();"/>
-        <mx:Button label="GPS" click="trackLoader.load();"/>
-        <mx:Button label="MyGpx" click="new MyGpxDialog().init();" />
+               <mx:PopUpMenuButton id="gpsButton" itemClick="if (event.index==0) { trackLoader.load(); } else { new MyGpxDialog().init(); }">
+                       <mx:dataProvider>
+                               <mx:Array>
+                                       <mx:Object label="GPS data" />
+                                       <mx:Object label="My tracks" />
+                               </mx:Array>
+                       </mx:dataProvider>
+               </mx:PopUpMenuButton>
         <mx:Spacer width="100%"/>
         <mx:Button label="Undo" click="MainUndoStack.getGlobalStack().undo();"
             enabled="{MainUndoStack.getGlobalStack().canUndo()}"/>