diff options
author | Marek Kasik <mkasik@redhat.com> | 2014-01-20 15:38:42 +0100 |
---|---|---|
committer | Marek Kasik <mkasik@redhat.com> | 2014-01-27 11:12:48 +0100 |
commit | f17b36dc028a3513c11e25bc4575e150a899e50b (patch) | |
tree | 9a3dab9a63b8b812302e4eb6dffd4f6fe266b029 /gtk/gtkprintunixdialog.c | |
parent | 254d35af2900a6fa9b59e457f081c8f024fdcece (diff) | |
download | gtk+-f17b36dc028a3513c11e25bc4575e150a899e50b.tar.gz |
printing: Show "Replace" button when printing to existing file
Use gtk_dialog_add_button() which adds the button to
the message dialog correctly and uses gtk_widget_show() on it.
Diffstat (limited to 'gtk/gtkprintunixdialog.c')
-rw-r--r-- | gtk/gtkprintunixdialog.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c index 367a7fc3b2..b83b10034a 100644 --- a/gtk/gtkprintunixdialog.c +++ b/gtk/gtkprintunixdialog.c @@ -607,19 +607,6 @@ set_busy_cursor (GtkPrintUnixDialog *dialog, g_object_unref (cursor); } -static void -add_custom_button_to_dialog (GtkDialog *dialog, - const gchar *mnemonic_label, - gint response_id) -{ - GtkWidget *button = NULL; - - button = gtk_button_new_with_mnemonic (mnemonic_label); - gtk_widget_set_can_default (button, TRUE); - - gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, response_id); -} - /* This function handles error messages before printing. */ static gboolean @@ -683,10 +670,11 @@ error_dialogs (GtkPrintUnixDialog *print_dialog, dirname); gtk_dialog_add_button (GTK_DIALOG (dialog), - _("_Cancel"), GTK_RESPONSE_CANCEL); - add_custom_button_to_dialog (GTK_DIALOG (dialog), - _("_Replace"), - GTK_RESPONSE_ACCEPT); + _("_Cancel"), + GTK_RESPONSE_CANCEL); + gtk_dialog_add_button (GTK_DIALOG (dialog), + _("_Replace"), + GTK_RESPONSE_ACCEPT); G_GNUC_BEGIN_IGNORE_DEPRECATIONS gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT, |