From 6c187d9544578c3d7ab802b4545ee7c43f77b426 Mon Sep 17 00:00:00 2001 From: David Hampton Date: Mon, 21 Nov 2005 04:54:24 +0000 Subject: [PATCH] Remove unused functions. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12004 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 2 + src/gnome-utils/gnc-gui-query.c | 76 --------------------------------- src/gnome-utils/gnc-gui-query.h | 8 ---- 3 files changed, 2 insertions(+), 84 deletions(-) diff --git a/ChangeLog b/ChangeLog index 68584c7503..e41fdd31df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2005-11-20 David Hampton + * src/gnome-utils/gnc-gui-query.[ch]: Remove unused functions. + * src/gnome/gnc-split-reg.c: Update dialogs to give them a Gtk2 HIG look and feel. diff --git a/src/gnome-utils/gnc-gui-query.c b/src/gnome-utils/gnc-gui-query.c index 35611a0c81..a3729cb51c 100644 --- a/src/gnome-utils/gnc-gui-query.c +++ b/src/gnome-utils/gnc-gui-query.c @@ -449,82 +449,6 @@ gnc_error_dialog(GtkWidget *parent, const gchar *format, ...) va_end(args); } - -/********************************************************************\ - * gnc_generic_dialog_common * - * display a message, and asks the user to choose from a * - * number of selections. * - * * - * NOTE: This function does not return until the dialog is closed * - * * - * Args: parent - the parent window * - * type - type of dialog to display (use gnome constants) * - * buttons - Names of the buttons to display * - * format - the format string for the message to display * - * This is a standard 'printf' style string. * - * args - a pointer to the first argument for the format * - * string. * -\********************************************************************/ -#define MAX_BUTTONS 5 -static int -gnc_generic_dialog_common(gncUIWidget parent, const char *type, - const char **buttons_in, - const gchar *format, va_list args) -{ - GtkWidget *verify_box = NULL; - const gchar *buttons[MAX_BUTTONS+1]; - gchar *buffer; - gint i; - - /* Translate the buttons */ - for (i = 0; (i < MAX_BUTTONS) && buttons_in[i]; i++) { - buttons[i] = gettext(buttons_in[i]); - } - g_assert(i < MAX_BUTTONS); - buttons[i] = NULL; - - buffer = g_strdup_vprintf(format, args); - verify_box = gnome_message_box_newv(buffer, type, buttons); - g_free(buffer); - - if (parent != NULL) - gnome_dialog_set_parent(GNOME_DIALOG(verify_box), GTK_WINDOW(parent)); - - gnome_dialog_set_default(GNOME_DIALOG(verify_box), 0); - - return (gnome_dialog_run_and_close(GNOME_DIALOG(verify_box))); -} - -int -gnc_generic_question_dialog(GtkWidget *parent, const char **buttons, - const gchar *format, ...) -{ - int result; - va_list args; - - va_start(args, format); - result = gnc_generic_dialog_common(parent, - GNOME_MESSAGE_BOX_QUESTION, - buttons, format, args); - va_end(args); - return(result); -} - -int -gnc_generic_warning_dialog(GtkWidget *parent, const char **buttons, - const char *format, ...) -{ - int result; - va_list args; - - va_start(args, format); - result = gnc_generic_dialog_common(parent, - GNOME_MESSAGE_BOX_WARNING, - buttons, format, args); - va_end(args); - return(result); -} - static void gnc_choose_radio_button_cb(GtkWidget *w, gpointer data) { diff --git a/src/gnome-utils/gnc-gui-query.h b/src/gnome-utils/gnc-gui-query.h index 432b73c5b7..576e0fd79f 100644 --- a/src/gnome-utils/gnc-gui-query.h +++ b/src/gnome-utils/gnc-gui-query.h @@ -39,12 +39,4 @@ extern void gnc_error_dialog(GtkWidget *parent, const char *format, ...) G_GNUC_PRINTF (2, 3); -extern int -gnc_generic_question_dialog(GtkWidget *parent, const char **buttons, - const char *format, ...) G_GNUC_PRINTF (3, 4); - -extern int -gnc_generic_warning_dialog(GtkWidget *parent, const char **buttons, - const char *format, ...) G_GNUC_PRINTF (3, 4); - #endif