[network-manager-applet] mobile-wizard: advance from Country page when Enter is pressed (bgo #663774) (lp:981472)



commit 2df04240ffde56aeb51e71904961e7ccfcb7b9b9
Author: Iain Lane <iain lane canonical com>
Date:   Tue Dec 3 09:51:05 2013 +0000

    mobile-wizard: advance from Country page when Enter is pressed (bgo #663774) (lp:981472)
    
    Patch by Tiago Porangaba
    
    https://bugzilla.gnome.org/show_bug.cgi?id=663774

 src/libnm-gtk/nm-mobile-wizard.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/src/libnm-gtk/nm-mobile-wizard.c b/src/libnm-gtk/nm-mobile-wizard.c
index 86f7ddd..f99be0e 100644
--- a/src/libnm-gtk/nm-mobile-wizard.c
+++ b/src/libnm-gtk/nm-mobile-wizard.c
@@ -993,6 +993,16 @@ country_update_complete (NMAMobileWizard *self)
                nma_country_info_unref (country_info);
 }
 
+static void
+country_update_continue (NMAMobileWizard *self)
+{
+       gtk_assistant_set_page_complete (GTK_ASSISTANT (self->assistant),
+                                        self->country_page,
+                                        TRUE);
+
+       gtk_assistant_next_page (GTK_ASSISTANT (self->assistant));
+}
+
 static gint
 country_sort_func (GtkTreeModel *model,
                    GtkTreeIter *a,
@@ -1124,6 +1134,9 @@ country_setup (NMAMobileWizard *self)
 
        self->country_page = vbox;
 
+       /* If the user presses the ENTER key after selecting the country, continue to the next page */
+       g_signal_connect_swapped (self->country_view, "row-activated", G_CALLBACK (country_update_continue), 
self);
+
        /* Initial completeness state */
        country_update_complete (self);
 }


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