[goffice] Fix style inconsistency in regression trend line dialog. [#678810]



commit ac2e646d6c21c4f11141d2f6fd3ef33794e73205
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Tue Jun 26 00:42:12 2012 -0600

    Fix style inconsistency in regression trend line dialog. [#678810]
    
    2012-06-26 Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* goffice/graph/gog-reg-curve.c (limits_changed_cb): keep the
    	min/max entries visible
    	(gog_reg_curve_populate_editor): ditto
    	* goffice/graph/gog-reg-curve-prefs.ui align High/low limits with
    	high/low bounds

 ChangeLog                            |    8 +++++++
 NEWS                                 |    1 +
 goffice/graph/gog-reg-curve-prefs.ui |    2 +
 goffice/graph/gog-reg-curve.c        |   37 +++++++++++++++++++--------------
 4 files changed, 32 insertions(+), 16 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 434a266..c6791bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-06-26 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* goffice/graph/gog-reg-curve.c (limits_changed_cb): keep the
+	min/max entries visible
+	(gog_reg_curve_populate_editor): ditto
+	* goffice/graph/gog-reg-curve-prefs.ui align High/low limits with
+	high/low bounds
+
 2012-06-25 Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* plugins/plot_xy/gog-xy-prefs.ui (gog-xy-prefs): add border_width
diff --git a/NEWS b/NEWS
index 6ebe992..dd13af4 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ goffice 0.9.5:
 
 Andreas:
 	* Fix spacing in chart properties dialog.
+	* Fix style inconsistency in regression trend line dialog. [#678810]
 
 --------------------------------------------------------------------------
 goffice 0.9.4:
diff --git a/goffice/graph/gog-reg-curve-prefs.ui b/goffice/graph/gog-reg-curve-prefs.ui
index 170aa15..138b100 100644
--- a/goffice/graph/gog-reg-curve-prefs.ui
+++ b/goffice/graph/gog-reg-curve-prefs.ui
@@ -134,6 +134,7 @@ Relative: the line will be displayed between the data range expanded according t
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="margin_left">12</property>
+        <property name="xpad">5</property>
         <property name="xalign">0</property>
         <property name="label" translatable="yes">Low limit:</property>
       </object>
@@ -149,6 +150,7 @@ Relative: the line will be displayed between the data range expanded according t
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="margin_left">12</property>
+        <property name="xpad">5</property>
         <property name="xalign">0</property>
         <property name="label" translatable="yes">High limit:</property>
       </object>
diff --git a/goffice/graph/gog-reg-curve.c b/goffice/graph/gog-reg-curve.c
index 3efa156..a46cfa0 100644
--- a/goffice/graph/gog-reg-curve.c
+++ b/goffice/graph/gog-reg-curve.c
@@ -65,28 +65,32 @@ limits_changed_cb (GtkComboBox* btn, struct reg_curve_closure *cl)
 	GogRegCurveDrawingBounds db = gtk_combo_box_get_active (btn);
 	switch (db) {
 	case GOG_REG_CURVE_DRAWING_BOUNDS_NONE:
-		gtk_widget_hide (cl->al1);
-		gtk_widget_hide (cl->al2);
-		gtk_widget_hide (cl->rl1);
-		gtk_widget_hide (cl->rl2);
-		gtk_widget_hide (cl->fe1);
-		gtk_widget_hide (cl->fe2);
+		gtk_widget_set_sensitive (cl->al1, FALSE);
+		gtk_widget_set_sensitive (cl->al2, FALSE);
+		gtk_widget_set_sensitive (cl->rl1, FALSE);
+		gtk_widget_set_sensitive (cl->rl2, FALSE);
+		gtk_widget_set_sensitive (cl->fe1, FALSE);
+		gtk_widget_set_sensitive (cl->fe2, FALSE);
 		break;
 	case GOG_REG_CURVE_DRAWING_BOUNDS_ABSOLUTE:
+		gtk_widget_set_sensitive (cl->al1, TRUE);
+		gtk_widget_set_sensitive (cl->al2, TRUE);
 		gtk_widget_show (cl->al1);
 		gtk_widget_show (cl->al2);
 		gtk_widget_hide (cl->rl1);
 		gtk_widget_hide (cl->rl2);
-		gtk_widget_show (cl->fe1);
-		gtk_widget_show (cl->fe2);
+		gtk_widget_set_sensitive (cl->fe1, TRUE);
+		gtk_widget_set_sensitive (cl->fe2, TRUE);
 		break;
 	case GOG_REG_CURVE_DRAWING_BOUNDS_RELATIVE:
+		gtk_widget_set_sensitive (cl->rl1, TRUE);
+		gtk_widget_set_sensitive (cl->rl2, TRUE);
 		gtk_widget_hide (cl->al1);
 		gtk_widget_hide (cl->al2);
 		gtk_widget_show (cl->rl1);
 		gtk_widget_show (cl->rl2);
-		gtk_widget_show (cl->fe1);
-		gtk_widget_show (cl->fe2);
+		gtk_widget_set_sensitive (cl->fe1, TRUE);
+		gtk_widget_set_sensitive (cl->fe2, TRUE);
 		break;
 	}
 	GOG_REG_CURVE (cl->rc)->drawing_bounds = db;
@@ -139,24 +143,25 @@ gog_reg_curve_populate_editor (GogObject	*gobj,
 	cl->al2 = go_gtk_builder_get_widget (gui, "high-lbl");
 	cl->rl1 = go_gtk_builder_get_widget (gui, "first-lbl");
 	cl->rl2 = go_gtk_builder_get_widget (gui, "last-lbl");
+
+	gtk_widget_set_sensitive (cl->fe1, db != GOG_REG_CURVE_DRAWING_BOUNDS_NONE);
+	gtk_widget_set_sensitive (cl->fe2, db != GOG_REG_CURVE_DRAWING_BOUNDS_NONE);
+	gtk_widget_show (cl->fe1);
+	gtk_widget_show (cl->fe2);
 	switch (db) {
 	case GOG_REG_CURVE_DRAWING_BOUNDS_NONE:
-		gtk_widget_hide (cl->al1);
-		gtk_widget_hide (cl->al2);
+	        gtk_widget_set_sensitive (cl->al1, FALSE);
+		gtk_widget_set_sensitive (cl->al2, FALSE);
 		gtk_widget_hide (cl->rl1);
 		gtk_widget_hide (cl->rl2);
 		break;
 	case GOG_REG_CURVE_DRAWING_BOUNDS_ABSOLUTE:
 		gtk_widget_hide (cl->rl1);
 		gtk_widget_hide (cl->rl2);
-		gtk_widget_show (cl->fe1);
-		gtk_widget_show (cl->fe2);
 		break;
 	case GOG_REG_CURVE_DRAWING_BOUNDS_RELATIVE:
 		gtk_widget_hide (cl->al1);
 		gtk_widget_hide (cl->al2);
-		gtk_widget_show (cl->fe1);
-		gtk_widget_show (cl->fe2);
 		break;
 	}
 	w = go_gtk_builder_get_widget (gui, "draw-limits-box");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]