From 41950b60706b40ca94b2582857961d722ebfef7b Mon Sep 17 00:00:00 2001 From: Phil Longstaff Date: Mon, 14 Sep 2009 23:38:56 +0000 Subject: [PATCH] Fix bug 595015 - compiler warnings for missing printf format specs, gcc 4.2.1 Patch by David Reiser git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18314 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/bin/gnucash-bin.c | 2 +- .../business-gnome/dialog-date-close.c | 4 +-- src/business/business-gnome/dialog-invoice.c | 8 +++--- src/business/business-gnome/dialog-order.c | 6 ++--- src/business/business-gnome/search-owner.c | 2 +- .../dialog-tax-table/dialog-tax-table.c | 2 +- src/engine/Recurrence.c | 14 +++++----- src/gnome-search/search-account.c | 2 +- src/gnome-utils/dialog-commodity.c | 6 ++--- src/gnome/dialog-print-check.c | 4 +-- src/gnome/dialog-sx-editor.c | 4 +-- src/gnome/dialog-sx-from-trans.c | 4 +-- src/gnome/druid-loan.c | 14 +++++----- src/gnome/druid-stock-split.c | 4 +-- src/gnome/gnc-plugin-page-budget.c | 2 +- src/gnome/gnc-plugin-page-register.c | 4 +-- src/gnome/gnc-plugin-page-sx-list.c | 2 +- src/gnome/gnc-split-reg.c | 2 +- src/html/gnc-html-gtkhtml.c | 8 +++--- src/html/gnc-html-webkit.c | 8 +++--- src/import-export/aqbanking/dialog-ab-trans.c | 2 +- .../aqbanking/druid-ab-initial.c | 4 +-- src/import-export/csv/gnc-csv-import.c | 2 +- src/import-export/csv/gnc-csv-model.c | 6 ++--- .../qif-import/druid-qif-import.c | 26 +++++++++---------- .../report-gnome/gnc-plugin-page-report.c | 2 +- 26 files changed, 72 insertions(+), 72 deletions(-) diff --git a/src/bin/gnucash-bin.c b/src/bin/gnucash-bin.c index ce81479883..7592302918 100644 --- a/src/bin/gnucash-bin.c +++ b/src/bin/gnucash-bin.c @@ -387,7 +387,7 @@ inner_main_add_price_quotes(void *closure, int argc, char **argv) scm_c_eval_string("(gnc:price-quotes-install-sources)"); if (!gnc_quote_source_fq_installed()) { - g_print(_("No quotes retrieved. Finance::Quote isn't " + g_print("%s", _("No quotes retrieved. Finance::Quote isn't " "installed properly.\n")); goto fail; } diff --git a/src/business/business-gnome/dialog-date-close.c b/src/business/business-gnome/dialog-date-close.c index 475b9b80ad..9e17921701 100644 --- a/src/business/business-gnome/dialog-date-close.c +++ b/src/business/business-gnome/dialog-date-close.c @@ -69,13 +69,13 @@ gnc_dialog_date_close_ok_cb (GtkWidget *widget, gpointer user_data) acc = gnc_account_sel_get_account( GNC_ACCOUNT_SEL(ddc->acct_combo) ); if (!acc) { - gnc_error_dialog (ddc->dialog, + gnc_error_dialog (ddc->dialog, "%s", _("No Account selected. Please try again.")); return; } if (xaccAccountGetPlaceholder (acc)) { - gnc_error_dialog (ddc->dialog, + gnc_error_dialog (ddc->dialog, "%s", _("Placeholder account selected. Please try again.")); return; } diff --git a/src/business/business-gnome/dialog-invoice.c b/src/business/business-gnome/dialog-invoice.c index f7ddadc6da..b102502f59 100644 --- a/src/business/business-gnome/dialog-invoice.c +++ b/src/business/business-gnome/dialog-invoice.c @@ -344,7 +344,7 @@ gnc_invoice_window_verify_ok (InvoiceWindow *iw) gnc_owner_get_owner (iw->owner_choice, &(iw->owner)); res = gncOwnerGetName (&(iw->owner)); if (res == NULL || safe_strcmp (res, "") == 0) { - gnc_error_dialog (iw_get_window(iw), + gnc_error_dialog (iw_get_window(iw), "%s", /* Translators: In this context, * 'Billing information' maps to the * label in the frame and means @@ -627,7 +627,7 @@ gnc_invoice_window_postCB (GtkWidget *widget, gpointer data) /* Check that there is at least one Entry */ invoice = iw_get_invoice (iw); if (gncInvoiceGetEntries (invoice) == NULL) { - gnc_error_dialog (iw_get_window(iw), + gnc_error_dialog (iw_get_window(iw), "%s", _("The Invoice must have at least one Entry.")); return; } @@ -636,14 +636,14 @@ gnc_invoice_window_postCB (GtkWidget *widget, gpointer data) /* Make sure that the invoice has a positive balance */ if (gnc_numeric_negative_p(gncInvoiceGetTotal(invoice))) { - gnc_error_dialog(iw_get_window(iw), + gnc_error_dialog(iw_get_window(iw), "%s", _("You may not post an invoice with a negative total value.")); return; } if (iw->total_cash_label && gnc_numeric_negative_p(gncInvoiceGetTotalOf(invoice, GNC_PAYMENT_CASH))) { - gnc_error_dialog(iw_get_window(iw), + gnc_error_dialog(iw_get_window(iw), "%s", _("You may not post an expense voucher with a negative total cash value.")); return; } diff --git a/src/business/business-gnome/dialog-order.c b/src/business/business-gnome/dialog-order.c index 613ea2af5e..91c009d884 100644 --- a/src/business/business-gnome/dialog-order.c +++ b/src/business/business-gnome/dialog-order.c @@ -161,7 +161,7 @@ gnc_order_window_verify_ok (OrderWindow *ow) /* Check the ID */ res = gtk_entry_get_text (GTK_ENTRY (ow->id_entry)); if (safe_strcmp (res, "") == 0) { - gnc_error_dialog (ow->dialog, + gnc_error_dialog (ow->dialog, "%s", _("The Order must be given an ID.")); return FALSE; } @@ -170,7 +170,7 @@ gnc_order_window_verify_ok (OrderWindow *ow) gnc_owner_get_owner (ow->owner_choice, &(ow->owner)); res = gncOwnerGetName (&(ow->owner)); if (res == NULL || safe_strcmp (res, "") == 0) { - gnc_error_dialog (ow->dialog, + gnc_error_dialog (ow->dialog, "%s", _("You need to supply Billing Information.")); return FALSE; } @@ -264,7 +264,7 @@ gnc_order_window_close_order_cb (GtkWidget *widget, gpointer data) /* Check that there is at least one Entry */ if (gncOrderGetEntries (order) == NULL) { - gnc_error_dialog (ow->dialog, + gnc_error_dialog (ow->dialog, "%s", _("The Order must have at least one Entry.")); return; } diff --git a/src/business/business-gnome/search-owner.c b/src/business/business-gnome/search-owner.c index 6ed96642b8..e24988a8ae 100644 --- a/src/business/business-gnome/search-owner.c +++ b/src/business/business-gnome/search-owner.c @@ -160,7 +160,7 @@ gncs_validate (GNCSearchCoreType *fe) priv = GNC_SEARCH_OWNER_GET_PRIVATE(fi); if (priv->owner.owner.undefined == NULL) { valid = FALSE; - gnc_error_dialog (NULL, _("You have not selected an owner")); + gnc_error_dialog (NULL, "%s", _("You have not selected an owner")); } /* XXX */ diff --git a/src/business/dialog-tax-table/dialog-tax-table.c b/src/business/dialog-tax-table/dialog-tax-table.c index dec8429c8c..760c78ba61 100644 --- a/src/business/dialog-tax-table/dialog-tax-table.c +++ b/src/business/dialog-tax-table/dialog-tax-table.c @@ -583,7 +583,7 @@ tax_table_delete_entry_cb (GtkButton *button, TaxTableWindow *ttw) return; } - if (gnc_verify_dialog (ttw->dialog, FALSE, + if (gnc_verify_dialog (ttw->dialog, FALSE, "%s", _("Are you sure you want to delete this entry?"))) { /* Ok, let's remove it */ gnc_suspend_gui_refresh (); diff --git a/src/engine/Recurrence.c b/src/engine/Recurrence.c index 53d42c8a51..146e095fea 100644 --- a/src/engine/Recurrence.c +++ b/src/engine/Recurrence.c @@ -531,7 +531,7 @@ _weekly_list_to_compact_string(GList *rs, GString *buf) // and purposes this will be fine. multiplier = recurrenceGetMultiplier(r); } - g_string_printf(buf, _("Weekly")); + g_string_printf(buf, "%s", _("Weekly")); if (multiplier > 1) { /* translators: %u is the recurrence multipler, i.e. this @@ -584,7 +584,7 @@ recurrenceListToCompactString(GList *rs) if (g_list_length(rs) == 0) { - g_string_printf(buf, _("None")); + g_string_printf(buf, "%s", _("None")); goto rtn; } @@ -605,7 +605,7 @@ recurrenceListToCompactString(GList *rs) recurrenceGetMultiplier(first), recurrenceGetMultiplier(second)); } - g_string_printf(buf, _("Semi-monthly")); + g_string_printf(buf, "%s", _("Semi-monthly")); g_string_append_printf(buf, " "); if (recurrenceGetMultiplier(first) > 1) { @@ -631,10 +631,10 @@ recurrenceListToCompactString(GList *rs) switch (recurrenceGetPeriodType(r)) { case PERIOD_ONCE: { - g_string_printf(buf, _("Once")); + g_string_printf(buf, "%s", _("Once")); } break; case PERIOD_DAY: { - g_string_printf(buf, _("Daily")); + g_string_printf(buf, "%s", _("Daily")); if (multiplier > 1) { /* translators: %u is the recurrence multiplier. */ @@ -647,7 +647,7 @@ recurrenceListToCompactString(GList *rs) case PERIOD_MONTH: case PERIOD_END_OF_MONTH: case PERIOD_LAST_WEEKDAY: { - g_string_printf(buf, _("Monthly")); + g_string_printf(buf, "%s", _("Monthly")); if (multiplier > 1) { /* translators: %u is the recurrence multiplier. */ @@ -661,7 +661,7 @@ recurrenceListToCompactString(GList *rs) g_string_printf(buf, "@fixme: nth weekday not handled"); } break; case PERIOD_YEAR: { - g_string_printf(buf, _("Yearly")); + g_string_printf(buf, "%s", _("Yearly")); if (multiplier > 1) { /* translators: %u is the recurrence multiplier. */ diff --git a/src/gnome-search/search-account.c b/src/gnome-search/search-account.c index 0dc9fa73a7..d6cbf8f5aa 100644 --- a/src/gnome-search/search-account.c +++ b/src/gnome-search/search-account.c @@ -167,7 +167,7 @@ gncs_validate (GNCSearchCoreType *fe) priv = _PRIVATE(fi); if (priv->selected_accounts == NULL && fi->how ) { valid = FALSE; - gnc_error_dialog (NULL, _("You have not selected any accounts")); + gnc_error_dialog (NULL, "%s", _("You have not selected any accounts")); } /* XXX */ diff --git a/src/gnome-utils/dialog-commodity.c b/src/gnome-utils/dialog-commodity.c index a190395edc..2375a35bdd 100644 --- a/src/gnome-utils/dialog-commodity.c +++ b/src/gnome-utils/dialog-commodity.c @@ -1207,7 +1207,7 @@ gnc_ui_commodity_dialog_to_object(CommodityWindow * w) gnc_commodity_commit_edit(c); return TRUE; } - gnc_warning_dialog(w->dialog, + gnc_warning_dialog(w->dialog, "%s", _("You may not create a new national currency.")); return FALSE; } @@ -1220,7 +1220,7 @@ gnc_ui_commodity_dialog_to_object(CommodityWindow * w) if ((!w->edit_commodity && c) || (w->edit_commodity && c && (c != w->edit_commodity))) { - gnc_warning_dialog (w->dialog, _("That commodity already exists.")); + gnc_warning_dialog (w->dialog, "%s", _("That commodity already exists.")); g_free(namespace); return FALSE; } @@ -1262,7 +1262,7 @@ gnc_ui_commodity_dialog_to_object(CommodityWindow * w) c = gnc_commodity_table_insert(gnc_get_current_commodities(), c); } else { - gnc_warning_dialog(w->dialog, + gnc_warning_dialog(w->dialog, "%s", _("You must enter a non-empty \"Full name\", " "\"Symbol/abbreviation\", " "and \"Type\" for the commodity.")); diff --git a/src/gnome/dialog-print-check.c b/src/gnome/dialog-print-check.c index f238c2e9b6..83ed0d7f9e 100644 --- a/src/gnome/dialog-print-check.c +++ b/src/gnome/dialog-print-check.c @@ -545,7 +545,7 @@ pcd_save_custom_data(PrintCheckDialog *pcd, const gchar *title) dialog = gtk_message_dialog_new(GTK_WINDOW(pcd->dialog), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, - GTK_BUTTONS_CLOSE, + GTK_BUTTONS_CLOSE, "%s", _("Cannot save check format file.")); gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "%s", error->message); @@ -1078,7 +1078,7 @@ read_one_check_directory(PrintCheckDialog * pcd, GtkListStore *store, dialog = gtk_message_dialog_new (GTK_WINDOW(pcd->dialog), GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, + GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", _("There is a duplicate check format file.")); gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG(dialog), diff --git a/src/gnome/dialog-sx-editor.c b/src/gnome/dialog-sx-editor.c index 6d6fba28fe..a0e99d4c1c 100644 --- a/src/gnome/dialog-sx-editor.c +++ b/src/gnome/dialog-sx-editor.c @@ -765,7 +765,7 @@ gnc_sxed_check_consistent( GncSxEditorDialog *sxed ) GTK_TOGGLE_BUTTON(sxed->notifyOpt) ); if (((ttVarCount > 0) || multi_commodity) && autocreateState) { - gnc_warning_dialog(sxed->dialog, + gnc_warning_dialog(sxed->dialog, "%s", _("Scheduled Transactions with variables " "cannot be automatically created.")); return FALSE; @@ -774,7 +774,7 @@ gnc_sxed_check_consistent( GncSxEditorDialog *sxed ) /* Fix for part of Bug#121740 -- auto-create transactions are * only valid if there's actually a transaction to create. */ if ( autocreateState && splitCount == 0 ) { - gnc_warning_dialog( sxed->dialog, + gnc_warning_dialog(sxed->dialog, "%s", _("Scheduled Transactions without a template " "transaction cannot be automatically created.") ); return FALSE; diff --git a/src/gnome/dialog-sx-from-trans.c b/src/gnome/dialog-sx-from-trans.c index 0ca37431cf..c3017dd64c 100644 --- a/src/gnome/dialog-sx-from-trans.c +++ b/src/gnome/dialog-sx-from-trans.c @@ -550,7 +550,7 @@ sxftd_ok_clicked(SXFromTransInfo *sxfti) else { if ( sx_error == SXFTD_ERRNO_UNBALANCED_XACTION ) { - gnc_error_dialog( gnc_ui_get_toplevel(), + gnc_error_dialog( gnc_ui_get_toplevel(), "%s", _( "The Scheduled Transaction is unbalanced. " "You are strongly encouraged to correct this situation." ) ); } @@ -769,7 +769,7 @@ gnc_sx_create_from_trans( Transaction *trans ) if ( (errno = sxftd_init( sxfti )) < 0 ) { if ( errno == SXFTD_ERRNO_OPEN_XACTION ) { - gnc_error_dialog( gnc_ui_get_toplevel(), + gnc_error_dialog( gnc_ui_get_toplevel(), "%s", _( "Cannot create a Scheduled Transaction " "from a Transaction currently " "being edited. Please Enter the " diff --git a/src/gnome/druid-loan.c b/src/gnome/druid-loan.c index d8091f669f..dd8b1ad9f0 100644 --- a/src/gnome/druid-loan.c +++ b/src/gnome/druid-loan.c @@ -1159,7 +1159,7 @@ ld_info_save( GnomeDruidPage *gdp, gpointer arg1, gpointer ud ) ldd->ld.primaryAcct = gnc_account_sel_get_account( ldd->prmAccountGAS ); if ( ldd->ld.primaryAcct == NULL ) { - gnc_info_dialog( ldd->dialog, + gnc_info_dialog( ldd->dialog, "%s", _("Please select a valid loan account.") ); return TRUE; } @@ -1246,7 +1246,7 @@ ld_opts_save_state( LoanDruidData *ldd ) ldd->ld.escrowAcct = gnc_account_sel_get_account( ldd->optEscrowGAS ); if ( ldd->ld.escrowAcct == NULL ) { - gnc_info_dialog( ldd->dialog, + gnc_info_dialog( ldd->dialog, "%s", _("Please select a valid " "Escrow Account.") ); return TRUE; @@ -1312,21 +1312,21 @@ ld_rep_save( LoanDruidData *ldd ) ldd->ld.repFromAcct = gnc_account_sel_get_account( ldd->repAssetsFromGAS ); if ( ldd->ld.repFromAcct == NULL ) { - gnc_info_dialog( ldd->dialog, + gnc_info_dialog( ldd->dialog, "%s", _("Please select a valid \"from\" account.")); return TRUE; } ldd->ld.repPriAcct = gnc_account_sel_get_account( ldd->repPrincToGAS ); if ( ldd->ld.repPriAcct == NULL ) { - gnc_info_dialog( ldd->dialog, + gnc_info_dialog( ldd->dialog, "%s", _("Please select a valid \"to\" account.") ); return TRUE; } ldd->ld.repIntAcct = gnc_account_sel_get_account( ldd->repIntToGAS ); if ( ldd->ld.repIntAcct == NULL ) { - gnc_info_dialog( ldd->dialog, + gnc_info_dialog( ldd->dialog, "%s", _("Please select a valid " "\"interest\" account.") ); return TRUE; @@ -1531,7 +1531,7 @@ ld_pay_save_current( LoanDruidData *ldd ) if ( rod->specSrcAcctP ) { rod->from = gnc_account_sel_get_account( ldd->payAcctFromGAS ); if ( rod->from == NULL ) { - gnc_info_dialog( ldd->dialog, + gnc_info_dialog( ldd->dialog, "%s", _("Please select a valid " "\"from\" account.") ); return TRUE; @@ -1540,7 +1540,7 @@ ld_pay_save_current( LoanDruidData *ldd ) rod->to = gnc_account_sel_get_account( ldd->payAcctToGAS ); if ( rod->to == NULL ) { - gnc_info_dialog( ldd->dialog, + gnc_info_dialog( ldd->dialog, "%s", _("Please select a valid " "\"to\" account.") ); return TRUE; diff --git a/src/gnome/druid-stock-split.c b/src/gnome/druid-stock-split.c index 53890156c7..32a7d02fb6 100644 --- a/src/gnome/druid-stock-split.c +++ b/src/gnome/druid-stock-split.c @@ -482,7 +482,7 @@ gnc_stock_split_druid_finish (GnomeDruidPage *druidpage, pdb = gnc_book_get_pricedb (book); if (!gnc_pricedb_add_price (pdb, price)) - gnc_error_dialog (info->window, _("Error adding price.")); + gnc_error_dialog (info->window, "%s", _("Error adding price.")); gnc_price_unref (price); } @@ -785,7 +785,7 @@ gnc_stock_split_dialog (GtkWidget *parent, Account * initial) if (fill_account_list (info, initial) == 0) { - gnc_warning_dialog (parent, _("You don't have any stock accounts with balances!")); + gnc_warning_dialog (parent, "%s", _("You don't have any stock accounts with balances!")); gnc_close_gui_component_by_data (DRUID_STOCK_SPLIT_CM_CLASS, info); return; } diff --git a/src/gnome/gnc-plugin-page-budget.c b/src/gnome/gnc-plugin-page-budget.c index fbc8a70809..6d6cc35299 100644 --- a/src/gnome/gnc-plugin-page-budget.c +++ b/src/gnome/gnc-plugin-page-budget.c @@ -907,7 +907,7 @@ gnc_plugin_page_budget_cmd_estimate_budget(GtkAction *action, dialog = gtk_message_dialog_new ( GTK_WINDOW(gnc_plugin_page_get_window(GNC_PLUGIN_PAGE(page))), GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL, - GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, + GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, "%s", _("You must select at least one account to estimate.")); gtk_dialog_run (GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); diff --git a/src/gnome/gnc-plugin-page-register.c b/src/gnome/gnc-plugin-page-register.c index 7f63985e01..e09ec81f8f 100644 --- a/src/gnome/gnc-plugin-page-register.c +++ b/src/gnome/gnc-plugin-page-register.c @@ -2062,7 +2062,7 @@ gnc_plugin_page_register_cmd_void_transaction (GtkAction *action, if (xaccTransHasSplitsInState(trans, VREC)) return; if (xaccTransHasReconciledSplits(trans) || xaccTransHasSplitsInState(trans, CREC)) { - gnc_error_dialog(NULL, _("You cannot void a transaction with reconciled or cleared splits.")); + gnc_error_dialog(NULL, "%s", _("You cannot void a transaction with reconciled or cleared splits.")); return; } @@ -2129,7 +2129,7 @@ gnc_plugin_page_register_cmd_reverse_transaction (GtkAction *action, return; if (xaccTransGetReversedBy(trans)) { - gnc_error_dialog(gnc_plugin_page_get_window(GNC_PLUGIN_PAGE(page)), + gnc_error_dialog(gnc_plugin_page_get_window(GNC_PLUGIN_PAGE(page)), "%s", _("A reversing entry has already been created for this transaction.")); return; } diff --git a/src/gnome/gnc-plugin-page-sx-list.c b/src/gnome/gnc-plugin-page-sx-list.c index 1a37461131..03f02e83ba 100644 --- a/src/gnome/gnc-plugin-page-sx-list.c +++ b/src/gnome/gnc-plugin-page-sx-list.c @@ -592,7 +592,7 @@ gnc_plugin_page_sx_list_cmd_delete(GtkAction *action, GncPluginPageSxList *page) multiple SXs be deleted as well? Ideally, the number of to-be-deleted SXs should be mentioned here; see dialog-sx-since-last-run.c:807 */ - if (gnc_verify_dialog(NULL, FALSE, _("Do you really want to delete this scheduled transaction?"))) + if (gnc_verify_dialog(NULL, FALSE, "%s", _("Do you really want to delete this scheduled transaction?"))) { g_list_foreach(to_delete, (GFunc)_destroy_sx, NULL); } diff --git a/src/gnome/gnc-split-reg.c b/src/gnome/gnc-split-reg.c index c9a43aa432..f3c5ef5ea7 100644 --- a/src/gnome/gnc-split-reg.c +++ b/src/gnome/gnc-split-reg.c @@ -867,7 +867,7 @@ gsr_default_reverse_txn_handler (GNCSplitReg *gsr, gpointer data) return; if (xaccTransGetReversedBy(trans)) { - gnc_error_dialog(gsr->window, + gnc_error_dialog(gsr->window, "%s", _("A reversing entry has already been created for this transaction.")); return; } diff --git a/src/html/gnc-html-gtkhtml.c b/src/html/gnc-html-gtkhtml.c index 5103b52cde..673d742a56 100644 --- a/src/html/gnc-html-gtkhtml.c +++ b/src/html/gnc-html-gtkhtml.c @@ -380,7 +380,7 @@ gnc_html_load_to_stream( GncHtmlGtkhtml* self, GtkHTMLStream* handle, if( !safe_strcmp( type, URL_TYPE_SECURE ) ) { if( !https_allowed() ) { - gnc_error_dialog( priv->base.parent, + gnc_error_dialog( priv->base.parent,"%s", _("Secure HTTP access is disabled. " "You can enable it in the Network section of " "the Preferences dialog.")); @@ -389,7 +389,7 @@ gnc_html_load_to_stream( GncHtmlGtkhtml* self, GtkHTMLStream* handle, } if( !http_allowed() ) { - gnc_error_dialog( priv->base.parent, + gnc_error_dialog( priv->base.parent,"%s", _("Network HTTP access is disabled. " "You can enable it in the Network section of " "the Preferences dialog.")); @@ -698,7 +698,7 @@ impl_gtkhtml_show_url( GncHtml* self, URLType type, do { if( safe_strcmp( type, URL_TYPE_SECURE ) == 0 ) { if( !https_allowed() ) { - gnc_error_dialog( priv->base.parent, + gnc_error_dialog( priv->base.parent,"%s", _("Secure HTTP access is disabled. " "You can enable it in the Network section of " "the Preferences dialog.") ); @@ -708,7 +708,7 @@ impl_gtkhtml_show_url( GncHtml* self, URLType type, if( safe_strcmp( type, URL_TYPE_HTTP ) == 0 ) { if( !http_allowed() ) { - gnc_error_dialog( priv->base.parent, + gnc_error_dialog( priv->base.parent,"%s", _("Network HTTP access is disabled. " "You can enable it in the Network section of " "the Preferences dialog.") ); diff --git a/src/html/gnc-html-webkit.c b/src/html/gnc-html-webkit.c index 2614b223ab..7283a806e7 100644 --- a/src/html/gnc-html-webkit.c +++ b/src/html/gnc-html-webkit.c @@ -416,7 +416,7 @@ load_to_stream( GncHtmlWebkit* self, URLType type, if( !safe_strcmp( type, URL_TYPE_SECURE ) ) { if( !https_allowed() ) { - gnc_error_dialog( priv->base.parent, + gnc_error_dialog( priv->base.parent, "%s", _("Secure HTTP access is disabled. " "You can enable it in the Network section of " "the Preferences dialog.")); @@ -425,7 +425,7 @@ load_to_stream( GncHtmlWebkit* self, URLType type, } if( !http_allowed() ) { - gnc_error_dialog( priv->base.parent, + gnc_error_dialog( priv->base.parent,"%s", _("Network HTTP access is disabled. " "You can enable it in the Network section of " "the Preferences dialog.")); @@ -736,7 +736,7 @@ impl_webkit_show_url( GncHtml* self, URLType type, do { if( safe_strcmp( type, URL_TYPE_SECURE ) == 0 ) { if( !https_allowed() ) { - gnc_error_dialog( priv->base.parent, + gnc_error_dialog( priv->base.parent,"%s", _("Secure HTTP access is disabled. " "You can enable it in the Network section of " "the Preferences dialog.") ); @@ -746,7 +746,7 @@ impl_webkit_show_url( GncHtml* self, URLType type, if( safe_strcmp( type, URL_TYPE_HTTP ) == 0 ) { if( !http_allowed() ) { - gnc_error_dialog( priv->base.parent, + gnc_error_dialog( priv->base.parent,"%s", _("Network HTTP access is disabled. " "You can enable it in the Network section of " "the Preferences dialog.") ); diff --git a/src/import-export/aqbanking/dialog-ab-trans.c b/src/import-export/aqbanking/dialog-ab-trans.c index d224d06c48..4f185b2307 100644 --- a/src/import-export/aqbanking/dialog-ab-trans.c +++ b/src/import-export/aqbanking/dialog-ab-trans.c @@ -863,7 +863,7 @@ dat_add_templ_cb(GtkButton *button, gpointer user_data) gtk_tree_model_foreach(GTK_TREE_MODEL(td->template_list_store), find_templ_helper, &data); if (data.pointer) { - gnc_error_dialog(dialog, + gnc_error_dialog(dialog, "%s", _("A template with the given name already exists. " "Please enter another name.")); continue; diff --git a/src/import-export/aqbanking/druid-ab-initial.c b/src/import-export/aqbanking/druid-ab-initial.c index 2aae58fb82..2cc4813b87 100644 --- a/src/import-export/aqbanking/druid-ab-initial.c +++ b/src/import-export/aqbanking/druid-ab-initial.c @@ -453,7 +453,7 @@ child_exit_cb(GPid pid, gint status, gpointer data) "value: %d. The called program was \"%s\".\n", exit_status, deferred_info->wizard_path); gnc_error_dialog - (info->window, + (info->window, "%s", _("The external program \"AqBanking Setup Wizard\" failed " "to run successfully because the " "additional software \"Qt\" was not found. " @@ -472,7 +472,7 @@ child_exit_cb(GPid pid, gint status, gpointer data) "value: %d. The called program was \"%s\".\n", exit_status, deferred_info->wizard_path); gnc_error_dialog - (info->window, + (info->window, "%s", _("The external program \"AqBanking Setup Wizard\" failed " "to run successfully. Online Banking can only be setup " "if this wizard has run successfully. " diff --git a/src/import-export/csv/gnc-csv-import.c b/src/import-export/csv/gnc-csv-import.c index fa2c3e2398..e9357f94d8 100644 --- a/src/import-export/csv/gnc-csv-import.c +++ b/src/import-export/csv/gnc-csv-import.c @@ -208,7 +208,7 @@ static void encoding_selected(GOCharmapSel* selector, const char* encoding, gnc_csv_parse(preview->parse_data, FALSE, &error)) { /* If it fails, change back to the old encoding. */ - gnc_error_dialog(NULL, _("Invalid encoding selected")); + gnc_error_dialog(NULL, "%s", _("Invalid encoding selected")); preview->encoding_selected_called = FALSE; go_charmap_sel_set_encoding(selector, previous_encoding); return; diff --git a/src/import-export/csv/gnc-csv-model.c b/src/import-export/csv/gnc-csv-model.c index cc1424ded9..0226b8aaf4 100644 --- a/src/import-export/csv/gnc-csv-model.c +++ b/src/import-export/csv/gnc-csv-model.c @@ -431,7 +431,7 @@ int gnc_csv_load_file(GncCsvParseData* parse_data, const char* filename, /* TODO Handle file opening errors more specifically, * e.g. inexistent file versus no read permission. */ parse_data->raw_str.begin = NULL; - g_set_error(error, 0, GNC_CSV_FILE_OPEN_ERR, _("File opening failed.")); + g_set_error(error, 0, GNC_CSV_FILE_OPEN_ERR, "%s", _("File opening failed.")); return 1; } @@ -445,7 +445,7 @@ int gnc_csv_load_file(GncCsvParseData* parse_data, const char* filename, "UTF-8", NULL); if(guess_enc == NULL) { - g_set_error(error, 0, GNC_CSV_ENCODING_ERR, _("Unknown encoding.")); + g_set_error(error, 0, GNC_CSV_ENCODING_ERR, "%s", _("Unknown encoding.")); return 1; } @@ -454,7 +454,7 @@ int gnc_csv_load_file(GncCsvParseData* parse_data, const char* filename, gnc_csv_convert_encoding(parse_data, guess_enc, error); if(parse_data->file_str.begin == NULL) { - g_set_error(error, 0, GNC_CSV_ENCODING_ERR, _("Unknown encoding.")); + g_set_error(error, 0, GNC_CSV_ENCODING_ERR, "%s", _("Unknown encoding.")); return 1; } else diff --git a/src/import-export/qif-import/druid-qif-import.c b/src/import-export/qif-import/druid-qif-import.c index 313ca7b958..07d575ec84 100644 --- a/src/import-export/qif-import/druid-qif-import.c +++ b/src/import-export/qif-import/druid-qif-import.c @@ -683,9 +683,9 @@ gnc_ui_qif_import_load_file_next_cb(GnomeDruidPage * page, /* Validate the chosen filename. */ if (strlen(path_to_load) == 0) - gnc_error_dialog(wind->window, _("Please select a file to load.")); + gnc_error_dialog(wind->window, "%s", _("Please select a file to load.")); else if (g_access(path_to_load, R_OK) < 0) - gnc_error_dialog(wind->window, + gnc_error_dialog(wind->window, "%s", _("File not found or read permission denied. " "Please select another file.")); else @@ -696,7 +696,7 @@ gnc_ui_qif_import_load_file_next_cb(GnomeDruidPage * page, if (scm_call_2(qif_file_loaded, scm_makfrom0str(path_to_load), wind->imported_files) == SCM_BOOL_T) - gnc_error_dialog(wind->window, + gnc_error_dialog(wind->window, "%s", _("That QIF file is already loaded. " "Please select another file.")); else @@ -840,7 +840,7 @@ gnc_ui_qif_import_load_progress_show_cb(GtkWidget *widget, _( "A bug was detected while reading the QIF file.")); gnc_progress_dialog_set_sub(wind->load_progress, _("Failed")); gnc_progress_dialog_reset_value(wind->load_progress); - gnc_error_dialog(wind->window, + gnc_error_dialog(wind->window, "%s", _( "A bug was detected while reading the QIF file.")); /* FIXME: How should we request that the user report this problem? */ @@ -917,7 +917,7 @@ gnc_ui_qif_import_load_progress_show_cb(GtkWidget *widget, _( "A bug was detected while parsing the QIF file.")); gnc_progress_dialog_set_sub(wind->load_progress, _("Failed")); gnc_progress_dialog_reset_value(wind->load_progress); - gnc_error_dialog(wind->window, + gnc_error_dialog(wind->window, "%s", _( "A bug was detected while parsing the QIF file.")); /* FIXME: How should we request that the user report this problem? */ @@ -1387,7 +1387,7 @@ gnc_ui_qif_import_default_acct_next_cb(GnomeDruidPage * page, g_return_val_if_fail(wind->selected_file != SCM_BOOL_F, FALSE); if (!acct_name || acct_name[0] == 0) { - gnc_warning_dialog(wind->window, _("You must enter an account name.")); + gnc_warning_dialog(wind->window, "%s", _("You must enter an account name.")); return TRUE; } else { @@ -2067,20 +2067,20 @@ gnc_ui_qif_import_comm_next_cb(GnomeDruidPage * page, const gchar *mnemonic = gtk_entry_get_text(GTK_ENTRY(qpage->mnemonic_entry)); if (!name || (name[0] == 0)) { - gnc_warning_dialog(wind->window, + gnc_warning_dialog(wind->window, "%s", _("Enter a name or short description, such as \"Red Hat Stock\".")); g_free(namespace); return TRUE; } else if (!mnemonic || (mnemonic[0] == 0)) { - gnc_warning_dialog(wind->window, + gnc_warning_dialog(wind->window, "%s", _("Enter the ticker symbol or other well known abbreviation, such as" " \"RHT\". If there isn't one, or you don't know it, create your own.")); g_free(namespace); return TRUE; } else if (!namespace || (namespace[0] == 0)) { - gnc_warning_dialog(wind->window, + gnc_warning_dialog(wind->window, "%s", _("Select the exchange on which the symbol is traded, or select the" " type of investment (such as FUND for mutual funds.) If you don't" " see your exchange or an appropriate investment type, you can" @@ -2100,7 +2100,7 @@ gnc_ui_qif_import_comm_next_cb(GnomeDruidPage * page, if (gnc_commodity_namespace_is_iso(namespace) && !gnc_commodity_table_lookup(table, namespace, mnemonic)) { - gnc_warning_dialog(wind->window, + gnc_warning_dialog(wind->window, "%s", _("You must enter an existing national " "currency or enter a different type.")); @@ -2636,7 +2636,7 @@ gnc_ui_qif_import_convert_progress_show_cb(GtkWidget *widget, _( "A bug was detected while converting the QIF data.")); gnc_progress_dialog_set_sub(wind->convert_progress, _("Failed")); gnc_progress_dialog_reset_value(wind->convert_progress); - gnc_error_dialog(wind->window, + gnc_error_dialog(wind->window, "%s", _( "A bug was detected while converting the QIF data.")); /* FIXME: How should we request that the user report this problem? */ @@ -2706,7 +2706,7 @@ gnc_ui_qif_import_convert_progress_show_cb(GtkWidget *widget, _( "A bug was detected while detecting duplicates.")); gnc_progress_dialog_set_sub(wind->convert_progress, _("Failed")); gnc_progress_dialog_reset_value(wind->convert_progress); - gnc_error_dialog(wind->window, + gnc_error_dialog(wind->window, "%s", _( "A bug was detected while detecting duplicates.")); /* FIXME: How should we request that the user report this problem? */ @@ -3027,7 +3027,7 @@ gnc_ui_qif_import_finish_cb(GnomeDruidPage * gpage, wind->security_prefs), SCM_EOL); if (scm_result == SCM_BOOL_F) - gnc_warning_dialog(wind->window, + gnc_warning_dialog(wind->window, "%s", _("GnuCash was unable to save your mapping preferences.")); /* Open an account tab in the main window if one doesn't exist already. */ diff --git a/src/report/report-gnome/gnc-plugin-page-report.c b/src/report/report-gnome/gnc-plugin-page-report.c index 87fe6a0ea3..f8669c8146 100644 --- a/src/report/report-gnome/gnc-plugin-page-report.c +++ b/src/report/report-gnome/gnc-plugin-page-report.c @@ -1471,7 +1471,7 @@ gnc_plugin_page_report_options_cb( GtkAction *action, GncPluginPageReport *repor result = gfec_apply(start_editor, scm_cons(priv->cur_report, SCM_EOL), error_handler); if (result == SCM_BOOL_F || result == SCM_UNDEFINED) { - gnc_warning_dialog(GTK_WIDGET(gnc_ui_get_toplevel()), + gnc_warning_dialog(GTK_WIDGET(gnc_ui_get_toplevel()), "%s", _("There are no options for this report.")); } else {