r15135 - gnucash/branches/2.0 - Backport change to fix #378881
Derek Atkins
warlord at cvs.gnucash.org
Fri Nov 24 13:42:02 EST 2006
Author: warlord
Date: 2006-11-24 13:42:01 -0500 (Fri, 24 Nov 2006)
New Revision: 15135
Trac: http://svn.gnucash.org/trac/changeset/15135
Modified:
gnucash/branches/2.0/
gnucash/branches/2.0/ChangeLog
gnucash/branches/2.0/src/core-utils/gnc-gconf-utils.c
gnucash/branches/2.0/src/core-utils/gnc-gconf-utils.h
gnucash/branches/2.0/src/gnome-utils/dialog-utils.c
gnucash/branches/2.0/src/gnome/dialog-print-check.c
Log:
Backport change to fix #378881
Lessen restriction of the parameter whoami of the gnc_gconf_add/
remove_notification functions. Now the pair of section and whoami
has to be unique, as GncMainWindow adds notifications to two
different sections. Extends r14675. Remove a superfluous leading
slash and doubly defined gconf key macros.
Correct gnc_gconf_add/remove_notification to avoid printf'ing NULL and
therefore crashes on Solaris and Windows. r14675 had fixed that, r14945
(me) undermined it though. (#378881).
Merges r14945 and r15041.
Property changes on: gnucash/branches/2.0
___________________________________________________________________
Name: svk:merge
- 3889ce50-311e-0410-a464-f059747ec5d1:/local/gnucash/branches/2.0:697
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/branches/2.0:13501
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk:13282
+ 3889ce50-311e-0410-a464-f059747ec5d1:/local/gnucash/branches/2.0:697
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/branches/2.0:13613
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk:13282
Modified: gnucash/branches/2.0/ChangeLog
===================================================================
--- gnucash/branches/2.0/ChangeLog 2006-11-24 14:04:43 UTC (rev 15134)
+++ gnucash/branches/2.0/ChangeLog 2006-11-24 18:42:01 UTC (rev 15135)
@@ -4,6 +4,18 @@
'gnucash-docs' package when Help is selected with no
content. Fixes #347102.
+2006-10-09 Andreas Köhler <andi5.py at gmx.net>
+
+ Lessen restriction of the parameter whoami of the gnc_gconf_add/
+ remove_notification functions. Now the pair of section and whoami
+ has to be unique, as GncMainWindow adds notifications to two
+ different sections. Extends r14675. Remove a superfluous leading
+ slash and doubly defined gconf key macros.
+
+ Correct gnc_gconf_add/remove_notification to avoid printf'ing NULL and
+ therefore crashes on Solaris and Windows. r14675 had fixed that, r14945
+ (me) undermined it though. (#378881).
+
2006-10-08 Chris Lyttle <chris at wilddev.net>
* NEWS: Added some text about the release.
Modified: gnucash/branches/2.0/src/core-utils/gnc-gconf-utils.c
===================================================================
--- gnucash/branches/2.0/src/core-utils/gnc-gconf-utils.c 2006-11-24 14:04:43 UTC (rev 15134)
+++ gnucash/branches/2.0/src/core-utils/gnc-gconf-utils.c 2006-11-24 18:42:01 UTC (rev 15135)
@@ -29,8 +29,8 @@
#include "gnc-gconf-utils.h"
#define APP_GNUCASH "/apps/gnucash"
-#define CLIENT_TAG "%s-client"
-#define NOTIFY_TAG "%s-notify_id"
+#define CLIENT_TAG "%s-%s-client"
+#define NOTIFY_TAG "%s-%s-notify_id"
static GConfClient *our_client = NULL;
static guint gconf_general_cb_id = 0;
@@ -787,8 +787,8 @@
/*
* Save the values needed to undo this later.
*/
- client_tag = g_strdup_printf(CLIENT_TAG, whoami);
- notify_tag = g_strdup_printf(NOTIFY_TAG, whoami);
+ client_tag = g_strdup_printf(CLIENT_TAG, section ? section:"", whoami);
+ notify_tag = g_strdup_printf(NOTIFY_TAG, section ? section:"", whoami);
g_object_set_data(object, client_tag, client);
g_object_set_data(object, notify_tag, GUINT_TO_POINTER(id));
g_free(notify_tag);
@@ -858,11 +858,11 @@
/*
* Remove any gconf notifications
*/
- client_tag = g_strdup_printf(CLIENT_TAG, whoami);
+ client_tag = g_strdup_printf(CLIENT_TAG, section ? section:"", whoami);
client = g_object_get_data(object, client_tag);
path = gnc_gconf_section_name(section);
if (client) {
- notify_tag = g_strdup_printf(NOTIFY_TAG, whoami);
+ notify_tag = g_strdup_printf(NOTIFY_TAG, section ? section:"", whoami);
id = GPOINTER_TO_UINT(g_object_get_data(object, notify_tag));
gconf_client_notify_remove(client, id);
gconf_client_remove_dir(client, path, NULL);
Modified: gnucash/branches/2.0/src/core-utils/gnc-gconf-utils.h
===================================================================
--- gnucash/branches/2.0/src/core-utils/gnc-gconf-utils.h 2006-11-24 14:04:43 UTC (rev 15134)
+++ gnucash/branches/2.0/src/core-utils/gnc-gconf-utils.h 2006-11-24 18:42:01 UTC (rev 15135)
@@ -56,7 +56,7 @@
#define GCONF_WARNINGS_PERM "general/warnings/permanent"
/* Keys used across multiple modules */
-#define DESKTOP_GNOME_INTERFACE "/desktop/gnome/interface"
+#define DESKTOP_GNOME_INTERFACE "desktop/gnome/interface"
#define KEY_TOOLBAR_STYLE "toolbar_style"
#define KEY_SAVE_GEOMETRY "save_window_geometry"
#define KEY_LAST_PATH "last_path"
@@ -767,8 +767,8 @@
* 'object' argument to this function as another of its arguments.
*
* @param whoami A magic value that must match up this call to the
- * corresponding call to gnc_gconf_remove_notification(). This value
- * should be unique across all callers.
+ * corresponding call to gnc_gconf_remove_notification(). The pair of
+ * section and whoami should be unique across all callers.
*/
void gnc_gconf_add_notification (GObject *object,
const gchar *section,
@@ -827,8 +827,8 @@
* notification function to remove from GConf.
*
* @param whoami A magic value that must match up this call to the
- * corresponding call to gnc_gconf_add_notification(). This value
- * should be unique across all callers.
+ * corresponding call to gnc_gconf_add_notification(). The pair of
+ * section and whoami should be unique across all callers.
*/
void gnc_gconf_remove_notification (GObject *object,
const gchar *section,
Modified: gnucash/branches/2.0/src/gnome/dialog-print-check.c
===================================================================
--- gnucash/branches/2.0/src/gnome/dialog-print-check.c 2006-11-24 14:04:43 UTC (rev 15134)
+++ gnucash/branches/2.0/src/gnome/dialog-print-check.c 2006-11-24 18:42:01 UTC (rev 15135)
@@ -45,7 +45,6 @@
#define GCONF_SECTION "dialogs/print_checks"
#define KEY_CHECK_FORMAT "check_format"
#define KEY_CHECK_POSITION "check_position"
-#define KEY_DATE_FORMAT "date_format"
#define KEY_DATE_FORMAT_USER "date_format_custom"
#define KEY_CUSTOM_PAYEE "custom_payee"
#define KEY_CUSTOM_DATE "custom_date"
Modified: gnucash/branches/2.0/src/gnome-utils/dialog-utils.c
===================================================================
--- gnucash/branches/2.0/src/gnome-utils/dialog-utils.c 2006-11-24 14:04:43 UTC (rev 15134)
+++ gnucash/branches/2.0/src/gnome-utils/dialog-utils.c 2006-11-24 18:42:01 UTC (rev 15135)
@@ -50,9 +50,6 @@
#define WINDOW_POSITION "window_position"
#define WINDOW_GEOMETRY "window_geometry"
-#define DESKTOP_GNOME_INTERFACE "/desktop/gnome/interface"
-#define KEY_TOOLBAR_STYLE "toolbar_style"
-
/* =========================================================== */
static void
More information about the gnucash-changes
mailing list