printing: Fix sensitivity of the Print button

Don't make Print button sensitive until a printer is selected.

https://bugzilla.gnome.org/show_bug.cgi?id=724895
This commit is contained in:
Marek Kasik 2014-02-21 15:39:05 +01:00
parent 465005f929
commit 31748fa5c0

View File

@ -710,6 +710,7 @@ gtk_print_unix_dialog_init (GtkPrintUnixDialog *dialog)
{
GtkPrintUnixDialogPrivate *priv;
GtkTreeSortable *sort;
GtkWidget *widget;
dialog->priv = gtk_print_unix_dialog_get_instance_private (dialog);
priv = dialog->priv;
@ -735,6 +736,8 @@ gtk_print_unix_dialog_init (GtkPrintUnixDialog *dialog)
_("_Print"), GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
widget = gtk_dialog_get_widget_for_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
gtk_widget_set_sensitive (widget, FALSE);
/* Treeview auxilary functions need to be setup here */
gtk_tree_model_filter_set_visible_func (priv->printer_list_filter,