[network-manager-applet/lr/mobile-wizard-fixes: 15/15] nma/mobile-wizard: proceed to next page on double-clicking the provider



commit 739e3409c297757d434810f79e10e533ca515b8f
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Fri Mar 15 17:03:10 2019 +0100

    nma/mobile-wizard: proceed to next page on double-clicking the provider
    
    A slight usability improvement.

 src/libnma/nma-mobile-wizard.c  | 13 +++++++++++++
 src/libnma/nma-mobile-wizard.ui |  1 +
 2 files changed, 14 insertions(+)
---
diff --git a/src/libnma/nma-mobile-wizard.c b/src/libnma/nma-mobile-wizard.c
index 9715c56e..7de5e3d1 100644
--- a/src/libnma/nma-mobile-wizard.c
+++ b/src/libnma/nma-mobile-wizard.c
@@ -570,6 +570,18 @@ providers_update_complete (NMAMobileWizard *self)
        }
 }
 
+static void
+providers_update_continue (NMAMobileWizard *self)
+{
+       NMAMobileWizardPrivate *priv = NMA_MOBILE_WIZARD_GET_PRIVATE (self);
+
+       gtk_assistant_set_page_complete (GTK_ASSISTANT (self),
+                                        priv->providers_page,
+                                        TRUE);
+
+       gtk_assistant_next_page (GTK_ASSISTANT (self));
+}
+
 static gboolean
 focus_providers_view (gpointer user_data)
 {
@@ -1441,6 +1453,7 @@ nma_mobile_wizard_class_init (NMAMobileWizardClass *klass)
        gtk_widget_class_bind_template_callback (widget_class, country_update_continue);
        gtk_widget_class_bind_template_callback (widget_class, providers_radio_toggled);
        gtk_widget_class_bind_template_callback (widget_class, providers_update_complete);
+       gtk_widget_class_bind_template_callback (widget_class, providers_update_continue);
        gtk_widget_class_bind_template_callback (widget_class, plan_combo_changed);
        gtk_widget_class_bind_template_callback (widget_class, plan_update_complete);
        gtk_widget_class_bind_template_callback (widget_class, apn_filter_cb);
diff --git a/src/libnma/nma-mobile-wizard.ui b/src/libnma/nma-mobile-wizard.ui
index 749c7acf..4c64f3c1 100644
--- a/src/libnma/nma-mobile-wizard.ui
+++ b/src/libnma/nma-mobile-wizard.ui
@@ -271,6 +271,7 @@
                 <property name="can_focus">True</property>
                 <property name="model">providers_sort</property>
                 <property name="search_column">0</property>
+                <signal name="row-activated" handler="providers_update_continue" swapped="yes"/>
                 <child internal-child="selection">
                   <object class="GtkTreeSelection"/>
                 </child>


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