goffice r2175 - in trunk: . goffice/graph goffice/gtk
- From: jbrefort svn gnome org
- To: svn-commits-list gnome org
- Subject: goffice r2175 - in trunk: . goffice/graph goffice/gtk
- Date: Tue, 19 Aug 2008 18:11:14 +0000 (UTC)
Author: jbrefort
Date: Tue Aug 19 18:11:14 2008
New Revision: 2175
URL: http://svn.gnome.org/viewvc/goffice?rev=2175&view=rev
Log:
2008-08-19 Mariusz Adamski <mariusz adamski gmail com>
* goffice/graph/gog-3d-box.c: (gog_3d_box_populate_editor): made Euler
angles sliders "keyboard friendly".
* goffice/graph/gog-grid-line.c: (gog_grid_line_xyz_render):fixed
inappropriate drawing of grid stripes.
* goffice/gtk/go-3d-rotation-sel.c: (g3d_init): made Euler angles
sliders "keyboard friendly".
Modified:
trunk/ChangeLog
trunk/goffice/graph/gog-3d-box.c
trunk/goffice/graph/gog-grid-line.c
trunk/goffice/gtk/go-3d-rotation-sel.c
Modified: trunk/goffice/graph/gog-3d-box.c
==============================================================================
--- trunk/goffice/graph/gog-3d-box.c (original)
+++ trunk/goffice/graph/gog-3d-box.c Tue Aug 19 18:11:14 2008
@@ -168,25 +168,18 @@
if (gui == NULL)
return;
- g_signal_connect (G_OBJECT (g3d),
- "expose-event",
- G_CALLBACK (cb_g3d_update),
- GOG_3D_BOX (gobj));
- g_signal_connect (G_OBJECT (g3d),
- "matrix-changed",
- G_CALLBACK (cb_matrix_changed),
- GOG_3D_BOX (gobj));
- g_signal_connect (G_OBJECT (g3d),
- "fov-changed",
- G_CALLBACK (cb_fov_changed),
- GOG_3D_BOX (gobj));
-
+ g_object_connect (G_OBJECT (g3d),
+ "signal::expose-event", G_CALLBACK (cb_g3d_update), gobj,
+ "signal::matrix-changed", G_CALLBACK (cb_matrix_changed), gobj,
+ "signal::fov-changed", G_CALLBACK (cb_fov_changed), gobj,
+ NULL);
+
w = glade_xml_get_widget (gui, "psi_scale");
gtk_range_set_value (GTK_RANGE (w), box->psi * 180 / M_PI);
- g_signal_connect (G_OBJECT (w),
- "button-release-event",
- G_CALLBACK (cb_box_psi_changed),
- GOG_3D_BOX (gobj));
+ g_object_connect (G_OBJECT (w),
+ "signal::button-release-event", G_CALLBACK (cb_box_psi_changed), gobj,
+ "signal::key-release-event", G_CALLBACK (cb_box_psi_changed), gobj,
+ NULL);
g_signal_connect (G_OBJECT (g3d),
"psi-changed",
G_CALLBACK (cb_g3d_change_psi),
@@ -194,10 +187,10 @@
w = glade_xml_get_widget (gui, "theta_scale");
gtk_range_set_value (GTK_RANGE (w), box->theta * 180 / M_PI);
- g_signal_connect (G_OBJECT (w),
- "button-release-event",
- G_CALLBACK (cb_box_theta_changed),
- GOG_3D_BOX (gobj));
+ g_object_connect (G_OBJECT (w),
+ "signal::button-release-event", G_CALLBACK (cb_box_theta_changed), gobj,
+ "signal::key-release-event", G_CALLBACK (cb_box_theta_changed), gobj,
+ NULL);
g_signal_connect (G_OBJECT (g3d),
"theta-changed",
G_CALLBACK (cb_g3d_change_theta),
@@ -205,10 +198,10 @@
w = glade_xml_get_widget (gui, "phi_scale");
gtk_range_set_value (GTK_RANGE (w), box->phi * 180 / M_PI);
- g_signal_connect (G_OBJECT (w),
- "button-release-event",
- G_CALLBACK (cb_box_phi_changed),
- GOG_3D_BOX (gobj));
+ g_object_connect (G_OBJECT (w),
+ "signal::button-release-event", G_CALLBACK (cb_box_phi_changed), gobj,
+ "signal::key-release-event", G_CALLBACK (cb_box_phi_changed), gobj,
+ NULL);
g_signal_connect (G_OBJECT (g3d),
"phi-changed",
G_CALLBACK (cb_g3d_change_phi),
Modified: trunk/goffice/graph/gog-grid-line.c
==============================================================================
--- trunk/goffice/graph/gog-grid-line.c (original)
+++ trunk/goffice/graph/gog-grid-line.c Tue Aug 19 18:11:14 2008
@@ -345,6 +345,7 @@
double x1, x2, y1, y2;
int face = xfaces[j];
int inc;
+ stripe_started = FALSE;
if (fv[face / 4] == 0)
continue;
inc = (*py[faces[face]] != *py[faces[face + 1]]
@@ -380,6 +381,24 @@
stripe_started = TRUE;
}
}
+ if (stripe_started) {
+ gog_chart_map_3d_to_view (c_map,
+ bx,
+ *py[faces[face]],
+ *pz[faces[face]],
+ &x1, &y1, NULL);
+ gog_chart_map_3d_to_view (c_map,
+ bx,
+ *py[faces[face + inc]],
+ *pz[faces[face + inc]],
+ &x2, &y2, NULL);
+ go_path_line_to (path, x2, y2);
+ go_path_line_to (path, x1, y1);
+ go_path_close (path);
+ gog_renderer_fill_shape (view->renderer,
+ path);
+ go_path_clear (path);
+ }
} else {
for (i = 0; i < tick_nbr; ++i) {
if (!((ticks[i].type == GOG_AXIS_TICK_MAJOR
@@ -409,6 +428,7 @@
double x1, x2, y1, y2;
int face = yfaces[j];
int inc;
+ stripe_started = FALSE;
if (fv[face / 4] == 0)
continue;
inc = (*px[faces[face]] != *px[faces[face + 1]]
@@ -444,6 +464,24 @@
stripe_started = TRUE;
}
}
+ if (stripe_started) {
+ gog_chart_map_3d_to_view (c_map,
+ *px[faces[face]],
+ by,
+ *pz[faces[face]],
+ &x1, &y1, NULL);
+ gog_chart_map_3d_to_view (c_map,
+ *px[faces[face + inc]],
+ by,
+ *pz[faces[face + inc]],
+ &x2, &y2, NULL);
+ go_path_line_to (path, x2, y2);
+ go_path_line_to (path, x1, y1);
+ go_path_close (path);
+ gog_renderer_fill_shape (view->renderer,
+ path);
+ go_path_clear (path);
+ }
} else {
for (i = 0; i < tick_nbr; ++i) {
if (!((ticks[i].type == GOG_AXIS_TICK_MAJOR
@@ -473,6 +511,7 @@
double x1, x2, y1, y2;
int face = zfaces[j];
int inc;
+ stripe_started = FALSE;
if (fv[face / 4] == 0)
continue;
inc = (*px[faces[face]] != *px[faces[face + 1]]
@@ -508,6 +547,24 @@
stripe_started = TRUE;
}
}
+ if (stripe_started) {
+ gog_chart_map_3d_to_view (c_map,
+ *px[faces[face]],
+ *py[faces[face]],
+ bz,
+ &x1, &y1, NULL);
+ gog_chart_map_3d_to_view (c_map,
+ *px[faces[face + inc]],
+ *py[faces[face + inc]],
+ bz,
+ &x2, &y2, NULL);
+ go_path_line_to (path, x2, y2);
+ go_path_line_to (path, x1, y1);
+ go_path_close (path);
+ gog_renderer_fill_shape (view->renderer,
+ path);
+ go_path_clear (path);
+ }
} else {
for (i = 0; i < tick_nbr; ++i) {
if (!((ticks[i].type == GOG_AXIS_TICK_MAJOR
Modified: trunk/goffice/gtk/go-3d-rotation-sel.c
==============================================================================
--- trunk/goffice/gtk/go-3d-rotation-sel.c (original)
+++ trunk/goffice/gtk/go-3d-rotation-sel.c Tue Aug 19 18:11:14 2008
@@ -360,8 +360,12 @@
NULL);
g3d->fovscale = GTK_RANGE (glade_xml_get_widget (g3d->gui, "fovscale"));
- g_signal_connect (G_OBJECT (g3d->fovscale), "button-release-event",
- G_CALLBACK (cb_fov_changed), g3d);
+ g_object_connect (G_OBJECT (g3d->fovscale),
+ "signal::button-release-event",
+ G_CALLBACK (cb_fov_changed), g3d,
+ "signal::key-release-event",
+ G_CALLBACK (cb_fov_changed), g3d,
+ NULL);
w = glade_xml_get_widget (g3d->gui, "toplevel");
gtk_box_pack_start (GTK_BOX (g3d), w, TRUE, TRUE, 0);
gtk_widget_show_all (GTK_WIDGET (g3d));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]