[gtk+] printing: Fix sensitivity of the Print button
- From: Marek Kašík <mkasik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] printing: Fix sensitivity of the Print button
- Date: Fri, 21 Feb 2014 15:05:14 +0000 (UTC)
commit 31748fa5c082895a0b78c7697180f1c9ac2ee5ae
Author: Marek Kasik <mkasik redhat com>
Date: Fri Feb 21 15:39:05 2014 +0100
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
gtk/gtkprintunixdialog.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index 12cf742..6fd82bf 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]