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



commit cb05f363d2763b7166d3b287738cee3ef7798a81
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 a29d4b5..7c35054 100644
--- a/src/libnm-gtk/nm-mobile-wizard.c
+++ b/src/libnm-gtk/nm-mobile-wizard.c
@@ -1042,6 +1042,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,
@@ -1177,6 +1187,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]