1. 24 Dec, 2001 1 commit
    • Jody Goldberg's avatar
      mark as needing a recalc, don't just assert it. · 208fc52c
      Jody Goldberg authored
      2001-12-24  Jody Goldberg <jody@gnome.org>
      	* src/style-condition.c (style_condition_expr_eval) : mark as needing
      	  a recalc, don't just assert it.
      	* src/workbook-edit.c (wbcg_edit_validate) : handle accept/reject/reedit
      	  Generate the title and msg here.  The goal is to move the gui
      	  specific aspects out of here.
      	(wbcg_edit_finish) : ditto.
      	* src/gui-validation.c (validation_generate_msg) : disable for now.
      	  It is a nice idea, but the implementation is in the wrong place
      	  and blows goats.
  2. 27 Oct, 2001 1 commit
    • Almer S. Tigelaar's avatar
      Enable validate menu item. · eb66eee8
      Almer S. Tigelaar authored
      2001-10-27  Almer S. Tigelaar  <almer@gnome.org>
      	* src/GNOME_Gnumeric.xml: Enable validate menu item.
      	* src/validation.[ch]: New, defines a container for
      	validation settings.
      	* src/Makefile.am: Add new validation.[ch]
      	* src/gnumeric.h: Add validation declaration.
      	* src/gui-validation.[ch] (validation_mstyle_get_title): Burn.
      	(validation_generate_msg): Rework slightly to accept a stylecondition
      	instead of an mstyle.
      	(validation_mstyle_get_msg): Burn.
      	(validation_mstyle_get_msg_subst): Burn.
      	(validation_mstyle_set_title_msg): Burn.
      	(validation_get_accept): Request a validation instead of
      	an mstyle. Actually free the automatically generated message.
      	* src/mstyle.[ch]: Adjust mstyle_names to include hidden/locked.
      	(mstyle_hash): Remove validation style hashing.
      	(mstyle_element_dump): Don't dump validation message, dump validation
      	refcount instead.
      	(mstyle_element_equal): Remove comparing of style and message.
      	(mstyle_elements_equal): Don't give a mismatched types warning if
      	one of the elements is not set.
      	(mstyle_element_ref): Ref validation, remove reffing of msg.
      	(mstyle_element_unref): Idem for unref.
      	(mstyle_new_default): Don't initialize any validation related
      	(mstyle_set_validation): Set a Validation instead of a StyleCondition.
      	(mstyle_get_validation): Idem for get.
      	(mstyle_set_validation_style): Burn.
      	(mstyle_get_validation_style): Burn.
      	(mstyle_set_validation_msg): Burn.
      	(mstyle_get_validation_msg): Burn.
      	* src/style-condition.c (style_condition_new_constraint): Initialize
      	from passed parameter!
      	* src/style-condition.h: Remove validation enum.
      	* src/workbook-control-gui.c (cb_data_validate): Enable.
      	(workbook_control_gui_init): Change index of consolidate
      	menu item.
      	* src/workbook-edit.c (wbcg_edit_validate) : Get the StyleCondition
      	from the validation. The validation element must be set on the mstyle.
      	Pass validation, not mstyle, to validation_get_accept.
      	(wbcg_edit_finish): Only call wbcg_edit_validate if the validation
      	element is set on the mstyle.
      	* src/xml-io.c (xml_write_style_condition_chain): Generates a
      	StyleConditionChain in XML format.
      	(xml_read_style_condition_chain): Turns an XML description of a
      	StyleConditionChain into a real StyleConditionChain.
      	(xml_write_style): Add validation support.
      	(xml_read_style): Idem.
      2001-10-27  Almer S. Tigelaar  <almer@gnome.org>
      	* dialog-cell-format.c (validation_style_condition_chain_rebuild): Rename
      	to validation_rebuild_validation.
      	(validation_rebuild_validation): Also set error style, title and message
      	on validation.
      	(cb_validation_error_action_deactivate): Don't set error style on
      	mstyle directly.
      	(cb_validation_operator_deactivate): Adjust for name change.
      	(cb_validation_constraint_type_deactivate): Don't rebuild chain from
      	here, cb_validation_error_action_deactivate will do this.
      	(cb_validation_bounds_changed): Adjust for name change.
      	(cb_validation_flags_changed): Idem.
      	(cb_validation_error_title_msg): Don't set title and message directly
      	on mstyle. Call validation_rebuild_validation instead.
      	(fmt_dialog_init_from_style_condition): Rename to
      	(fmt_dialog_init_validation_from_style_condition): Use passed
      	stylecondition instead of re-fetching it from the mstyle.
      	(fmt_dialog_init_validation_page): Correctly initialize everything
      	from the new, single mstyle_validation element.
  3. 22 Oct, 2001 1 commit
    • Almer S. Tigelaar's avatar
      Fix this for cases where the msg is NULL. · 530142be
      Almer S. Tigelaar authored
      2001-10-23  Almer S. Tigelaar  <almer@gnome.org>
      	* src/mstyle.c (mstyle_get_validation_msg): Fix this for
      	cases where the msg is NULL.
      	* src/workbook-edit.c (wbcg_edit_validate): Call upon
      	validation_get_accept in gui-validation.c to pop-up
      	a dialog if needed.
      	* src/gui-validation.[ch]: New, gui parts of validation.
      	Used by wbcg_edit_validate and also in dialog-cell-format.c
      2001-10-23  Almer S. Tigelaar  <almer@gnome.org>
      	* cell-format.glade: Re-order validation action list.
      	* dialog-cell-format.c (fmt_dialog_init_validation_page):
      	Don't delete validation page.
      	(fmt_dialog_init_input_msg_page): Adjust deletion index.
      	(validation_entry_to_expr): New, turn entered text into
      	(validation_style_condition_chain_rebuild): Rebuild the
      	validation chain from the input given.
      	(cb_validation_error_action_deactivate): Cope for re-ordering
      	of the action list. Set the action on the resulting mstyle.
      	(cb_validation_operator_deactivate): Rebuild chain.
      	(cb_validation_constraint_type_deactivate): Idem.
      	(cb_validation_flags_changed): Idem.
      	(cb_validation_bounds_changed): New, force rebuild when bounds
      	(cb_validation_error_title_msg): New, reset validation title
      	and message on mstyle when changed.
      	(fmt_dialog_init_from_style_condition): New, initialize the
      	Criteria part of the dialog from an existing mstyle.
      	(fmt_dialog_init_validation_page): Connect new signal callbacks
      	and initialize the Error Alert part of the dialog.