Re: Version GtkDatabox-0.9.1.0 released, new maintainer, RFC



Hi Brian,

it is a great pleasure for me to see you as new maintainer for GtkDatabox. I am wishing you all the best ideas and enthusiasm as well as demanding, bright, critical and happy users which contribute to your project!

Have fun!


Attached is a patch which replaces the static grid value arrays by per-object arrays (adding appropriate get/set functions and object properties). In addition to being better style (as you wrote yourself), this also allows users to define more than one grid with their own values.

I have run your example to test it (also with a second grid). Seems to work fine, but other than that it is not well tested and I am not really sure about the documentation. Maybe I got horizontal/vertical mixed up.


Again, have fun and thanks for taking over!


Regards,

Roland


Brian Phelps wrote:
Hi All,

Two announcements:
First of all a new version of gtkdatabox has been released, version 0.9.1.0

Second the project has a new maintainer, me, Brian R Phelps

Two new features were added to the gtkdatabox library, one is a new
function, gtk_databox_grid_array_new, allowing specification of the
grid coordinates via an array, rather than automatically by the
library.

Also a log base 2 scale has been added to the library, and the
appropriate ruler functions have been updated as well.  Please let me
know if you run into any problems.

All docs have hopefully been updated reflecting the new changes

I have added on to the logarithmic example to illustrate the new log2
change.  I also added an example of the new gtk_databox_grid_array_new

I also would like some feedback on the following items:

-I believe the library is ready, has been ready, to come out of the
beta stage.  I would like to see the next release be 1.0.  Do you
folks have any thoughts on this?

-The way I implemented the array does not involve adding to the class
as it should, but uses some extra static variables in
gtk_databog_grid.  If anyone would like to submit a patch doing this
the correct way please have a look at it.  Otherwise I will try to fix
that soon and include that in the next release.  It should not much
difference in the way the code actually compiles and runs, just a
matter of style.

Thanks!
_______________________________________________
gtkdatabox-list mailing list
gtkdatabox-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkdatabox-list

diff gtkdatabox-0.9.1.0/gtk/gtkdatabox_grid.c gtkdatabox-0.9.1.0.patched/gtk/gtkdatabox_grid.c
26,28d25
< static   gfloat *hline_vals=NULL;
< static   gfloat *vline_vals=NULL;
< 
33c30,32
<    GRID_VLINES
---
>    GRID_VLINES,
>    GRID_HLINE_VALS,
>    GRID_VLINE_VALS
39a39,40
>    gfloat *hline_vals;
>    gfloat *vline_vals;
62a64,73
>    case GRID_HLINE_VALS:
>       {
> 	 gtk_databox_grid_set_hline_vals (grid, (gfloat *) g_value_get_pointer (value));
>       }
>       break;
>    case GRID_VLINE_VALS:
>       {
> 	 gtk_databox_grid_set_vline_vals (grid, (gfloat *) g_value_get_pointer (value));
>       }
>       break;
88a100,109
>    case GRID_HLINE_VALS:
>       {
> 	 g_value_set_pointer (value, gtk_databox_grid_get_hline_vals (grid));
>       }
>       break;
>    case GRID_VLINE_VALS:
>       {
> 	 g_value_set_pointer (value, gtk_databox_grid_get_vline_vals (grid));
>       }
>       break;
156a178,189
>    grid_param_spec = g_param_spec_pointer ("grid-hline-vals", "grid-hline-vals", "Positions of horizontal lines",
> 				       G_PARAM_READWRITE);
> 
>    g_object_class_install_property (gobject_class,
> 				    GRID_HLINE_VALS, grid_param_spec);
> 
>    grid_param_spec = g_param_spec_pointer ("grid-vline-vals", "grid-vline-vals", "Positions of vertical lines",
> 				       G_PARAM_READWRITE);
> 
>    g_object_class_install_property (gobject_class,
> 				    GRID_VLINE_VALS, grid_param_spec);
> 
233c266
< GtkDataboxGraph *gtk_databox_grid_array_new (gint hlines, gint vlines, gfloat * local_hline_vals, gfloat * local_vline_vals,
---
> GtkDataboxGraph *gtk_databox_grid_array_new (gint hlines, gint vlines, gfloat * hline_vals, gfloat * vline_vals,
241,244c274,276
< 			"grid-hlines", hlines, "grid-vlines", vlines, "grid-hline-vals", NULL);
< 			//"grid-hlines", hlines, "grid-vlines", vlines, "grid-hline-vals", hline_vals, "grid-vline-vals", vline_vals, NULL);
<    hline_vals = local_hline_vals;
<    vline_vals = local_vline_vals;
---
> 			"grid-hlines", hlines, "grid-vlines", vlines, 
>                         "grid-hline-vals", hline_vals,
>                         "grid-vline-vals", vline_vals, NULL);
293c325
<    if (hline_vals == NULL)
---
>    if (grid->priv->hline_vals == NULL)
303c335
<          y = hline_vals[i];
---
>          y = grid->priv->hline_vals[i];
308c340
<    if (vline_vals == NULL)
---
>    if (grid->priv->vline_vals == NULL)
318c350
<          x = vline_vals[i];
---
>          x = grid->priv->vline_vals[i];
391a424,491
> 
> /**
>  * gtk_databox_grid_set_hline_vals:
>  * @grid: a #GtkDataboxGrid graph object
>  * @hline_vals: array of positions for horizontal lines in the @grid
>  *
>  * Sets the positions of the horizontal lines in the @grid
>  **/
> void
> gtk_databox_grid_set_hline_vals (GtkDataboxGrid * grid, gfloat *hline_vals)
> {
>    g_return_if_fail (GTK_DATABOX_IS_GRID (grid));
> 
>    grid->priv->hline_vals = hline_vals;
> 
>    g_object_notify (G_OBJECT (grid), "grid-hline-vals");
> }
> 
> /**
>  * gtk_databox_grid_get_hline_vals:
>  * @grid: a #GtkDataboxGrid graph object
>  *
>  * Gets the array of positions for horizontal lines in the @grid
>  *
>  * Return value: array of positions for horizontal lines in the @grid
>  **/
> gfloat *
> gtk_databox_grid_get_hline_vals (GtkDataboxGrid * grid)
> {
>    g_return_val_if_fail (GTK_DATABOX_IS_GRID (grid), NULL);
> 
>    return grid->priv->hline_vals;
> }
> 
> /**
>  * gtk_databox_grid_set_vline_vals:
>  * @grid: a #GtkDataboxGrid graph object
>  * @vline_vals: array of positions for horizontal lines in the @grid
>  *
>  * Sets the positions of the horizontal lines in the @grid
>  **/
> void
> gtk_databox_grid_set_vline_vals (GtkDataboxGrid * grid, gfloat *vline_vals)
> {
>    g_return_if_fail (GTK_DATABOX_IS_GRID (grid));
> 
>    grid->priv->vline_vals = vline_vals;
> 
>    g_object_notify (G_OBJECT (grid), "grid-vline-vals");
> }
> 
> /**
>  * gtk_databox_grid_get_vline_vals:
>  * @grid: a #GtkDataboxGrid graph object
>  *
>  * Gets the array of positions for horizontal lines in the @grid
>  *
>  * Return value: array of positions for horizontal lines in the @grid
>  **/
> gfloat *
> gtk_databox_grid_get_vline_vals (GtkDataboxGrid * grid)
> {
>    g_return_val_if_fail (GTK_DATABOX_IS_GRID (grid), NULL);
> 
>    return grid->priv->vline_vals;
> }
> 
> 
diff gtkdatabox-0.9.1.0/gtk/gtkdatabox_grid.h gtkdatabox-0.9.1.0.patched/gtk/gtkdatabox_grid.h
97a98,103
>    void gtk_databox_grid_set_hline_vals (GtkDataboxGrid * grid, gfloat *hline_vals);
>    gfloat *gtk_databox_grid_get_hline_vals (GtkDataboxGrid * grid);
> 
>    void gtk_databox_grid_set_vline_vals (GtkDataboxGrid * grid, gfloat *vline_vals);
>    gfloat *gtk_databox_grid_get_vline_vals (GtkDataboxGrid * grid);
> 


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