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.
This commit is contained in:
@ -607,19 +607,6 @@ set_busy_cursor (GtkPrintUnixDialog *dialog,
|
|||||||
g_object_unref (cursor);
|
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.
|
/* This function handles error messages before printing.
|
||||||
*/
|
*/
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -683,8 +670,9 @@ error_dialogs (GtkPrintUnixDialog *print_dialog,
|
|||||||
dirname);
|
dirname);
|
||||||
|
|
||||||
gtk_dialog_add_button (GTK_DIALOG (dialog),
|
gtk_dialog_add_button (GTK_DIALOG (dialog),
|
||||||
_("_Cancel"), GTK_RESPONSE_CANCEL);
|
_("_Cancel"),
|
||||||
add_custom_button_to_dialog (GTK_DIALOG (dialog),
|
GTK_RESPONSE_CANCEL);
|
||||||
|
gtk_dialog_add_button (GTK_DIALOG (dialog),
|
||||||
_("_Replace"),
|
_("_Replace"),
|
||||||
GTK_RESPONSE_ACCEPT);
|
GTK_RESPONSE_ACCEPT);
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
Reference in New Issue
Block a user