r14526 - gnucash/branches/register-rewrite/src/gnome-utils - Better error handling when an unknown GtkAction is used.
Chris Shoemaker
chris at cvs.gnucash.org
Sun Jul 16 20:04:55 EDT 2006
Author: chris
Date: 2006-07-16 20:04:54 -0400 (Sun, 16 Jul 2006)
New Revision: 14526
Trac: http://svn.gnucash.org/trac/changeset/14526
Modified:
gnucash/branches/register-rewrite/src/gnome-utils/gnc-plugin.c
Log:
Better error handling when an unknown GtkAction is used.
Modified: gnucash/branches/register-rewrite/src/gnome-utils/gnc-plugin.c
===================================================================
--- gnucash/branches/register-rewrite/src/gnome-utils/gnc-plugin.c 2006-07-17 00:00:38 UTC (rev 14525)
+++ gnucash/branches/register-rewrite/src/gnome-utils/gnc-plugin.c 2006-07-17 00:04:54 UTC (rev 14526)
@@ -290,7 +290,10 @@
action = gtk_action_group_get_action (action_group,
toolbar_labels[i].action_name);
g_value_set_static_string (&value, gettext(toolbar_labels[i].label));
- g_object_set_property (G_OBJECT(action), "short_label", &value);
+ if (action)
+ g_object_set_property (G_OBJECT(action), "short_label", &value);
+ else PWARN("Can't find action in action group: %s",
+ toolbar_labels[i].action_name);
}
}
More information about the gnucash-changes
mailing list