gnumeric r16469 - in trunk: . src/dialogs
- From: mortenw svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r16469 - in trunk: . src/dialogs
- Date: Fri, 14 Mar 2008 01:05:59 +0000 (GMT)
Author: mortenw
Date: Fri Mar 14 01:05:58 2008
New Revision: 16469
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16469&view=rev
Log:
2008-03-13 Morten Welinder <terra gnome org>
* dialog-cell-format.c (fmt_dialog_changed): Disable Apply and Ok
when the format is invalid. Fixes #521849.
Modified:
trunk/NEWS
trunk/src/dialogs/ChangeLog
trunk/src/dialogs/dialog-cell-format.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Fri Mar 14 01:05:58 2008
@@ -55,6 +55,7 @@
* Fix inc/dec buttons for General. [#510252]
* Don't allocate memory for boolean values. [#518527]
* Ignore invalid formats read from .gnumeric and .xls. [#521849]
+ * Don't allow entry of invalid formats for cells. [#521849]
Nick Lamb:
* Honour detachable-toolbar preference. [#321867]
Modified: trunk/src/dialogs/dialog-cell-format.c
==============================================================================
--- trunk/src/dialogs/dialog-cell-format.c (original)
+++ trunk/src/dialogs/dialog-cell-format.c Fri Mar 14 01:05:58 2008
@@ -47,11 +47,9 @@
#include <validation.h>
#include <workbook.h>
#include <wbc-gtk.h>
-#include <workbook-view.h>
#include <commands.h>
#include <mathfunc.h>
#include <preview-grid.h>
-#include <widgets/gnumeric-expr-entry.h>
#include <widgets/widget-font-selector.h>
#include <widgets/gnumeric-dashed-canvas-line.h>
#include <widgets/gnm-format-sel.h>
@@ -64,24 +62,8 @@
#include <goffice/cut-n-paste/foocanvas/foo-canvas-util.h>
#include <goffice/cut-n-paste/foocanvas/foo-canvas-rect-ellipse.h>
#include <glade/glade.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtknotebook.h>
-#include <gtk/gtkcheckbutton.h>
-#include <gtk/gtkspinbutton.h>
-#include <gtk/gtktogglebutton.h>
-#include <gtk/gtkframe.h>
-#include <gtk/gtkimage.h>
-#include <gtk/gtkcombobox.h>
-#include <gtk/gtkcelllayout.h>
-#include <gtk/gtkcellrenderertext.h>
-#include <gtk/gtkcellrendererpixbuf.h>
-#include <gtk/gtktextview.h>
-#include <gtk/gtkstock.h>
-#include <gtk/gtktable.h>
-#include <gtk/gtkicontheme.h>
-#include <gtk/gtkbox.h>
+#include <gtk/gtk.h>
-#include <math.h>
#include <string.h>
static struct {
@@ -244,8 +226,14 @@
if (state->dialog_changed)
state->dialog_changed (state->dialog_changed_user_data);
- else
- gtk_widget_set_sensitive (state->apply_button, TRUE);
+ else {
+ GOFormatSel *gfs = GO_FORMAT_SEL (state->format_sel);
+ GOFormat *fmt = go_format_sel_get_fmt (gfs);
+ gboolean ok = !go_format_is_invalid (fmt);
+
+ gtk_widget_set_sensitive (state->apply_button, ok);
+ gtk_widget_set_sensitive (state->ok_button, ok);
+ }
}
/* Default to the 'Format' page but remember which page we were on between
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]