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
This commit is contained in:
Phil Longstaff 2009-09-14 23:38:56 +00:00
parent dcd5d8253e
commit 41950b6070
26 changed files with 72 additions and 72 deletions

View File

@ -387,7 +387,7 @@ inner_main_add_price_quotes(void *closure, int argc, char **argv)
scm_c_eval_string("(gnc:price-quotes-install-sources)"); scm_c_eval_string("(gnc:price-quotes-install-sources)");
if (!gnc_quote_source_fq_installed()) { 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")); "installed properly.\n"));
goto fail; goto fail;
} }

View File

@ -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) ); acc = gnc_account_sel_get_account( GNC_ACCOUNT_SEL(ddc->acct_combo) );
if (!acc) { if (!acc) {
gnc_error_dialog (ddc->dialog, gnc_error_dialog (ddc->dialog, "%s",
_("No Account selected. Please try again.")); _("No Account selected. Please try again."));
return; return;
} }
if (xaccAccountGetPlaceholder (acc)) { if (xaccAccountGetPlaceholder (acc)) {
gnc_error_dialog (ddc->dialog, gnc_error_dialog (ddc->dialog, "%s",
_("Placeholder account selected. Please try again.")); _("Placeholder account selected. Please try again."));
return; return;
} }

View File

@ -344,7 +344,7 @@ gnc_invoice_window_verify_ok (InvoiceWindow *iw)
gnc_owner_get_owner (iw->owner_choice, &(iw->owner)); gnc_owner_get_owner (iw->owner_choice, &(iw->owner));
res = gncOwnerGetName (&(iw->owner)); res = gncOwnerGetName (&(iw->owner));
if (res == NULL || safe_strcmp (res, "") == 0) { 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, /* Translators: In this context,
* 'Billing information' maps to the * 'Billing information' maps to the
* label in the frame and means * 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 */ /* Check that there is at least one Entry */
invoice = iw_get_invoice (iw); invoice = iw_get_invoice (iw);
if (gncInvoiceGetEntries (invoice) == NULL) { 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.")); _("The Invoice must have at least one Entry."));
return; return;
} }
@ -636,14 +636,14 @@ gnc_invoice_window_postCB (GtkWidget *widget, gpointer data)
/* Make sure that the invoice has a positive balance */ /* Make sure that the invoice has a positive balance */
if (gnc_numeric_negative_p(gncInvoiceGetTotal(invoice))) { 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.")); _("You may not post an invoice with a negative total value."));
return; return;
} }
if (iw->total_cash_label && if (iw->total_cash_label &&
gnc_numeric_negative_p(gncInvoiceGetTotalOf(invoice, GNC_PAYMENT_CASH))) { 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.")); _("You may not post an expense voucher with a negative total cash value."));
return; return;
} }

View File

@ -161,7 +161,7 @@ gnc_order_window_verify_ok (OrderWindow *ow)
/* Check the ID */ /* Check the ID */
res = gtk_entry_get_text (GTK_ENTRY (ow->id_entry)); res = gtk_entry_get_text (GTK_ENTRY (ow->id_entry));
if (safe_strcmp (res, "") == 0) { if (safe_strcmp (res, "") == 0) {
gnc_error_dialog (ow->dialog, gnc_error_dialog (ow->dialog, "%s",
_("The Order must be given an ID.")); _("The Order must be given an ID."));
return FALSE; return FALSE;
} }
@ -170,7 +170,7 @@ gnc_order_window_verify_ok (OrderWindow *ow)
gnc_owner_get_owner (ow->owner_choice, &(ow->owner)); gnc_owner_get_owner (ow->owner_choice, &(ow->owner));
res = gncOwnerGetName (&(ow->owner)); res = gncOwnerGetName (&(ow->owner));
if (res == NULL || safe_strcmp (res, "") == 0) { if (res == NULL || safe_strcmp (res, "") == 0) {
gnc_error_dialog (ow->dialog, gnc_error_dialog (ow->dialog, "%s",
_("You need to supply Billing Information.")); _("You need to supply Billing Information."));
return FALSE; return FALSE;
} }
@ -264,7 +264,7 @@ gnc_order_window_close_order_cb (GtkWidget *widget, gpointer data)
/* Check that there is at least one Entry */ /* Check that there is at least one Entry */
if (gncOrderGetEntries (order) == NULL) { if (gncOrderGetEntries (order) == NULL) {
gnc_error_dialog (ow->dialog, gnc_error_dialog (ow->dialog, "%s",
_("The Order must have at least one Entry.")); _("The Order must have at least one Entry."));
return; return;
} }

View File

@ -160,7 +160,7 @@ gncs_validate (GNCSearchCoreType *fe)
priv = GNC_SEARCH_OWNER_GET_PRIVATE(fi); priv = GNC_SEARCH_OWNER_GET_PRIVATE(fi);
if (priv->owner.owner.undefined == NULL) { if (priv->owner.owner.undefined == NULL) {
valid = FALSE; valid = FALSE;
gnc_error_dialog (NULL, _("You have not selected an owner")); gnc_error_dialog (NULL, "%s", _("You have not selected an owner"));
} }
/* XXX */ /* XXX */

View File

@ -583,7 +583,7 @@ tax_table_delete_entry_cb (GtkButton *button, TaxTableWindow *ttw)
return; 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?"))) { _("Are you sure you want to delete this entry?"))) {
/* Ok, let's remove it */ /* Ok, let's remove it */
gnc_suspend_gui_refresh (); gnc_suspend_gui_refresh ();

View File

@ -531,7 +531,7 @@ _weekly_list_to_compact_string(GList *rs, GString *buf)
// and purposes this will be fine. // and purposes this will be fine.
multiplier = recurrenceGetMultiplier(r); multiplier = recurrenceGetMultiplier(r);
} }
g_string_printf(buf, _("Weekly")); g_string_printf(buf, "%s", _("Weekly"));
if (multiplier > 1) if (multiplier > 1)
{ {
/* translators: %u is the recurrence multipler, i.e. this /* translators: %u is the recurrence multipler, i.e. this
@ -584,7 +584,7 @@ recurrenceListToCompactString(GList *rs)
if (g_list_length(rs) == 0) if (g_list_length(rs) == 0)
{ {
g_string_printf(buf, _("None")); g_string_printf(buf, "%s", _("None"));
goto rtn; goto rtn;
} }
@ -605,7 +605,7 @@ recurrenceListToCompactString(GList *rs)
recurrenceGetMultiplier(first), recurrenceGetMultiplier(second)); recurrenceGetMultiplier(first), recurrenceGetMultiplier(second));
} }
g_string_printf(buf, _("Semi-monthly")); g_string_printf(buf, "%s", _("Semi-monthly"));
g_string_append_printf(buf, " "); g_string_append_printf(buf, " ");
if (recurrenceGetMultiplier(first) > 1) if (recurrenceGetMultiplier(first) > 1)
{ {
@ -631,10 +631,10 @@ recurrenceListToCompactString(GList *rs)
switch (recurrenceGetPeriodType(r)) switch (recurrenceGetPeriodType(r))
{ {
case PERIOD_ONCE: { case PERIOD_ONCE: {
g_string_printf(buf, _("Once")); g_string_printf(buf, "%s", _("Once"));
} break; } break;
case PERIOD_DAY: { case PERIOD_DAY: {
g_string_printf(buf, _("Daily")); g_string_printf(buf, "%s", _("Daily"));
if (multiplier > 1) if (multiplier > 1)
{ {
/* translators: %u is the recurrence multiplier. */ /* translators: %u is the recurrence multiplier. */
@ -647,7 +647,7 @@ recurrenceListToCompactString(GList *rs)
case PERIOD_MONTH: case PERIOD_MONTH:
case PERIOD_END_OF_MONTH: case PERIOD_END_OF_MONTH:
case PERIOD_LAST_WEEKDAY: { case PERIOD_LAST_WEEKDAY: {
g_string_printf(buf, _("Monthly")); g_string_printf(buf, "%s", _("Monthly"));
if (multiplier > 1) if (multiplier > 1)
{ {
/* translators: %u is the recurrence multiplier. */ /* translators: %u is the recurrence multiplier. */
@ -661,7 +661,7 @@ recurrenceListToCompactString(GList *rs)
g_string_printf(buf, "@fixme: nth weekday not handled"); g_string_printf(buf, "@fixme: nth weekday not handled");
} break; } break;
case PERIOD_YEAR: { case PERIOD_YEAR: {
g_string_printf(buf, _("Yearly")); g_string_printf(buf, "%s", _("Yearly"));
if (multiplier > 1) if (multiplier > 1)
{ {
/* translators: %u is the recurrence multiplier. */ /* translators: %u is the recurrence multiplier. */

View File

@ -167,7 +167,7 @@ gncs_validate (GNCSearchCoreType *fe)
priv = _PRIVATE(fi); priv = _PRIVATE(fi);
if (priv->selected_accounts == NULL && fi->how ) { if (priv->selected_accounts == NULL && fi->how ) {
valid = FALSE; valid = FALSE;
gnc_error_dialog (NULL, _("You have not selected any accounts")); gnc_error_dialog (NULL, "%s", _("You have not selected any accounts"));
} }
/* XXX */ /* XXX */

View File

@ -1207,7 +1207,7 @@ gnc_ui_commodity_dialog_to_object(CommodityWindow * w)
gnc_commodity_commit_edit(c); gnc_commodity_commit_edit(c);
return TRUE; return TRUE;
} }
gnc_warning_dialog(w->dialog, gnc_warning_dialog(w->dialog, "%s",
_("You may not create a new national currency.")); _("You may not create a new national currency."));
return FALSE; return FALSE;
} }
@ -1220,7 +1220,7 @@ gnc_ui_commodity_dialog_to_object(CommodityWindow * w)
if ((!w->edit_commodity && c) || if ((!w->edit_commodity && c) ||
(w->edit_commodity && c && (c != w->edit_commodity))) { (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); g_free(namespace);
return FALSE; return FALSE;
} }
@ -1262,7 +1262,7 @@ gnc_ui_commodity_dialog_to_object(CommodityWindow * w)
c = gnc_commodity_table_insert(gnc_get_current_commodities(), c); c = gnc_commodity_table_insert(gnc_get_current_commodities(), c);
} }
else { else {
gnc_warning_dialog(w->dialog, gnc_warning_dialog(w->dialog, "%s",
_("You must enter a non-empty \"Full name\", " _("You must enter a non-empty \"Full name\", "
"\"Symbol/abbreviation\", " "\"Symbol/abbreviation\", "
"and \"Type\" for the commodity.")); "and \"Type\" for the commodity."));

View File

@ -545,7 +545,7 @@ pcd_save_custom_data(PrintCheckDialog *pcd, const gchar *title)
dialog = gtk_message_dialog_new(GTK_WINDOW(pcd->dialog), dialog = gtk_message_dialog_new(GTK_WINDOW(pcd->dialog),
GTK_DIALOG_DESTROY_WITH_PARENT, GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR, GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE, GTK_BUTTONS_CLOSE, "%s",
_("Cannot save check format file.")); _("Cannot save check format file."));
gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
"%s", error->message); "%s", error->message);
@ -1078,7 +1078,7 @@ read_one_check_directory(PrintCheckDialog * pcd, GtkListStore *store,
dialog = gtk_message_dialog_new dialog = gtk_message_dialog_new
(GTK_WINDOW(pcd->dialog), (GTK_WINDOW(pcd->dialog),
GTK_DIALOG_DESTROY_WITH_PARENT, 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.")); _("There is a duplicate check format file."));
gtk_message_dialog_format_secondary_text gtk_message_dialog_format_secondary_text
(GTK_MESSAGE_DIALOG(dialog), (GTK_MESSAGE_DIALOG(dialog),

View File

@ -765,7 +765,7 @@ gnc_sxed_check_consistent( GncSxEditorDialog *sxed )
GTK_TOGGLE_BUTTON(sxed->notifyOpt) ); GTK_TOGGLE_BUTTON(sxed->notifyOpt) );
if (((ttVarCount > 0) || multi_commodity) && autocreateState) { if (((ttVarCount > 0) || multi_commodity) && autocreateState) {
gnc_warning_dialog(sxed->dialog, gnc_warning_dialog(sxed->dialog, "%s",
_("Scheduled Transactions with variables " _("Scheduled Transactions with variables "
"cannot be automatically created.")); "cannot be automatically created."));
return FALSE; return FALSE;
@ -774,7 +774,7 @@ gnc_sxed_check_consistent( GncSxEditorDialog *sxed )
/* Fix for part of Bug#121740 -- auto-create transactions are /* Fix for part of Bug#121740 -- auto-create transactions are
* only valid if there's actually a transaction to create. */ * only valid if there's actually a transaction to create. */
if ( autocreateState && splitCount == 0 ) { if ( autocreateState && splitCount == 0 ) {
gnc_warning_dialog( sxed->dialog, gnc_warning_dialog(sxed->dialog, "%s",
_("Scheduled Transactions without a template " _("Scheduled Transactions without a template "
"transaction cannot be automatically created.") ); "transaction cannot be automatically created.") );
return FALSE; return FALSE;

View File

@ -550,7 +550,7 @@ sxftd_ok_clicked(SXFromTransInfo *sxfti)
else else
{ {
if ( sx_error == SXFTD_ERRNO_UNBALANCED_XACTION ) { 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. " _( "The Scheduled Transaction is unbalanced. "
"You are strongly encouraged to correct this situation." ) ); "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_init( sxfti )) < 0 ) {
if ( errno == SXFTD_ERRNO_OPEN_XACTION ) 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 " _( "Cannot create a Scheduled Transaction "
"from a Transaction currently " "from a Transaction currently "
"being edited. Please Enter the " "being edited. Please Enter the "

View File

@ -1159,7 +1159,7 @@ ld_info_save( GnomeDruidPage *gdp, gpointer arg1, gpointer ud )
ldd->ld.primaryAcct = gnc_account_sel_get_account( ldd->prmAccountGAS ); ldd->ld.primaryAcct = gnc_account_sel_get_account( ldd->prmAccountGAS );
if ( ldd->ld.primaryAcct == NULL ) { if ( ldd->ld.primaryAcct == NULL ) {
gnc_info_dialog( ldd->dialog, gnc_info_dialog( ldd->dialog, "%s",
_("Please select a valid loan account.") ); _("Please select a valid loan account.") );
return TRUE; return TRUE;
} }
@ -1246,7 +1246,7 @@ ld_opts_save_state( LoanDruidData *ldd )
ldd->ld.escrowAcct = ldd->ld.escrowAcct =
gnc_account_sel_get_account( ldd->optEscrowGAS ); gnc_account_sel_get_account( ldd->optEscrowGAS );
if ( ldd->ld.escrowAcct == NULL ) { if ( ldd->ld.escrowAcct == NULL ) {
gnc_info_dialog( ldd->dialog, gnc_info_dialog( ldd->dialog, "%s",
_("Please select a valid " _("Please select a valid "
"Escrow Account.") ); "Escrow Account.") );
return TRUE; return TRUE;
@ -1312,21 +1312,21 @@ ld_rep_save( LoanDruidData *ldd )
ldd->ld.repFromAcct = ldd->ld.repFromAcct =
gnc_account_sel_get_account( ldd->repAssetsFromGAS ); gnc_account_sel_get_account( ldd->repAssetsFromGAS );
if ( ldd->ld.repFromAcct == NULL ) { if ( ldd->ld.repFromAcct == NULL ) {
gnc_info_dialog( ldd->dialog, gnc_info_dialog( ldd->dialog, "%s",
_("Please select a valid \"from\" account.")); _("Please select a valid \"from\" account."));
return TRUE; return TRUE;
} }
ldd->ld.repPriAcct = ldd->ld.repPriAcct =
gnc_account_sel_get_account( ldd->repPrincToGAS ); gnc_account_sel_get_account( ldd->repPrincToGAS );
if ( ldd->ld.repPriAcct == NULL ) { if ( ldd->ld.repPriAcct == NULL ) {
gnc_info_dialog( ldd->dialog, gnc_info_dialog( ldd->dialog, "%s",
_("Please select a valid \"to\" account.") ); _("Please select a valid \"to\" account.") );
return TRUE; return TRUE;
} }
ldd->ld.repIntAcct = ldd->ld.repIntAcct =
gnc_account_sel_get_account( ldd->repIntToGAS ); gnc_account_sel_get_account( ldd->repIntToGAS );
if ( ldd->ld.repIntAcct == NULL ) { if ( ldd->ld.repIntAcct == NULL ) {
gnc_info_dialog( ldd->dialog, gnc_info_dialog( ldd->dialog, "%s",
_("Please select a valid " _("Please select a valid "
"\"interest\" account.") ); "\"interest\" account.") );
return TRUE; return TRUE;
@ -1531,7 +1531,7 @@ ld_pay_save_current( LoanDruidData *ldd )
if ( rod->specSrcAcctP ) { if ( rod->specSrcAcctP ) {
rod->from = gnc_account_sel_get_account( ldd->payAcctFromGAS ); rod->from = gnc_account_sel_get_account( ldd->payAcctFromGAS );
if ( rod->from == NULL ) { if ( rod->from == NULL ) {
gnc_info_dialog( ldd->dialog, gnc_info_dialog( ldd->dialog, "%s",
_("Please select a valid " _("Please select a valid "
"\"from\" account.") ); "\"from\" account.") );
return TRUE; return TRUE;
@ -1540,7 +1540,7 @@ ld_pay_save_current( LoanDruidData *ldd )
rod->to = gnc_account_sel_get_account( ldd->payAcctToGAS ); rod->to = gnc_account_sel_get_account( ldd->payAcctToGAS );
if ( rod->to == NULL ) { if ( rod->to == NULL ) {
gnc_info_dialog( ldd->dialog, gnc_info_dialog( ldd->dialog, "%s",
_("Please select a valid " _("Please select a valid "
"\"to\" account.") ); "\"to\" account.") );
return TRUE; return TRUE;

View File

@ -482,7 +482,7 @@ gnc_stock_split_druid_finish (GnomeDruidPage *druidpage,
pdb = gnc_book_get_pricedb (book); pdb = gnc_book_get_pricedb (book);
if (!gnc_pricedb_add_price (pdb, price)) 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); gnc_price_unref (price);
} }
@ -785,7 +785,7 @@ gnc_stock_split_dialog (GtkWidget *parent, Account * initial)
if (fill_account_list (info, initial) == 0) 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); gnc_close_gui_component_by_data (DRUID_STOCK_SPLIT_CM_CLASS, info);
return; return;
} }

View File

@ -907,7 +907,7 @@ gnc_plugin_page_budget_cmd_estimate_budget(GtkAction *action,
dialog = gtk_message_dialog_new ( dialog = gtk_message_dialog_new (
GTK_WINDOW(gnc_plugin_page_get_window(GNC_PLUGIN_PAGE(page))), GTK_WINDOW(gnc_plugin_page_get_window(GNC_PLUGIN_PAGE(page))),
GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL, 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.")); _("You must select at least one account to estimate."));
gtk_dialog_run (GTK_DIALOG(dialog)); gtk_dialog_run (GTK_DIALOG(dialog));
gtk_widget_destroy(dialog); gtk_widget_destroy(dialog);

View File

@ -2062,7 +2062,7 @@ gnc_plugin_page_register_cmd_void_transaction (GtkAction *action,
if (xaccTransHasSplitsInState(trans, VREC)) if (xaccTransHasSplitsInState(trans, VREC))
return; return;
if (xaccTransHasReconciledSplits(trans) || xaccTransHasSplitsInState(trans, CREC)) { 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; return;
} }
@ -2129,7 +2129,7 @@ gnc_plugin_page_register_cmd_reverse_transaction (GtkAction *action,
return; return;
if (xaccTransGetReversedBy(trans)) { 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.")); _("A reversing entry has already been created for this transaction."));
return; return;
} }

View File

@ -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 multiple SXs be deleted as well? Ideally, the number of
to-be-deleted SXs should be mentioned here; see to-be-deleted SXs should be mentioned here; see
dialog-sx-since-last-run.c:807 */ 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); g_list_foreach(to_delete, (GFunc)_destroy_sx, NULL);
} }

View File

@ -867,7 +867,7 @@ gsr_default_reverse_txn_handler (GNCSplitReg *gsr, gpointer data)
return; return;
if (xaccTransGetReversedBy(trans)) { if (xaccTransGetReversedBy(trans)) {
gnc_error_dialog(gsr->window, gnc_error_dialog(gsr->window, "%s",
_("A reversing entry has already been created for this transaction.")); _("A reversing entry has already been created for this transaction."));
return; return;
} }

View File

@ -380,7 +380,7 @@ gnc_html_load_to_stream( GncHtmlGtkhtml* self, GtkHTMLStream* handle,
if( !safe_strcmp( type, URL_TYPE_SECURE ) ) { if( !safe_strcmp( type, URL_TYPE_SECURE ) ) {
if( !https_allowed() ) { if( !https_allowed() ) {
gnc_error_dialog( priv->base.parent, gnc_error_dialog( priv->base.parent,"%s",
_("Secure HTTP access is disabled. " _("Secure HTTP access is disabled. "
"You can enable it in the Network section of " "You can enable it in the Network section of "
"the Preferences dialog.")); "the Preferences dialog."));
@ -389,7 +389,7 @@ gnc_html_load_to_stream( GncHtmlGtkhtml* self, GtkHTMLStream* handle,
} }
if( !http_allowed() ) { if( !http_allowed() ) {
gnc_error_dialog( priv->base.parent, gnc_error_dialog( priv->base.parent,"%s",
_("Network HTTP access is disabled. " _("Network HTTP access is disabled. "
"You can enable it in the Network section of " "You can enable it in the Network section of "
"the Preferences dialog.")); "the Preferences dialog."));
@ -698,7 +698,7 @@ impl_gtkhtml_show_url( GncHtml* self, URLType type,
do { do {
if( safe_strcmp( type, URL_TYPE_SECURE ) == 0 ) { if( safe_strcmp( type, URL_TYPE_SECURE ) == 0 ) {
if( !https_allowed() ) { if( !https_allowed() ) {
gnc_error_dialog( priv->base.parent, gnc_error_dialog( priv->base.parent,"%s",
_("Secure HTTP access is disabled. " _("Secure HTTP access is disabled. "
"You can enable it in the Network section of " "You can enable it in the Network section of "
"the Preferences dialog.") ); "the Preferences dialog.") );
@ -708,7 +708,7 @@ impl_gtkhtml_show_url( GncHtml* self, URLType type,
if( safe_strcmp( type, URL_TYPE_HTTP ) == 0 ) { if( safe_strcmp( type, URL_TYPE_HTTP ) == 0 ) {
if( !http_allowed() ) { if( !http_allowed() ) {
gnc_error_dialog( priv->base.parent, gnc_error_dialog( priv->base.parent,"%s",
_("Network HTTP access is disabled. " _("Network HTTP access is disabled. "
"You can enable it in the Network section of " "You can enable it in the Network section of "
"the Preferences dialog.") ); "the Preferences dialog.") );

View File

@ -416,7 +416,7 @@ load_to_stream( GncHtmlWebkit* self, URLType type,
if( !safe_strcmp( type, URL_TYPE_SECURE ) ) { if( !safe_strcmp( type, URL_TYPE_SECURE ) ) {
if( !https_allowed() ) { if( !https_allowed() ) {
gnc_error_dialog( priv->base.parent, gnc_error_dialog( priv->base.parent, "%s",
_("Secure HTTP access is disabled. " _("Secure HTTP access is disabled. "
"You can enable it in the Network section of " "You can enable it in the Network section of "
"the Preferences dialog.")); "the Preferences dialog."));
@ -425,7 +425,7 @@ load_to_stream( GncHtmlWebkit* self, URLType type,
} }
if( !http_allowed() ) { if( !http_allowed() ) {
gnc_error_dialog( priv->base.parent, gnc_error_dialog( priv->base.parent,"%s",
_("Network HTTP access is disabled. " _("Network HTTP access is disabled. "
"You can enable it in the Network section of " "You can enable it in the Network section of "
"the Preferences dialog.")); "the Preferences dialog."));
@ -736,7 +736,7 @@ impl_webkit_show_url( GncHtml* self, URLType type,
do { do {
if( safe_strcmp( type, URL_TYPE_SECURE ) == 0 ) { if( safe_strcmp( type, URL_TYPE_SECURE ) == 0 ) {
if( !https_allowed() ) { if( !https_allowed() ) {
gnc_error_dialog( priv->base.parent, gnc_error_dialog( priv->base.parent,"%s",
_("Secure HTTP access is disabled. " _("Secure HTTP access is disabled. "
"You can enable it in the Network section of " "You can enable it in the Network section of "
"the Preferences dialog.") ); "the Preferences dialog.") );
@ -746,7 +746,7 @@ impl_webkit_show_url( GncHtml* self, URLType type,
if( safe_strcmp( type, URL_TYPE_HTTP ) == 0 ) { if( safe_strcmp( type, URL_TYPE_HTTP ) == 0 ) {
if( !http_allowed() ) { if( !http_allowed() ) {
gnc_error_dialog( priv->base.parent, gnc_error_dialog( priv->base.parent,"%s",
_("Network HTTP access is disabled. " _("Network HTTP access is disabled. "
"You can enable it in the Network section of " "You can enable it in the Network section of "
"the Preferences dialog.") ); "the Preferences dialog.") );

View File

@ -863,7 +863,7 @@ dat_add_templ_cb(GtkButton *button, gpointer user_data)
gtk_tree_model_foreach(GTK_TREE_MODEL(td->template_list_store), gtk_tree_model_foreach(GTK_TREE_MODEL(td->template_list_store),
find_templ_helper, &data); find_templ_helper, &data);
if (data.pointer) { if (data.pointer) {
gnc_error_dialog(dialog, gnc_error_dialog(dialog, "%s",
_("A template with the given name already exists. " _("A template with the given name already exists. "
"Please enter another name.")); "Please enter another name."));
continue; continue;

View File

@ -453,7 +453,7 @@ child_exit_cb(GPid pid, gint status, gpointer data)
"value: %d. The called program was \"%s\".\n", "value: %d. The called program was \"%s\".\n",
exit_status, deferred_info->wizard_path); exit_status, deferred_info->wizard_path);
gnc_error_dialog gnc_error_dialog
(info->window, (info->window, "%s",
_("The external program \"AqBanking Setup Wizard\" failed " _("The external program \"AqBanking Setup Wizard\" failed "
"to run successfully because the " "to run successfully because the "
"additional software \"Qt\" was not found. " "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", "value: %d. The called program was \"%s\".\n",
exit_status, deferred_info->wizard_path); exit_status, deferred_info->wizard_path);
gnc_error_dialog gnc_error_dialog
(info->window, (info->window, "%s",
_("The external program \"AqBanking Setup Wizard\" failed " _("The external program \"AqBanking Setup Wizard\" failed "
"to run successfully. Online Banking can only be setup " "to run successfully. Online Banking can only be setup "
"if this wizard has run successfully. " "if this wizard has run successfully. "

View File

@ -208,7 +208,7 @@ static void encoding_selected(GOCharmapSel* selector, const char* encoding,
gnc_csv_parse(preview->parse_data, FALSE, &error)) gnc_csv_parse(preview->parse_data, FALSE, &error))
{ {
/* If it fails, change back to the old encoding. */ /* 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; preview->encoding_selected_called = FALSE;
go_charmap_sel_set_encoding(selector, previous_encoding); go_charmap_sel_set_encoding(selector, previous_encoding);
return; return;

View File

@ -431,7 +431,7 @@ int gnc_csv_load_file(GncCsvParseData* parse_data, const char* filename,
/* TODO Handle file opening errors more specifically, /* TODO Handle file opening errors more specifically,
* e.g. inexistent file versus no read permission. */ * e.g. inexistent file versus no read permission. */
parse_data->raw_str.begin = NULL; 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; return 1;
} }
@ -445,7 +445,7 @@ int gnc_csv_load_file(GncCsvParseData* parse_data, const char* filename,
"UTF-8", NULL); "UTF-8", NULL);
if(guess_enc == 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; 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); gnc_csv_convert_encoding(parse_data, guess_enc, error);
if(parse_data->file_str.begin == NULL) 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; return 1;
} }
else else

View File

@ -683,9 +683,9 @@ gnc_ui_qif_import_load_file_next_cb(GnomeDruidPage * page,
/* Validate the chosen filename. */ /* Validate the chosen filename. */
if (strlen(path_to_load) == 0) 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) 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. " _("File not found or read permission denied. "
"Please select another file.")); "Please select another file."));
else else
@ -696,7 +696,7 @@ gnc_ui_qif_import_load_file_next_cb(GnomeDruidPage * page,
if (scm_call_2(qif_file_loaded, if (scm_call_2(qif_file_loaded,
scm_makfrom0str(path_to_load), scm_makfrom0str(path_to_load),
wind->imported_files) == SCM_BOOL_T) wind->imported_files) == SCM_BOOL_T)
gnc_error_dialog(wind->window, gnc_error_dialog(wind->window, "%s",
_("That QIF file is already loaded. " _("That QIF file is already loaded. "
"Please select another file.")); "Please select another file."));
else else
@ -840,7 +840,7 @@ gnc_ui_qif_import_load_progress_show_cb(GtkWidget *widget,
_( "A bug was detected while reading the QIF file.")); _( "A bug was detected while reading the QIF file."));
gnc_progress_dialog_set_sub(wind->load_progress, _("Failed")); gnc_progress_dialog_set_sub(wind->load_progress, _("Failed"));
gnc_progress_dialog_reset_value(wind->load_progress); 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.")); _( "A bug was detected while reading the QIF file."));
/* FIXME: How should we request that the user report this problem? */ /* 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.")); _( "A bug was detected while parsing the QIF file."));
gnc_progress_dialog_set_sub(wind->load_progress, _("Failed")); gnc_progress_dialog_set_sub(wind->load_progress, _("Failed"));
gnc_progress_dialog_reset_value(wind->load_progress); 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.")); _( "A bug was detected while parsing the QIF file."));
/* FIXME: How should we request that the user report this problem? */ /* 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); g_return_val_if_fail(wind->selected_file != SCM_BOOL_F, FALSE);
if (!acct_name || acct_name[0] == 0) { 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; return TRUE;
} }
else { 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)); const gchar *mnemonic = gtk_entry_get_text(GTK_ENTRY(qpage->mnemonic_entry));
if (!name || (name[0] == 0)) { 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\".")); _("Enter a name or short description, such as \"Red Hat Stock\"."));
g_free(namespace); g_free(namespace);
return TRUE; return TRUE;
} }
else if (!mnemonic || (mnemonic[0] == 0)) { 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" _("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.")); " \"RHT\". If there isn't one, or you don't know it, create your own."));
g_free(namespace); g_free(namespace);
return TRUE; return TRUE;
} }
else if (!namespace || (namespace[0] == 0)) { 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" _("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" " type of investment (such as FUND for mutual funds.) If you don't"
" see your exchange or an appropriate investment type, you can" " 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) && if (gnc_commodity_namespace_is_iso(namespace) &&
!gnc_commodity_table_lookup(table, namespace, mnemonic)) !gnc_commodity_table_lookup(table, namespace, mnemonic))
{ {
gnc_warning_dialog(wind->window, gnc_warning_dialog(wind->window, "%s",
_("You must enter an existing national " _("You must enter an existing national "
"currency or enter a different type.")); "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.")); _( "A bug was detected while converting the QIF data."));
gnc_progress_dialog_set_sub(wind->convert_progress, _("Failed")); gnc_progress_dialog_set_sub(wind->convert_progress, _("Failed"));
gnc_progress_dialog_reset_value(wind->convert_progress); 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.")); _( "A bug was detected while converting the QIF data."));
/* FIXME: How should we request that the user report this problem? */ /* 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.")); _( "A bug was detected while detecting duplicates."));
gnc_progress_dialog_set_sub(wind->convert_progress, _("Failed")); gnc_progress_dialog_set_sub(wind->convert_progress, _("Failed"));
gnc_progress_dialog_reset_value(wind->convert_progress); 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.")); _( "A bug was detected while detecting duplicates."));
/* FIXME: How should we request that the user report this problem? */ /* 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), wind->security_prefs),
SCM_EOL); SCM_EOL);
if (scm_result == SCM_BOOL_F) 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.")); _("GnuCash was unable to save your mapping preferences."));
/* Open an account tab in the main window if one doesn't exist already. */ /* Open an account tab in the main window if one doesn't exist already. */

View File

@ -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), result = gfec_apply(start_editor, scm_cons(priv->cur_report, SCM_EOL),
error_handler); error_handler);
if (result == SCM_BOOL_F || result == SCM_UNDEFINED) { 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.")); _("There are no options for this report."));
} }
else { else {