[gnumeric] Editing: make sure two wbcgtks do not interfere with each other.
- From: Morten Welinder <mortenw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnumeric] Editing: make sure two wbcgtks do not interfere with each other.
- Date: Wed, 9 Sep 2009 14:06:07 +0000 (UTC)
commit e17ea3c767b64daafb7798ca0b6afe96a7f42740
Author: Morten Welinder <terra gnome org>
Date: Wed Sep 9 10:05:24 2009 -0400
Editing: make sure two wbcgtks do not interfere with each other.
ChangeLog | 5 +++++
src/wbc-gtk-edit.c | 14 +++++---------
src/wbc-gtk-impl.h | 1 +
3 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 0c33d7f..d7a7e8b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-09-09 Morten Welinder <terra gnome org>
+
+ * src/wbc-gtk-edit.c (wbcg_edit_start): Make "inside_editing" a
+ member variable instead of a static.
+
2009-09-08 Morten Welinder <terra gnome org>
* src/item-cursor.c (item_cursor_button_released): Clear status
diff --git a/src/wbc-gtk-edit.c b/src/wbc-gtk-edit.c
index 0ce6111..11b70c5 100644
--- a/src/wbc-gtk-edit.c
+++ b/src/wbc-gtk-edit.c
@@ -683,10 +683,6 @@ gboolean
wbcg_edit_start (WBCGtk *wbcg,
gboolean blankp, gboolean cursorp)
{
- /*
- * FIXME! static? At worst this should sit in wbcg.
- */
- static gboolean inside_editing = FALSE;
/* We could save this, but the situation is rare, if confusing. */
static gboolean warn_on_text_format = TRUE;
SheetView *sv;
@@ -703,9 +699,9 @@ wbcg_edit_start (WBCGtk *wbcg,
return TRUE;
/* Avoid recursion, and do not begin editing if a guru is up */
- if (inside_editing || wbc_gtk_get_guru (wbcg) != NULL)
+ if (wbcg->inside_editing || wbc_gtk_get_guru (wbcg) != NULL)
return TRUE;
- inside_editing = TRUE;
+ wbcg->inside_editing = TRUE;
wbv = wb_control_view (WORKBOOK_CONTROL (wbcg));
sv = wb_control_cur_sheet_view (WORKBOOK_CONTROL (wbcg));
@@ -727,7 +723,7 @@ wbcg_edit_start (WBCGtk *wbcg,
wb_view_is_protected (wbv, FALSE)
? _("Unprotect the workbook to enable editing.")
: _("Unprotect the sheet to enable editing."));
- inside_editing = FALSE;
+ wbcg->inside_editing = FALSE;
g_free (pos);
return FALSE;
}
@@ -776,7 +772,7 @@ wbcg_edit_start (WBCGtk *wbcg,
}
default:
case GTK_RESPONSE_CANCEL:
- inside_editing = FALSE;
+ wbcg->inside_editing = FALSE;
return FALSE;
case GTK_RESPONSE_OK:
break;
@@ -958,7 +954,7 @@ wbcg_edit_start (WBCGtk *wbcg,
g_free (text);
wb_control_update_action_sensitivity (WORKBOOK_CONTROL (wbcg));
- inside_editing = FALSE;
+ wbcg->inside_editing = FALSE;
gtk_editable_set_position (GTK_EDITABLE (wbcg_get_entry (wbcg)), cursor_pos);
diff --git a/src/wbc-gtk-impl.h b/src/wbc-gtk-impl.h
index 8b07c9b..9bb7b2d 100644
--- a/src/wbc-gtk-impl.h
+++ b/src/wbc-gtk-impl.h
@@ -58,6 +58,7 @@ struct _WBCGtk {
GtkWidget *func_button;
gboolean updating_ui;
+ gboolean inside_editing;
/* Auto completion */
GObject *auto_complete; /* GType is (Complete *) */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]