[gnumeric] add preference settings for cell function and extension markers
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] add preference settings for cell function and extension markers
- Date: Fri, 21 Oct 2011 17:49:40 +0000 (UTC)
commit 57f791f04d161e75b098d2b775d4891a68963272
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Fri Oct 21 11:48:54 2011 -0600
add preference settings for cell function and extension markers
2011-10-21 Andreas J. Guelzow <aguelzow pyrshep ca>
* schemas/gnumeric-general.schemas.in: add
/apps/gnumeric/core/gui/cells/function_markers and
/apps/gnumeric/core/gui/cells/extension_markers
* src/gnumeric-gconf.c: update schema generated code
* src/gnumeric-gconf.h: update schema generated code
* src/workbook-view.c (workbook_view_new): initialize from
above preferences
2011-10-21 Andreas J. Guelzow <aguelzow pyrshep ca>
* dialog-preferences.c (pref_window_page_initializer): add cell marker
check boxes
ChangeLog | 10 +++++++
schemas/gnumeric-general.schemas.in | 22 +++++++++++++++
src/dialogs/ChangeLog | 5 +++
src/dialogs/dialog-preferences.c | 12 +++++++-
src/gnumeric-gconf.c | 52 +++++++++++++++++++++++++++++++++++
src/gnumeric-gconf.h | 8 +++++
src/workbook-view.c | 4 +-
7 files changed, 110 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ec35c8d..ca89d76 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2011-10-21 Andreas J. Guelzow <aguelzow pyrshep ca>
+ * schemas/gnumeric-general.schemas.in: add
+ /apps/gnumeric/core/gui/cells/function_markers and
+ /apps/gnumeric/core/gui/cells/extension_markers
+ * src/gnumeric-gconf.c: update schema generated code
+ * src/gnumeric-gconf.h: update schema generated code
+ * src/workbook-view.c (workbook_view_new): initialize from
+ above preferences
+
+2011-10-21 Andreas J. Guelzow <aguelzow pyrshep ca>
+
* src/cell-draw.h (cell_draw): add argument
* src/cell-draw.c (cell_draw_extension_mark_bottom): new
(cell_draw_extension_mark_left): new
diff --git a/schemas/gnumeric-general.schemas.in b/schemas/gnumeric-general.schemas.in
index 986e76e..f76e6f0 100644
--- a/schemas/gnumeric-general.schemas.in
+++ b/schemas/gnumeric-general.schemas.in
@@ -267,6 +267,28 @@
</locale>
</schema>
<schema>
+ <key>/schemas/apps/gnumeric/core/gui/cells/function_markers</key>
+ <applyto>/apps/gnumeric/core/gui/cells/function_markers</applyto>
+ <owner>Gnumeric</owner>
+ <type>bool</type>
+ <default>FALSE</default>
+ <locale name="C">
+ <short>Function Markers</short>
+ <long>This variable determines whether cells containing spreadsheet function are marked.</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/apps/gnumeric/core/gui/cells/extension_markers</key>
+ <applyto>/apps/gnumeric/core/gui/cells/extension_markers</applyto>
+ <owner>Gnumeric</owner>
+ <type>bool</type>
+ <default>FALSE</default>
+ <locale name="C">
+ <short>Extension Markers</short>
+ <long>This variable determines whether cells with truncated content are marked.</long>
+ </locale>
+ </schema>
+ <schema>
<key>/schemas/apps/gnumeric/core/gui/editing/function-name-tooltips</key>
<applyto>/apps/gnumeric/core/gui/editing/function-name-tooltips</applyto>
<owner>Gnumeric</owner>
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index 24364fe..a326504 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,5 +1,10 @@
2011-10-21 Andreas J. Guelzow <aguelzow pyrshep ca>
+ * dialog-preferences.c (pref_window_page_initializer): add cell marker
+ check boxes
+
+2011-10-21 Andreas J. Guelzow <aguelzow pyrshep ca>
+
* dialog-workbook-attr.c (attr_dialog_init_cell_marker_page): handle
cell extension toggle
* workbook-attr.ui: add cell extension marker toggle
diff --git a/src/dialogs/dialog-preferences.c b/src/dialogs/dialog-preferences.c
index 3a54817..0fe968a 100644
--- a/src/dialogs/dialog-preferences.c
+++ b/src/dialogs/dialog-preferences.c
@@ -856,10 +856,20 @@ pref_window_page_initializer (PrefState *state,
power_of_2_handlers (w);
bool_pref_create_widget (gnm_conf_get_core_gui_editing_livescrolling_node (),
- page, row++,
+ page, row++,
gnm_conf_set_core_gui_editing_livescrolling,
gnm_conf_get_core_gui_editing_livescrolling,
_("Live Scrolling"));
+ bool_pref_create_widget (gnm_conf_get_core_gui_cells_function_markers_node (),
+ page, row++,
+ gnm_conf_set_core_gui_cells_function_markers,
+ gnm_conf_get_core_gui_cells_function_markers,
+ _("By default, mark cells with spreadsheet functions"));
+ bool_pref_create_widget (gnm_conf_get_core_gui_cells_extension_markers_node (),
+ page, row++,
+ gnm_conf_set_core_gui_cells_extension_markers,
+ gnm_conf_get_core_gui_cells_extension_markers,
+ _("By default, mark cells with truncated content"));
gtk_widget_show_all (page);
return page;
diff --git a/src/gnumeric-gconf.c b/src/gnumeric-gconf.c
index 9267f83..e53d071 100644
--- a/src/gnumeric-gconf.c
+++ b/src/gnumeric-gconf.c
@@ -1076,6 +1076,58 @@ gnm_conf_get_core_file_save_single_sheet_node (void)
return get_node (watch_core_file_save_single_sheet.key);
}
+static struct cb_watch_bool watch_core_gui_cells_extension_markers = {
+ 0, "core/gui/cells/extension_markers", FALSE,
+};
+
+gboolean
+gnm_conf_get_core_gui_cells_extension_markers (void)
+{
+ if (!watch_core_gui_cells_extension_markers.handler)
+ watch_bool (&watch_core_gui_cells_extension_markers);
+ return watch_core_gui_cells_extension_markers.var;
+}
+
+void
+gnm_conf_set_core_gui_cells_extension_markers (gboolean x)
+{
+ if (!watch_core_gui_cells_extension_markers.handler)
+ watch_bool (&watch_core_gui_cells_extension_markers);
+ set_bool (&watch_core_gui_cells_extension_markers, x);
+}
+
+GOConfNode *
+gnm_conf_get_core_gui_cells_extension_markers_node (void)
+{
+ return get_node (watch_core_gui_cells_extension_markers.key);
+}
+
+static struct cb_watch_bool watch_core_gui_cells_function_markers = {
+ 0, "core/gui/cells/function_markers", FALSE,
+};
+
+gboolean
+gnm_conf_get_core_gui_cells_function_markers (void)
+{
+ if (!watch_core_gui_cells_function_markers.handler)
+ watch_bool (&watch_core_gui_cells_function_markers);
+ return watch_core_gui_cells_function_markers.var;
+}
+
+void
+gnm_conf_set_core_gui_cells_function_markers (gboolean x)
+{
+ if (!watch_core_gui_cells_function_markers.handler)
+ watch_bool (&watch_core_gui_cells_function_markers);
+ set_bool (&watch_core_gui_cells_function_markers, x);
+}
+
+GOConfNode *
+gnm_conf_get_core_gui_cells_function_markers_node (void)
+{
+ return get_node (watch_core_gui_cells_function_markers.key);
+}
+
static struct cb_watch_bool watch_core_gui_editing_autocomplete = {
0, "core/gui/editing/autocomplete", TRUE,
};
diff --git a/src/gnumeric-gconf.h b/src/gnumeric-gconf.h
index 66f6527..f9559fc 100644
--- a/src/gnumeric-gconf.h
+++ b/src/gnumeric-gconf.h
@@ -97,6 +97,14 @@ GOConfNode *gnm_conf_get_core_file_save_single_sheet_node (void);
gboolean gnm_conf_get_core_file_save_single_sheet (void);
void gnm_conf_set_core_file_save_single_sheet (gboolean);
+GOConfNode *gnm_conf_get_core_gui_cells_extension_markers_node (void);
+gboolean gnm_conf_get_core_gui_cells_extension_markers (void);
+void gnm_conf_set_core_gui_cells_extension_markers (gboolean);
+
+GOConfNode *gnm_conf_get_core_gui_cells_function_markers_node (void);
+gboolean gnm_conf_get_core_gui_cells_function_markers (void);
+void gnm_conf_set_core_gui_cells_function_markers (gboolean);
+
GOConfNode *gnm_conf_get_core_gui_editing_autocomplete_node (void);
gboolean gnm_conf_get_core_gui_editing_autocomplete (void);
void gnm_conf_set_core_gui_editing_autocomplete (gboolean);
diff --git a/src/workbook-view.c b/src/workbook-view.c
index 44b7a01..72013c6 100644
--- a/src/workbook-view.c
+++ b/src/workbook-view.c
@@ -1037,8 +1037,8 @@ workbook_view_new (Workbook *wb)
wbv->show_horizontal_scrollbar = TRUE;
wbv->show_vertical_scrollbar = TRUE;
wbv->show_notebook_tabs = TRUE;
- wbv->show_function_cell_markers = FALSE;
- wbv->show_extension_markers = FALSE;
+ wbv->show_function_cell_markers = gnm_conf_get_core_gui_cells_function_markers ();
+ wbv->show_extension_markers = gnm_conf_get_core_gui_cells_extension_markers ();
wbv->do_auto_completion = gnm_conf_get_core_gui_editing_autocomplete ();
wbv->is_protected = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]