From aa02242b0a94594aa36482bad44ccbd07db4ebd3 Mon Sep 17 00:00:00 2001 From: David Hampton Date: Sun, 29 Jan 2006 16:08:51 +0000 Subject: [PATCH] Use a format string of "%s" when building a message dialog from a single string. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13021 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 18 +++++++++++++++++- src/gnome-search/search-string.c | 3 ++- src/gnome-utils/gnc-file.c | 3 ++- src/gnome/gnc-plugin-page-account-tree.c | 8 ++++---- src/import-export/hbci/gnc-hbci-gettrans.c | 1 + src/import-export/hbci/hbci-interaction.c | 2 +- .../qif-import/dialog-account-picker.c | 2 +- src/report/report-gnome/window-report.c | 1 + 8 files changed, 29 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 56d4da34d2..4a0daca814 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,20 @@ -2006-01-28 David Hampton +2006-01-29 David Hampton + + * src/import-export/qif-import/dialog-account-picker.c: + * src/import-export/hbci/gnc-hbci-gettrans.c: + * src/import-export/hbci/hbci-interaction.c: + * src/report/report-gnome/window-report.c: + * src/gnome-utils/gnc-file.c: + * src/gnome/gnc-plugin-page-account-tree.c: + * src/gnome-search/search-string.c: Use a format string of "%s" + when building a message dialog from a single string. + + * src/gnome-utils/gnc-main-window.c: + * src/gnome/gnc-split-reg.c: + * src/gnome/dialog-commodities.c: + * src/gnome/dialog-price-edit-db.c: Use the gtk2.6 secondary + message text function now that there is a 2.4 emulation routine + available. * src/gnome-utils/gncmod-gnome-utils.c: * src/app-utils/gnc-err-popup.[ch]: diff --git a/src/gnome-search/search-string.c b/src/gnome-search/search-string.c index b6ad67cdc8..124a79aee6 100644 --- a/src/gnome-search/search-string.c +++ b/src/gnome-search/search-string.c @@ -179,6 +179,7 @@ gncs_validate (GNCSearchCoreType *fe) GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, + "%s", _("You need to enter a string value")); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy(dialog); @@ -214,7 +215,7 @@ gncs_validate (GNCSearchCoreType *fe) GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, - errmsg); + "%s", errmsg); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy(dialog); g_free (errmsg); diff --git a/src/gnome-utils/gnc-file.c b/src/gnome-utils/gnc-file.c index 5a96201716..ac275a9c1a 100644 --- a/src/gnome-utils/gnc-file.c +++ b/src/gnome-utils/gnc-file.c @@ -653,7 +653,8 @@ gnc_post_file_open (const char * filename) GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE, fmt1, newfile); - gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), fmt2); + gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), + "%s", fmt2); gnc_gtk_dialog_add_button(dialog, _("_Open Anyway"), GTK_STOCK_OPEN, RESPONSE_OPEN); diff --git a/src/gnome/gnc-plugin-page-account-tree.c b/src/gnome/gnc-plugin-page-account-tree.c index f943917cf1..88316a4868 100644 --- a/src/gnome/gnc-plugin-page-account-tree.c +++ b/src/gnome/gnc-plugin-page-account-tree.c @@ -1035,10 +1035,10 @@ gnc_plugin_page_account_tree_cmd_delete_account (GtkAction *action, GncPluginPag } dialog = gtk_message_dialog_new(GTK_WINDOW(window), - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_QUESTION, - GTK_BUTTONS_NONE, - message); + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_QUESTION, + GTK_BUTTONS_NONE, + "%s", message); g_free(message); gtk_dialog_add_buttons(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, diff --git a/src/import-export/hbci/gnc-hbci-gettrans.c b/src/import-export/hbci/gnc-hbci-gettrans.c index 6b97818e6c..204646b9c3 100644 --- a/src/import-export/hbci/gnc-hbci-gettrans.c +++ b/src/import-export/hbci/gnc-hbci-gettrans.c @@ -202,6 +202,7 @@ gnc_hbci_gettrans_final(GtkWidget *parent, | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, + "%s", _("The HBCI import returned no transactions " "for the selected time period.")); gtk_dialog_run(GTK_DIALOG(dialog)); diff --git a/src/import-export/hbci/hbci-interaction.c b/src/import-export/hbci/hbci-interaction.c index fc7baf6e78..563478753f 100644 --- a/src/import-export/hbci/hbci-interaction.c +++ b/src/import-export/hbci/hbci-interaction.c @@ -542,7 +542,7 @@ showBoxCB(AB_BANKING *ab, GWEN_TYPE_UINT32 flags, 0, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, - text); + "%s", text); if (title && (strlen(title) > 0)) gtk_window_set_title (GTK_WINDOW (dialog), title); diff --git a/src/import-export/qif-import/dialog-account-picker.c b/src/import-export/qif-import/dialog-account-picker.c index c9d89c4344..1d04e47ea4 100644 --- a/src/import-export/qif-import/dialog-account-picker.c +++ b/src/import-export/qif-import/dialog-account-picker.c @@ -163,7 +163,7 @@ gnc_ui_qif_account_picker_new_cb(GtkButton * w, gpointer user_data) GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, - _("Enter a name for the account")); + "%s", _("Enter a name for the account")); entry = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(entry), 250); diff --git a/src/report/report-gnome/window-report.c b/src/report/report-gnome/window-report.c index be551c0a48..8dddf22ea3 100644 --- a/src/report/report-gnome/window-report.c +++ b/src/report/report-gnome/window-report.c @@ -117,6 +117,7 @@ gnc_options_dialog_help_cb(GNCOptionWin * propertybox, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, + "%s", _("Set the report options you want using this dialog.")); g_signal_connect(G_OBJECT(dialog), "response", (GCallback)gtk_widget_destroy, NULL);