[gnome-control-center/wip/feborges/new-addprinter-dialog: 41/44] printers: Unselect printers when dismissing authentication form



commit ee4e8857dde14b799fce5e2ff40526e4caa14c82
Author: Felipe Borges <felipeborges gnome org>
Date:   Sun Dec 11 15:50:55 2016 +0100

    printers: Unselect printers when dismissing authentication form
    
    When returning from the authentication form in the "Add Printer"
    dialog, we should unselect the last unlocked printer so it updates
    the "Add" and "Unlock" controls properly.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760783

 panels/printers/pp-new-printer-dialog.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/panels/printers/pp-new-printer-dialog.c b/panels/printers/pp-new-printer-dialog.c
index e94d9a3..7d67eb1 100644
--- a/panels/printers/pp-new-printer-dialog.c
+++ b/panels/printers/pp-new-printer-dialog.c
@@ -426,6 +426,10 @@ on_go_back_button_clicked (GtkButton *button,
 
   pp_samba_set_auth_info (priv->samba_host, NULL, NULL);
 
+  /* Change the selection in order to update the buttons according to the
+   * selected entry. */
+  gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (priv->treeview));
+
   go_to_page (dialog, ADDPRINTER_PAGE);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]