[gnumeric] Conf: make auto-correct react correctly to configuration changes.
- From: Morten Welinder <mortenw src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnumeric] Conf: make auto-correct react correctly to configuration changes.
- Date: Wed, 1 Jul 2009 13:39:33 +0000 (UTC)
commit b104db7dc2c87ea72ad0ff11a0bef9d06ca3f92a
Author: Morten Welinder <terra gnome org>
Date: Wed Jul 1 09:38:55 2009 -0400
Conf: make auto-correct react correctly to configuration changes.
plugins/fn-logical/functions.c | 1 -
src/gnm-pane.c | 8 ++++----
src/gnumeric-gconf.c | 2 ++
src/tools/ChangeLog | 5 +++++
src/tools/auto-correct.c | 10 ++++------
5 files changed, 15 insertions(+), 11 deletions(-)
---
diff --git a/plugins/fn-logical/functions.c b/plugins/fn-logical/functions.c
index bdefe80..9efb370 100644
--- a/plugins/fn-logical/functions.c
+++ b/plugins/fn-logical/functions.c
@@ -182,7 +182,6 @@ static GnmFuncHelp const help_xor[] = {
{ GNM_FUNC_HELP_NOTE, F_("Strings and empty values are ignored.")},
{ GNM_FUNC_HELP_NOTE, F_("If no logical values are provided, then the error #VALUE! is returned.")},
{ GNM_FUNC_HELP_NOTE, F_("This function is strict: if any argument is an error, the result will be the first such error.")},
- { GNM_FUNC_HELP_EXCEL, F_("This function is Excel compatible.") },
{ GNM_FUNC_HELP_EXAMPLES, "=XOR(TRUE,FALSE)" },
{ GNM_FUNC_HELP_EXAMPLES, "=XOR(0,1)" },
{ GNM_FUNC_HELP_EXAMPLES, "=XOR(TRUE,NA())" },
diff --git a/src/gnm-pane.c b/src/gnm-pane.c
index 7ba4a23..37ee3c1 100644
--- a/src/gnm-pane.c
+++ b/src/gnm-pane.c
@@ -1025,7 +1025,7 @@ cb_pane_drag_data_received (GtkWidget *widget, GdkDragContext *context,
#ifdef DEBUG_DND
{
gchar *target_name = gdk_atom_name (selection_data->target);
- g_print ("drag-data-received - %s\n", target_name);
+ g_printerr ("drag-data-received - %s\n", target_name);
g_free (target_name);
}
#endif
@@ -1044,7 +1044,7 @@ cb_pane_drag_data_get (GtkWidget *widget, GdkDragContext *context,
{
#ifdef DEBUG_DND
gchar *target_name = gdk_atom_name (selection_data->target);
- g_print ("drag-data-get - %s \n", target_name);
+ g_printerr ("drag-data-get - %s \n", target_name);
g_free (target_name);
#endif
scg_drag_data_get (scg, selection_data);
@@ -2607,11 +2607,11 @@ gnm_pane_drag_begin (GnmPane *pane, SheetObject *so, GdkEvent *event)
#ifdef DEBUG_DND
{
GList *l;
- g_print ("%d offered formats:\n", g_list_length (targets->list));
+ g_printerr ("%d offered formats:\n", g_list_length (targets->list));
for (l = targets->list; l; l = l->next) {
GtkTargetPair *pair = (GtkTargetPair *)l->data;
char *target_name = gdk_atom_name (pair->target);
- g_print ("%s\n", target_name);
+ g_printerr ("%s\n", target_name);
g_free (target_name);
}
}
diff --git a/src/gnumeric-gconf.c b/src/gnumeric-gconf.c
index 229386d..45d684a 100644
--- a/src/gnumeric-gconf.c
+++ b/src/gnumeric-gconf.c
@@ -256,6 +256,7 @@ gnm_conf_get_print_settings (void)
GSList *list = gnm_conf_get_printsetup_gtk_setting ();
while (list && list->next) {
+ /* For historical reasons, value comes before key. */
const char *value = list->data;
const char *key = list->next->data;
@@ -271,6 +272,7 @@ gnm_gconf_set_print_settings_cb (const gchar *key, const gchar *value, gpointer
{
GSList **list = user_data;
+ /* For historical reasons, value comes before key. */
*list = g_slist_prepend (*list, g_strdup (key));
*list = g_slist_prepend (*list, g_strdup (value));
}
diff --git a/src/tools/ChangeLog b/src/tools/ChangeLog
index 70388c1..9a871a4 100644
--- a/src/tools/ChangeLog
+++ b/src/tools/ChangeLog
@@ -1,3 +1,8 @@
+2009-07-01 Morten Welinder <terra gnome org>
+
+ * auto-correct.c (autocorrect_init): Monitor the right
+ configuration directory.
+
2009-06-20 Morten Welinder <terra gnome org>
* Release 1.9.9
diff --git a/src/tools/auto-correct.c b/src/tools/auto-correct.c
index f0b0e66..8d4108a 100644
--- a/src/tools/auto-correct.c
+++ b/src/tools/auto-correct.c
@@ -91,16 +91,14 @@ cb_autocorrect_update (GOConfNode *node, gchar const *key, gpointer data)
static void
autocorrect_init (void)
{
- GOConfNode *node;
-
if (autocorrect.notification_id != 0)
return;
autocorrect_load ();
- node = go_conf_get_node (gnm_conf_get_root (), AUTOCORRECT_DIRECTORY);
- autocorrect.notification_id = go_conf_add_monitor (
- node, AUTOCORRECT_DIRECTORY, &cb_autocorrect_update, NULL);
- go_conf_free_node (node);
+ autocorrect.notification_id =
+ go_conf_add_monitor (gnm_conf_get_root (),
+ AUTOCORRECT_DIRECTORY,
+ &cb_autocorrect_update, NULL);
g_object_set_data_full (gnm_app_get_app (),
"ToolsAutoCorrect", GINT_TO_POINTER (1),
(GDestroyNotify) autocorrect_clear);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]