[Gnucash-changes] r13193 - gnucash/trunk - Test for an empty string
when translating. (Fixes #330179)
Derek Atkins
warlord at cvs.gnucash.org
Fri Feb 10 10:00:29 EST 2006
Author: warlord
Date: 2006-02-10 10:00:28 -0500 (Fri, 10 Feb 2006)
New Revision: 13193
Trac: http://svn.gnucash.org/trac/changeset/13193
Modified:
gnucash/trunk/ChangeLog
gnucash/trunk/src/gnome-utils/dialog-options.c
Log:
Test for an empty string when translating. (Fixes #330179)
Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog 2006-02-10 05:44:08 UTC (rev 13192)
+++ gnucash/trunk/ChangeLog 2006-02-10 15:00:28 UTC (rev 13193)
@@ -1,3 +1,8 @@
+2006-02-10 Derek Atkins <derek at ihtfp.com>
+
+ * src/gnome-utils/dialog-options.c:
+ Test for an empty string when translating. (Fixes #330179)
+
2006-02-09 David Hampton <hampton at employees.org>
* src/bin/gnucash-bin.c: Pass argc by reference instead of value
Modified: gnucash/trunk/src/gnome-utils/dialog-options.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-options.c 2006-02-10 05:44:08 UTC (rev 13192)
+++ gnucash/trunk/src/gnome-utils/dialog-options.c 2006-02-10 15:00:28 UTC (rev 13193)
@@ -552,7 +552,7 @@
for (i = 0; i < num_values; i++) {
string = gnc_option_permissible_value_name(option, i);
if (string) {
- gtk_combo_box_append_text(GTK_COMBO_BOX(widget), _(string));
+ gtk_combo_box_append_text(GTK_COMBO_BOX(widget), *string ? _(string) : "");
g_free(string);
} else {
gtk_combo_box_append_text(GTK_COMBO_BOX(widget), "");
@@ -564,7 +564,8 @@
*/
/* Old 1-8-branch code:
string = gnc_option_permissible_value_description(option, i);
- gnc_gtk_combo_box_set_tooltip(GTK_COMBO_BOX(widget), string ? _(string) : "");
+ gnc_gtk_combo_box_set_tooltip(GTK_COMBO_BOX(widget),
+ string && *string ? _(string) : "");
if (string)
g_free(string);
*/
@@ -623,10 +624,10 @@
gtk_radio_button_new_with_label_from_widget (widget ?
GTK_RADIO_BUTTON (widget) :
NULL,
- label ? _(label) : "");
+ label && *label ? _(label) : "");
g_object_set_data (G_OBJECT (widget), "gnc_radiobutton_index",
GINT_TO_POINTER (i));
- gtk_tooltips_set_tip(tooltips, widget, tip ? _(tip) : "", NULL);
+ gtk_tooltips_set_tip(tooltips, widget, tip && *tip ? _(tip) : "", NULL);
g_signal_connect(G_OBJECT(widget), "toggled",
G_CALLBACK(gnc_option_radiobutton_cb), option);
gtk_box_pack_start (GTK_BOX (box), widget, FALSE, FALSE, 0);
@@ -845,7 +846,7 @@
string = gnc_option_permissible_value_name(option, i);
if (string != NULL)
{
- text[0] = _(string);
+ text[0] = *string ? _(string) : "";
gtk_clist_append(GTK_CLIST(clist), text);
gtk_clist_set_row_data(GTK_CLIST(clist), i, GINT_TO_POINTER(FALSE));
free(string);
@@ -932,13 +933,13 @@
}
raw_name = gnc_option_name(option);
- if (raw_name != NULL)
+ if (raw_name && *raw_name)
name = _(raw_name);
else
name = NULL;
raw_documentation = gnc_option_documentation(option);
- if (raw_documentation != NULL)
+ if (raw_documentation && *raw_documentation)
documentation = _(raw_documentation);
else
documentation = NULL;
More information about the gnucash-changes
mailing list