diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2019-03-15 16:47:01 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2019-05-24 11:52:26 +0200 |
commit | 01e8115d92a20517bf2706d8b9d26f74d6cefa9a (patch) | |
tree | aa1fea98fbbfbf20c81cf8dac6b7c1464a9f4b91 | |
parent | b7f6635c90c4a607533cff815fa9ef75837a766c (diff) | |
download | network-manager-applet-01e8115d92a20517bf2706d8b9d26f74d6cefa9a.tar.gz |
nma/mobile-wizard: hide the dev combo if we're not choosing a device
It's just not nice.
-rw-r--r-- | src/libnma/nma-mobile-wizard.c | 9 | ||||
-rw-r--r-- | src/libnma/nma-mobile-wizard.ui | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/libnma/nma-mobile-wizard.c b/src/libnma/nma-mobile-wizard.c index b364a11d..4d47209b 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; @@ -1129,7 +1130,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 +1404,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); @@ -1500,8 +1501,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..5e5f2a62 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> |