[gnome-software/wip/temp/ubuntu-xenial-rebased-corrected: 317/331] Set focus chain order in Ubuntu One dialog



commit eb7897249b69f844d03b0deb7c21e62efe7df588
Author: William Hua <william hua canonical com>
Date:   Tue Apr 26 13:53:01 2016 +0200

    Set focus chain order in Ubuntu One dialog

 src/plugins/gs-ubuntuone-dialog.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/gs-ubuntuone-dialog.c b/src/plugins/gs-ubuntuone-dialog.c
index 44c4f03..d015e1e 100644
--- a/src/plugins/gs-ubuntuone-dialog.c
+++ b/src/plugins/gs-ubuntuone-dialog.c
@@ -505,10 +505,21 @@ entry_edited_cb (GsUbuntuoneDialog *self,
 static void
 gs_ubuntuone_dialog_init (GsUbuntuoneDialog *self)
 {
+       GList *focus_chain = NULL;
+
        gtk_widget_init_template (GTK_WIDGET (self));
 
        gtk_window_set_default (GTK_WINDOW (self), self->next_button);
 
+       focus_chain = g_list_append (focus_chain, self->email_entry);
+       focus_chain = g_list_append (focus_chain, self->password_entry);
+       focus_chain = g_list_append (focus_chain, self->remember_check);
+       focus_chain = g_list_append (focus_chain, self->login_radio);
+       focus_chain = g_list_append (focus_chain, self->register_radio);
+       focus_chain = g_list_append (focus_chain, self->reset_radio);
+       gtk_container_set_focus_chain (GTK_CONTAINER (gtk_widget_get_parent (self->email_entry)), 
focus_chain);
+       g_list_free (focus_chain);
+
        g_signal_connect_swapped (self->next_button, "clicked", G_CALLBACK (next_button_clicked_cb), self);
        g_signal_connect_swapped (self->login_radio, "toggled", G_CALLBACK (radio_button_toggled_cb), self);
        g_signal_connect_swapped (self->register_radio, "toggled", G_CALLBACK (radio_button_toggled_cb), 
self);


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