<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -30,6 +30,24 @@
 #include &quot;widget/wnumberpos.h&quot;
 #include &quot;widget/wnumberbpm.h&quot;
 #include &quot;engine/enginebuffer.h&quot;
+#include &lt;algorithm&gt;
+
+template &lt;typename T&gt;
+struct setRemain : public std::unary_function&lt;T&amp;, void&gt;
+{
+	setRemain(bool set) :
+	m_set(set)
+	{
+	}
+	
+	void operator() (T&amp; x)
+	{
+		x.second-&gt;setRemain(m_set);
+	}
+
+	bool m_set;
+};
+
 
 DlgPrefControls::DlgPrefControls(QWidget * parent, MixxxView * pView, MixxxApp * mixxx, ConfigObject&lt;ConfigValue&gt; * pConfig) :  QWidget(parent), Ui::DlgPrefControlsDlg()
 {
@@ -61,19 +79,15 @@ DlgPrefControls::DlgPrefControls(QWidget * parent, MixxxView * pView, MixxxApp *
         m_pConfig-&gt;set(ConfigKey(&quot;[Controls]&quot;,&quot;PositionDisplay&quot;),ConfigValue(0));
     if (m_pConfig-&gt;getValueString(ConfigKey(&quot;[Controls]&quot;,&quot;PositionDisplay&quot;)).toInt() == 1)
     {
-        if (pView-&gt;m_pNumberPosCh1)
-            pView-&gt;m_pNumberPosCh1-&gt;setRemain(true);
-        if (pView-&gt;m_pNumberPosCh2)
-            pView-&gt;m_pNumberPosCh2-&gt;setRemain(true);
+    	std::for_each(pView-&gt;m_deckPositions.begin(), pView-&gt;m_deckPositions.end(), setRemain&lt;std::map&lt;Deck, WNumberPos*&gt;::value_type&gt;(true));
+    	 
         ComboBoxPosition-&gt;setCurrentIndex(1);
     }
     else
     {
-        if (pView-&gt;m_pNumberPosCh1)
-            pView-&gt;m_pNumberPosCh1-&gt;setRemain(false);
-        if (pView-&gt;m_pNumberPosCh2)
-            pView-&gt;m_pNumberPosCh2-&gt;setRemain(false);
-        ComboBoxPosition-&gt;setCurrentIndex(0);
+    	std::for_each(pView-&gt;m_deckPositions.begin(), pView-&gt;m_deckPositions.end(), setRemain&lt;std::map&lt;Deck, WNumberPos*&gt;::value_type&gt;(false));
+ 		
+		ComboBoxPosition-&gt;setCurrentIndex(0);
     }
     connect(ComboBoxPosition,   SIGNAL(activated(int)), this, SLOT(slotSetPositionDisplay(int)));
 
@@ -413,19 +427,9 @@ void DlgPrefControls::slotSetPositionDisplay(int)
     m_pConfig-&gt;set(ConfigKey(&quot;[Controls]&quot;,&quot;PositionDisplay&quot;), ConfigValue(ComboBoxPosition-&gt;currentIndex()));
 
     if (ComboBoxPosition-&gt;currentIndex()==1)
-    {
-        if (m_pView-&gt;m_pNumberPosCh1)
-            m_pView-&gt;m_pNumberPosCh1-&gt;setRemain(true);
-        if (m_pView-&gt;m_pNumberPosCh2)
-            m_pView-&gt;m_pNumberPosCh2-&gt;setRemain(true);
-    }
+    	std::for_each(m_pView-&gt;m_deckPositions.begin(), m_pView-&gt;m_deckPositions.end(), setRemain&lt;std::map&lt;Deck, WNumberPos*&gt;::value_type&gt;(true));
     else
-    {
-        if (m_pView-&gt;m_pNumberPosCh1)
-            m_pView-&gt;m_pNumberPosCh1-&gt;setRemain(false);
-        if (m_pView-&gt;m_pNumberPosCh2)
-            m_pView-&gt;m_pNumberPosCh2-&gt;setRemain(false);
-    }
+    	std::for_each(m_pView-&gt;m_deckPositions.begin(), m_pView-&gt;m_deckPositions.end(), setRemain&lt;std::map&lt;Deck, WNumberPos*&gt;::value_type&gt;(true));
 }
 
 void DlgPrefControls::slotSetRateTempLeft(double v)</diff>
      <filename>mixxx/src/dlgprefcontrols.cpp</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>868924571ebe686a848e3a134150aae6a2a5ab5d</id>
    </parent>
  </parents>
  <author>
    <name>LCID Fire</name>
    <email>lcid-fire@gmx.net</email>
  </author>
  <url>http://github.com/LCID-Fire/mixxx/commit/553309964721927b9359a2e519dac4648466b157</url>
  <id>553309964721927b9359a2e519dac4648466b157</id>
  <committed-date>2009-07-02T11:36:13-07:00</committed-date>
  <authored-date>2009-07-02T11:36:13-07:00</authored-date>
  <message>Make DlgPrefControls work with n decks</message>
  <tree>4c1f785a4b4a8f032df2b73df22b6f0f3db99a43</tree>
  <committer>
    <name>LCID Fire</name>
    <email>lcid-fire@gmx.net</email>
  </committer>
</commit>
