diff --git a/db/db-calc.c b/db/db-calc.c index d7994d2..fa703cb 100644 --- a/db/db-calc.c +++ b/db/db-calc.c @@ -42,25 +42,14 @@ G_DEFINE_TYPE (DbCalc, db_calc, GVN_TYPE_PARAM); /** * db_calc_new: - * @model: the #DbModel in which the operations will apply - * @type: the #DbCalcOperationType - * @col: the number of a column (starting with 0) * - * Creates a new #DbCalc using @col to select the only column to be processed - * in each row of @model. + * Creates a new #DbCalc. * * Return value: a new #DbCalc **/ -DbCalc * db_calc_new (DbModel * model, DbCalcType type, const gchar * column_name) +DbCalc * db_calc_new () { - g_return_val_if_fail (DB_IS_MODEL (model), NULL); - - return g_object_new (DB_TYPE_CALC - ,"model", model - ,"type", type - ,"column-name", column_name - ,NULL - ); + return g_object_new (DB_TYPE_CALC, NULL); } /** @@ -416,7 +405,7 @@ static void db_calc_class_init (DbCalcClass * k) ,_("Model") ,_("The model where the operations will be applied") ,DB_TYPE_MODEL - ,G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE) + ,G_PARAM_READWRITE) ); g_object_class_install_property (klass, PROP_TYPE @@ -425,21 +414,21 @@ static void db_calc_class_init (DbCalcClass * k) ,_("The type of the operation applied over the function") ,DB_TYPE_CALC_TYPE ,DB_CALC_TYPE_SUM - ,G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE) + ,G_PARAM_READWRITE) ); g_object_class_install_property (klass, PROP_FUNC ,g_param_spec_pointer ("function" ,_("Function") ,_("The function to execute") - ,G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE) + ,G_PARAM_READWRITE) ); g_object_class_install_property (klass, PROP_DATA ,g_param_spec_pointer ("data" ,_("Data") ,_("The user provided data for the function") - ,G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE) + ,G_PARAM_READWRITE) ); g_object_class_install_property (klass, PROP_COLUMN_INDEX @@ -449,7 +438,7 @@ static void db_calc_class_init (DbCalcClass * k) ,-1 ,G_MAXINT ,-1 - ,G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE) + ,G_PARAM_READWRITE) ); g_object_class_install_property (klass, PROP_COLUMN_NAME @@ -457,7 +446,7 @@ static void db_calc_class_init (DbCalcClass * k) ,_("Column name") ,_("A column name to apply the operations over it") ,NULL - ,G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE) + ,G_PARAM_READWRITE) ); } diff --git a/db/db-calc.h b/db/db-calc.h index f0c8b8f..de49f8e 100644 --- a/db/db-calc.h +++ b/db/db-calc.h @@ -87,9 +87,7 @@ struct _DbCalcClass GType db_calc_get_type (); GType db_calc_type_get_type (); -DbCalc * db_calc_new (DbModel * model - ,DbCalcType type - ,const gchar * column_name); +DbCalc * db_calc_new (); DbCalc * db_calc_new_with_func (DbModel * model ,DbCalcType type ,DbCalcFunc func diff --git a/vn/field/field.h b/vn/field/field.h index a66e177..1331495 100644 --- a/vn/field/field.h +++ b/vn/field/field.h @@ -18,14 +18,15 @@ #ifndef FIELD_H #define FIELD_H -#include "vn-entry.h" -#include "vn-spin.h" #include "vn-calendar.h" -#include "vn-combo.h" #include "vn-check.h" -#include "vn-image.h" +#include "vn-combo.h" #include "vn-completion.h" #include "vn-date-chooser.h" +#include "vn-entry.h" #include "vn-http-image.h" +#include "vn-image.h" +#include "vn-label.h" +#include "vn-spin.h" #endif \ No newline at end of file