The following commit has been merged in the master branch:
commit 733244a49f9830dd22a151f4f36099ad8fece1b4
Author: Andrei Zavada <[email protected]>
Date:   Sat Dec 1 02:41:47 2012 +0200

    fix main window MC spinbutton adjustment snap and inc

diff --git a/data/main.glade b/data/main.glade
index d00cbe4..70e34c6 100644
--- a/data/main.glade
+++ b/data/main.glade
@@ -990,6 +990,7 @@ rm */*/*/.*.{psd,mc}</property>
                                         <property 
name="secondary_icon_activatable">False</property>
                                         <property 
name="adjustment">jMsmtProfileParamsMCF0</property>
                                         <property name="digits">2</property>
+                                        <property 
name="snap_to_ticks">True</property>
                                         <property 
name="numeric">True</property>
                                         <property 
name="update_policy">if-valid</property>
                                       </object>
@@ -1077,6 +1078,7 @@ rm */*/*/.*.{psd,mc}</property>
                                         <property 
name="secondary_icon_activatable">False</property>
                                         <property 
name="adjustment">jMsmtProfileParamsSWUF0</property>
                                         <property name="digits">2</property>
+                                        <property 
name="snap_to_ticks">True</property>
                                         <property 
name="numeric">True</property>
                                         <property 
name="update_policy">if-valid</property>
                                       </object>
@@ -1509,18 +1511,6 @@ rm */*/*/.*.{psd,mc}</property>
                                   <placeholder/>
                                 </child>
                                 <child>
-                                  <placeholder/>
-                                </child>
-                                <child>
-                                  <placeholder/>
-                                </child>
-                                <child>
-                                  <placeholder/>
-                                </child>
-                                <child>
-                                  <placeholder/>
-                                </child>
-                                <child>
                                   <object class="GtkFrame" 
id="fFreqConventionalRanges">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
@@ -6786,6 +6776,12 @@ dragging individual signals with 
&lt;i&gt;Alt&lt;/i&gt;.&lt;/small&gt;</property
                                     <child>
                                       <placeholder/>
                                     </child>
+                                    <child>
+                                      <placeholder/>
+                                    </child>
+                                    <child>
+                                      <placeholder/>
+                                    </child>
                                   </object>
                                 </child>
                                 <child>
diff --git a/src/ui/mw/mw_cb.cc b/src/ui/mw/mw_cb.cc
index b5494b7..13e63ed 100644
--- a/src/ui/mw/mw_cb.cc
+++ b/src/ui/mw/mw_cb.cc
@@ -115,11 +115,17 @@ eMsmtProfileType_changed_cb( GtkComboBox* b, gpointer 
userdata)
                gtk_widget_set_visible( (GtkWidget*)ED.cMsmtProfileParamsSWU, 
TRUE);
                gtk_widget_set_visible( (GtkWidget*)ED.cMsmtProfileParamsMC, 
FALSE);
                ED.display_profile_type = metrics::TType::swu;
+               // set adjustment inc and upper like it's done for MC, below
            break;
        case 2:
                gtk_widget_set_visible( (GtkWidget*)ED.cMsmtProfileParamsPSD, 
FALSE);
                gtk_widget_set_visible( (GtkWidget*)ED.cMsmtProfileParamsSWU, 
FALSE);
                gtk_widget_set_visible( (GtkWidget*)ED.cMsmtProfileParamsMC, 
TRUE);
+               gtk_adjustment_set_step_increment( ED.jMsmtProfileParamsMCF0,
+                                                  ED.ED->mc_params.freq_inc); 
// matches the default in metrics/mc.cc
+               gtk_adjustment_set_upper( ED.jMsmtProfileParamsMCF0,
+                                         
ED.ED->mc_params.compute_n_bins(ED.pagesize()) *
+                                         ED.ED->mc_params.freq_inc);
                ED.display_profile_type = metrics::TType::mc;
            break;
        }

-- 
Sleep experiment manager

_______________________________________________
debian-med-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to