[med-svn] [SCM] aghermann branch, master, updated. 4f7a3b774136ffffbaf9b05d90bd568347bc5461

andrei zavada johnhommer at gmail.com
Fri Nov 16 00:50:25 UTC 2012


The following commit has been merged in the master branch:
commit bac71a7dcc01e445497da8aa130ee0ca3384af58
Author: andrei zavada <johnhommer at gmail.com>
Date:   Sun Oct 21 14:14:23 2012 +0300

    WIP

diff --git a/data/main.glade b/data/main.glade
index 9745216..47b45d2 100644
--- a/data/main.glade
+++ b/data/main.glade
@@ -685,6 +685,14 @@ rm */*/*/.*.{psd,mc}</property>
                                               </object>
                                             </child>
                                             <child>
+                                              <object class="GtkMenuItem" id="iExpGloballySetFilters">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="label" translatable="yes">Set _filter...</property>
+                                                <property name="use_underline">True</property>
+                                              </object>
+                                            </child>
+                                            <child>
                                               <object class="GtkMenuItem" id="menuitem5">
                                                 <property name="visible">True</property>
                                                 <property name="can_focus">False</property>
@@ -710,44 +718,6 @@ rm */*/*/.*.{psd,mc}</property>
                                                         <property name="use_underline">True</property>
                                                       </object>
                                                     </child>
-                                                    <child>
-                                                      <object class="GtkMenuItem" id="iMontageApplyNotchFilter">
-                                                        <property name="visible">True</property>
-                                                        <property name="can_focus">False</property>
-                                                        <property name="label" translatable="yes">Global notch _filter</property>
-                                                        <property name="use_underline">True</property>
-                                                        <child type="submenu">
-                                                          <object class="GtkMenu" id="menu3">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <child>
-                                                            <object class="GtkMenuItem" id="iMontageNotchNone">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="label" translatable="yes">_None</property>
-                                                            <property name="use_underline">True</property>
-                                                            </object>
-                                                            </child>
-                                                            <child>
-                                                            <object class="GtkMenuItem" id="iMontageNotch50Hz">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="label" translatable="yes">At _50 Hz</property>
-                                                            <property name="use_underline">True</property>
-                                                            </object>
-                                                            </child>
-                                                            <child>
-                                                            <object class="GtkMenuItem" id="iMontageNotch60Hz">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="label" translatable="yes">At _60 Hz</property>
-                                                            <property name="use_underline">True</property>
-                                                            </object>
-                                                            </child>
-                                                          </object>
-                                                        </child>
-                                                      </object>
-                                                    </child>
                                                   </object>
                                                 </child>
                                               </object>
diff --git a/src/ui/ed-construct.cc b/src/ui/ed-construct.cc
index 80f8f8b..c578c75 100644
--- a/src/ui/ed-construct.cc
+++ b/src/ui/ed-construct.cc
@@ -89,13 +89,10 @@ SExpDesignUIWidgets ()
 	     !AGH_GBGETOBJ (GtkMenuItem,	iExpAnnotations) ||
 	     !AGH_GBGETOBJ (GtkMenuItem,	iExpBasicSADetectUltradianCycles) ||
 	     !AGH_GBGETOBJ (GtkMenuItem,	iExpGloballyDetectArtifacts) ||
+	     !AGH_GBGETOBJ (GtkMenuItem,	iExpGloballySetFilters) ||
+	     !AGH_GBGETOBJ (GtkMenuItem,	iMontageSetDefaults) ||
 	     !AGH_GBGETOBJ (GtkMenuItem,	iExpClose) ||
 	     !AGH_GBGETOBJ (GtkMenuItem,	iExpQuit) ||
-	     !AGH_GBGETOBJ (GtkMenuItem,	iMontageSetDefaults) ||
-	     !AGH_GBGETOBJ (GtkMenuItem,	iMontageResetAll) ||
-	     !AGH_GBGETOBJ (GtkMenuItem,	iMontageNotchNone) ||
-	     !AGH_GBGETOBJ (GtkMenuItem,	iMontageNotch50Hz) ||
-	     !AGH_GBGETOBJ (GtkMenuItem,	iMontageNotch60Hz) ||
 	     !AGH_GBGETOBJ (GtkMenuItem,	iHelpAbout) ||
 	     !AGH_GBGETOBJ (GtkMenuItem,	iHelpUsage) )
 		throw runtime_error ("Failed to construct widgets");
@@ -118,6 +115,12 @@ SExpDesignUIWidgets ()
 	g_signal_connect( iExpGloballyDetectArtifacts, "activate",
 			  (GCallback)iExpGloballyDetectArtifacts_activate_cb,
 			  this);
+	g_signal_connect( iExpGloballySetFilters, "activate",
+			  (GCallback)iExpGloballySetFilters_activate_cb,
+			  this);
+	g_signal_connect( iMontageSetDefaults, "activate",
+			  (GCallback)iMontageSetDefaults_activate_cb,
+			  this);
 	g_signal_connect( iExpQuit, "activate",
 			  (GCallback)iExpQuit_activate_cb,
 			  this);
@@ -128,22 +131,6 @@ SExpDesignUIWidgets ()
 			  (GCallback)iHelpUsage_activate_cb,
 			  this);
 
-	g_signal_connect( iMontageSetDefaults, "activate",
-			  (GCallback)iMontageSetDefaults_activate_cb,
-			  this);
-	g_signal_connect( iMontageResetAll, "activate",
-			  (GCallback)iMontageResetAll_activate_cb,
-			  this);
-	g_signal_connect( iMontageNotchNone, "activate",
-			  (GCallback)iMontageNotchNone_activate_cb,
-			  this);
-	g_signal_connect( iMontageNotch50Hz, "activate",
-			  (GCallback)iMontageNotch50Hz_activate_cb,
-			  this);
-	g_signal_connect( iMontageNotch60Hz, "activate",
-			  (GCallback)iMontageNotch60Hz_activate_cb,
-			  this);
-
 	if ( !AGH_GBGETOBJ (GtkWindow,		wMainWindow) ||
 	     !AGH_GBGETOBJ (GtkVBox,		cMeasurements) ||
 	     !AGH_GBGETOBJ (GtkLabel,		lMsmtPSDInfo) ||
diff --git a/src/ui/ed-widgets.hh b/src/ui/ed-widgets.hh
index b2e217e..f64278c 100644
--- a/src/ui/ed-widgets.hh
+++ b/src/ui/ed-widgets.hh
@@ -93,9 +93,8 @@ struct SExpDesignUIWidgets {
 		*iExpRefresh, *iExpPurgeComputed, *iExpAnnotations, *iExpClose, *iExpQuit,
 		*iExpBasicSADetectUltradianCycles,
 		*iExpGloballyDetectArtifacts,
+		*iExpGloballySetFilters,
 		*iMontageSetDefaults,
-		*iMontageResetAll,
-		*iMontageNotchNone, *iMontageNotch50Hz, *iMontageNotch60Hz,
 		*iHelpAbout,
 		*iHelpUsage;
 
@@ -303,7 +302,7 @@ struct SExpDesignUIWidgets {
 		*eMontageDefaultsShowEMG,
 		*eMontageDefaultsOverride;
 
-	// global artifact dtection
+	// global artifact detection
 	GtkDialog
 		*wGlobalArtifactDetection;
 	GtkComboBox
@@ -313,6 +312,12 @@ struct SExpDesignUIWidgets {
 	GtkButton
 		*bGlobalADOK;
 
+	// global filters
+	GtkDialog
+		*wGlobalFilters;
+	GtkButton
+		*bGlobalFiltersOK;
+
       // colours
 	enum TColour {
 		night,		day,
diff --git a/src/ui/ed_cb.cc b/src/ui/ed_cb.cc
index ba3ad51..5d37865 100644
--- a/src/ui/ed_cb.cc
+++ b/src/ui/ed_cb.cc
@@ -246,7 +246,17 @@ iMontageSetDefaults_activate_cb( GtkMenuItem*, gpointer userdata)
 }
 
 void
-iMontageResetAll_activate_cb( GtkMenuItem*, gpointer userdata)
+iExpGloballySetFilters_activate_cb( GtkMenuItem*, gpointer userdata)
+{
+	auto& ED = *(SExpDesignUI*)userdata;
+
+	if ( GTK_RESPONSE_OK ==
+	     gtk_dialog_run( ED.wGlobalFilters) )
+		FAFA;
+}
+
+void
+bGlobalMontageResetAll_clicked_cb( GtkButton*, gpointer userdata)
 {
 	auto& ED = *(SExpDesignUI*)userdata;
 
diff --git a/src/ui/ed_cb.hh b/src/ui/ed_cb.hh
index d5825e5..42b66e9 100644
--- a/src/ui/ed_cb.hh
+++ b/src/ui/ed_cb.hh
@@ -30,13 +30,11 @@ void iExpAnnotations_activate_cb( GtkMenuItem*, gpointer);
 void iExpBasicSADetectUltradianCycles_activate_cb( GtkMenuItem*, gpointer);
 void iExpGloballyDetectArtifacts_activate_cb( GtkMenuItem*, gpointer);
 void eGlobalADProfiles_changed_cb( GtkComboBox*, gpointer);
+void iExpGloballySetFilters_activate_cb( GtkMenuItem*, gpointer);
 void iExpClose_activate_cb( GtkMenuItem*, gpointer);
 void iExpQuit_activate_cb( GtkMenuItem*, gpointer);
 void iMontageSetDefaults_activate_cb( GtkMenuItem*, gpointer);
-void iMontageResetAll_activate_cb( GtkMenuItem*, gpointer);
-void iMontageNotchNone_activate_cb( GtkMenuItem*, gpointer);
-void iMontageNotch50Hz_activate_cb( GtkMenuItem*, gpointer);
-void iMontageNotch60Hz_activate_cb( GtkMenuItem*, gpointer);
+void bGlobalMontageResetAll_clicked_cb( GtkButton*, gpointer);
 void iHelpAbout_activate_cb( GtkMenuItem*, gpointer);
 void iHelpUsage_activate_cb( GtkMenuItem*, gpointer);
 

-- 
Sleep experiment manager



More information about the debian-med-commit mailing list