summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2019-05-24 11:50:57 +0200
committerLubomir Rintel <lkundrak@v3.sk>2019-05-24 11:53:33 +0200
commit15ea1ea43f6beb91a647abe3ad77d3afd8e7ed61 (patch)
tree0189d4cdfef24ee3ce3f61178a7ee6c161e67ae9
parentb7f6635c90c4a607533cff815fa9ef75837a766c (diff)
parentcd0392b6dd36c5b5059d6bb6f46998054df0ba31 (diff)
downloadnetwork-manager-applet-15ea1ea43f6beb91a647abe3ad77d3afd8e7ed61.tar.gz
merge: branch 'lr/mobile-wizard-fixes'
https://gitlab.gnome.org/GNOME/network-manager-applet/merge_requests/44
-rw-r--r--src/libnma/nma-mobile-wizard.c24
-rw-r--r--src/libnma/nma-mobile-wizard.ui8
2 files changed, 25 insertions, 7 deletions
diff --git a/src/libnma/nma-mobile-wizard.c b/src/libnma/nma-mobile-wizard.c
index b364a11d..7de5e3d1 100644
--- a/src/libnma/nma-mobile-wizard.c
+++ b/src/libnma/nma-mobile-wizard.c
@@ -67,6 +67,7 @@ typedef struct {
gboolean will_connect_after;
/* Intro page */
+ GtkLabel *dev_combo_label;
GtkComboBox *dev_combo;
GtkLabel *provider_name_label;
GtkLabel *plan_name_label;
@@ -569,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)
{
@@ -929,7 +942,7 @@ country_setup (NMAMobileWizard *self)
NULL);
renderer = gtk_cell_renderer_text_new ();
- column = gtk_tree_view_column_new_with_attributes (_("Country or region"),
+ column = gtk_tree_view_column_new_with_attributes (NULL,
renderer,
"text", COUNTRIES_COL_NAME,
NULL);
@@ -1129,7 +1142,6 @@ intro_remove_all_devices (NMAMobileWizard *self)
/* Select the "Any device" item */
gtk_combo_box_set_active (priv->dev_combo, 0);
- gtk_widget_set_sensitive (GTK_WIDGET (priv->dev_combo), FALSE);
}
static void
@@ -1404,6 +1416,7 @@ nma_mobile_wizard_class_init (NMAMobileWizardClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, NMAMobileWizard, dev_combo);
+ gtk_widget_class_bind_template_child_private (widget_class, NMAMobileWizard, dev_combo_label);
gtk_widget_class_bind_template_child_private (widget_class, NMAMobileWizard, country_page);
gtk_widget_class_bind_template_child_private (widget_class, NMAMobileWizard, country_view);
gtk_widget_class_bind_template_child_private (widget_class, NMAMobileWizard, providers_page);
@@ -1440,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);
@@ -1500,8 +1514,12 @@ nma_mobile_wizard_new (GtkWindow *parent,
priv->family = NMA_MOBILE_FAMILY_3GPP;
else if (modem_caps & NM_DEVICE_MODEM_CAPABILITY_CDMA_EVDO)
priv->family = NMA_MOBILE_FAMILY_CDMA;
- if (priv->family)
+ if (priv->family) {
priv->initial_family = TRUE; /* Skip device selection */
+ } else {
+ gtk_widget_show (GTK_WIDGET (priv->dev_combo_label));
+ gtk_widget_show (GTK_WIDGET (priv->dev_combo));
+ }
gtk_assistant_set_forward_page_func (GTK_ASSISTANT (self),
forward_func, self, NULL);
diff --git a/src/libnma/nma-mobile-wizard.ui b/src/libnma/nma-mobile-wizard.ui
index 3f6637af..4c64f3c1 100644
--- a/src/libnma/nma-mobile-wizard.ui
+++ b/src/libnma/nma-mobile-wizard.ui
@@ -137,8 +137,7 @@
</packing>
</child>
<child>
- <object class="GtkLabel">
- <property name="visible">True</property>
+ <object class="GtkLabel" id="dev_combo_label">
<property name="can_focus">False</property>
<property name="valign">end</property>
<property name="vexpand">True</property>
@@ -154,7 +153,6 @@
</child>
<child>
<object class="GtkComboBox" id="dev_combo">
- <property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">False</property>
<property name="model">dev_store</property>
@@ -188,7 +186,7 @@
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Country or Region List:</property>
+ <property name="label" translatable="yes">Country or region:</property>
<property name="xalign">0</property>
</object>
<packing>
@@ -211,6 +209,7 @@
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="model">country_sort</property>
+ <property name="headers_visible">False</property>
<property name="search_column">0</property>
<signal name="row-activated" handler="country_update_continue" swapped="yes"/>
<child internal-child="selection">
@@ -272,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>