Commit 208fc52c authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

mark as needing a recalc, don't just assert it.

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.
parent f7c14db3
...@@ -8,7 +8,6 @@ Release Critical ...@@ -8,7 +8,6 @@ Release Critical
---------------- ----------------
- name refering to deleted sheet - name refering to deleted sheet
- validation is not being stored in the cell format dialog
- research reports graph data guru crash - research reports graph data guru crash
- Changing the summary info does not dirty a workbook. - Changing the summary info does not dirty a workbook.
......
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.
2001-12-23 Jody Goldberg <jody@gnome.org> 2001-12-23 Jody Goldberg <jody@gnome.org>
* src/workbook-control-gui.c (cb_view_freeze_panes) : changing the
pane freeze state stops object editing.
* src/sheet-autofill.c (sheet_autofill_dir) : add some very special * src/sheet-autofill.c (sheet_autofill_dir) : add some very special
purpose code to clip the bounds of autofilled arrays that are being purpose code to clip the bounds of autofilled arrays that are being
clipped when filling a non-integer multiple of the original block clipped when filling a non-integer multiple of the original block
......
...@@ -26,10 +26,11 @@ Jody: ...@@ -26,10 +26,11 @@ Jody:
* Partial fix for del col/row undo with dependent objects. * Partial fix for del col/row undo with dependent objects.
* Support some additional forms of #!REF in XL import. * Support some additional forms of #!REF in XL import.
* Fix importing of graphs with embedded graphs. * Fix importing of graphs with embedded graphs.
* Improve autofill handling of merges. * Improve autofill handling of merges & arrays.
* Support pasting transposed merges. * Support pasting transposed merges.
* Ensure that cell sizes never violate absolute minima. * Ensure that cell sizes never violate absolute minima.
* Fix format leak (thanks Morten) * Fix format leak (thanks Morten)
* Fix data validation.
Morten: Morten:
* Fix DATE. * Fix DATE.
......
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.
2001-12-23 Jody Goldberg <jody@gnome.org> 2001-12-23 Jody Goldberg <jody@gnome.org>
* src/workbook-control-gui.c (cb_view_freeze_panes) : changing the
pane freeze state stops object editing.
* src/sheet-autofill.c (sheet_autofill_dir) : add some very special * src/sheet-autofill.c (sheet_autofill_dir) : add some very special
purpose code to clip the bounds of autofilled arrays that are being purpose code to clip the bounds of autofilled arrays that are being
clipped when filling a non-integer multiple of the original block clipped when filling a non-integer multiple of the original block
......
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.
2001-12-23 Jody Goldberg <jody@gnome.org> 2001-12-23 Jody Goldberg <jody@gnome.org>
* src/workbook-control-gui.c (cb_view_freeze_panes) : changing the
pane freeze state stops object editing.
* src/sheet-autofill.c (sheet_autofill_dir) : add some very special * src/sheet-autofill.c (sheet_autofill_dir) : add some very special
purpose code to clip the bounds of autofilled arrays that are being purpose code to clip the bounds of autofilled arrays that are being
clipped when filling a non-integer multiple of the original block clipped when filling a non-integer multiple of the original block
......
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.
2001-12-23 Jody Goldberg <jody@gnome.org> 2001-12-23 Jody Goldberg <jody@gnome.org>
* src/workbook-control-gui.c (cb_view_freeze_panes) : changing the
pane freeze state stops object editing.
* src/sheet-autofill.c (sheet_autofill_dir) : add some very special * src/sheet-autofill.c (sheet_autofill_dir) : add some very special
purpose code to clip the bounds of autofilled arrays that are being purpose code to clip the bounds of autofilled arrays that are being
clipped when filling a non-integer multiple of the original block clipped when filling a non-integer multiple of the original block
......
...@@ -1085,6 +1085,11 @@ do_deps_destroy (Sheet *sheet, ExprRewriteInfo const *rwinfo) ...@@ -1085,6 +1085,11 @@ do_deps_destroy (Sheet *sheet, ExprRewriteInfo const *rwinfo)
deps->single_hash = NULL; deps->single_hash = NULL;
} }
if (deps->names) {
g_hash_table_destroy (deps->names);
deps->names = NULL;
}
g_free (deps); g_free (deps);
} }
...@@ -1203,6 +1208,8 @@ dependency_data_new (void) ...@@ -1203,6 +1208,8 @@ dependency_data_new (void)
(SHEET_MAX_ROWS-1)/BUCKET_SIZE + 1); (SHEET_MAX_ROWS-1)/BUCKET_SIZE + 1);
deps->single_hash = g_hash_table_new (depsingle_hash, deps->single_hash = g_hash_table_new (depsingle_hash,
depsingle_equal); depsingle_equal);
deps->names = g_hash_table_new (g_direct_hash,
g_direct_equal);
return deps; return deps;
} }
......
...@@ -39,16 +39,18 @@ typedef enum { ...@@ -39,16 +39,18 @@ typedef enum {
struct _DependencyContainer { struct _DependencyContainer {
Dependent *dependent_list; Dependent *dependent_list;
/* /* Large ranges hashed on 'range' to accelerate duplicate culling. This
* Large ranges hashed on 'range' to accelerate duplicate * is tranversed by g_hash_table_foreach mostly.
* culling. This is tranversed by g_hash_table_foreach mostly.
*/ */
GHashTable **range_hash; GHashTable **range_hash;
/*
* Single ranges, this maps an EvalPos * to a GSList of its /* Single ranges, this maps an EvalPos * to a GSList of its
* dependencies. * dependencies.
*/ */
GHashTable *single_hash; GHashTable *single_hash;
/* All of the ExprNames that refer to this sheet */
GHashTable *names;
}; };
typedef void (*DepFunc) (Dependent *dep, gpointer user); typedef void (*DepFunc) (Dependent *dep, gpointer user);
......
...@@ -1085,6 +1085,11 @@ do_deps_destroy (Sheet *sheet, ExprRewriteInfo const *rwinfo) ...@@ -1085,6 +1085,11 @@ do_deps_destroy (Sheet *sheet, ExprRewriteInfo const *rwinfo)
deps->single_hash = NULL; deps->single_hash = NULL;
} }
if (deps->names) {
g_hash_table_destroy (deps->names);
deps->names = NULL;
}
g_free (deps); g_free (deps);
} }
...@@ -1203,6 +1208,8 @@ dependency_data_new (void) ...@@ -1203,6 +1208,8 @@ dependency_data_new (void)
(SHEET_MAX_ROWS-1)/BUCKET_SIZE + 1); (SHEET_MAX_ROWS-1)/BUCKET_SIZE + 1);
deps->single_hash = g_hash_table_new (depsingle_hash, deps->single_hash = g_hash_table_new (depsingle_hash,
depsingle_equal); depsingle_equal);
deps->names = g_hash_table_new (g_direct_hash,
g_direct_equal);
return deps; return deps;
} }
......
...@@ -39,16 +39,18 @@ typedef enum { ...@@ -39,16 +39,18 @@ typedef enum {
struct _DependencyContainer { struct _DependencyContainer {
Dependent *dependent_list; Dependent *dependent_list;
/* /* Large ranges hashed on 'range' to accelerate duplicate culling. This
* Large ranges hashed on 'range' to accelerate duplicate * is tranversed by g_hash_table_foreach mostly.
* culling. This is tranversed by g_hash_table_foreach mostly.
*/ */
GHashTable **range_hash; GHashTable **range_hash;
/*
* Single ranges, this maps an EvalPos * to a GSList of its /* Single ranges, this maps an EvalPos * to a GSList of its
* dependencies. * dependencies.
*/ */
GHashTable *single_hash; GHashTable *single_hash;
/* All of the ExprNames that refer to this sheet */
GHashTable *names;
}; };
typedef void (*DepFunc) (Dependent *dep, gpointer user); typedef void (*DepFunc) (Dependent *dep, gpointer user);
......
...@@ -1693,6 +1693,76 @@ cellref_boundingbox (CellRef const *cr, Range *bound) ...@@ -1693,6 +1693,76 @@ cellref_boundingbox (CellRef const *cr, Range *bound)
} }
} }
static GSList *
g_slist_insert_unique (GSList *list, gpointer data)
{
if (data != NULL && g_slist_find (list, data) == NULL)
return g_slist_prepend (list, data);
return list;
}
static GSList *
do_referenced_sheets (ExprTree const *expr, GSList *sheets)
{
switch (expr->any.oper) {
case OPER_ANY_BINARY:
return do_referenced_sheets (
expr->binary.value_b,
do_referenced_sheets (
expr->binary.value_b,
sheets));
case OPER_ANY_UNARY:
return do_referenced_sheets (expr->unary.value, sheets);
case OPER_FUNCALL: {
ExprList *l;
for (l = expr->func.arg_list; l; l = l->next)
sheets = do_referenced_sheets (l->data, sheets);
return sheets;
}
case OPER_NAME:
return sheets;
case OPER_VAR:
return g_slist_insert_unique (sheets, expr->var.ref.sheet);
case OPER_CONSTANT: {
Value const *v = expr->constant.value;
if (v->type != VALUE_CELLRANGE)
return sheets;
return g_slist_insert_unique (
g_slist_insert_unique (sheets,
v->v_range.cell.a.sheet),
v->v_range.cell.b.sheet);
}
case OPER_ARRAY:
g_warning ("An array in a NAME ?");
break;
default :
break;
}
return sheets;
}
/**
* expr_tree_referenced_sheets :
* @expr :
* @sheets : usually NULL.
*
* Generates a list of the sheets referenced by the supplied expression.
* Caller must free the list.
*/
GSList *
expr_tree_referenced_sheets (ExprTree const *expr)
{
g_return_val_if_fail (expr != NULL, NULL);
return do_referenced_sheets (expr, NULL);
}
/** /**
* expr_tree_boundingbox : * expr_tree_boundingbox :
* *
......
...@@ -212,6 +212,7 @@ FunctionDefinition *expr_tree_get_func_def (ExprTree const *expr); ...@@ -212,6 +212,7 @@ FunctionDefinition *expr_tree_get_func_def (ExprTree const *expr);
Value *expr_tree_get_range (ExprTree const *expr) ; Value *expr_tree_get_range (ExprTree const *expr) ;
ExprTree const *expr_tree_first_func (ExprTree const *expr); ExprTree const *expr_tree_first_func (ExprTree const *expr);
void expr_tree_boundingbox (ExprTree const *expr, Range *bound); void expr_tree_boundingbox (ExprTree const *expr, Range *bound);
GSList *expr_tree_referenced_sheets (ExprTree const *expr);
#define expr_list_append g_slist_append #define expr_list_append g_slist_append
#define expr_list_prepend g_slist_prepend #define expr_list_prepend g_slist_prepend
......
...@@ -26,11 +26,13 @@ ...@@ -26,11 +26,13 @@
#include "style-condition.h" #include "style-condition.h"
#include "validation.h" #include "validation.h"
#include "value.h" #include "value.h"
#include "gui-util.h"
#include <libgnome/gnome-i18n.h> #include <libgnome/gnome-i18n.h>
#include <string.h> #include <string.h>
#include <locale.h> #include <locale.h>
#if 0
static char * static char *
validation_generate_msg (StyleCondition *sc) validation_generate_msg (StyleCondition *sc)
{ {
...@@ -40,8 +42,9 @@ validation_generate_msg (StyleCondition *sc) ...@@ -40,8 +42,9 @@ validation_generate_msg (StyleCondition *sc)
g_return_val_if_fail (sc != NULL, NULL); g_return_val_if_fail (sc != NULL, NULL);
s = g_string_new (_("The value you enter :\n")); s = g_string_new (_("The value you entered :\n"));
/* FIXME : this should only complain about the contraints that fail, */
/* /*
* FIXME: Some things need to be done here once we implement * FIXME: Some things need to be done here once we implement
* the other validation types. * the other validation types.
...@@ -66,7 +69,7 @@ validation_generate_msg (StyleCondition *sc) ...@@ -66,7 +69,7 @@ validation_generate_msg (StyleCondition *sc)
* on the validation action to be taken. * on the validation action to be taken.
* For "STOP" : "Must be" * For "STOP" : "Must be"
* For "WARNING" : "Should be" * For "WARNING" : "Should be"
* For "INFORMATION" : "Had best be" ? * For "INFORMATION" : "Are generally" ?
*/ */
for (sci = sc; sci != NULL; sci = sci->next) { for (sci = sc; sci != NULL; sci = sci->next) {
switch (sci->type) { switch (sci->type) {
...@@ -120,70 +123,45 @@ validation_generate_msg (StyleCondition *sc) ...@@ -120,70 +123,45 @@ validation_generate_msg (StyleCondition *sc)
g_string_free (s, FALSE); g_string_free (s, FALSE);
return t; return t;
} }
#endif
gboolean /**
validation_get_accept (GtkWindow *parent, Validation const *v) * validation_get_accept :
* 1 : ignore invalid and accept result
* 0 : discard invalid and finish editing
* -1 : continue editing
*/
int
validation_get_accept (Validation const *v, char const *title, char const *msg,
WorkbookControlGUI *wbcg)
{ {
GnomeDialog *dialog; int res0, res1, button;
const char *title = v->title ? v->title->str : NULL;
const char *msg = v->msg ? v->msg->str : NULL;
char *msg_auto = NULL;
int ret;
gboolean result = FALSE;
if (!msg || strlen (msg) == 0) GtkWidget *dialog;
msg_auto = validation_generate_msg (v->sc);
switch (v->vs) { switch (v->vs) {
case VALIDATION_STYLE_NONE :
result = TRUE;
break;
case VALIDATION_STYLE_STOP : case VALIDATION_STYLE_STOP :
dialog = GNOME_DIALOG ( res0 = -1; res1 = 0;
gnome_message_box_new ( dialog = gnome_message_box_new ( msg, GNOME_MESSAGE_BOX_ERROR,
msg_auto ? msg_auto : msg, GNOME_MESSAGE_BOX_ERROR, _("Re-Edit"), _("Discard"), NULL);
_("Ok"), NULL));
gnome_dialog_set_parent (dialog, parent);
if (title)
gtk_window_set_title (GTK_WINDOW (dialog), title);
gnome_dialog_run (dialog);
result = FALSE;
break; break;
case VALIDATION_STYLE_WARNING : case VALIDATION_STYLE_WARNING :
dialog = GNOME_DIALOG ( res0 = 1; res1 = 0;
gnome_message_box_new ( dialog = gnome_message_box_new (msg , GNOME_MESSAGE_BOX_WARNING,
msg_auto ? msg_auto : msg , GNOME_MESSAGE_BOX_WARNING, _("Accept"), _("Discard"), NULL);
_("Accept"), _("Discard"), NULL));
/* FIXME: This doesn't seem to have any effect */
gnome_dialog_set_default (dialog, 0);
gnome_dialog_set_parent (dialog, parent);
if (title)
gtk_window_set_title (GTK_WINDOW (dialog), title);
ret = gnome_dialog_run (dialog);
if (ret == 0)
result = TRUE;
else
result = FALSE;
break; break;
case VALIDATION_STYLE_INFO : case VALIDATION_STYLE_INFO :
dialog = GNOME_DIALOG ( res0 = res1 = 1;
gnome_message_box_new ( dialog = gnome_message_box_new (msg, GNOME_MESSAGE_BOX_INFO,
msg_auto ? msg_auto : msg, GNOME_MESSAGE_BOX_INFO, _("Ok"), NULL);
_("Ok"), NULL));
gnome_dialog_set_parent (dialog, parent);
if (title)
gtk_window_set_title (GTK_WINDOW (dialog), title);
gnome_dialog_run (dialog);
result = TRUE;
break; break;
default : default : g_return_val_if_fail (FALSE, 1);
g_warning ("Unknown validation handler");
result = FALSE;
} }
if (msg_auto) if (title)
g_free (msg_auto); gtk_window_set_title (GTK_WINDOW (dialog), title);
gnome_dialog_set_default (GNOME_DIALOG (dialog), 0);
button = gnumeric_dialog_run (wbcg, GNOME_DIALOG (dialog));
return result; return (button != 1) ? res0 : res1;
} }
#ifndef GNUMERIC_GUI_VALIDATION_H #ifndef GNUMERIC_GUI_VALIDATION_H
#define GNUMERIC_GUI_VALIDATION_H #define GNUMERIC_GUI_VALIDATION_H
#include "workbook-control-gui.h" #include "gui-gnumeric.h"
#include "mstyle.h"
gboolean validation_get_accept (GtkWindow *parent, Validation const *v); int validation_get_accept (Validation const *v,
char const *title, char const *msg,
WorkbookControlGUI *wbcg);
#endif /* GNUMERIC_GUI_VALIDATION_H */ #endif /* GNUMERIC_GUI_VALIDATION_H */
...@@ -232,12 +232,8 @@ style_condition_expr_eval (StyleConditionExpr *sce, Value *val, StyleFormat *for ...@@ -232,12 +232,8 @@ style_condition_expr_eval (StyleConditionExpr *sce, Value *val, StyleFormat *for
{ {
ValueCompare vc; ValueCompare vc;
/*
* Apparantly no eval has been done yet, so
* we'll have to force it.
*/
if (sce->val == NULL) { if (sce->val == NULL) {
g_return_val_if_fail (dependent_needs_recalc (&sce->dep), FALSE); sce->dep.flags |= DEPENDENT_NEEDS_RECALC;
dependent_eval (&sce->dep); dependent_eval (&sce->dep);
g_return_val_if_fail (sce->val != NULL, FALSE); g_return_val_if_fail (sce->val != NULL, FALSE);
} }
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "workbook-edit.h" #include "workbook-edit.h"
#include "workbook.h" #include "workbook.h"
#include "sheet.h" #include "sheet.h"
#include "sheet-merge.h"
#include "sheet-private.h" #include "sheet-private.h"
#include "sheet-control-gui-priv.h" #include "sheet-control-gui-priv.h"
#include "gnumeric-canvas.h" #include "gnumeric-canvas.h"
...@@ -1907,6 +1908,7 @@ cb_view_freeze_panes (GtkWidget *widget, WorkbookControlGUI *wbcg) ...@@ -1907,6 +1908,7 @@ cb_view_freeze_panes (GtkWidget *widget, WorkbookControlGUI *wbcg)
Sheet *sheet = wb_control_cur_sheet (wbc); Sheet *sheet = wb_control_cur_sheet (wbc);
SheetControlGUI *scg = wb_control_gui_cur_sheet (wbcg); SheetControlGUI *scg = wb_control_gui_cur_sheet (wbcg);
scg_mode_edit (SHEET_CONTROL (scg));
if (scg->active_panes == 1) { if (scg->active_panes == 1) {
CellPos frozen_tl, unfrozen_tl; CellPos frozen_tl, unfrozen_tl;
GnumericCanvas const *gcanvas = scg_pane (scg, 0); GnumericCanvas const *gcanvas = scg_pane (scg, 0);
......
...@@ -128,45 +128,49 @@ wbcg_edit_error_dialog (WorkbookControlGUI *wbcg, char *str) ...@@ -128,45 +128,49 @@ wbcg_edit_error_dialog (WorkbookControlGUI *wbcg, char *str)
/** /**
* wbcg_edit_validate: * wbcg_edit_validate:
* *
* Either pass @tree or @val. * Either pass @expr or @val.
* The parameters will be validated against the * The parameters will be validated against the
* validation set in the MStyle if applicable. * validation set in the MStyle if applicable.
* *
* Return value: TRUE if the validation checks out ok, FALSE otherwise. * Return value:
* 1 : things validate
* 0 : things do not validate and should be discarded
* -1 : things do not validate and editing should continue
**/ **/
static gboolean static int
wbcg_edit_validate (WorkbookControlGUI *wbcg, MStyle const *mstyle, wbcg_edit_validate (WorkbookControlGUI *wbcg, MStyle const *mstyle,
ExprTree const *tree, Value *val) ExprTree const *expr, Value *val)
{ {
Validation *v; Validation *v = mstyle_get_validation (mstyle);
StyleCondition *sc; int result = 1;
Sheet *sheet;
gboolean result = TRUE;
v = mstyle_get_validation (mstyle);
g_return_val_if_fail (mstyle_is_element_set (mstyle, MSTYLE_VALIDATION), TRUE);
sc = v->sc; g_return_val_if_fail (v != NULL, 1);
sheet = wbcg->editing_sheet;
if (sc) { if (v->sc != NULL) {
Value *valt; Value *tmp;
Cell *cell = sheet_cell_get (sheet, sheet->edit_pos.col, sheet->edit_pos.row); Sheet *sheet = wbcg->editing_sheet;
Cell *cell = sheet_cell_get (sheet,
sheet->edit_pos.col, sheet->edit_pos.row);
if (!val) { if (expr != NULL) {
EvalPos ep; EvalPos ep;
valt = expr_eval (tree, eval_pos_init (&ep, sheet, &sheet->edit_pos), 0); tmp = expr_eval (expr, eval_pos_init_cell (&ep, cell),
EVAL_STRICT);
} else } else
valt = val; tmp = val;
g_return_val_if_fail (valt != NULL, FALSE); if (!style_condition_eval (v->sc, tmp, cell ? cell->format : NULL) &&
v->vs != VALIDATION_STYLE_NONE) {
result = style_condition_eval (sc, valt, cell ? cell->format : NULL); char const *title = (v->title && v->title->str[0]) ? v->title->str
if (!val) : _("Gnumeric : Validation");
value_release (valt); char const *msg = (v->msg && v->msg->str[0]) ? v->msg->str
: _("That value is invalid.\n"
"Restrictions have been placed on this cell's content.");
result = validation_get_accept (v, title, msg, wbcg);
}
if (!result) if (tmp != val)
result = validation_get_accept (wbcg->toplevel, v); value_release (tmp);
} }
return result; return result;
...@@ -262,7 +266,14 @@ wbcg_edit_finish (WorkbookControlGUI *wbcg, gboolean accept) ...@@ -262,7 +266,14 @@ wbcg_edit_finish (WorkbookControlGUI *wbcg, gboolean accept)
} }
if (mstyle_is_element_set (mstyle, MSTYLE_VALIDATION)) if (mstyle_is_element_set (mstyle, MSTYLE_VALIDATION))
is_valid = wbcg_edit_validate (wbcg, mstyle, expr, value); switch (wbcg_edit_validate (wbcg, mstyle, expr, value)) {
case 1 : is_valid = TRUE; break;
case 0 : is_valid = FALSE; break;
case -1 : gtk_window_set_focus (GTK_WINDOW (wbcg->toplevel),
GTK_WIDGET (wbcg_get_entry (wbcg)));
return FALSE;
};
if (value != NULL) if (value != NULL)
value_release (value); value_release (value);
if (expr != NULL) if (expr != NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment