PROP_0,
PROP_VALUE,
PROP_DEFAULT_VALUE,
+ PROP_ORIGINAL_VALUE,
PROP_VISIBLE,
PROP_EDITABLE
};
{
gchar *value;
gchar *default_value;
+ gchar *original_value;
gboolean visible;
gboolean editable;
GPtrArray *pa_filters;
"",
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ g_object_class_install_property (object_class, PROP_ORIGINAL_VALUE,
+ g_param_spec_string ("original-value",
+ "Original value",
+ "Original value",
+ "",
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+
g_object_class_install_property (object_class, PROP_VISIBLE,
g_param_spec_boolean ("visible",
"Visible",
return g_strdup (priv->default_value);
}
+/**
+ * zak_form_element_set_original_value:
+ * @element:
+ * @value:
+ *
+ */
+void
+zak_form_element_set_original_value (ZakFormElement *element, const gchar *value)
+{
+ ZakFormElementPrivate *priv;
+
+ priv = zak_form_element_get_instance_private (element);
+
+ if (priv->original_value != NULL)
+ {
+ g_free (priv->original_value);
+ }
+
+ priv->original_value = g_strdup (value);
+}
+
+/**
+ * zak_form_element_get_original_value:
+ * @element:
+ *
+ */
+gchar
+*zak_form_element_get_original_value (ZakFormElement *element)
+{
+ ZakFormElementPrivate *priv;
+
+ priv = zak_form_element_get_instance_private (element);
+
+ return g_strdup (priv->original_value);
+}
+
/**
* zak_form_element_set_visible:
* @element:
zak_form_element_set_default_value (zak_form_element, g_value_get_string (value));
break;
+ case PROP_ORIGINAL_VALUE:
+ zak_form_element_set_original_value (zak_form_element, g_value_get_string (value));
+ break;
+
case PROP_VISIBLE:
zak_form_element_set_visible (zak_form_element, g_value_get_boolean (value));
break;
g_value_set_string (value, zak_form_element_get_default_value (zak_form_element));
break;
+ case PROP_ORIGINAL_VALUE:
+ g_value_set_string (value, zak_form_element_get_original_value (zak_form_element));
+ break;
+
case PROP_VISIBLE:
g_value_set_boolean (value, zak_form_element_get_visible (zak_form_element));
break;
void zak_form_element_set_default_value (ZakFormElement *element, const gchar *value);
gchar *zak_form_element_get_default_value (ZakFormElement *element);
+void zak_form_element_set_original_value (ZakFormElement *element, const gchar *value);
+gchar *zak_form_element_get_original_value (ZakFormElement *element);
+
void zak_form_element_set_visible (ZakFormElement *element, gboolean visible);
gboolean zak_form_element_get_visible (ZakFormElement *element);