[gnome-control-center] Printers: Don't focus non-realized widgets
- From: Marek Kašík <mkasik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] Printers: Don't focus non-realized widgets
- Date: Mon, 5 Mar 2018 16:03:30 +0000 (UTC)
commit 1225766e1fecc2a3c4517106d0695923458dba18
Author: Marek Kasik <mkasik redhat com>
Date: Mon Mar 5 16:59:59 2018 +0100
Printers: Don't focus non-realized widgets
This commit removes focusing of widgets in authentication dialog
which could happen when user traverses Jobs dialog via Tab key
if there are some jobs which need authentication.
Lets rely on standard focus chain.
panels/printers/pp-jobs-dialog.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
---
diff --git a/panels/printers/pp-jobs-dialog.c b/panels/printers/pp-jobs-dialog.c
index 08e3b7bf2..a8c5eee3e 100644
--- a/panels/printers/pp-jobs-dialog.c
+++ b/panels/printers/pp-jobs-dialog.c
@@ -166,30 +166,21 @@ authenticate_popover_update (PpJobsDialog *dialog)
widget = GTK_WIDGET (gtk_builder_get_object (GTK_BUILDER (dialog->builder), "domain-entry"));
gtk_widget_set_visible (widget, domain_required);
if (domain_required)
- {
- gtk_entry_set_text (GTK_ENTRY (widget), "");
- gtk_entry_grab_focus_without_selecting (GTK_ENTRY (widget));
- }
+ gtk_entry_set_text (GTK_ENTRY (widget), "");
widget = GTK_WIDGET (gtk_builder_get_object (GTK_BUILDER (dialog->builder), "username-label"));
gtk_widget_set_visible (widget, username_required);
widget = GTK_WIDGET (gtk_builder_get_object (GTK_BUILDER (dialog->builder), "username-entry"));
gtk_widget_set_visible (widget, username_required);
if (username_required)
- {
- gtk_entry_set_text (GTK_ENTRY (widget), cupsUser ());
- gtk_entry_grab_focus_without_selecting (GTK_ENTRY (widget));
- }
+ gtk_entry_set_text (GTK_ENTRY (widget), cupsUser ());
widget = GTK_WIDGET (gtk_builder_get_object (GTK_BUILDER (dialog->builder), "password-label"));
gtk_widget_set_visible (widget, password_required);
widget = GTK_WIDGET (gtk_builder_get_object (GTK_BUILDER (dialog->builder), "password-entry"));
gtk_widget_set_visible (widget, password_required);
if (password_required)
- {
- gtk_entry_set_text (GTK_ENTRY (widget), "");
- gtk_entry_grab_focus_without_selecting (GTK_ENTRY (widget));
- }
+ gtk_entry_set_text (GTK_ENTRY (widget), "");
widget = GTK_WIDGET (gtk_builder_get_object (GTK_BUILDER (dialog->builder), "authenticate-button"));
gtk_widget_set_sensitive (widget, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]