goffice r2140 - in trunk: . goffice/graph goffice/gtk



Author: jbrefort
Date: Tue Jul  8 12:01:55 2008
New Revision: 2140
URL: http://svn.gnome.org/viewvc/goffice?rev=2140&view=rev

Log:
2008-07-08  Mariusz Adamski  <mariusz adamski gmail com>

	* goffice/graph/gog-3d-box-prefs.glade: fixed limits.
	* goffice/graph/gog-3d-box.c: (gog_3d_box_class_init): fixed maximums
	for all properties.
	* goffice/gtk/go-3d-rotation-sel.glade: fixed limits.



Modified:
   trunk/ChangeLog
   trunk/goffice/graph/gog-3d-box-prefs.glade
   trunk/goffice/graph/gog-3d-box.c
   trunk/goffice/gtk/go-3d-rotation-sel.glade

Modified: trunk/goffice/graph/gog-3d-box-prefs.glade
==============================================================================
--- trunk/goffice/graph/gog-3d-box-prefs.glade	(original)
+++ trunk/goffice/graph/gog-3d-box-prefs.glade	Tue Jul  8 12:01:55 2008
@@ -35,91 +35,91 @@
                 <property name="column_spacing">12</property>
                 <property name="row_spacing">6</property>
                 <child>
-                  <widget class="GtkHScale" id="phi_scale">
+                  <widget class="GtkHScale" id="theta_scale">
                     <property name="width_request">180</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="adjustment">0 0 370 1 10 10</property>
+                    <property name="adjustment">0 0 180 1 10 0</property>
                     <property name="digits">0</property>
                   </widget>
                   <packing>
                     <property name="left_attach">1</property>
                     <property name="right_attach">2</property>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
                     <property name="x_options">GTK_FILL</property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkLabel" id="label3">
+                  <widget class="GtkHScale" id="psi_scale">
+                    <property name="width_request">180</property>
                     <property name="visible">True</property>
-                    <property name="xalign">0</property>
-                    <property name="label" translatable="yes">Phi:</property>
-                    <property name="use_underline">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="adjustment">0 0 360 1 10 0</property>
+                    <property name="digits">0</property>
                   </widget>
                   <packing>
-                    <property name="top_attach">2</property>
-                    <property name="bottom_attach">3</property>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
                     <property name="x_options">GTK_FILL</property>
-                    <property name="y_options"></property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkLabel" id="label2">
+                  <widget class="GtkLabel" id="label1">
                     <property name="visible">True</property>
                     <property name="xalign">0</property>
-                    <property name="label" translatable="yes">Theta:</property>
+                    <property name="label" translatable="yes">Psi:</property>
                     <property name="use_underline">True</property>
                   </widget>
                   <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
                     <property name="x_options">GTK_FILL</property>
                     <property name="y_options"></property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkLabel" id="label1">
+                  <widget class="GtkLabel" id="label2">
                     <property name="visible">True</property>
                     <property name="xalign">0</property>
-                    <property name="label" translatable="yes">Psi:</property>
+                    <property name="label" translatable="yes">Theta:</property>
                     <property name="use_underline">True</property>
                   </widget>
                   <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
                     <property name="x_options">GTK_FILL</property>
                     <property name="y_options"></property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkHScale" id="psi_scale">
-                    <property name="width_request">180</property>
+                  <widget class="GtkLabel" id="label3">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="adjustment">0 0 370 1 10 10</property>
-                    <property name="digits">0</property>
+                    <property name="xalign">0</property>
+                    <property name="label" translatable="yes">Phi:</property>
+                    <property name="use_underline">True</property>
                   </widget>
                   <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
                     <property name="x_options">GTK_FILL</property>
+                    <property name="y_options"></property>
                   </packing>
                 </child>
                 <child>
-                  <widget class="GtkHScale" id="theta_scale">
+                  <widget class="GtkHScale" id="phi_scale">
                     <property name="width_request">180</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="adjustment">0 0 370 1 10 10</property>
+                    <property name="adjustment">0 0 360 1 10 0</property>
                     <property name="digits">0</property>
                   </widget>
                   <packing>
                     <property name="left_attach">1</property>
                     <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
+                    <property name="top_attach">2</property>
+                    <property name="bottom_attach">3</property>
                     <property name="x_options">GTK_FILL</property>
                   </packing>
                 </child>

Modified: trunk/goffice/graph/gog-3d-box.c
==============================================================================
--- trunk/goffice/graph/gog-3d-box.c	(original)
+++ trunk/goffice/graph/gog-3d-box.c	Tue Jul  8 12:01:55 2008
@@ -283,32 +283,33 @@
 	gobject_klass->set_property = gog_3d_box_set_property;
 	gobject_klass->get_property = gog_3d_box_get_property;
 	
+	/* Using 3.141593 instead of M_PI to avoid rounding errors */
 	g_object_class_install_property (gobject_klass, BOX3D_PROP_PSI,
 		g_param_spec_double ("psi", 
 			"Psi",
 			_("Euler angle psi"),
-			0.0, 2 * M_PI, 70. / 180. * M_PI, 
+			0.0, 2 * 3.141593, 70. / 180. * M_PI, 
 			G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE
 			| GOG_PARAM_PERSISTENT));
 	g_object_class_install_property (gobject_klass, BOX3D_PROP_THETA,
 		g_param_spec_double ("theta", 
 			"Theta",
 			_("Euler angle theta"),
-			0.0, 2 * M_PI, 10. / 180. * M_PI, 
+			0.0, 3.141593, 10. / 180. * M_PI, 
 			G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE
 			| GOG_PARAM_PERSISTENT));
 	g_object_class_install_property (gobject_klass, BOX3D_PROP_PHI,
 		g_param_spec_double ("phi", 
 			"Phi",
 			_("Euler angle phi"),
-			0.0, 2 * M_PI, 270. / 180. * M_PI, 
+			0.0, 2 * 3.141593, 270. / 180. * M_PI, 
 			G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE
 			| GOG_PARAM_PERSISTENT));
 	g_object_class_install_property (gobject_klass, BOX3D_PROP_FOV,
 		g_param_spec_double ("fov", 
 			"FoV",
 			_("Field of view"),
-			0.0, M_PI + 0.000001, 10. / 180. * M_PI, /* add 0.000001 to max to avoid rounding errors */
+			0.0, 3.141593, 10. / 180. * M_PI,
 			G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE
 			| GOG_PARAM_PERSISTENT));
 

Modified: trunk/goffice/gtk/go-3d-rotation-sel.glade
==============================================================================
--- trunk/goffice/gtk/go-3d-rotation-sel.glade	(original)
+++ trunk/goffice/gtk/go-3d-rotation-sel.glade	Tue Jul  8 12:01:55 2008
@@ -55,7 +55,7 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="adjustment">0 0 190 1 10 10</property>
+                    <property name="adjustment">0 0 180 1 10 0</property>
                     <property name="digits">0</property>
                     <property name="draw_value">False</property>
                   </widget>



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