mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Remove unused functions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12004 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
0d2191dad7
commit
6c187d9544
@ -1,5 +1,7 @@
|
||||
2005-11-20 David Hampton <hampton@employees.org>
|
||||
|
||||
* 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.
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user