diff --git a/src/app-utils/gnc-gettext-util.c b/src/app-utils/gnc-gettext-util.c index 670b5821d2..a7d7ee016c 100644 --- a/src/app-utils/gnc-gettext-util.c +++ b/src/app-utils/gnc-gettext-util.c @@ -32,6 +32,6 @@ char * gnc_gettext_helper(const char *string) { - return strdup(_(string)); + return strdup(string && *string ? _(string) : ""); } diff --git a/src/app-utils/gnc-ui-util.c b/src/app-utils/gnc-ui-util.c index 4fe91e00ea..45a96cfde0 100644 --- a/src/app-utils/gnc-ui-util.c +++ b/src/app-utils/gnc-ui-util.c @@ -572,7 +572,7 @@ gnc_find_or_create_equity_account (AccountGroup *group, if (!account) { - base_name = _(base_name); + base_name = base_name && *base_name ? _(base_name) : ""; account = xaccGetAccountFromName (group, base_name); if (account && xaccAccountGetType (account) != EQUITY) diff --git a/src/gnome-utils/dialog-options.c b/src/gnome-utils/dialog-options.c index 40193b4031..5fb7468b8c 100644 --- a/src/gnome-utils/dialog-options.c +++ b/src/gnome-utils/dialog-options.c @@ -559,19 +559,12 @@ gnc_option_create_multichoice_widget(GNCOption *option, GtkTooltips *tooltips) } /* FIXME: tooltip texts for each option are available but cannot - be set currently. See - https://lists.gnucash.org/pipermail/gnucash-devel/2005-December/015139.html + be set currently. See http://wiki.gnucash.org/wiki/Tooltips. + The current idea is to revert the widget back to the + GtkOptionMenu code from 1.8-branch until + http://bugzilla.gnome.org/show_bug.cgi?id=303717 is implemented + in gtk. */ - /* 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 ? _(string) : ""); - if (string) - g_free(string); - */ - /* New code needs to do something like this: - gtk_tooltips_set_tip(tooltips, widget, string ? _(string) : "", NULL); - */ } g_signal_connect(G_OBJECT(widget), "changed", G_CALLBACK(gnc_option_multichoice_cb), option); diff --git a/src/gnome/window-reconcile.c b/src/gnome/window-reconcile.c index e9623d4e4a..91c48094df 100644 --- a/src/gnome/window-reconcile.c +++ b/src/gnome/window-reconcile.c @@ -383,7 +383,7 @@ gnc_recn_make_interest_window_name(Account *account, char *text) char *title; fullname = xaccAccountGetFullName(account, gnc_get_account_separator()); - title = g_strconcat(fullname, " - ", _(text), NULL); + title = g_strconcat(fullname, " - ", text && *text ? _(text) : "", NULL); g_free(fullname); diff --git a/src/report/report-gnome/window-report.c b/src/report/report-gnome/window-report.c index 8dddf22ea3..38dd05de28 100644 --- a/src/report/report-gnome/window-report.c +++ b/src/report/report-gnome/window-report.c @@ -167,7 +167,7 @@ gnc_report_window_default_params_editor(SCM options, SCM report) title = SCM_STRING_CHARS(ptr); } /* Don't forget to translate the window title */ - prm->win = gnc_options_dialog_new((gchar*)_(title)); + prm->win = gnc_options_dialog_new((gchar*) (title && *title ? _(title) : "")); scm_gc_protect_object(prm->scm_options); scm_gc_protect_object(prm->cur_report);